uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
07cdaad6-6a94-4325-b7f5-dbfad9d27e85
mikaildegerr/Algorithms_and_Programming_1
5 hafta ikinci dereceden denklemin kökleri.cpp
//ikinci dereceden denklemin kklerini bulan program #include <stdio.h> #include <math.h> int main() { float kok1,kok2,dis,a,b,c; printf("ussu iki olan bilinmezin kat sayisi :"); scanf("%f",&a); printf("ussu bir olan bilinmezin kat sayisi :"); scanf("%f",&b); printf("sabit sayi :"); scanf("%f",&c); ...
ALGO
0.999652
3.523439
4c6b0128-36bb-4cda-8f0c-5f1c77d14bb4
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Mixtral/top0-100/find-nearest-right-node-in-binary-tree-Solution.findNeartestRightNode/177906_DoS_Exec_Code_Overflow.cpp
SplashPath *Splash::makeDashedPath(SplashPath *path) { SplashPath *dPath; SplashCoord lineDashTotal; SplashCoord lineDashStartPhase, lineDashDist, segLen; SplashCoord x0, y0, x1, y1, xa, ya; GBool lineDashStartOn, lineDashOn, newPath; int lineDashStartIdx, lineDashIdx; int i, j, k; lineDashTotal = 0; ...
ALGO
0.974652
4.71651
952b91f1-839f-4d81-b25d-661d7c84c4aa
Monstrofil/bigworld-2.0
server/tools/message_logger/mlutil.cpp
#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <string.h> #include <errno.h> #include "cstdmf/debug.hpp" #include "server/config_reader.hpp" #include "mlutil.hpp" namespace MLUtil { /** * Determines the configuration file to use when non-provided. * * When no configu...
TOOL
0.948513
5.803894
ba7b782e-ef9e-42ca-93ea-cbf5a8baeb15
npnkhoi/Competitive-programming
FUV_ICPC/Provincial2021/D_backup.cpp
#include <bits/stdc++.h> #define FOR(i,a,b) for (int i = a; i <= b; ++i) #define FORD(i,a,b) for (int i = a; i >= b; --i) using namespace std; const int md = 1e9 + 7; vector<int> e[3][3]; void knapsack(int l, int r, int lim) { } long long f(int l, int r, int val) { } int main() { freopen("test.inp", "r", stdin...
ALGO
0.998848
4.19167
98e160f8-f6d3-4ccd-82df-7776b9fd6e02
vfonic/SPOJ
books1.cpp
#include <iostream> using namespace std; int radnika, knjiga; int stranice[500]; bool fit(int mid) { int tmpStranica = 0; int br = 0; for (int i = knjiga - 1; i >= 0; --i) { if (tmpStranica + stranice[i] <= mid) { tmpStranica += stranice[i]; } else ...
ALGO
0.999964
3.567213
77b8bff4-14c5-4f22-910a-3ea84214cab0
NIGHTBROOD/NIGHTBROOD
src/common/strlib.cpp
#include "../common/cbasetypes.h" #include "../common/showmsg.h" #include "../common/malloc.h" #include "strlib.h" #include <stdio.h> #include <stdlib.h> #include <cstring> #include <errno.h> #define J_MAX_MALLOC_SIZE 65535 // escapes a string in-place (' -> \' , \ -> \\ , % -> _) char* jstrescape (char* pt) { //co...
TOOL
0.865497
3.806062
6e9c3751-09eb-4b0f-a133-11c76b23237c
ACarmona4/EDA2
Parciales/Parcial 1/QuickSort.cpp
#include "QuickSort.h" #include <chrono> Nodo* QuickSort::obtenerUltimoNodo(Nodo* cabeza) { while (cabeza && cabeza->siguiente) { cabeza = cabeza->siguiente; } return cabeza; } Nodo* QuickSort::particionar(Nodo* cabeza, Nodo* fin, Nodo** nuevoInicio, Nodo** nuevoFin) { Nodo* pivote = fin; ...
ALGO
0.999273
5.786393
10aabd28-9284-40ef-bf17-9c35dfe83ac9
palcu/algo
HomeworkNov2009/12.CPP
#include <iostream.h> #include <math.h> void main() { int n,i,x,a=0,prim=1,rad; cin>>n; for (i=1; i<=n; i++) { cin>>x; a=a*10+x%10; } if (a==1) prim=2; else if (a%2==0) if (a!=2) prim=0; else { rad=sqrt(a); for (i=3; i<=rad; i+=2) { if (a%i==0) { prim=0; break; } } } if (prim==1) cout<<a<<" este pri...
ALGO
0.999818
3.712439
0caf7dc2-e6e5-43b8-9402-0ab85367b5e3
mollnn/spoly
mts1/src/librender/photonmap.cpp
#include <mitsuba/render/photonmap.h> #include <mitsuba/render/scene.h> #include <mitsuba/render/phase.h> #include <fstream> MTS_NAMESPACE_BEGIN PhotonMap::PhotonMap(size_t photonCount) : m_kdtree(0, PhotonTree::ESlidingMidpoint), m_scale(1.0f) { m_kdtree.reserve(photonCount); Assert(Photon::m_precomp...
TOOL
0.907493
7.24592
2a5f7553-ef2e-4b6c-b633-79ed2c741180
mayankissrani/Leetcode-Questions
0075-sort-colors/BruteForce.cpp
// this solution has a time complexity of O(nlogn) class Solution { public: void sortColors(vector<int>& nums) { sort(nums.begin(),nums.end()); } };
ALGO
0.999608
5.741823
e51d9676-ebe5-403b-804d-474763b8bc81
Masum-Billah1/CodeForces-Accepted-Problem
Disturbed People-1077B.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n,i,c=0; cin >> n; int a[n]; for(i=0;i<n;i++) cin >> a[i]; for(i=0;i<n-3;i++){ // cout <<a[i]<<a[i+1]<<a[i+2]<<a[i+3]<<endl; if(a[i]==1 && a[i+1]==0 && a[i+2]==1 && a[i+3]==0){ c++; a[i+2]=0; } } for(i=0;i<n-2;i++){ if(a[i]==1 && a[i+1]=...
ALGO
0.999951
3.650596
1d770859-2c12-4cae-80a5-d233a3c604ad
AbhishekChauhan9036/My-Templates-for-CP
Tree Algorithms/Centroid_Tree.cpp
vector<pair<int, int>> edgeList; vector<bool> deleted; vector<int> subtree; inline int getD(int index, int s){ return edgeList[index].ff ^ edgeList[index].ss ^ s; } void computeSubtrees(int root, vector<int>* edges, int parent){ subtree[root] = 1; for(auto i : edges[root]){ int dest = getD(i, root);...
ALGO
0.999788
4.870682
a62620ca-52e9-449a-8722-8694db3a87bd
SamkitSanghvi/Coding
Binary_Search/(17)AllocateMinimunNOOfPages.cpp
// AVP // Find the Minimum No of Pages // Input :- One Array and One Integer // Output :- To return an Integer // Array is Define a Book and ith of Array is definnf no of Pages in book // and k is definng no of student // Restriction // At least one book is to given to one student // We cant Allow one book to 2 Stu...
ALGO
0.999994
4.50142
beee59ef-6a14-454c-95a2-172a675e153d
mudit1993/Practice-Programs
codechef contests/Oct15/pershfts.cpp
#include <iostream> #include <algorithm> using namespace std; long long int arr[121][5],a[100001],b[100001]; bool isEqual(int row,int n) { for(int i=0;i<n;i++) { if(b[i]!=arr[row][i]) return false; } return true; } int main () { unsigned int t,i,n,k,no,cst; cin>>t; int myints[] = {1,2,3,4,5}; int cnt=...
ALGO
0.999868
3.333221
88b5636e-db59-41c3-8c54-3860cd818dd9
DerGregHD/OpenRemote-Sender
OpenRemote_SquareLineUi/OpenRemote_Sender_Ui/libraries/TFT_eSPI/examples/Generic/Animated_Eyes_1/user_bat.cpp
// SERVO BAT: flapping paper-cutout bat (attached to servo on SERVO_PIN) // triggered by contact-sensitive conductive thread on CAPTOUCH_PIN. // See user.cpp for basics of connecting user code to animated eyes. #if 0 // Change to 1 to enable this code (must enable ONE user*.cpp only!) #include "Adafruit_FreeTouch.h" ...
TOOL
0.850825
3.98716
679fb867-e171-4cd4-a383-384a541577fa
chaurasiyanitin264/Pattern_CPP
leftPatternAlbhabet.cpp
#include<iostream> using namespace std; int main(){ int i,j; int n=65; for (int i = 1; i <=5 ; i++) { for (int j = 1; j <=i; j++) { cout<<char(j+64); n++; } cout<<"\n"; } }
ALGO
0.998379
3.240471
e5c67a9a-14df-4e30-ad6f-68b615ac9049
Jungdahee/Problem_Solving
Programmers/Programmers_42586.cpp
#include <vector> #include <queue> using namespace std; vector<int> solution(vector<int> progresses, vector<int> speeds) { //기능개발 - success vector<int> answer; vector<int> tValue; queue<int> pq; queue<int> sq; for(int i = 0; i < progresses.size(); i++){ pq.push(progresses[i]); ...
ALGO
0.999648
5.029878
3e1346f9-c4c9-4502-8b57-bd5c7f52f682
baejaeho18/code
0-Education/cpp/FundamentalDataTypes/limits/exceed.cpp
#include <iostream> #include <climits> using namespace std; int main() { short sam = SHRT_MAX; // initialize a variable to max value unsigned short sue = sam; // okay if variable sam already defined cout << "Sam has " << sam << " dollars and Sue has " << sue; cout << " dollars deposited." << endl << "Add $1 ...
TOOL
0.975645
3.230854
e848682f-5e7c-4100-84ca-96aa01954cc5
Nicoskin/winter_school
src/coder.cpp
#include "coder.h" #include <iostream> Coder::Coder(int k) :k_(k) { // Copy first k columns from generator_Matrix_A_ for (size_t i = 0; i < generator_Matrix_A_.size(); i++) { std::vector<int> row; for (int j = 0; j < k; j++) { row.push_back(generator_Matrix_A_[i][j]); } ...
ALGO
0.999554
5.72547
704abe3a-9f3f-472e-9aee-8748d3c365f0
Henrik-Yao/NEUQ-ACM-Solution
winter-day1/刘东升/7.6字符串对称.cpp
#include<bits/stdc++.h> using namespace std; #define MaxSize 60 typedef int ElemType; typedef struct { ElemType data[MaxSize]; int top; //ջָ }SqStack; //˳ջ void InitStack(SqStack *&s){ s=(SqStack *)malloc(sizeof(SqStack)); s->top=-1;//դ } void DestroyStack(SqStack *&s){ free(s); } bool StackEm...
ALGO
0.999995
4.064774
6823ef65-3739-4624-a4a8-a545627c367c
ValKmjolnir/NUAA-CCST-Data-Structure
curriculum design/2-keytree/key_tree.cpp
#include <iostream> #include <fstream> #include <list> #include <cstring> struct tree_node { char c; std::list<tree_node> children; void add_new_word(std::string word,int n) { if(n==word.length()) { tree_node new_node; new_node.c=0; this->children.push_back(new_node); return; } for(std::list<tr...
TOOL
0.983672
4.51027
b32e03a4-c7cf-4fb7-a122-dee985b5d41d
Asrarul320/Cplus_plus_DSA_Assignment_PW
(24) Graphs/Lecture 73/question1.cpp
// Q1 For a graph with n nodes, how many edges are there in a complete graph? // Q2 Minimum number of edges to make a graph on n nodes is? // Q3 Minimum number of edges to make a connected graph of n nodes? // Q4 Insertion and deletion of edges is fastest in ___ ? // Q5 Which representation should be used if we ha...
ALGO
0.993707
5.576341
3eb3a6b6-f231-4995-889f-f14ac6461f71
Dither/evolving-objects
eo/test/t-selectOne.cpp
// -*- mode: c++; c-indent-level: 4; c++-member-init-indent: 8; comment-column: 35; -*- //----------------------------------------------------------------------------- // t-selectOne.cpp // This program test the breeder object // (c) GeNeura Team, 1998 //-------------------------------------------------------------...
ALGO
0.928004
6.65423
fe64c61b-689e-4822-9bfd-07256e72819e
ishandutta2007/codeforces
eecs/normal/1566/C.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 100010; int T, n; char s[2][maxn]; int main() { scanf("%d", &T); while (T--) { scanf("%d", &n); scanf("%s %s", s[0] + 1, s[1] + 1); int ans = 0; for (int i = 1; i <= n; i++) { if (s[0][i] != s[1][i]) ans...
ALGO
0.999961
4.025553
1142a410-b94f-4cd1-a1cf-167cf4753c75
kunnjjj/CB-LEVEL-UP-MAR-23
Strings And Arrays Mixed Problems/minWindowSubstringLC.cpp
string minWindow(string s, string t) { vector<int> freqT(256,0); vector<int> freqSubstr(256); for(int i=0;i<(int)t.size();i++) { freqT[t[i]]++; } int start_idx=-1,end_idx=1e5; int i=0; for(int j=0;j<(int)s.size();j++) { ...
ALGO
0.999987
6.137974
6f3ec61d-479a-4a96-a51d-cc31241f7623
KennyJLam/Project-Euler
main.cpp
#include <iostream> #include "project_euler.h" #include <chrono> using namespace std; using namespace std::chrono; int main() { high_resolution_clock::time_point t1 = high_resolution_clock::now(); euler::SolveP126(); high_resolution_clock::time_point t2 = high_resolution_clock::now(); long long int d...
ALGO
0.998147
4.544535
673a8432-9984-4400-9632-37980c60ce35
raghav-7288/Coding
Others/Advanced-DSA-and-CS-Theory-master/Dynamic_programming/26. Largest Square formed in Matrix.cpp
int maxSquare(int n, int m, vector<vector<int>> mat){ // code here if(n == 1) { for(int i = 0; i < m; i++) { if(mat[0][i] == 1)return 1; } return 0; } if(m == 1) { for(int i = 0; i < n; i++) ...
ALGO
0.999972
5.895558
1a328bc8-befb-4bf2-8682-52c008f1e15e
nazmul-1117/Varsity-Programming
Operating_System/Page_Replacement_Algorithms/FIFO.cpp
#include <iostream> #include <vector> using namespace std; int main(){ int nPages; cout << "Enter the Number of Pages: "; cin >> nPages; vector<int> pages(nPages); cout << "Enter the Pages: "; for (int i = 0; i < nPages; i++){ cin >> pages[i]; } int frames; cout << "Enter...
ALGO
0.999638
4.61497
e703f60e-58f4-4918-8adb-f3182a4df986
MdAsimKhan/Striver-SDE-2022-Solutions
PascalsTriangle.cpp
#include <bits/stdc++.h> vector<vector<long long int>> printPascal(int numRows) { vector<vector<long long int>> dp(numRows); for(int i=0;i<numRows;i++){ dp[i]=vector<long long int>(i+1,1); for(int j=1;j<i;j++){ dp[i][j]=dp[i-1][j]+dp[i-1][j-1]; } }...
ALGO
0.99988
4.741765
963449e3-4c23-4619-a528-807bb630b1db
abahnasy/tracking_and_detection_opencv
openCV2/src/task3.cpp
/* * task3.cpp * * Created on: Jan 6, 2020 * Author: abahnasy */ #include <opencv2/opencv.hpp> #include "RandomForest.h" #include "DataContainers.h" #include "ComputingLocation.h" #ifdef RECHNERHALLE // C++ program to create a directory in Linux #include <bits/stdc++.h> #include <iostream> #include <sys/s...
ALGO
0.981237
3.096773
170ecf45-5f53-4617-9834-6f2c0e83af06
abhisheknaiidu/dsa
Leetcode/May-Challenge/remove-kdigits.cpp
class Solution { public: string removeKdigits(string num, int k) { int n = num.size(); if( n<= k ) { return "0"; } while(k) { int i = 0; // for finding the peaks. while(i+1<n && num[i+1]>=num[i]) i++; ...
ALGO
0.999981
6.526024
a78657f8-f684-4888-97b6-07f8b5355516
rahulyadav6/Decode-DSA-with-c-
17_Binary_Tree/Lecture_1/treeNode.cpp
#include <bits/stdc++.h> using namespace std; class Node{ public: int val; Node* left; Node* right; Node(int val){ this->val = val; this->left = NULL; this->right = NULL; } }; void display(Node* root){ if(root == NULL) return; cout<<root->val<<" "; display(root->l...
ALGO
0.999686
4.238023
1eaad9a0-e15a-4aae-8208-378aedd27821
endo1322/AtCoder
abc/abc297/c/main.cpp
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; #define rep(i,n) for (int i = 0; (i) < (int)(n); ++ (i)) #define rep3(i,m,n) for (int i = (m); (i) < (int)(n); ++ (i)) #define rrep(i,n) for (int i = (int)(n) - 1; (i) >= 0; -- (i)) #define rrep3(i,m,n) for (int i = (int)(n) -...
ALGO
0.999917
3.962321
efb4c081-e6ec-4264-9f82-c68b8be541b6
impolska742/CodeForces
A. Magnets.cpp
#include <bits/stdc++.h> typedef long long int ll; #define in(v,n) for(int i = 0 ; i < n ; i++) cin >> v[i]; #define f(a,b) for(int i = a ; i < b ; i++) #define frev(a,b) for(int i = a ; i >= b ;) #define mod 1000000007 using namespace std; #define pb push_back #define debugVector(v) for(int i = 0; i < v.size(); i++) c...
ALGO
0.999621
3.737043
4a302e72-faf7-4a95-98ef-b30a741b1097
agumatt/trabajoAdelantadoCC6908
MonaEngine/thirdParty/bullet3-2.88/src/BulletDynamics/Dynamics/btDiscreteDynamicsWorldMt.cpp
#include "btDiscreteDynamicsWorldMt.h" //collision detection #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/BroadphaseCollision/btSimpleBroadphase.h" #include "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.h" #include "BulletCollision/CollisionShapes/btCollisi...
ALGO
0.982059
3.223687
bdade5e0-2ef2-4420-a519-9b668f75385d
Avdhesh-Varshney/CPMasterLog
CodeChef/Practice-Problem/XOR_PAL.cpp
// Xor Palindrome // Problem Code - XOR_PAL // https://www.codechef.com/problems/XOR_PAL // Solution: #include <iostream> using namespace std; int ispalindrome(int n, string s) { if(n == 1) return 0; int count = 0; for(int i = 0; i < n/2; i++) { if(s[i] != s[n-i-1]) count++; ...
ALGO
0.9999
5.398524
df39c430-a55f-4f1a-8df4-eb70b1577bc5
Sauvik27/DS-Algo
knapSack.cpp
#include <iostream> #include <algorithm> using namespace std; void knapsack(int weight[], int profit[], int n_obj, int constraint) { float profit_by_weight[n_obj]; float actual_profit=0; float value=0; for(int i=0;i<n_obj;i++) { profit_by_weight[i]=profit[i]/weight[i]; } for(int j=0;j<n_obj;j++) { for(int ...
ALGO
0.999931
4.323428
3766568e-cbac-4e16-88df-9484872c617d
Youssef-Mustafa/Junior_training_sheet
4_A_Team.cpp
#include <iostream> using namespace std; int main() { int n; int sureProblems = 0; int p, v, t; cin >> n; while (n) { cin >> p >> v >> t; if ((p + v + t) > 1) sureProblems++; n--; } cout << sureProblems; return 0; }
ALGO
0.997952
3.493704
41e47ea0-2c50-407b-aea2-3f79d6c3b91f
ampfibi1/Regular_problem_solve
A_Concat_Array.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t ;cin >> t ; while(t--){ int n ; cin >> n ; vector<vector<int>> v ; for(int i=0; i<n; ++i){ vector<int> x; for(int j=0; j<n; ++j){ int v ; cin >> v ; x.push_back(v); } v.push_back(x); } for(auto x:v){ for(auto val:x)...
ALGO
0.998997
3.376974
b62c83dc-8cd9-41cb-9c32-ea315122776a
1404927255/lianxisheng
使用2分法找数字.cpp
#include<stdio.h> int main(void) { int arr[] = { 1,2,3,4,5,6,7,8,9,10 };//给定一个有序整数数组,个数可以自己定 int a; int sz = sizeof(arr) / sizeof(0);//sizeof计算这个数据的大小,arr/0就是整个数组的大小除以其中一个,就是这个数组的个数 int leaft, right, mid;//这里设定左下标和右下标,以及中间下标 leaft = 0; right = sz - 1; printf("请输入1-10的数字\n"); scanf_s("%d", &a); while (leaft <= ...
ALGO
0.999427
3.368365
c8bdbd6b-23bc-4fb1-acd6-cd83a63a0ad9
nhatminh2947/UVa-Online-Judge
168 - Theseus and the Minotaur/168 - Theseus and the Minotaur.cpp
//****************************************************************** // Author: Huynh Nhat Minh // Problem Name: 168 - Theseus and the Minotaur // Verdict: Accepted //****************************************************************** #include <iostream> #include <iomanip> #include <cstdio> #include <algorithm> #include...
ALGO
0.999805
3.488019
a9c6617a-e4eb-43c9-a3f8-872a13b42d5e
libgeos/geos
benchmarks/index/chain/MonotoneChainBuilderPerfTest.cpp
#include <random> #include <benchmark/benchmark.h> #include <geos/geom/CoordinateSequence.h> #include <geos/index/chain/MonotoneChain.h> #include <geos/index/chain/MonotoneChainBuilder.h> using geos::geom::Coordinate; using geos::geom::LineSegment; using geos::geom::CoordinateSequence; using geos::geom::Envelope; us...
TEST
0.989372
6.824585
c88f3b87-0849-4476-8a4e-a4dfd489dafa
SIL1202/CSES
Dynamic Programming/Book shop.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n, x; cin >> n >> x; vector<int> pages(n); vector<int> price(n); vector<int> dp(x + 1, 0); for (int i = 0; i < n; i++) cin >> price[i]; for (int i = 0; i < n; i++) cin >> pages[i]; for (int i = 0; i < n; i++) for (...
ALGO
0.999897
4.274729
5b2c405d-436b-4ed6-bb7e-5364f895a252
urashima0429/keipro_practice
atcoder/abc/abc175/b.cpp
#include <iostream> using namespace std; typedef long long ll; int main() { int N, L[110]; cin >> N; for (int i = 0; i < N; ++i){ cin >> L[i]; } int res = 0; for (int i = 0; i < N-2; ++i){ for (int j = i+1; j < N-1; ++j){ for (int k = j+1; k < N; ++k){ int...
ALGO
0.99994
4.196909
9042c3e6-86c7-4666-a91e-1076d8716a30
ishandutta2007/codeforces
maripium/normal/1155/C.cpp
#include <bits/stdc++.h> using namespace std; const int N = 300300; int n, m; long long x[N]; long long p[N]; int main() { ios_base::sync_with_stdio(false); cin >> n >> m; long long g = 0; for (int i = 1; i <= n; ++i) { cin >> x[i]; if (i > 1) g = __gcd(g, x[i] - x[i - 1]); } for (int i = 1; i <...
ALGO
0.999948
3.675817
2e9828bf-cd66-40ef-8e08-05da4cfe445e
actium/codeforces
0200/30/238a.cpp
#include <iostream> constexpr unsigned M = 1000000009; unsigned raise(unsigned b, unsigned p) { unsigned v = 1; for ( ; p != 0; p /= 2) { if (p & 1) v = 1ull * v * b % M; b = 1ull * b * b % M; } return v; } unsigned multiply(unsigned x, unsigned y) { return 1ull * x *...
ALGO
0.999977
5.252314
e2a22b52-7717-4228-8c27-7ead912f548b
Weikang01/useful_algorithms
EuclidGCD.cpp
#include "EuclidGCD.h" void EuclidGCD(const int& A, const int& B, int& re) { int s = A > B ? B : A; int l = A > B ? A : B; int q, r; while (true) { q = l / s; r = l % s; if (!r) { re = s; return; } l = s; s = r; } }
ALGO
0.999799
5.15314
a3ad405d-01f7-460b-b885-3090782b99ed
cprypt/Baekjoon_Online_Judge
Class_2/10989.cpp
#include <iostream> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N; cin >> N; int arr[10001] = {0}; for (int i = 0; i < N; i++) { int num; cin >> num; arr[num]++; } for (int i = 1; i <= 10000; i++)...
ALGO
0.999895
4.443974
20339a31-7984-45f3-a532-d4fc65d1c05a
mint6421/kyopro
atcoder/abc/110/abc_110_a.cpp
#include<bits/stdc++.h> using namespace std; #define inf INT_MAX #define INF LLONG_MAX #define ll long long #define ull unsigned long long #define M (int)(1e9+7) #define P pair<int,int> #define FOR(i,m,n) for(int i=(int)m;i<(int)n;i++) #define RFOR(i,m,n) for(int i=(int)m;i>=(int)n;i--) #define rep(i,n) FOR(i,0,n) #d...
ALGO
0.999805
3.896166
c030c0cf-4c3a-4b5b-accf-1cf25bb3efc8
vilion/CarND-Path-Planning-Project
src/Eigen-3.3/bench/sparse_product.cpp
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out //g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out // -DNOGMM -DNOMTL -DCSPARSE // -I /home/gael/Coding/LinearAlgebr...
ALGO
0.979837
4.164869
d130e554-03a7-4367-9223-0cb7af7d4cbc
orcun-gokbulut/ze-externals-sources
Source/libQt/Source/qtbase/src/3rdparty/angle/src/libANGLE/Caps.cpp
#include "libANGLE/Caps.h" #include "common/debug.h" #include "common/angleutils.h" #include "angle_gl.h" #include <algorithm> #include <sstream> static void InsertExtensionString(const std::string &extension, bool supported, std::vector<std::string> *extensionVector) { if (supported) { extensionVect...
TOOL
0.91182
4.777683
0c586ad2-85b1-4d6d-8b82-796432f88865
AhmedFathi-Aziz/CP
Al-Azhar/Sheet #1/q.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long void doWork() { double x, y; cin >> x >> y; if (x > 0 && y > 0) cout << "Q1\n"; else if (x < 0 && y > 0) cout << "Q2\n"; else if (x < 0 && y < 0) cout << "Q3\n"; else if (x > 0 && y < 0) cout <<...
ALGO
0.999951
4.332243
cfe2fdee-f6cd-4130-a6c0-f49df4fbbe76
LiuKang1080/Learning_CPP
Basics_Of_CPP/15_STL/Sources/13_Map_Containers.cpp
// Map Containers in C++ /* C++ Maps: - Also an associative container - A collection of stored objects that allow fast retrieval using a key. - The STL provides Sets and Maps. - Usually implemented as a balanced binary tree or hashsets. - Most operations are efficient. - There ...
TOOL
0.899394
6.161212
18c42147-dfad-4631-b265-8ee083de5c4e
JamesHenso/repo-dsa
24120340/Week_1/ex3.cpp
#include <iostream> using namespace std; void generateBinaryStrings(int n, string str){ if (n == 0) { cout << str << endl; return; } generateBinaryStrings(n - 1, str + "0"); generateBinaryStrings(n - 1, str + "1"); } int main(){ int n; cin >> n; string str; generateBinaryS...
ALGO
0.999975
4.980903
6d75416c-77b0-4562-9341-1ca395756c92
mridulcr7/Templates
graph/edge_count.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef pair<ll, ll> pr; typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> pbds; // find_by_order, order_of_...
ALGO
0.999976
4.887524
34aa7752-3bda-425b-9ea4-ecfe945e0925
tiqwab/atcoder
abc174/c/main.cpp
#include <algorithm> #include <cassert> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> #include <limits.h> using namespace std; typedef long long ll; template<class T> inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } ...
ALGO
0.999303
3.759295
2cd8add6-ea35-49cf-a19c-98308173d7a6
pranjalg131/Competitive-Programming
13 DP - 1/_Alpha Code.cpp
/* AlphaCode-Question Alice and Bob need to send secret messages to each other and are discussing ways to encode their messages: Alice: “Let’s just use a very simple code: We’ll assign ‘A’ the code word 1, ‘B’ will be 2, and so on down to ‘Z’ being assigned 26.” Bob: “That’s a stupid code, Alice. Suppose I send you ...
ALGO
0.999967
5.350154
6d6cc204-f997-43e2-a6bc-35be8a24aee7
Vedant3008/CPP
Sum_of_Factors.cpp
#include <iostream> using namespace std; int main(){ int n,sum; sum=0; cout<<"Enter a number: "; cin>>n; for(int i=1;i<=n;i++){ if(n%i==0){ sum+=i; } } cout<<"Sum is: "<<sum<<endl; if(sum==n*2){ cout<<"It is a Perfect number"; } else{ ...
ALGO
0.999711
3.925853
f074834e-74b0-4c5b-83e9-d1aa459f53be
alexandraback/datacollection
solutions_2749486_0/C++/HaifengJin/main.cpp
#include<iostream> #include<cstring> #include<cstdio> #include<cstdlib> using namespace std; string a = "EW"; string b = "WE"; string c = "NS"; string d = "SN"; int x, y; int main() { freopen("t.txt", "r", stdin); freopen("y.txt", "w", stdout); int t; scanf("%d", &t); for (int i = 0; i < t; i++) { scanf("%d%d...
ALGO
0.999837
3.40111
5a57d438-ec55-4d32-8038-4f29c3b27fe9
rajneeshkumar146/pepcoding-Batches
2019/LevelUpDecBatch/l010_SearchingAndSorting/l001.cpp
#include <iostream> #include <vector> #include <unordered_map> using namespace std; int binarySearch(vector<int> &arr, int data) { int n = arr.size(), si = 0, ei = n - 1; while (si <= ei) { int mid = (si + ei) / 2; // si + (ei - si) / 2; if (arr[mid] == data) return mid; ...
ALGO
0.999928
5.092707
008547c6-4077-464a-8362-7ffb4fd9e8a4
poseidon2022/Edge-Information-for-Branch-Prediction
dsa/dsa/quick_sort.cpp
#include <iostream> using namespace std; int partition(int arr[], int low, int high) { int pivot = arr[high]; int i = low - 1; for (int j = low; j < high; j++) { if (arr[j] < pivot) swap(arr[++i], arr[j]); } swap(arr[i + 1], arr[high]); return i + 1; } void quickSort(int arr[], int low...
ALGO
0.999955
5.585636
9a5f1aa5-f089-4d88-8f60-d05208a28600
ishandutta2007/codeforces
wxhtzdy/normal/1388/A.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define ll long long #define mt make_tuple #define ldb double #define pii pair<int,int> #define pll pair<ll,ll> template<typename T>void ckmn(T &a,T b){a=min(a,b);} template<typename T>void ckmx(T &a,T b){a=max(a,b);} int ri(){int x...
ALGO
0.997962
3.50534
12ad1b6c-5277-4a6e-a13b-90c8dd5772fb
Macesuted/Code
QOJ/10332.cpp
/** * @file 10332.cpp * @author Macesuted (<EMAIL>) * @date 2025-04-17 * * @copyright Copyright (c) 2025 * */ #include <bits/stdc++.h> using namespace std; #define endl '\n' void solve(void) { int64_t s, t; cin >> s >> t; int64_t v = sqrt(s + t); if (v * v == s + t) return cout << "1 " << t <...
ALGO
0.999749
5.22349
44ef17e9-2998-43ad-8af7-1c09be812051
raincross7/code-similarity
codes/train_code/problem225/problem225_243.cpp
#include <bits/stdc++.h> using namespace std; long long INF = 1000000000000000000; int main(){ int N; cin >> N; vector<long long> a(N); for (int i = 0; i < N; i++){ cin >> a[i]; } long long tv = 0; long long fv = INF; while (fv - tv > 1){ long long mid = (tv + fv) / 2; vector<long long> b(N)...
ALGO
0.999988
4.156611
c82749ea-1433-43a3-a85e-56cccecb57ea
roahmlab/RAPTOR
Trajectories/src/Polynomials.cpp
#include "Polynomials.h" namespace RAPTOR { Polynomials::Polynomials(const VecX& tspan_input, int Nact_input, int degree_input) : Trajectories((degree_input + 1) * Nact_input, tspan_input, Nact_input), degree(degree_input) { P = VecX::Zero(degree + 1); ...
ALGO
0.998671
5.876958
ebb25881-dc4f-488d-b78f-d75a5299d871
ishandutta2007/codeforces
kostia244/normal/1156/E.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define mp make_pair #define pb push_back #define eb emplace_back #define xx first.first #define yy first.second #define __V vector #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define oit ost...
ALGO
0.9999
4.15494
19f7135d-44c2-4904-9d03-5b0c1220322d
SayanBanerjee-007/All_DSA_Learning
3-DSA-CPP-Apna-College/9_bitwise.cpp
// write a program to check if the given number is power of 2 #include<iostream> using namespace std; int main() { int num; cout<<"Enter your number: "; cin>>num; if(!(num & (num-1))) cout<<"The given number "<<num<<" is power of 2"; else cout<<"The given number "<<num<<" is not power of 2...
ALGO
0.98308
5.79792
5d34b1a3-ecd4-4300-81f7-8ed1bc6a9ad5
Rayhan-Ahmed108/Number-Theory
B_High_School_Become_Human.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int const int mod = 1e9 + 7; int main() { int n, m; cin >> n >> m; double ans = m * log(n); double res = n * log(m); if(ans == res){ cout << "=" ; } else if(ans > res){ cout << ">"; } else{ cout...
ALGO
0.999963
3.816367
41a50f2c-6ef0-4e54-9792-4f4c463f022e
fcraveiro/flutter_windows_app
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.998693
6.797273
8062ef88-65cc-40c0-94e7-3c9e3b38eece
AmanDhimanD/Leet-Code
Symmetric_Tree.cpp
class Solution { public: bool check(TreeNode* l,TreeNode* r){ if(l==NULL && r==NULL){ return true; } if(l==NULL || r==NULL || l->val !=r->val){ return false; } return (check(l->left,r->right) && check(l->right,r->left)); } bool isSymmetri...
ALGO
0.999992
6.547596
53737961-475c-4620-921f-0189fac50993
yancouto/competitive-programming
ojs/timus/1084.cpp
#include <bits/stdc++.h> using namespace std; template<typename T> inline T abs(T t) { return t < 0? -t : t; } const double sq2 = sqrt(2), eps = 1e-8, pi = acos(-1); int main() { double l, r; scanf("%lf %lf", &l, &r); if(r - sq2 * l / 2. > eps) { printf("%.3f\n", l * l); } else if(r - l / 2.> eps) { double x = ...
ALGO
0.999827
3.55943
2afbbd42-adb3-4492-837e-822ce79b8c7b
Aman0106/DSA-Learning
Nishant Chahar 30 days/Recursion/subsequence.cpp
#include<iostream> using namespace std; void subSequence(string s, string tempAns, int index){ if(index >= s.size()){ cout<<tempAns<<" "; return; } // Take subSequence(s, tempAns+s[index], index+1); // Not Take subSequence(s, tempAns, index+1); } int main(){ string s = "ab...
ALGO
0.999866
4.002765
6e4ae1c8-e585-4f6d-9cb4-a0f1b979313b
amitkumar0902/The_Quiet_Revolution
Watermelon.cpp
#include <iostream> using namespace std; int main() { unsigned int n; cin>>n; if(n==2) { cout<<"NO"; } else if(n%2==0) { cout<<"YES"; } else { cout<<"NO"; } return 0; }
ALGO
0.999923
3.420844
07158d7f-6dda-40a6-8c99-5b5487c941aa
ankushgarg1998/Competitive_Coding
college-labs/ADA Lab/matrix chain multiplication/matrix chain multiplication_detailed.cpp
#include<bits/stdc++.h> #define init(arr,val) memset(arr,val,sizeof(arr)) #define loop(i,a,b) for(int i=a;i<b;i++) using namespace std; int m[100][100], s[100][100]; void print_optimal_parens(int i, int j) { if(i == j) cout<<(char)(65+i); else { cout<<"("; print_optimal_parens(i, s[i][...
ALGO
0.999753
3.633588
709d2758-b54f-455e-9976-f75de3b3f96d
lindayukeyi/Stylit
thirdparties/opencv/sources/modules/stitching/src/motion_estimators.cpp
#include "precomp.hpp" #include "opencv2/core/core_c.h" #include "opencv2/calib3d/calib3d_c.h" #include "opencv2/core/cvdef.h" using namespace cv; using namespace cv::detail; namespace { struct IncDistance { IncDistance(std::vector<int> &vdists) : dists(&vdists[0]) {} void operator ()(const GraphEdge &edge) ...
ALGO
0.99991
5.227169
b005a105-613f-48d6-b425-99f341d592d3
hg786km/cs204lab
lab11first.cpp
#include <bits/stdc++.h> using namespace std; vector <vector <int> > adj; vector<int> color; bool dfs(int u) { bool temp=true; for(auto x:adj[u]){ if(color[x]==-1) { color[x]=1-color[u]; temp=(temp&dfs(x)); } else if(color[x]+color[u]!=1) return false...
ALGO
0.99999
5.166399
ed3f7c40-1bd4-4be8-8f34-33da16ef8b89
JohnItoo/Solvay
codeforces/rounds/CF-1454A.cpp
#include <bits/stdc++.h> using namespace std; #define _CRT_SECURE_NO_DEPRECATE // suppress some compilation warning messages (for VC++ users) // Shortcuts for "common" data types in contests typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; typedef set<int> si; typedef map...
ALGO
0.999718
4.76214
390fbc88-1fc7-418a-8d90-b0af9daa83b3
HansonXDi/dividir_y_conquistar
quickSort.cpp
#include <bits/stdc++.h> #include <algorithm> #include <chrono> using namespace std; // función swap void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; } // función para imprimir un arreglo void printArreglo(int array[], int size) { for (int i = 0; i < size; i++) { cout << array[i] << " "; ...
ALGO
0.998749
5.363876
47cf1dfb-69b1-4086-9835-7c398ce44230
bsarvan/code_algorithms
DecodeWays.cpp
/* A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given a non-empty string containing only digits, determine the total number of ways to decode it. The answer is guaranteed to fit in a 32-bit integer. Example 1: Input: s = "12"...
ALGO
0.999338
6.88025
c5703205-904e-43ac-b289-a0a6b5e83718
randomfeelings/dsa_resources
Graph_Algos/ShortestPathBFS.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; /* Find the shortest path for an unweighted, undirected graph * We will use BFS to traverse the graph. * Shortest Path using only BFS will work if there are no cycles and if the graph is unweighted or if all edges have same weight */ void ...
ALGO
0.999949
5.294987
95477437-29d8-452e-9c6a-0110552c1436
doug65536/blender
extern/bullet2/src/BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp
//#if defined (_WIN32) || defined (__i386__) //#define BT_USE_SSE_IN_API //#endif #include "BulletCollision/CollisionShapes/btPolyhedralConvexShape.h" #include "btConvexPolyhedron.h" #include "LinearMath/btConvexHullComputer.h" #include <new> #include "LinearMath/btGeometryUtil.h" #include "LinearMath/btGrahamScan2dCo...
ALGO
0.986849
6.910224
ac760997-c7b4-40fe-8bf6-7b6c10763200
Ashutosh-0506/Striver-Trees
L25SymmetricTree.cpp
//***********************************ASHUTOSH KUMAR***********************************// /* कर्मण्येवाधिकारस्ते मा फलेषु कदाचन। मा कर्मफलहेतुर्भूर्मा ते सङ्गोऽस्त्वकर्मणि॥ Karmanye vadhikaraste Ma Phaleshu Kadachana, Ma Karmaphalaheturbhurma Te Sangostvakarmani, The meaning of the verse is :— You have the right to wo...
ALGO
0.999982
5.037506
2f033f6b-e371-4601-8abd-42e775aaeed4
VeXEveryOne/MIREA
1/SIAOD/6 work/PhoneList.cpp
#include "PhoneNode.h" #include <iostream> using namespace std; PhoneList::PhoneList() : head(nullptr), tail(nullptr) {} PhoneList::~PhoneList() { while (head != nullptr) { PhoneNode* temp = head; head = head->next; delete temp; } } void PhoneList::insertNode(int phoneNumber, int tal...
ALGO
0.993908
5.343184
53210ebb-cead-4d05-b2a6-1a6fc47f4063
domathang/algorithm
백준/단계별/브루트 포스/체스판 칠하기.cpp
#include <iostream> using namespace std; int main() { int n, m, cntw=0, cntb=0, min=9999; char board[51][51]; cin >> n >> m; for(int i=0; i<n; i++) cin >> board[i]; for(int i=0; i<n-7; i++) { for(int j=0; j<m-7; j++) { cntw = cntb = 0; for(int k=i; k<i+8; k++) { for(int l=j; l<j+8; l++) {...
ALGO
0.999846
4.243906
2c4b5268-d1b3-40d6-a343-7f6c2b9bed68
Bencomester/LeetCode
1863.cpp
class Solution { public: int subsetXORSum(vector<int>& nums, int index = 0, int temp = 0) { int sum = 0; for (int i = index; i < nums.size(); i++) { sum += temp ^ nums[i]; sum += subsetXORSum(nums, i + 1, temp ^ nums[i]); } return sum; } };
ALGO
0.999997
5.817838
57510ea3-fe4c-4d9c-adb9-6e715ad26fe2
ScottYijun/CppPrimerV5
chapter03/chapter03/program03_23.cpp
#include <iostream> #include <vector> #include <ctime> #include <cstdlib> using namespace std; int main() { vector<int> vInt; srand((unsigned)time(NULL)); //生成随机数种子 for(int i = 0; i < 10; ++i) //循环10次 { //每次循环生成一个1000以内的随机数并添加到vInt中 vInt.push_back(rand() % 1000); } cout <<...
ALGO
0.986681
3.518933
459323d4-7942-4a6e-815c-e9a61d560dba
nhzc123/leetcode
ConvertSortedListToBinarySearchTree.cpp
/** * @file ConvertSortedListToBinarySearchTree.cpp * @brief * @author nhzc <EMAIL> * @version 1.0.0 * @date 2014-09-11 */ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ /** * Definition for binary ...
ALGO
0.999986
5.779026
21d47e61-8755-441d-88fb-c494b4c3729d
actium/codeforces
1100/50/1157a.cpp
#include <iostream> #include <set> void answer(unsigned v) { std::cout << v << '\n'; } unsigned f(unsigned x) { for (++x; x % 10 == 0; x /= 10); return x; } void solve(unsigned n) { unsigned k = 0; for (std::set<unsigned> s; s.count(n) == 0; n = f(n)) { s.insert(n); ++k; } ...
ALGO
0.999828
5.171148
9e734eb2-a081-4504-a6c3-18449de2d93c
ShravanJagadam/DSA
Sorting/MergeSort.cpp
/*Smaller Elements You are given an array of integers. For each element in the array, find the number of smaller elements on the right side and print the total count. Input Format The first line of input contains T - the number of test cases. It's followed by 2T lines, the first line contains N - the size of the arr...
ALGO
0.999918
5.703187
f4f03113-58b5-46fd-b58f-eb04f4a2df13
hjiang13/LLMs-in-IR
POJ-104/70/890.cpp
#include <iostream> using namespace std; int main() //???? { int n,i,j,I; //??????n?????i,j,I??? cin>>n; if(n<2) return 0; else { double dis=0,temp1,temp2,temp3; //??????dis?????temp1,temp2,temp3??????? double a[100][2]; for(I=0; I<n; I++) cin>>a[I...
ALGO
0.999704
3.484102
82d73c1c-b59b-4e62-b5dc-8c106834a83d
kearcer/tjh_test
testbox/HJ33 整数与IP地址间的转换.cpp
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <string> #include <algorithm> #include <climits> #include <regex> #include <vector> #include <stack> using namespace std; int main() { string s; string s1; getline(cin, s); // cin.ignore(); getline(cin, s1); regex pattern("[0-9...
ALGO
0.960744
3.463117
446daf6e-cd29-424d-84a1-c63e2f3574cc
Saisinare/DSA
3. Array/Easy/moveZerosToEnd.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: void moveZeroes(vector<int>& nums) { int n = nums.size(); vector<int> temp; for(int i=0;i<n;i++){ if(nums[i]!=0){ temp.push_back(nums[i]); } } for(int i=0;i<temp.size...
ALGO
0.999958
5.954483
9fd89007-38a4-48e8-a4da-f855a6f97f9e
BaiLibl/my-leetcode
DP/medium/673.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; /* vector<int> res; void dfs(vector<int>& nums,int j, int i){ if(i>=nums.size())return; if(nums[i]>nums[j]){ res[i]++; //int m; dfs(nums,i,i+1); } } */ //жͬȵӴ //̬滮 //res[]:¼nums[i]β鳤 //cou[]:¼num[i]β // int findNumberOfLIS(vector...
ALGO
0.999982
4.881734
f8c4f412-eab8-48c5-9e18-e7bf9a1f0214
c3-competitiveprogramming/cp-template-isadoravrx
cses/Missing_Number/Missing_Number.cpp
#include <iostream> #include <bitset> using namespace std; int main(){ int n; cin >> n; bitset<200001>bt(0); for(int i = 0; i < n; i++){ int num; cin >> num; bt[num] = 1; } int mis; for(int i = 1; i <= n; i++){ if(bt[i] == 0){ mis = i; ...
ALGO
0.999947
3.939689
d8ef3a02-a21b-4812-b867-6b0f8ccf7d15
ToymanShikhar/6Companies30Days
Amazon/14. Burning Tree.cpp
class Solution { public: unordered_map<Node*, Node*> m; unordered_map<Node*, bool> visited; vector<Node*> target; void dfs(Node* root, int tar) { if (root == NULL) { return; } if (root->data == tar) { target.push_back(root); } visited[...
ALGO
0.999963
6.672326
f2898a02-3d2a-4543-98dd-d431437dae56
AnanyaDas162/Leetcode-Solutions
Dynamic Programming/is-subsequence.cpp
class Solution { public: bool isSubsequence(string s, string t) { int x = 0, index = 0, c = 0; for (int i = 0; i < s.length(); i ++){ for (int j = index; j < t.length(); j ++){ if (s[i] == t[j]){ x = 1; index = j+1; c ...
ALGO
0.999951
6.004096
1b41c3b2-aa0d-48c2-8573-d4b11596e8eb
eric2003/ModernCMake
codes/thread/async/async06/main.cpp
#include <iostream> #include <thread> #include <string> #include <future> void compute( int nIters ) { for ( int iter = 0; iter < nIters; ++ iter ) { std::cout << " iter = " << iter + 1 << " nIters = " << nIters << std::endl; std::this_thread::sleep_for( std::chrono::milliseconds(500) ); ...
TOOL
0.888237
4.663146
454f5c72-e5ae-4749-a5b2-5ed6351d0990
ishandutta2007/codeforces
karuna/normal/1252/J.cpp
#include <bits/stdc++.h> #define va first #define vb second using namespace std; typedef long long lint; typedef pair<int, int> pint; int main() { cin.tie(0); ios_base::sync_with_stdio(0); int t; cin >> t; while (t--) { int n; cin >> n; cout << (n + 1) / 10 << '\n'; } }
ALGO
0.999663
4.061428
77d1d609-d2b4-40a7-98ae-a161dc965b62
ksandeleon/student-management-mobile-app
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.998733
6.76775
6f08a913-afa4-4be0-8dce-70627abf10c6
VijayShankar22/cpp
array_palindrome.cpp
#include <iostream> using namespace std; int main() { int length; cout << "Enter the length of the array: "; cin >> length; int num_array[length]; for (int i = 0; i < length; ++i) { cout << "Enter number " << i + 1 << ": "; cin >> num_array[i]; } int count = 0; for (i...
ALGO
0.999641
5.032755