uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
e83ff614-1e08-499f-b5c8-d05f23443298
nikban95/Lab-Programs
systemSimulation/gammaDistribution.cpp
#include<bits/stdc++.h> using namespace std; class residueRandomNumber{ public: int seed, a, b, mod; residueRandomNumber(){ seed = time(NULL); a = 1103515245; b = 12345; mod = 32768; } residueRandomNumber(int seed, int a, int b, int modValue){ this->seed = seed; this->a = a; this->b = b; this->mo...
ALGO
0.999855
3.568102
592c7f29-2f34-4c99-a54e-a4235b6d7285
SEONMl/Solutions
venv/Category/Challenge/2024SamsungAlg/Pro기출/11_전기차대여소.cpp
using namespace std; #define MAX_N 350 #define INF 987654321 #include<memory.h> #include<algorithm> #include<vector> #include<queue> int N, RANGE; int(*road)[MAX_N]; int board[MAX_N][MAX_N]; vector<pair<int, int>> graph[201]; pair<int, int> pos[201]; int dx[4] = { 0,0,-1,1 }; int dy[4] = { 1,-1,0,0 }; void init(int n...
ALGO
0.996487
4.039333
45d8b085-68aa-46d7-8786-8a259118c1da
Polash041/probable-spork
kruskalMst.cpp
#include<bits/stdc++.h> using namespace std; vector<pair<int,pair<int,int>>> edges; int parent[100]={0}; //make-> void make(int v) { parent[v]=v; } //Godfather finding int find(int v) { if(parent[v]==v) return parent[v]; return(find(parent[v])); } void uni(int a,int b) { a = find(a); b = find(b);...
ALGO
0.999996
4.340099
3fd3c1b9-27b5-467d-a6ea-26af1b95fcdc
sandeshkhadase/Leetcode-Solutions
Leetcode Solutions/solution/2000-2099/2009.Minimum Number of Operations to Make Array Continuous/Solution.cpp
class Solution { public: int minOperations(vector<int>& nums) { sort(nums.begin(), nums.end()); int m = unique(nums.begin(), nums.end()) - nums.begin(); int n = nums.size(); int ans = n; for (int i = 0; i < m; ++i) { int j = upper_bound(nums.begin() + i, nums.begi...
ALGO
0.999987
5.850979
c8cf07cb-d02b-411d-b13a-922756a42716
vic3t3chn0/openkrown
neo/libs/jpeg-6/jidctred.cpp
#define JPEG_INTERNALS #include "jinclude.h" #include "jpeglib.h" #include "jdct.h" /* Private declarations for DCT subsystem */ #ifdef IDCT_SCALING_SUPPORTED /* * This module is specialized to the case DCTSIZE = 8. */ #if DCTSIZE != 8 Sorry, this code only copes with 8 x8 DCTs. /* deliberate syntax err */...
ALGO
0.9929
5.120424
55e475e7-baf8-46ec-b91c-dc177a6db748
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_2926_12.cpp
#include <bits/stdc++.h> using namespace std; const int maxN = 1e5 + 326, maxLog = 17; int N, rad[maxN]; struct Seg { int l, r, len; Seg() : l(-1), r(-1), len(0) {} Seg(int _l, int _r) : l(_l), r(_r) { if (l > r) { r += N; } len = r - l + 1; if (r >= N) r -= N; } string disp() { retu...
ALGO
0.999975
3.451422
dd43a4e4-9264-41b4-8be7-44f6d20fe5e9
shahfaiz-07/dsa_archives
Arrays/GFG/Medium/LongestSubarrayWithSum0/LongestSubarrayWithSum0.cpp
// https://www.geeksforgeeks.org/problems/largest-subarray-with-0-sum/1 #include<bits/stdc++.h> using namespace std; int maxLen(vector<int> &arr) { // code here unordered_map<int, int> hash; hash[0] = -1; int sum = 0, maxLen = 0; for (int i = 0; i < arr.size(); i++) { sum += arr[i]; ...
ALGO
0.999535
5.751166
c6fb7d01-1ba7-4405-b207-4c5e6d4d4b5e
WinampDesktop-restore/winamp
Src/Plugins/General/gen_ml/fileview_compare.cpp
#include "main.h" #include "./fileview.h" #include "./fileview_internal.h" #include "./resource.h" #include <strsafe.h> typedef struct _TYPEORDERINTERNAL { UINT index; WCHAR szName[64]; } TYPEORDERINTERNAL; typedef INT (CALLBACK *SHLWAPI_STRCMPLOGICALW)(LPCWSTR, LPCWSTR); static SHLWAPI_STRCMPLOGICALW fnStrCmpL...
TOOL
0.934689
4.93504
97f38415-b0bb-4dbe-922f-d96cea197c66
sinian666/code_41_28
cpp_副本13/chapter_graph/graph_adjacency_list.cpp
/** * File: graph_adjacency_list.cpp * Created Time: 2023-02-09 * Author: what-is-me (<EMAIL>), Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 基于邻接表实现的无向图类 */ class GraphAdjList { public: // 邻接表,key: 顶点,value:该顶点的所有邻接顶点 unordered_map<Vertex *, vector<Vertex *>> adjList; /* 在 vector 中删除指定节点 ...
ALGO
0.994152
6.281958
db6788e8-7af1-4ab9-b85b-305a7580bbcc
iam-abbas/cs-algorithms
Dynamic Programming/Floyd Warshall/floydWarshall.cpp
#include <bits/stdc++.h> using namespace std; // Number of vertices in the graph #define V 4 #define INF 99999 // A function to print the solution matrix void printSolution(int dist[][V]); // Solves the all-pairs shortest path // problem using Floyd Warshall algorithm void floydWarshall (int g...
ALGO
0.999948
4.005608
30d75b50-1251-4956-bb93-296636dfcc21
itsanamulhassan/algorithms
Week 02 Graph Algorithm/08. Mid Term/Can_Go_Again.cpp
#include <bits/stdc++.h> using namespace std; class Edge { public: long long int u, v, w; Edge(long long int u, long long int v, long long int w) { this->u = u; this->v = v; this->w = w; } }; vector<Edge> my_edges; long long int distances[1001]; bool flag = false; void bellma...
ALGO
0.999957
5.161319
ae9f1531-8c62-471e-a7ad-e7fbfc378702
sarvex/leetcode-simula
solution/2600-2699/2643.Row With Maximum Ones/Solution.cpp
class Solution { public: vector<int> rowAndMaximumOnes(vector<vector<int>>& mat) { vector<int> ans(2); for (int i = 0; i < mat.size(); ++i) { int cnt = 0; for (auto& x : mat[i]) { cnt += x == 1; } if (ans[1] < cnt) { ans...
ALGO
0.999938
6.041902
05cb2620-c996-4771-931d-55b80aca3866
chrisbrown-01/LeetCode
C++ Solutions/LeetCodeCpp/0104_MaximumDepthOfBinaryTree.cpp
/* Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. Input: root = [3,9,20,null,null,15,7] Output: 3 Input: root = [1,null,2] Output: 2 Constraints: The number of nodes in the tr...
ALGO
0.999938
7.122261
21a7dd96-ca66-455b-8f4d-7dcb1d9d0f20
nehasan/acm-uva
10783OddSum.cpp
#include<iostream> using namespace std; int main(){ int test; int sum; int initNum,endNum; while(cin>>test){ for(int i=0;i<test;i++){ cin>>initNum; cin>>endNum; sum=0; for(int i=initNum;i<=endNum;i++){ if(i%2!=0) sum=sum+i; } cout<<"Case "<<i+1<<": "<<sum<<endl; } } return...
ALGO
0.999324
3.741814
f3401dfc-0dae-4e30-ae16-13597026f584
PolarNight-Dawn/LeetCode_Code
每日一题/2023年12月/231218_162_findPeakElement.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; // // Created by polarnight on 23-12-18, 下午3:44. // class Solution { public: // int findPeakElement(vector<int>& nums) { // if (nums.size() == 1) return 0; // // function<int(int, int)> Dichotomy = [&](int start, i...
ALGO
0.999802
5.245266
5e865cfe-fe60-43c7-93ae-1cef070e8859
ujjwalkasera01/Questions
210-course-schedule-ii/course-schedule-ii.cpp
class Solution { private: bool kahnAlgo(vector<vector<int>> &adj, int n, vector<int> &indegree, vector<int> &ans) { queue<int> q; for (int i = 0; i < n; i++) { if (indegree[i] == 0){ q.push(i); } } int count = 0; while (!q....
ALGO
0.999974
6.500731
2b80b2d0-917d-47b4-bafa-73df445e631e
peter10720129/CSES
IntroProblem/AppleDivision.cpp
#include<bits/stdc++.h> using namespace std ; int main() { int n ; cin >> n ; vector<int> arr(n) ; for ( int i = 0 ; i < n ; i++ ) { cin >> arr[i] ; } long long int range = pow(2,n) ; long long int res = 1000000001 ; for ( long long int i = 0 ; i < range ; i++ ) { ...
ALGO
0.999959
4.413435
f80c52fb-4ac2-4f4a-85e5-b454bcb5b98c
Just-Prog/luogu-dev
洛谷P1226 【模板】快速幂取余运算.cpp
//P1226 【模板】快速幂||取余运算 //https://www.luogu.com.cn/problem/P1226 //https://www.luogu.com.cn/record/83507119 #include<iostream> using namespace std; unsigned long long int ans,aa,bb; int main(){ int a,b,c; cin>>a>>b>>c; ans=1,aa=a,bb=b; while(bb!=0){ if(bb%2==1){ ans=(ans%c)*(aa%c)%c; ...
ALGO
0.999985
4.560779
2d175215-b48e-4cd9-9cbe-91c8637a1e7e
ravidelcj/CompetitiveProgramming
TSHOW1.cpp
//http://www.spoj.com/problems/TSHOW1/ #include<iostream> #include<cmath> using namespace std; int arr[100000]; int main() { int t; scanf("%d",&t); while(t--){ long long n; scanf("%lld",&n); long long k; k=n/2; k++; int bit=log2(k); long long temp=2*(...
ALGO
0.999852
3.688719
7923e50c-451c-4773-8835-900c5233992a
stanley6002/Optical_flow-
Relative_Pose.cpp
# define MiniDensity 0.65 #include "Relative_Pose.h" //#include "CameraPoseRefinement.h" double CameraPose:: CameraReprojectError(int NumPts, double *R, double* Tc, v3_t* Pts,v2_t* Projpts, double * Kmatrix) { double error =0; for(int i =0;i< NumPts;i++) { double b2[3]; double b_cam[3]; ...
ALGO
0.995539
3.50015
90053dd5-7ef1-4319-9322-882b71fed164
maruf-rahad/codeforces
A - Left-handers, Right-handers and Ambidexters.cpp
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c,d,sum,total,x; scanf("%d %d %d",&a,&b,&c); sum=0; while(a!=0&&b!=0){ sum=sum+2; a--; b--; } if(a==0){ x=b; } if(b==0){ x=a; } while(x!=0&&c!=0){ sum=sum+2; ...
ALGO
0.999906
3.372557
6ac952f8-d4db-4985-8f3c-0c3f8b8efca9
dismalion/oooii
Ouroboros/Source/oMemory/memmem.cpp
#include <oMemory/memory.h> #include <memory.h> #include <stdexcept> namespace ouro { void* memmem(void* buf, size_t buf_size, const void* find, size_t find_size) { // @tony: This could be parallel-for'ed, but you'd have to check any // buffer that might straddle splits, including if splits are smaller than the ...
TOOL
0.956871
5.848549
fec29723-73ae-4234-8511-3d752a27e0e3
N0Va36O/PoppoU_Practice_3
PoppoU_Practice_3/Доп2.cpp
#include <iostream> using namespace std; int main() { setlocale(0, ""); int arr[4]={1, 2, -3, -4}; for(int i=0; i<4; i++){ if(arr[i]>0){ cout<<arr[i]; } } cout<<endl; for(int i=0; i<4; i++){ if(arr[i]<0){ cout<<arr[i]; } } return 0; }
ALGO
0.999655
3.413564
9d6e72a8-48bb-485c-bebd-ce1cc5ffca96
iamsinghashutosh/Codeforces-Solutions
number theory/A_Prefix_Sum_Primes.cpp
/* Ashutosh Singh */ #include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> // #include<boost/multiprecision/cpp_int.hpp> // using namespace boost::multiprecision; using namespace __gnu_pbds; using namespace std; #define int long long #define mod 1000000007 #define FAST ios::sync_with_stdio(0),cin.tie(0),cou...
ALGO
0.999929
3.42343
f92a5f31-4a89-4f96-a2ff-21851aeba0e2
Compiler-Dependency-Analysis/llvm-levioso
openmp/runtime/test/tasking/kmp_task_modifier_simple_par_new.cpp
// RUN: %libomp-cxx-compile-and-run #include <stdio.h> #include <omp.h> #define NT 4 #define INIT 10 /* The test emulates code generation needed for reduction with task modifier on parallel construct. Note: tasks could just use in_reduction clause, but compiler does not accept this because of bug: it mistakenly req...
TEST
0.880505
5.507378
3af2bbc2-43e3-4bd3-8c15-0238842e5b22
Deeeeenny/mango-src
Ballistic_Module/Dependencies/ixwebsocket/include/ixwebsocket/IXExponentialBackoff.cpp
#include "IXExponentialBackoff.h" #include <cmath> namespace ix { uint32_t calculateRetryWaitMilliseconds(uint32_t retryCount, uint32_t maxWaitBetweenReconnectionRetries, uint32_t minWaitBetweenReconnectionRetries) { ...
ALGO
0.937801
6.224383
4d61df2e-d18e-4057-86f9-b7332c0aedf4
leverimmy/Codes
比赛/学校/2019-11-11测试/source/PC36_HB_lcx/matrix.cpp
#include<bits/stdc++.h> #define int long long using namespace std; inline int read() { int x = 0, f = 1; char c = getchar(); while(!isdigit(c)) { if(c == '-') { f = -1; } c = getchar(); } while(isdigit(c)) { x = x * 10 + c - '0'; c = getchar(); } return x * f; } const int N = 5001, M = 5001; int a[N...
ALGO
0.99991
3.128158
bc312c99-627f-487e-a453-72dc3db9566b
urmilkadakia/ParallelKmerEstimate
parallelKmerCountEstimate.cpp
#include <iostream> #include <climits> #include <zlib.h> #include <stdio.h> #include "kseq.h" #include <time.h> #include "metrohash64.cpp" #include <stdint.h> #include <unordered_map> #include <iomanip> #include <cmath> #include <stdlib.h> #include <cassert> #include <string.h> #include <cstring> #include <string> #inc...
DATA
0.977695
4.516057
5dc7f6ef-c328-4139-a92d-ac0696bb70c4
raincross7/code-similarity
codes/train_code/problem063/problem063_210.cpp
#include <bits/stdc++.h> #define ll long long int #define ull unsigned long long int #define mod 1000000007 using namespace std; int spf[1000001]; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); #endif ios_base::sync_with_stdio(false); cin.tie(NULL); int n; cin >> n; int a[n]...
ALGO
0.999895
4.111111
b8ba037e-3164-4956-b16a-7cb310aa9f37
spirosgkogkas/test_server
etc/cryptopp_8_4_0/cryptopp/ida.cpp
// ida.cpp - originally written and placed in the public domain by Wei Dai #include "pch.h" #include "config.h" #include "ida.h" #include "stdcpp.h" #include "algebra.h" #include "polynomi.h" #include "polynomi.cpp" NAMESPACE_BEGIN(CryptoPP) #if (defined(_MSC_VER) && (_MSC_VER < 1400)) && !defined(__MWERKS__) // V...
TOOL
0.970077
5.902419
b2199ccf-1f73-4b2b-aee9-9a5d0e2734ec
nik007frontbit/evital_patient
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
6c243bf0-4bd3-49f8-860d-3ea2330a28a7
tic40/atcoder
algo-method/317/main.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i,n) for(int i=0;i<n;i++) int g[105][105]; int main() { int t; cin >> t; REP(i,t) REP(j,t) cin >> g[i][j]; // dp[t]:= 時刻 [t−1,t] ではオフにしていた場合の、時刻 t までの総利得の最大値 vector<int> dp(t+2); REP(k,t+2) REP(i,k) REP(j,k) { if (i < j) { dp[k] = max(dp[...
ALGO
0.999861
3.963606
01545eed-fffc-4dfd-a23c-c00224353933
yzzupgo/MFTCG
Data/abc136_b/C20193626/ac/6700739.cpp
#include<cstdio> #include<cmath> #include<cstring> #include<iostream> #include<algorithm> using namespace std; typedef long long ll; ll n,x,ans; int main() { scanf("%lld",&n); for(int i=1;i<=9;i++) { x=i; if(x<=n) ans++; } for(int i=1;i<=9;i++) for(int j=0;j<=9;j++) for(int k=0;k<=9;k++) { x=100*i+10*j+k; if(x<=n) ans+...
ALGO
0.998975
3.601715
26778e99-476e-4484-a528-02786704b028
KDE/android-qt
src/3rdparty/javascriptcore/JavaScriptCore/pcre/pcre_ucp_searchfuncs.cpp
/* This module contains code for searching the table of Unicode character properties. */ #include "config.h" #include "pcre_internal.h" #include "ucpinternal.h" /* Internal table details */ #include "ucptable.cpp" /* The table itself */ /************************************************* * Search t...
ALGO
0.964221
6.488802
8d7bfcf2-7773-4f98-95ae-52dddded69be
8HemLeT8/Pigs-and-Bulls
Test.cpp
/** * A demo program for bull-pgia. * * @author Erel Segal-Halevi * @since 2019-04 */ #include <iostream> using namespace std; #include "play.hpp" #include "DummyChoosers.hpp" #include "DummyGuessers.hpp" #include "SmartGuesser.hpp" #include "badkan.hpp" #define COMMA , using namespace bullpgia; int main() {...
ALGO
0.929982
6.013139
2c1403e8-591f-49fe-8dd4-b9c52a59caab
shubham7saxena/competitive-coding
graph algorithms/toplogical_sort_dag.cpp
#include<bits/stdc++.h> using namespace std; #define mod 1000000000 #define loop(i,a,b) for(int i=a;i<b;i++) #define all(c) (c).begin(),(c).end() #define nl cout<<"\n" #define sz(a) (int)(a).size() #define len(a) (int)a.length() #define pb push_back #define mp make_pair typedef vector<int> vi; typedef vector<vi> vv...
ALGO
0.999985
4.356044
ecce9d6a-785e-4484-b116-677708f89250
mohamedsalah01176/Data_Structure
Day1/assiment1/main.cpp
#include <iostream> using namespace std; class Node{ public: int id; string name; Node *preNode; Node *nextNode; public: Node() : id(0), name(""), preNode(NULL), nextNode(NULL) {} }; class DLList:public Node{ Node *startP; Node *lastP; public: DLList(){ startP=NULL; ...
ALGO
0.94552
3.784533
f1b4b8c4-e824-490c-a851-60e568d2ef8a
zhouyong1234/SLAM-All-In-One
VIO系列/dso/src/FullSystem/FullSystemOptPoint.cpp
/* * KFBuffer.cpp * * Created on: Jan 7, 2014 * Author: engelj */ #include "FullSystem/FullSystem.h" #include "stdio.h" #include "util/globalFuncs.h" #include <Eigen/LU> #include <algorithm> #include "IOWrapper/ImageDisplay.h" #include "util/globalCalib.h" #include <Eigen/SVD> #include <Eigen/Eigenvalues...
ALGO
0.991473
4.235932
4296e97f-8560-4ced-b42c-8d4db457cc16
ishandutta2007/codeforces
kevinxiehk/normal/1398/B.cpp
#include<bits/stdc++.h> #define fi first #define se second #define mp make_pair #define pb push_back using namespace std; void solve(){ string s; cin>>s; priority_queue<int>aaa; int now=0; for(int i=0;i<s.length();i++){ if(s[i]=='1'){ now++; } else{ aa...
ALGO
0.999975
4.122653
fa049f06-f89a-484d-a6e4-b7d720e96e89
okuraofvegetable/AtCoder
atcoder.jp/joisc2011/joisc2011_report/Main.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> P; typedef vector<int> vi; typedef vector<ll> vll; #define pb push_back #define mp make_pair #define eps 1e-9 #define INF 2000000000 #define sz(x) ((int)(x).size()) #define fi first #define sec second #define all(x) (x).begin(),(x...
ALGO
0.999929
3.775111
136512d5-36db-45ee-9752-faf01b7514d5
mandeepmourya007/leetcode
Check Array Formation Through Concatenation_480191390.cpp
class Solution { public: bool canFormArray(vector<int>& arr, vector<vector<int>>& pieces) { int n=arr.size(); vector<int> hash(101,-1); for(int i=0;i<pieces.size();i++) hash[pieces[i][0]]=i; int i=0; while(i<n) { ...
ALGO
0.999722
5.500426
640770ae-ae2b-4b2d-a23c-dd19f1d19473
uxth/leetcode
cpp/163.missing-ranges.cpp
/* You are given an inclusive range [lower, upper] and a sorted unique integer array nums, where all elements are within the inclusive range. A number x is considered missing if x is in the range [lower, upper] and x is not in nums. Return the shortest sorted list of ranges that exactly covers all the missing numbers...
ALGO
0.999296
5.869513
0e905a6a-4ad7-4ee8-8057-55a9b19d1ace
CookiC/UVaOJ
Chapter 6. Data Structures/246 - 10-20-30.cpp
#include<iostream> #include<queue> #include<set> using namespace std; unsigned hand[52]; unsigned hf,hr; class Pile{ private: unsigned q[52]; unsigned f,r; public: void clear(){ f=0; r=0; } bool plan(unsigned i,unsigned j,unsigned k){ unsigned sum=q[i]+q[j]+q[k]; if(sum==10||sum==20||sum==30){ han...
ALGO
0.999338
3.457041
22d4f204-2016-426c-8b5c-3595a716619a
Tauke190/Leetcode
48-rotate-image/48-rotate-image.cpp
/* Difficulty - Medium Type - Matrix Attmept 1 - Could Not do it Attempt 2 - Could do it with a small hint Algorithm 1. Change the matrix into the transpose of the matrix using swapping (will be easy) 2. Reverse the orders of the row or column in the according to the rotation in the question 3. Done */ class So...
ALGO
0.99999
6.638063
2d12c6db-ac52-4f25-988b-d6f0ff8486cb
ChinmayUdaybhanuThakur/CODEFORCES
edu_163_div2/a.cpp
#include <bits/stdc++.h> using namespace std; string solve(int n, string& ans){ if(n%2==1) return "NO"; else{ int it = n/2; for(int i=1;i<=it;i++){ ans += "AAB"; } return "YES"; } } int main() { ios_base::sync_with_stdio(0); cin.tie(0); int t; ci...
ALGO
0.999813
5.475747
6aae0b45-6f7f-49a5-9980-2dc0a0756135
xianghuade/Challenge_Programming_Contest_2nd_Edition
chapter_01/1.3.cpp
#include <iostream> #include <algorithm> using namespace std; const int MAX_N = 10e6; int L, n, dis[MAX_N]; int main(){ cin >> L >> n; for(int i=0; i<n; i++){ cin >> dis[i]; } int minT = 0, maxT = 0; //计算最短时间 for(int i=0; i<n; i++){ minT = max(minT, min(dis[i], L-dis[i])); } //计算最长时间 for(int i=0; i<n; i...
ALGO
0.999823
4.032251
58434843-38d7-47a7-a09f-d24e216c03d4
wakatakerutmt/atcoder
algorithm/13_2_minimum_spanning_tree/main.cpp
#include <iostream> using namespace std; static const int MAX = 100; static const int INFTY = (1<<21); static const int WHITE = 0; static const int GRAY = 1; static const int BLACK = 2; int n; int M[MAX][MAX]; // 隣接行列 // プリムのアルゴリズム (最小全域木を求めるアルゴリズム) int prim() { int u, mincost; int d[MAX]; // d[v]にTに属する頂点とV-...
ALGO
0.99992
3.872198
a174944f-d496-4a67-9ebf-b38eeac88541
MateuszBielski/keysFinderCppModule
src/main.cpp
#include <stdio.h> #include "edgeprocessing.h" #include "ini/ini.h" int main(int argc, char **argv) { inih::INIReader configurationParameters {"config.ini"}; const auto& imagePath = configurationParameters.Get<std::string>("section1", "imagePath"); EdgeProcessing ep; ep.LoadParameters(configurationPar...
DATA
0.864531
4.409594
f37ca4dd-0bf1-41e2-b85e-cd22c630f285
hchoHsu/TCG_2023
hw1/r12922080/src/main.cpp
#include <iostream> #include <iomanip> #include <vector> #include <string> #include <queue> #include <chrono> #include <functional> #include <unordered_map> #include <unordered_set> #include <cstdio> #include <cstdlib> #include <cstring> #include <climits> #define DICE 6 #define MAX_BUFFER 5000000 #define MAX_ROW 9 #d...
ALGO
0.999496
3.758541
6fe87b01-d53c-40a0-9146-f09dfc10e775
guimaraesrosa/URI-Competitions
caixaDois.cpp
#include <iostream> #include <list> #include <vector> #include <algorithm> using namespace std; struct Aresta{ int v1; int v2; int peso; Aresta(int vertice1 = 0, int vertice2 = 0, int w = 0){ v1 = vertice1; v2 = vertice2; peso = w; } }; class Grafo{ int V; int A;...
ALGO
0.999947
4.334043
65841791-a48e-416a-af48-3401ab56354e
Morgan-iv/Main-source-folder
SphereMailRU/AaDS/Contest5/A.cpp
// This is a personal academic project. Dear PVS-Studio, please check it. // PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com // PVS-settings // PVS-settings end #include<iostream> #include<map> #include<string> using namespace std; int main() { int n, s, t; string str; map<string, int> a...
ALGO
0.999867
4.090785
7e6d8b67-8596-43ec-be79-09d3cce1955a
srinathdivate123/DSA
Recursion/S_10_Combination_Sum_2.cpp
/* Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to target. Each number in candidates may only be used once in the combination. Note: The solution set must not contain duplicate combinations. */ #include <bi...
ALGO
0.999985
5.819326
791d0d2e-49c4-4254-b8f3-5083a8b40f2c
balamosh/cpp_belts
01_white_belt/02_week/assignment/functions/UpdateIfGreater/test.cpp
#include <iostream> using namespace std; void UpdateIfGreater(const int first, int& second); int main() { int a, b; cin >> a >> b; cout << "a == " << a << endl; cout << "b == " << b << endl; cout << "Update:\n"; UpdateIfGreater(a, b); cout << "a == " << a << endl; cout << "b == " << b << endl; return (0); }...
ALGO
0.990857
3.337926
96fb185b-c366-411e-bce7-1dd08c8a1a2f
maxnelso/algorithms_competitions
codeforces/problem_set/268A.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.999671
3.557786
1c8cf3be-6737-4bee-9a8e-c60f3310dd4a
Andressitoito/CppBasics-IntroCourse
Basics/functions/functions-basics.cpp
#include <iostream> using namespace std; // Void does not return anything void printHello() { cout << "Hello" << endl; } // This function returns an int int addTwo(int a, int b) { return a + b; } // Forward declaration int square(int a); // Main function int main() { printHello(); int c = 34; int d = 75; in...
TOOL
0.992442
3.670096
e698b63e-ad6a-42e2-aa6a-89c006858bbf
ishandutta2007/codeforces
asdsasd/normal/1744/D.cpp
#pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> // #include<atcoder/fenwicktree> using namespace std; // using namespace atcoder; void solve(){ int n; cin >> n; vector<int> A(n); for(auto &a: A) cin >> a; int tot = 0; for(auto a...
ALGO
0.999947
4.550609
c588627b-3fe3-474b-9ce2-02ee3b94e63b
Arhur1505/Object-oriented_Programming_1_sem4_23-24
lab11/src/Compressor.cpp
#include "Compressor.h" void Compressor::Process(std::string& data) { std::string compressed; int count = 1; char prev = data[0]; for (size_t i = 1; i < data.size(); ++i) { if (data[i] == prev) { count++; } else { compressed += std::to_string(count) + prev; ...
ALGO
0.982575
4.471035
bd2ea51d-db33-4823-8fb9-3c9179043fca
saifabrar-cp/xpsc
week-7/day-4/B_Special_Numbers.cpp
/* * author: saifabrar * created: 2024-05-06 22:02:03 * problem link: */ #include <bits/stdc++.h> using namespace std; #define ll long long #define nl '\n' #define pii pair<ll, ll> const int MOD = 1e9+7; void solve() { ll n,k,p=1,ans = 0; cin>>n>>k; for(int i=0;i<=30;i++) { if(k&(1<<i)) ...
ALGO
0.999953
4.616939
5e496d7d-3e60-4271-ae2f-668e49e7e8fb
dhnesh12/codechef-solutions
02-CodeChef-Easy/786--Distribute idlis Equally.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define int ll typedef pair<int, int> pii; typedef string st; typedef vector<int> vi; typedef vector<vi> vii; typedef vector<pii> vpii; typedef vector<long long> vll; typedef vector<vll> vlll; typedef vector<st> vs; const int mod =...
ALGO
0.999978
3.65412
c28fc6f6-dcfb-4921-bd3c-45d85ca61f2c
DominikPanzarella/tsp-meta-solver
backend/src/service/algorithm/lkh3solver.cpp
#include "lkh3solver.h" #include "service/algorithm/path.h" #include "service/algorithm/tspsolution.h" #include "repository/configuration2/config/lkh3instancesetting.h" #include <filesystem> #include <cstdlib> LKH3Solver::LKH3Solver(const std::string& lkhPath, const std::string& resourcesPath, std::shared_ptr<LKH3...
ALGO
0.999114
5.268458
72279351-501a-4d84-bfac-08d6430b1bae
FOSSASystems/FOSSASAT-2
software/TestSketches/FlashWipe/src/ADCS/ADS/eclipse_hybrid.cpp
/* Project: FossaSat-2 Flight Software Author: Team Steiner Module: ads_determination File: eclipse_hybrid.c 04/24/20 This file drives the angular state determination from the magnetometer */ /*********************** Headers *****************************/ #include <math.h> #include "../ADCS/adcs.h" /*...
ALGO
0.999929
6.92284
6be200fe-ea74-4236-b0b5-2712240b68de
elenaisnanocat/codetree-TILs
250402/A 부터 B 까지/a-to-b.cpp
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; int num = a; while(num <= b) { cout << num << " "; if(num % 2 == 1) num *= 2; else num += 3; } return 0; }
ALGO
0.999813
3.742463
d014c98d-68b4-4336-afde-1551c184d9c4
nsanghi/CarND-T2-P5-MPC-Project
src/Eigen-3.3/bench/benchCholesky.cpp
// g++ -DNDEBUG -O3 -I.. benchLLT.cpp -o benchLLT && ./benchLLT // options: // -DBENCH_GSL -lgsl /usr/lib/libcblas.so.3 // -DEIGEN_DONT_VECTORIZE // -msse2 // -DREPEAT=100 // -DTRIES=10 // -DSCALAR=double #include <iostream> #include <Eigen/Core> #include <Eigen/Cholesky> #include <bench/BenchUtil.h> using na...
TEST
0.990978
5.938015
08cc47a2-98a1-4203-9647-a6c22e5a52fc
bhartiSawaria/Cp
Floyd Warshall.cpp
#include <iostream> using namespace std; #define INF 1000 class Graph { int V; int **adj; public: Graph(int v) { V = v; adj = new int*[V]; for (int i=0; i<V; i++) { adj[i] = new int[V]; for (int j=0; j<V; j++) adj[i][j] = INF; } } void makeGraph() { cout << "Enter the matrix" << end...
ALGO
0.999749
3.624339
d9c4d04e-4a15-4767-8a68-ae76539d94e6
priyanshsrivastava749/DSA-Notes-and-Code
module-33(Problems on stack)/lecture-3(Min Stack)/code-2.cpp
//method-2 most optimised method of complexiety O(1) space and O(1) https://leetcode.com/problems/min-stack/ class MinStack { public: stack<long long> st; long long min; MinStack() { min = LLONG_MAX; } void push(int val) { long long x = (long long)val; ...
ALGO
0.999917
6.415427
d0260692-ba6a-48c5-b435-4fdfd9582ac9
xxEBxx/CP
contest/speedforces#1/B.cpp
#include<bits/stdc++.h> #define all(v) v.begin(), v.end() #define f first #define s second using namespace std; typedef long long ll; typedef pair<int,int> ii; typedef pair<ll,ll> pl; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<ll> vl; typedef vector<vector<ll>> vvl; const int maxn=(int)...
ALGO
0.999944
3.302844
263427c1-f412-4a48-837b-446e229ba83c
ishandutta2007/codeforces
74traktor/normal/1284/A.cpp
#include<bits/stdc++.h> using namespace std; string a[25], b[25]; main() { #ifdef HOME //freopen("input.txt", "r", stdin); #endif // HOME ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, m, q, x; cin >> n >> m; for (int i = 1; i <= n; ++i) cin >> a[i]; for (int i = 1; i <...
ALGO
0.999981
3.863976
811570a5-c81f-48e0-884c-ff54153c1a6c
liaoyaonline/LeetCodeNote
牛客华为/华为刷题/排列组合/字符串全排列/main.cpp
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <set> #include <stack> #include <string> #include <vector> using namespace std; class Solution { public: void dfs(vector<string> &res, string &Str, int i) { if (i == Str.size()) { res.push_back(Str); return; } f...
ALGO
0.99999
5.199154
a6788fcd-4fa5-4b58-b6e4-83ebb4aa0afc
ishandutta2007/codeforces
davoth/normal/131/A.cpp
#include <iostream> #include <vector> #include <iomanip> #include <algorithm> using namespace std; int main(){ string s; cin>>s; int a=1; for(int i=1;i<s.size();i++){ if(s[i]>96) a=0; } if(a){ if(s[0]>96) s[0]-=32; else s[0]+=32; for(int i=1;i<s.size();i++){ ...
ALGO
0.991315
4.181467
2ea026df-9512-42cf-a55e-00f8991268f0
georgephilipp/cppgstd_legacy
dnn/src/VertexSquareDiff.cpp
#include "stdafx.h" #include "VertexSquareDiff.h" #include "Edge.h" namespace msii810161816 { namespace dnn { Vertex* VertexSquareDiff::construct() { return new VertexSquareDiff; } void VertexSquareDiff::copy(Vertex* target, std::string copyMode, bool isTop) { if (isTop) gstd::Base::copy(target...
TOOL
0.974874
5.997364
19a51b6f-8238-441a-a3f5-06a9350b94d4
Arnab1996/CryptoLab
Knapsack_Crypto.cpp
#include<bits/stdc++.h> using namespace std; int r = 37; int n = 900; int b[] = {7, 11, 19, 39, 7, 157, 153}; int k = 7; int perm[] = {4, 6, 3, 7, 2, 5, 1}; int main() { cout<<"The message is: "; int m[] = {0, 1, 0, 0, 1, 1, 1}; for(int i : m) cout<<i<<" "; cout<<"\n"; long long cipher = 0; ...
ALGO
0.999973
3.138709
f8a6d5a0-5fa6-415c-bc18-05cf59bd834a
ybettan/Accelerators
hw1/samples/3_Imaging/convolutionSeparable/convolutionSeparable_gold.cpp
#include "convolutionSeparable_common.h" //////////////////////////////////////////////////////////////////////////////// // Reference row convolution filter //////////////////////////////////////////////////////////////////////////////// extern "C" void convolutionRowCPU( float *h_Dst, float *h_Src, float...
ALGO
0.969123
5.632446
cfb43e25-d1ca-4166-9900-d8b749609158
rafisgithub/phitron
Algorithms/practice/dijkstra_nive.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5+5; vector<pair<int,int>> v[N]; int dis[N]; void dijkstra(int src) { queue<pair<int,int>> q; q.push({src,0}); dis[src] = 0; while(!q.empty()) { pair<int,int> parent = q.front(); q.pop(); int node = parent....
ALGO
0.999991
4.026335
9715d717-56b8-4649-bb16-a6bc7bc17523
chater-marzougui/Flutter-Car-Control_Http
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
7766d06a-39c1-4b9d-aa31-639d6e87dbdf
Kang-il/TIL
greedy/greedy_ex16.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int N,K; void input(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cin>>N>>K; return; } void solution(){ for(int a=0;a<=N;a++){ int b=N-a; if(a*b < K) continue; vect...
ALGO
0.999815
4.45146
e789a66c-3845-4b72-b917-d567f81fbbf2
Xnuvers007/Kuliah
semester 4/pert6/lat6_2.cpp
#include <iostream> #include <conio.h> using namespace std; int main() { int Nilai[20]; int Posisi[20]; int i, N, Bilangan, Banyak = 0; bool Ketemu = false; cout << endl; cout << "|=============================|" << endl; cout << "| Nama : Indra Dwi Aryadi |" << endl; cout << "| ...
ALGO
0.999529
5.039202
50a82bf7-e4af-4d7c-8826-38f611c4ea7c
Arif-462/data_stucture_cpp
Online Problem Solving/Leet code/find the difference.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: char findTheDifference(string s, string t) { sort(s.begin(), s.end()); sort(t.begin(), t.end()); for(int i=0; i<t.size(); i++) { if(s[i] != t[i]) return t[i]; } return ...
ALGO
0.999869
4.613084
0b555ff2-4b62-49f8-bcb8-26ec2576d7ca
LeonDavisCoropuna/ADA-Unsa
TAREA 02 COMPLEJIDAD ALGORTIRMICA/Funcion 6/funcion6.cpp
#include <iostream> using namespace std; bool condition(int i,int n,int &count){ count++; return i < n; } void funcion6(int _n){ int n=_n,j; int a=0,b=0,c=0,d=0,e=0; for(int i=0; condition(i,n,a);i++){ //n+1 j=1; b++; // n --9 while(condition(j,n,c)){ //n(log2n + 1) ...
ALGO
0.999583
3.19965
95d2aefb-281c-4473-8ea7-bd6acda2e026
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_10509_0.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; int T, card[16]; bool is_same_number(int a, int b, int c){ return a == b && b == c; } bool is_sequence(int a, int b, int c){ return a+2 == b+1 && b+1 == c; } bool is_good_set(int a, int b, int c){ return is_same_number(a, b, c) || ...
ALGO
0.993809
4.174995
7b3154b7-2961-4576-bcac-e3ae6b05e6e5
tayu0110/atcoder
abc/abc158a.cpp
#include<iostream> #include<iomanip> #include<string> #include<vector> #include<algorithm> #include<utility> #include<tuple> #include<map> #include<queue> #include<deque> #include<set> #include<stack> #include<numeric> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> using namespace std; using ll ...
ALGO
0.99998
3.51763
f1074695-5b2a-457c-a0dc-1afed739cd29
kumardeepak85690/leetCode_problem
1304-longest-happy-string/longest-happy-string.cpp
#include <queue> #include <string> using namespace std; class Solution { public: string longestDiverseString(int a, int b, int c) { // Priority queue to store the characters and their counts. priority_queue<pair<int, char>> pq; if (a > 0) pq.push({a, 'a'}); if (b > 0) pq.push({b, 'b...
ALGO
0.999925
6.225277
20f2c0ab-b8b3-45ac-88a1-714449e3ad49
ishandutta2007/codeforces
couplefire/normal/516/D.cpp
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 100005; int n, q, l, ans; vector<array<int, 2>> adj[N]; int tmp[N], dist[N], root, fa[N]; int psum[N]; vector<array<int, 2>> st; void dfs1(int v, int p){ for(auto u : adj[v]){ if(u[0] == p) continue; tmp[u[0]] = tmp...
ALGO
0.999984
4.748599
b1063f5e-75ac-4e60-ab68-3de61e21986e
YttriumWillow/OI
Contests/2023/XYD/XYD0702/F.cpp
// Problem: P3385 【模板】负环 // Contest: Luogu // URL: https://www.luogu.com.cn/problem/P3385 // Memory Limit: 256 MB // Time Limit: 2000 ms // Created Time: 2023-07-02 07:07:09 #pragma GCC optimize(3) #pragma GCC optimize("Ofast") #pragma GCC optimize("inline") #include <iostream> #include <queue>...
ALGO
0.999989
4.308685
f4054e44-2f93-47f7-92e5-389699427d31
aslansutu/CENG315
the2/test.cpp
// this file is for you for testing purposes, it won't be included in evaluation. #include <iostream> #include <fstream> #include "the2.h" void file_input(std::string*& input_array, int& size, bool& ascending){ std::string file_name = "inp06.txt"; // inp01-inp10 are available. std::ifstream infile (file_name)...
ALGO
0.987263
5.124504
da280ac7-87b4-477c-82d6-3cd16f8c6b7a
vighnesh-shinde-18/Data-structures-and-algorithms-in-cpp
DYNAMIC PROGRAMMING/temp.cpp
#include <iostream> #include <vector> #include <deque> using namespace std; class Solution { public: vector<int> maxSlidingWindow(vector<int> &nums, int k) { int n = nums.size(); if (n == 0 || k == 0) { return {}; } if (k == 1) { return n...
ALGO
0.999964
5.826846
bf049bca-5bda-47c2-a9dc-27e42d096aa6
MilkClouds/Competitive-Programming
PS-Library/graph/scc_graph.cpp
struct scc_graph { scc_graph() : scc_graph(0) {} scc_graph(int N) : dfsn(N), sn(N), finished(N), N(N) {} int cnt = 0, SN = 0, N; vector<int> dfsn, sn, finished; vector<vector<int>> SCC; stack<int> S; int scc(int u) { dfsn[u] = ++cnt; S.push(u); int result = dfsn[u];...
ALGO
0.999631
5.142883
e3e5cd2b-46e2-41e8-949b-3d989e06558f
JustAG7/Competitive_Programming
ICPC/2023/ICPC Southern 2023/C2.cpp
#include<bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL); #define ll long long #define pb push_back #define pf push_front #define db double #define X first #define Y second #define fi first #define se second #define all(x) (x).begin(),(x).end() #define rall...
ALGO
0.99988
4.081512
7fd9dc09-1843-49f9-bb88-bb5dc1e13085
ishandutta2007/codeforces
cerberus97/normal/1142/C.cpp
/* cerberus97 - Hanit Banga */ #include <iostream> #include <iomanip> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <cstdlib> #include <map> #include <set> #include <queue> #include <stack> #include <vector> #include <algorithm> using namespace std; #define pb push_back #define fa...
ALGO
0.999855
4.608791
a2a6a593-bd57-41ad-8c05-ecd722715cb1
forxenn/KCCA
kcca.cpp
/* to complie: g++ kcca.cpp graph.cpp sct.cpp pava.cpp -O3 -o kcca to run: ./kcca <graph-path> <k> <max_iter> <output_path> <KCCA-basic/KCCA> <update roder> <approximation rate> */ #include <bits/stdc++.h> #include "graph.h" #include "sct.h" #include "pava.h" int main(int argc, char** argv){ ...
ALGO
0.999595
4.761305
57f1f5ae-fa01-4eb3-a0a4-eae1634c3bdc
Ashwani-Verma-07/Data-structures
Binary_Search_Tree/check_bst_1.cpp
#include <bits/stdc++.h> using namespace std; class BinaryTree { public: int data; BinaryTree *left; BinaryTree *right; BinaryTree(int data) { this->data = data; left = NULL; right = NULL; } }; BinaryTree *input() { int rootData; cin >> rootData; if (rootData ...
ALGO
0.999967
4.487098
72a71641-d400-4114-adf2-ee5830fda428
fpdkfflqkim/codebert_cpp-Fine_tuning-code_similarity
data/problem001/problem001_283.cpp
#include <bits/stdc++.h> using namespace std; //type #define ll long long typedef pair<int, int> P; //定数 #define INF 1000000000000 //10^12:∞ #define MOD 1000000007 //10^9+7:合同式の法 #define MAXR 100000 //10^5:配列の最大のrange //略記 #define PB push_back //挿入 #define MP make_pair //pairのコンストラクタ #define F first //pa...
ALGO
0.999424
3.683648
df3c21db-0d51-4910-9ca2-1c4f9a5c1f88
Mirthhh08/Strivers-A2Z-DSA-Sheet
Step-5/Step 5.2 Medium String Ques/6_Longest_Palindromic_Substring.cpp
#include <bits/stdc++.h> using namespace std; bool isPalindrome(string s) { string temp = s; reverse(temp.begin(), temp.end()); return temp == s; } string longest_Palindromic_Substring(string s) { string ans = ""; for (int i = 0; i < s.length(); i++) { string temp = ""; for (in...
ALGO
0.999597
5.57773
79c5221e-e05b-47bc-b7ca-1cffd8e96876
openjdk/lilliput
src/hotspot/share/oops/generateOopMap.cpp
#include "classfile/vmSymbols.hpp" #include "interpreter/bytecodeStream.hpp" #include "logging/log.hpp" #include "logging/logStream.hpp" #include "memory/allocation.inline.hpp" #include "memory/resourceArea.hpp" #include "oops/constantPool.hpp" #include "oops/generateOopMap.hpp" #include "oops/oop.inline.hpp" #include ...
ALGO
0.969428
4.771297
a18f8050-3dd3-4d2e-8274-2db92f3430a6
iYiYaHa/coding-practices
coding-interviews/cpp/28.symmertic-binary-tree.cpp
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } }; */ class Solution { public: bool isSymmetrical(TreeNode *pRoot) { if (pRoot == nullptr) return true; return isSymmetri...
ALGO
0.99998
6.355825
421ef1ce-558e-4d36-9148-9219dc05e508
gsch57/spaceGravitySimulator
main.cpp
#include <cmath> #include <iostream> #include "Planete.hpp" #include "Graphic.hpp" #include <vector> #include <stdlib.h> /* srand, rand */ #include <time.h> /* time */ int main(int argc, char *argv[]) { Graphic *sdl = new Graphic; SDL_Renderer *renderer = nullptr; if (sdl->init() < 0) { del...
TOOL
0.870004
3.856703
23add1f1-81e9-42f5-a395-baab9a7a4dca
arafat-yasin-2413/PHITRON-B5
CP_Problems/161D_DONUTSELL.cpp
#include <bits/stdc++.h> using namespace std; #define nl "\n" // https://www.codechef.com/START161D/problems/DONUTSELL int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int n, m; cin >> n >> m; int ar[n]; int br[m]; ...
ALGO
0.999931
4.628197
92be85f5-a7e2-4ce4-8413-24c5bb684a49
linkeLi0421/no-remove-no-reorder
clang/lib/StaticAnalyzer/Core/RangedConstraintManager.cpp
#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h" #include "clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h" namespace clang { namespace ento { RangedConstraintManager::~RangedConstraintManager() {} ProgramStateRef RangedConstraintManager::assumeSym(ProgramStateRef State, ...
TOOL
0.902189
7.738822
a49be276-f836-4ba4-86a3-87657cdd4f6b
victorsenam/treinos-old
victorsenam/ojs/icpc/6284/6284.cpp
#include <bits/stdc++.h> using namespace std; typedef unsigned long long int num; const int N = 300008; num ans; num val; num v[N]; num it[N]; num qtd[N]; int a, n, m; char c; num mask; char str[N]; int main () { freopen("hyperdrome.in", "r", stdin); freopen("hyperdrome.out", "w", stdout); while (scanf...
ALGO
0.999645
3.778854
11316aa9-689a-4475-acd6-1fc517dcf3b0
ishandutta2007/codeforces
pb0207/normal/1375/A.cpp
#include<bits/stdc++.h> using namespace std; const int N=1e5+1e3+7; int T; int n,a[N]; int main() { scanf("%d",&T); while(T--) { scanf("%d",&n); for(int i=1;i<=n;i++) scanf("%d",&a[i]); for(int i=1;i<=n;i++) { int x=(a[i]>=0)?a[i]:-a[i]; if(i&1) printf("%d ",x); else printf("%d ",-x);...
ALGO
0.999824
4.102263
4eef4f1d-5b9f-443b-8ee2-2d8a20c22d2d
I1Va/olimpiad_programming
росатом отбор/prevs/brut.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; const long long maxn = 2000; const long long INF = 1e9; long long n, m; char a[maxn][maxn]; vector<pair<long long, long long>> p; vector<vector<long long>> d; pair<long long, long long> x; vector<pair<long long, long long>> moves = {{0, 1}, {...
ALGO
0.999722
4.642609