uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
becb12f6-5c43-4fc2-9667-1669a2193852
Goelshiva1611/Leetcode_Problems
3760-assign-elements-to-groups-with-constraints/assign-elements-to-groups-with-constraints.cpp
class Solution { public: vector<int> assignElements(vector<int>& g, vector<int>& e) { int n = g.size(); int m = e.size(); map<int, int> map; for (int i = 0; i < m; i++) { if (map.find(e[i]) == map.end()) map[e[i]] = i; } vector<int> v; ...
ALGO
0.999952
5.887387
a5475801-17c8-4bb0-9c38-e36b80eeb763
sbrus1213/Problem-Solving
BOJ_code/12900/A12920_S.cpp
// BOJ 12920 賶 2 // Dynamic Programming - Knapsack #include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false); int n, m; cin >> n >> m; vector<int> weight, value; for (int i = 0; i < n; ++i) { int w, v, cnt, t...
ALGO
0.999991
4.55676
8e369f88-9091-4d8d-9297-e5eac6849675
Nauh24/thcs2-codeptit
C04004_SoFibonacci.cpp
#include<stdio.h> long long fibo(int n){ if(n==1||n==2) return 1; long long f1=1, f2=1, fn=0; for(int i=3;i<=n;i++){ fn=f1+f2; f1=f2; f2=fn; } return fn; } int main() { int t; scanf("%d", &t); while(t--){ int n; scanf("%d", &n); long long result=fibo(n); printf("%lld", result); printf("\n"); } ...
ALGO
0.999962
4.499309
ce24cd6b-1e3e-4fb3-a1e3-64f39092e5a1
omp-node/libnode
deps/icu-small/source/common/mlbe.cpp
#include "unicode/utypes.h" #if !UCONFIG_NO_BREAK_ITERATION #include "cmemory.h" #include "mlbe.h" #include "uassert.h" #include "ubrkimpl.h" #include "unicode/resbund.h" #include "unicode/udata.h" #include "unicode/utf16.h" #include "uresimp.h" #include "util.h" #include "uvectr32.h" U_NAMESPACE_BEGIN enum class M...
ALGO
0.946817
6.964844
592df5c6-f31f-47c6-a084-5e9392ae9c24
maigam0809/ONTAP
DevC++/BT-ay-day/vong lap for.cpp
// Vi?t chuong trnh C++ de nhap nhap mot so nguyn, tm boi so cua so d voi cc so tu 1-15 , sau d in ket qua ra mn hnh. #include <iostream> #include <iomanip> using namespace std; int main (){ int a,b,tich; tich=0; cout<<"Nhap so nguyen a:"; cin>>a; for(b=1;b<=15;b++){ tich=a*b; cout<<a<<"x"<<b<<"="<<tich<<en...
ALGO
0.934257
3.573224
a8c2b6ef-739e-4a8f-95f5-ddbb8ea4c22b
frcteam195/FRC2018
Old/PolynomialRegressionCpp/third_party/eigen/doc/special_examples/Tutorial_sparse_example_details.cpp
#include <Eigen/Sparse> #include <vector> #include <QImage> typedef Eigen::SparseMatrix<double> SpMat; // declares a column-major sparse matrix type of double typedef Eigen::Triplet<double> T; void insertCoefficient(int id, int i, int j, double w, std::vector<T>& coeffs, Eigen::VectorXd& b, con...
ALGO
0.998701
5.388735
75f7671e-2fa5-4558-b90d-130765141996
Prathmesh410/DSA_CPP
Recursion/Keypad.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; string keypadArr[]={"","","abc","def","ghi","jkl","mno","tuv","xyz"}; void keypad(string s ,string ans){ if(s.length()==0){ cout<<ans<<endl; return; } char ch= s[0]; string code = keypadArr[ch-'0']; strin...
ALGO
0.999884
5.197144
e89a9557-d196-458b-a798-4fbbc72dd428
harshithalwan1/Leetcode
283MoveZeros.cpp
#include<iostream> #include<vector> #include<string> #include<stack> using namespace std; void moveZeroes(vector<int>& nums) { int i {}, j {}; for( ; i<nums.size(); ++i){ if(nums[i]==0){ j = i; break; } } while(i<nums.size()-1){ ...
ALGO
0.99988
5.678318
8519734f-277c-4338-82c4-519053844e70
Coder-Vippro/Code
Archived/BTVN/NGHICTHE1/NGHICHTHE1.cpp
#include <bits/stdc++.h> using namespace std; long long A[10001]; long long dem=0; int n; int main() { freopen("nghichthe1.inp","r",stdin); freopen("nghichthe1.out","w",stdout); cin>>n; for(int i=1;i<=n;i++) cin>>A[i]; for(int i=1;i<=n;i++) { for(int j=i;j>=1;j--) ...
ALGO
0.9999
3.55155
653585bd-5009-4bbb-85b2-005bde7a9f94
NAIMKHAN3/Code-Chef-Contest
(175)-Week-18/Make_same.cpp
#include <bits/stdc++.h> using namespace std; int count(const string &s) { return count(s.begin(), s.end(), '1'); } int main() { int t; cin >> t; while (t--) { int n; cin >> n; vector<string> v(3); vector<int> a(3); for (int i = 0; i < 3; i++) { ...
ALGO
0.999956
4.154084
644ae634-e376-4971-8fbe-08a1f5ecb2ff
ishandutta2007/codeforces
wxhtzdy/normal/1015/C.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, m; cin >> n >> m; int niz[n]; pair<int, int> par[n]; for(int i = 0; i < n; i++) cin >> par[i].second >> par[i]...
ALGO
0.999994
3.892104
054de6f0-8dc7-481a-9817-242133c2d96c
olivertzeng/homework
cpp/apcs/C12.cpp
#include <iostream> int main(int argc, char *argv[]) { std::ios::sync_with_stdio(0), std::cout.tie(0), std::cin.tie(0); int n; std::cin >> n; int usr[n]; for (auto &num : usr) std::cin >> num; for (int i = 0; i < n; i++) std::cout << usr[usr[i]] << (i + 1 == n ? "\n" : " "); return 0; }
ALGO
0.999431
3.496809
9b809dfa-cb86-4199-b30e-58dadb18a1ff
zhuzhaa/AZhuldyz_hpc
Task 2/mini-rt/src/minirt/scene.cpp
#include "scene.h" #include "ray.h" #include "scene_loader.h" #include <limits> #include <algorithm> #include <stdexcept> #include <fstream> #include <cmath> #include <map> namespace minirt { Scene::Scene() {} void Scene::addSphere(const Sphere &sphere) { spheres.push_back(sphere); } void Scene::addLight(const...
ALGO
0.911259
6.251507
40ffe0c6-348c-44dc-a4ce-6170a823b815
ssc1729-archived/MissionRnD-C-Strings2-Worksheet
src/Consonants_Vowels.cpp
/* OVERVIEW: Given a string, Count the number of consonants and vowels and copy them to 'consonants' and 'vowels' respectively Notes : Neglect Space and Other Symbols .Consider Capital Letters too E.g.: Input: "aB c" , Output: consonants should contain 2 and vowels 1 INPUTS: A string and two int pointers OUTPUT: Mod...
ALGO
0.995857
4.761554
6792d8b8-1ed3-4521-9699-2e385956b160
ishandutta2007/codeforces
intothenight/normal/1495/C.cpp
#include <bits/stdc++.h> using namespace std; struct disjoint_set{ vector<int> p; disjoint_set(int n): p(n, -1){ } bool share(int a, int b){ return root(a) == root(b); } int size(int u){ return -p[root(u)]; } int root(int u){ return p[u] < 0 ? u : p[u] = root(p[u]); } // O(alpha(n)) bool merge(int u, int v){ u...
ALGO
0.999954
4.189669
c296ea42-3e34-45ef-bdf0-326e4f40ea83
MazharRehan/OOP
Object Oriented Programming - Lab/OOP Graded Lab 2/OOP Graded Lab 2.cpp
// Graded Lab 2: // Muhammad Mazhar Rehan - L1F21BSSE0183 #include<iostream> #include<cstdlib> #include<ctime> using namespace std; class Multiplication { int num, x; public: Multiplication() { num = 0; x = 0; } ~Multiplication() { } void generateNumber(Multiplication&); void display(const Multiplication&)...
ALGO
0.930878
3.699692
90eb4f81-727a-45ea-8763-7fb90bc288ae
yougatup/yougatup.github.io
POSCAT/upload/code/acmicpc/2747.cpp
#include <cstdio> #include <iostream> using namespace std; int main() { long long int a=0,b=0,c=1; int n; cin>>n; for(;n>0;n--) { a=b; b=c; c=a+b; } printf("%d\n",b); return 0; }
ALGO
0.999986
3.481736
49d69691-6f7a-45cf-bbc7-ff6d2f9c62f8
Zeratuli/Algorithm-Competition-Code-Set
学习/Code for C++/C++Primer Plus学习/第八章 函数探幽/8.2引用变量.cpp
#include <iostream> using namespace std; int main(void) { int rats = 10; int &rodens = rats; cout << rats << " " << rodens << endl; rodens++; cout << rats << " " << rodens << endl; cout << &rats << " " << &rodens << endl; return 0; }
ALGO
0.98752
3.256766
0af93528-df56-461d-b566-c153cd0e1b31
yuichiro-kurose/kyopro
atcoder/abc394/d/main.cpp
// author: Yuichiro Kurose #include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string s; cin >> s; stack<char> stk; bool f = true; for (char c : s) { if (c == '(' || c == '[' || c == '<') { stk.push(c); } else if (stk.empty()) { f...
ALGO
0.999956
4.921637
219901de-ec49-427e-8439-919970c2a33c
Quoc-Chung/HUONGDOITUONGFULL
HUONG DOI TUONG/TEST_TREN_LOP/vectorMang.cpp
/* -Nhập các phép toán >> , << ,1 vector với số chiều tự do , làm các thao tác cộng ,nhân , các vector u,v,t - In ra các vector vừa nhập và tính u+v, u*v (vô hướng) , u*k +t */ #include<bits/stdc++.h> using namespace std; struct vectorx{ int SoChieu; float *tp; //Thành phần trong vector }; // Hàm nhập vector i...
ALGO
0.995648
3.391547
f8bd2a7c-5dbf-4ce9-901c-8b19cdc3fb0d
imulan/procon
codeforces/712C.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout<<#x" = "<<((x))<<endl template<class T,class U> ostream& operator<<(ostream& o, const pa...
ALGO
0.999874
3.398799
2fa87c47-01b8-4e6d-bab4-13928c8b3889
rahulnagurtha/Mycode
codechef/chfnfrn.cpp
#include <bits/stdc++.h> using namespace std; #ifndef ONLINE_JUDGE #include "../debug.hpp" struct debugger dbg; #else #define debug(args...) // Just strip off all debug tokens #endif #define si(i) scanf("%d",&i) #define si2(i,j) scanf("%d %d",&i,&j) #define si3(i,j,k) ...
ALGO
0.999964
4.956235
c3d357f2-0cf0-4081-8656-0cc8de5d8b7b
ianvet31/data_structures-algorithms
mp_mazes/dsets.cpp
#include "dsets.h" using namespace std; void DisjointSets::addelements(int num) { for (int i = 0; i < num; i++) _elems.push_back(-1); } int DisjointSets::find(int elem) { if (_elems[elem] < 0) { return elem; } else { _elems[elem] = find(_elems[elem]); return _elems[elem]; } } void Disjoin...
ALGO
0.978451
3.759491
170b92eb-1ecd-4eea-a942-519e945f655e
sxu39/TP-RPMD
lammps-stable_2Aug2023_update2/src/GPU/pair_born_coul_long_cs_gpu.cpp
/* ---------------------------------------------------------------------- Contributing author: Trung Dac Nguyen (Northwestern) ------------------------------------------------------------------------- */ #include "pair_born_coul_long_cs_gpu.h" #include "atom.h" #include "domain.h" #include "error.h" #include "forc...
ALGO
0.995323
5.386387
a1c3d2ed-225e-48e2-a396-9ccf8a6112d0
Itsrajeev123/algorithm
migratorybirds.cpp
#include<bits/stdc++.h> using namespace std; const int maxn=1e5; int n; int a[10]; int main(){ cin>>n; for(int i=1,x;i<=n;i++){ cin>>x,a[x]++; } int ans = 1; for (int i=2; i <= 5; i++) if (a[i] > a[ans]) ans = i; cout << ans; }
ALGO
0.999967
3.140146
7d6122db-5df4-4718-a730-38f4db14e7c2
Cyphpython/Algo-Drapeau-hollandais
Drapeau Hollandais/Drapeau Hollandais.cpp
#include <iostream> #include <string> #include <vector> using namespace std; void Tri(vector <int> & arr) { enum color { bleu = 0, blanc = 1, rouge = 2 }; int b = 0; int w = 0; int r = arr.size() - 1; // Boucle principale, tant qu'on n'a pas parcouru tous les éléments while (w <= r) { ...
ALGO
0.999831
5.166339
1321a058-22b2-4bb0-ab21-a31cef4aa368
saktheeswaranswan/leetcode-monk-version-big-examples
robot-bounded-in-circle/robot-bounded-in-circle.cpp
class Solution { public: bool isRobotBounded(string instructions) { int x=0,y=0,dx=0,dy=1; for (int i = 0; i<instructions.size(); i++) { if(instructions[i]=='L'){ int t=dx; dx=-dy; dy=t; } else if(instruction...
ALGO
0.999915
5.898932
359b4cbf-fb8b-448f-86c7-f6009b890ba5
tongxiao2002/Compiler-Principles-H_2020
Lab/Lab2/First_level/antlr4-runtime/misc/IntervalSet.cpp
#include "misc/MurmurHash.h" #include "Lexer.h" #include "Exceptions.h" #include "Vocabulary.h" #include "misc/IntervalSet.h" using namespace antlr4; using namespace antlr4::misc; IntervalSet const IntervalSet::COMPLETE_CHAR_SET = IntervalSet::of(Lexer::MIN_CHAR_VALUE, Lexer::MAX_CHAR_VALUE); IntervalSet const...
ALGO
0.930549
6.216027
5d3e4624-e1b3-41c4-91ed-67f1026d86a5
tmastercoding/clang
USACO/Silver/BinarySearch1/s08.cpp
// 이상한 술집 13702 #include <iostream> #include <algorithm> using namespace std; int main(){ cin.tie(NULL); ios::sync_with_stdio(false); int n, k, pots[10000]; cin >> n >> k; for(int i = 0; i < n; i++){ cin >> pots[i]; } sort(pots, pots+n); long long lo = 0, hi = 2147483647, mid; ...
ALGO
0.999991
3.940866
61891230-2f5c-4af3-894b-9b5793f9f1eb
Shaggy013/camera-engine-rkaiq
algos/anr/rk_aiq_anr_algo_gain.cpp
#include "rk_aiq_anr_algo_gain.h" typedef double FLOAT_GAIN; uint32_t FLOAT_LIM2_INT(float In, int bit_deci_dst, int type = 0) { // would trigger strict-aliasing compile warning on -Os level int exp_val = (((uint32_t*)(&In))[0] >> 23) & 0xff; uint32_t dst; int shf_bit; if(exp_val - 12...
ALGO
0.995451
4.101563
c44348de-5806-4cf7-9d39-1533773fb1c7
shakilahamedriaz/Codeforces_Solutions
1900/A.Binary Imbalance.cpp
#include <bits/stdc++.h> using namespace std; void sr_sol() { int len; cin >> len; string str; cin >> str; int zeroes = 0; for (int i = 0; i < len; i++) { if (str[i] == '0') { zeroes++; } } if (zeroes > (len - zeroes)) { cout << "YES" << endl; ...
ALGO
0.999803
5.124792
3fe4ff1d-c451-4929-96f8-1c50f4482b7e
Nishant3516/Leet-Code-Questions
leetcode_1685.cpp
class Solution { public: vector<int> getSumAbsoluteDifferences(vector<int> &nums) { int n = nums.size(); vector<int> result(n, 0); int prefixSum = 0; int suffixSum = 0; // Calculate suffix sum for (int i = 0; i < n; ++i) { suffixSum += nums[i...
ALGO
0.999822
6.079568
d9d652ad-d985-4ed5-8ba9-cdbe68eb13d0
hjiang13/LLMs-in-IR
POJ-104/44/1409.cpp
#include <iostream> using namespace std; void main() { int a[6][1],i,c[6]; int reverse(int x,int z); for(i=0; i<=5; i++) cin >> "%d",&a[i][0]); for(i=0; i<=5; i++) c[i]=reverse(a[i][0],i); for(i=0; i<=4; i++) cout << "%d\n",c[i]); cout << "%d",c[5]); } int reverse(int x,int z) { int b[6][100],m,j,f,c,d,e,y=0; if(x==0) ...
ALGO
0.999773
3.119277
171d4e72-9175-4154-b97c-ac448fa5e5b8
sikakoluchaitanya/ColorDash
Color_Dash/main.cpp
// author- Chaitanya sikakolu // date - 14-01-2024 #include <iostream> #include <raylib.h> #include <stdio.h> #include <stdlib.h> #include <random> using namespace std; #define SCREEN_HEIGHT 800 #define SCREEN_WIDTH 1200 #define FPS 60 #define MAX_X 2400 #define MAX_BUILDINGS 20000 #define MAX_BUILDING_HEIGHT 400 #...
ALGO
0.937338
4.761149
f3de6375-7790-45e6-9590-d56c35417cdd
kalyani179/100DaysOfCode
Day-04/problem-4/Index-of-the-first-occurenence-of-String.cpp
class Solution { public: int strStr(string haystack, string needle) { return haystack.find(needle); } };
ALGO
0.999499
5.701041
25e35454-7ff1-4589-b025-780ad442c64e
noobie7/CodeBank
Codeforces/1629/B.cpp
/* "An anomaly, I'm Muhammad Ali Cause I know one day I'm gonna be the" - Greatest, Eminem */ #pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include<bits/stdc++.h> using namespace std; typedef long long int ll; #define Shazam ios_base::sync_with_stdio(false); cin.tie(NULL); cout.ti...
ALGO
0.999978
3.713436
022da7f2-6b6a-4b79-a923-725e90681359
devos50/programmingchallenges
USACO/FractionsToDecimals/main.cpp
/* ID: mdmarti1 PROG: fracdec LANG: C++ */ #include <iostream> #include <fstream> #include <string> #include <vector> #include <algorithm> #include <sstream> #include <set> #include <cstdlib> #include <map> using namespace std; int num, denum; set<int> seen; map<int, int> remainders; int main() { ofstream fo...
ALGO
0.99975
4.396238
3ef3d2cb-0f64-4e86-a7d7-3a2dada763bc
squaresLab/BatFix
results/transcoder/translations/py/CHECK_WHETHER_GIVEN_CIRCLE_RESIDE_BOUNDARY_MAINTAINED_OUTER_CIRCLE_INNER_CIRCLE.cpp
void fitOrNotFit ( double R , double r , double x , double y , double rad ) { double val = sqrt ( pow ( x , 2 ) + pow ( y , 2 ) ) ; if ( ( val + rad <= R && val - rad >= R - r ) || ( val - rad >= R - r ) ) cout << "Fits\n" ; else cout << "Doesn't Fit\n" ; }
ALGO
0.997597
4.972004
a4fbb5a8-4424-42be-a973-c01db636ca19
Chintan-Patel-Games/Outscal_Assignment
Programs/15. Linked List/Assignment-1.cpp
#include <iostream> using namespace std; struct Node { int data; Node* next; Node() : data(0), next(nullptr) {} // default constructor Node(int val) : data(val), next(nullptr) {} // parameterized constructor }; class CircularLinkedList { private: Node* head_node; public: CircularLinkedList() ...
ALGO
0.999421
5.838536
65dd3325-9690-4c9c-8fe5-fee5c53378f6
Sean0628/competitive_programming
atcoder/abc/abc087/c.cpp
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; #define rep(i, n) for (int i = 0; i < (n); ++i) #define out(arg) cout << (arg) << endl using ll = long long; using P = pair<int, int>; using mint = modint1000000007; void chmax(ll& a, ll b) { a = max(a, b); } void chmin(ll& a,...
ALGO
0.99998
3.826771
0cd960ad-5267-45f6-84e9-95856503b9f7
Bharatkgupta/leetcode-bkg
1192-critical-connections-in-a-network/1192-critical-connections-in-a-network.cpp
class Solution { void cdfs(vector<vector<int>>& adjList, int currNode, int prevNode, int time, vector<int>& timeIn, vector<int>& low, vector<vector<int>>& criticalEdges) { timeIn[currNode] = time; low[currNode] = time; for(const int& nextNode : adjList[currNode]) { if(nextNode !=...
ALGO
0.99995
6.191006
1c3f08d6-ceff-476c-b888-0b956e319b4d
sarvex/leetcode-ruby
solution/1700-1799/1762.Buildings With an Ocean View/Solution.cpp
class Solution { public: vector<int> findBuildings(vector<int>& heights) { int mx = 0; vector<int> ans; for (int i = heights.size() - 1; ~i; --i) { int v = heights[i]; if (mx < v) { ans.push_back(i); mx = v; } } ...
ALGO
0.99999
6.289213
135fc254-6c1a-430e-b65c-f7b3055e666b
nrl-ai/chessai
dnn_models/training/yolox/layers/cocoeval/cocoeval.cpp
using namespace pybind11::literals; namespace COCOeval { // Sort detections from highest score to lowest, such that // detection_instances[detection_sorted_indices[t]] >= // detection_instances[detection_sorted_indices[t+1]]. Use stable_sort to match // original COCO API void SortInstancesByDetectionScore( const...
DATA
0.996186
7.840165
47ab73a1-dc8c-42ab-8fb0-974bc3be823f
n0IQ/LeetCode
51-n-queens/51-n-queens.cpp
class Solution { private: vector<vector<string>> ans; void nQueensHelper(vector<string> &board, vector<int> &up, vector<int> &upLeftDiagonal, vector<int> &upRightDiagonal, int row, int n) { if(row == n) { ans.push_back(board); return; } for(int col =...
ALGO
0.999929
6.523195
144cd67b-b701-4e65-a5ca-a28a1c53fcb2
Keshav0907/Data-Structure-and-Algorithms
0127-word-ladder/0127-word-ladder.cpp
class Solution { public: int ladderLength(string beginWord, string endWord, vector<string>& wordList) { queue<pair<string,int>> q; unordered_set<string> st(wordList.begin(),wordList.end()); q.push({beginWord,1}); while(!q.empty()) { ...
ALGO
0.999992
5.72729
64fbec54-3170-489f-ba71-56045be04f5f
J-Gann/alltrans
benchmarks/benchmarks_source/8_level/p04030/s122051540.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i=0;i<n;++i) #define REP(i, k, n) for(int i=k; i<=n; ++i) #define REPR(i, k, n) for(int i=k; i>=n; --i) #define MAX 2001 #define F first #define S second #define PB push_back #define MP make_pair #define r return typedef long long ll; typedef unsig...
ALGO
0.999788
3.582928
6fd8fe09-94c6-4e4a-83d8-c2fb2ea796d2
ksaveljev/UVa-online-judge
397.cpp
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <sstream> using namespace std; #define pow2(i) (1<<i) #define bit(i) (1<<i) #define isOdd(i) (i&1) #define isEven(i) (!(i&1)) #define sz(i) i.size() #define REP(i, b, n) for (int i = b; i < n; i++) #define REPI(i, b, n) for (int i = ...
ALGO
0.999855
4.387829
4364451b-f056-445a-8df5-e925e0cc8f21
wldnd9904/Algorithm
swea/sw_03.cpp
#include <iostream> #include <string> #include <vector> using namespace std; const int MOD = 1000000007; int solve(const string& input) { const int len = input.length(); vector<vector<int>> dp(len, vector<int>(16, 0)); // 첫날엔 A랑 첫날 책임자 필참 const int fday = ((1 << (input[0] - 'A')) | 1); for (int i = ...
ALGO
0.999868
5.292235
518e7b65-0be7-4522-b9a9-397ce995f2be
IsaacBell/Algorithms
reference/string/aho-corasick.cpp
// #include<bits/stdc++.h> #include <iostream> #include <iomanip> #include <string> #include <vector> #include <algorithm> #include <sstream> #include <queue> #include <deque> #include <bitset> #include <iterator> #include <list> #include <stack> #include <map> #include <unordered_map> #include <set> #include <unordere...
ALGO
0.999867
3.652234
c51582eb-0af2-4da3-962b-a6a8b439b2db
Farhana79/summer-project-2
QuickSort.cpp
/** * @file MergeSort.cpp * @Farhana Sultana (<EMAIL>) * @brief This file for the MergeSort class * @date 2024-06-30 * * @copyright Copyright (c) 2024 * */ #include "QuickSort.hpp" template <class T> int QuickSort<T>::partition(std::vector<T>& list, int low, int high){ // Choose the pivot element as the l...
ALGO
0.999856
5.785744
c2be92a5-92c9-41cb-a038-859c2168ac55
suzynotsusie/Computer
CPP/tech28/c++ co ban/CF/80A.cpp
//https://codeforces.com/problemset/problem/80/A #include <bits/stdc++.h> using namespace std; void sieve(bool* prime, short maxn) { prime[0] = prime[1] = false; for (short i = 2; i <= sqrt(maxn); i++) if (prime[i]) { for (short j = i * i; j <= maxn + 1; j += i) prime[j] = false; } // for (ll i = 2; i <= maxn;...
ALGO
0.99996
3.789407
e9470421-9425-4699-adc3-3bafdc234085
InquietoPartho/DSA-with-Hand-Notes
Backtracking_26th March 2023/Sudoku_Solver.cpp
#include<iostream> #include<vector> using namespace std; bool isSafe(int value,int board[][9],int curr_row,int curr_col){ // row check for(int col = 0;col<9;col++){ if(board[curr_row][col] == value){ return false; // Not safe } } // column check for(int row = 0;row<9;row+...
ALGO
0.999577
6.032954
dab3c4e2-1662-478e-b974-6e56e13bec61
Cherrytree56567/QuadEngine
QuadEngine/cryptopp/gf256.cpp
// gf256.cpp - originally written and placed in the public domain by Wei Dai #include "pch.h" #include "gf256.h" NAMESPACE_BEGIN(CryptoPP) GF256::Element GF256::Multiply(Element a, Element b) const { word result = 0, t = b; for (unsigned int i=0; i<8; i++) { result <<= 1; if (result & 0x100) result ^= m_m...
ALGO
0.999087
5.182868
88203d3c-131d-47a4-9bcb-f9e6af6cf792
PrashanthPuneriya/competitive-programming
Buying Sweets.cpp
#include<iostream> using namespace std; int main() { int t; cin>>t; while(t--) { int n,cost; cin>>n>>cost; int a[n],sum=0; int sweets=0,drop=101,rem,even_buy; for(int i=0;i<n;i++) { cin>>a[i]; sum+=a[i]; if(a[i]<drop)...
ALGO
0.999905
3.623962
4883b341-d416-4a9f-8f49-afcfd2284c1a
fxfxxxfxx/CSES-sols
Sorting_and_Searching/Missing_Coin_Sum.cpp
#include <bits/stdc++.h> using namespace std; void solveT() { } static void solve() { int n; cin >> n; vector<int> V(n); for (int i = 0; i < n; i++) cin >> V[i]; sort(V.begin(), V.end()); int64_t sf = 0; for (int v: V) { if (sf + 1 < v) { cout << sf + 1 << "...
ALGO
0.999968
4.320835
ff22bdcc-0003-44fe-b190-4aebe85590f9
PrithwishJana/CoTran
CodeGen/data/transcoder_evaluation_gfg/cpp/AREA_OF_A_HEXAGON.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; double f_gold ( double s ) { return ( ( 3 * sqrt ( 3 ) * ( s * s ) ) / 2 ); } //TOFILL int main() { int n_success = 0; vector<double> param0 {1772.65...
ALGO
0.985087
4.216397
52734c70-7ee6-4509-a2ae-aa65b8b5adf6
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_11593_31.cpp
#include <bits/stdc++.h> using namespace std; const int INF = 0x7f7f7f7f; struct Team { int point, win, fail, time; string name; bool operator<(const Team& t) const { if (point != t.point) return point > t.point; if (win - fail != t.win - t.fail) return win - fail > t.win - t.fail; if (win != t.win) r...
ALGO
0.999706
4.3661
f61ce2ac-34de-4527-a118-9668d0f0c3c8
jiuge123/JiugeStl
CppFile/源.cpp
#include"../HeadFile/iterator.h" #include"../HeadFile/algobase.h" #include"../HeadFile/vector.h" #include"../HeadFile/list.h" #include"../HeadFile/deque.h" #include"../HeadFile/functional.h" #include"../HeadFile/util.h" #include"../HeadFile/array.h" #include"../HeadFile/forward_list.h" #include"../HeadFile/stack.h" #in...
ALGO
0.996659
3.566993
09eea190-976c-433d-93da-b1fbe77af3d9
timot3/ECE522-Speculative-Coherence
GEM5Simulation/gem5/src/systemc/tests/systemc/misc/unit/data/datawidth_unsigned/promote_lost_carry/datawidth.cpp
/***************************************************************************** datawidth.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**************************************************************************...
ALGO
0.87726
5.331775
7fccb737-585e-4a79-bd63-928e61dbb98a
horrdii/CollegeLabs
programming_labs/Nikitka.cpp
#include <iostream> #include <cmath> std::stringstream stream; using namespace std; #define MAX 100 void sortStrings(char arr[][MAX], int n) { char temp[MAX]; // Sorting strings using bubble sort for (int i = 0; i < n - 1; i++) { for (int j = 0; j < n - 1 - i; j++) { if (strcmp(arr[j], arr[j + 1]) > 0) ...
ALGO
0.992838
3.585689
53a1c145-fbe6-453c-b46e-9d1476546035
ishandutta2007/codeforces
nishant403/normal/1177/A.cpp
#include <bits/stdc++.h> using namespace std; #define int long long signed main() { int k; cin >> k; int digit = 0; int sum = 0; while(1) { digit++; sum+=(digit*9*pow(10,digit-1)); if(k < sum ) break; } for(int i=1;i<digit;i++) k-=(i*9*pow(10,i-1)); int last = 0; ...
ALGO
0.999558
3.903159
9c454aa6-4f41-42e0-93b0-c682c9550d42
SonaBadalyan/GITC
C++/Lesson29/Lesson17/Stack.cpp
#include <iostream> class Stack { public: Stack() { index = 0; size = 5; array = new int[size]; } void push(int val) { if (isFull()) { size *= 2; int* temp_array = new int[size]; ...
ALGO
0.947125
5.101419
2e549f95-7b4a-497b-9af8-7608139fc520
steveiaco/COMP371GraphicsProject
Project/ThirdParty/FreeImage-3170/Source/LibRawLite/internal/aahd_demosaic.cpp
typedef ushort ushort3[3]; typedef int int3[3]; #ifndef Pnw #define Pnw (-1-nr_width) #define Pn (-nr_width) #define Pne (+1-nr_width) #define Pe (+1) #define Pse (+1+nr_width) #define Ps (+nr_width) #define Psw (-1+nr_width) #define Pw (-1) #endif struct AAHD { int nr_height, nr_width; static const int nr_...
ALGO
0.997035
4.037085
e1f04e87-a8d4-4e10-8e9a-b7a4e136edd9
twpca/toi-primary-2023
generator/house_extreme.cpp
#include<algorithm> #include<random> #include<unordered_set> #include<vector> #include<cassert> #include<cstdio> #include<cstdlib> using namespace std; using i64 = long long; using Unif = uniform_int_distribution<>; constexpr int MAX_X = 1'000'000'000; constexpr int MIN_X = -1'000'000'000; constexpr int DX = 10'000; c...
ALGO
0.977794
3.115832
0b629124-42d0-417f-b0de-f2f3734d2a4e
vishal1844/leetcode
1218-longest-arithmetic-subsequence-of-given-difference/1218-longest-arithmetic-subsequence-of-given-difference.cpp
class Solution { public: int longestSubsequence(vector<int>& arr, int diff) { int i,j,k,l,m,t=1; unordered_map<int,int>mp; for(i=0;i<arr.size();i++){ if(mp.find(arr[i]-diff)!=mp.end()){ mp[arr[i]]=1+mp[arr[i]-diff]; t=max(t,mp[arr[i]]); ...
ALGO
0.99997
5.987869
99bf4eb6-aa2d-4643-b716-0d33e6dc4f5c
Sena-Han/Baekjoon
05000 - 05999/5358.cpp
#include <iostream> #include <string> using namespace std; int main() { string s; while (1) { getline(cin, s); if (cin.eof()) break; for (int i = 0; i < s.length(); i++) { if (s[i] == 'e') cout << 'i'; else if (s[i] == 'i') cout << 'e'; else if (s[i] == 'E') cout << 'I'; else i...
ALGO
0.99846
3.724209
9883869d-94bd-4bb2-9fd6-f56ccee9e99f
raincross7/code-similarity
codes/train_code/problem033/problem033_446.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int n; vector<int> a; int main() { while (cin >> n) { if (n == 0) break; a.resize(n); for (int i = 0; i < n; ++i) cin >> a[i]; sort(a.begin(), a.end()); int res = 1<<29; for (int i = 0; i...
ALGO
0.99985
3.870815
3ca327d8-a5ef-416f-8a9b-4905d5b2ccda
theduardomaciel/cc-paa
section3/4.cpp
#include <iostream> /* Escreva um algoritmo de divisão-e-conquista $O(log n)$ para computar $a^n$, em que n é um inteiro positivo. 1: procedure POTENCIA_RAPIDA(a, n) 2: if n = 0 then 3: return 1 4: end if 5: metade ← POTENCIA_RAPIDA(a, ⌊n/2⌋) 6: if n mod 2 = 0 ...
ALGO
0.999792
6.70703
b72fbddd-e1e6-4d52-9946-55c5ca3a731c
gtkn/atcoder
ARC_071_C.cpp
//title #include <bits/stdc++.h> using namespace std; //#include <atcoder/all> //using namespace atcoder; #define rep(i,n) for (ll i = 0; i < (n); ++i) #define rep1(i,n) for (ll i = 1; i <= (n); ++i) #define repr(i,n) for (ll i = (n)-1; i >= 0; --i) #define rep1r(i,n) for (ll i = (n); i > 0; --i) #define bit(n,k) ((n>>...
ALGO
0.999818
4.505115
27acef7d-4f6a-4028-8a89-309349c52980
nucleargezi/acm-icpc
codeforces/gym/103800_The 2022 SDUT Summer Trials/103800F.cpp
#include "MeIoN_Lib/MeIoN_all.hpp" void before() {} // #define tests NAME MeIoN_is_UMP45() { string s; int t; std::cin >> s >> t; vector<pair<int, int>> a; int n{-1}, f{-1}; for (char c : s) { if (c == '|') { if (n != -1) a.emplace_back(f * n, len(a) + 1); n = -...
ALGO
0.999891
4.54204
87d31235-e828-44ca-8542-d24dbfcca343
knotsid/contribute-exe
C++/DP-patterns/Optimize-Path-To-Reach-Target/5-min-cost-for-tickets.cpp
/* let, dp[i] = min dollors you need to travel till ith day we can reach here by 3 options, 1) 1 day plan dp[i] = dp[i - 1] + cost[1 day plan] 2) 7 day plan dp[i] = max(0th day or dp[i - 7]) + cost[7 day plan] 3) 30 day plan dp[i] = max(0th day or dp[i - 30]) + cost[30 day pl...
ALGO
0.999563
5.216281
cc27561e-4702-4bb7-ac3d-084df010f8fe
KonTN/HomeWork
13.2/main.cpp
#include <iostream> #include <vector> char field[3][3]; bool game_finished = false; void draw_field(){ std::cout << field[0][0] << " | " << field[1][0] << " | " << field[2][0] << std::endl; std::cout << "---------" << std::endl; std::cout << field[0][1] << " | " << field[1][1] << " | " << field[2][1] << s...
ALGO
0.984614
4.358509
72075b12-c346-4290-8f1e-1469d8569a34
Tanmay-s55/DAA-LAB
Week 11/Week11_1.cpp
#include <bits/stdc++.h> using namespace std; int MatrixChainOrder(int p[], int i, int j) { if (i == j) return 0; int k; int min = INT_MAX; int count; for (k = i; k < j; k++) { count = MatrixChainOrder(p, i, k) + MatrixChainOrder(p, k + 1, j) + p[i - 1] * p[k] * p[j]; if (count < min) min = count; } r...
ALGO
0.999974
3.829327
84108d92-a1b3-4e86-9f5e-4211af2c6359
chandula00/Competitive-Programming
Competitions/Aces/aces_coders_v9/Dirty Short.cpp
#include <bits/stdc++.h> using namespace std; const int MAX = 2e3 + 1; vector<vector<int>> grid; bool visited[MAX]; char colour[MAX]; int t, n, m, a, b; int dfs(int n) { visited[n] = true; for (auto i : grid[n]) { if (visited[i]) { if (colour[i] == colour[n]) { ...
ALGO
0.999976
4.84744
4568f3e0-cfc5-45bb-bccc-c3ca759a1f5f
yantor3d/polyReorder
src/meshTopology.cpp
#include "meshData.h" #include "meshTopology.h" #include "topologyPath.h" #include <queue> #include <iomanip> #include <stdio.h> #include <vector> #include <limits.h> #include <maya/MDagPath.h> #include <maya/MFnMesh.h> #include <maya/MGlobal.h> #include <maya/MString.h> MeshTopology::MeshTopology() {} MeshTopology...
ALGO
0.970461
6.050953
1335a1ff-5c73-4ce4-b96e-c902f12a10ea
apjv05/LeetCode
Problems/Arrays/0238_ProductofArrayExceptSelf.cpp
vector<int> productExceptSelf(vector<int>& nums) { int n = nums.size(); vector<int> Prefix(n), Suffix(n), Output(n); Prefix[0] = 1; for(int i = 1; i < nums.size(); i++) { Prefix[i] = Prefix[i - 1] * nums[i - 1]; } Suffix[n - 1] = 1; for(int i = nums.size() - 2; i >= 0; i--) { ...
ALGO
0.999932
5.732253
10e7a59b-d9ba-4209-ad95-4e16ff5065dc
HabibRaju/Number-Theory
list.cpp
#include<bits/stdc++.h> using namespace std; vector <int> v; int main(){ int p; cin>>p; while(p--){ int n,x; cin>>n; x=sqrt(n); for(int i=1; i<=x; i++){ if(n%i==0){ v.push_back(i); int l=n/i; if(l==i)continue; else v.push_back(l); } } i...
ALGO
0.999716
4.360358
fd978e31-e066-4c06-8829-4b5a430028a7
nojhan/eodev
eo/contrib/mathsym/gen/NodeSelector.cpp
#include "NodeSelector.h" #include "Sym.h" #include <utils/eoRNG.h> // If subtree is not set (by randomnodeselector for instance, find it now Sym NodeSelector::NodeSelection::subtree() { if (subtree_.empty()) { subtree_ = get_subtree(root_, subtree_index_); } return subtree_; } NodeSelector::NodeSelecti...
ALGO
0.865839
6.119368
3e765681-ae2a-47c7-b562-e84df1fbb6bb
necuro/Prata
chapter16/task5/task16_5/main.cpp
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; template <class T> int reduce(T ar[], int n); template <class T> void printArray(T ar[], int n); int main() { //For long vector<long> lVec; cout << "Pl, fill array of long(q for stop):\n"; int i = 0; lo...
ALGO
0.969216
3.87221
579857bb-4ca6-4546-ad3b-3847f1cf2d3a
quannh08/DSA-PTIT
dsa08007.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back int main(){ int t; cin >> t; while(t--){ ll n; cin >> n; queue<ll> qe; ll cnt=0; qe.push(1); while(!qe.empty()){ ll tmp=qe.front(); qe.pop(); if(tmp<=n) { cnt++; qe.push(tmp*10); qe.push(tmp*10+1)...
ALGO
0.999769
4.173764
f477377c-07ca-4c3d-a7af-29ded53420b8
aditya-kr86/OOP-s-Lab
Assignment 25-02-2025/q10.cpp
// Write a C++ Program to Find ASCII Value of a Character #include <iostream> using namespace std; int main() { char c; cout<<"Enter a Character\n"; cin>>c; cout<<"The ASCII value of "<< c <<" is "<<int(c); return 0; }
TOOL
0.966867
4.199146
dcf9dfbc-210f-4a80-aeea-f6bb74c006d8
ishandutta2007/codeforces
shzhang/normal/1558/F.cpp
#include <cstdio> #include <algorithm> #include <vector> #include <set> #include <cstdlib> #include <utility> #include <cmath> #include <queue> #include <stack> #include <cstring> using namespace std; #define ll long long #ifndef ONLINE_JUDGE #define debug(format, ...) fprintf(stderr, \ "%s:%d: " format "\n", __...
ALGO
0.999714
4.144724
c4f557b6-3090-4c72-b62d-8025b27cb815
kjm99d/VideoTalk
lib/opencv/sources/3rdparty/carotene/src/scharr.cpp
#include <vector> #include "common.hpp" namespace CAROTENE_NS { bool isScharr3x3Supported(const Size2D &size, BORDER_MODE border, s32 dx, s32 dy, Margin borderMargin) { return (dx == 0 && dy == 1 && isSeparableFilter3x3Supported(size, border, 3, 1, borderMargin)) || (dx == 1 && dy =...
ALGO
0.97212
4.749222
4bedf683-d4a3-460d-aa18-2de957be8651
hassan1105/AlQuranFlutter
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.998784
6.761023
a80d4647-049e-4c60-aa85-91ce31469e9c
thuyhoh/C_Cpp
DSA/c/4.sort/#5_quick_sort.cpp
#include<bits/stdc++.h> void swap(int &a, int &b){ int tmp = a; a = b; b = tmp; } int partition(int a[], int l, int r, int index_pivot){ int pivot = a[index_pivot]; swap(a[index_pivot],a[r]); int store_index = l; for(int i = l; i<= r-1; i++){ if(a[i]<pivot){ swap(a[store_index],a[i]); store_index++; ...
ALGO
0.999821
4.206019
8b39959d-8635-436b-a860-95241bd1a288
alvr-org/Monado-ALVR
src/xrt/drivers/north_star/distortion_3d/deformation_northstar.cpp
#include "deformation_northstar.h" OpticalSystem::OpticalSystem(const OpticalSystem &_in) { ellipseMinorAxis = _in.ellipseMinorAxis; ellipseMajorAxis = _in.ellipseMajorAxis; screenForward = _in.screenForward; screenPosition = _in.screenPosition; eyePosition = _in.eyePosition; worldToSphereSpace = _in.worldToSphe...
ALGO
0.984819
4.961251
e62a1030-e69c-4140-9f9f-1899cd45fbd9
vmffotltka/hansungCF
week11/codes/B_크리스마스_선물.cpp
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0)->sync_with_stdio(0); int n; cin >> n; priority_queue<int> pq; for (int i = 0; i < n; i++) { int a; cin >> a; if (!a) { if (!pq.empty()) { cout << pq.top() << '\n'; pq.pop();...
ALGO
0.99984
3.594007
c3e46898-eca1-49fa-87f8-49be30baf62d
abhishek18124/PPCPPAugust2023
Lecture 09/007Arrays_SelectionSort.cpp
#include<iostream> using namespace std; int main() { int arr[] = {50, 40, 10, 30, 20}; int n = sizeof(arr) / sizeof(int); for (int i = 0; i <= n - 2; i++) { // in the ith pass, place the smallest element in the unsorted part of the arr[] to its correct position int cPos = i; // assume arr[i] is the smal...
ALGO
0.999685
3.592203
b39f77aa-c126-44a1-89f7-4b427f67d494
Lycorecoil/My-firstflutter-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
7015474b-27d0-4f1e-a576-c45505cc1784
bdqnghi/bi-tbcnn
code/linkedlist/cpp/1655.cpp
#include "linkedlist.h" #include <iostream> #ifndef NULL #define NULL 0 //defino null #endif namespace KangaParty { LinkedList::LinkedList() { _length=0; _cursor=NULL; } LinkedList::~LinkedList() { cout << "Se destruyo la casita Linked de los canguros. Se acabo la fiesta." << endl; _cursor->preDestroy()...
TOOL
0.865706
3.84184
6ee02d58-ac6b-4e44-bb05-3acc0366fe71
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_4607_22.cpp
#include <bits/stdc++.h> using namespace std; int main() { long long int a, b, n, s, i; cin >> n; for (i = 1; i <= n; i++) { cin >> a >> b; s = a + b; cout << s; } return 0; }
ALGO
0.999281
4.052934
0bd423de-e3bd-4aae-b278-570ccc05c37a
Utkarsh9026/DSA
lbQ_6.cpp
#include<iostream> #include<math.h> using namespace std; int main() { int n; cin>>n; int i=0; int ans=0; while(n!=0) { int bit = n & 1; n=n>>1; ans=(bit*pow(10,i))+ans; i++; } cout<<ans<<endl; return 0; }
ALGO
0.99996
4.334508
7d4335a5-a154-4551-a4a2-2317a8478035
goelshivani321/Data-Structures-And-Algorithms
Assignment12/DataReverseSorted.cpp
#include "DataReverseSorted.h" DataReverseSorted::DataReverseSorted() : DataGenerator("Reverse sorted") {} DataReverseSorted::~DataReverseSorted() { Element::reset(); } void DataReverseSorted::generate_data(vector<Element> &data, const int size) { int length,sum=INT32_MAX; for(length=1;length<=size;++le...
ALGO
0.972662
4.388134
43b0c466-c350-498a-bbb4-523d3b994dc0
ArshiaShabazpour/Leetcode_solutions
0004-median-of-two-sorted-arrays/0004-median-of-two-sorted-arrays.cpp
class Solution { public: double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { if (nums1.size() > nums2.size()) { return findMedianSortedArrays(nums2, nums1); } int len1 = nums1.size(), len2 = nums2.size(); int left = 0, right = len1; while (le...
ALGO
0.999991
6.59748
bb1568d4-cc55-4870-a49e-f3d846a0556b
tusharsno/Problem-Solver
Balanced_Team.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; using u32 = unsigned; using u128 = unsigned __int128; /*bool two_pointer_tech(vector<ll>& skills, int target) { ll l = 0, r = skills.size() - 1; while (l < r) { ll sum = skills[l] + skills[r]; ...
ALGO
0.999903
4.458058
e59d5ced-5a6b-44ba-9197-be458e0d1bdc
zezoloula7/todo
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
3afad184-fab6-4ab1-9d98-969e6c02ef18
TranBaLoi/DSA_PTIT
NoiDay-1.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; int main() { int t; cin >> t; while(t--) { int n; cin >> n; vector<ll> v(n); for(int i = 0; i < n; i++) cin >> v[i]; priority_queue<int, vector<int>, greater<int>> pq; ll sum = 0; for(int i...
ALGO
0.999961
4.314292
61f25a59-0d28-4a97-bfe8-467218966417
Syhawk/LeetCode
spiral_matrix_ii.cpp
//uri: https://leetcode.com/problems/spiral-matrix-ii/ /* * 实现起来比较麻烦一点。由于需要存储起来,如果仅用vector,那么要比c语言的数组 * 要麻烦的多。首先,将要存储的行分为从上到下的行和从下到上的行,这是由于每实现 * 一次外围循环,就会出现两行、两列,两列没法存储于vector中,除非你事先申请 * 好vector是n*n的。那么,我们可以把两行分别存储起来,然后再通过两行的信息得出 * 这两行中间其他行的元素信息。 * 空间复杂度:O(n*n). * 时间复杂度:O(n*n). * */ class Solution { public: ...
ALGO
0.999895
6.785468
b44e1d10-78e2-44ce-983e-460ab9ec98b6
gmh5225/OLLVM-test-goron-10
libcxx/test/std/algorithms/alg.modifying.operations/alg.move/move_backward.pass.cpp
// <algorithm> // template<BidirectionalIterator InIter, BidirectionalIterator OutIter> // requires OutputIterator<OutIter, RvalueOf<InIter::reference>::type> // OutIter // move_backward(InIter first, InIter last, OutIter result); #include <algorithm> #include <cassert> #include <memory> #include "test_macros....
TEST
0.931365
7.117112
196931c5-895a-4bab-b883-a049865413bf
ishandutta2007/codeforces
dotorya/normal/747/A.cpp
#include<stdio.h> int main() { int N, a, i; scanf("%d", &N); i = i; int bm; for (i = N; i; i--) { if (N%i == 0) { if (N / i < i)continue; return !printf("%d %d", i, N / i); } } }
ALGO
0.999709
3.623661