uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
bc0e69a3-2ce3-4dcb-b55a-08a3af807766
YanWQ-monad/monad
Cpp/Exam-answer/smoj.nhedu.net/1811.cpp
// 1811.cpp #include <cstdio> const int MAXN = 1010; const int MAXX = 2005; struct NODE { int x, y; } node[MAXN]; int n, ans=0; bool exist[MAXX*2][MAXX*2]; int main() { freopen("1811.in" , "r", stdin ); freopen("1811.out", "w", stdout); while (scanf("%d", &n), n>0) { ans = 0; for (int i=0; i<n; i++) { s...
ALGO
0.999518
3.909217
e9bb6575-a51e-40db-bc25-1a29a7ef439d
phuochogit/Oop
LTHDT-03-LapTrinhHDTVoiC++-BaiTap/Bai5/main.cpp
#include <iostream> using namespace std; class phanso { private: int tu,mau; public: void nhap(); int laytu(); int laymau(); phanso phansolonnhat(phanso, phanso); void xuat(); }; int main() { phanso a, b, lonnhat; a.nhap(); b.nhap(); lonnhat = lonnhat.phansolonnhat(a,b); lon...
ALGO
0.983388
4.035953
9da2ea99-fd30-495b-9ff7-5ebd22684272
shoaibrayeen/Programmers-Community
Data Structure/Array Or Vector/Find The Smallest Missing Number/SolutionByAnuj.cpp
#include <iostream> using namespace std; int smallest_missing(int arr[], int n, int m) { int count = 0; for (int i = 0; i < n; i++) { if (arr[i] == count) { count++; } else { break; } } return count; } int main() { // your code goes here int n...
ALGO
0.999976
4.17052
9d8d7af6-ec4c-4fff-b740-a41de57b00af
ishandutta2007/codeforces
275307894a/normal/1436/C.cpp
#include<cstdio> #define mod 1000000007 using namespace std; int n,m,k,x,y,z,l,r,mid; long long ans=1,pus,tot; int main(){ int i; scanf("%d%d%d",&n,&m,&k); pus=m-1;tot=n-m; l=0;r=n; while(l<r){ mid=(l+r)>>1; if(mid<k) l=mid+1,ans=ans*pus%mod,pus--; else if(mid==k) l=mid+1; else r=mid,ans=ans*tot%mod,tot--;...
ALGO
0.999996
3.80442
33e5d603-074d-4f57-bd29-e6831eecb4f1
noblesseoblige6/Algorithms
AoJ/CGL/Circles/CrossPointCircles/CrossPointCircles.cpp
#include <bits/stdc++.h> using namespace std; class vec2{ public: double x; double y; vec2():x(0.0), y(0.0){}; vec2(double val):x(val), y(val){}; vec2(double x, double y):x(x), y(y){}; ~vec2(){}; vec2 operator=(vec2); vec2 operator+(vec2); vec2 operator-(vec2); vec2 operator*...
ALGO
0.99974
3.305003
93a125fa-a47f-426a-a297-6ea083529bc4
kattia-ss/desafio-simu
Simu/AStarpathfinder.cpp
#include "AStarPathfinder.h" #include <cmath> #include <algorithm> using namespace std; // Heurstica mejorada para hexgonos float heuristic(int r1, int c1, int r2, int c2) { // Convertir coordenadas de hexgono a coordenadas cbicas para mejor clculo // Esta es una aproximacin ms precisa para hexgonos float...
ALGO
0.999898
5.586581
61b84f2b-1663-46d0-af01-67ca6b71033f
ishandutta2007/codeforces
rainair/normal/456/B.cpp
#include <bits/stdc++.h> #define fi first #define se second #define db double #define U unsigned #define P std::pair<int,int> #define LL long long #define pb push_back #define MP std::make_pair #define all(x) x.begin(),x.end() #define CLR(i,a) memset(i,a,sizeof(i)) #define FOR(i,a,b) for(int i = a;i <= b;++i) #define ...
ALGO
0.999914
3.923996
651d83d2-eccf-411a-b793-a489e99aec54
boms03/codetree-TILs
240123/정수 사각형 최댓값의 최소/minimax-path-in-square.cpp
#include <iostream> using namespace std; int main() { int dp[100][100]; int map[100][100]; int n; cin >> n; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin >> map[i][j]; } } dp[0][0]=map[0][0]; for(int i=1;i<n;i++){ dp[i][0] = max(dp[i-1][0],map[i][0]...
ALGO
0.999865
4.31173
1e84b8aa-a274-4df1-94e8-ad2a6a184141
ishandutta2007/codeforces
xylofo/normal/500/B.cpp
#include <map> #include <set> #include <stack> #include <queue> #include <cmath> #include <cstdio> #include <string> #include <vector> #include <climits> #include <sstream> #include <cstdlib> #include <fstream> #include <iostream> #include <algorithm> using namespace std; #define FOR(it,st,en) for(int it=(st);it<(int)(...
ALGO
0.999981
3.281349
4e41e724-af27-4f39-a56c-9652ef9574e2
Jer6y/tos_tlib
TLIB_KEIL/TOS_KERNEL_PRJ_KEIL/Drivers/CMSIS/NN/Examples/IAR/iar_nn_examples/NN-example-gru/arm_nnexamples_gru.cpp
/** * @ingroup groupExamples */ /** * @defgroup GRUExample Gated Recurrent Unit Example * * \par Description: * \par * Demonstrates a gated recurrent unit (GRU) example with the use of fully-connected, * Tanh/Sigmoid activation functions. * * \par Model definition: * \par * GRU is a type of recurrent neura...
ALGO
0.934693
7.471897
d4fdf7a3-9f96-40eb-b61f-f4f455018f1e
cristianrosiu/tudelft-cg
practical4/framework/third_party/catch2/src/catch2/benchmark/detail/catch_stats.cpp
#include <catch2/benchmark/detail/catch_stats.hpp> #include <catch2/internal/catch_compiler_capabilities.hpp> #include <cassert> #include <iterator> #include <random> #if defined(CATCH_CONFIG_USE_ASYNC) #include <future> #endif namespace { using Catch::Benchmark::Detail::sample; template <typename URng, type...
ALGO
0.95732
6.700745
ec8ec6ac-4efd-4e45-bf60-3e4277ea5073
LuvKobe/StudyCode-2023
Code_04_22/时间复杂度5.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include <iostream> using namespace std; //void calc(int n) //{ // int sum = 0; //执行1次 // for(int i = 1; i <= n; ++i) //执行(判断)n+1次 // { // sum = sum + i; //执行n次 // } // cout << sum << endl; //执行1次 //} //void calc2(int n) //{ // int...
ALGO
0.997715
3.833642
89f4b0dd-761d-4041-9176-016654556626
arundeegutla/Programming-Team
Practices/2022/Summer/300Set/p068.cpp
#include <bits/stdc++.h> using namespace std; #define long long long void solve() { int n; cin>>n; vector<long> arr(n); for(auto& x: arr) cin >> x; vector<long> s(n+1); vector<long> t(n+1); for(int i = 0; i<n; i++){ s[i+1] = s[i] + arr[i]; t[i+1] = t[i] + (arr[i]*arr[i]); }...
ALGO
0.999842
3.091885
17a4e0b9-a70e-4015-8b40-7d27514d64d0
allwellll/cf_code_jiangly
1620/1620G-G-SubsequencesGalore.cpp
// url:https://codeforces.com/contest/1620/problem/G // time:2021-12-18 18:48:32 // name:G-SubsequencesGalore #include <bits/stdc++.h> constexpr int P = 998244353; using i64 = long long; // assume -P <= x < 2P int norm(int x) { if (x < 0) { x += P; } if (x >= P) { x -= P; } return ...
ALGO
0.999976
4.73333
c0e02c9e-6ce1-4ef1-b2fc-09f1c12a4534
meem-5971/XPSC_Practice
Week 5 Day 6/C_Minimize_the_Thickness.cpp
//prefix sum #include<bits/stdc++.h> #define ll long long using namespace std; bool binSearch(int a[],int n,int x){ int l=0; int r=n; while(l<=r){ int mid=l+(r-l)/2; if(mid==x){ return true; } if (x < a[mid]) { r = mid - 1; } ...
ALGO
0.999571
5.019776
3f40f2e0-6a89-4ee4-b022-951a8e9b7b4f
palilo815/ps
baekjoon/1000/1545.cpp
#include <bits/stdc++.h> using namespace std; int cnt[26]; char must_use(int N) { int max_i = 0; for (int i = 1; i < 26; ++i) if (cnt[i] > cnt[max_i]) max_i = i; return (cnt[max_i] >= (N + 1) / 2 ? max_i + 'a' : '\n'); } int main() { string s; cin >> s; sort(s.begin(), s.end()); for (ch...
ALGO
0.999962
4.377415
80ee0634-6f70-466b-b029-ca8ce910dd48
2021-dev/8888888
src/gausskernel/dbmind/db4ai/executor/algorithms/kmeans.cpp
#include <random> #include "nodes/execnodes.h" #include "nodes/pg_list.h" #include "postgres_ext.h" #include "db4ai/kmeans.h" #include "db4ai/aifuncs.h" #include "db4ai/fp_ops.h" #include "db4ai/distance_functions.h" #include "db4ai/model_warehouse.h" #include "db4ai/predict_by.h" #include "db4ai/db4ai_cpu.h" #includ...
ALGO
0.999825
5.443706
1941de58-af3d-4699-aa71-9447ed8aacf3
VaibhavFanClub/CPP
lab 1/factorial.cpp
#include<iostream> using namespace std; int main(){ int fact = 1, n; cout<<"Enter n: "; cin>>n; for(int i = 2; i <= n; i++) fact *= i; cout<<"factorial = "<<fact<<endl; return 0; }
ALGO
0.999137
3.650917
73ba745e-6ec1-4faa-a399-b6106cfd6e7b
mahabub5090/Various_Online_Judge_Problem_Solutions
TLE_Eliminators_CP_31_Sheet/900/D_Balanced_Round.cpp
// Problem Link: https://codeforces.com/contest/1850/problem/D /* ************************************************************** *Bis'Millah Hir Rah'Manir Rahim == start with the name of \n * * ALLAH Subhana Tayala * * Author: Md. Mahabubar Rahman * *...
ALGO
0.999704
4.227057
d7d96739-3992-4178-bc67-6602369fedb1
wien0128/problem-solve
BaekJoon/18290_NM과K(1)_Backtracking.cpp
#include <iostream> #include <vector> #include <algorithm> #include <climits> using namespace std; // NM과K(1) 18290 BruteForce, Backtraking // 역시 어렵다... using Matrix = vector<vector<int>>; using Visited = vector<vector<bool>>; constexpr pair<int, int> directions[4] = { {-1, 0}, // 상 {1, 0}, // 하 ...
ALGO
0.999884
5.547505
a362f6d1-ab7d-46a2-a582-07550a30f199
kyeokabe/crackingCodingInterview
code/LeetCode/24_SwapNodesInPairs.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ // forgot to pass reference of pointer first time... // class Solution { public: ListNode* swapPairs(ListNode* head) { if (head==nullptr) ...
ALGO
0.999989
5.616976
847cd9fc-ee03-4fb3-b4e0-4f9d6ffd78ee
chengjizhao/JNU-Cplusplus-labs
lab7/2021102147/Matrix/main.cpp
#include "Matrix.h" #include <iostream> #include <vector> using std::cout; using std::endl; int main() { Matrix m1({ {1, 2}, {3, 4}, {5, 6} }); Matrix m2({ {1, 2, 3}, {4, 5, 6} }); Matrix m3(3, 3); Matrix m4({ {1, 2, 3}, {4, 5, 6}, {7, 8, 9} }); Matrix m5(3, 3); // * m3 = m1 * m2; cout...
ALGO
0.924284
4.000169
1b727ee9-a405-438e-abcf-fcaf191fe8ed
apple-open-source/developer-tools
ld64/src/other/ObjectDump.cpp
#include <sys/types.h> #include <sys/stat.h> #include <sys/mman.h> #include <fcntl.h> #include <mach-o/nlist.h> #include <mach-o/stab.h> #include <mach-o/fat.h> #include <mach-o/loader.h> #include "MachOFileAbstraction.hpp" #include "parsers/macho_relocatable_file.h" #include "parsers/lto_file.h" const ld::VersionSet...
TOOL
0.865627
5.462907
9df7c1e2-f910-4d07-a3ec-4c28a99e514f
Kumar3200/Flutter
weather_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.998724
6.76073
2add7141-eaae-4f2e-97b1-bab00d1cb92b
Anuragmaurya-code/Data-Structures
09_Linked_list/17_deleting_from_circular_linked_list.cpp
#include<iostream> #include<stdlib.h> using namespace std; class Node{ public: int data; Node *next; }; class CircularLinkedList{ private: Node *Head; public: CircularLinkedList(){Head=NULL;} CircularLinkedList(int A[],int n); Node * getHead(){return Head;} void disp...
ALGO
0.999935
3.918602
7035744b-0fb3-4c8f-a67b-56947831797c
Srinjoy100/GFG160b
Array/3.ReverseArray.cpp
class Solution { public: void reverseArray(vector<int> &arr) { // code here int n = arr.size(); int i=0; int j=n-1; while(i<=j) { swap(arr[i],arr[j]); i++; j--; } } };
ALGO
0.99967
5.923277
59341431-47e9-4729-9ba1-8a7009008d6b
LeePenn/Competitive-Programming
Information-Olympia-One-Book-Through/example8-7.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1000004; int n, m, k; int x[N], y[N], d[N], c[N]; int *a[N]; int main() { scanf("%d%d%d", &n, &m, &k); for (int i = 1; i <= k; i++) { scanf("%d%d%d", &x[i], &y[i], &d[i]); c[y[i]]++; } for (int i = 1; i <= m; i++) { ...
ALGO
0.999993
3.555187
9596c27f-0c81-4003-a497-229c1b8662a1
masudranam/dsa_problems
Codeforces/E_Explosions.cpp
#include<bits/stdc++.h> using namespace std; #define print(a) for(auto x:a)cout<<x<<' ';cout<<'\n'; #define debug(x) cout<<#x<<" "<<x<<'\n' #define int long long int const int M = 1e9 + 7; const int N = 2e5 + 10; int get(int x){ return x * (x + 1) / 2; } int get(int len , int sum, int x){ int res = get(x...
ALGO
0.999852
3.517436
0a65049f-fea2-409b-9dd9-29035174562b
VietNguyenDang/BTVN-Part-2
29.cpp
#include<iostream> using namespace std; int UCLN(int a,int b) { if(b==0) return a; return UCLN(b,a%b); } int main() { int a,b; cin>>a>>b; cout<<UCLN(a,b); }
ALGO
0.999781
4.436352
a492a9e3-2691-4743-92b2-dd4dfadcd9ef
dwdjjj/BOJ
BinarySearch 2/BAEKJOON_2805_나무자르기/BAEKJOON_2805_나무자르기/main.cpp
#include <vector> #include <iostream> #include <algorithm> typedef long long ll; using namespace std; int n, m; vector<int> v; bool is_possible(ll mid) { ll sum = 0; for (int i=0; i<n; i++) { if (mid < v[i]) { sum += v[i] - mid; } } if (sum >= m) return true; else return ...
ALGO
0.999998
5.088809
b743ce3c-b32f-4060-ad2f-4135fd4df52d
junlong-gao/recreations
src/code_practise/hackerrank/count_pairs/main.cpp
#include <map> #include <set> #include <unordered_set> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <bitset> #include <cstdio> #include <limits> #include <vector> #include <cstdlib> #include <numeric> #include <sstream> #include <iostream> #include <algor...
ALGO
0.998685
4.238367
81e7bcb3-2d28-431e-a743-26b6ced707a8
bgravesteijn/MOOC-pred-analytics-shiny-app
renv/library/R-4.0/x86_64-w64-mingw32/Rcpp/examples/ConvolveBenchmarks/convolve10_cpp.cpp
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*- // this version expands convolve8_cpp by making Vec mimic the structure of // NumericVector. It peforms well, so this is is not the structure of // NumericVector that is the problem. So what is it then ? // // could it be because NumericVector is...
ALGO
0.988321
6.108499
989eab1a-3de8-47d2-826d-a46b7a3ac118
ayushD123/LeetCode
0134-gas-station/0134-gas-station.cpp
class Solution { public: int canCompleteCircuit(vector<int>& gas, vector<int>& cost) { int totalgas=0,totalcost=0; for(auto it:gas){ totalgas+=it; } for(auto it:cost){ totalcost+=it; } if(totalgas<totalcost){ return -1; } ...
ALGO
0.999996
5.793571
9e3d43b9-4458-48e5-b070-aa4b96771bd9
scyllacore/algorithm
C++ 풀이/programmers/Level2/달리기 경주.cpp
#include <string> #include <vector> #include <unordered_map> #include <algorithm> using namespace std; vector<string> solution(vector<string> players, vector<string> callings) { unordered_map<string, int> playerMap; for (int i = 0; i < players.size(); i++) { playerMap[players[i]] = i; } for...
ALGO
0.999985
5.785836
48584f0b-4fe0-42f6-a639-cc7b23a41d32
Anashikforu/LeetCode-DSA
1319-number-of-operations-to-make-network-connected/1319-number-of-operations-to-make-network-connected.cpp
class Solution { public: void dfs(unordered_map<int,vector<int>> &adj,vector<bool> &visited,int curr){ visited[curr] = true; for(auto i:adj[curr]){ if(visited[i] == false){ dfs(adj,visited,i); } } } int makeConnected(int...
ALGO
0.999796
5.788971
43a01b1d-23ff-496f-b482-2159a10fe58d
nmd1406/DSA
TN05009.cpp
#include<bits/stdc++.h> using namespace std; int n, m, e; bool stop{false}; vector<vector<int>> edges; bool isVisited[1005]; int trace[1005]; void DFS(int u, int par) { if(stop) return; isVisited[u] = true; for(auto v : edges[u]) { if(!isVisited[v]) { tra...
ALGO
0.999987
4.495439
bd43873a-6899-440a-b05f-1534126c38ee
rakimh46/Pepcoding
Foundation/lec04/octalsub.cpp
#include<iostream> using namespace std; int octalsub(int n1,int n2){ int ans=0; int pow=1; while(n1!=0, n2!=0) { int rem1=n1%10; n1/=10; int rem2=n2%10; n2/=10; int rem=(rem1+8)-rem2; ans=ans+rem*pow; pow=10*pow; ...
ALGO
0.999857
3.965764
44127a4c-a037-4b07-b314-d32484a62fa2
Funik69/cpp-code
longest_repeating_subsequence.cpp
#include <bits/stdc++.h> using namespace std; int static dp[1000][1000]; int lcs(string &x, string &y,int n, int m){ if(n==0 || m==0){return 0;} if(dp[n][m]!=-1){ return dp[n][m]; } if(x[n-1]==y[m-1] && n!=m){//here just add restriction n!=m to lcs code return dp[n][m]= 1+lcs(x,y,n-1,m-1...
ALGO
0.999991
4.883045
42a4bf8a-9af2-4257-9508-9971268703d8
Krish9220/cpp
STL_by_lovebubbar.cpp/STL_priority_queue.cpp
#include<iostream> #include<queue> using namespace std; int main() { // max heap priority_queue<int>maxi; // always print the high element on the top... // mini heap priority_queue<int,vector<int>,greater<int> >mini;// always print the low element in the top... maxi.push(1); maxi.push(3); ...
ALGO
0.997697
3.990793
aaa8d6ed-8db9-4be6-9f02-4e554f2cbca6
OpenCalib/JointCalib
3rdparty/eigen3/doc/examples/Tutorial_ArrayClass_interop_matrix.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { MatrixXf m(2,2); MatrixXf n(2,2); MatrixXf result(2,2); m << 1,2, 3,4; n << 5,6, 7,8; result = m * n; cout << "-- Matrix m*n: --" << endl << result << endl << endl; result = m.array() * ...
ALGO
0.998891
4.306757
8a0e37d4-67b8-4b29-9360-27407626b434
shobhit162/DSA-Questions
1531-string-compression-ii/1531-string-compression-ii.cpp
class Solution { public: int dp[101][101]; int dfs(string &s, int left, int K) { int k = K; if(s.size() - left <= k) return 0; if(dp[left][k] >= 0) return dp[left][k]; int res = k ? dfs(s, left + 1, k - 1) : 10000, c = 1; for(int i = left + 1; i <= s.size(); ++i) { ...
ALGO
0.999856
5.258648
231d816d-eb06-458a-bd6c-7e0ea8f4758d
aaryan182/C_CODES
Questions/q1.cpp
// Write a C++ program to find the sum of two numbers entered by the user. #include <bits/stdc++.h> using namespace std; int main() { int n1,n2 , sum=0; cin>>n1>>n2; cout<<"sum of entered nunmber "<<n1<<" & "<<n2<<" is: "<<n1+n2<<endl; return 0; }
ALGO
0.968005
4.262392
b655444a-f217-4543-a6be-82de794f11fb
thisisnotahuman/FullySNNforLeggedRobots
RMA/quadruped-robot-master/model-control/quadruped/extern/qpOASES/examples/example2.cpp
/** * \file examples/example2.cpp * \author Hans Joachim Ferreau (thanks to Boris Houska) * \version 3.2 * \date 2008-2017 * * Very simple example for testing qpOASES in combination * with the SolutionAnalysis class. */ #include <qpOASES.hpp> /** Example for qpOASES main function using the SolutionAnalysis c...
ALGO
0.936947
6.499225
e9ebb6ba-b34c-42aa-a102-aff829d62305
rafneves/openbsdsrc
gnu/llvm/tools/lldb/tools/debugserver/source/MacOSX/DarwinLog/DarwinLogCollector.cpp
#include "DarwinLogCollector.h" #include "ActivityStreamSPI.h" #include <dlfcn.h> #include <cinttypes> #include <mutex> #include <vector> #include "DNB.h" #include "DNBLog.h" #include "DarwinLogTypes.h" #include "LogFilterChain.h" #include "LogFilterExactMatch.h" #include "LogFilterRegex.h" #include "LogMessageOsLog...
TOOL
0.879501
3.760229
5f40064d-4190-46ca-9f9e-fcae5d25b5b8
gajgeospatial/boost_1_86_0
libs/yap/perf/code_gen_samples.cpp
template<typename T> using term = boost::yap::terminal<boost::yap::expression, T>; namespace yap = boost::yap; namespace bh = boost::hana; namespace user { struct number { double value; friend number operator+(number lhs, number rhs) { return number{lhs.value + rhs.value}...
TOOL
0.949831
7.27844
c4ca0fc6-49e8-462d-867e-75da3440c9b2
wslee/popl21_artifacts
euphony/thirdparty/z3/src/util/lp/binary_heap_upair_queue_instances.cpp
#include "util/lp/binary_heap_upair_queue.hpp" namespace lp { template binary_heap_upair_queue<int>::binary_heap_upair_queue(unsigned int); template binary_heap_upair_queue<unsigned int>::binary_heap_upair_queue(unsigned int); template unsigned binary_heap_upair_queue<int>::dequeue_available_spot(); template unsigned b...
ALGO
0.89871
5.457993
5e39fcaa-5871-406a-ada7-603598f4679d
ccd97/cp_solutions
codeforces/0-976/DIV2-A/263A.cpp
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]){ int tmp; int x, y; for(int i=0; i<5; i++){ for(int j=0; j<5; j++){ cin>>tmp; if(tmp == 1) { x=i, y=j; } } } int ans = abs(x-2) + abs(y-2); cout<<ans<<endl; return 0...
ALGO
0.998759
3.36553
2f324555-ce50-43ee-aa33-4c953e8a5eb4
k7official/Kickstart
Round C 2022/new_password.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int T; cin >> T; int i = 0; //unordered_set<char> special = {'#', '@', '*', '&'}; while(i<T){ int N; string old, ans; cin >> N; cin >> old; ans = old; bool uppercase = false; ...
ALGO
0.99932
3.735003
319c99f5-93bb-49a5-9fca-b6c16f1ec565
modfun/CPlusPlus_primer
ex6_7.cpp
#include <iostream> #include <string> #include <iterator> #include <cstddef> using std::cout; using std::cin; using std::endl; using std::getline; using std::string; using std::begin; using std::end; /** * seq - return a sequence * * Description: Gives a Sequence of how many ways called. * Return: number of calls...
ALGO
0.988995
5.320642
19a853ea-dfc6-4816-ad50-e1ead53b5380
ishandutta2007/codeforces
natsugiri/normal/1555/A.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #pragma GCC optimize("unroll-loops") #include<stdio.h> #include<iostream> #include<vector> #include<algorithm> #include<string> #include<string.h> #ifdef LOCAL #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define NDEBUG #define eprintf(...) do {} while...
ALGO
0.994791
3.996547
fe875e88-a3cb-4961-a2ce-35d1f6256fd0
gineshidalgo99/caffeCompilerForWindowsAndCUDA
caffe/src/caffe/layers/argmax_layer.cpp
#include <algorithm> #include <functional> #include <utility> #include <vector> #include "caffe/layers/argmax_layer.hpp" namespace caffe { template <typename Dtype> void ArgMaxLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { const ArgMaxParameter& argmax_param =...
DATA
0.934327
6.640243
a3108ecc-559d-406e-b76c-048b7b7bca5a
WaykiChain/wicc-wasm-cdt
wasm_llvm/lib/CodeGen/ShrinkWrap.cpp
#include "llvm/ADT/BitVector.h" #include "llvm/ADT/PostOrderIterator.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/CFG.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineBlockFrequencyInfo.h" #include "llvm/CodeGen/...
ALGO
0.997727
7.099072
158faf44-8fb2-4d15-9858-155fb92d3868
dharmendrapoondla123/192110749L
14.m.add numbers by call reference.cpp
#include <stdio.h> int addTwoNumbers(int *, int *); int main() { int fno, sno, sum; printf("\n\n Pointer : Add two numbers using call by reference:\n"); printf("-------------------------------------------------------\n"); printf(" Input the first number : "); scanf("%ld", &fno); printf(" I...
ALGO
0.994597
5.059597
a90e078f-f507-4500-85c1-2afba9693234
kakitgogogo/leetcode
30.cpp
class Solution { public: vector<int> findSubstring(string s, vector<string>& words) { vector<int>res; if(words.empty()) return res; int n = words.size(), m = words[0].size(), ssize = s.size(), id = 0; map<string, int>wordMap; for(auto &x:words) { if(wordMap.find(x) == wordMap.end()) { wordMap[x] ...
ALGO
0.999953
5.842946
ae91b96e-8815-4364-80a4-eaa9ec5dc830
ActuallySam/6companies30days
Milestone 5 - Intuit/Question 13.cpp
#include <bits/stdc++.h> using namespace std; #define MOD 1e9 #define vec vector<int> #define pp pair<int,int> /* link : https://leetcode.com/problems/minimum-swaps-to-arrange-a-binary-grid/ */ int minSwaps(vector<vector<int>>& grid) { int n = grid.size() ; vector<int> zeroes(n,0) ; for...
ALGO
0.999964
5.202225
14e90729-391e-478d-bd48-2708e0912f58
soura07/365-Days-of-Leetcode-Question-Solving-Challenge
2685-first-completely-painted-row-or-column/first-completely-painted-row-or-column.cpp
class Solution { public: int firstCompleteIndex(vector<int>& arr, vector<vector<int>>& mat) { int n = mat.size(); int m = mat[0].size(); map<int, int> mp; for (int i = 0; i < arr.size(); i++) { mp[arr[i]] = i; } int miniR = INT_MAX; for (int i = ...
ALGO
0.999974
5.930856
a6f9d47b-23ed-4c98-b0e9-93b9ab681eeb
akshita1204/StriverSheetChallenge
Array/Medium/6.cpp
//https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ /* class Solution { public: int maxProfit(vector<int>& prices) { int n=prices.size(); int profit=0; int mini=prices[0]; for(int i=1;i<n;i++) { if(prices[i]>mini) profit=max(profit,prices[i]-mini); els...
ALGO
0.998782
6.012604
49569620-84b8-41c7-a288-549fc3497db5
isha-dwivedi/lab5
lab5q2.cpp
//library #include<iostream> using namespace std; int main() { //declare the variables int a; //ask the user for values cout<<"enter the no. to be compared"<<endl; cin>>a; //check if no. is negative, positive or zero if(a<0) cout<<"the no. is negative"; else if(a>0) cout<<"the no. is positive"; else cout<<"the no. is e...
ALGO
0.998182
3.111281
1605fb26-ccab-4797-8f3a-0d94e38c94a0
opensourcec-inc/data-structures-
Problems/03 Problems on STL/Warm Reception.cpp
/* Warm Reception There is only one beauty parlour in the town CodingNinjasLand. The receptionist at the beauty parlor is flooded with appointment requests because the “Hakori” festival is round the corner and everyone wants to look good on it. She needs your help. The problem is they don’t have chairs in reception. T...
ALGO
0.999836
4.877719
af1293c2-02a8-4582-bf68-b2d0429b24e6
hoangpc0112/cpp-ptit
CPP0741.cpp
#include <bits/stdc++.h> #define MAX 10000001 #define ll long long #define fastsync() \ ios_base::sync_with_stdio(0); \ cin.tie(NULL); \ cout.tie(NULL); const int mod = 1e9 + 7; using namespace std; ll powmod(ll x, ll y, ll p) { ll res = 1; while (y) { if (y & ...
ALGO
0.999938
5.230937
a6728808-ba58-4e24-a1c5-61546382a82d
naoyat/topcoder
fileedit/2009/NimForK.cpp
// BEGIN CUT HERE /* // PROBLEM STATEMENT // The game of NimForK is played as follows. There are k players sitting in a circle numbered 1 through k in clockwise order. Starting with player 1, the players take turns making moves in clockwise order. In the center of the circle, there is a pile that initially contains...
ALGO
0.999683
4.440017
f7893dbd-580e-431e-9c9b-7ea1dfb6ad1a
mickem/nscp
include/client/simple_client.cpp
#include <client/simple_client.hpp> #include <nscapi/nscapi_helper_singleton.hpp> #include <nscapi/nscapi_protobuf_settings.hpp> #include <nscapi/nscapi_protobuf_metrics.hpp> #include <nscapi/nscapi_protobuf_command.hpp> #include <nscapi/nscapi_protobuf_functions.hpp> #include <nscapi/nscapi_protobuf_settings_function...
TOOL
0.859703
6.490382
7ae22cb7-b015-42c3-8a6f-e2d7d4cf31af
lxiao217/study428
深度学习/源码/OpenCV/opencv/samples/cpp/tutorial_code/video/bg_sub.cpp
/** * @file bg_sub.cpp * @brief Background subtraction tutorial sample code * @author Domenico D. Bloisi */ #include <iostream> #include <sstream> #include <opencv2/imgcodecs.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/videoio.hpp> #include <opencv2/highgui.hpp> #include <opencv2/video.hpp> using namesp...
ALGO
0.858187
6.199591
ff7d08e8-0f05-4c6b-aa21-c7fe32dc65bd
qt/qtquick3dphysics
src/3rdparty/PhysX/source/geomutils/src/contact/GuContactBoxBox.cpp
#include "geomutils/GuContactBuffer.h" #include "GuContactMethodImpl.h" #include "GuGeometryUnion.h" #include "CmMatrix34.h" #include "PsUtilities.h" using namespace physx; using namespace Gu; #define MAX_NB_CTCS 8 + 12*5 + 6*4 #define ABS_GREATER(x, y) (PxAbs(x) > (y)) #define ABS_SMALLER_EQUAL(x, y) (PxAbs(x) ...
ALGO
0.997504
6.314338
989fc1b7-c6c9-4c77-b97c-5983dff700ce
C-B-U/algorithm_challenge
시즌1/상/tnsgh9603/0510_7_tnsgh9603.cpp
#include <bits/stdc++.h> #define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std; vector<int> v[20001]; int check[20001]; bool visited[20001]; void dfs(int n, int temp) { visited[n] = 1; check[n] = temp; temp *= -1; for (int m: v[n]) { if (!visited[m]) { ...
ALGO
0.999964
4.723257
1fbe303c-c9b3-4a31-a645-cfe98ca5eee1
shubhamSrivas/callSimulationInNetworks
panEuropeanTopology/panEuropeanTopologyWdsp.cpp
#include <iostream> #include <stdlib.h> #include <vector> #include <queue> #include <iomanip> #include <limits> #include <time.h> #include <math.h> #include <cmath> #include <list> #include <climits> #include<numeric> #include <tuple> using namespace std; //define a weighted edge as pair of destination and weight(dir...
ALGO
0.999484
3.478271
45d3a131-3573-4bbc-af32-46bec4c169b8
hzhuay/MyAlgorithmCodes
Cpp归档/汉诺塔.cpp
#include<iostream> using namespace std; void tower(int n,char L,char M,char R){ if(n==1){ cout<<L<<"->"<<R<<endl; return; } tower(n-1,L,R,M); tower(1,L,M,R); tower(n-1,M,L,R); } int main(){ int n; cin>>n; tower(n,'A','B','C'); return 0; }
ALGO
0.999956
4.057648
96245f58-a67b-4264-9088-b2fe0a176ba9
Murad501/Phitron
Semester 2/Course 1/Module 4 (Assignment)/Get_Prefix_Sum.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } long long int preSum[n]; preSum[0] = arr[0]; for (int i = 1; i < n; i++) { preSum[i] = preSum[i - 1] + arr[i]; } rev...
ALGO
0.999968
4.479328
5398a580-b2af-492d-a40d-7f3751c959cb
lanl/Ethon
3rd_party/kokkos/example/build_cmake_installed/cmake_example.cpp
#include <Kokkos_Core.hpp> #include <cstdio> extern "C" void print_fortran_(); struct CountFunctor { KOKKOS_FUNCTION void operator()(const long i, long& lcount) const { lcount += (i % 2) == 0; } }; int main(int argc, char* argv[]) { Kokkos::initialize(argc, argv); Kokkos::DefaultExecutionSpace::print_con...
ALGO
0.995655
6.884604
ad0293a9-2ed2-44a7-b447-853db8e0d54e
Codetesing/BOJ_CPP
Step9/EX9-4.cpp
#include <iostream> #include <cstring> using namespace std; int main() { int M, N; cin >> M >> N; bool* arr = new bool[N + 1]; //memset(arr, true, sizeof(arr)); arr[0] = false; arr[1] = false; for (int i = 2; i <= N; i++) arr[i] = true; for (int i = 2; i * i <= N; i++) if (arr[i]) for (int j = 2;...
ALGO
0.999949
3.359128
a3604d36-c3e0-4032-adb4-9c60d54deb9c
Robin329/CPlusPlusThings
learn_algorithms/leetcode/algorithms/cpp/formArrayByConcatenatingSubarraysOfAnotherArray/FormArrayByConcatenatingSubarraysOfAnotherArray.cpp
// Source : // https://leetcode.com/problems/form-array-by-concatenating-subarrays-of-another-array/ // Author : Hao Chen // Date : 2021-03-27 /***************************************************************************************************** * * You are given a 2D integer array groups of length n. You are also...
ALGO
0.999945
6.585839
89de6509-2386-47ac-9331-53ba9760175d
Nasim0008/Number-Theory
seive_of_segmented.cpp
#include <bits/stdc++.h> using namespace std; vector<int> seive(int n) { bool prime[n + 3]; for (int i = 0; i <= n; i++) { prime[i] = true; } for (int i = 3; i * i <= n; i += 2) { if (prime[i] == true) { for (int j = 3 * i; j <= n; j += (2 * i)) { ...
ALGO
0.999908
3.519467
d1da456d-2e62-495b-98de-386f379c8d36
JuhisVain/Pipeclone
src/pathfinder.cpp
#include "pathfinder.hpp" #include "controller.hpp" extern Controller *ctrl; Pathfinder::Pathfinder() :timer(), timer_th(timer.Create_thread()) { } void Pathfinder::Start_timer() { timer.Start(); } void Timer::Start() { running = true; std::cout << "get level" << std::endl; Level &current_level = ctrl...
TOOL
0.951759
3.553889
b512a8cf-c210-4bc0-b911-259a1da9b25f
ishandutta2007/codeforces
davoth/normal/806/D.cpp
#include <bits/stdc++.h> #pragma GCC optimize("Ofast,unroll-loops") /*#pragma comment(linker, "/stack:200000000") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma,tune=native")*/ /*#pragma GCC optimize("O2") #pragma GCC optimize("unroll-loops") #pragma GCC target("avx,avx2,sse,sse2,fma")*/ using...
ALGO
0.999929
3.520478
f2ed0aa9-db37-4b22-8691-b027665196a4
lxb1226/leetcode_cpp
hot100/question22.cpp
#include <bits/stdc++.h> #include "../templates/data_struct.h" using namespace std; class Solution { public: vector<string> res; string curr; void backtrack(int open, int close, int n){ if(open == n && close == n){ res.push_back(curr); return; } if(open > n...
ALGO
0.999566
5.509007
ef197070-90d0-4687-9d2f-bfc386672869
ishandutta2007/codeforces
alyaly/normal/1342/D.cpp
#include<bits/stdc++.h> #include<vector> #define int long long using namespace std; int n,K,a[200001],b[200001],sz[200001],psz; vector<int> ve[200001]; signed main(){ cin>>n>>K; for(int i=1;i<=n;i++) cin>>a[i]; for(int i=1;i<=K;i++) cin>>b[i]; sort(a+1,a+n+1); for(int i=n;i>=1;i--){ if(psz==0){ sz[++psz]--; ...
ALGO
0.999951
3.265757
3878e266-ceec-4931-96f9-2ba2d10b0388
ishandutta2007/codeforces
eecs/normal/1586/F.cpp
#include <bits/stdc++.h> using namespace std; int n, K, ans; int main() { scanf("%d %d", &n, &K); int x = n - 1; while (x) x /= K, ans++; printf("%d\n", ans); for (int i = 1; i <= n; i++) { for (int j = i + 1; j <= n; j++) { int x = i - 1, y = j - 1, t = 0; while (x...
ALGO
0.999935
3.634419
da50687b-ee01-44d8-925e-8d3f61b1be6c
virendrakabra14/P2P-Network
solved/p5/tc5_0/files/client4/Downloaded/temp2.cpp
#include <bits/stdc++.h> using namespace std; bool check(int x1, int x2, int x3, int y1, int y2, int y3) { return ((y2-y1)*(x3-x2)==(y3-y2)*(x2-x1)); } int main() { int n; cin >> n; int ans = n; vector<int> x(n), y(n); for(int i=0; i<n; i++) cin >> x[i] >> y[i]; for(int i=0; i<n; i++) { if( check(x[i], x[(i...
ALGO
0.999989
4.554453
796ecd22-51a7-4839-a745-64b86af7faa8
yangmingchaoyang/C-Data-Structure-and-Algorithm
low/day4/Code02_ReverseList.cpp
/* 反转单向和双向链表 【题目】 分别实现反转单向链表和反转双向链表的函数 【要求】 如果链表长度为N,时间复杂度要求为O(N),额外空间复杂度要求为 O(1) */ #include <iostream> using namespace std; //默认析构函数是一个空函数体的析构函数,不需要手动编写,编译器会自动为你生成。 //由于Node类没有使用new关键字进行内存分配,因此默认的析构函数就足够了。 class Node{ public: int value; Node* next; Node(int data):value(data){}; }; class DoubleNode{ pu...
ALGO
0.999292
4.627903
726f1580-ae5a-4927-8965-b2f9b0983145
evialbert/LeetCode
738-monotone-increasing-digits/monotone-increasing-digits.cpp
class Solution { public: int monotoneIncreasingDigits(int n) { string ag=to_string(n); int i=1; while(i<ag.size() && ag[i]>=ag[i-1]){ i++; } while(i>0 && i<ag.size() && ag[i-1]>ag[i]){ ag[i-1]--; i--; } for(int j=i+1;j<ag.si...
ALGO
0.999972
6.726388
7388d465-42b3-414e-a566-a3ea4976c25e
saktheeswaranswan/leetcode-monk-version-big-examples
unique-paths-ii/unique-paths-ii.cpp
class Solution { public: int uniquePathsWithObstacles(vector<vector<int>>& grid) { int n=grid.size(); int m=grid[0].size(); long long t[n][m]; memset(t,0,sizeof(t)); if(grid[n-1][m-1]==1) return 0; t[n-1][m-1]=1; for(int i=n-2;i>=0;i--){ ...
ALGO
0.999797
6.098305
4e0351ca-8868-4282-893a-ce7689cc9ad8
tianbiandeshenghuo/OI-Code
CodeForces/cf1857/C_Assembly_via_Minimums.cpp
#include<bits/stdc++.h> using namespace std; const int MAXN = 1e6 + 5; int t, n, m, a[MAXN]; void Solve(){ cin >> n; int x = n * (n - 1) / 2; int maxx = -1, cnt = 0; for (int i = 1; i <= x; i++){ cin >> a[i]; if (a[i] == maxx){ cnt++, maxx = a[i]; }else if (a[i] > maxx){ cnt = 1, maxx =...
ALGO
0.999953
4.267702
aa26472d-181c-45ec-9603-8619103aa85a
khemendra08/CPP-Practice
test/first8.cpp
//calculate volume of a cylinder #include<iostream> using namespace std; int main(){ float r,h,v; cout<<"Enter r,h"; cin>>r>>h; v = 3.14*r*r*h; cout<<"Volume is "<<v<<endl; return 0; }
ALGO
0.977711
3.440751
678bd7a2-e654-40bd-b250-ca7ab1179890
khimzd/TranKhacKhiem_C
Programming Challenges chapter 12/12.6.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; void searchAndDisplayOccurrences(const string& filename, const string& searchString) { ifstream file(filename); if (!file) { cout << "Error opening file." << endl; return; } string line; int lineCount = ...
TOOL
0.873721
6.114043
e535c6e2-2dff-4d7a-a978-891cb5893d0e
chunyuema/leetcode
q1575/q1575.cpp
#include <vector> using namespace std; class Solution { public: int countRoutes(vector<int> &locations, int start, int finish, int fuel) { vector<vector<int>> memo(locations.size(), vector<int>(fuel + 1, -1)); return dpHelper(locations, start, finish, fuel, memo); } private: int dpHelp...
ALGO
0.99997
5.616901
a5c87f66-114f-4ec4-8397-1fc116b7aa05
RAB-community/ramadan
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
b9a3ec1d-880c-4c5f-a083-99dde406d812
ldw3097/Algorithm_study
baekjoon_22.01/310-16928-뱀과사다리게임.cpp
#include<bits/stdc++.h> using namespace std; int N, M; array<int, 101> dp; map<int, int> ladderYX; map<int,int> snakeXY; void checkone(int index){ int dicemin = 987654321; for(int i =1; i<=6; ++i){ dicemin = min(dicemin, dp[index-i]); } ++dicemin; if(ladderYX.count(index)){ dicemin = min(dicemin, dp[...
ALGO
0.999967
4.461258
7c95d141-dacd-40a0-b98d-d3cf4ee743bb
AABHINAAV/Codes
CompetitiveProgramming/BinarySearch/Minimum_maximum_on_a_path.cpp
// Problem Link - https://codeforces.com/edu/course/2/lesson/6/3/practice/contest/285083/problem/D /* By Arpit */ #include<bits/stdc++.h> #define ll long long int #define mod 1000000007 #define inf 1e18 #define pb push_back #define pii pair<int, int > #define piv pair<int, vector<i...
ALGO
0.999993
4.263472
7b7f2fed-2057-4833-8ba9-a656038af6ea
Kohnyusha/PMS
lab4-5/lab4/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.997175
6.76073
f55fbfbf-3c85-4328-bf72-3bd00d554ee2
bioshiki/LeetCode
0300-0399/350.cpp
class Solution { public: vector<int> intersect(vector<int>& nums1, vector<int>& nums2) { int size1=nums1.size(); int size2=nums2.size(); vector<int> r; if(size1==0||size2==0) return r; map<int,int> m; //in order to save same memory if(size1<=size2){ ...
ALGO
0.99999
5.32338
ece414a3-6978-428f-9225-6915f91b8323
CelesteOvO/PAT
test4.cpp
//通过递归遍历树的方式统计每个层级的叶子节点数。 // 使用一个二维向量 tree 来表示树的结构,每个节点的子节点存储在 tree 中对应的位置。 // 在统计过程中,将每个层级的叶子节点数存储在 levels 向量中。 #include <iostream> #include <vector> using namespace std; vector<int> levels; // 递归遍历树,统计每个层级的叶子节点数 void countLeafNodes(vector<vector<int>>& tree, int node, int level) { if (tree[node].empty()) { // ...
ALGO
0.999958
5.44451
acf3d695-b526-4263-a90d-c213d6f26319
hwh12322/HUST-Data-Structure-Experiment
CS2106_U202115512_洪炜豪/MyCode/Data Structure/Experiment 3/BiTree.cpp
#include<stdio.h> #include<malloc.h> #include<stdlib.h> #include<string.h> #include <stack> #include <iostream> using namespace std; //1 a 2 b 0 null 0 null 3 c 4 d 0 null 0 null 5 e 0 null 0 null -1 null //1 a 2 b 0 null 0 null 3 c 4 d 0 null 0 null 3 e 0 null 0 null -1 null //1 a 2 b 0 null 3 c 4 d 0 null ...
ALGO
0.999312
3.055162
41f5c5aa-f1f9-4bf3-9519-ca2f9954e8a9
ithsarasak/Programming
Compettitive programming/Codecube/1 Normal/00139 B - Hacker (Small).cpp
#include<bits/stdc++.h> using namespace std; int n, m; int main() { scanf("%d %d",&n,&m); int pr[n+10][m+10], mark[n+10]; memset(pr,0,sizeof pr); memset(mark,0,sizeof mark); for( int i = 0 ; i < n ; i++ ){ for( int j = 0 ; j < m ; j++ ){ scanf("%d",&pr[i][j]); } ...
ALGO
0.999996
3.750902
5d6e1fd2-73be-485b-a292-003b9a78f623
Rayhan-Ahmed108/competetive-programming
forbidden.cpp
#include <bits/stdc++.h> #define ll long long int using namespace std; int main() { int t; cin >> t; while (t--) { ll a, b, c, d, temp = 0, temp1; cin >> a >> b >> c >> d; if (c * 2 <= d) { cout << ((a + b) * c) << '\n'; } else if (d * 2 <= ...
ALGO
0.999854
4.396725
a4704a0c-4cef-4498-9cb3-eb7ea2a097f4
elsioneto1/SpaceShootersz
Engine/prog50016.GameEngine/mersenne.cpp
#include "Core.h" #include "randomc.h" #include "time.h" CRandomMersenne Random = CRandomMersenne(time(NULL)); void CRandomMersenne::Init0(int seed) { // Seed generator const uint32_t factor = 1812433253UL; mt[0] = seed; for (mti = 1; mti < MERS_N; mti++) { mt[mti] = (factor * (mt[mti - 1] ^ (mt[mti - 1] >> 30...
ALGO
0.997155
5.858607
0b3d6ca3-067f-4a4d-a2d8-a869c7440588
vishalz55/cpp--practice1
25pract.cpp
#include<iostream> using namespace std; // correct code read it // cd "c:\Users\DELL\Desktop\array practice jan\" ; if ($?) { g++ 25pract.cpp -o 25pract } ; if ($?) { .\25pract } // eveen array // 2 // 4 // 6 // 8 // 10 // 0 // 0 // odd array // 3 // 5 // 9 // PS C:\Users\D...
ALGO
0.998436
4.23885
d58678a7-edb9-4932-ac45-8495dd1f5d0e
ishandutta2007/codeforces
ae04071/normal/1037/A.cpp
#include <cstdio> #include <algorithm> #include <utility> using namespace std; int main() { int n,c=0; scanf("%d",&n); while(n) c++,n>>=1; printf("%d\n",c); return 0; }
ALGO
0.999888
4.095345
9d92e89f-3d01-4f88-aec0-da329747e212
rohankumardubey/Open3D
cpp/open3d/ml/tensorflow/pointnet/InterpolateOps.cpp
#include "tensorflow/core/framework/common_shape_fns.h" #include "tensorflow/core/framework/op.h" #include "tensorflow/core/framework/op_kernel.h" #include "tensorflow/core/framework/shape_inference.h" using namespace tensorflow; REGISTER_OP("Open3DThreeNN") .Input("query_pts: float32") .Input("data_p...
DATA
0.875248
7.511773
3f3748f4-cecd-46ef-95c6-ed1e64b1ac55
Balvantkushwaha/DSASeriesByShradhaDidi
Lecture4Patterns/L4Q16.cpp
#include <iostream> using namespace std; int main(){ int n; cout<<"enter the n pattern "; cin>>n; // top pattern for(int i=0;i<n;i++){ // start for(int j=0;j<i+1;j++){ cout<<"*"; } //space for(int j=0;j<2*(n-i-1);j++){ cout<<" "; } for(int...
ALGO
0.999781
4.00205
63f80911-2333-4bf9-8cee-453c5da476aa
siraj/ArmoryDB
cppForSwig/cryptopp/modes.cpp
// modes.cpp - written and placed in the public domain by Wei Dai #include "pch.h" #ifndef CRYPTOPP_IMPORTS #include "modes.h" #ifndef NDEBUG #include "des.h" #endif NAMESPACE_BEGIN(CryptoPP) #ifndef NDEBUG void Modes_TestInstantiations() { CFB_Mode<DES>::Encryption m0; CFB_Mode<DES>::Decryption m1; OFB_Mode<D...
ALGO
0.943922
7.642922