uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
329492b1-e319-4acd-94c6-da4e8c7f1fb0
rahul897/cs_cpp_old
stacks/intfix.cpp
#include<iostream> using namespace std; class stack{ char e[50]; int top; int size; public: void push(char x); int pop(); int isfull(); int isempty(); stack(int s){size=s;top=-1;} }; int stack::isfull() {return top==size-1;} int stack::isempty() {return top==-1;} void stack::push(char x){ if(isfull()) cout<<"...
ALGO
0.999905
3.239991
684dcf69-42f9-476c-892b-4a83d447811e
divyansh12git/cf
940/problemA.cpp
#include <bits/stdc++.h> #include<iostream> #include<vector> #include<unordered_map> using namespace std; #define INF 1e18 #define PI 3.141592653589793238462 #define ll long long #define llfl(i,s,e) for(long long i=s;i<e;i++) #define fl(i,s,e) for(int i=s;i<e;i++) #define vsort(v) sort(v.begin(),v.end()) #define vre...
ALGO
0.999924
4.29881
5e3bd66f-d25b-4038-becd-f8d2d666b907
lauw04/Projet-cpp
Bacterie.cpp
#include <cstdio> #include <cstdlib> #include "Bacterie.h" //Constructors Bacterie::Bacterie(){ Pdeath_ = 0.5; W_min_ = 0.001; } //Destructors Bacterie::~Bacterie() = default; //Getters float Bacterie::W_min(){ return W_min_; } float Bacterie::Pdeath(){ return Pdeath_; } vector<float> Bacterie::internal_c...
ALGO
0.993015
3.380409
a0519583-5078-479e-8a33-ef73bf5db33d
ishandutta2007/codeforces
robezh/normal/985/F.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = (int)2e5 + 500; const int mod = (int)1e9 + 7; int n,m,a,b,len; string str; ll val[N][30]; ll p = 137, pw[N]; int get(int i, int l, int r){ ll res = (val[r][i] - val[l-1][i] + mod) * (pw[n-l]) % mod; return (int)res; } int mai...
ALGO
0.999962
4.049811
8e6a506e-3c60-4743-a050-91856e292474
Ashutxshj/LeetCode
LeetCode/BitMinFlips.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; class Solution { public: string dectoBin(int n) { if (n == 0) { return "0"; } string res = ""; while (n > 0) { if (n % 2 == 1) { res...
ALGO
0.999959
5.477805
b25d9569-853c-44f5-a9d0-cccb1b45ba53
SoonCoin/Neutroncoin
src/activemasternode.cpp
#include "protocol.h" #include "activemasternode.h" #include <boost/lexical_cast.hpp> #include "clientversion.h" // // Bootup the masternode, look for a 500 SLING input and register on the network // void CActiveMasternode::ManageStatus() { std::string errorMessage; if(!fMasterNode) return; if (fDebug) p...
WEB
0.917389
3.547086
c5aaad30-0e94-4d44-bdb8-0a2ba9898b32
SHM-white/CPP_Homework
PTA/2025_4_9/1.cpp
#include <iostream> #include <vector> using Map = std::vector<std::vector<int>>; int main(){ int n; std::cin >> n; Map map(n + 2, std::vector<int>(n + 1, 0)); for (size_t i = 1; i <= n; i++) { for (size_t j = 1; j <= i; j++) { std::cin >> map[i][j]; } } ...
ALGO
0.999777
3.968082
52a3a2cb-4698-4d1d-bbe7-1cf42fd9c808
pmhmist/AlgorithmStudy
백준/단계별 문제풀이(C++)/백준-기본수학2/03009 네 번쨰 점 210709.cpp
#include <iostream> #include<algorithm> #include <cmath> using namespace std; #define FAST cin.tie(NULL); ios::sync_with_stdio(false); int main() { FAST; int a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; if (a == c) { cout << e << " "; } else if (c == e) { cout << a << " "; } else { cout << c <...
ALGO
0.999984
3.384629
59af570a-6cc9-4c7b-9c87-30a3f17946d8
Nothing-avil/Leetcode
1598_Crawler_Log_Folder.cpp
#pragma GCC optimize("Ofast","inline","ffast-math","unroll-loops","no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native","f16c") auto init = []() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); return 'c'; }(); class Solution { public:...
ALGO
0.995828
4.871734
ece4f4b5-f221-4631-80e4-c54ebe811c37
RuffLogix/2110327-algorithm-design
solutions/da66_f1_linear_recurrence.cpp
#include <bits/stdc++.h> using namespace std; // Overpower approach struct Matrix { int n, m; vector<vector<long long>> arr; Matrix() { } Matrix(int n): n(n), m(n) { arr.resize(n, vector<long long>(m, 0)); for (int i=0; i<n; i++) arr[i][i] = 1; } Matrix(int n, int m): n(n)...
ALGO
0.999985
3.632663
676d4121-9b48-45c2-aed8-766068fbb383
SongmiLim/Algorithm
프로그래머스/1/12947. 하샤드 수/하샤드 수.cpp
#include <string> #include <vector> using namespace std; bool solution(int x) { bool answer = true; int sum = 0; string s = to_string(x); for (int i = 0; i < s.size(); i++) { sum += (int)(s[i] - '0'); } stoi(s) % sum == 0 ? answer = true : answer = false; return answer; }
ALGO
0.998344
5.469474
59ee406e-4c4e-49fb-ae36-0ecee2fdf347
shaShvat07/DSAstuff
bitmasking.cpp
#include <bits/stdc++.h> #define ll long long #define vi vector<int> #define pb(n) push_back(n) #define f(i, n) for (int i = 0; i < n; i++) #define ff(i, x, n) for (int i = x; i < n; i++) using namespace std; void fastio() { ios_base::sync_with_stdio(false); cin.tie(NULL); #ifndef ONLINE_JUDGE freopen("inp...
ALGO
0.999748
3.703971
0fdcc2a9-cc25-449a-95ea-513d10f4dbf8
aelfimow/trigonometric-formulas
formulas/formula61/fp80/lhs.cpp
#include "fp80.h" #include "lhs.h" #include <cmath> /** * Left Hand Side: * * @f[ * \cos{3\alpha} * @f] */ fp80 lhs(fp80 x) { fp80 const result = cosl(3.0L * x); return result; }
TOOL
0.987964
3.924133
d23f1682-105e-41af-8419-87cff6c34d3a
adkrgu/cpp
Stacks/Stack_from_scratch_array.cpp
#include <iostream> #include <string.h> using namespace std; #define n 20 class Stack { int *arr; int start; int end; public: Stack() { arr = new int[n]; start = -1; end = -1; } void push(int x) { if (end == n - 1) { cout << "Stack Overflow" << endl; return; } if (start == -1) start+...
ALGO
0.993168
3.927357
86af2233-4462-4b5e-afca-b6577b1bfcc4
sonapraneeth-a/competitive-programming_submissions
platforms/leetcode/practice/non-premium/medium/114__flatten-binary-tree-to-linked-list/solutions.cpp
// clang-format off /** * FILE DESCRIPTION * * Filename: 114__flatten-binary-tree-to-linked-list/solutions.cpp * Created on: 05 September 2021 * Last modified: 05 September 2021 * Author: sonapraneeth_a * Description: LeetCode submission for 'Flatten Binary Tree to Linked List' proble...
ALGO
0.999983
6.56531
9c47329d-6b9c-4aa8-a524-73c1769caa62
SilentCircle/silent-phone-android
silentphone2/support/zrtpcpp/zrtp/crypto/openssl/zrtpDH.cpp
/** Copyright (C) 2006, 2009 * * @author Werner Dittmann <<EMAIL>> */ #include <string.h> #include <openssl/crypto.h> #include <openssl/bio.h> #include <openssl/bn.h> #include <openssl/rand.h> #include <openssl/err.h> #include <openssl/dh.h> #include <openssl/evp.h> #include <openssl/ec.h> #include <openssl/ecdh....
ALGO
0.949079
4.656178
76662a30-e615-419b-a465-9b795739e6ea
Subhadip757/DSA-Journey
C++/Basics/Recursion/basics/sum.cpp
#include <iostream> using namespace std; int sum(int arr[], int size){ if(size == 0){ return 0; } if(size == 1){ return arr[0]; } return arr[0] + sum(arr+1, size - 1); } int main(){ int arr[5] = {3,1,8,2,5,}; int size = 5; int totalSum = sum(arr,size); cout<<totalS...
ALGO
0.999933
4.733691
02840e19-e9e0-4c56-880f-39753582c712
mdadil09/DSA
DSA-Sheet-Question/00-Basics/Basic-recursion/08- Print Fibonacci Series.cpp
#include <bits/stdc++.h> using namespace std; void fib(int n, vector<int> &ans) { if (n == 0 || n == 1) { ans.push_back(0); return; } if (n == 2) { ans.push_back(0); ans.push_back(1); return; } fib(n - 1, ans); ans.push_back(ans[n - 2] + ans[n - 3...
ALGO
0.999957
5.227099
61105444-c24d-45a6-ae7a-d17e4dc14190
seqan/seqan
demos/dox/index/maxrepeats.cpp
///A tutorial about finding maximal repeats. //![includes] #include <iostream> #include <seqan/index.h> using namespace seqan2; //![includes] //![init] int main() { String<char> myString = "How many wood would a woodchuck chuck."; typedef Index<String<char> > TMyIndex; TMyIndex myIndex(myString); //![i...
ALGO
0.997595
6.360319
4356cb9d-cafd-4bf8-942c-0c882c9caf8f
evialbert/LeetCode
1354-construct-target-array-with-multiple-sums/1354-construct-target-array-with-multiple-sums.cpp
class Solution { public: bool isPossible(vector<int>& target) { int n=target.size(); long long sum=0; priority_queue<int> pq; for(int i=0;i<n;i++){ sum+=target[i]; pq.push(target[i]); } while(pq.top()!=1){ int x=pq.top(); ...
ALGO
0.999955
5.194843
ce3adbf0-d6ad-4a9f-a4f1-940c47406e1b
Thenaidn/codetree_practice
241125/이동 가능한 점들의 쌍/pair-of-points-that-can-be-moved.cpp
#include <iostream> #include <algorithm> #include <vector> #include <tuple> #define MAX_N 1005 using namespace std; // 변수 선언 int dist[MAX_N + 1][MAX_N + 1]; int main() { // 정점의 수 : 5, 간선의 수 : 8인 그래프 int n = 5, m = 8; cin >> n >> m; int p,q; cin >> p >> q; // dist 초기값을 전부 아주 큰 값으로 설정 // INT_MAX ...
ALGO
0.999928
4.106672
0a882161-2f33-4bf4-9891-bc51936d473c
liujiapeng678/AlgorithmPracticing
P2947 [USACO09MAR] Look Up S/9.19.cpp
#include<bits/stdc++.h> using namespace std; const int N = 100010; int n, h[N]; int stk[N], tt; int ans[N]; int main() { cin >> n; for (int i = 1; i <= n; i++) cin >> h[i]; for (int i = n; i;i--) { while (tt && h[stk[tt]] <= h[i])tt--; if (tt)ans[i] = stk[tt]; stk[++tt] = i; } for (int i = 1; i <= n; i+...
ALGO
0.999978
4.011313
1d904d90-be12-4816-8bc5-e13eb111f99f
tarunregmi/dsa-cpp
list/singly-linked-list.cpp
template <typename T> struct Node { T data; // actual data of the node Node* next; // pointer to next node Node(T value): data(value), next(nullptr) {} // constructor }; template <typename T> class SinglyLinkedList { private: Node<T>* head; public: SinglyLinkedList(): head(nullptr) {} // constructor ...
ALGO
0.915245
4.560988
e479e8ab-f45b-4c4e-8db6-7a5167d77372
anjupathak03/DSA-QUESTIONS
cppppneww/countnoofzerosandones.cpp
#include<iostream> using namespace std; int main(){ int arr[] ={0,1,0,0,0,0,0,1,1,1,1,0,1,0,1}; int size = sizeof(arr)/sizeof(arr[0]); int noofzero=0; int noofone=0; for(int i=0; i<size; i++){ if(arr[i]==0){ noofzero++; } if(arr[i]==1){ noofone++; ...
ALGO
0.999667
3.587922
2140ddc3-faf3-42cd-8e16-3ae4f182ca80
HyeongDo/Algorithm
boj_1049_2.cpp
#include<iostream> using namespace std; int n,m,six=1001,one=1001,x,y,money; int main(void){ cin>>n>>m; for(int i=0;i<m;i++){ cin>>x>>y; six=min(x,six); one=min(y,one); } while(n>0){ if(n>=6){ if(six>one*6){ money+=one*n; n-=n; }else{ money+=six; n-=6; } }else{ if(six<one*n){...
ALGO
0.999905
3.793532
cf2054ab-1433-4f60-9341-affb3d37a0e4
shermz-lim/kattis-problems
faultyrobot.cpp
#include <bits/stdc++.h> #include <unordered_set> #include <unordered_map> using namespace std; #define ar array #define ll long long void solve() { int n,m; cin>>n>>m; vector<pair<int,int> > adj_list[2][n]; for(int i=0;i<n;i++){ adj_list[0][i]=vector<pair<int, int> >(); adj_list[0][i...
ALGO
0.9999
4.209796
97e7a48f-9fd4-4f49-8298-e12bbe085d7a
wreuvekamp/Asg3-TattooApp
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
89837fb5-07cb-40fa-99b4-59637f860b82
arnald999/gfg
Tree/identicalbinarytree/ideniter.cpp
#include <iostream> #include <stack> using namespace std; class Node { public: int data; Node *left, *right; Node(int n) { this->data = n; this->left = this->right = NULL; } }; bool isIdentical(Node *x, Node *y) { if (x == nullptr && y == nullptr) return true; if (x == nullptr) return false...
ALGO
0.999946
5.327178
d1d76744-55a6-40b9-bc37-a16edcb37d8b
kht9544/2024.5.30Unreal_kht
C++/Function/RockPaperScissors.cpp
#include <iostream> using namespace std; enum RSP { SCISSORS = 1, ROCK = 2, PAPER = 3 }; int main() { srand(time(NULL)); int playerNum = 0; int cumNum = 0; cin >> playerNum; cumNum = (rand() % 3) + 1; return 0; }
ALGO
0.997958
3.329535
19f7449a-55d7-46b1-94c4-52838993f313
xxioachou/ACM
cf_problems/CF1674F.cpp
#include <bits/stdc++.h> #define x first #define y second #define sz(x) ((int)x.size()) using namespace std; typedef long long ll; typedef pair<int, int> PII; const int inf = 0x3f3f3f3f; const ll INF = 1e18; struct bitTree { int n; vector<int> tr; bitTree() {} bitTree(int sz) : n(sz) { tr.resize(n + 1, 0); } ...
ALGO
0.999282
3.781594
b642f30e-69df-4dbe-ab54-7ff0f76cabf7
mguentner/rockbox
utils/zenutils/source/update_patch/main.cpp
#include <iostream> #include <iomanip> #include <cstdio> #include <getpot/GetPot> #include <file.h> #include <updater.h> #include <utils.h> #include <pe.h> static const char VERSION[] = "0.1"; void print_version() { std::cout << "update_patch - Patches a Creative firmware into an updater" " exe...
TOOL
0.931763
5.986365
4815b5a8-a7f1-49f0-82c6-61c5ddd5c4f2
apl-mhd/problemSolving
Data Structure and Algo Lab/Call By reference-ZTJ0nkLG.cpp
#include <stdio.h> #include <stdlib.h> int swap(int *a, int *b){ int temp; temp = *a; *a = *b; *b = temp; printf(" user Fun: a = %d b = %d\n", *a, *b); // *a=10; // *b=20; } int main() { int a=100, b=200; swap(&a, &b); printf("main: a = %d b = %d\n",a,...
ALGO
0.990095
3.076406
475e146b-3813-47de-a875-1fe76cd48e99
listentodella/Android
c++/模板/函数模板/max.cpp
#include "iostream" #include "string" #include "unistd.h" using namespace std; #if 0 int &max(int &a, int &b) { return (a < b)? b : a; } double &max(double &a, double &b) { return (a < b)? b : a; } float &max(float &a, float &b) { return (a < b)? b : a; } #endif template<typename T> T &mymax(T &a, T &b) { st...
ALGO
0.885109
3.902141
bf86f3a7-e612-4dee-a0d5-14ee8893ec48
anantsingh404/Leetcode
2090-number-of-ways-to-arrive-at-destination/number-of-ways-to-arrive-at-destination.cpp
class Solution { public: int countPaths(int n, vector<vector<int>>& roads) { vector<pair<int,int>>adj[n]; for(int i=0;i<roads.size();i++) { adj[roads[i][0]].push_back({roads[i][1],roads[i][2]}); adj[roads[i][1]].push_back({roads[i][0],roads[i][2]}); } ...
ALGO
0.999969
5.665525
faf5a8a4-9bb2-4240-ba0f-7c2c0bcdc7ff
b4bekkiee/DSA-Prep
ARRAY/sortColors.cpp
#include <iostream> using namespace std ; void sortColors( int arr[] , int n ) { int start = 0 ; int end = n -1; int mid = 0 ; while(mid <= end) { if(arr[mid] == 0 ) { swap(arr[start] ,arr[mid] ) ; start++; mid++; } else if(arr[mid] ==1) { mid++ ; } else { swap(arr[mid],arr[end]) ;...
ALGO
0.999733
5.072932
a14e81fc-99a3-446f-9c8d-864a879de7f5
cooler-SAI/wow-Revelion-v2
dep/recastnavigation/Recast/RecastFilter.cpp
#define _USE_MATH_DEFINES #include <math.h> #include <stdio.h> #include "Recast.h" #include "RecastAssert.h" /// @par /// /// Allows the formation of walkable regions that will flow over low lying /// objects such as curbs, and up structures such as stairways. /// /// Two neighboring spans are walkable if: <tt>rcAb...
ALGO
0.984079
6.787532
d8ff4423-073c-4c6b-880a-36765630d779
SehoonKwon/Study_Baekjoon
BJ_2056.cpp
#include <iostream> #include <queue> #include <vector> #include <algorithm> using namespace std; int N; int indegree[10001]; int val[10001]; int wait[10001]; vector<int> v[10001]; struct point { int Node; int T; }; void input() { cin >> N; for (int i = 1; i < N + 1; i++) { int M; cin >> val[i] >> M; indeg...
ALGO
0.99986
4.324999
3c41501f-08af-4fa5-9cb9-217b3a9b87d2
oxygen-hunter/Flashboom
data/leetcode_cpp/smallest-k-length-subsequence-with-occurrences-of-a-letter.cpp
// Time: O(n) // Space: O(n) class Solution { public: string smallestSubsequence(string s, int k, char letter, int repetition) { string stk; vector<int> suffix(size(s) + 1); for (int i = size(suffix) - 2; i >= 0; --i) { suffix[i] = suffix[i + 1] + (s[i] == letter); } ...
ALGO
0.999987
5.872564
b694a84e-9932-453f-9575-cbaa99cdd2d4
aboubakr-jelloulat/problem-solving
Training/Level 1/Week 1/G.rangesum2d.cpp
/** * CP-Templates - Comprehensive Competitive Programming Template * Author: [Aboubakr jelloulat] * GitHub: [aboubakr-jelloulat] * * Usage: Include this file at the beginning of your solution * Platforms: LeetCode, Codeforces, and more ... */ #include <algorithm> #include <cassert> #include <cmath> #include <...
ALGO
0.999585
4.20255
287c62bb-58fc-4186-b592-7c2ca4a972b4
jgharehchamani/graphos
GraphOS/Enclave/OMAP/ObliviousOperations.cpp
#include "ObliviousOperations.h" #include "../Enclave.h" #include "Enclave_t.h" long long ObliviousOperations::storeSingleBlockSize; long long ObliviousOperations::single_block_clen_size; unsigned long long ObliviousOperations::blockSize; size_t ObliviousOperations::single_block_plaintext_size; bytes<Key> ObliviousOpe...
ALGO
0.874251
4.136877
96da489b-c6f8-4162-aeeb-ad3dede75897
Yosuamuliawan19/algorithm-bank
Leetcode_submissions/problems/minimum_moves_to_equal_array_elements_ii/solution.cpp
class Solution { public: int minMoves2(vector<int>& nums) { sort(nums.begin(), nums.end()); int median = nums[nums.size()/2], ans = 0; for (int cur: nums){ ans += abs(cur - median); } return ans; } };
ALGO
0.999925
5.852567
a21fef07-4aa2-4a94-880a-2de9aefac65d
CherMiTTT/litcode-tasks
2490 - Circular Sentence/solutions.cpp
#include "solution.h" #include <string_view> bool Solution::isCircularSentenceNaive(std::string sentence) { if(sentence.front() != sentence.back()) { return false; } const size_t n = sentence.size(); for(size_t i = 1; i < n-1; i++) { if(sentence[i] == ' ') { if(sentence[i-1...
ALGO
0.999544
6.383715
ad982eaf-4bda-4fd6-93aa-8e670eed8be4
sinian666/codes_102_4
cpp_副本56/chapter_binary_search/binary_search.cpp
/** * File: binary_search.cpp * Created Time: 2022-11-25 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 二分查找(双闭区间) */ int binarySearch(vector<int> &nums, int target) { // 初始化双闭区间 [0, n-1] ,即 i, j 分别指向数组首元素、尾元素 int i = 0, j = nums.size() - 1; // 循环,当搜索区间为空时跳出(当 i > j 时为空) while (i...
ALGO
0.999882
6.243432
1956f2fa-7217-4300-bf16-f37e8f71a402
questras/algorithms
problems/ZaprzyjaźnijSięZAlgorytmami/odchudzani/odchudzani.cpp
#include<iostream> using namespace std; int main() { int n; cin>>n; long long int differences[n-1]; int previous; int weight; cin>>previous; for (int i = 0; i < n-1; ++i) { cin>>weight; differences[i] = -(weight-previous); previous = weight; } long long int previousSum = 0; long long int sum = 0; ...
ALGO
0.999924
3.331269
4384e79a-870a-4418-9633-4453c345adaf
Sabuj-Kumar/MyCodes
sabuj/Rahul vai/project rahul/mahi/octal_bin.cpp
#include<stdio.h> #include<conio.h> int main() { int n,i,c; int rem,sum=0; printf("\nEnetr the value in octal :"); scanf("%o",&n); for(i=1;n!=0; ) { rem = n%2; sum += rem*i; n = n>>1; i *=10; } printf("\nThe binary value is %d",sum); getch(); re...
ALGO
0.996403
3.696067
3f0b89b1-33fd-494a-93b2-aeb95829dccc
jishu-yadav/CrackYourPlacement
890-find-and-replace-pattern/890-find-and-replace-pattern.cpp
class Solution { public: bool check(string s, string t){ map<char,char>mp; for(int i=0;i<s.size();i++){ if(mp.find(s[i])!=mp.end()){ if(mp[s[i]]!=t[i]) return false; } else mp[s[i]]=t[i]; } retur...
ALGO
0.999943
6.215233
505eb6ed-7fcd-44b3-96d5-0aca722d7486
hkatkade/CompetitiveProgramming-
Codeforces/candies.cpp
#include<bits/stdc++.h> #define ll long long int using namespace std; int main() { ll t; cin >> t; while(t--) { ll n,k,i,x; cin >> n; for (i = 2; i < 30;i++) { x=(pow(2, i - 1) - 1); if(n % x == 0){ cout << n / x << "\n"; ...
ALGO
0.999906
3.761012
918fc02e-3e09-4321-915a-9746a8d2bc30
Abhik-Chakraborty/DSA
1567-maximum-number-of-vowels-in-a-substring-of-given-length/1567-maximum-number-of-vowels-in-a-substring-of-given-length.cpp
class Solution { public: int maxVowels(string s, int k) { map<char, bool> vowels; vowels['a'] = true; vowels['e'] = true; vowels['i'] = true; vowels['o'] = true; vowels['u'] = true; int maxVowelCount = 0; int currentVowelCount = 0; fo...
ALGO
0.999994
6.360724
bb0d3bff-e832-4552-b949-e6c6ad5d0df5
GCU-ICPC/ICPC_2024
Training/solved/Set#7/collatz_brute_force_lky.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll cal(ll n) { ll length = 1; while (n != 1) { if (n % 2 == 0) { n /= 2; } else { n = 3 * n + 1; } length++; } return length; } ll find_m...
ALGO
0.99994
4.751007
eb0e8a1f-4b32-439b-bf55-0ed1af70fa7f
HardikDDeore12/Leetcode
670-maximum-swap/maximum-swap.cpp
class Solution { public: int maximumSwap(int n) { vector<int> v; while(n > 0){ int digit = n % 10; v.push_back(digit); n /= 10; } reverse(v.begin(), v.end()); vector<int> ans = v; sort(ans.begin(), ans.end(), std::greater...
ALGO
0.999965
6.530771
10490aff-c66f-435f-9d57-2a7520f99c88
kyrahul2107/Data_Structure
Recursion/PowerSet.cpp
#include <iostream> #include <vector> using namespace std; // print the elements void print(vector<int> print) { for (int i = 0; i < print.size(); i++) { cout << print[i] << " "; } } void powerSet(vector<int> arr, vector<int> output, int i, int size) { // base case if (i > size) { ...
ALGO
0.999046
4.99003
d9ebb17b-7c23-4565-ba4c-641b22e0f411
ooleksyuk/CarND-MPC-Project
src/Eigen-3.3/bench/sparse_cholesky.cpp
// #define EIGEN_TAUCS_SUPPORT // #define EIGEN_CHOLMOD_SUPPORT #include <iostream> #include <Eigen/Sparse> // g++ -DSIZE=10000 -DDENSITY=0.001 sparse_cholesky.cpp -I.. -DDENSEMATRI -O3 -g0 -DNDEBUG -DNBTRIES=1 -I /home/gael/Coding/LinearAlgebra/taucs_full/src/ -I/home/gael/Coding/LinearAlgebra/taucs_full/build/lin...
ALGO
0.992059
4.147974
b54e60c0-b0ba-4828-8a62-7d5a8058340d
yashdubey369/Codef
A_Odd_One_Out.cpp
#include<bits/stdc++.h> using namespace std; #define int long long int signed main(){ ios::sync_with_stdio(0); cin.tie(0); int t; cin>>t; while(t--){ int n,m,k; cin>>n>>m>>k; if(n==m) cout<<k<<endl; else if(k==m) cout<<n<<endl; else cout<<m<<endl; } }
ALGO
0.999956
3.730259
9a991470-f791-4946-b310-2fb253e3d91d
kcchawla85/Quiz_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.9988
6.76073
55d3cb9b-03b9-4b20-aebd-3b86b10e7f64
nikhilsharma-github/CP-Problems-Repo
A_Polycarp_and_Sums_of_Subsequences.cpp
#include <bits/stdc++.h> using namespace std; #define deb(x) cout << #x << "=" << x << endl struct node { int data; struct node *next; // struct node *prev; node(int value) { data = value; next = NULL; // prev=NULL; } }; void plist(node *temp) { while (temp != NULL) ...
ALGO
0.999879
3.155904
a5128933-b1b4-46c3-abb7-bb41c7278565
muhammadhasan01/cp
Online Judge/Codeforces/Contests/EDU-DIV2/EDU-DIV2-94/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 5e3 + 5; int n, a[N]; ll solve(int l, int r) { if (l == r) return (a[l] > 0); ll ret = 0; int mini = 1e9; for (int i = l; i <= r; i++) mini = min(mini, a[i]); if (mini >= r - l + 1) return (r - l + 1); int c...
ALGO
0.999992
4.712651
d00d0a66-df78-4c11-ac90-a7943bb5a1b6
PlasmaControl/FreeMHD
OpenFOAM-v2206/ThirdParty/sources/kahip/kahip-3.14/lib/tools/quality_metrics.cpp
/****************************************************************************** * quality_metrics.cpp * * * Source of KaHIP -- Karlsruhe High Quality Partitioning. * Christian Schulz <<EMAIL>> *****************************************************************************/ #include <algorithm> #include <cmath> #i...
ALGO
0.980632
5.755942
9af86d7b-c3ba-42ae-be36-81f47137c8e3
ssergomol/SafeBoard-Assignments
Hash-Cracker/main.cpp
#include <iostream> #include <vector> #include <cstdio> #include <fstream> #include <thread> #include <openssl/evp.h> #include <openssl/md5.h> #include "thread_pool.cpp" class HashCracker { public: HashCracker(const std::string& md5Hash, const std::string& configFile) : md5Hash(md5Hash), configFile(con...
ALGO
0.955124
5.765671
be587ade-e99b-424f-91f5-a48a267c763e
vishukamble/CPlusPlusPractice
HackerRank/30day challenge/Day 6 staircase.cpp
/* Author: Vishwanath Kamble Practice Session C++ Programs Website: www.geekstarts.info , www.vishukamble.info Date: 12/20/2015 Program: Staircase Desc: https://www.hackerrank.com/contests/30-days-of-code/challenges/day-6-lets-review */ #include <iostream> using namespace std; int main() { int n = 0; cin>>n; ...
ALGO
0.999693
4.073725
03bf967e-79d7-42db-a05b-8ffe9bd41a65
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Gemma/top0-100/stamping-the-sequence-Solution.movesToStamp/177887_DoS_Overflow.cpp
gs_heap_alloc_bytes(gs_memory_t * mem, uint size, client_name_t cname) { gs_malloc_memory_t *mmem = (gs_malloc_memory_t *) mem; byte *ptr = 0; #ifdef DEBUG const char *msg; static const char *const ok_msg = "OK"; # define set_msg(str) (msg = (str)) #else # define set_msg(str) DO_NOTHING #endif ...
TOOL
0.979985
5.184487
31633526-b703-4bf8-8861-570b0e580a3e
nobinov/image_resizer_server
include/boost_1_75_0/libs/graph/test/bfs_cc.cpp
#include <boost/concept_archetype.hpp> #include <boost/graph/breadth_first_search.hpp> #include <boost/graph/graph_archetypes.hpp> int main() { using namespace boost; typedef default_constructible_archetype< sgi_assignable_archetype< equality_comparable_archetype<> > > vertex_t; { t...
TEST
0.954126
5.406086
a5bd526c-ad80-453a-9d0e-54673bfedb95
achievable-dream/FIRST
C++/template.cpp
#include <iostream> using namespace std; template <typename T,typename U> auto max(T a,U b) { return (a>b)? a : b; } int main(void) { std::cout << max(1.2,2.29139); }
ALGO
0.977482
3.671892
36e4748e-185d-4ce8-8579-6559d350302a
ssri07/Hacktoberfest22
cp/118-pascals-triangle/118-pascals-triangle.cpp
class Solution { public: vector<vector<int>> generate(int numRows) { vector<vector<int>> ans; vector<int> temp; temp.push_back(1); ans.push_back(temp); if(numRows==1) { return ans; } temp.push_back(1); ans.push_back(temp); i...
ALGO
0.99999
5.546815
a6c2d685-8229-4c4f-99f2-8d9c764e8d64
HardyFateHAHA/BSU-Algorithms
Canonical form (according to the adjacency matrix)/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); freopen("input.txt" , "r" , stdin); freopen("output.txt" , "w" , stdout); int n , a; cin >> n; vector<int> ans(n + 1, 0); for(int i = 1 ; i <= n...
ALGO
0.999743
3.235094
012fd0af-8df2-4a40-9042-efd6075a333b
BoyiZhao/CPP_FinalExam
CCollectionStationOperation.cpp
// // Created by YuKung on 2022/12/25. // #include "CCollectionStationOperation.h" #include "CCollectionPoint.h" #include <random> using namespace std; int CCollectionStationOperation::ordinaryPersonCount = 0; int CCollectionStationOperation::policeCount = 0; int CCollectionStationOperation::totalCount = 0; int CCol...
DATA
0.859408
3.908489
15de9f3e-29cf-4c94-a070-87207de9824a
GiulioTani/InnovationProcessesInference
src/bookdkl.cpp
#include "lib/bookdkl.hpp" #include <math.h> #include <iostream> #include <array> #define CROSSENTROPY namespace bookprob { dkl_book::dkl_book(const dkl_book &oth) : dkl_book::book(oth) { cache_valid = oth.cache_valid; if (cache_valid) { frequency = oth.frequency; ...
ALGO
0.998855
6.44852
732034a2-5f7f-48db-ae91-7b8c20ef63ef
imaiguo/VTK.9.3.0
ThirdParty/libproj/vtklibproj/src/gauss.cpp
#define PJ_LIB__ #include <math.h> #include <stdlib.h> #include "proj.h" #include "proj_internal.h" #define MAX_ITER 20 namespace { // anonymous namespace struct GAUSS { double C; double K; double e; double ratexp; }; } // anonymous namespace #define DEL_TOL 1e-14 static double srat(double esinp, d...
ALGO
0.999984
6.043477
33992750-92af-4e10-a29f-6c289f72c4d5
tomo1010blue/AtCoder
ABC/ABC187/C.cpp
#include <bits/stdc++.h> #include <atcoder/all> #define fi first #define se second #define repl(i, l, r) for (int i = l; i < r; ++i) #define rep(i, r) repl(i, 0, r) #define pb push_back #define eb emplace_back #define all(v) (v).begin(),(v).end() #define rall(v) (v).rbegin(),(v).rend() #define sz(x) ((int) (x).size()) ...
ALGO
0.999416
4.634267
e0f7c0ab-c09d-4015-b52f-9855ca97fb29
chriswengqi/kattis
raidteams/raidteams.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define int ll typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<string> vs; typedef vector<double> vd; typedef vector<char> vc; typedef unsigned long long ull; typedef pair<int, int> pii; typedef vector<pair<int, int>> vpii; #def...
ALGO
0.999967
4.333186
ff03e3a0-e28f-497d-be7e-8b1bb2d2a571
chosh95/STUDY
BaekJoon/2020/숨바꼭질 5.cpp
#include <iostream> #include <queue> #include <cstring> using namespace std; int N, K, res = -1; bool visit[2][500001] = { false }; //Ȧ°, ¦° void bfs() { queue<int> q; q.push(N); int time = 1; visit[0][N] = true; while (!q.empty()) { K += time; if (K > 500000) return; if (visit[time % 2][K]) { res = time...
ALGO
0.999981
3.946091
17f2ffde-4df1-4e3f-9b04-0c7c977e6765
Cgarg9/basic_dsa_cpp
Sliding Window/longestSubstring.cpp
// find longest substring without repeating characters #include <bits/stdc++.h> using namespace std; #define endl "\n"; #define ll long long int; int main() { string s; cin >> s; unordered_set<char> st; int l = 0, r = 0; int maxi = -1; while (r < s.length()) { if (st.find(s[r]) != st.e...
ALGO
0.999858
4.794326
416f2372-1cf9-4583-a1ee-63f6a0effd8e
GuacheSuede/MSSubmission1234567890
submission/rsi/boost_1_69_0/libs/spirit/example/qi/compiler_tutorial/calc6.cpp
/////////////////////////////////////////////////////////////////////////////// // // Yet another calculator example! This time, we will compile to a simple // virtual machine. This is actually one of the very first Spirit example // circa 2000. Now, it's ported to Spirit2. // // [ JDG Sometime 2000 ] pre-boo...
ALGO
0.994937
7.70277
e5525739-5c77-4db1-828c-529179539bdd
Johnsoncodeman/csp-j
沙漠关卡/main.cpp
// // main.cpp // 沙漠关卡 // // Created by zhongwen wang on 2022/7/18. // #include <iostream> using namespace std; int main(int argc, const char * argv[]) { int n,q; cin>>n; char s[n*2]; cin>>s; cin>>q; for(int i=0;i<q;i++){ int a,b,c; cin>>a>>b>>c; if(a==1){ ...
ALGO
0.999973
4.287909
26a35b19-5204-4cdb-a765-448eb4a50b8e
matheushenriqq/ling_prog
PRATICA_1/circunferencia_retangulo.cpp
#include <iostream> using namespace std; int main() { char opcao; cout << "Digite 'c' para calcular circulo ou 'r' para calcular retangulo: \n"; cin >> opcao; if (opcao == 'c') { float raio, circunf, area; const float pi = 3.14; cout << "Digite o raio do circulo: \n"; ...
TOOL
0.957842
4.014783
e2bb32b4-9f9f-4a3b-a9e2-3e50a6e56e06
jaredramey/AutomationTest_Playground
Engine/Source/ThirdParty/astcenc/4.2.0/Source/astcenc_weight_align.cpp
#if !defined(ASTCENC_DECOMPRESS_ONLY) /** * @brief Functions for angular-sum algorithm for weight alignment. * * This algorithm works as follows: * - we compute a complex number P as (cos s*i, sin s*i) for each weight, * where i is the input value and s is a scaling factor based on the spacing between the weigh...
ALGO
0.999343
7.377619
d3725159-7021-4cc0-bef7-efd7eb062ab9
lpre/Fastcgi-Container
library/request_filter.cpp
// Fastcgi Container - framework for development of high performance FastCGI applications in C++ // Copyright (C) 2011 Ilya Golubtsov <<EMAIL>> (Fastcgi Daemon) // Copyright (C) 2015 Alexander Ponomarenko <<EMAIL>> #include <unordered_map> // #include "settings.h" #include "details/request_filter.h" #include "fastc...
TOOL
0.946001
6.466146
3a22ac32-f677-4a60-8019-f83ac970677b
bingps/llvm-project
libcxx/test/std/containers/sequences/forwardlist/forwardlist.ops/merge_rvalue.pass.cpp
// UNSUPPORTED: c++03 // <forward_list> // void merge(forward_list&& x); #include <forward_list> #include <functional> #include <iterator> #include <vector> #include <cassert> #include "test_macros.h" #include "min_allocator.h" /// Helper for testing a stable sort. /// /// The relation operator uses \ref a. /// Th...
TEST
0.958986
6.962296
d5b206cc-dc21-4bfe-884d-e99f59232635
DM164/flutter-beispiele-wfo
input_beispiel/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.998709
6.785645
ad25a473-7199-4089-9715-e75bb662b548
ishandutta2007/codeforces
kostia244/normal/1556/F.cpp
// Problem: F. Sports Betting // Contest: Codeforces - Deltix Round, Summer 2021 (open for everyone, rated, Div. 1 + Div. 2) // URL: https://codeforces.com/contest/1556/problem/F // Memory Limit: 256 MB // Time Limit: 4000 ms // // Powered by CP Editor (https://cpeditor.org) #pragma GCC optimize("Ofast,unroll-loops")...
ALGO
0.999978
4.687989
5f0fd271-1bdf-4964-a744-60821284f6fa
oldlick/CompetitiveProgramming
atcoder/3 ABC/258/F.cpp
// ------------------------------------------------------------------------------- // // ------------------------------------------------------------------------------- // FileName : F.cpp // Version : ver 1.0 // Date : 2022-07-02 Sat 20:47:02 // -------------------------------------------------------------------...
ALGO
0.999672
3.527396
bc7419e3-9b6e-4d98-85b2-884c2dc73ec7
jarvis-huang/dbscan
src/utils.cpp
#include <iostream> #include <string> #include <vector> #include <cmath> #include <boost/format.hpp> #include "dbscan/matplotlibcpp.h" // Plotting #include "dbscan/utils.h" // utility functions using std::vector; using std::string; namespace plt = matplotlibcpp; void MyTimer::tic() { t_m.stop(); t_m.resume();...
ALGO
0.994698
4.624849
078d3cd4-7169-4f14-917a-a5877170f205
Seizzzz/DailyCodes
Course 201909/csapp/3.63.cpp
#include <bits/stdc++.h> using namespace std; long switch_prob(long x, long n){ long result = x; switch(n){ case '2' case '0':{ result = 8 * x; break; } case '3':{ result = x; result >>= 0x3; break; } case '4':{ result = x; result <<= 0x4; result -= x; x = result; x *= x; ...
ALGO
0.999421
3.595332
490c0951-3eba-4bd3-a187-bf2ee40f09c2
tridibsamanta/Codeforces_Solutions
1550B.cpp
/* ~ Author : @tridib_2003 */ #pragma GCC optimize("O3") // #pragma GCC optimize("Ofast") // #pragma GCC target("avx,avx2,fma") #include<bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_orde...
ALGO
0.999772
4.905246
8554d157-d618-4b16-be17-119b4eb20766
Divyanshu-Verma0/LeetCode
0664-strange-printer/0664-strange-printer.cpp
class Solution { public: int strangePrinter(string s) { int n = s.length(); vector<vector<int>> dp(n, vector<int>(n, INT_MAX)); for(int i=0; i<n; i++) dp[i][i] = 1; for (int l = 2; l<n+1; l++) { for(int i=0; i<n-l+1; i++) { ...
ALGO
0.999979
5.209507
a0b57469-6f9a-4c1f-8f6c-91463faba504
sgovil5/competitive-programming
CSES/Searching and Sorting/Apartments.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back const int maxn=2e5+10; int n,m,k,a[maxn],b[maxn],ans; int main(){ cin >> n >> m >> k; for (int i=0;i<n;++i) cin >> a[i]; for (int i=0;i<m;++i) cin >> b[i]; sort(a,a+n); sort(b,b+m); int i=0,j=0; while (i<n && j<m){ if (...
ALGO
0.999914
3.522625
80f01b77-77ef-426a-ac65-2dbfe71e3801
Sypacije/Inf-and-prog1
Задание 1.cpp
#include <conio.h> #include <iostream> #include <math.h> #include <stdio.h> using namespace std; int main() { int f = 1; int ds; float x, y, res; char op; cout << "\nIf you want to calculate sin, cos, sqrt or ln please type 1.\nIf you want to calculate +, -, * please type 2." << endl; cin >> ds; if (ds == 1) ...
TOOL
0.929737
3.201276
2bdc67f6-2de9-4ac9-94f2-0e2efabe6aff
alexandraback/datacollection
solutions_1673486_0/C++/Sweetdumplings/a.cpp
#include <cstdio> #include <cstring> int n; double p[200]; void Main(){ int a,b; scanf("%d%d",&a,&b); for (int i=1;i<=a;++i) scanf("%lf",p+i); //keeping typing double ans1=0; double right=1; for (int i=1;i<=a;++i) right*=p[i]; ans1=right*(b+1-a)+(1-right)*(b+2-a+b); //retype double ans2=2+b; if (ans2<ans1) a...
ALGO
0.999342
3.176806
838dd53b-1013-40be-818b-11fe27570108
19Ishan/Learning_DSA
recursion.cpp
# include<iostream> # include<vector> # include<limits.h> using namespace std; //LeetCode 70 CLIMBING STAIRS /* int climbStairs(int n) { // n = 0 and n = 1 are the base cases //base cases // if(n == 0){ // return 1; // } // if(n == 1){ // return 1; //...
ALGO
0.999638
3.211882
ec802acc-97ef-449e-91b6-9fc70c8f8026
sharmaadityaHQ/CPP-and-Algorithms
C++/sortVector.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a.begin(), a.end()); for (int i = 0; i < n; i++) { cou...
ALGO
0.999775
3.849353
5f3f5dbb-511d-4fd2-b640-dfa22ba2df63
raincross7/code-similarity
codes/train_code/problem478/problem478_358.cpp
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < (int)(n); i++) #define REPLL(i, n) for (ll i = 0; i < (ll)(n); i++) using namespace std; template<class T>inline bool chmax(T &a, const T &b){if(a < b){a = b; return 1;}return 0;} template<class T>inline bool chmin(T &a, const T &b){if(a > b){a = b; return ...
ALGO
0.9999
3.196587
cd139c7b-0e10-4817-92cf-c203efc24ba5
lukasmonk/lucaschess
Engines/Linux32/_tools/polyglot/src/line.cpp
// line.cpp // includes #include <cstring> #include "board.h" #include "line.h" #include "move.h" #include "move_do.h" #include "move_legal.h" #include "san.h" #include "util.h" // constants static const bool Strict = false; // false static const bool UseDebug = false; // false static const int StringSize = 1024...
TOOL
0.943378
6.132314
9bcdd5b3-4f3f-42f9-a78e-5ce878b3c984
andrewaarestad/ode-system-fitting-with-boost-and-nlopt
boost_1_77_0/libs/regex/example/grep/grep.cpp
#include <boost/regex.hpp> #include <iostream> #include <fstream> #include <string> #include <vector> #ifdef BOOST_MSVC #pragma warning(disable:4512 4244) #endif #include <boost/program_options.hpp> namespace po = boost::program_options; int after_context; int before_context; bool print_byte_offset; bool count_only...
TOOL
0.929158
6.486158
8da2fb8f-6ad8-446f-8ec5-b0bfb9bccc1a
prayag29-sahu/3rd_sem_C-training-
3rd sem C++ training/3_Assign/5.cpp
// WAP to display first 20 odd numbers. #include<iostream> using namespace std; int main() { int i; i=1; for (int j = 1; j <= 20;j++) { cout<<i<<endl; i=i+2; } return 0; }
ALGO
0.95649
3.972311
a7617d33-7511-47f7-89f5-b233628d862f
Thuoq/CodeForces-Practice-Daily
Code-Force-Daily/C++Code/A.DieRoll.cpp
// Link Problem:https://codeforces.com/problemset/problem/1325/A?fbclid=IwAR34yTacg2YefIgmnMTlohTq4K8u7VSNd91Fy3Lh31CHmTFTMLZCChNdso4 #include<iostream> #include<string> using namespace std; int main() { int y,w; cin >> y >> w; const string probability[7] = {"", "1/1", "5/6", "2/3", "1/2", "1/3", "1/6...
ALGO
0.999452
4.016039
e8b3ae24-0bd4-4657-a17d-8b52906cc0a5
ishandutta2007/codeforces
felerius/normal/1669/F.cpp
// Eating Candies (https://codeforces.com/contest/1669/problem/F) #pragma GCC optimize("fast-math") #include <bits/stdc++.h> #ifdef LOCAL # include <dbg.h> #else # define dbg(...) do {} while (0) #endif #define cp_lib_4th(_1, _2, _3, x, ...) x #define cp_lib_rep(i, l, r) for (int i = (l); (i) < (r); ++...
ALGO
0.999953
5.461249
e757ac7d-14b9-482a-b0a5-0e4d4cbae47c
daimaren/PowerTask
sdk/src/main/cpp/thirdparty/SoundTouch/source/SoundTouch/sse_optimized.cpp
#include "cpu_detect.h" #include "STTypes.h" using namespace soundtouch; #ifdef SOUNDTOUCH_ALLOW_SSE // SSE routines available only with float sample type ////////////////////////////////////////////////////////////////////////////// // // implementation of SSE optimized functions of class 'TDStretchSSE' // ///...
TOOL
0.944895
6.135213
1906cb31-a5e3-489d-921c-081007ec4aa1
raincross7/code-similarity
codes/train_code/problem452/problem452_193.cpp
#include <bits/stdc++.h> using namespace std; //#define plong pair<long,long>; using plong=pair<long,long>; int main(){ int N;cin>>N; long K;cin>>K; vector<plong> A(N); for(int i=0;i<N;i++){ long X,Y;cin>>X>>Y; A.at(i)=make_pair(X,Y); } sort(A.begin(),A.end()); int X=0; long count=0; int ans...
ALGO
0.999958
4.33839
af8332ba-560c-4acf-9642-a5504e11ea94
Enesctnts/Cplusplus
Dizi elemanlarinin terten yazilmasi/main.cpp
#include<iostream> using namespace std; void diziyaz(int dizi[],int n) { cout<<"\nDizinin Elamanlari Yazdirilmasi\n"; for (int i = 0; i < n; i++) { cout<<"Dizinin "<< i+1 << " elamani: "<<dizi[i]<<endl; } } void tersyaz(int dizi[],int n) { cout<<"\nDizinin Elamanlarinin Tersten Yazdirilmasi\...
ALGO
0.992505
4.643264
a8305d4c-6dfa-4fe6-b0c9-4acd023424a6
gizeminci/TPB_20141010_ParallelVersionWorking
three-particle-binding_new/src/electrokinetics_pdb_parse.cpp
/* vim: set ts=8 sts=2 sw=2 et: */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "electrokinetics_pdb_parse.hpp" #include <iostream> #include <string> #include <sstream> #ifdef EK_BOUNDARIES /* Replacements for bool variables */ const int pdb_SUCCESS = 0; const int pdb_ERROR = ...
ALGO
0.99413
4.733989
19802f01-1fb6-40ae-9c7b-c53208f41fec
Project-NexOS/frameworks_native
libs/input/AccelerationCurve.cpp
#include <input/AccelerationCurve.h> #include <array> #include <limits> #include <log/log_main.h> #define LOG_TAG "AccelerationCurve" namespace android { namespace { // The last segment must have an infinite maximum speed, so that all speeds are covered. constexpr std::array<AccelerationCurveSegment, 4> kSegments...
ALGO
0.934609
6.834741