uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
69d5347e-67be-45d9-8bba-b6549481a293
athuls/RL_Soar
Fall2011/boost_1_46_0/libs/graph/example/vertex_basics.cpp
#include <boost/config.hpp> #include <iostream> #include <algorithm> #include <boost/graph/adjacency_list.hpp> using namespace std; using namespace boost; /* Vertex Basics This example demonstrates the GGCL Vertex interface. Sample output: vertices(g) = 0 1 2 3 4 vertex id: 0 out-edges: (0,1) (0,2) (0...
ALGO
0.998984
6.533913
eed1c9a3-af36-4f19-9a25-5000340ac21c
debsourav33/CodeForces-Problem-Solutions
1260C- Infinite Fence.cpp
#include<bits/stdc++.h> using namespace std; //{ #define si(a) scanf("%d",&a) #define sii(a,b) scanf("%d %d",&a,&b); #define siii(a,b,c) scanf("%d %d %d",&a,&b,&c); #define sl(a) scanf("%lld",&a) #define sll(a,b) scanf("%lld %lld",&a,&b); #define slll(a,b,c) scanf("%lld %lld %lld",&a,&b,&c); #define outi(a) printf("...
ALGO
0.999801
3.724999
13121360-95fb-42f3-b91a-a3eac0e50a9d
SH7072/DSA-cpp
12_QuesAndDeque/7_ReduntantParenthesis.cpp
// return 1 if exp has extra parenthesis ((a+b)) // logic push opening brackets and operator in a stack #include <bits/stdc++.h> using namespace std; int main() { bool isRedundant=false; string s; cin >> s; stack<char> st; for (int i = 0; i < s.size(); i++) { if (s[i] == '+' || s[...
ALGO
0.999869
3.677509
e557dfaf-58d7-4e84-a518-15839b4e568f
shenghaodong/fall-2022-135-lab-03-shenghaodong
reverseorder.cpp
#include <iostream> #include <fstream> #include <cstdlib> #include <climits> #include <iomanip> void reverse_order(std::string date1, std::string date2){ int month1 = std::stoi(date1.substr(0, 2)); int days1 = std::stoi(date1.substr(3, 6)); int month2 = std::stoi(date2.substr(0, 2)); int days2 = std::st...
TOOL
0.975812
3.103853
d005ed94-3e00-4399-9ba1-e4897677fd6b
ishandutta2007/codeforces
kilo_5723/normal/1754/A.cpp
#include <cstdio> #include <iostream> using namespace std; int main() { int tt; scanf("%d", &tt); while (tt--) { int n; scanf("%d", &n); getchar(); int sum = 0; while (n--) { if (getchar() == 'Q') sum++; else sum = max(sum - 1, 0); } puts(sum <= 0 ? "YES" : ...
ALGO
0.982035
3.634121
9f431f93-be9d-4fbe-a457-ca964855dea0
ishandutta2007/codeforces
hitonanode/normal/453/D.cpp
#include <bits/stdc++.h> using namespace std; using lint = long long; using pint = pair<int, int>; using plint = pair<lint, lint>; struct fast_ios { fast_ios(){ cin.tie(nullptr), ios::sync_with_stdio(false), cout << fixed << setprecision(20); }; } fast_ios_; #define ALL(x) (x).begin(), (x).end() #define FOR(i, begin, e...
ALGO
0.999926
3.810632
1f018802-b9a2-4ec4-b517-616c151d0d7c
KrabbyKrabby/cpp_tester_codebench
tasks/304016/alternate_responses/model5.cpp
#include <iostream> #include <vector> #include <thread> #include <mutex> #include <atomic> #include <memory> using namespace std; const int N = 9; // Size of the Sudoku grid const int NUM_THREADS = 9; // Number of threads to use // Shared variables for parallel processing mutex mtx; atomic<bool> solutionFound(false)...
ALGO
0.999988
7.762798
1e3f16d6-0feb-47e9-b9bc-dcdf33c74bad
Jeevan-kumar-Raj/InterviewBit-Topicwise-Solutions
Dynamic Programming/QueensAttack.cpp
vector<vector<int> > Solution::queenAttack(vector<string> &A) { if (A.size()==0 || A[0].size()==0) return vector<vector<int> >(0); int n = A.size(); int m = A[0].size(); vector<vector<int> > result(n, vector<int>(m, 0)); int *row = new int[n]; int *column = new int[m]; int *cross1 = new...
ALGO
0.999683
4.539284
5e72a046-9e33-4aa7-9886-c10e02292e8b
ishandutta2007/codeforces
fairywinx/normal/1611/D.cpp
#include <bits/stdc++.h> #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define SOLVE int t; cin >> t; while (t--) solve(); using namespace std; void solve() { int n; cin >> n; vector<int> sum(n, -1); vector<int> par(n); for (int i = 0; i < n; ++i) { cin >> par[i];...
ALGO
0.999937
4.180017
910d484e-501c-45ee-b0e2-b5a4620fe00a
NPUJingChen/algorithm
OJ/OJ51/main.cpp
#include <bits/stdc++.h> using namespace std; int PO151(vector<int>& cost, vector<int>& value, int n) { vector<int> dp(n+1,0); for(int i=0;i<cost.size();i++) { for(int j=n;j>=cost[i];j--) { dp[j] = max(dp[j],dp[j-cost[i]]+value[i]); } } return dp[n]; } int main() { int n, m; vector<int> c, v; cin >> ...
ALGO
0.999931
4.449601
9851cb65-4077-44ba-ab41-5ded9193c902
Chiragadve/leetcode-submission
3461-find-the-minimum-area-to-cover-all-ones-i/find-the-minimum-area-to-cover-all-ones-i.cpp
class Solution { public: int minimumArea(vector<vector<int>>& grid) { int n = grid.size(); int m = grid[0].size(); // fill the max with -1 and min with n and m so that it doesn't hold the garbage // and can be used for comparision int maxrow = -1, maxcol = -1, minrow = n,min...
ALGO
0.999741
6.575431
76a77ae5-402a-4664-885c-f8af068f1b34
robbinsa530/COMP201-2014
in-class/reverse3.cpp
#include <string> #include <vector> #include <iostream> using namespace std; int main() { vector<string> words; string word; // Read in words until we're done while (cin >> word) { if (word == "done") { break; } words.push_back(word); } // Barf out words in ...
TOOL
0.986251
5.423345
6820b014-919d-41c6-957a-25202c31bb37
HariPasapuleti/Leetcode-Problems
2766-find-the-prefix-common-array-of-two-arrays/2766-find-the-prefix-common-array-of-two-arrays.cpp
class Solution { public: vector<int> findThePrefixCommonArray(vector<int>& A, vector<int>& B) { unordered_map<int, int> mp; vector<int> res; int temp = 0; for (int i = 0; i < A.size(); i++) { mp[A[i]]++; mp[B[i]]++; if (mp[A[i]] >= 2) { ...
ALGO
0.999945
6.066926
a9575982-4fa1-4632-a6b9-b09de0509919
Rylynnn/Arithmetic
Competition/Code Forces/#340/B.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n,i,a; int p=0; long long ans=0; long long num; while(scanf("%d",&n)!=EOF){ ans=1; p=0; for(i=1;i<=n;i++){ scanf("%d",&a); if(p==0&&a==1){ p=1; num=0; ...
ALGO
0.999956
3.309905
5b97a645-0869-45ae-83e1-b870d8289fc9
daiwb/Algorithm
ZOJ/1681Starship Hakodate-maru.cpp
/* ZJU 1681 Starship Hakodate-maru 00:00.02 444K 2004.07.04 By adai */ #include <iostream> #include <cmath> using namespace std; int main() { int n,num; int max1,max2; int i,j; while(cin>>n&&n!=0) { max1=pow(n,1.0/3.0); max1++; while(max1*max1*max1>n) max1--; num=0; for(i=0;i<=max1;i++) { int temp...
ALGO
0.9999
3.495622
621c897f-e263-4a63-8000-5cc075965561
RahulkumarRV/algorithms_and_data_structure
binary/distance.cpp
int findLevel(Node* root, int v, int l){ if(root == NULL) return NULL; if(root->data == v){ return l; } int left = findLevel(root->left, v, l + 1); return left ? left : findLevel(root->right, v, l + 1); } Node* findDistance(Node* root, int n1, int n2, int &d1, int &d2, int &dist, int level){ if(root == NULL)...
ALGO
0.999996
4.928037
a5f9800e-d13a-429a-a280-8afcd762751b
enochjung/acmicpc_net
12/12791.cpp
#include <cstdio> struct st { int y; char s[60]; }; int q, s, e; st a[25] = { {1967, "DavidBowie"}, {1969, "SpaceOddity"}, {1970, "TheManWhoSoldTheWorld"}, {1971, "HunkyDory"}, {1972, "TheRiseAndFallOfZiggyStardustAndTheSpidersFromMars"}, {1973, "AladdinSane"}, {1973, "PinUps"}, {1974, "DiamondDogs"}, {197...
ALGO
0.996985
3.510608
80ba2102-7351-4557-971c-2884e326a0ed
monego/WebVO
fofexperiments/algorithms/n2/FoF0n2.cpp
/*************************************************************************** Programa que realiza o agrupamento de partículas de acordo com o raio de percolação fornecido, usando o algoritmo Friends of Friends. Ultima atualização 12/01/2009 Autor: Renata S. Rocha Ruiz ***************************************************...
ALGO
0.999059
3.759681
e1edef34-e85e-4b56-a39b-28f9d26ab140
SankariKolanchi/bulbui
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998859
6.785645
9443a084-6dcd-454d-9d3e-777954e54c89
lipsa-gamango/cs141-lab-7-
lab7q-3.cpp
#include <iostream> using namespace std; // Function declaration void printevenodd(int cur, int limit); int main() { int lowerLimit, upperLimit; // Inputting lower and upper limit from user cout<<"Enter lower limit: "; cin>>lowerLimit; co...
ALGO
0.998872
5.04092
5437042c-7152-438f-88e3-ebca6fa8b81d
AlphaLeaf/BOJ
2751_수 정렬하기 2(병합정렬).cpp
#include <iostream> using namespace std; void mergeDivide(int numbers[], int buffer[], int start, int end); void mergeBond(int numbers[], int buffer[], int start, int mid, int end); int main() { int n; cin >> n; int* numbers = new int[n]; int* buffer = new int[n];//ĥ ӽ÷ ̿ϴ for (int i = 0; i < n; i++) { cin ...
ALGO
0.999994
4.449851
c228cc2d-daf9-4bf3-8bcf-3abf24c52788
FungluiKoo/C-Plus-Plus-for-Beginners
Project_Recursion/recursive.cpp
#include <iostream> #include <cassert> #include "recursive.h" using namespace std; // Implementation of the list ADT const unsigned int list_node_id = 0x11341134; const unsigned int list_empty_id = 0x22452245; struct list_node { unsigned int ln_id; // Are we really a list_node? int l...
TEST
0.892907
5.291175
66227176-53b0-46d3-a1e4-dcd2fbd3888f
Tushar-mn/dsa_practice
unorderedMaps.cpp
#include <bits/stdc++.h> using namespace std; void print(unordered_map<int,string> &m){ cout << m.size() << endl; for(auto &pr : m){ cout << pr.first << " " << pr.second << endl; } } int main(){ //1. inbuilt implementation //2. Time complexity //3. valid keys datatype unordered_map<int, string> m; m[1] = "a...
ALGO
0.990191
4.411683
e39499f6-8c54-471e-bfe4-950aa85a64dd
ChocolateCharlie/T-414-AFLV
Kattis/Quality-Adjusted-Life-Year.cpp
#include <iomanip> #include <iostream> using namespace std; int main() { int N; double q, y; double ans; ans = 0.0; cin >> N; while (N--) { cin >> q >> y; ans += q * y; } cout << fixed << setprecision(3) << ans; return(0); }
ALGO
0.999198
4.136611
530fdfdc-8d20-4ede-85cd-20ec51de86e8
FVNRLS/webserv
src/tools.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* tools.cpp :+: :+: :+: ...
TOOL
0.925236
4.74551
d5105c87-c1c9-41fd-8be3-c9e053272a89
Aniruddhdixit/ACC45DAYSOFCODE-2024
Day 40-Elections.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int T; cin >> T; while (T--) { int N, X; cin >> N >> X; vector<int> A(N), B(N); for (int i = 0; i < N; ++i) { cin >> A[i];...
ALGO
0.999992
5.58111
7895270f-f8b9-4c5b-8907-01fe9b56802a
Josmateussilva0110/CODE_FORCES
Stair.cpp
#include <bits/stdc++.h> #define optimize ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) #define INF 1000000010 #define INFLL 1000000000000000010LL #define ll long long #define ld long double #define pii pair<int,int> #define vi vector<int> #define vii vector<pii> #define PB push_back #define EB emplace_bac...
ALGO
0.99993
4.344436
e8d11533-6887-41b0-a959-4093c202e6df
MANISHDUTT224/LeetCode
0787-sliding-puzzle/0787-sliding-puzzle.cpp
class Solution { public: int slidingPuzzle(vector<vector<int>>& board) { cin.tie(0); cout.tie(0); ios::sync_with_stdio(false); string target="123450",s=""; for(int i=0;i<2;i++){ for(int j=0;j<3;j++){ s+=to_string(board[i][j]); } ...
ALGO
0.999926
5.860267
5ffd3a6c-790c-4acc-b891-695f3bec082b
Shantanu9799/Striver-A2Z-Sheet
StackQueueLearnings/ImplementationOfQueueUsingLinkedList.cpp
/* Structure of a node in Queue struct QueueNode { int data; QueueNode *next; QueueNode(int a) { data = a; next = NULL; } }; And structure of MyQueue struct MyQueue { QueueNode *front; QueueNode *rear; void push(int); int pop(); MyQueue() {front = rear = NULL;} ...
ALGO
0.997855
4.997019
1ee5ba20-638f-46f8-a9dd-e9d132bf8b23
allwellll/cf_code_jiangly
cuiaoxiang/1785/1785B-B-LetterExchange.cpp
// url:https://codeforces.com/contest/1785/problem/B // time:2023-02-05 15:30:30 // name:B-LetterExchange #define LOCAL #define _USE_MATH_DEFINES #include <array> #include <cassert> #include <cstdio> #include <cstring> #include <iostream> #include <iomanip> #include <string> #include <sstream> #include <vector> #inclu...
ALGO
0.999905
4.017207
d4dcb10d-c0f3-45e1-8959-523c097eb64d
deltacoincore/deltacoincore
src/rpc/net.cpp
#include <rpc/server.h> #include <banman.h> #include <chainparams.h> #include <clientversion.h> #include <core_io.h> #include <net.h> #include <net_processing.h> #include <netbase.h> #include <policy/policy.h> #include <rpc/protocol.h> #include <rpc/util.h> #include <sync.h> #include <timedata.h> #include <ui_interfac...
WEB
0.865226
6.373851
95aa889f-3b38-4760-a33b-45bb7f019842
raincross7/code-similarity
codes/train_code/problem415/problem415_154.cpp
/** * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_5_C&lang=jp */ #include <cmath> #include <iomanip> #include <iostream> #include <iterator> #include <sstream> #include <vector> void printVector(const std::vector<double> &v) { std::ostringstream oss; oss << std::fixed << std::setprecision(8);...
ALGO
0.999862
3.717671
0bd8837a-33ce-4096-8e4f-c5b6b98fb6f0
HSAFoundation/HLC-HSAIL-Development-LLVM
tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp
#include "llvm/Bitcode/BitstreamReader.h" #include "llvm/ADT/Optional.h" #include "llvm/Bitcode/LLVMBitCodes.h" #include "llvm/Bitcode/ReaderWriter.h" #include "llvm/IR/Verifier.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Format.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Memor...
TOOL
0.882674
6.022552
9cf817d7-e156-4486-b9f0-283f1266960b
walzimmer/active-anno-3d
pcdet/ops/pointnet2/pointnet2_stack/src/vector_pool.cpp
#include <torch/serialize/tensor.h> #include <vector> #include <THC/THC.h> #include <cuda.h> #include <cuda_runtime_api.h> #include "vector_pool_gpu.h" extern THCState *state; #define CHECK_CUDA(x) do { \ if (!x.type().is_cuda()) { \ fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, __LINE__); ...
ALGO
0.928706
6.073704
41a88d0f-fe1f-4a61-8dcf-87a370803acc
ramilaribi/Flutter_Clean_Architecture
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
41d0fd76-15ba-4c0c-9116-d178c8dc1046
tdas0/lib
library/data_structure/sparse_seg.cpp
/** * Author: Tiago * Source: own * Date: 2020-04-13 * Description: Segtree esparsa com lazy * Com bump-allocator usa menos memoria e é muito mais rápida, só tem que cuidar pro tamanho do buf não ta pequeno/grande demais * Time: Both operations are $O(\log N)$. */ // alocator static char buf[256000000]; void* o...
ALGO
0.999714
4.47515
66de0315-f636-4d86-9eb2-30158e66762a
miaowh/ICPC
POJ/2828.cpp
// #include <bits/stdc++.h> #include <assert.h> #include <cstdio> #include <vector> using namespace std; const int maxn = 2e5 + 5; /* sz[0] ch[0][0] ch[0][1] */ struct Splay { int sz[maxn], ch[maxn][2], fa[maxn]; int key[maxn], cnt[maxn]; int rt, top, tot, id; int stk[maxn]; // 模拟内存 // 判断x是其父亲的哪个节点 inlin...
ALGO
0.999991
3.785283
0bb1b9eb-faf0-4812-80e3-cf1d7da15748
conlacda/algo-practice
LightOJ/DigitDP/Investigation-template2.cpp
// https://lightoj.com/problem/investigation #include<bits/stdc++.h> typedef long long ll; // ld long double const ll mod = 1000000007; // 998244353 1000000009 1000000007 // đừng dùng ull #define int long long // __int128 const int INF = std::numeric_limits<int>::max(); // use INT32_MAX for i32 using namespace std;...
ALGO
0.999818
4.687822
37abe1b3-8caf-4405-b577-40c4177ca9e3
alexandraback/datacollection
solutions_2463486_1/C++/ZaN/c.cpp
#include <iostream> using namespace std; bool is_palindrome(long long x) { static char digits[15]; int d = 0; while (x != 0) { digits[d] = x % 10; x /= 10; ++d; } for (int i = 0; i <= d / 2 - 1; ++i) { if (digits[i] != digits[d - i - 1]) { return false; } } return true; } long long rec(int d, int...
ALGO
0.998781
5.061992
4a70d91f-024f-4c5d-aec0-767f2e8f3207
WNoxchi/CodeDeshar
CS106B/PAC_Exercises/Chapter03-2008/3.02_ConsecutiveHeads.cpp
// CS106B - Programming Abstractions // Programming Abstractions in C++ (2008) // Exercise 3.02 ConsecutiveHeads.cpp // -------------------------------------- // Wayne H. Noxchi - 29-May-2016 12:55 - 29-May-2016 13:32 // -------------------------------------- // Write a program that sims flipping a coin until 3 consec...
ALGO
0.998437
5.71745
39197204-335e-4cfd-b1ac-8c04ba4433d8
rxnew/aoj
0505/0505.cpp
#include <iostream> #include <fstream> #include <stdlib.h> using namespace std; int main() { int n, m, *survey, ans, max; ofstream ofs("output.txt"); while(cin >> n >> m, (n || m)) { survey = (int*)malloc(sizeof(int) * m); for(int i = 0; i < m; i++) survey[i] = 0; while(n--) { for(int i ...
ALGO
0.999959
3.153203
d1dee3ea-efbf-40d2-8142-7e149fe6273e
Codensity30/Strivers-A2Z-DSA-Sheet
07.Stack and Queues/1. Learning/05. Implement stack using linked list.cpp
/* Question: You have a linked list and you have to implement the functionalities push and pop of stack using this given linked list. Your task is to use the class as shown in the comments in the code editor and complete the functions push() and pop() to implement a stack. Approach: - We use the class `MyStack` to rep...
ALGO
0.999106
6.296415
bdc25801-c925-4bca-bfee-5cfd112c377d
Guoyuer/Projects-MPCS51087
project-3-Guoyuer-main/main.cpp
#include <cmath> #include <cstdlib> #include <cstring> #include <iostream> #include <random> using namespace std; struct Vector { // cannot use STL in CUDA, so... double data[3]; Vector() { for (int i = 0; i < 3; i++) data[i] = 0; }; Vector(double x, double y, double z) { data[0] = x; data[1...
ALGO
0.998108
3.678804
137cd385-2bd3-43ca-84f6-9ce92ef1e7ee
JosueSolano17/JosueS-repository
DEBERES_ED_1P/Dia_Martes_14-05-2024(PlantillasP2)/ejercicio1.cpp
#include <iostream> using namespace std; template <typename T> T maximo(T a, T b){ return (a>b ? a:b); } int main(){ int num_max = maximo(211,40); double deci_max = maximo(80.21,80.22); char letras = maximo('a', 'z'); std::cout << "El máximo es: " << num_max << std::endl; std::cout <<...
ALGO
0.998636
4.19487
5eaa30f9-3502-4285-9115-f910a89b2b50
moinulshaon/UVa-Problems
vol 111/11111/in.cpp
#include <cstdio> #include <cstdlib> #include <cstring> const int N = 1048576; int q[N]; char line[N]; int main(void){ while(fgets(line, N, stdin)){ int nested, top = 0, valid = 1, z; for(char *ptr = strtok(line, " "); ptr != NULL; ptr = strtok(NULL, " ")){ z = atoi(ptr); if(z > 0){ for(nested = 0; top ...
ALGO
0.998838
3.680597
d27173ac-9051-4be5-935d-a83c4c37eca3
TheGrudo/Korepetycje
NaukaMnozenia/naukaMnozenia.cpp
#include<iostream> int main() { double a, b, c; std::string koniec; do { std::cout<<"Podaj pierwsza liczbe "; std::cin>>a; std::cout<<"Podaj druga liczbe "; std::cin>>b; std::cout<<"Podaj wynik mnozenia "; std::cin>>c; if ((a*b) == c) { ...
ALGO
0.988926
3.289567
1ee0b7f1-574b-47d1-b8d9-5c472939de4d
RunAtTekky/cpp
contests/162EduDiv2/B_Monsters_Attack.cpp
/* RunAt - green */ #include <iostream> #include <set> #include <climits> #include <string> #include <numeric> #include <cmath> #include <map> #include <algorithm> #include <vector> using namespace std; typedef int long long ll; #define p(a) cout << a << "\n"; #define p2(a,b) cout << a << " " << b << "\n"; #define Y...
ALGO
0.999977
3.611914
3c1fe427-2c1f-4e8b-9d78-651d925ab7ed
Sarvesh001112/DSA_questions
Array/array.cpp
// #include<bits/stdc++.h> // using namespace std; // int main(){ // int arr[10]; // cout<<"Enter the values in array: "<<endl; // for(int i = 0; i<10; i++){ // cin>>arr[i]; // } // cout<<"Printing the values in array: "<<endl; // for(int i=0; i<10; i++){ // cout<<arr[i]<<" "<<...
ALGO
0.998034
3.728177
fdbf525e-28a3-4868-a3a0-70a8b3a54373
martinbudden/SuperSlicer
src/libigl/igl/harmonic.cpp
template < typename DerivedV, typename DerivedF, typename Derivedb, typename Derivedbc, typename DerivedW> IGL_INLINE bool igl::harmonic( const Eigen::MatrixBase<DerivedV> & V, const Eigen::MatrixBase<DerivedF> & F, const Eigen::MatrixBase<Derivedb> & b, const Eigen::MatrixBase<Derivedbc> & bc, cons...
ALGO
0.99817
5.806787
c31e1f2d-a33d-453e-a17c-8dfbc2b0e9b6
dabecart/CodingQuestions
005_Longest Palindromic Substring/Exercise005.cpp
#include <iostream> #include <string> using namespace std; string longestPalindrome(string s) { string out = s.substr(0,1); for(int i = 0; i < s.length(); i++){ int kernelIndex = i; int palLength = 1; while((kernelIndex+1) < s.length() && s[kernelIndex+1] == s[kernelIndex]){ ...
ALGO
0.999831
5.363625
69cecfe9-c13e-43f2-bc3c-7df9d90691cc
GDSC-GCET/Leetcode-Daily
232. Implement Queue using Stacks.cpp
class MyQueue { public: stack<int> s1; stack<int> s2; MyQueue() { } void push(int x) { s1.push(x); } int pop() { if(s2.empty()){ while(!s1.empty()){ int u = s1.top(); s1.pop(); s2.push(u); } } int...
ALGO
0.9994
5.351732
d8788fb0-bab5-4563-baac-f73689e4ffc2
we0091234/Myleetcode
反转链表/合并两个有序链表.cpp
#include <iostream> #include <cstdlib> #include <vector> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; void initLinkList(ListNode *&...
ALGO
0.999906
4.20577
bf942b05-6502-4e68-9b67-d6b292e02a0d
tanvir-50198/Problem_Solving
code_forces_problem_solve/H_count a's.cpp
#include<bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); string s; cin>>s; vector<int>v; for(int i=0;i<s.size();i++) { if(s[i]=='a')v.push_back(i); } int t; cin>>t; while(t--) { int x,y,cnt=0; cin>>x>>...
ALGO
0.999735
4.233627
52825aac-1dc2-4113-b453-0ec9858a94a1
haebinKahng/codint_test_cpp
70.그래프 최단거리(BFS).cpp
#include <iostream> #include <vector> using namespace std; int dis[10], ch[10]; int main() { freopen("input.txt", "rt", stdin); int n, m, i, c, d, Q[10], f = -1, b = -1, x; vector<int> map[20]; scanf("%d %d", &n, &m); for(i=1; i<=m; i++) { scanf("%d %d", &c, &d); map[c].push_back(d); } Q[++b]...
ALGO
0.999926
3.738944
cad99d63-190b-419e-8c78-fafcfee65788
KhronosGroup/LLVM-SPIRV-Backend
clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
#include "ClangTidyMain.h" #include "../ClangTidy.h" #include "../ClangTidyForceLinker.h" #include "../GlobList.h" #include "clang/Tooling/CommonOptionsParser.h" #include "llvm/ADT/StringSet.h" #include "llvm/Support/InitLLVM.h" #include "llvm/Support/PluginLoader.h" #include "llvm/Support/Process.h" #include "llvm/Sup...
TOOL
0.944441
7.84673
0a1c0953-2486-458a-8840-472cdf09a046
Janidu-2000/Janidu-Hacktoberfest2023
Program's_Contributed_By_Contributors/C++ Programs/Array/countinversion.cpp
#include<bits/stdc++.h> using namespace std; int merge(vector<int>& nums, vector<int>& temp, int low, int mid, int high) { int i,j,k; int count = 0; i = low; j = mid; k = low; while(i<=mid-1 and j<=high) { if(nums[i]<=nums[j]) { temp[k++] = nums[i++]; } else { temp[k++] = nums[j++]; count+= m...
ALGO
0.999973
5.298222
17c6a698-936a-4cb7-a3d1-7c3be279f801
ShuryginaA/devtools-course-practice
modules/zarubin_mikhail_binary_tree/src/binary_tree_application.cpp
#include "include/binary_tree_application.h" #include "include/binary_tree.h" #include <string.h> #include <sstream> #include <string> #include <vector> BinaryTreeApplication::BinaryTreeApplication() : m_message() {} void BinaryTreeApplication::help(const char* appname, const char* message) { std::ostringstream st...
TOOL
0.989742
5.83218
63a2964c-9c48-4a09-9eca-bff55cf92434
spzwart/brutus_GRX
mplib/Initializer/temp/Initializer.cpp
#include "Initializer.h" vector<mpreal> Initializer::generate(int N, string config, vector<string> par) { if(config == "file") { vector<mpreal> data; bool data_obtained = get_from_file(data, par[0]); if(data_obtained) return data; } if(config == "file_list") { vector<mpreal> data; bool data...
ALGO
0.945084
4.015448
2a1697d5-7b89-4816-9d88-043f12c75941
NorhanElyann/IEEE-CS-25
Rookies/Task3/E-Pairs.cpp
#include <iostream> #include <vector> #include <unordered_set> using namespace std; int main() { int n, k; cin >> n >> k; vector<int> arr(n); for (int i = 0; i < n; i++) { cin >> arr[i]; } unordered_set<int> elements; int count = 0; for (int num : arr) { if (...
ALGO
0.999961
4.947421
54d88bf8-898a-4020-a664-856b8c69068a
WeismannS/WebServer
HttpRequest/HttpRequestParser.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* HttpRequestParser.cpp :+: :+: :+: ...
WEB
0.970395
6.802203
2ac5e7b6-4202-4492-b484-844cb9c696bd
robot-park/GolfBuddy
gpsANDgooglemap_BackUpThisFolder_ButDontShipItWithYourGame/il2cppOutput/UnityEngine.IMGUIModule1.cpp
#include "pch-cpp.hpp" #ifndef _MSC_VER # include <alloca.h> #else # include <malloc.h> #endif #include <limits> #include <stdint.h> // System.Byte[] struct ByteU5BU5D_tA6237BF417AE52AD70CFB4EF24A7A82613DF9031; // System.String struct String_t; IL2CPP_EXTERN_C_BEGIN IL2CPP_EXTERN_C_END #ifdef __clang__ #pragma cla...
TOOL
0.864042
3.318855
4fdc236c-499c-4e4b-bc65-b34796157fbd
ishaankalsi/Cplusplus_codes
treeclassprogs.cpp
//Deepak Aggarwal, Coding Blocks //<EMAIL> #include <iostream> #include <queue> #include<array> using namespace std; class Node { public: int data; Node * left; Node * right; Node(int d) { data = d; left = NULL; right = NULL; } }; Node* createBT() { // cout << "Enter r...
ALGO
0.999748
4.665218
0d6ad9eb-9dbd-433e-a0cc-45c14ab5e64e
holidayfanboy/PPS_HGU
2024-2 PPS/Week3/A104_권다넬_22201005.cpp
#include <iostream> #include <vector> using namespace std; int main() { int N = 0; cin >> N; int max = -1; int sum = 0; //동그란 길이면 가장 큰 길만 제외 하면 된다 for (int i = 0; i < N; i++) { int vi; cin >> vi; if (vi > max) { max = vi; } sum += ...
ALGO
0.999424
3.917875
7b981064-9669-485e-b4ad-7d3cc63b9e0c
ovalerio/ocl_openbabel
parallel/obminimize_gpu.cpp
// used to set import/export for Cygwin DLLs #ifdef WIN32 #define USING_OBDLL #endif #include <openbabel/babelconfig.h> #include <openbabel/base.h> #include <openbabel/mol.h> #include <openbabel/obconversion.h> #include <openbabel/forcefield.h> #include <openbabel/obutil.h> #ifndef _MSC_VER #include <unistd.h> #endi...
ALGO
0.921514
4.738875
4e47767c-5b03-495b-977c-5f3db1f2ab16
ctrl-alt-Defeat-icpc/NERC2024
rahmat/g.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = 1e5 + 5; int n, c01, c10, zero; void Main() { scanf("%d", &n); // input n printf("1 01\n"); fflush(stdout); scanf("%d", &c01); printf("1 10\n"); fflush(stdout); scanf("%d", &c10); if(c01 > c10) { p...
ALGO
0.999604
3.427184
c69e51d3-97ee-4a63-991d-9efdb0011d21
dipprog/Competitive-Programming
Arrays_Questions/Most Frequent Element/solution_efficient.cpp
#include<bits/stdc++.h> using namespace std; int mostFrequent(int arr[], int size){ // Insert all elements in hash unordered_map<int, int> hash; for(int i=0; i< size; i++){ hash[arr[i]]++; } // Find most frequent element int max_count = 0,result = -1; for(auto i : hash){ if( max_count < i.second...
ALGO
0.999926
5.176293
0eda89ff-ebcb-4c2f-b53d-b2e2a9674881
LeeDiay/Code_PTIT
DSA_Nang_cao/SỐ LỘC PHÁT.cpp
#include <bits/stdc++.h> using namespace std; void TestCase() { int n; cin >> n; queue<string> q; q.push(""); vector<string> res; while (!q.empty()) { string t = q.front(); q.pop(); res.push_back(t); if (t.length() == n) continue; q.push(t + '6'); q.push(t + ...
ALGO
0.998235
5.339525
41c62ae8-5e10-4752-bf1b-e723188dc855
tahdiislam/xpsc
task/week_6/B_Make_It_Increasing.cpp
#include<bits/stdc++.h> using namespace std; void solve(){ int n; cin >> n; vector<int>a(n); for(auto &i : a) cin >> i; int ans = 0; for(int i = n - 2; i >= 0; i--){ while(a[i] >= a[i + 1] && a[i] > 0){ a[i] /= 2; ans++; } if(a[i] == a[i+1]){ ...
ALGO
0.999467
4.380736
857aa83c-9ac6-48cd-9201-91669385b540
yhliaoluan/leetcode
src/cpp/insertInterval.cpp
/* Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary). You may assume that the intervals were initially sorted according to their start times. Example 1: Given intervals [1,3],[6,9], insert and merge [2,5] in as [1,5],[6,9]. Example 2: Given [1,2],[3,5],[6,7],[8,1...
ALGO
0.99995
6.507433
81442717-6dcf-419b-8185-ee7575d49b60
HM4725/The-Art-of-Multiprocessor-Programming
chapter7/src/sloppy_array_global.cpp
#include <atomic> #include <iostream> #include <numeric> #include <thread> #include <vector> #define EPOCH 1000000 int results[8] = { 0, }; int main() { const size_t N = std::thread::hardware_concurrency() - 1; std::vector<std::thread> threads; std::vector<double> durations; threads.reserve(N); durati...
TOOL
0.900887
5.353211
d0002447-3a24-40a3-8a5c-ce273b5506b6
cpuex2016D/simulator
sim2/1st_parallel/exec_op.cpp
#include<stdio.h> #include<stdint.h> #include<math.h> #include<string.h> #include"sim.h" #include"examine_op.h" void Core::print_jump(uint32_t PC_from, uint32_t PC_to) { if (!PARALLEL) { fprintf(stderr, "%8llu jump from %5u to %5u\n", COUNTS, PC_from, PC_to); } else { fprintf(stderr, "%8llu CORE[%d] jump from %5...
ALGO
0.853265
3.294277
d33c3639-bac4-41df-8d04-5e98c6d5cc2f
clay-arras/cp-practice
usaco/silver/buildingroads.cpp
#include <bits/stdc++.h> using namespace std; const int MX = 1e5 + 5; int n, m; vector<int> adj_list[MX]; bool visited[MX]; void dfs(int s){ visited[s] = true; for (int i=0; i<(int)adj_list[s].size(); i++){ if (!visited[adj_list[s][i]]){ dfs(adj_list[s][i]); } } } int main()...
ALGO
0.999964
4.260892
a74b530d-34c2-4089-960d-cee34ddabf77
texsmv/PCLslimTreeRec
Manifold/3rd/igl/compute_frame_field_bisectors.cpp
#ifdef WIN32 #define _USE_MATH_DEFINES #endif #include <cmath> #include "compute_frame_field_bisectors.h" #include "igl/local_basis.h" template <typename DerivedV, typename DerivedF> IGL_INLINE void igl::compute_frame_field_bisectors( const Eigen::PlainObjectBase<DerivedV>& V, const Eigen::PlainObjectBase<Deriv...
ALGO
0.997278
6.666059
76955731-0b72-4904-aa08-3651d96a5e24
alexandrutm/Advent-of-Code
2021/Day2/day2.cpp
#include <fstream> #include <iostream> #include <sstream> #include <string> #include <utility> #include <vector> using namespace std; #define FORWARD "forward" #define DOWN "down" #define UP "up" void ReadData(vector<string> & aData) { ifstream fin("input.txt"); string currDir; while (getline(fin, c...
ALGO
0.995296
5.340287
c4169a49-b81f-47c1-9083-26e74f9bc4a6
siddharth25pandey/Leetcode-Solution
118-pascals-triangle/118-pascals-triangle.cpp
class Solution { public: vector<vector<int>> generate(int numRows) { int row=numRows; vector<vector<int>>ans; for(int i=0;i<row;i++) { vector<int>v(i+1,1); for(int j=1;j<i;j++) { v[j]=ans[i-1][j-1]+ans[i-1][j]; ...
ALGO
0.999975
5.537717
c576421d-46fa-4ae7-b76a-05e6709b0b2a
newyorkcitycoin/Newyorkcity
src/miner.cpp
#include "txdb.h" #include "miner.h" #include "kernel.h" using namespace std; ////////////////////////////////////////////////////////////////////////////// // // BitcoinMiner // extern unsigned int nMinerSleep; int static FormatHashBlocks(void* pbuffer, unsigned int len) { unsigned char* pdata = (unsigned char...
ALGO
0.998375
4.265584
4e8034a2-d222-4ba1-a4e5-1c93f93e45ed
cs5190435/CSES
DP/nested.cpp
//Cpp coding template #include<iostream> #include<algorithm> #include<limits> #include<vector> #include<map> #include<bits/stdc++.h> using namespace std; #define int long long #define pi pair<int, int> #define vi vector<int> #define pb push_back #define speed_ ios_base::sync_with_stdio(false),cin.tie(0), cout...
ALGO
0.999982
3.975743
5e50f20a-6f3b-40ca-9838-6f9fa8d2cf40
sianke1991/BOJ_CPP
20230130_binarySearch03/1654.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; int K; //가지고 있는 랜선의 개수 int N; //필요한 랜선의 개수 vector<int> ownedLines; //가지고 있는 랜선의 길이 int minOwnedLine = 2147483647; int maxOwnedLine = 0; // 매개 변수 탐색 // 조건을 만족하는 최소/최대치를 구하는 문제 (최적화 문제)를 결정 문제로 변환하여 이분탐색을 수행하는 방법 // (최적화 문제) N개를 만들 수 있는 랜선의...
ALGO
0.999924
4.383296
c212b48b-76fa-413d-8a4a-cd7451f8a66f
kjkandrea/cpp-tutorial
02-ArrayAndPointer/17-pointerAddress.cpp
#include <stdio.h> int main() { int a = 10; int *ptr_a = &a; printf("ptr_a의 값 : %p\n", ptr_a); printf("ptr_a + 1 의 값 : %p\n", ptr_a + 1); // + 4byte printf("왜냐하면 *ptr_a (int)의 %lu바이트이기 때문에 그만큼 이동했지.\n", sizeof(*ptr_a)); double b = 10.00; double *ptr_b = &b; printf("ptr_b의 값 : %p\n", ptr_b); printf...
TOOL
0.880526
3.384383
ab7aa593-e89d-4574-8d91-8410666c974b
qwer312132/competive-programing
math/Bigint.cpp
struct Bigint{ static const int LEN = 60; static const int BIGMOD = 10000; int s, vl, v[LEN]; // vector<int> v; Bigint() : s(1) { vl = 0; } Bigint(long long a) { s = 1; vl = 0; if (a < 0) { s = -1; a = -a; } while(a) push_back(a % BIGMOD), a /= BIGMOD; } Bigint(string str) { ...
ALGO
0.999161
3.758565
7d0bf7b2-b80a-4ab3-8372-099d473c5e75
KietNq1011/ASM3
ASM3/ASM3/Share_Fn.cpp
#include "Share_Fn.h" // Sort Fns void bubbleSort(int* arr, int arraySize, int& count) { // Reset count before starting the algorithm count = 0; for (int i = 0; i < arraySize - 1; i++) { for (int j = 0; j < arraySize - i - 1; j++) { if (arr[j] > arr[j + 1]) { swap(arr[j], arr[j + 1]); count++; } }...
ALGO
0.994243
4.176254
51cc4e05-b326-466b-9560-f1aa896ac9af
yashsiwach/DSA-Notes
Searching_and_Sorting_ClassIII_19th February 2023/Q1_Search_in_a_nearly_sorted_array.cpp
#include<iostream> #include<vector> using namespace std; int binarySearch(vector<int>arr,int target){ int s = 0; int e = arr.size() - 1; int mid = s + (e-s)/2; while(s<=e){ // Checking three condition of nearly sorted array if(arr[mid] == target){ return mid; } ...
ALGO
0.999967
5.113468
c951f44a-69b9-4167-93cf-a388efe3c499
Teranikys/Algorithms
Тренировки-Яндекс/1/2/I.cpp
#include <bits/stdc++.h> #define int long long using namespace std; using ll = long long; using ld = long double; using vi = vector<ll>; using vii = vector<pair<ll, ll>>; using vd = vector<ld>; void solve() { int n, m, k; cin >> n >> m >> k; vector<vi> field(n); for (int i = 0; i < n; ++i) { ...
ALGO
0.999946
3.726238
18921c64-5515-4568-8267-3bdd9f37b31a
jaryan728/Leetcode
1720-crawler-log-folder/crawler-log-folder.cpp
class Solution { public: int minOperations(vector<string>& logs) { int cnt=0; for(int i=0;i<logs.size();i++) { if(isalpha(logs[i][0])||isdigit(logs[i][0]))cnt++; else if(cnt!=0&&logs[i]=="../")cnt--; } if(cnt<0)return 0; return cnt; } };
ALGO
0.993097
4.583253
458f2d4f-8f83-4700-bb55-a772bbe10def
Codetesing/Programmers_CPP
Level 1/EX-03.cpp
#include <string> #include <vector> using namespace std; bool IS_FINE(char a) { if (a >= 'a' && a <= 'z') return true; if (a >= '0' && a <= '9') return true; if (a == '-' || a == '_' || a == '.') return true; return false; } string solution(string new_id) { string answer ...
ALGO
0.999209
6.022687
f5e4b5f6-fc09-43df-b97f-233757975eac
ishandutta2007/codeforces
alexluchianov/normal/832/E.cpp
#include <iostream> #include <vector> #include <cassert> #include <cmath> #include <algorithm> using namespace std; #define MIN(a, b) (((a) < (b)) ? (a) : (b)) #define MAX(a, b) (((a) < (b)) ? (b) : (a)) using ll = long long; using ld = long double; int const modulo = 5; class ModuloRing{ private: void gcd(int a,...
ALGO
0.999966
4.418593
24b0a7ab-8058-49ed-9e78-e5232667338a
nutan-sangani/CP-Practice
Speed training 1400-1700/F_Quests.cpp
#include <iostream> #include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #define ordered_set tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> #define ll long long #define forLoop for(int i=0;i<n;i++) #define pii pair<int,int> #define pb push_back #...
ALGO
0.999933
3.779788
0279ff54-47c8-4481-bd2a-2950db1d3fba
rishabhdev0/DSA-LeetCode
633-sum-of-square-numbers/sum-of-square-numbers.cpp
class Solution { public: bool judgeSquareSum(int c) { int i = 0; int j = sqrt(c); while(i <= j){ long long target = (long long)i * i + (long long)j * j; if(target == c){ return true; } else if (target < c){ i++; ...
ALGO
0.999971
5.422799
c2decbe0-b41b-45ed-bb08-859c16e092e4
KimWahlman/examproject
src/main.cpp
#include "CellularAutomata\CellularAutomata.h" #include "DLA\DLA.h" #include "Misc\misc.h" #include "SFMLStuff.h" int main() { /// - CA Example Usage - FileReader::GetInstance().ReadFromFile("data.txt", 100); std::srand((unsigned int)time(0)); //// SizeX, SizeY, BirthLimit, DeathLimit, Generations, Initial Survivi...
ALGO
0.935556
3.992857
f137a180-f536-4286-aa30-a580ca9890cd
PrateekKrishna/random_dsa_ques
Count nodes of linked list - GFG/count-nodes-of-linked-list.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node* next; Node(int x){ data = x; next = NULL; } }; // } Driver Code Ends /* Link list node */ /* struct Node { int data; Node* next; Node(int x) { data = x; next =...
ALGO
0.999429
5.858485
d07d2f69-efc2-4f02-b492-cfc3aca34d19
prashkrans/DSA
8. Hash Maps & Sets/21. Longest substring without rep char (LC#3).cpp
/* Hashmap Problem #20 - LC#3. Longest Substring Without Repeating Characters Given a string s, find the length of the longest substring without repeating characters. Constraints: 0 <= s.length <= 5 * 104 s consists of English letters, digits, symbols and spaces. Example 1: Input: s = "abcabcbb" Output: 3 Explanation...
ALGO
0.999637
6.510244
117645af-5030-45c0-a5a8-42924d7613ca
chjfth/bookcode-linux
TLPI/ch15-files/t_chown.cpp
/* Listing 15-2 */ /* t_chown.c Demonstrate the use of the chown() system call to change the owner and group of a file. Usage: t_chown owner group [file...] Either or both of owner and/or group can be specified as "-" to leave them unchanged. */ #include <pwd.h> #include <grp.h> #include "ugid_functi...
TOOL
0.883895
3.894171
2c10255a-e77e-4e11-816b-e94a5b84d6be
cryptomaddness/test
src/rpcnet.cpp
#include "rpcserver.h" #include "alert.h" #include "main.h" #include "net.h" #include "netbase.h" #include "protocol.h" #include "sync.h" #include "timedata.h" #include "util.h" #include <boost/foreach.hpp> #include "json/json_spirit_value.h" using namespace json_spirit; using namespace std; Value getconnectioncoun...
WEB
0.925748
6.773498
6f293e0c-bec6-4c10-aa79-4f3bdb077f1a
MaZeSA/CPP-OOP
Semestr_0/HomeWork/4/HomeWorkArrey/HomeWorkArrey/167.cpp
//167. Написать программу, которая проверяет, есть ли во введен - //ном с клавиатуры массиве элементы с одинаковым значением. #include <iostream> #include <string> #include <Windows.h> using namespace std; int main() { SetConsoleCP(1251); SetConsoleOutputCP(1251); const int n = 10; cout << "Введіть "...
ALGO
0.995363
4.035914
3b02ffbf-f6dd-4597-be0d-da8a2ce963c3
awpala/pluralsight-cpp
08-beautiful-cpp-stl-algorithms/08-07-using-the-power-of-iterators/ReverseIterators.cpp
#include <vector> using std::vector; #include <algorithm> using std::copy; using std::find; #include <numeric> using std::iota; #include <iterator> using std::back_inserter; int main() { vector<int> v1(10); iota(begin(v1), end(v1), 1); // `v1` contains `{ 1, 2, 3, ..., 10 }` vector<int> v2; v2.clear(); copy...
ALGO
0.996442
4.688179
3bbf5b8a-43f3-4a7b-a151-41350606a053
spidycse16/My_Codeblocks_Codes
339B.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int main() { ll ans=0,n,m,x; vector <ll> v; cin>>n>>m; for(ll i=0 ; i<m ;i++) { cin>>x; v.push_back(x); } for(ll i=0 ; i<v.size()-1 ; i++) { if(v[i]<v[i+1]) ans += (v[i+1]-v[i]); ...
ALGO
0.999895
3.327333
06ea7dc6-9308-4add-a194-134e1401a6ce
lkvlkvlkv/gdsc_monday_course
2/example_code/recurison/factorial.cpp
#include <iostream> using namespace std; int factorial(int n) { if (n == 0) { return 1; } return n * factorial(n - 1); } int main() { cout << factorial(5) << endl; return 0; }
ALGO
0.999716
5.646311
a8090423-7dba-46f7-9661-5a485b31c962
yxshwxnt/leetcode
Articulation Point - I - GFG/articulation-point-i.cpp
//{ Driver Code Starts //Initial Template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution { private: int timer=1; void dfs(int node,int parent,vector<int>& vis,int tin[],int low[],vector<int>& mark,vector<int> adj[]){ vis[n...
ALGO
0.999874
6.403916
da04d5d1-6092-462b-8225-e7e7b81ce592
t100ta-android/frameworks-av
media/libstagefright/codecs/amrnb/enc/src/g_code.cpp
/* ------------------------------------------------------------------------------ Filename: /audio/gsm_amr/c/src/g_code.c Date: 01/31/2002 ------------------------------------------------------------------------------ REVISION HISTORY Description: The return of L_mult was being stored in a Word16 before it ...
ALGO
0.999896
6.726301
d6888e7b-4def-4c8d-bc8c-6882a5baa130
zimpha/acm-icpc
Training/XIV Open Cup GP of America (NAIPC 2014)/H.cpp
#include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> using namespace std; const int MAXN = 100000 + 10; int A[MAXN], N; int main() { while (scanf("%d", &N) == 1 && N) { for (int i = 0; i < N; ++ i) scanf("%d", A + i); int ret = 0; for (int g = 1; g <= 100; ++ g) { for (int i = 0, la...
ALGO
0.999001
3.787562