uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
8321e09a-c599-49cc-8fba-003ba5dcc58a
ixray-team/ixray-1.5-stcs
sdk/sources/MagicSoftware/FreeMagic/Source/Containment3D/MgcCont3DCircleSphereScribe.cpp
#include "MgcCont3DCircleSphereScribe.h" #include "MgcLinearSystem.h" using namespace Mgc; static const Real gs_fTolerance = 1e-06f; //---------------------------------------------------------------------------- bool Mgc::Circumscribe (const Vector3& rkV0, const Vector3& rkV1, const Vector3& rkV2, Circle3& rkCirc...
ALGO
0.995975
6.026311
eddbd040-fba1-4aa1-aabe-d2c497b9f0c0
devhasibulislam/CodeForces-online-judge
...rest/1592A-GamerHemose.cpp
#include <cstdio> int main(){ long t; scanf("%ld", &t); while(t--){ long n, H; scanf("%ld %ld", &n, &H); long x(0), y(0); for(long p = 0; p < n; p++){ long a; scanf("%ld", &a); if(a >= x){y = x; x = a;} else if(a >= y){y = a;} } long...
ALGO
0.998919
3.624693
342fbc4a-014d-4d11-9060-36c64c40855d
arsh317/Data-stuctures-and-Algo
Dynamic programming/Ways to Decode.cpp
/* Ways to Decode A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded message containing digits, determine the total number of ways to decode it. */ int Solution::numDecodings(string A) { if(A[0]=='0'){ return 0; } ...
ALGO
0.999971
5.365314
7e3148c9-896a-4b99-b121-055ae640b158
sarvex/leetcode-wren
solution/0400-0499/0445.Add Two Numbers II/Solution.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* addTwoNumbe...
ALGO
0.999969
6.324573
dcb93e21-6102-49bf-aa34-74ff0107d99f
sobhanbera/codes
ccCNOTE.cpp
/*\ |*| @coder : sobhan-bera |*| @code_time : 2022-05-17 16:52 |*| @github : https://github.com/sobhanbera \*/ #include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for(int i = a; i < b; ++i) #define REV(i, a, b) for(int i = a; i >= b; --i) #define FORL(i, a, b) for(long long i = a; i < b; ++i) #d...
ALGO
0.999551
3.988511
aa07f5c9-bd92-4242-8784-b93cd97aaf47
mdjehidalam/DSA_Using_CPP
Linked_List/lec-101_linkedList.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node *next; Node(int data) { this->data=data; next=NULL; } }; int main() { //create object statically Node n1(1); Node n2(2); n1.next=&n2; system("cls"); cout<<n1.data<<" "<<n2.data<<en...
ALGO
0.964387
3.516624
c3fa8b7e-78cc-487e-ac1f-c444ddafe040
DM-09/cpp-practice
programmers/Day10/qr code.cpp
#include <string> #include <vector> using namespace std; string solution(int q, int r, string code) { string answer = ""; for (int i = 0; i < code.length(); i++) { if (i % q == r) {answer += code[i];} } return answer; }
ALGO
0.999784
3.602122
79c8bf1e-8103-4994-b197-5cdb06e5da50
luckyking5215/c-code-1
4.10.cpp
#include <iostream> #include <math.h> // use if math.h laberery using namespace std; // Problem: Calculate the distance between two points using their coordinates. int main(){ int d, x1, x2, y1, y2; cout << "Enter the value of x1" << endl; cin >> x1; // get value of x1 cout << "Enter the value of x2" << endl;...
ALGO
0.993578
3.386725
62b9a1b3-c49c-4283-9e35-4d744d35aead
YuriBrag/INF110
trab2/seriesInfPiWallis.cpp
#include <iostream> #include <iomanip> #include <cmath> using namespace std; int main() { int i, n, j; long double pi, produto; cin >> n; produto = 1; if (n%2 ==0) { for (i = 2; n >= i; i += 2) { produto *= (long double)(i * i)/((i-1) * (i+1)); } } else { ...
ALGO
0.999826
4.072832
04dc2bcd-2c1e-4b19-8694-3ccf5c5af724
denismaua/kpu-pp
src/trie.cpp
/** Interface for the TrieSet class */ #include "trieset.h" namespace msp { /** Searchs for element of a given key. */ unsigned TrieSet::count(std::vector<double>& key) { Node n = _root; for (double d: key) { if (!n->children.count(d)) return 0; n = n->children[d]; } return 1; ...
ALGO
0.999384
5.395813
58b7b811-7862-4c62-8e7f-2c009e13cf66
awais1019/PFlab6
task7.cpp
#include<iostream> #include<windows.h> #include<cmath> using namespace std; float checkprice(string,string,int); main() { string city,product; int number; cout<<"Enter product name:"; cin>>product; cout<<"Enter city name:"; cin>>city; cout<<"Enter number:"; cin>>number; float result=checkprice(product...
TOOL
0.889744
3.986582
0485f1bc-4f4c-40ac-93b2-b0cc6996ee88
ArthurLeandro/grafos
Question 01/Grafo direcionado não ponderado/DirectionalNonWeghtedGraph.cpp
#include <iostream> #include <cstdlib> #include <list> #include "../Data/Graph.cpp" #include "../Data/DirectionalEdge.cpp" /** * Esta classe representa um grafo direcionado não ponderado * Esta classe herda da classe {Graph} */ template <class T> class DirectionalNonWeightedGraph : public Graph { public: Directi...
ALGO
0.892009
3.385846
52f514ba-da6d-4604-ab90-4d9a642b7c98
Alex0021/EPFL_MATH_458
solutions/chapter-09/AbstractOdeSolver.cpp
/* * AbstractOdeSolver.cpp * * Created on: Oct 25, 2012 * Author: rpopescu */ #include "AbstractOdeSolver.hpp" AbstractOdeSolver::AbstractOdeSolver() : stepSize(), initialTime(), finalTime(), initialValue(), f_rhs(0) {} AbstractOdeSolver::~AbstractOdeSolver() {} void AbstractOdeSolver::SetStepSize(co...
ALGO
0.99665
6.35312
b476f404-59d1-41f0-b101-9d8ef0d95d79
fawdlstty/DuiLib_Faw
DuiLib/Utils/Utils.cpp
#include "StdAfx.h" #include "Utils.h" namespace DuiLib { /*void RECT::Join (const RECT& rc) { left = min (left, rc.left); top = min (top, rc.top); right = max (right, rc.right); bottom = max (bottom, rc.bottom); }*/ //void RECT::ResetOffset () { // ::OffsetRect (this, -left, -top); //} //void RECT::No...
TOOL
0.944193
4.035198
3271b601-5d1b-4649-8d09-3fc943253f38
UriahNegbi/nural_network
Source.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> class Perceptron { private: int inputSize; std::vector<float> weights; float bias; float learningRate; public: Perceptron(int inputSize, float learningRate) : inputSize(inputSize), learningRate(learningRate) { initWeightsAndBias(); }...
ALGO
0.994139
6.425464
7addc1e1-9ba9-4fbb-a244-3556ef98ec38
SalihErenYzb/Daily-LeetCode
952-word-subsets/word-subsets.cpp
class Solution { public: vector<string> wordSubsets(vector<string>& words1, vector<string>& words2) { vector<int> curr(30,0); vector<int> maxes(30,0); for (string str: words2){ vector<int> curr(30,0); for (char c: str){ curr[c-'a']++; i...
ALGO
0.999928
5.837343
46647838-a154-44b0-88d4-0243b4aeeb9f
Ujjwal2017099/leet-code
2470-number-of-subarrays-with-lcm-equal-to-k/2470-number-of-subarrays-with-lcm-equal-to-k.cpp
class Solution { public: int subarrayLCM(vector<int>& nums, int k) { int cnt = 0; if(nums.size()==1 and k==nums[0]) return 1; for (int i = 0; i < nums.size(); i++){ unsigned long long p = nums[i]; for(int j=i+1;j<nums.size();j++){ long long x = nums[j]...
ALGO
0.999945
5.125382
fe99f1d7-f324-487a-b8d5-11ee40a55d32
Rion1127/KamataEngion0711
math/Matrix4.cpp
#include "Vector3.h" #include "Matrix4.h" Vector3 transform(const Vector3& v, const Matrix4& m) { Vector3 vec3{}; vec3.x = (v.x * m.m[0][0]) + (v.y * m.m[1][0]) + (v.z * m.m[2][0]); vec3.y = (v.x * m.m[0][1]) + (v.y * m.m[1][1]) + (v.z * m.m[2][1]); vec3.z = (v.x * m.m[0][2]) + (v.y * m.m[1][2]) + (v....
ALGO
0.986795
5.918216
c6204d4b-913f-4589-88bb-cd22f16b74c7
Sahilsharma-ss/LeetCode
0889-construct-binary-tree-from-preorder-and-postorder-traversal/0889-construct-binary-tree-from-preorder-and-postorder-traversal.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.999976
5.908772
c916d238-1c39-4862-957c-f762f46463a4
smallsoft-rus/decoder-pack
config/config.cpp
#include <stdlib.h> #include <stdio.h> #include <windows.h> #define STRSAFE_NO_DEPRECATE #include <strsafe.h> #include <dshow.h> #include "config.h" //global CODEC_INFO CodecTable[MAX_CODECS_IN_TABLE]={0}; UINT CountCodecs=0; const TCHAR CodecsRegKey[]=L"Software\\SmallSoft\\Codecs\\"; extern HWND hMainWnd; void GetF...
TOOL
0.951109
3.560421
e7e78368-5fb1-439f-9877-ebee55ec5605
noureldin-khaled/workspace
C++/Codeforces/Fancy Fence.cpp
#include<iostream> #include<string> #include<cstring> #include<sstream> #include<string.h> #include<algorithm> #include<cmath> #include<cstdlib> #include<vector> #include<stdlib.h> #include<set> #include<stdio.h> using namespace std; int main() { set<int> angles; for(int n = 3; n <= 360; n++) { if (36...
ALGO
0.999532
4.056524
cb2073e0-2edf-42ca-b2e0-e2897afc47ff
MadhavaReddy3511/Advanced-Algorithms
(5)Dynamic Programming.cpp
#include <iostream> #include <vector> #include <string> std::string longestCommonSubstring(const std::string& s1, const std::string& s2) { int n = s1.length(); int m = s2.length(); std::vector<std::vector<int>> dp(n+1, std::vector<int>(m+1, 0)); int maxLength = 0; int endIndex = 0; std::cout <...
ALGO
0.999605
5.370663
9c269bbd-84d2-4dda-bd8e-2b51b364cb13
thegamer1907/Code_Analysis
scrape/data/Organized/nekit2305/nekit2305_TLE.cpp
#include <bits/stdc++.h> #define pb push_back #define fi first #define se second #define vii vector<int> #define ll long long using namespace std; int main(){ ll k,n,m; cin>>n>>m>>k; vector<ll> v(m); for(int i = 0; i < m; i++){ cin>>v[i]; } int cnt = 0; ll ind = 0; ll mn = 0; ll die = 0; while(cnt<m){ ...
ALGO
0.999947
3.270553
9663cc60-f36e-4f4e-ad5a-c58fcd356112
AlpaThummar/popmenu_drawer
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.99887
6.783439
fd7e421f-15e1-4335-93c7-bb75915a998a
Sanjamkour19/C-programs
lambdafunc6.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { vector<int>numbers={1,3,4,6,7,8}; //using find_if with a lambda to find the first even number auto it=find_if(numbers.begin(),numbers.end(),[](int n){ return n%2==0; }); if(it!=numbers.end()){ ...
ALGO
0.995752
4.717703
cb2189a8-f6cb-4906-91b1-7c2f1ffc7e3f
mixbytes/haya_algys_tmp
libraries/chain/fork_database.cpp
#include <eosio/chain/fork_database.hpp> #include <eosio/chain/exceptions.hpp> #include <boost/multi_index_container.hpp> #include <boost/multi_index/member.hpp> #include <boost/multi_index/ordered_index.hpp> #include <boost/multi_index/hashed_index.hpp> #include <boost/multi_index/mem_fun.hpp> #include <boost/multi_in...
TOOL
0.975052
6.139373
4e9954ac-0667-401c-b5c2-2d2b7f0b0192
raincross7/code-similarity
codes/train_code/problem204/problem204_71.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, c) for (int i = 0; i < (int)c; i++) int main() { int n, d, x; scanf("%d %d %d", &n, &d, &x); int a[n]; rep(i, n) scanf("%d", &a[i]); int ans = x; rep(i, n) { int temp = 1; temp += (d - 1) / a[i]; ans += temp...
ALGO
0.999932
3.449375
c1357e4b-4855-4eba-980c-01b75dbb1d33
Kyun2da/Algorithm
cpp/baekjoon/10950/10950.cpp
#include <stdio.h> int main() { int num; int A, B; scanf("%d", &num); for (int i = 0; i < num; i++) { scanf("%d %d", &A, &B); printf("%d\n", A + B); } return 0; }
ALGO
0.999022
3.485156
7f226ef1-3f66-4116-a90c-96f7aa95c8cd
JM991103/BackJoon_Cpp
Day_1/Day_24/day_24.cpp
#include <iostream> #include <vector> #include <string> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); //int n; //cin >> n; //vector<int> a(n, 0); //vector<int> s(n, 0); //for (int i = 0; i < n; i++) //{ // cin >> a[i]; //} //for (int i = 0; i < n; i++) // ...
ALGO
0.999771
3.081543
820c7297-e3af-4a6d-af47-22295ffe0476
AnkahHarrison/LAB_exercises
Lab_3/pract_ex3.cpp
#include <iostream> using namespace std; int main(){ int marks; e: do{ cout<<"Enter the marks: ", cin>>marks; if(marks<=100 && marks>=90){ if(marks==100){ cout<<"Perfect Score!"; } cout<<'A'; }else if(marks>=80&&marks<90){ cou...
TOOL
0.908863
3.652654
9dfb1888-165b-49c8-a921-8fc667971bb0
Aditya-20BCE2275/Personal-practice
Test1.cpp
#include<bits/stdc++.h> using namespace std; // sum of n natural numbers // usnig parameterized void f(int n,int s) { if(n == 1) { cout<< 1 + s; return; } f(n-1,s+n); } int main() { f(4,0); return 0; }
ALGO
0.999848
3.557601
6e318290-e690-4e79-883c-86dfa0755461
gusrlLee/OpenCV_practice
OpenCV_Documents/FLANN/main.cpp
#include<iostream> #include<opencv2/opencv.hpp> #include<opencv2/xfeatures2d.hpp> #include<opencv2/features2d.hpp> using namespace cv; using namespace cv::xfeatures2d; int main(){ Mat image1 = imread("../../../data/box.png", IMREAD_GRAYSCALE); Mat image2 = imread("../../../data/box_in_scene.png", IMREAD_GRAYS...
ALGO
0.994336
4.858815
3bd172ee-a133-4f9d-a9f7-806d4cda7527
ngzqqb/sstd_cgal
sstd/Generator/test/Generator/test_tetrahedron_3.cpp
#include <iostream> #include <CGAL/point_generators_3.h> #include <CGAL/Random.h> #include <CGAL/algorithm.h> #include <CGAL/double.h> #include <CGAL/Simple_cartesian.h> #include <cassert> typedef double RT; typedef CGAL::Simple_cartesian<RT> K; typedef K::Point_3 Point_3; typedef K::Vector_3 Vector_3; ...
ALGO
0.978941
6.493658
31264ab5-c1d8-46a1-9389-41d60e128a6c
swcho84/ProgrammingCJUAE101-2023
5thWeek/Prob4/main.cpp
#include <stdio.h> #define NUM_DNA_INFO 5 int main() { // getting DNA information printf("Input DNA information(MaxCount:5)\n"); // calculating DNA info. summation for detecting Suspect int nSumDNA = 0; for (int i = 0; i < NUM_DNA_INFO; i++) { int nTempDNA = 0; scanf("%d", &nTempDNA); nSumDNA...
ALGO
0.998301
3.142787
d5cd7f97-fc29-434c-8bc4-5f445cc6cc37
everettprussak/CPSC350_SP22_ASSIGNMENT5_PRUSSAK
simulation.cpp
#include "simulation.h" #include <algorithm> #include <array> #include <fstream> //default Simulation::Simulation(){ filename = ""; office = new LinkedList<Window>; allStudents = new LinkedList<Student>; youth = new Queue<Student>; studentWait = 0; openWindow = 0; time = 0; lines = 0; ...
ALGO
0.984441
3.214232
03730709-d0d2-4301-9474-f11e32dcfc46
Samyxelita/ejercicios_progra1
Ejercicios3/Ejercicio10.cpp
#include "Ejercicio10.h" int Ejercicio10::calcularFactorial(int numero) { if (numero <= 1) { return 1; } return numero * calcularFactorial(numero - 1); }
ALGO
0.999574
4.579144
416416b3-6829-4460-8b5d-d93bb4edcf9a
automation555/pytorch
torch/csrc/jit/codegen/cuda/compute_at.cpp
#include <torch/csrc/jit/codegen/cuda/compute_at.h> #include <torch/csrc/jit/codegen/cuda/instrumentation.h> #include <torch/csrc/jit/codegen/cuda/ir_all_nodes.h> #include <torch/csrc/jit/codegen/cuda/ir_iostream.h> #include <torch/csrc/jit/codegen/cuda/ir_utils.h> #include <torch/csrc/jit/codegen/cuda/transform_iter.h...
TOOL
0.97813
7.728585
7f779a6d-ce92-4493-b26c-bf423aa8b46d
alrosen1/fix-mypersonalindex
src/calculators/calculatorAveragePrice.cpp
#include "calculatorAveragePrice.h" #include "splits.h" #include "functions.h" #include "executedTrade.h" #ifdef CLOCKTIME #include <QTime> #endif double calculatorAveragePrice::calculate(int date_, const executedTradeMap &executedTrades_, account::costBasisMethod costBasis_, splits splits_) { #ifdef CLOCKTIME QT...
ALGO
0.997166
5.746839
4a653e7b-33c4-434c-ab7d-f13c33c88a3c
Shell-Wataru/AtCoder
Codeforces/736/B.cpp
#include <iostream> #include <algorithm> #include <vector> #include <deque> #include <queue> #include <set> #include <iomanip> #include <cmath> #include <map> #include <bitset> #include <numeric> using namespace std; using ll = long long; const long long BASE_NUM = 1000000007; int solve() { ll n; scanf("%lld",&n)...
ALGO
0.999939
4.518949
22884b79-43f6-4b3f-8bc8-c12a022829ee
minskiter/leetcode
codecpp/137.cpp
#include "header.h" class Solution { public: int singleNumber(vector<int> &nums) { int one = 0, two = 0; for (auto num : nums) { one = (one ^ num) & ~two; two = (two ^ num) & ~one; } return one; } }; int main() { vector<int> nums = {0,1,0...
ALGO
0.999907
5.52238
9ddca1fd-1970-4cbd-903e-13179271efb1
daiweLi/Fast-Combat-Simulation
Source/Tools/eigen337/doc/examples/TutorialLinAlgRankRevealing.cpp
#include <iostream> #include <Eigen/Dense> using namespace std; using namespace Eigen; int main() { Matrix3f A; A << 1, 2, 5, 2, 1, 4, 3, 0, 3; cout << "Here is the matrix A:\n" << A << endl; FullPivLU<Matrix3f> lu_decomp(A); cout << "The rank of A is " << lu_decomp.rank() << endl; c...
ALGO
0.999856
3.725084
f2eaff02-54e4-4010-ade2-9b6bf7ab956d
ishandutta2007/codeforces
maspy/normal/916/D.cpp
#line 1 "/home/maspy/compro/library/my_template.hpp" #include <bits/stdc++.h> using namespace std; using ll = long long; using pi = pair<ll, ll>; using vi = vector<ll>; using u32 = unsigned int; using u64 = unsigned long long; using i128 = __int128; template <class T> using vc = vector<T>; template <class T> using v...
ALGO
0.999472
4.559846
3f04137c-74bb-4d43-9889-7160e14f948f
Tushar-Thorat-2001/DSA
LinkedList/llist8.cpp
#include<iostream> using namespace std; // try next time // circuler linked list class Node{ public: int data; Node* next; Node(int d){ this->data = d; this->next = NULL; } }; void inserthead(Node* &tail, int d){ Node* newnode = new Node(d); Node* temp = tail; newnode...
ALGO
0.999631
4.259106
64ac5605-0063-4623-b7e4-bebc7bc57960
SpiritedAwayCN/Practice-of-Programming
Homework/Homework05/你真的搞清楚为啥while(cin-n)能成立了吗?.cpp
#include <iostream> using namespace std; class MyCin { public: MyCin():tag(true){} friend MyCin& operator >>(MyCin& mc,int &num){ if(!mc.tag) return mc; if(!(cin>>num)) mc.tag = false; if(num==-1) mc.tag = false; return mc; } operator bool(){ return tag; } pri...
TOOL
0.925429
3.23279
5fabfc9c-1e5f-461d-9dd3-06ca92116530
kirteeprajapati/Competitive-Coding
CodeForces cpp/703A - Mishka and Game.cpp
#include <iostream> using namespace std; int main() { int n, Mishka = 0, Chris = 0; cin >> n; while (n--) { int a, b; cin >> a >> b; if (a > b) Mishka++; else if (a < b) Chris++; } if (Chris < Mishka) cout << "Mishka\n"; else i...
ALGO
0.999768
3.757058
c6ec1808-d409-45f1-8fcd-b6a2e560ca5c
archit-dev/Codeforces
746B - Decoding.cpp
#include <iostream> #include <algorithm> #include <vector> #include <cstring> #include <map> using namespace std; int main(){ #ifndef ONLINE_JUDGE // for getting input from input.txt freopen("input.txt", "r", stdin); // for writing output to output.txt freopen("output.txt", "w", stdout); #endif ...
ALGO
0.99999
3.900241
2d1ddf41-227f-4f17-934b-5d7e76b07691
Qlopezscarim/lab4_autograder
src/fir.cpp
#include "fir.h" const din_t a[L]={0.5, -0.4, 0.3, -0.2, 0.05, 0.3, -0.3, 0.2, 0.1, -0.1}; void fir(din_t in[N], dout_t out[N]) { #pragma HLS interface axis port=in #pragma HLS interface axis port=out din_t reg[L] = {}; #pragma HLS array_partition variable=reg type=complete sample_loop: for (int n=0; n<N; n++) ...
ALGO
0.998222
4.389725
597b610f-3f80-48b9-a8c3-cf4037a470ba
Abhinav7076/My-Codes
LeetCode-Solutions-master/C++/sum-of-digits-in-the-minimum-number.cpp
// Time: O(n * l), l is the max length of numbers // Space: O(l) class Solution { public: int sumOfDigits(vector<int>& A) { int min_num = *min_element(A.begin(),A.end()); int total = 0; while (min_num) { total += min_num % 10; min_num /= 10; } return...
ALGO
0.999943
6.202259
0b1fc106-72fc-44bb-82fa-b60bb09694e7
Glory-Day/Solutions
Programmers/Level-00/Cpp/외계어_사전.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; int solution(vector<string> spell, vector<string> dic) { int answer = 2; for (int i = 0; i < (int)dic.size(); i++) { bool check = true; for (int j = 0; j < (int)spell.size(); j++) ...
ALGO
0.999399
4.876338
ffd6508d-4224-4b6b-b94c-51615839b20e
shelltdf/osgall
prebuild/boost_1_82_0/libs/numeric/ublas/doc/samples/matrix_vector_slice.cpp
#include <boost/numeric/ublas/matrix.hpp> #include <boost/numeric/ublas/matrix_proxy.hpp> #include <boost/numeric/ublas/io.hpp> int main () { using namespace boost::numeric::ublas; matrix<double> m (3, 3); for (unsigned i = 0; i < m.size1 (); ++ i) for (unsigned j = 0; j < m.size2 (); ++ j) ...
ALGO
0.962235
3.460482
87e69047-39a1-47bf-86ae-bafe74f3d4db
rainbowlee/Cocos2dx_WP8ShaderCompiler
cocos/base/CCEventDispatcher.cpp
#include "base/CCEventDispatcher.h" #include "base/CCEvent.h" #include "base/CCEventTouch.h" #include "base/CCEventCustom.h" #include "base/CCEventListenerTouch.h" #include "base/CCEventListenerAcceleration.h" #include "base/CCEventListenerMouse.h" #include "base/CCEventListenerKeyboard.h" #include "base/CCEventListene...
TOOL
0.912716
3.853835
ce0998d6-8643-4240-b210-ab685edc0d8b
codebreaker0001/Algorithms-and-Data-structures
DP/DigitDp/basic.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; #define ll long long #define ull unsigned long long #define modd 1e9 + 7 #define pb(e) push_back(e) #define sv(a) sort(a.begin(), a.end()) #define sa(a, n) sort(a, a + ...
ALGO
0.999724
4.277534
ddf0de55-f028-44ee-8dee-bb57f5f09baa
praneethaBrindavanam/LeetCode
check if a nummber is power of 3/code.cpp
class Solution { public: bool checkPowersOfThree(int n) { while(n>0){ if(n%3==2) return false; n/=3; } return true; } };
ALGO
0.999023
5.493551
7028cfd1-f2f1-4606-9307-febe70b4c201
duckdb/duckdb-odbc
src/duckdb/extension/core_functions/aggregate/holistic/reservoir_quantile.cpp
#include "duckdb/execution/expression_executor.hpp" #include "duckdb/execution/reservoir_sample.hpp" #include "core_functions/aggregate/holistic_functions.hpp" #include "duckdb/planner/expression.hpp" #include "duckdb/common/queue.hpp" #include "duckdb/common/serializer/serializer.hpp" #include "duckdb/common/serialize...
ALGO
0.927519
7.497678
30a3fe14-3cff-4200-8a34-9a11adce4bff
Narvdeshwar/CPP-DSA
arraysum.cpp
#include <bits/stdc++.h> using namespace std; int arraySum(int arr[], int n) { return n < 0 ? 0 : arraySum(arr, n - 1) + arr[n]; } int main() { int arr[5] = {1, 2, 3, 4, 5}; cout << arraySum(arr, 5); return 0; }
ALGO
0.999762
5.056406
37e9e62b-3d35-476a-972b-2ee146bdfe4a
PowerKiKi/polukili
application/lib/box2d/Box2D/Dynamics/Contacts/b2Contact.cpp
#include <Box2D/Dynamics/Contacts/b2Contact.h> #include <Box2D/Dynamics/Contacts/b2CircleContact.h> #include <Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h> #include <Box2D/Dynamics/Contacts/b2PolygonContact.h> #include <Box2D/Dynamics/Contacts/b2EdgeAndCircleContact.h> #include <Box2D/Dynamics/Contacts/b2EdgeAnd...
ALGO
0.992154
7.75326
bdfd4b3e-b241-4d03-918e-8d84f2550bdf
ishandutta2007/codeforces
chemthan/normal/893/F.cpp
#include <bits/stdc++.h> using namespace std; #define ms(s, n) memset(s, n, sizeof(s)) #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define FORd(i, a, b) for (int i = (a) - 1; i >= (b); i--) #define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++) #define sz(a) int((a).size()) ...
ALGO
0.999991
4.524235
00da16ea-4251-4d4a-bcdb-0edfcf30fa77
roytit/C_project
Итоговый тест №1/task 1/main4.cpp
#include <iostream> using namespace std; int readNumber(); void writeAnswer(int answer); int main(){ int a = readNumber(); int b = readNumber(); int res = a / b; writeAnswer(res); return 0; } int readNumber(){ cout << "Enter the number: "; int number; cin >> number; return nu...
ALGO
0.988063
4.158234
f2737bc8-e8fd-4a70-9512-db67776f3b33
yuchia0221/Parallel-LU-Decomposition
lu-omp.cpp
#include <iostream> #include <chrono> #include <cmath> #include <omp.h> #include <stdlib.h> using namespace std; void print_pivot(int *&, int); void print_matrix(double **&, int); void swap_values(int *&, int, int); void swap_rows(double *&, double *&); void swap_interval(double **&, int, int); void initialize_random...
ALGO
0.999868
6.201659
671d54c6-0e91-46dc-9f12-2c43fd21f617
tusikalanse/acm-icpc
cf/1132/b.cpp
#include <bits/stdc++.h> using namespace std; const int N = 3e5 + 10; int a[N], n, m, q; long long sum; int main() { scanf("%d", &n); for(int i = 1; i <= n; ++i) { scanf("%d", &a[i]); sum += a[i]; } sort(a + 1, a + n + 1, [](int i, int j) {return i > j;}); scanf("%d", &m); while(m--) { scanf("%d", &q); ...
ALGO
0.99977
3.903397
9ce100dd-482a-4451-a279-532d4a6c0ec1
RunceanuDaria/FMI-Unibuc
Anul I/Semestrul 2/POO/Seminar/seminar-II-135-master/main.cpp
#include "bst.hpp" #include "bst.cpp" int main () { BST tree; BST tree1; tree1.insert(1); tree1.insert(100); tree1.insert(1123); tree1.insert(1123); tree1.insert(133); tree1.insert(1345); tree1.insert(111); tree.insert(5); tree.insert(6); tree.insert(4); tree.insert(...
TEST
0.942575
4.40624
8e074fe4-9e2a-411f-9881-77b67ddab61d
alexandraback/datacollection
solutions_5634697451274240_0/C++/Slobodianiuk/B.cpp
#include <cstdio> #include <cstdlib> #include <iostream> #include <vector> #include <string> #include <set> using namespace std; typedef vector<int> VI; typedef vector<VI> VVI; long long solve(const string &s) { int ret = 0; for (int i = 1; i < s.size(); ++i) { ret += (s[i] != s[i-1]); } return ret; } i...
ALGO
0.999676
4.296045
94f3c6bf-a39d-4ff6-98cf-1b5a9a32c171
jevinskie/clang-format-theos-logos
clang-tools-extra/clangd/index/StdLib.cpp
#include "Compiler.h" #include "Config.h" #include "SymbolCollector.h" #include "index/IndexAction.h" #include "support/Logger.h" #include "support/ThreadsafeFS.h" #include "support/Trace.h" #include "clang/Basic/LangOptions.h" #include "clang/Frontend/CompilerInvocation.h" #include "clang/Lex/PreprocessorOptions.h" #i...
TOOL
0.994485
3.223841
e2376d1f-f54f-47b3-a6ee-db953f58f834
MdAbuNafeeIbnaZahid/Competitive-Programming
Practice for BUET/Team/Team online on Tuesday, June 14, 2016/ICPC Live Archive 7529 - DNA Sequencing.cpp
#include <bits/stdc++.h> using namespace std; map<string,int>m; int main() { int a,b,c,d,e,i,j,k,p,q; string s[701],x1; int x[701]; while(scanf("%d %d",&a,&b)!=EOF) { m.clear(); if(a==0 && b==0)break; memset(x,0,sizeof(x)); for(i=1;i<=a;i++) { cin>>x[i]...
ALGO
0.998607
3.403982
727860a7-6c5c-4b96-b2b7-7c9f3babba4c
michaelyql/cp
cf/greedy/2042c.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using pii = pair<int, int>; void solve() { int n, k; cin >> n >> k; string s; cin >> s; vector<int> v; int x = 0; for (int i = n - 1; i > 0; i--) { if (s[i] == '1') x++; else x--; if (x > 0) v.push_back(x); } sort(v.begin(), v.end())...
ALGO
0.999912
4.523517
ec990c7b-9aa7-472d-ae6b-6c10df0df824
yash3001/Competitve-Programming
Codeforces/Practice/1500/DivisibilitybyEight.cpp
// @author ↓ // // ▄████ ▄▄▄ ███▄ ▄███▓ ███▄ ▄███▓ ▄▄▄ // ██▒ ▀█▒▒████▄ ▓██▒▀█▀ ██▒▓██▒▀█▀ ██▒▒████▄ //▒██░▄▄▄░▒██ ▀█▄ ▓██ ▓██░▓██ ▓██░▒██ ▀█▄ //░▓█ ██▓░██▄▄▄▄██ ▒██ ▒██ ▒██ ▒██ ░██▄▄▄▄██ //░▒▓███▀▒ ▓█ ▓██▒▒██▒ ░██▒▒██▒ ░██▒ ▓█ ▓██▒ // ░▒ ▒ ▒▒ ▓▒█░░ ▒░ ░ ░░ ▒░ ░ ░ ▒▒ ▓▒█░...
ALGO
0.999806
4.545004
fc189afb-a3d4-445b-a78b-da4436c130da
ishandutta2007/codeforces
ko_osaga/normal/549/C.cpp
#include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> using namespace std; int odd, even, n, k; int my_solve(int i, int j){ if(k %2 == 1 && k == i && j == 0) return 1; if(k % 2 == 0){ if(i + j == k){ return i%2; } else if((i - j)%2 != 0 && abs(i - j) ...
ALGO
0.999988
3.61798
a37b96dc-c739-4c92-a6e2-fc35ffd91b61
keijak/comp-pub
cf/contest/1244/E/main.cpp
#include <bits/stdc++.h> using i64 = long long; using u64 = unsigned long long; #define REP(i, n) for (int i = 0, REP_N_ = int(n); i < REP_N_; ++i) #define ALL(x) std::begin(x), std::end(x) template <class T> inline bool chmax(T &a, T b) { return a < b and ((a = std::move(b)), true); } template <class T> inline bool...
ALGO
0.999969
3.879444
8563375c-b3a0-4d79-84ae-dbc827dc74d5
abhinav84094/C-codes
seller gain profit or loss.cpp
#include <stdio.h> int main() { int cp, sp ; printf("enter the cost pric of item:"); scanf("%d", &cp); printf("enter the selling price of item:"); scanf("%d", &sp); if (sp>cp){ printf("the seller gain profit of rs:%d", sp-cp); } else if(sp==cp){ printf("no loss no profit"); } else{ printf("the seller ga...
ALGO
0.998909
3.395596
ff93f16e-35c4-4fab-a7eb-a48c1d56bb76
rabel-o/Estrutura-de-Dados---UFC
rotacionaVetor.cpp
#include <iostream> #include <vector> using namespace std; void right_rotation(vector<int>& vet, int nrot) { int size = vet.size(); nrot %= size; // Ajusta o número de rotações caso seja maior que o tamanho do vetor if (nrot == 0) { return; // Não é necessário fazer nada se o número de ro...
ALGO
0.999937
5.908107
42538ef9-1c0a-44fa-89c9-14eb3e8cda3a
akash1301/LightOj-Solution
1017/5660622_AC_4ms_1732kB.cpp
/////////////////////// All Is Well ///////////////////////// #include <bits/stdc++.h> #define FOR(i, s, e) for(int i=s; i<e; i++) #define loop(i, n) for(int i=0; i<n; i++) #define getint(n) scanf("%d", &n) #define pb(a) push_back(a) #define ll long long int #define ull unsigned long long int #define dd double #defin...
ALGO
0.999832
3.532331
8efc215a-97cd-48ec-9e7d-48805ac8e936
odilbekmarimov/sept17
problem2.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; if(n<0) { cout << "Negative and ";} else{ cout << "Positive and ";} if(n%2==0){ cout << "even";} else{ cout << "odd";} return 0; }
ALGO
0.999803
3.369893
7d6757a8-ea78-4383-8e4e-f30bc805e3e5
ishandutta2007/codeforces
physics0523/normal/1513/C.cpp
#include<bits/stdc++.h> #define mod 1000000007 using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; long long mat[32][10][10]={0}; for(int i=0;i<9;i++){mat[0][i][i+1]=1;} mat[0][9][0]=1; mat[0][9][1]=1; for(int i=1;i<32;i++){ for(int j=0;j<10;j++){ ...
ALGO
0.999845
5.255427
53c2f5c5-8f52-401c-9a04-5d29944bf17a
MoStyle/frite
src/managers/layoutmanager.cpp
#include "layoutmanager.h" #include "vectorkeyframe.h" #include "group.h" #include "mask.h" #include "utils/utils.h" #include <clipper2/clipper.h> /** * Optimizations: * - Perform radius search first and tag all points that have at least one match * - Use tagged points to determine which point visibility need to...
ALGO
0.98394
6.042087
199bec65-8088-47d0-847b-c7672cda236e
yusuf7855/wordbox
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.998799
6.776823
9dc0d877-da81-4bc0-a320-0c9bb1a6a66a
minnce/codechef
sub1000/findShoe.cpp
#pragma GCC optimize("O2,no-stack-protector,unroll-loops,fast-math") #include <iostream> #include <bits/stdc++.h> #define ll long long #define PB push_back #define F first #define S second #define uset unordered_set #define umap unordered_map #define MP make_pair; #define vt vector #define all(x) begin(x), end(x) #defi...
ALGO
0.999953
4.179919
37a23088-170c-44ea-ad8a-aa59fa4b8a5d
ishandutta2007/codeforces
crtsir/normal/1360/C.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int T;cin>>T;while(T--){ int n;cin>>n;int a[n]; for(int i=0;i<n;i++)cin>>a[i]; string ans="NO"; int cnt[2]={0,0}; for(int i=0;i<n;i++)cnt[a[i]%2]++; if(cnt[0]%2==0)ans="YES"; for(int i=0;i<n;i++) for(int j=0;j<n;j++) if(a[i]-a[j]==1) an...
ALGO
0.999697
4.077152
750e53f1-8a19-4fcf-a63b-18bdbce9ab65
Lewuathe/mlir-hello
thirdparty/llvm-project/clang/tools/libclang/CIndexer.cpp
#include "CIndexer.h" #include "CXString.h" #include "clang/Basic/LLVM.h" #include "clang/Basic/Version.h" #include "clang/Config/config.h" #include "clang/Driver/Driver.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/MD5.h" #include "llvm...
TOOL
0.971243
7.404039
17f222c4-5f1c-4f87-bb8c-8478dae28b6e
lakshmanaram/Competitive-programming
codechef/September Challenge 16/LONGSEQ.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--) { string d; cin>>d; int no = 0, nz = 0; for(int i=0;i <d.size();i++){ if(d[i] == '0') nz++; else no++; } if(no == 1 || nz== 1) cout<<"Yes"<<endl; else cout<<"No"<<endl; } return 0; }
ALGO
0.999953
4.562894
f1f195ae-0a1f-4f66-a689-e458fb4a1f1d
lwt1104/seg_tool
plane_seg.cpp
#include <pcl/ModelCoefficients.h> #include <pcl/io/pcd_io.h> #include <pcl/point_types.h> #include <pcl/filters/extract_indices.h> #include <pcl/filters/passthrough.h> #include <pcl/features/normal_3d.h> #include <pcl/sample_consensus/method_types.h> #include <pcl/sample_consensus/model_types.h> #include <pcl/segmenta...
DATA
0.897128
6.119537
ecad2db5-f4e5-4afc-87a8-52890c9c23bb
zzw901123/bfl
src/filter/mixtureParticleFilter.cpp
#include "mixtureParticleFilter.h" #include "../pdf/mixture.h" #define SV StateVar #define MV MeasVar #define MeasModel MeasurementModel #define STATE_AND_MEAS_VAR_DIFFERENT template <typename SV, typename MV> MixtureParticleFilter<SV,MV>::MixtureParticleFilter(Mixture<SV> * prior, ConditionalPdf<SV,SV> * ...
ALGO
0.998722
5.59902
d0481da6-4650-4b0e-a712-d1d73f29fd09
AmitKK10/DSA
3321-type-of-triangle/type-of-triangle.cpp
class Solution { public: string triangleType(vector<int>& nums) { int a = nums[0]; int b = nums[1]; int c = nums[2]; if(a+b<= c || b+c <= a || c+a<= b) { return "none"; } else if(a == b && b == c) { ...
ALGO
0.999967
5.63721
5f1c3f4f-ab3c-4039-b1db-7fbdc4b9b303
shaannttanu/CPP_Practice
Invert_Half_Pyramid_180deg.cpp
#include<iostream> using namespace std; int main() { for(int i=1;i<=5;i++){ for(int j=5;j>=0;j--){ if(j>i){ cout<<" "; } else{ cout<<"*"; } } cout<<endl; } return 0; }
ALGO
0.999769
3.173456
506d09d1-4984-4292-8c77-d743f09d2bcc
tangziyi001/LeetCode
Backtracking/CombinationSum.cpp
class Solution { public: void rec(vector<int>& can, vector<vector<int>>& re, vector<int>& tmp, int idx, int target, int sz, int sum){ if(idx == sz && sum == target){ re.push_back(tmp); return ; } else if(idx == sz) return ; if(sum > target) return ; rec(can, r...
ALGO
0.999974
6.29612
d4c34d3b-5856-49f6-94f4-590f621b3304
chuongg3/llvm-function-merging
libcxx/test/std/utilities/template.bitset/bitset.cons/string_ctor.pass.cpp
// bitset(string, pos, n, zero, one); // constexpr since C++23 #include <bitset> #include <algorithm> // for 'min' and 'max' #include <cassert> #include <stdexcept> // for 'invalid_argument' #include <string> #include "test_macros.h" template <std::size_t N> TEST_CONSTEXPR_CXX23 void test_string_ctor() { #ifndef TES...
TEST
0.945788
7.793153
f56699a1-7ee3-4c81-b994-7a6fbb44ae17
iceprincefounder/XkGamedevKit
Source/XkGamedevCore/Private/XkLandscape/XkLandscapeRenderUtils.cpp
#include "XkLandscape/XkLandscapeRenderUtils.h" FQuadtreeNode::FQuadtreeNode() { Parent = -1; Children[0] = Children[1] = Children[2] = Children[3] = -1; Quadtree = nullptr; } FQuadtreeNode::~FQuadtreeNode() { Parent = -1; Children[0] = Children[1] = Children[2] = Children[3] = -1; Quadtree = nullptr; } void F...
ALGO
0.931426
5.378724
5bf0d155-76fc-4084-88e8-9a68583f7b94
kwangzera/Programming-Problems
AtCoder/Educational DP Contest/F_LCS.cpp
#include <bits/stdc++.h> using namespace std; const int M = 3002; int ss, ts, dp[M][M]; string s, t, ans; int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); cin >> s >> t; ss = s.size(), ts = t.size(); for (int i = 1; i <= ss; i++) { for (int j = 1; j <= ts; j++) { ...
ALGO
0.999995
4.323678
f5fefde0-fd48-40d0-b356-ba958a6e68df
Rolight/ACM_ICPC
Old_Contests/Ahu/ahu6thweb/G.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; int m; char s[1020]; int main() { scanf("%d",&m) ; while(m--) { scanf("%s",s); int len = strlen(s),c = 0; int ans = 0; for(int i = 0;i < len;i++) { if(i && s[i] != s[i - 1]) { ...
ALGO
0.999973
3.834305
294ba8bf-1840-4bda-8cd6-4598aaeafd65
revbayes/revbayes.archive
boost_1_60_0/libs/multi_index/example/ip_allocator.cpp
#if !defined(NDEBUG) #define BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING #define BOOST_MULTI_INDEX_ENABLE_SAFE_MODE #endif #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */ #include <algorithm> #include <boost/interprocess/allocators/allocator.hpp> #include <boost/interprocess/containers/s...
TOOL
0.979238
5.831622
963715d2-0d96-40d4-b8ec-7a6ea7bfa299
WebCrawlers-exe/DataStructure-Archives
LeetCode Answers/96-unique-binary-search-trees/96-unique-binary-search-trees.cpp
class Solution { public: int numTrees(int n) { long long ans=1; for(int i=1;i<n;i++){ ans=ans*(2*n-i)/i; } ans=ans*2*n; return ans/(n*(n+1)); } };
ALGO
0.999978
5.72349
97378a8f-729b-44ad-af6d-eb28ae3d735b
ebertmillar/forms_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
8e55fa81-9314-4f0d-ba9b-708febf5fc31
mathur-nitish/Placement-Course
Check if a number is a power of 2 or not/Source.cpp
#include<iostream> using namespace std; bool powerOfTwo(int n) { return (n && !(n & n - 1)); } int main() { int n; cin >> n; cout << boolalpha << powerOfTwo(n); return 0; }
ALGO
0.997297
5.119503
84957b03-5a3a-4366-a936-154cf0f71714
mushrifshahreyar/CGAL
CGAL_B170330CS/CGAL_Q2_B170330CS/CGAL_Q2.cpp
#include <bits/stdc++.h> #include <iostream> #include <fstream> #include <boost/format.hpp> #include <QtGui> #include <CGAL/Qt/GraphicsViewNavigation.h> #include <CGAL/Point_2.h> #include <CGAL/Line_2.h> #include <CGAL/Cartesian.h> #include <QLineF> #include <QRectF> #include <QApplication> #include <QGraphicsScene> #i...
ALGO
0.979969
4.211962
d59974b1-f8b0-45c9-af35-601efe67d5ad
sourav-islam/Phitron_batch4
Semester2/Monthly_contest_by_Phitron/contest 2/Queries_Easy_Version.cpp
/* #include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; priority_queue<int, vector<int>, greater<int>> pq1, pq2; while (n--) { int a; cin >> a; int even = 0, e_cnt = 1; int odd = 0, o_cnt = 1; if (a == 1) { int b; ...
ALGO
0.99931
4.12992
953def41-7088-4ede-be4b-6cd16932a3ed
VhahahaV/AlgorithmPactice
code/6_June/06-27/luogu_Petri.cpp
// // Created by VhahahaV on 2024/6/27. // #include <iostream> #include <vector> #include <map> using namespace std; int main(){ int NP; int caseId = 1; while(cin>>NP){ if(!NP) break; map<int,int> cnt; for(int i = 0 ; i < NP ; i++){ int t; cin>>t; ...
ALGO
0.999432
4.57674
7d9dfe86-0591-42d5-b39a-0aa59b1c4c0a
WeichenXu/shuati
523_continuous_subarray_sum.cpp
#include <iostream> #include <vector> #include <unordered_map> // 1. keep an unordered_set<remain> using namespace std; class Solution { public: bool checkSubarraySum(vector<int>& nums, int k) { unordered_map<int, int> s; int cur = 0; s[0] = -1; for (int i=0; i<nums.size(); ++i){ ...
ALGO
0.9999
5.605077
bf05ad80-37ef-49d5-ac1c-994509b55724
fansehep/AlgorithmPractise
some_interestring/1971_.cpp
#include "leetcode.hpp" class Solution { public: bool validPath(int n, vector<vector<int>>& edges, int source, int destination) { } };
ALGO
0.999777
5.973839
2921a02f-b634-482c-a872-c59099bf427c
Priyo002/DSA
CF_GRIND/Problem-B/B_Preparing_Olympiad.cpp
#include<bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> #define int long long #define pb push_back #define endl '\n' const...
ALGO
0.999963
4.355456
08399b5e-cbb1-4f8d-af4c-88e9ce22e7d4
S-o-y-k-a/hw
add_hw3/parent_killer.cpp
#include <unistd.h> #include <signal.h> #include <iostream> #include <cerrno> #include <sys/wait.h> #include <sys/types.h> int main() { pid_t pid = fork(); if (pid < 0) { perror("fork failed"); exit(errno); } if (pid == 0) { pid_t parent_pid = getppid(); std::cout << ...
TOOL
0.988445
5.171153
8de6ff75-4531-46ce-b9fb-6f256c1c25b4
piyush1146115/Competitive-Programming
Uva Oj/497 Strategic Defense Initiative.cpp
#include<bits/stdc++.h> using namespace std; #define inf INT_MAX int v[100005]; int ans ; //int dp[10005]; int I[100005], L[100005]; int len; void reset() { I[0] = -inf; for(int i = 1; i <= len; i++) I[i] = inf; } void longest() { reset(); //cout << "ok\n"; for(int i = 0; i < len; i++){ ...
ALGO
0.999935
3.856052