uuid
stringlengths
36
36
repo_name
stringlengths
5
133
relative_path
stringlengths
3
3.76k
content
stringlengths
282
4.03M
category
stringclasses
6 values
algo_rel_score
float32
0.9
1
quality_score
float32
3
8.13
source_meta
dict
67c010e7-7748-4dde-a58e-9c4d1266392d
ahfmrptEkd/game_ai_search_algorithms
src/algorithms/two_player/alternate/mc.cpp
#include "mc.h" #include "random.h" #include "../../../common/game_util.h" #include <iostream> namespace monte_carlo { double playout(TwoMazeState state) { WinningStatus status = state.getWinningStatus(); if (status == WinningStatus::WIN) { return 1.0; } else if (status == Winn...
ALGO
0.999905
5.010529
{ "github_metadata": { "branch": "main", "commit_count": 305, "repo_created_at": "2025-03-26T13:11:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3910f82ad6...
4afa9e35-e3df-4057-9720-beadfc6768db
tupl/Code-Competition
Competition/uva/uva00123/uva00123.cpp
#include <algorithm> #include <cmath> #include <cstring> #include <cstdio> #include <vector> #include <iostream> #include <string> #include <functional> #include <iterator> #include <list> struct Data{ std::string line; std::string key; }; std::string ignores[50]; std::vector<Data> lines; int count; std::string tr...
ALGO
0.999771
4.382879
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2015-12-20T22:40:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b0ab8c463...
81499451-22da-4625-a1ec-7a030c2f97d3
levirs565/competitive
CSES/Sorting and Searching/Sum_of_Three_Values.cpp
#include <algorithm> #include <bitset> #include <climits> #include <functional> #include <iostream> #include <limits> #include <map> #include <memory.h> #include <numeric> #include <queue> #include <set> #include <vector> using namespace std; using i64 = int64_t; void solution() { int n, x; cin >> n >> x; vec...
ALGO
0.999991
4.325583
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2024-08-10T04:49:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7002578f53f...
02d290f3-738a-4f1f-b4df-b6c6a1b79c1c
AustinBoyuJiang/Competitive-Programming
Competitions/Codeforces/Contests/Div 2/145/a.cpp
/* * Author: <NAME> * Date: 3/20/2023 7:10:00 AM * Problem: * Source: * Description: */ /* Configuration */ #define MULTICASES //#define LOCAL //#define READLOCAL //#define FILESCOMP //#define SETMEM //#define FASTIO //#define OPTIMIZE //#define INTTOLL #ifdef OPTIMIZE #pragma GCC optimize(2) #pragma GCC optimiz...
ALGO
0.999852
3.580709
{ "github_metadata": { "branch": "main", "commit_count": 121, "repo_created_at": "2022-08-20T03:49:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0372b6fdbc...
e7f80e25-ec9b-4c9f-80b0-5535b7ab5d0a
tylera277/CFD
Barba_CFD_Module/step1_linear_convection/src/main.cpp
// Program: Simulating a 1d Linear Convection equation // Date: 02-Jul-2023 #include <iostream> #include <vector> #include <string> #include <fstream> #include <Eigen/Dense> int main() { // File where results are going to be output to std::string outputFilename = "../src/output_data/04Jul2023_data.csv"; ...
ALGO
0.99938
4.832496
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-07-02T21:45:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "802c7211c50...
e84a3f59-e01e-4a98-81c4-4723f1bb5906
JoeyRxy/sjtu_proj
lib/hmm/hmm.cpp
#include "hmm.hpp" #include <algorithm> #include <exception> #include <execution> #ifdef DEBUG #include <iostream> #endif namespace rxy { #ifdef DEBUG static void pM(std::unordered_set<LocationPtr> const & loc_set, Markov const & markov, LocationPtr const & loc) { auto& tran_prob = markov.get_tran_prob().at(loc); ...
ALGO
0.999974
6.411633
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2022-05-07T14:16:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c2da1b16...
c606975c-2a2a-4c72-9ddc-7e56b0b93228
jhavishesh/100DaysOfCodes
Day-48/Codechef Starters 25 K Distinct Array.cpp
/* https://www.codechef.com/START25B/problems/DISTK */ //Solution: #include <bits/stdc++.h> using namespace std; #define ll long long signed main(){ #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int tccc= 0, ttee = 1; cin >> ttee; while (tc...
ALGO
0.999961
4.421914
{ "github_metadata": { "branch": "main", "commit_count": 404, "repo_created_at": "2021-12-21T12:33:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa4a64c224...
5d214c2c-bb12-448c-8e9d-86154fa9493c
yyzhg/LintCode
Longest_Palindrome_substring.cpp
class Solution { public: /** * @param s: input string * @return: the longest palindromic substring */ string longestPalindrome(string &s) { // write your code here int length = 0; int strLen = s.length(); int start = 0; int end = 0; for (in...
ALGO
0.999973
5.820853
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-06-24T09:06:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "980490cfb3...
e5edc6f3-c802-4be4-a1cb-17eece02402c
NewReStarter/Training
3391/621.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <string> #include <cmath> #include <algorithm> #include <vector> using namespace std; int set[60]; int myRank[60]; int c[60][60]; int b[60][60]; int d[60][60]; struct edge { int u,v,c; bool s; edge():u(0),v(0),c(0),s(0){} edge(int _u,int _v, int _c...
ALGO
0.999902
3.6721
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2017-07-13T03:42:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b38459959...
7d02196d-8906-49db-89ff-b7f5e6528cf8
wrsophia/LeetCode
105. Construct Binary Tree from Preorder and Inorder Traversal/my_solution.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* buildTree(vector<int>& preorder, vector<int>& inorder) { int preLength = preo...
ALGO
0.999991
6.484879
{ "github_metadata": { "branch": "master", "commit_count": 151, "repo_created_at": "2016-10-09T10:22:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de056289...
b48026d7-a88c-41f0-b340-444a5d831ac6
Ikhtiyor31/Codeforces
Card-Constructions.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll cardcount(ll card) { return ll(card*(3 * card + 1) / 2); } int main() { ll n; cin >> n; vector<ll> nums(n); for(int j = 0; j < n; j++) cin >> nums[j]; for(int k = 0; k < n; k++) { ll take = nums[k]; ...
ALGO
0.999819
3.851366
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2020-05-06T09:58:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c84e24b10...
0ef231eb-84bb-4fa9-a70f-8e302791a33b
missingjs/mustard
viking/huffman/huffman.cpp
// @mission: 给定若干字符(英文字母)和对应的频率,以及由这些字符组成的原文,对其进行Huffman编码,并实现对应的解码 #include <iostream> #include <string> char * huffman_encode( const char * ch, const double * freq, int total, const char * content); char * huffman_decode( const char * ch, const double * freq, int total, const char ...
ALGO
0.999769
4.093361
{ "github_metadata": { "branch": "master", "commit_count": 354, "repo_created_at": "2015-07-15T03:57:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f557eaba...
a10ec7a1-b1c5-4ff5-94c8-5a48b9641dfa
wjdwls0630/2018_2_C_KHU
2018_2_객프/13/lab12(화목)/lab12_2.cpp
#include <iostream> #include <vector> #include <cstdlib> #include <ctime> using Iter=std::vector<int>::iterator; int main() { srand(time(NULL)); std::vector<int> vec1(10); for (Iter iter=std::begin(vec1); iter!=std::end(vec1); iter++) { *iter=rand()%10+1; } std::vector<int> vec2(10); for (Iter iter=std...
ALGO
0.994692
3.955717
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2018-10-31T13:14:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51c7e13b2...
6d426a55-d1df-4536-86da-f8aab9748cf1
moni-roy/LeetCode
2201-2300/2299-strong-password-checker-ii/2299-strong-password-checker-ii.cpp
class Solution { private: string special = "!@#$%^&*()-+"; public: bool strongPasswordCheckerII(string password) { if(password.size() < 8) return false; bool has_special = false, has_digit = false, has_lower = false, has_upper = false, has_repeat = true; for(int i = 0; i < password.size(...
ALGO
0.977336
5.029692
{ "github_metadata": { "branch": "main", "commit_count": 3796, "repo_created_at": "2021-05-16T10:24:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6c3e13a6...
ebb1e5bb-82a4-4fcd-9a43-6da8bdaf355d
yoshixmk/devs-pc
Strategy/OffenseDefenseStrategy.cpp
#include "OffenseDefenseStrategy.h" namespace Strategy { //void OffenseDefenseStrategy::initialize() { //} void strongModeOD(LPVOID pParam) { CvPoint malletNowC; CvPoint packNowC; CvPoint packPre0C; CvPoint packPre1C; CvPoint forecastPoint = cvPoint(0, 0); RobotAction robotAction; SpeedOfPack speedOfPack; Ma...
ALGO
0.983724
5.478845
{ "github_metadata": { "branch": "master", "commit_count": 180, "repo_created_at": "2015-12-18T05:23:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c0a291f...
0defc41f-f0fe-44a7-a170-87c35a21ccdc
SilverHL/Leetcode
Two Pointers/524_LongestWordInDictWithDeleting.cpp
// // Created by 王靖煊 on 2019-07-07. // #include <iostream> #include <vector> #include <string> using namespace std; class Solution524 { public: string FindLongestWord(string s, vector<string> &d) { if (s.length() == 0) return ""; string res; int max_len = INT_MIN; ...
ALGO
0.999941
5.278323
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2019-07-10T04:15:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "478f063b8...
24600282-531a-4401-ae51-d05bbd94a382
ngthanhtrung23/ACM_Notebook_new
DataStructure/test/link_cut_tree_vertexsetpathcomposite.test.cpp
#define PROBLEM "https://judge.yosupo.jp/problem/dynamic_tree_vertex_set_path_composite" #include <bits/stdc++.h> using namespace std; #include "../../Math/modint.h" using modular = ModInt<998244353>; #define PATH_QUERIES_ONLY struct T { modular a, b; T() : a(1), b(0) {} T(modular _a, modular _b) : a(_a...
ALGO
0.99885
5.410005
{ "github_metadata": { "branch": "master", "commit_count": 942, "repo_created_at": "2015-01-11T13:46:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 442, "forks": 128, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1866...
63e43f69-b81c-46d8-b530-54e39dc38645
TDDY27/CPP-CODES
SPROUT JUDGE/OK/ALGO22/東南亞兒童.cpp
#include <bits/stdc++.h> #define TDDY ::ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); using namespace std; int const maxn=2e5; int ide[maxn]; struct Stk{ int head,a[maxn]; Stk(): head(0) {} int top(){ return a[head-1]; } void push(int ind){ a[head++]=ind; } void p...
ALGO
0.999984
4.00038
{ "github_metadata": { "branch": "main", "commit_count": 260, "repo_created_at": "2021-12-22T01:41:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f0a827b6c...
2f901f70-fbee-42f2-ad44-9f10e635b17c
ishandutta2007/codeforces-s
stevenkplus/normal/960/D.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 100; long long A[MAXN], // A[level] = rightshift of values B[MAXN]; // B[level] = rightshift of nodes int lvl(long long val) { // count digits in val int res = 0; while (val) { ++res; val /= 2; } return res; } long long rotat...
ALGO
0.999569
3.959457
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5fcfe901c786...
99fed678-55e1-429b-8964-9cb18c7d70d3
marohnicluka/HelmholtzBEM
examples/roots_newton_polygon_rsvd.cpp
/** * \file roots_newton_polygon_rsvd.cpp * \brief This target builds a script that computes minimas in * the smallest singular value of the Galerkin BEM * approximated solutions operator for the sedond-kind * direct BIEs of the Helmholtz transmission problem * using the Newton-Raphson method. * The results are ...
ALGO
0.999722
4.454959
{ "github_metadata": { "branch": "master", "commit_count": 260, "repo_created_at": "2023-06-02T11:18:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8412712a...
a39b9309-7097-4b2d-a210-7676383e58bb
shresth87/DSA-by-c-
majority element question.cpp/string compression.cpp
#include<iostream> #include<string> using namespace std; int stringcompression(char chars[],int n , int k){ int i=0; int count=0; int ansIndex=0; while(i<n){ int j=i+1; while(j<n && chars[j]==chars[i]){ j++; }// loop se bahar kab aaoge // jab puri string tr...
ALGO
0.999994
4.564757
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-03-13T14:43:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1626483bad29...
97ad1994-45f0-483c-9ef3-7407c1876d5c
Move38/Blinks-Simulator
examples/code/Berry.ino
/* * Berry * by VV Studio * at IndieCade East 2018 Game Jam * Lead development by <NAME>, Move38 Inc. * original game by ViVi and Vanilla * * Rules: https://github.com/Move38/Berry/blob/master/README.md * * -------------------- * Blinks by Move38 * Brought to life via Kickstarter 2018 * * @madewi...
ALGO
0.986819
5.216851
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2019-11-13T20:14:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 3, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "1f28e1f8a...
4ff271fe-153d-4392-99c7-a8481a99f3c9
NadineAB/MPC-Meshing_Point_Clouds
CGAL/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_profile.h
// Copyright (c) 2006 GeometryFactory (France). All rights reserved. // // This file is part of CGAL (www.cgal.org). // You can redistribute it and/or modify it under the terms of the GNU // General Public License as published by the Free Software Foundation, // either version 3 of the License, or (at your option) any...
ALGO
0.987234
6.923682
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2015-12-18T21:22:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b892eccd...
61766eb0-4325-4e37-8439-caf5740b469e
VivanVatsa/c-collection
Trees/fromBT2BST.cpp
#include <bits/stdc++.h> #include <iostream> #include <stdlib.h> #include <stdio.h> using namespace std; // conversion of binary tree into binary search tree /* algorithm for conversion: Following is a 3 step solution for converting Binary tree to Binary Search Tree. 1) Create a temp array arr[] that stores inorder ...
ALGO
0.999981
4.694606
{ "github_metadata": { "branch": "master", "commit_count": 428, "repo_created_at": "2020-02-01T16:23:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55527f0f...
1505f094-ada6-43d5-8a83-ea6fa688e806
parikshitnadimpalli/doubly-linked-list
node.cpp
#include "node.h" using namespace std; Node::Node(int d) { data = d; prev = next = nullptr; } Node::~Node() { prev = next = nullptr; delete prev; delete next; } int integerInput() { int n; while (!(cin >> n)) { cin.clear(); cin.ignore(numeric_limits <streamsize>::max(), '\n'); cout << endl << "Inva...
ALGO
0.965315
4.005364
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-07-24T08:48:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "218e0f326d10...
e554e42d-a47b-4045-a644-74134cc11d8c
iroot900/Algorithm-Practice-300-Plus
076 Minimum Window Substring.cpp
class Solution { public: string minWindow(string s, string t) { //start point, end point. shrink start point. //need to know when contains all and shrink policy. //main logic. if belong to put word in, unordered_map<char,int> dict; for(auto cha:t) dict[cha...
ALGO
0.999993
6.165943
{ "github_metadata": { "branch": "master", "commit_count": 400, "repo_created_at": "2015-06-06T18:32:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c1f5e1a...
13a1ff4f-71bf-451e-8892-c237a8b6f447
Aakash2003/DSA
Graph/bipartiteGraph.cpp
#include <bits/stdc++.h> using namespace std; const int N = (int)1e5; vector<int> adjList[N + 1]; int color[N + 1]; bool visited[N + 1]; bool dfs(int node, int col) { visited[node] = true; color[node] = col; for (int v : adjList[node]) { if (!visited[v]) { bool ans = dfs(n...
ALGO
0.999972
4.856651
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-22T16:42:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db5c073c8d23...
78078b6b-57ba-44cf-8573-9a530c8142dc
seungeunn/algorithm_capston
Project5/KMP.cpp
#include<iostream> #include<cstring> using namespace std; int nextt[10]; void InitNext(string p) { int i, j; int M = p.length(); nextt[0] = -1; for (i = 0, j = -1; i < M; i++, j++) { nextt[i] = j; while ((j >= 0) && (p[i] != p[j])) { j = nextt[j]; } } } int KMP...
ALGO
0.999818
3.432226
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2022-03-23T04:04:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9384fe35...
7de60bb8-8620-4a7a-b97f-064a114dd96c
mhtafhim/Messy-Stuffs
CSES/Building_Teams.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define mod 1000000007 #define inf 1e18 bool vis[10000000]; int team[10000000]; int parent[10000000]; vector<...
ALGO
0.999991
4.494604
{ "github_metadata": { "branch": "main", "commit_count": 122, "repo_created_at": "2022-12-10T11:24:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f9666e2f1...
6c656d4c-6522-4ab4-b2fe-d51a03301f99
meilleur777/Competitive_Programming
AtCoder/old/ABC/ABC176/D.cpp
#include <bits/stdc++.h> #define rep(i, n) for(int i=0; i<(n); i++) using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> intp; void init_code() { ios_base::sync_with_stdio(false); cin.tie(NULL); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", ...
ALGO
0.99998
4.002426
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2022-06-25T10:22:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75e2fb3e78...
5553ea82-fe2b-44cf-b9a8-82c70534cfb2
tmddus7776/2022-1
C++/플밍 8주차 과제/task16_2.cpp
#include <iostream> using namespace std; class Vector2D { public: Vector2D(); Vector2D(int X, int Y); void output() const; int getX() const; int getY() const; private: int x; int y; }; Vector2D::Vector2D() { x=0; y=0; } Vector2D::Vector2D(int X, i...
ALGO
0.966275
5.215431
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-09-24T07:52:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a258e555599...
a82ad4cc-0a4e-4e39-b9c3-a079c1bd93d6
ruiseixasm/LearningConcepts
Cpp/Snippets/CRC/CRC-15-CAN/CRC-15-CAN.cpp
#include "CRC-15-CAN.h" uint16_t CRC15CAN::update_crc(uint16_t crc, uint8_t data) { crc ^= (data << 7); for (int i = 0; i < 8; i++) { if (crc & 0x4000) { crc = (crc << 1) ^ POLY; } else { crc <<= 1; } } return crc & 0x7FFF; } uint16_t CRC15CAN::compute(c...
ALGO
0.972258
6.842403
{ "github_metadata": { "branch": "main", "commit_count": 639, "repo_created_at": "2023-08-07T12:43:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8205a0441f...
fa272e78-b92a-48c4-828d-52bb407a88c8
kei1107/algorithm
problems/Atcoder/ARC095_C.cpp
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; } template<c...
ALGO
0.999996
4.589115
{ "github_metadata": { "branch": "master", "commit_count": 488, "repo_created_at": "2017-10-06T09:12:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "441754be...
77d8d2c3-5235-4945-9013-a74e2ce75fbc
8fm/openw3
dev/src/common/redSystem/hash.h
/** * Copyright © 2013 CDProjekt Red, Inc. All Rights Reserved. */ #ifndef _RED_HASH_H_ #define _RED_HASH_H_ #include "types.h" // For StringLength #include "crt.h" // For RotateLeft #include "bitUtils.h" // For __m128i #if defined( RED_PLATFORM_WINPC ) #include <emmintrin.h> #endif #define RED_FNV_OFFSET_BASIS32...
ALGO
0.915834
5.985982
{ "github_metadata": { "branch": "main", "commit_count": 159, "repo_created_at": "2024-08-04T03:03:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2dab19553e...
f46fb63a-ea65-4ab6-8a37-db5c806e85f1
Alexasandrovich/paralell_algorithms
3.2/3.2/Source.cpp
#include <thread> #include <iostream> #include <iostream> #include <algorithm> #include <vector> #include <omp.h> #include <time.h> using namespace std; void sort_proc(int * a, int i, int size) { for (int j = size - 1; j > i; j--) { // Если соседние элементы расположены // в неправильном порядк...
ALGO
0.999907
4.148731
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-06-26T12:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b530a5b23...
aef8dc9e-caec-4f06-99cc-f305ce9157ee
yupab3/BOJ
BOJ_cpp/2025_05/1082.cpp
#include <iostream> #include <queue> using namespace std; int p[10]; queue<int> dp[52]; queue<int> maxQueue(queue<int> l, queue<int> r) { queue<int> orgL = l; queue<int> orgR = r; if (l.size() == r.size()) { while (l.size()) { if (l.front() > r.front()) return orgL; else i...
ALGO
0.999988
3.352821
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2024-02-06T05:56:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3d4d1285...
3d08a23e-b8d6-408b-8d44-a4f20223574c
NithinKonda/aoc_2024
day_five/one.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s; map<int, vector<int>> edges; long long answer = 0; while (getline(cin, s)) { if (s.empty() || !isdigit(s[0])) { continue; } int len = (int) s.length(); vector<int> v; bool was_pipe = false; for (int i = 0; i < len; i++) { if (i...
ALGO
0.999537
4.278283
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2024-12-01T16:48:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1de6022b687...
f9f8e433-017d-4ed2-a9d7-d1b241da3532
ethz-adrl/towr
towr/include/towr/initialization/gait_generator.h
/****************************************************************************** Copyright (c) 2018, <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain t...
ALGO
0.923835
6.492953
{ "github_metadata": { "branch": "master", "commit_count": 1639, "repo_created_at": "2018-01-14T13:53:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1004, "forks": 245, "issues": 23, "pull_requests": 3 }, "file_meta": { "content_id": "cb...
78f609cb-07f8-439e-8a66-a1cc2c744ddc
mdyasinahmed/CSE200_CompetitiveProgramming
C4/marathon/B.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; cin >> n; vector<pair<int, int>> dominoes(n); vector<int> result(n); for (int i = 0; i < n; ++i) { cin >> dominoes[i].first >> dominoes[i].second; result[i] = i + 1; } sort...
ALGO
0.999996
4.268919
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2024-01-23T17:57:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07552e291bf...
84313d48-f408-4cac-8d55-09dc9052fbc7
SalahAbotaleb/Competitive-Programming
CodeForces/1185G1/38752298_AC_31ms_1552kB.cpp
#include <bits/stdc++.h> #define int long long #define ll long long #define el '\n' using namespace std; #define FIFO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0); const ll loo = 0x3f3f3f3f3f3f3f3f; const int oo = 1e9, mod = 1e9 + 7; int n, tot; const int N = 1 << 17 - 1; ...
ALGO
0.999905
4.336422
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2022-07-05T22:28:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "54cd8fd77eb...
514bf5bc-9cfd-4cdd-99cf-38d780d5fe64
PinzonHarker/ProyectoIntermedioHC-2022-1
src/Fill.cpp
#include "../libs/Fill.h" #include "../libs/Percolation.h" #include <random> #include <string> #include <iostream> std::string Fill::toString(std::vector<int> matrix) { std::string sMatrix = ""; for (int i = 0; i < sqrt(matrix.size()); i++) { for (int j = 0; j < sqrt(matrix.size()); j++) { sMatrix....
ALGO
0.962984
4.050722
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2022-04-26T20:07:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1212872eb2d...
56554338-c606-4aa5-8598-8dee4d1c9572
BenHenderson09/Ghostwriter
src/paraphraseText/paraphraseText.cpp
#include <sstream> #include <vector> #include <thread> #include <curl/curl.h> #include "paraphraseText.hpp" #include "../CLIArgumentHolder/CLIArgumentHolder.hpp" #include "../util/findSynonymsOfWord/findSynonymsOfWord.hpp" #include "../util/readFile/readFile.hpp" namespace { std::vector<std::string> splitInputText...
TOOL
0.962135
5.962184
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2020-02-03T06:57:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9bad3f89a...
b6c37de6-c9bd-401e-83d1-855330b979cb
Lang-Dat/dev
Dt/past/38/prime3.cpp
/** * author: <NAME> * create: 28-12-2022 40:31:19 **/ #include <iostream> #include <algorithm> #include <cmath> using namespace std; bool isPrime_(uint64_t n) { // TC: O(sqrt(n)) if (n <= 3) return n > 1; if (n % 2 == 0 || n % 3 == 0) return false; for (uint64_t i = 5; i <= std::sqrt(n); i += 6) ...
ALGO
0.999744
3.842825
{ "github_metadata": { "branch": "main", "commit_count": 259, "repo_created_at": "2022-09-03T14:10:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ff6490ff0...
71226359-3c86-4a8f-8264-61df5ef0d9f3
neofytr/Codeforces
old/topics/prefixSum/haybale.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, k; cin >> n >> k; vector<long long> arr(n + 1, 0); for (int i = 0; i < k; ++i) { int a, b; cin >> a >> b; arr[a] += 1; if (b + 1 <= n) arr[b + 1] -= 1; } // prefix sum to apply ...
ALGO
0.999997
4.456198
{ "github_metadata": { "branch": "main", "commit_count": 904, "repo_created_at": "2024-12-27T05:04:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c92f7855e...
c803f930-e6d6-49c7-aa5c-60d66a7cc244
brunotojo/MC621A_2021S2
bignum.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; #define MAXDIGITS 100 #define PLUS 1 #define MINUS -1 typedef long long ll; typedef struct { char digits[MAXDIGITS]; int signbit; int lastdigit; } bignum; //basic operations are in repository void ll_to_bignum(ll s, bignum *n) { ...
ALGO
0.999774
3.650241
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-11-25T20:23:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d076049852c...
a4553c0f-910f-4dbb-94bf-f0f44e4145ee
ishandutta2007/codeforces-s
summitwei/normal/936/A.cpp
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef vector<pair<int, int> > vpii; typedef pair<int, int> pii; typedef long long ll; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; typedef vector<ll> vll; typedef long double ld; #define INF 0x3f3f3f3f #define MOD 998244353LL #define...
ALGO
0.999759
3.53227
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5696b8aaf69...
4b6c8899-b33c-43aa-9803-fc89667d32db
blank-manash/coding-library
Greedy/DIEHARD.cpp
#include<bits/stdc++.h> using namespace std; #define uset unordered_set #define umap unordered_map #define db(x) cout << #x << " == " << x << ";\n" #define a(x) x.begin(),x.end() #define input(v,n) for(int i=0;i<n;i++)cin>>v[i] typedef vector<int> vi; typedef pair<int,int> pi; int findTime(int h, int a) { int cnt...
ALGO
0.999544
3.523616
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-05-22T07:44:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6fde5a22c...
bc1abeab-56dc-4a15-ba81-f8ba6301488a
Akash007670/cp-solutions
end-sorted.cpp
//Question --> https://www.codechef.com/submit/ENDSORTED #include<bits/stdc++.h> using namespace std; void sol() { int n; cin>>n; int index1,indexN; for(int i=0;i<n;i++) { int num; cin>>num; if(num == 1) index1 = i; if(num == n) indexN = i; } int ab = index1 + ...
ALGO
0.999934
4.760309
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-07-15T10:28:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc1e8b31c60e...
665c20a1-fb83-4623-9748-4e5a5ab32926
pi19404/m19404
robot/AStart/main.cpp
#include "mainwindow.h" #include <QApplication> #include <stdio.h> #include <opencv/cv.h> #include <opencv/cvaux.h> #include <opencv/highgui.h> // ======================= // YAGSBPL libraries #include "yagsbpl_base.h" #include "planners/A_star.h" #include "queue" int main(int argc, char *argv[]) { // Profilin...
ALGO
0.98755
3.212312
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2013-02-16T18:48:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 61, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f70c1a...
e8f01747-5dbf-44d4-9e8c-b3420f15d360
Avinash0308/Competitive_Programming
001/prac_ques/test4.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; vector<int> a(n); for(int i = 0; i<n; i++){ cin>>a[i]; } int q; cin>>q; vector<vector<int>> query(q,vector<int>(3)); for(int i = 0; i<q; i++){ for(int j = 0; j<3 ;j++){ ...
ALGO
0.999897
3.787241
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2023-07-14T21:02:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d8e1a3aeac2...
15712990-7065-4daf-956e-5b78486933e4
se9fault/LeetCode-400
15-Random/384_Shuffle_an_Array.cpp
/* Shuffle a set of numbers without duplicates. Any permutation must equally likely to be returned. Example: int[] nums = {1,2,3}; Solution obj = new Solution(nums); obj.shuffle(); // Returns the random shuffling of array [1,2,3]. obj.reset(); // Return the resetted array of its original form [1,2,3]. obj.shuffle();...
ALGO
0.999809
6.664641
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2019-10-13T15:43:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1adcee008...
3af6911d-4ed2-44ba-8094-775810b10e1f
JeckyllIsHyde/sim-methods-for-physics
tarea03/Resuelve-Problema-1.cpp
#include <iostream> #include <fstream> #include <cmath> using namespace std; /* Lattice-Boltzmann para la ecuacion de onda * 2 * |0 * 3 --*--1 con w0 * | * 4 */ const int Lx=400; const int Ly=200; const int Q=5; const double W0 = 1./3; const double C = 0.5; // C < 0.707 celdas por click con...
ALGO
0.999951
4.24501
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2017-09-13T00:23:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca01116ec...
958f334e-35e2-48d6-95f0-aa6af9fe09c1
jayeshpatel8/Coding-Practise-using-Leetcode-Coding-Platform
problems/longest_common_subpath/solution.cpp
#define MOD(a) (a)%mod class Solution { public: int longestCommonSubpath(int n, vector<vector<int>>& paths) { int l=0; int r = min_element(begin(paths),end(paths), [](const auto& p1, const auto & p2){ return p1.size() < p2.size(); })->size(...
ALGO
0.999937
5.269143
{ "github_metadata": { "branch": "main", "commit_count": 2992, "repo_created_at": "2021-08-22T09:43:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3cd66ac9...
6d4c8bcf-94e6-445d-8192-72ad1ca6a0e6
ganghe74/algo
baekjoon/1006_습격자 초라기.cpp
#include <bits/stdc++.h> using namespace std; int T, N, W, a[2][10005], d[10005][3]; int solve(int x, int y) { if (y == 0 && (!a[0][x] && !a[1][x])) return 0; if (y == 1 && (!a[1][x])) return 0; if (y == 2 && (!a[0][x])) return 0; int &ret = d[x][y]; if (ret) return ret; if (y == 0) { r...
ALGO
0.999988
3.633276
{ "github_metadata": { "branch": "master", "commit_count": 645, "repo_created_at": "2018-05-13T11:19:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "81619c8c...
50c3ff35-1194-46a5-a621-bc3e3aa410c6
yoonjeong-choi-dev/study-history
NumericalAnalysis/FiniteElementMethod/5_SparseMatrix/P1_nonconfoming.cpp
//2017 FEM P1_nonconforming //20173595 <NAME> #include "t_sparse.h" #include <cstdlib> //ΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜ //ΆΜΆΜ Problem ΆΜΆΜ //ΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜΆΜ // - div (p grad u) = f double u(FVector_doubl...
ALGO
0.999303
3.555628
{ "github_metadata": { "branch": "master", "commit_count": 473, "repo_created_at": "2020-11-23T11:59:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61919c24...
a4b40adc-218b-4564-af81-ad747a527ba1
RahmanMoshiur00/Problem-Solving
Contests/NCPC 2018 Rounding.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' #define all(a) a.begin(), a.end() #define ZERO(a) memset(a, 0, sizeof(a)) #define MINUS(a) memset(a, 0xff, sizeof(a)) #define debug if( 0 ) const int mxn = 100010; char round_up(char c) {...
ALGO
0.993518
3.768637
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2024-03-04T15:27:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06f2c39a11...
8f6b1953-9c5a-41a4-a3f9-f6fbcbab9122
anikait1/InterviewPrep
450Questions/Arrays/minmaxArray.cpp
#include <iostream> #include <utility> #include <limits> #include <cstdlib> template<typename T> void display(T *container, std::size_t size) { std::cout << "[ "; for (std::size_t i = 0; i < size; ++i) { std::cout << container[i] << ' '; } std::cout << "]"; } std::pair<int, int> minmax(int *container, std...
ALGO
0.998633
5.075859
{ "github_metadata": { "branch": "main", "commit_count": 104, "repo_created_at": "2020-10-14T10:57:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "964be8f374...
57e6e3de-8263-47c2-979d-1ebc7294cd19
PongDev/2110211-INTRO-DATA-STRUCT
d57_q1_sparse/sparsegraph [set version].h
#ifndef __SPARSE_GRAPH_H__ #define __SPARSE_GRAPH_H__ // Your code here #include <bits/stdc++.h> using namespace std; class SparseGraph { public: SparseGraph() { // Your code here gph.resize(3); } SparseGraph(int n_in) { // Your code here gph.resize(n_in); } Sp...
ALGO
0.99672
6.057914
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-09-27T16:00:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92a143cae233...
0e806779-797a-4373-b748-8e9a11bca2ef
ymd45921/HUST-ACM-training
offline/2020/SWERC2018/Redo/D.???.cc
/** * * 中 庸 之 道 * 虽然感觉挺离谱的,但是似乎确实这么回事 */ #include <bits/stdc++.h> using namespace std; using longs = long long; using uint = unsigned; using ulongs = unsigned long long; using longd = long double; #define eprintf(x...) fprintf(stderr, x) #define var(x) ""#x" = " << x #define lll __int128 #define minimize(a, b) (...
ALGO
0.999792
3.97052
{ "github_metadata": { "branch": "master", "commit_count": 423, "repo_created_at": "2020-12-02T04:26:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27642c95...
a18121b7-4217-4e96-aa08-5fd5425d73af
mateus-fecassio/_LNCC_-SDumont
Introdução ao OpenCL/códigos/heterogeneo.cc
// ------------------------------------------------------------------------ /* Código em OpenCL para o cálculo paralelo heterogêneo (CPU + GPU) de: ___ x = 3 * x - \| x , onde x é um vetor. A multiplicação e raiz quadrada são processadas concorrentemente, onde a ...
ALGO
0.999611
4.398216
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2020-02-03T20:49:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0dbe7c7e68...
6ff417e8-0593-4473-860c-8fa17ae7564e
sjy2335/Problem-Solving
백준/Previous/1260_dfsNbfs.cpp
#include <bits/stdc++.h> using namespace std; int N, M, V; bool visited[1001]; vector<vector<int>> v; void dfs(int crnt){ visited[crnt] = true; cout << crnt <<' '; for(int next : v[crnt]){ if(!visited[next]) dfs(next); } } int main() { ios_base::sync_with_stdio(0); cin.tie(0); ...
ALGO
0.999997
4.405585
{ "github_metadata": { "branch": "main", "commit_count": 460, "repo_created_at": "2022-12-23T06:36:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "03cfb2ad9f...
0188e5c8-e8ba-4d7a-9a47-644b0467b44f
alex386/GPGPU-4-body-correlation-function
G4Function/Linux/CPU/g4cpu.cc
/*==============================================================*/ /* Interaction induced scattering (IIS) calculation module for */ /* RIGMD simulation application */ /* */ /* Author: <NAME> ...
ALGO
0.94584
3.496392
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2019-01-25T17:22:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9bdc4164a...
a4c0fe20-0c1c-45d5-b62a-5462f23e6d61
emjay2k/FastMarkerLocalizer
src/marker/mappingmarkerpredictor.cpp
/* * MappingMarkerPredictor.cpp * * Created on: 19.01.2015 * Author: jung */ #include "marker/mappingmarkerpredictor.h" namespace fml { MappingMarkerPredictor::MappingMarkerPredictor() { // maximum error of the projected pose in each direction const float max_error_mm = 100; nodes_.push_back(GraphVert...
ALGO
0.991359
5.84957
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2018-05-03T16:18:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "232b052b3...
5992df8f-c5f5-43aa-b86a-5105018b00d7
zjin-lcf/HeCBench
src/openmp-sycl/main.cpp
/* Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * Redistributions of source code must retain the above copyright * notice, this list of condi...
TOOL
0.965833
5.497596
{ "github_metadata": { "branch": "master", "commit_count": 4592, "repo_created_at": "2020-08-06T17:44:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 248, "forks": 89, "issues": 1, "pull_requests": 3 }, "file_meta": { "content_id": "0abc...
e7efa96f-99f5-4b7d-ac6c-dc5860e7d738
stalin670/LEETCODE-SOLUTIONS
0233-number-of-digit-one/0233-number-of-digit-one.cpp
class Solution { public: #define ll long long int countDigitOne(int n) { string s = to_string(n); ll sz = s.size(); ll ans = 0; for(ll i = 0; i < sz; i++) { if(s[i] == '0') continue; else if(s[i] != '1') { ll pw = sz - i - 1...
ALGO
0.999885
4.977025
{ "github_metadata": { "branch": "main", "commit_count": 845, "repo_created_at": "2023-09-12T14:19:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea06226f95...
ca5f5d1c-55dd-434d-8874-93f4249fa168
wang12d/ProgrammingPractices
ProjectEuler/pe286.cpp
#include <bits/stdc++.h> #include "Toolbox.h" using std::vector; using std::cout; using std::endl; double prob(int, int, double); int main(int argc, char** argv) { const double eplison{1e-11}; const int p{50}; const int s{20}; const double finP{0.02}; vector<vector<double>> dp(p+1, vector<double>(s+1...
ALGO
0.999726
3.949165
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2020-09-11T08:53:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebd07d7de...
17bd4c73-f6ea-4062-83c5-964fc230232f
CG-AA/practise
TOI/2023-1.cpp
#include<bits/stdc++.h> using namespace std; #define RE(v, s, e) for(long long v = s; v < e; v++) #define P pair<long long, long long> #define PP pair<P, long long> int main(){ long long n, m; cin >> n >> m; vector<P> ml(m, P(0, 0)); vector<pair<P, long long>> nl(n, pair<P, long long>(P(0, 0), 0)); ...
ALGO
0.999995
3.592849
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-02-28T12:55:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc69d77cc744...
3463a4ad-93ad-4f37-a26b-e1fc0d3b84b9
ishandutta2007/codeforces-l
leaf1415/normal/1498/F.cpp
#include <iostream> #include <cstdio> #include <cmath> #include <ctime> #include <cstdlib> #include <cassert> #include <vector> #include <list> #include <stack> #include <queue> #include <deque> #include <map> #include <set> #include <bitset> #include <string> #include <algorithm> #include <utility> #include <complex> ...
ALGO
0.99981
3.738212
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16ecb0d1ec3f...
2137636f-c865-4523-9476-86dcab0710fc
HimanshuGunjal10/CPP-Programs
Queue/maxInSubArray.cpp
/* * Program to find the first circular tour that visits all petrol pumps * Key value pair- petrol and distance (1 unit each) */ #include <iostream> #include <deque> using namespace std; void maxInSubArray(int arr[], int n, int k) { //use queue deque <int> Q(k); //note k //case1: queue is empty and we need t...
ALGO
0.999862
3.978318
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-07-06T05:35:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "758293335...
558008f9-7e9f-405d-927c-7e0f502decb8
VastoLorde95/Competitive-Programming
Codeforces/206 Division 1/Problem A/A.cc
#include<cstdio> #include<iostream> #include<cmath> #include<algorithm> #include<cstring> #include<map> #include<set> #include<vector> #include<utility> #include<queue> #include<stack> #define sd(x) scanf("%d",&x) #define sd2(x,y) scanf("%d%d",&x,&y) #define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z) #define fi first #define...
ALGO
0.999771
3.184874
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2017-07-25T11:08:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 171, "forks": 41, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2c507...
e65e66c9-f20a-4979-80d5-fa6faa4020e4
joydip007x/CompetitiveCodeArchive
LightOJ/1110/18644471_AC_143ms_3188kB.cpp
#include<bits/stdc++.h> using namespace std; #define ll int #define ret return ///*/////////////////// /// * /*// author-joydip007x /// */ #define M 101 ll dp[M][M] ,lm1,lm2,printed=0; char s1[M],s2[M]; map< pair<ll,ll> , string >m; string lcs(ll i1, ll i2 ) { if(i1==lm1 || i2==lm2 ) ret ""; if(dp[i1][i2...
ALGO
0.999945
3.677389
{ "github_metadata": { "branch": "main", "commit_count": 233, "repo_created_at": "2023-05-01T09:25:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "907c7c6455...
cb31d51e-6384-46af-9411-1c2b6a8e568d
laipuni/Baekjoon_Programmars
백준/Gold/1799. 비숍/비숍.cc
#include<stdio.h> #include<stdlib.h> #include<stdbool.h> #include<math.h> #define MAX(a,b)a>b?a:b int map[11][11]; int setting[51][2];//y,x char mode; int n; bool is_set(int depth,int y, int x) { /*비숍을 놓을 수 있는지 판별하는 함수*/ for (int i = 0;i < depth;i++) { if (abs(setting[i][0] - y) == abs(setting[i][1] - x)) { re...
ALGO
0.999785
3.429008
{ "github_metadata": { "branch": "main", "commit_count": 194, "repo_created_at": "2024-03-19T12:22:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a48e9bdff...
58fc2596-082b-4a16-ba54-dffb62bd9e77
PX4/PX4-Autopilot
src/lib/mathlib/math/filter/LowPassFilter2p.hpp
/**************************************************************************** * * Copyright (C) 2012-2021 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Red...
ALGO
0.928129
6.425292
{ "github_metadata": { "branch": "main", "commit_count": 47555, "repo_created_at": "2012-08-04T21:19:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9767, "forks": 14212, "issues": 1547, "pull_requests": 574 }, "file_meta": { "content_id"...
e67685f0-484d-4837-8956-72713fed3e4c
openearth/hydro-model-generator-wflow
build/_CPack_Packages/Linux/DEB/pcraster_4.2.0/usr/local/pcraster/include/fern/algorithm/algebra/elementary/detail/sqrt.h
// ----------------------------------------------------------------------------- // Fern © Geoneric // // This file is part of <NAME> which is available under the terms of // the GNU General Public License (GPL), version 2. If you do not want to // be bound by the terms of the GPL, you may purchase a proprietary licens...
ALGO
0.999691
6.864525
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2018-06-25T14:38:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "c4aebdfeda...
ee24cef4-eabb-48c3-a246-2e88afc4f059
adhpvn/adhpvn
.vscode/bai2_duy_c2.cpp
#include <iostream> #include <vector> #include <algorithm> #include <bitset> using namespace std; const int INF = 1e9; int main() { int n, m; cin >> n >> m; // Ma trận kề của đồ thị vector<vector<int>> g(n + 1, vector<int>(n + 1, INF)); for (int i = 1; i <= n; i++) { g[i][i] = 0; } ...
ALGO
0.999979
4.750416
{ "github_metadata": { "branch": "main", "commit_count": 138, "repo_created_at": "2023-02-03T14:50:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4890de210f...
3d40df9e-962a-46a0-84dd-f9f054dcdbe8
tongzhi1998/ICPC-Practice
AtCoder/abc141/E.cpp
#include <iostream> #include <fstream> #include <sstream> #include <cstdlib> #include <iomanip> #include <string> #include <cstring> #include <algorithm> #include <cmath> #include <climits> #include <functional> /* Data Structure */ #include <vector> #include <map> #include <unordered_map> #include <unordered_set> #inc...
ALGO
0.999947
4.090783
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-05-23T22:53:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23e195c9d...
48baa25b-95d6-40e4-9d6b-fad12154a474
Md-Merazul-Islam/XPSC-Special-Zone-2024
Weekly Task/1st week/Day-3/D_Fast_search.cpp
/************************************************************** ** <NAME> ** ** Author: <NAME> ** ** CST, MPI ** ** Sreepur, <NAME> ** *****************************************...
ALGO
0.999895
4.944546
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2024-01-03T05:58:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da55d6442d...
48ab0c91-ab9f-42c3-b43a-07a992621a84
a220932/sci
sci.cpp
#include <iostream> using namespace std; char recoverspace=' '; int N,M,P; int x,y,z,a,b,c,t; int arr(int a,int b) { if(a<b) a^=b^=a^=b; return (a-b)+(2*N-b)*(b-1)/2; } int check(int*array,int a,int b) { for(t=b-1;t;t--) if(array[arr(a,b)]==array[arr(a,t)]) return 1; for(t...
ALGO
0.999901
3.266328
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-07-18T14:09:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "153bcdbf97fc...
43c49483-e220-45a5-95e8-6c2b621148c9
changsongzhu/leetcode
C++/seq_num/037_h.cpp
/** 37[H]. Sudoku Solver Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.'. You may assume that there will be only one unique solution. ...and its solution numbers marked in red. **/ class Solution { public: void solveSudoku(vector<vector<char>>&...
ALGO
0.999771
6.333847
{ "github_metadata": { "branch": "master", "commit_count": 395, "repo_created_at": "2017-03-15T23:33:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b98a68fb...
f9fbf457-2e25-49e6-9c23-4cbfd9be4d62
liaoyaonline/LeetCodeNote
leetcode刷题/字符串/电话号码字母组合/main.cpp
/*pow(16,i),queue.front()struct Tree{};vector<string> res(8, "");mp.find(key) == * mp.end()#### */ #include <algorithm> #include <cmath> #include <iostream> #include <map> #include <set> #include <stack> #include <string> #include <vector> using namespace std; class Solution { public: vector<string> result; void...
ALGO
0.999825
5.54638
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2023-02-16T14:22:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3bb7da50e1...
cf795c92-a47a-4184-ae85-89cd11a28cd2
hschoi1104/Algorithm
BOJ/USACO/17025_Icy Perimeter.cpp
#include <stdio.h> #include <queue> using namespace std; typedef pair<int, int> p; typedef struct node { int y, x; }; int n; int dir[4][2] = { {1,0},{0,1},{-1,0},{0,-1} }; char arr[1002][1002]; int chk[1002][1002]; p bfs(int i, int j) { int b = 0; int p = 0; queue<node>q; q.push(node{ i,j }); chk[i][j] = 1; whil...
ALGO
0.999893
3.21997
{ "github_metadata": { "branch": "master", "commit_count": 293, "repo_created_at": "2019-08-11T02:11:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48d1711f...
7ae352d5-fa97-41a6-aa71-0935cae21e16
Johncdy/LeetCodeSourceCode
Permutations.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: // 排列解法 // vector<vector<int> > permute(vector<int> &num) { // ans.clear(); // if (num.size() == 0) { // return ans; // } // perm(num, 0); // return ans; // } // // void perm(vector<int> &num, int begin) { // if (begi...
ALGO
0.999936
5.142373
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2014-04-10T22:46:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "258611143...
bfe488fa-f2d0-477c-9d1a-309d09941327
chi-tech/chi-tech
framework/mesh/Raytrace/raytracer.cc
#include "raytracing.h" #include "mesh/MeshContinuum/chi_meshcontinuum.h" #include "chi_log.h" const chi_mesh::MeshContinuum& chi_mesh::RayTracer::Grid() const { return reference_grid_; } //################################################################### chi_mesh::RayTracerOutputInformation chi_mesh::RayTracer...
ALGO
0.995472
6.248835
{ "github_metadata": { "branch": "development", "commit_count": 2280, "repo_created_at": "2019-08-23T18:33:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 37, "forks": 48, "issues": 32, "pull_requests": 1 }, "file_meta": { "content_id": "...
0d855564-2db2-4b47-b027-22a1affe691a
tientoan2503/DSA
_96A.cpp
#include <iostream> #include <vector> using namespace std; int main() { int value; std::string s; std::cin >> s; // nhập cả chuỗi số liền nhau, ví dụ: 000123 std::vector<int> arr(s.begin(), s.end()); // Chuyển từng ký tự '0' -> số 0, '1' -> 1 for (int& x : arr) x -= '0'; for (int i = 0...
ALGO
0.999762
4.409789
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-06-22T07:25:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b6bdf5b9b0c...
834e9cf6-66f2-4237-878f-3b8df6c2d607
Avneet-Y/My-Leetcode-Submissions
0802-find-eventual-safe-states/0802-find-eventual-safe-states.cpp
class Solution { public: bool dfs(int node, vector<int> &visited, vector<int> &samepath, vector<vector<int>>& graph, vector<int> &check) { visited[node] = 1; samepath[node] = 1; check[node] = 0; for(auto it : graph[node]) { if(visited[it] == 0) { ...
ALGO
0.999967
6.013961
{ "github_metadata": { "branch": "main", "commit_count": 2864, "repo_created_at": "2022-07-30T16:42:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "027da5b34...
e0f6be8b-b3f5-410b-b671-e83e97aa8fbb
iskang5532/PS
BOJ/3085 사탕 게임.cpp
// 3085 사탕 게임 // https://www.acmicpc.net/problem/3085 /* 완전 탐색 (2,024KB, 0ms) 시간 복잡도: O(1,000,000) 풀이) - 보드의 크기 N의 최댓값은 50이다. 현재 탐색 중인 (y, x)를 네 방향의 값과 자리를 바꾼 후 연속된 수를 구할 때의 시간 복잡도는, (50*2) * 4 * 50^2 = 1e6이다. 1) 기준값 (x, y)와 바꿔줄 값인 (ny, nx)를 정하여 서로 바꾼다. 2) 이후 모든 칸을 탐색하여 상근이가 먹을 수 있는 사탕의 최대 개...
ALGO
0.999921
4.797953
{ "github_metadata": { "branch": "master", "commit_count": 330, "repo_created_at": "2021-07-29T10:17:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a66eff2e...
28c80583-94fc-42e4-9fa7-bf7dcb0fc826
LordSerg/LearnCppLang
LeetCode/36. ValidSudoku/main.cpp
#include <iostream> #include <vector> #include <map> #include <unordered_set> /* Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: Each row must contain the digits 1-9 without repetition. Each column must contain the digits 1-9 without repetition. ...
ALGO
0.999756
6.73146
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2024-02-23T00:39:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8482b8962...
26afe234-53af-4460-b183-49874b50b50e
bradyz/sandbox
codeforces/20/dijkstra.c++
#include <iostream> #include <map> #include <climits> #include <unordered_map> #include <vector> using namespace std; typedef long long weight; int N, M; vector<int> neighbors[10001]; vector<weight> cost[10001]; unordered_map<int, int> parent; weight dist[10001]; void dijkstra () { multimap<weight, int> pqueue;...
ALGO
0.999999
4.504375
{ "github_metadata": { "branch": "master", "commit_count": 1569, "repo_created_at": "2014-06-28T00:29:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2642166...
e1dd7521-f6f7-4de5-a51a-c989d9ea7c0a
henrikei/FYS4460
Code/RadialDist/RadialDist/main.cpp
#include <iostream> #include <fstream> #include <armadillo> using namespace arma; using namespace std; // Reads a state file and writes out the distances between all atoms int main() { // Load positions from .xyz file ifstream inFile; inFile.open("state300_10K.xyz"); if(!inFile) { // file couldn't b...
ALGO
0.997277
3.547429
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2013-01-24T12:20:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7706c3df...
b4f7a5e3-99d2-4065-acda-f1b7c81d0472
Ayush29Ayush/leetcode-gfg-problems
0290-word-pattern/0290-word-pattern.cpp
// https://leetcode.com/problems/word-pattern/discuss/2977947/LeetCode-The-Hard-Way-Explained-Line-By-Line // refer this too => https://www.youtube.com/watch?v=XO4U2KWgIgY class Solution { public: bool wordPattern(string pattern, string s) { // convert s to a vector of strings // e.g. "dog cat cat ...
ALGO
0.997821
6.285767
{ "github_metadata": { "branch": "main", "commit_count": 3511, "repo_created_at": "2021-11-28T15:53:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2792f0181...
7602da99-abd2-4b2c-9bbb-505282d38dd8
Garona0125/WarAxe_Legion
src/server/scripts/Draenor/Highmaul/boss_imperator_margok.cpp
//////////////////////////////////////////////////////////////////////////////// // // MILLENIUM-STUDIO // Copyright 2016 Millenium-studio SARL // All Rights Reserved. // //////////////////////////////////////////////////////////////////////////////// # include "highmaul.hpp" float const minAllowedZ = 560.0f; Pos...
ALGO
0.962806
4.180399
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-09-13T03:02:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d06e7e159...
b32b105b-a9bc-4f90-a08a-7d307316ec2b
wenkai-qin/e101-final
Digital_Filter/Digital_Filter.ino
/* Digital FIR Filter Reads analog input pin (range 0-1023) and prints the filtered output to the serial monitor The circuit: * analog signal connected to analog pin A1 The filter used in this template is a three point averaging filter. You will need to adapt the program for a modified comb filter */ const...
ALGO
0.996653
5.400775
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-12-11T08:14:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d172f8af04...
31256d54-d1f8-4b0b-9209-35ac8bc480ac
dariofg93/FacultadRemoto
Estructuta de datos/Soluciones/cpp y h(C,C++)/Ejercicio_8(Iterator)/main.cpp
#include <iostream> #include "List.h" #include "Iterator.h" using namespace std; int sumatoria(List l){ Iterator it = getiterator(l); int total = 0; while(not(atend(it))){ total=total+getelem(it); iterate(it); } return total; } int longitud(List l){ Iterator it = getiterator(...
ALGO
0.996652
4.437596
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2017-07-12T15:28:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 12 }, "file_meta": { "content_id": "fe77fbb3...
8b802e8e-c27b-4ab5-9f4a-3cafe336a590
josecannete/ApunteICPC
revisar/convexhull.cpp
typedef double compt; //componente de un punto, podría ser int struct point { compt x, y; point(compt xx, compt yy) {x = xx; y = yy;} bool operator<(point const o) const {return make_pair(x, y) < make_pair(o.x, o.y);} }; //asegúrate de que copiaste bien esta función compt cross(point o, point a, point b) {...
ALGO
0.999931
4.831541
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2016-07-30T16:31:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "25cccce87...
356df32b-c78f-42b0-8629-1e747d675e46
Orion-North/Turret
demo/demo.ino
#include <AFMotor.h> // hardware & geometry const int STEPS_PER_REV = 200; // full-step motor const float PAN_GEAR_RATIO = 6.0; // 1:6 reduction on pan const float PAN_SWEEP_DEG = 160.0; // turret sweep at output const float TILT_SWEEP_DEG = 60.0; // total tilt range const int TILT_STEPS_COU...
ALGO
0.917115
6.354852
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2025-06-04T19:28:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "cf6dc8dbcaf...
7b33db06-ddc3-4ab5-ab9b-bdf900d5492a
aflahh12/Y1
SEM 1/Programming Technique 1/lab exercise/lab exercise input output.cpp
/* Name: <NAME> Matric number: A23CS0252 Date: 2/1/2024 */ #include <iostream> #include <fstream> #include <iomanip> using namespace std; int readFile(const char, float, int&); int computeC(float, float, int&); float average(float, int); int grade(float, char, int&, int&, int&, int&); void writeFile(float, float...
TOOL
0.952365
4.875841
{ "github_metadata": { "branch": "main", "commit_count": 147, "repo_created_at": "2024-01-14T14:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57f5a06b28...
6590575b-cceb-4a24-bb77-356e5e023970
yuhenghuang/Leetcode
src/1510_StoneGameIV.cpp
#include <local_leetcode.hpp> class Solution { private: vector<vector<int>> memo; bool play(int n, bool alice) { if (memo[n][alice]!=-1) return memo[n][alice]; bool flag = false; for (int i=1; i*i<=n; ++i) { if (!play(n-i*i, !alice)) { flag = true; break; ...
ALGO
0.999765
5.334557
{ "github_metadata": { "branch": "master", "commit_count": 196, "repo_created_at": "2020-03-22T11:12:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8f9a725...
7adde10d-8c9b-4720-8b6c-5058ced92112
sato9818/ProgramingCompetitive
atcoder/ABC276/d.cpp
#include <bits/stdc++.h> #define rep(i,n) for (int i=0;i<(n);i++) #define rep1(i,n) for (int i=1;i<(n);i++) using namespace std; using ll = long long; using P = pair<int, ll>; const int MOD = 998244353; const int INF = 1001001001; const ll LINF = 1001001001001001001LL; int main() { int n; cin >> n; vector...
ALGO
0.999924
3.738921
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2020-05-17T14:09:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9059aea8...
1e04c6de-93ad-415b-bf34-f39a435e04cd
blueKeys12/COIN_315
DSLab1/DSLab1/arrays.cpp
#include <iostream> using namespace std; int countOdds(int array[], int size){ if (size == 0) return 0; int count = 0; for (int i = 0; i < size; i++){ if (array[i] % 2 != 0) count++; } return count; } int findMinMultof10(int array[], int size){ if (size == 0) return -1; int minTen = -1; for ...
ALGO
0.997946
3.874301
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-01-25T02:25:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8dd0499e1f...
b8b88ae2-3608-497b-8540-5168f4bdf82f
Mohammadbadawi01/class-linked-list-implementation-c-file
main.cpp
#include <iostream> using namespace std; #include <fstream> #include "Task.h" #include "Machine.h" int main() { char fileName[32]; cout << "\nEnter the name of the file like <input.txt>: "; cin >> fileName; // Ask the user to enter the name of the input file fstream file(fileName, ios::in); //Open the file and rea...
ALGO
0.995629
3.403228
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-03-15T22:02:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d997d6ec324...