uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
7b062224-cc99-4075-b7b2-7a47c653fe74
yutatanaka/C_Programing
C言語プログラミング/kadai1.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <string.h> /* 3xNg */ typedef struct { float x, y, z; }VECTOR3; /* Header */ typedef struct { char fileName[4]; /* f[^t@C */ char version; /* ϊRo[^̃o[W */ short num; /* gCAO\̐ */ short vertexNumber; /* _ */ short normal...
TOOL
0.901113
3.485063
f39790c2-e286-4534-b840-cc68dbc0f78c
udiptagogoi185/DSA
Linked List/Singly List/delete_Position.cpp
#include<bits/stdc++.h> using namespace std; class node{ public: int data; node* next; node(int val){ data = val; next = NULL; } }; void insertTail(node* &head, int value){ node* new_node = new node(value); if(head == NULL) { hea...
ALGO
0.999499
4.058345
a83fdc08-4647-4b1a-bf17-8f5397a58707
ApatheticMioz/traffic-management-simulator-cpp
Dijkstra.cpp
#include <iostream> #include <fstream> #include <sstream> #include <cmath> #include <ctime> using namespace std; /** * Represents an infinite distance used in the Dijkstra algorithm. * Initialized to the maximum possible integer value defined by INT_MAX. * Used as the initial distance for vertices to signify they a...
ALGO
0.999542
6.82621
3115d4a8-982e-4e01-a00e-a21804812c87
voreen-project/voreen
voreen/src/core/datastructures/roi/roigraph.cpp
#include "voreen/core/datastructures/roi/roigraph.h" #include "voreen/core/datastructures/geometry/trianglemeshgeometry.h" #include "voreen/core/datastructures/geometry/meshlistgeometry.h" #include "voreen/core/datastructures/geometry/pointlistgeometry.h" #include "voreen/core/io/serialization/serialization.h" namesp...
ALGO
0.954966
4.064619
7e20d599-e03b-4bb3-a922-dc7576023609
ratschlab/metagraph
metagraph/src/graph/representation/succinct/boss_chunk.cpp
#include "boss_chunk.hpp" #include <iostream> #include "common/threads/chunked_wait_queue.hpp" #include "common/serialization.hpp" #include "common/vector.hpp" #include "common/vectors/vector_algorithm.hpp" #include "common/utils/template_utils.hpp" #include "common/utils/file_utils.hpp" namespace mtg { namespace gr...
DATA
0.93504
3.9573
25032cbb-93f4-490d-9696-be7218840134
shaikharyan/Leetcode
753-open-the-lock/open-the-lock.cpp
class Solution { public: int openLock(vector<string>& deadends, string target) { unordered_set<string> deadendSet(deadends.begin(), deadends.end()); if (deadendSet.count("0000")) { return -1; } queue<pair<string, int>> queue; queue.push({"0000", 0}); ...
ALGO
0.999922
6.749442
6a155871-41e4-432a-a12b-54e03bd4ce19
untuned07/CodeChef
PracticeMakesUsPerfect.cpp
// Codechef Problem: https://www.codechef.com/problems/PRACTICEPERF #include <iostream> using namespace std; int main() { // your code goes here int a,b, c,d; cin >>a >>b >>c >>d; int ans = 0; if (a >=10){ans++;} if (b >= 10) {ans++;} if (c >=10) {ans++;} if (d >= 10){ans++;} cout <<ans <<endl; return 0; }
ALGO
0.946425
3.665225
5a787aa2-2fea-47c9-bab5-0857247f67fb
Ching-Hsiang-Su/OOP-exercise
Second/5.cpp
#include <iostream> #include <cmath> using namespace std; class Triangle { private: double a, b, c; public: Triangle() { a = b = c = 0; } Triangle(double sideA, double sideB, double sideC) { a = sideA; b = sideB; c = sideC; } ~Triangle() { cout << "destr...
ALGO
0.999936
4.339203
cdfa238d-2671-4f76-afa3-09ebaaa77ed2
DeepF02/DSA-450
Binary Trees/inOrderTraversal.cpp
// INorder Traversal of a tree both using recursion and Iteration #include <bits/stdc++.h> using namespace std; struct Node { int data; Node *left; Node *right; Node(int val) { data = val; left = right = NULL; } }; class Solution { private: //Function to find the inorder tra...
ALGO
0.999998
5.892178
6b144fcb-323c-40b3-9e2a-dd6b954ff3b7
yanshiwei/leetcode-go
cpp/1110.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999871
5.970906
a67b8e30-c233-4183-bf8b-488099ae1764
HeoJiYong/JYBaekJoon
BaekJoon/BaekJoon/1931.cpp
/* 1931 ׸ ˰ */ #include <iostream> #include <algorithm> #define START second #define END first using namespace std; pair <int, int > meeting[100000]; int main() { //freopen("input.txt","r",stdin); int tc; int mc = 0; // meeting count cin >> tc; for (int i = 0; i < tc; i++) { cin >> meeting[i].START; cin ...
ALGO
0.999944
4.479384
0975eee4-acf3-4b70-be38-77c850f7203c
jlevy44/UnrealAI
CarAI/joshua_work/old/tutorial/Code/08_code/Bullet/Lib/bullet-2.77/Extras/ConvexDecomposition/cd_wavefront.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include <ctype.h> // http://codesuppository.blogspot.com // // mailto: <EMAIL> // // http://www.amillionpixels.us // #include "float_math.h" #include "cd_wavefront.h" using namespace ConvexDecomposition; #include <vector> namespace Con...
TOOL
0.986718
4.503071
9a5596e1-832c-41db-80c8-a9f310999849
jirka-h/AVX512
harmonic_series_VCL.cpp
#include <iostream> #include <vectorclass.h> #include <omp.h> #include <cmath> using std::cout; using std::cin; using std::endl; double time_diff(const struct timespec * start, const struct timespec * end) { double run_time = (double)(end->tv_sec) - (double)(start->tv_sec) + ( (double)(end->tv_nsec) - (double)(s...
ALGO
0.999636
3.707185
7e689525-1529-45af-948d-730c4ccb6e46
SadadDeveloper/Sadad_SDK_Android
SadadSDK/sdk/src/main/cpp/crossplatform/CrossPlatform/CV/hough.cpp
//#include "compile.h" //#if COMPILE_DMZ #include "hough.h" //#include "opencv2/core/core.hpp" #define TO_RADIANS(in_degrees) (CV_PI * (in_degrees) / 180.0f) #define dmz_likely(x) __builtin_expect(!!(x),1) #define dmz_unlikely(x) __builtin_expect(!!(x),0) LinePolar llcv_hough(const Mat img, Mat dx_mat, Mat dy_mat, f...
ALGO
0.995961
4.887848
1ac02f3e-d6d7-4160-a07d-2a1d58c46289
swadheen01/CF-Solutions
codechef153a.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define pie 2*(acos(0.0)) #define yes cout<<"YES\n" #define no cout<<"NO\n" #define pb push_back #define endl "\n" #define lcm(a,b) (a*b)/(__gcd<ll>(a,b)) #define mod 1000000007 #define srt(v) sort(v.begin(),v.end()) #define rsrt(...
ALGO
0.999894
4.529593
3de08e04-aef4-45bd-91ab-d8135b2493a1
pavan-kalyan/competitive-coding
codeforces/random/1788B.cpp
#include<bits/stdc++.h> #include<iostream> #include<vector> #include<unordered_map> #define mod 1000000007 #define ll long long using namespace std; typedef vector<int> vi; typedef pair<int, int> pii; typedef vector<ll> vl; template <class T> ostream & operator << (ostream & os, vector <T> const& x) { os << "{ "; ...
ALGO
0.999727
4.58489
70445674-d341-4635-b1db-60122647aafc
GouravShDev/Leetcode-Solutions
1420-build-array-where-you-can-find-the-maximum-exactly-k-comparisons/1420-build-array-where-you-can-find-the-maximum-exactly-k-comparisons.cpp
class Solution { public: int mod = 1e9+7; int solve(int n, int m, int k, int curMx, vector<vector<vector<int>>> &dp){ if(k < 0) return 0; if(n == 0){ return k ==0; } if(curMx != -1 && dp[n][k][curMx] != -1) return dp[n][k][curMx]; int ans =0 ; for(int ...
ALGO
0.999994
5.006938
6b1353a7-d7d0-4615-8f1a-923340f8bac3
SanthanCH/Competitive-Programming
Remove_Colored_Pieces_if_Both_Neighbors_are_the_Same_Color/Remove_Colored_Pieces_if_Both_Neighbors_are_the_Same_Color.cpp
class Solution { public: bool winnerOfGame(string colors) { int i,j,n=colors.length(),count1=0,count2=0; for(i=1;i<n-1;i++){ if(colors[i]=='A'&&colors[i-1]=='A'&&colors[i+1]=='A') count1++; if(colors[i]=='B'&&colors[i-1]=='B'&&colors[i+1]=='B') ...
ALGO
0.999706
5.802755
99c729ca-ece4-40e5-9071-10fcfe169a19
Subbuleo23/finding-nemo
UnacademyCourse/RecursionBacktrackingINtroDPCPAug21/Lecture6/frogjump.cpp
// Problem Link - /* By Sanket Singh */ #include<bits/stdc++.h> //#include<ext/pb_ds/assoc_container.hpp> //#include<ext/pb_ds/tree_policy.hpp> //#include <ext/pb_ds/trie_policy.hpp> //using namespace __gnu_pbds; #define ll long long int #define ld long double #define mod 1000000007 #define inf ...
ALGO
0.999982
5.067963
837fd581-c6c7-460e-b9cc-40764be59c22
pgh08/DSA
Recursion/exponential.cpp
#include<iostream> using namespace std; int power(int a, int b){ //Base case. if(b == 0){ return 1; } if(b == 1){ return a; } //Recursive call. int ans = power(a, b/2); if(b%2 == 0){ return ans*ans; } else{ return a*ans*ans; } } int main() { ...
ALGO
0.999876
5.069929
a4b56e8a-86dc-4a90-b1c6-89024a07ec5c
arunveeramany/GridOpt
private-gravity/ext_lib/CoinIpopt/Ipopt/src/Algorithm/Inexact/IpInexactPDSolver.cpp
#include "IpInexactPDSolver.hpp" #ifdef HAVE_CMATH # include <cmath> #else # ifdef HAVE_MATH_H # include <math.h> # else # error "don't have header file for math" # endif #endif #include "IpIterativeSolverTerminationTester.hpp" extern Ipopt::IterativeSolverTerminationTester::ETerminationTest test_result_; namespa...
ALGO
0.997401
6.895065
582d93a7-71e6-4517-971e-a0c4082f381e
Jhonisnotreal/CPP
Funciones/E27.cpp
//Fibonacci #include<iostream> using namespace std; int fibonacci(int); int main(){ int nElemen; do{ cout<<"Digita el numero de elementos: "; cin>>nElemen; }while(nElemen <= 0); cout<<"\nSerie Fibonacci "; for(int i=0; i<nElemen; i++){ cout<<fibonacci(i)<<","; } return 0; } int fibonacci(int numero){ ...
ALGO
0.998506
3.758874
1294ca21-09da-4d5d-8c7d-0d5b343faf48
wcoin/wankcoin0
src/hash.cpp
#include "hash.h" inline uint32_t ROTL32 ( uint32_t x, int8_t r ) { return (x << r) | (x >> (32 - r)); } unsigned int MurmurHash3(unsigned int nHashSeed, const std::vector<unsigned char>& vDataToHash) { // The following is MurmurHash3 (x86_32), see http://code.google.com/p/smhasher/source/browse/trunk/MurmurH...
ALGO
0.987379
6.215198
8b784d6b-8e08-4f6d-941c-5022ebd8a6db
JelluSandro/olympic-code-cpp
itmo/Ёще одна задача про деревья.cpp
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, m; cin >> n >> m; if (m == 1) { cout << "0 1 1\n"; return 0; } if (m < 3) { cout << "1 1 2\n"; ...
ALGO
0.99998
3.183614
56897985-04df-497b-ad0b-75aac89cb9ee
Hridyansh30/Hridyansh
LAB 4(Quick Sort).cpp
#include<iostream> #include<cstdlib> #include<chrono> using namespace std; using namespace std::chrono; int *gen_input(int arr[], int k) { for(int i = 0; i<k ; i++) { arr[i] = rand(); } return arr; } int partition(int arr[], int low, int high) { int pivot = arr[low]; int i = low; i...
ALGO
0.999388
5.108382
d45fe07c-d6bb-4c96-b14c-c78c28f8423c
sunil14701/CN_CPP
CN C++/4 conditionals and loops/16_start_pattern.cpp
#include<iostream> using namespace std; int main(){ // N=4 // * // * * * // * * * * * // * * * * * * * int n; cin >> n; for(int i=0;i<n;i++){ for(int j=0;j<n-i-1;j++) cout << " "; for(int j=0;j<(2*(i)+1);j++) cout << "* "; cout << endl; } ...
ALGO
0.999967
3.822474
43a86b49-2bad-449f-ae79-97cd5dc6e450
LYX2333232/C_example
6class/6-22.cpp
#include <iostream> #include <cmath> using namespace std; class point { public: point(int xi = 0, int yi = 0) { x = xi; y = yi; } int getx() { return x; } int gety() { return y; } private: int x; int y; }; class Distance { public: Distance(point xp1, point xp2); doub...
ALGO
0.997729
4.13153
c1950e57-d2cf-4711-986a-35f81082dfc2
iamsile/ACM
Lovekey.cpp
#include <iostream> #include <string.h> using namespace std; void cal(char *a,char *b) { int i,j,lena,lenb,temp=0; lena=strlen(a); lenb=strlen(b); int ax[201],bx[201],cx[201]; for (i=0; i<lena; i++) ax[i]=(a[lena-i-1]-'A'); for (i=0; i<lenb; i++) bx[i]=(b[lenb-i-1]-'A'); for...
ALGO
0.999983
4.064691
d009a1a6-173d-4bdf-98e6-952a0e5f3e09
DublikuntMux/skia-cmake
src/utils/SkParsePath.cpp
#include "include/core/SkPath.h" #include "include/core/SkPoint.h" #include "include/core/SkScalar.h" #include "include/core/SkStream.h" #include "include/core/SkString.h" #include "include/core/SkTypes.h" #include "include/utils/SkParse.h" #include "include/utils/SkParsePath.h" #include "src/core/SkGeometry.h" #inclu...
TOOL
0.9532
7.257973
2b405113-9afb-47f8-87c8-89249ae5c63d
alwinyang91/openCV
opencv-4.7.0/samples/dnn/face_detect.cpp
#include <opencv2/dnn.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> #include <opencv2/objdetect.hpp> #include <iostream> using namespace cv; using namespace std; static void visualize(Mat& input, int frame, Mat& faces, double fps, int thickness = 2) { std::string fpsString = cv::format("FPS ...
TOOL
0.866821
5.992058
17f86bac-5d38-415f-ad21-65939c855a60
vridhipuri/Data-Structures-and-Algorithms
414.cpp
//Coin Change (see copy) // Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: long long int count(int coins[], int N, int sum) { // code here. vector<vector<long long int>>dp(N,vector<long long int>(sum+1,0)); for(int i=0;i<=s...
ALGO
0.999928
6.030204
6d832580-e9b1-4a41-964f-dc6b3c58970f
veluga29/C-programming
source/04_01_avrg3.cpp
#include <stdio.h> int main(void) { int x, y, z; double avrg; x = 5; y = 12; z = 3; avrg = (x + y + z) / 3.; printf("The average of %d, %d and %d is %f", x, y, z, avrg); return 0; }
TOOL
0.977599
3.722353
1cf07f18-a074-450c-b9a2-fc54c3e688a6
MateyApostolov/HomeWork
NOI3/puzzle.cpp
#include <bits/stdc++.h> using namespace std; int main () { int n, k; cin >> n >> k; vector<long long> s; for(int i = k; i < n + k; i++) s.push_back(i); for(int i = 0; i < n - 1; i++) { vector<long long> h; for(int j = 0; j < s.size() - 1; j++) h.push_back(s[j] +s[j + 1]); s...
ALGO
0.999876
3.210743
48bcc712-59ec-4440-9637-a967e71b63d1
the-handsome-monkey-king/BinaryConverter.cpp
BinaryConverter.cpp
/********************************************************** BinaryConverter.cpp @author Ryan Morehouse @license MIT A simple class that contains conversion calculations from binary to decimal and back. *********************************************************/ #include <vector> #include <math.h> ...
ALGO
0.974936
6.741243
7737e98b-9cce-4bd6-8562-094dd7580654
TherDiv/estructura-de-datos
TEMA07/BusquedaBinaria.cpp
#include <iostream> using namespace std; // Definición de la clase CVector class CVector { private: int* m_pVect; // Puntero al arreglo int m_nCount; // Número de elementos en uso int m_nMax; // Capacidad máxima del arreglo int m_nDelta; // Incremento para redimensionar // Función para inicializar las variabl...
ALGO
0.999647
5.940962
ccdf500f-fb5e-4797-9ca2-9448ffc5a5a4
vikram-rathore1/competitive_programming
codechef/FEB17/CHEFYODA/chefyoda_medium_accepted.cpp
#include<bits/stdc++.h> using namespace std; map<pair<int, int>, double> ncrProbs; double firstNcrProb(int n, int r) { if (n == 1) return 0.5; vector<double> numerator; double prob = 1.0; for (int i = n; i >= 1; i--) { if (i > max(n - r, r)) numerator.push_back((double)i); else { ...
ALGO
0.999703
4.655573
0496cda1-b143-46da-8aa1-a4d56df0daa1
Aditya2600/DSA
3633-maximize-the-number-of-target-nodes-after-connecting-trees-i/maximize-the-number-of-target-nodes-after-connecting-trees-i.cpp
class Solution { public: int bfs(int node, int k, vector<vector<int>> &adj, int size){ vector<int> vis(size, 0); queue<int> q; q.push(node); vis[node] = 1; int cnt = 0; int dist = 0; while(!q.empty() && dist <= k){ int sz = q.size(); ...
ALGO
0.999989
5.512155
97c4a98c-5af3-4545-b1f8-8223d5690ee6
Gitlnr/CppVault
Top50_Basic/20)ArmStrongNum.cpp
/*An Armstrong number (also known as a Narcissistic number) for a given number of n is a number that is equal to the sum of its own digits each raised to the power of the number of digits. 🔹 Steps to Check for Armstrong Number: Calculate the number of digits in the number n. For each digit, raise it to the power of th...
ALGO
0.999697
6.753191
5e4f6059-e3f0-49bf-9273-db8b8d037dfa
Marlon-Pascual-Marrero-Arancibia/Academia-Public
Miami Dade College - E01296/COP1334/Week 3 - Basic Summation and Percentage Calculation/Assignment 4 - Sum and Mult/multiplyFloatAndInt/multiplyFloatAndInt.cpp
/* INSTRUCTIONS The east cost sales division of a company generates 58% of the total sales. Write a program that predict how much the east coast division will generate if the company has 1 million in sales this year. Based on that percentage. */ #include<iostream> #include <string> using namespace std; string remov...
ALGO
0.875679
3.581881
8f579445-7d85-4d5c-8e24-77845ec199d4
Pedrotok/competitive_prog
DataStructures/SparseTable.cpp
void build(int n) { for(int i = 0; i < n; i++) st[i][0] = v[i]; for(int j = 1; j < LOGN; j++) { for(int i = 0; i + (1<<j) <= n; i++) { st[i][j] = min(st[i][j-1], st[i+(1<<(j-1))][j-1]); } } } int query(int l, int r) { int log = 31 - __builtin_clz(r-l+1); return min(st[l][log], st[r-(1<<log)+1][log]); }
ALGO
0.999905
4.640983
0b3b0e31-42dc-44cf-9b28-882f8f8ee8fb
Sovi11/col380-assignment3
try2.cpp
#include <iostream> #include <vector> #include <cstdlib> #include <ctime> #include <algorithm> #include <random> #include <mpi.h> using namespace std; bool debug = true ; void print_array(int arr[], int n){ for (int i = 0; i < n; i++){ cout << arr[i] << " " ; } cout << endl; } int main(){ MP...
ALGO
0.997856
3.367679
21ab0dab-6993-4a33-915e-d22673c57c1a
raincross7/code-similarity
codes/train_code/problem412/problem412_233.cpp
#include <iostream> #include <string> #include <set> #include <map> #include <cmath> #include <algorithm> #include <vector> #include <queue> using namespace std; #define fastInp cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); typedef long long ll; typedef long double ld; ll q; vector<ll> vec; int main() { ...
ALGO
0.999866
3.842904
2da16331-c8b8-4356-b73d-ba460dbd875f
CHENG-Yunfeng/Leetcode
week5/146.cpp
#include<iostream> #include<sstream> #include<vector> #include<unordered_map> using namespace std; // LRU缓存机制 struct DLinkedNode { int key, val; DLinkedNode* pre; DLinkedNode* next; DLinkedNode(): key(0), val(0), pre(nullptr), next(nullptr) {} DLinkedNode(int key, int val): key(key), val(val), pre...
ALGO
0.999385
5.365295
9d0592ad-c40e-4fa7-a325-71030e454faa
patryk-m-malinowski/piglar
src/world/generator/BottomUpRectPlacer.cpp
#include <algorithm> #include <utility> #include "BottomUpRectPlacer.h" #include "rectUtil.h" #include "../../util/lineUtil.h" #include "../../util/lineConsistencyCheck.h" struct MinimumAreaInfo { LinePtr minimumLine; std::optional<LinePtr> leftOfMinimum, rightOfMinimum; }; BottomUpRectPlacer::BottomUpRectP...
ALGO
0.998778
5.879511
7f649ed1-57fd-4068-b75c-252872be468f
KevinIsYi/100-Days-Of-Code
CP/Codeforces/Round #677 (Div. 3)/C.cpp
#include <bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() #define allr(x) x.rbegin(), x.rend() #define pb(x) push_back(x) #define mp(x, y) make_pair(x, y) template <typename T> T ceil(T a, T b) { return (a + b - 1) / b; } template <typename T> T gcd(T a, T b) { return b ? gcd(b, a % b) : a; ...
ALGO
0.999932
3.954458
21885e60-0fa4-4bcf-856f-a5573e14c615
geoffrey-anto/leetcode-solutions
3482-construct-string-with-minimum-cost/solution.cpp
class Node { private: int n = 26; public: Node* ref[26]; int prefix; int end; int val = INT_MAX; Node() { memset(ref, 0, sizeof(ref)); prefix = 0; end = 0; } bool contains(char a) { return (ref[a - 'a'] != nullptr); } void set(char a, N...
ALGO
0.999978
5.515571
91b303a0-f5e6-4a1f-9987-f15b4ea86cd8
za233/Polaris-Obfuscator
src/clang-tools-extra/clang-tidy/misc/NoRecursionCheck.cpp
#include "NoRecursionCheck.h" #include "clang/AST/ASTContext.h" #include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/Analysis/CallGraph.h" #include "llvm/ADT/DenseMapInfo.h" #include "llvm/ADT/SCCIterator.h" using namespace clang::ast_matchers; namespace clang::tidy::misc { namespace { /// Much like SmallS...
TOOL
0.969537
7.783171
39dddfe9-9f2b-488b-a215-0b206a2624a0
Ansh2077/Cohort-A
FAdd.cpp
#include<iostream> using namespace std; void add(int a,int b){ int sum = a+b; cout<<"Sum of 2 numbers is: "<<sum<<endl; } void add(int a, int b, int c){ int sum1 = a+b+c; cout<<"Sum of 3 numbers is: "<<sum1<<endl; } int main(){ int a,b,c,option; cout<<"Enter value of 3 numbers: "<<endl; cin>>a>>b>>c; cout<<"Do you wa...
ALGO
0.92047
3.64744
a6ab24ac-8b76-4a7c-8c9b-c94e69ffa8f1
nobleo/nobleo_odometry_calibration
src/offline.cpp
#include <dynamic_reconfigure/server.h> #include <gnuplot-iostream.h> #include <nav_msgs/Odometry.h> #include <nobleo_odometry_calibration/CalibratorConfig.h> #include <ros/console.h> #include <ros/init.h> #include <ros/node_handle.h> #include <tf2_msgs/TFMessage.h> #include <boost/algorithm/string/join.hpp> #include ...
DATA
0.938183
6.723123
19e0f495-4c2e-4f71-b04f-0d39172c8b2f
kidonm/advent-of-code
2022/7/A.cpp
#include <bits/stdc++.h> using namespace std; vector<string> input; unsigned int line = 0; long long ans = 0; unsigned int sz; long long walk() { long long curr = 0; int size; while (line < sz) { if (input[line][2] == 'l') // ls { line++; while (line < sz && in...
ALGO
0.981587
3.580627
495bf1e6-7b19-465b-bdda-686307471b6f
EthanKim8683/High-School-Competitive-Programming
Codeforces/Problemset/DP/1415c.cpp
#include<bits/stdc++.h> using namespace std; using I=int; using S=string; using Lli=long long int; const I N=1e5; const Lli MAX=1e18; I ps[N+1]; I main(){ cin.tie(0)->sync_with_stdio(0); I t;cin>>t; while(t--){ I n,p,k;cin>>n>>p>>k; S s;cin>>s; I x,y;cin>>x>>y; fill_n(ps,n+1,0); for(I i=0...
ALGO
0.999565
3.675039
fa7eb061-6f74-44ee-bb14-a319b962e49d
mandysingh150/LeetCode
2018-check-if-word-can-be-placed-in-crossword/2018-check-if-word-can-be-placed-in-crossword.cpp
class Solution { public: bool same(vector<char>& a, int si, int ei, string &s) { if(ei-si+1 != s.size()) return 0; int i; for(i=0 ; i<s.size() and (a[si+i]==' ' or a[si+i]==s[i]) ; ++i); if(i==s.size()) return 1; for(i=0 ; i<s.size() and (a[ei-i]==' ' ...
ALGO
0.999291
5.824415
ac80e2c6-50ce-4187-9d68-2dbf601a709c
Baibhab-Adhikari/Hackerrank-Solutions-CPP
pointer/solution.cpp
#include <stdio.h> #include <stdlib.h> void update(int *a, int *b) { // store a + b in temp to avoid altering value of a before the absolute difference calculation int temp = *a + *b; *b = abs(*a - *b); *a = temp; } int main() { int a, b; int *pa = &a, *pb = &b; scanf("%d %d", &a, &b); ...
ALGO
0.999937
3.786528
2132f343-829a-4f39-a0a4-7d4eefbaf6d1
albertopastormr/tais
2016-sept-3/main.cpp
// Alberto Pastor Moreno // TAIS22 #include <iostream> #include <iomanip> #include <fstream> #include <string> #include <algorithm> #include <vector> const int INF = 1000000000; std::pair<int,std::vector<int> > darts(std::vector<int> const & S, int D){ // calcula cuantos dardos hacen falta int n = S.size(), ...
ALGO
0.999747
3.397657
700affd5-ff9e-4020-9572-c465077959ac
somya1210/Leetcode-Grinding
pairs-of-songs-with-total-durations-divisible-by-60/pairs-of-songs-with-total-durations-divisible-by-60.cpp
class Solution { public: int numPairsDivisibleBy60(vector<int>& time) { // 20 -> 40 // 30 60-30=x 60+30 60+60 60+2*30 // 30 120 int ar[60]={0}; for(int i=0;i<time.size();i++) ar[time[i]%60]+=1; int ans=0; for(int i=1;i<=29;i++) ...
ALGO
0.999916
5.717203
05db1bfc-ae92-44b1-a95f-15cf93bd57a9
NitinVadadoriyaa/CodeForces
SumofOddIntegers_1100.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; using ll = long long; #define mod 1e9 + 7 //ctrl + space to run exsiting file. int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #else ...
ALGO
0.999753
4.235805
3f462a5f-95ae-4559-84df-c63b62d81a5f
CandyRoms-staging/external_libcxx
test/std/algorithms/alg.sorting/alg.sort/is.sorted/is_sorted_comp.pass.cpp
// <algorithm> // template<ForwardIterator Iter, StrictWeakOrder<auto, Iter::value_type> Compare> // requires CopyConstructible<Compare> // bool // is_sorted(Iter first, Iter last, Compare comp); #include <algorithm> #include <functional> #include <cassert> #include "test_iterators.h" #if TEST_STD_VER > 17 TE...
TEST
0.992894
6.890604
15d657d3-3d70-4817-a703-b97294d07062
yzzupgo/MFTCG
Data/abc127_a/melonattacker/wa/22177272.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int A, B; cin >> A >> B; if(A >= 13) { cout << B << endl; } else if(6 <= A <= 12) { cout << B/2 << endl; } else if(A <= 5) { cout << 0 << endl; } return 0; }
ALGO
0.999173
3.496403
b5855596-00c7-4f06-b01a-4a4814a9f2b8
kocanory/baekjoon
gold 4/14267.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <queue> using namespace std; int n, m; vector<int> dp; unordered_map<int, vector<int>> graph; void bfs(int x){ queue<int> q; q.push(x); while(!q.empty()){ int now = q.front(); q.pop(); for(auto &next : graph[now]) { ...
ALGO
0.999915
4.027315
b962e50c-5e3a-4b20-ac9f-b879af6a93a6
Luhaozhhhe/AcWing
语法基础课/第二讲 判断语句/code/670 动物/动物.cpp
#include<iostream> using namespace std; int main(){ string a,b,c; cin>>a>>b>>c; if(a=="vertebrado"){ if(b=="ave"){ if(c=="carnivoro"){ cout<<"aguia"<<endl; } else{ cout<<"pomba"<<endl; } } else{ ...
ALGO
0.978451
4.37409
e036ec3b-7545-453e-93cb-2e030ebaa196
azizbekjb/oop_cpp
8.12-masala.cpp
#include <iostream> #include<vector> using namespace std; template<class T> class Fermer { public: string *FISH; string *X_Nomi; T *hosil; friend float Foyda (Fermer& f); }; int main() { Fermer <double> f; string fish[10]; string x_nomi[10]; double hosil[10]; for(int i=0;i<5;i++) ...
ALGO
0.995381
4.00208
eba8ec30-b165-4002-a036-0c5e30b80a1a
Eqno/GPLT-ExerciseRecord
2016/simulation/10.cpp
#include <iostream> #include <vector> #include <queue> #include <unordered_map> using namespace std; vector<int> post, mid; unordered_map<int, int> ind; struct Node { int val; Node *left, *right; }; Node *build(int l, int r, int rid) { if (l > r) return nullptr; Node *node = new Node(); node->val = post[r...
ALGO
0.99995
4.121744
3d278bd1-84d5-4f61-987e-d3fab1d1d344
Nietzen/hacktoberfest2023
Program's_Contributed_By_Contributors/C++ Programs/Array/rotmatrix.cpp
#include<bits/stdc++.h> using namespace std; int main() { vector<vector<int>> matrix = {{1,2,3},{4,5,6},{7,8,9}}; for(int i =0;i<matrix.size();i++) { for(int j = 0;j<=i;j++) { swap(matrix[i][j],matrix[j][i]); } } for(int i=0;i<matrix.size();i++) { for(int j=0;j<matrix[0].size()/2;j++) { swap(matr...
ALGO
0.999983
3.776294
75f397fa-a332-4a7c-bd9a-bc31bda93808
ishandutta2007/codeforces
iandehaan/normal/935/A.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int out = 0; for (int i = 1; i < n; i++) { if (n%i == 0) out++; } cout << out << endl; }
ALGO
0.999726
5.33287
229ee326-b668-4f12-bee8-ce38b3653ff6
moutamarakshit/-6Companies30Days
day 6/MaxProductOfTwoPalindromicSubsequences.cpp
class Solution { public: int res = 0; bool isPalindrome(string& s) { int j = s.length() - 1, i = 0; while (i < j) { if (s[i] != s[j]) return false; i++, j--; } return true; } void dfs(int ind, string& s, string& s1, string& s2,...
ALGO
0.999955
5.87438
e22772a6-2ce7-4d99-9abd-51f86ae7b7bb
gopikiran22001/ADS
merge.cpp
#include<iostream> #include<vector> #include<cmath> using namespace std; void merge_imp(int a[],int i,int j,int mid) { int n1=mid-i+1; int n2=j-mid; vector<int> A(n1); vector<int> B(n2); for(int k=0;k<n1;k++) { A[k]=a[k+i]; } for(int k=0;k<n2;k++) { B[k]=a[mid+k+1]; ...
ALGO
0.999975
4.257052
0aa29865-7642-4e37-926d-a7ec531f13bb
unzela/Problem-solving
Array/5.Unique element in array.cpp
// https://leetcode.com/problems/single-number/ #include <iostream> #include <vector> using namespace std; int findUniqueNumber(int num, vector<int> arr) { cout << "Enter the numbers in array" << endl; for (int i = 0; i < num; i++) { cin >> arr[i]; } int ans = 0; for (auto val : arr) { ans = ans ^...
ALGO
0.998935
5.687501
0ca2f136-5efd-41f6-b1b8-901d2b4f7031
zain-ijaz/c-code
check string or integer.cpp
#include <iostream> using namespace std; //check if number or string bool check_number(string str) { for (int i = 0; i < str.length(); i++) if (isdigit(str[i]) == false) return false; return true; } int main() { string str = "sunidhi"; if (check_number(str)) cout<<str<< " is an integer"<<e...
TOOL
0.88175
3.919677
29a996d5-af78-4189-b4d5-5af67c2c91de
FedericoMazzone/openfhe-statistics
openfhe-development-1.1.2/benchmark/src/fft-ckks-encoding.cpp
#include "benchmark/benchmark.h" #include <random> using namespace lbcrypto; /** * GenerateRandNumberVector generates a vector of real values in the range (-1,1) * @param vecSize is number of elements in the returned vector * @return generated vector */ std::vector<std::complex<double>> GenerateRandNumberVector(s...
TEST
0.930879
5.849596
4cca9e4e-1f9b-481f-9f05-4d653c0aeaf2
shayestehsharifi/cp
p71.cpp
#include <iostream> using namespace std; main() { int m , n , j , k ; cout << " please enter two postive integer values : " ; cin >> m >> n ; k=1 ; for ( j = 1 ; j <= n ; j ++){ k = k *m ; } cout << " resault " << " : " << k ; }
ALGO
0.999955
3.677949
7b95d4e8-2763-47cd-9751-21c55e347dde
vaibhavpandey2012000/compatative-Programming
codechef/ddgdf.cpp
#include<bits/stdc++.h> using namespace std; map<char,int>mp; void fun() { mp['+']=1; mp['-']=1; mp['*']=1; mp['/']=1; mp['^']=1; mp['(']=0; } int main() { fun(); stack<char>st; string s,post=""; st.push('a'); st.push('b'); cout<<st.top()<<endl; }
ALGO
0.999958
3.75455
59002855-92b3-442a-9ae7-72572667df7d
rsln-s/aggregative-coarsening-for-multilevel-hypergraph-partitioning
packages/belos/epetra/example/BlockCG/BlockCGEpetraExFile.cpp
#include "EpetraExt_readEpetraLinearSystem.h" #include "Epetra_Map.h" #ifdef EPETRA_MPI #include "Epetra_MpiComm.h" #else #include "Epetra_SerialComm.h" #endif #include "Epetra_CrsMatrix.h" #include "Teuchos_CommandLineProcessor.hpp" #include "Teuchos_ParameterList.hpp" #include "Teuchos_StandardCatchMacros.hpp" ...
ALGO
0.971488
5.418488
a30f90ab-7eed-4de0-8a2c-d6ba28865fd0
ishandutta2007/codeforces
dottle/normal/1699/A.cpp
#include<bits/stdc++.h> #define int long long const int N=1000050; using namespace std; void solve(){ int n;cin>>n; if(n&1){ cout<<-1<<endl; }else{ cout<<(n/2^1)<<' '<<(n/2^1)<<' '<<1<<endl; } } main(){ ios::sync_with_stdio(false); int _T=1;cin>>_T; while(_T--)solve(); }
ALGO
0.999431
3.888316
024fe7c2-4339-462e-9f2a-8c9ad452d590
Daniel829363/Krossplatforma
Shashki/Grid.cpp
#include "stdafx.h" #include "Grid.h" Grid::Grid() {}; Grid::Grid(int row, int col) { init(row, col); }; VOID Grid::init(int row, int col) { grid.clear(); for (int i = 0; i < row; i++) { ROWSPAN row(col); grid.push_back(row); } } Grid::~Grid() {}; // ± ROWSPAN& Grid::operator [](int index) { return grid[inde...
ALGO
0.976843
3.879323
f65efc27-c525-4818-9390-3c64cd53d007
purinliang/PurinCodeforcesLibrary
数学_Mathematics/博弈论/SG函数_SGFunction.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; /** * sg[u] == 0 Bob(the second player) Win * sg[u] != 0 Alice(the first player) Win * * How to find sg[u]? If stage u can change into stage v using one operation, than stage v is one of * the next stages of stage u. sg[u] means "the smallest no...
ALGO
0.999971
4.740854
58c15592-97d4-44bd-9239-8def4f0bb362
DustinBaek/Projects
Resources/opencv_master/modules/imgproc/src/drawing.cpp
#include "precomp.hpp" namespace cv { enum { XY_SHIFT = 16, XY_ONE = 1 << XY_SHIFT, DRAWING_STORAGE_BLOCK = (1<<12) - 256 }; static const int MAX_THICKNESS = 32767; struct PolyEdge { PolyEdge() : y0(0), y1(0), x(0), dx(0), next(0) {} //PolyEdge(int _y0, int _y1, int _x, int _dx) : y0(_y0), y1(_y1), x(_x), d...
ALGO
0.981606
5.51507
a85f77ce-eb87-4210-bbee-6b3e069711d2
amansrv/DSA_BootCamp-2022
Recursion/SayDigit.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; void SayDigit(int num, string arr[]) { // base case if (num == 0) { return; } // calculation int digit = num % 10; num = num / 10; // relation SayDigit(num, arr); cout << arr[digit] << " "; } int main()...
ALGO
0.999529
5.61945
60d88a88-e9fa-46d3-8edb-6780cb7b9fd0
BetterOIer/competitive-cpp-code
Competition/Competition111/T7.cpp
/*================================================= * Le vent se lève, il faut tenter de vivre! * Author: Better_OIer Zyx * 起风了,唯有努力生存! * Blog: https://betteroier.site:1000 * FileStation: https://betteroier.site:1005 * OnlineJudge: http://betteroier.site:8888 =================================================*/ #include...
ALGO
0.999916
4.012498
ad126fa2-b4b1-4a9c-858e-cb82043802bf
Veljko28/cpp-data-algrtms
codeforces/37/TheFairNutAndElevator.cpp
#include<bits/stdc++.h> using namespace std; void TheFairNutAndElevator(){ int n; long long ans=0; cin>>n; int a; for(int i=0 ,j=0; i<n ;j+=2, i++){ cin>>a; ans+=a*(j+j); } cout<<ans<<'\n'; }
ALGO
0.999526
3.698897
ca117aa0-9fe5-4f81-81a8-a2528efa6dc4
mehedihasankanon/cp-code-archive
All_codes/579A.cpp
// Bismillahir Rahmanir Rahim // link : https://codeforces.com/contest/579/problem/A // status : AC #pragma GCC optimize("O1,O2,O3") #pragma GCC optimize("Ofast,unroll-loops") #include <bits/stdc++.h> // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma,bmi,bmi2,lzcnt") ...
ALGO
0.999978
4.662201
5677fec5-6514-4e19-bcc0-f043839d8653
ssarmin/neetcode_practice
n-th-tribonacci-number.cpp
//https://neetcode.io/problems/n-th-tribonacci-number class Solution { public: int tribonacci(int n) { if(n == 0) return 0; if(n < 3) return 1; int t_0 = 0; int t_1 = 1; int t_2 = 1; int val = 0; for(int i=3; i<=n; i++){ va...
ALGO
0.999967
6.277999
8d9a292d-2b42-46ef-946c-5e584ef32abc
Anuj2770/anuj
bubble.cpp
#include<iostream> using namespace std; int bubblesort(int arr[],int n){ for (int i = 0; i <n-1; i++) { for (int j = 0; j <n-i-1; j++) { if(arr[j]>arr[j+i]){ swap(arr[j],arr[j+1]); } } } } void printArray(int arr[],int n){ for (int i = 0; i <n; i++...
ALGO
0.999922
4.952076
c8cd59ce-02da-421f-b982-3768b10bedef
Xdydy/OJCode
leetcode/410/main.cpp
#include "c.h" int main () { Solution res; vector<int> v = {2,3,2}; res.countOfPairs(v); }
ALGO
0.999659
5.590792
e73d3e91-2da5-48a2-b69e-715cbcecc144
Geof23/Gklee
Gklee/lib/Core/StatsTracker.cpp
#include "Common.h" #include "StatsTracker.h" #include "klee/ExecutionState.h" #include "klee/Statistics.h" #include "klee/Config/Version.h" #include "klee/Internal/Module/InstructionInfoTable.h" #include "klee/Internal/Module/KModule.h" #include "klee/Internal/Module/KInstruction.h" #include "klee/Internal/Support/M...
TOOL
0.896015
7.256254
81f3ff28-b67b-499d-82ac-679828abcbf8
gauravsingh2k21/Code
111-minimum-depth-of-binary-tree/111-minimum-depth-of-binary-tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.99995
6.727876
ab0e9e32-0e2d-4cec-b68b-95c209a7ec7d
raincross7/code-similarity
codes/train_code/problem200/problem200_275.cpp
#include <bits/stdc++.h> #include <cstdlib> #include <cmath> #include <algorithm> using namespace std; using ll = long long; using P = pair<int,int>; using Graph= vector<vector<int>>; #define rep(i,n) for(ll i=0;i<n;i++) #define rep2(i,n,m) for(ll i=n;i<=m;i++) #define rep3(i,n,m) for(ll i=n;i>=m;i--) #define pb push...
ALGO
0.999992
3.808268
1cf04e6d-4de4-41b6-a06c-1bdaccc6c9e7
ishandutta2007/codeforces
waterfalls/normal/605/D.cpp
#include <bits/stdc++.h> using namespace std; struct Point { int a,b,c,d,i; bool operator<(Point o) const { if (c!=o.c) return c<o.c; return i<o.i; } }; vector<Point> pt; int dist[100013]; struct comp { bool operator() (const int a, const int b) const { if (pt[a].d==pt[b].d) return pt[a].i<pt[b].i; return ...
ALGO
0.999993
3.764719
19c1c893-ca16-4265-bcd6-bd536d934aa6
Xilinx/llvm-aie
libcxx/src/ryu/d2fixed.cpp
// Avoid formatting to keep the changes with the original code minimal. // clang-format off #include <__assert> #include <__config> #include <charconv> #include <cstring> #include "include/ryu/common.h" #include "include/ryu/d2fixed.h" #include "include/ryu/d2fixed_full_table.h" #include "include/ryu/d2s.h" #include ...
ALGO
0.890888
4.43766
3f50da66-788c-4927-a61f-aaf74a226f8e
ProjectLGD/genetic-algo
main.cpp
#define EXIT_OK 0 #define EXIT_ERR 1 #include <stdint.h> #include <stdlib.h> #include <time.h> #include <iostream> #include "include/DNA.hpp" #include "include/Population.hpp" #include "include/Vec3.h" #include "Rocket.h" using namespace std; unsigned int max_x = 10; unsigned int max_y = 10; vector<Rocket> generat...
ALGO
0.998036
4.905447
a08d5576-3f23-49cf-8e30-a9251881a196
aditiiilaturkar/DSA_-
34-Find-First-and-Last-Position-of-Element-in-Sorted-Array.cpp
class Solution { public: int binarySearch(vector<int>& nums, int target, int i, int j, bool toLeft) { int ind = -1; while(i<=j){ int mid = i+(j-i)/2; if(nums[mid] == target){ ind = mid; if(toLeft){ j=mid-1; ...
ALGO
0.999986
6.475296
395e5e75-b49d-4998-b729-8fd04631b611
jpradas1/Introduction_HPC
06_Threads/06_stl_parallel.cpp
#include <iostream> #include <algorithm> #include <numeric> #include <vector> #include <execution> #include <chrono> int main() { const long ARRAY_SIZE = 400000000; std::vector<double> myArray(ARRAY_SIZE); std::iota(myArray.begin(), myArray.end(), 0); // fill array with 0, 1, 2, ..., ARRAY_SIZE-1 // s...
ALGO
0.999817
6.981574
ce54f838-02cb-4825-a9e5-fb2ddd5d2f09
jinbooooom/coding-for-algorithms
LeetCode/324-摆动排序2/main324.cpp
class Solution { public: void wiggleSort(vector<int>& nums) { sort(nums.begin(), nums.end(), comp); int mid = nums.size() / 2; // 将 nums 分成小的第一部分 nums[mid:] 和较大的第二部分 nums[:mid] vector<int> part1(nums.begin() + mid, nums.end()); vector<int> part2(nums.begin(), nums.begin() + m...
ALGO
0.999998
5.300343
b8d90587-8fd8-4758-a522-6593c2c2737d
TacticalMeow/SnakeGame
igl/copyleft/cgal/incircle.cpp
#include "incircle.h" #include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> template<typename Scalar> IGL_INLINE short igl::copyleft::cgal::incircle( const Scalar *pa, const Scalar *pb, const Scalar *pc, const Scalar *pd) { typed...
ALGO
0.997373
5.908986
c1c45bf8-d938-4194-b52a-bd49255805cc
jlecoeur/Sithare
lib/opensmile/include_opensmile/vectorPreemphasis.cpp
/* openSMILE component: pre-emphasis per frame (simplification, however, this is the way HTK does it... so for compatibility... here you go) (use before window function is applied!) */ #include <vectorPreemphasis.hpp> #define MODULE "cVectorPreemphasis" SMILECOMPONENT_STATICS(cVectorPreemphasis) SMILECOMPONENT_...
TOOL
0.983106
5.134942
18caf8a7-a278-4f3c-b713-71ff4b1c8984
Shell-Wataru/AtCoder
ABC/ABC174/D.cpp
#include <iostream> #include <algorithm> #include <vector> #include <deque> #include <queue> #include <set> #include <map> #include <limits> #include <cmath> #include <iomanip> #include <functional> #include <random> #include <boost/multiprecision/cpp_int.hpp> using namespace std; using ll = long long; namespace mp = ...
ALGO
0.999872
4.069632
6d6fde94-a1e6-4e1e-ae75-d77e933f9c57
ishandutta2007/codeforces
arturgo/normal/1510/I.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); srand(time(NULL)); int nbExperts, nbRounds; cin >> nbExperts >> nbRounds; vector<int> gains(nbExperts, 0); int melScore = 0, monScore = 0; long double eta = sqrt(20 * log(nbExper...
ALGO
0.999841
3.935827
8fe332ba-3891-4afa-9f7a-8ac7ca2deb8e
heavenMOJANG/ICPC
.history/操作系统实验/线程同步源代码_20241122213955.cpp
#include <windows.h> #include <iostream> using namespace std; HANDLE hThread1; //子线程1的句柄 HANDLE hThread2;//子线程2的句柄 HANDLE hHandle = NULL; //主线程子线程通信信号量 HANDLE hHandle1 = NULL; //信号量1的句柄,全局变量 HANDLE hHandle2 = NULL; //信号量2的句柄,全局变量 DWORD WINAPI producer(LPVOID lpParam) //生产者线程 { for(int i = 0; i < 10; ...
ALGO
0.974844
3.650924
556c2660-c1d6-4a89-83da-f6375c7b7032
wissem18/CP-Solutions
CodeForces/699B | One Bomb/191029603.cpp
#include "bits/stdc++.h" using namespace std; #define ll long long #define pi pair<int,int> #define pll pair<ll,ll> const char nl = '\n'; //double const pi= 3.141592653; int dx[] = {0, 0, -1, 1}; int dy[] = {-1, 1, 0, 0}; const int MOD = 1e9 + 7; int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0)...
ALGO
0.999909
3.725577
00309228-f5d1-4edc-963a-3557e0e1e22e
Ahmed-Rafi-1/DSA
Basic/Pattern/pattern-1.cpp
/* **** **** **** **** */ #include<iostream> using namespace std; int main() { int row, col, n; cin >> row >> col; for(int i=1; i<=row; i++) { for(int j=1; j<=col; j++) { cout << "*" ; } cout << endl; } }
ALGO
0.999417
3.837653
aff31d1e-01b0-4fac-a6de-f3dd562177d3
gregorburger/SAGA-GIS
src/modules_terrain_analysis/terrain_analysis/ta_preprocessor/Pit_Router.cpp
//--------------------------------------------------------- /////////////////////////////////////////////////////////// // // // // // // /////////////////////////////////////////////////////////// //--------------------------------------------------------- #include "Pit_Rout...
ALGO
0.970532
3.568375