uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
a3cc7c3f-be85-42a6-8e09-f4b402150d78
linshuqun/leetcode
Next Greater Element I.cpp
class Solution { public: vector<int> nextGreaterElement(vector<int>& findNums, vector<int>& nums) { vector<int> s; map<int, int> greater; for (int i = 0; i < nums.size(); i++) { while (s.size() && s.back() < nums[i]) { greater[s.back()] = nums[i]; ...
ALGO
0.999971
6.171451
55bc6757-1000-4b39-8c7b-387699c62b67
aditya4436/Data--Structures-And-Algorithm-In-C-Plus-Plus
Data Structures And Algorithm/Array/Solved Problems On Array/Intersection Of Two Arrays.cpp
#include<bits/stdc++.h> using namespace std; // BRUTE-FORCE // Time Complexity:- O(n*m) // Space Complexity:- O(m) // vector<int> Intersection(vector<int> arr1, vector<int> arr2, int n, int m) // { // vector<int> temp; // vector <int> visited(arr2.size(), 0); // for(int i=0; i<n; i++) // { // f...
ALGO
0.999977
4.896783
77f71df0-5800-43f9-9d05-d9fdff6acb38
dshevani/practiseCoding
topcoder/tc/topcoder-1/TheCardLineDivTwo.cpp
#include <string> #include <vector> #include <cstring> #include <iostream> using namespace std; int t[16][16][2]; class TheCardLineDivTwo { public: bool match(string a, string b) { return a[0] == b[0] ||(a[1] == b[1] || (a[1] == 'D' && b[1] == 'H') || (...
ALGO
0.963728
3.894555
72010c65-e988-4371-957c-e40ebb6a8cd9
antonioclaudio0711/color_editor_flutter_web
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
b332c0e2-7460-45b0-a2e1-056a293a9c0f
VanshajR/CPP
queue_linkl.cpp
#include<iostream> using namespace std; class node { public: int data; node* next; node(int n) { data=n; next=NULL; } }; class queue { public: int front; int rear; node* head; queue() { head=NULL; } void enqueue(int val) //insend {...
ALGO
0.999259
4.339669
51814ff7-57aa-4ead-9e89-325ba472256d
reo0105/atcoder
contest/2023_06_17_beginner/B.cpp
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ll; int main() { ll ans = 0; ll two = 1; for (int i = 0; i < 64; i++) { int a; cin >> a; ans += a * two; two <<= 1; } cout << ans << endl; return 0; }
ALGO
0.999683
3.892233
7836d0d9-3dbf-4a8c-a149-4c1165ec59fb
AryanBiswas198/DSA-cpp
3600-find-the-k-th-character-in-string-game-i/find-the-k-th-character-in-string-game-i.cpp
class Solution { public: char kthCharacter(int k) { string word = "a", prev = word; while(word.size() <= k) { for(int i=0; i<prev.size(); i++) { prev[i] == 'z' ? prev[i] = 'a' : prev[i] = prev[i] + 1; } word = word + prev; prev...
ALGO
0.999637
5.315809
5b7474bc-ed08-4184-b503-57a9c2569176
Neha2109/CPP_Programs
2-D_Array/search_optimised_approach.cpp
// works for only sorted rows ans columns in ascending order #include "bits/stdc++.h" #include<iostream> #include<climits> using namespace std; int main(){ int n,m,s; cout<<"enter rows in array"<<endl; cin>>n; cout<<"enter columns in array"<<endl; cin>>m; cout<<"enter search key"<<endl; c...
ALGO
0.999932
4.28794
d276cad5-00b7-498b-a69d-db0db6410257
MATHEESHA2/Telegram
TMessagesProj/jni/rlottie/src/vector/vcompositionfunctions.cpp
#include "vdrawhelper.h" /* result = s dest = s * ca + d * cia */ void comp_func_solid_Source(uint32_t *dest, int length, uint32_t color, uint32_t const_alpha) { int ialpha, i; if (const_alpha == 255) { memfill32(dest, color, length); } else { ialpha = 255 -...
TOOL
0.942796
6.420274
84d9d0be-9360-467e-8ce9-7fc8695cb50c
mr-tweaker/CPlusPlus_Exercises
Tokens, Expressions and Control Structures - Chapter 3/CH3_E3.5.cpp
#include <iostream> const int NUM_CANDIDATES = 5; void countVotes(int ballots[], int size, int counts[], int& spoiltBallots) { for (int i = 0; i < NUM_CANDIDATES; i++) { counts[i] = 0; } spoiltBallots = 0; for (int i = 0; i < size; i++) { if (ballots[i] >= 1 && ballots[i] <= NUM_CAND...
ALGO
0.999452
6.822985
34fd6240-d5dd-417a-8264-53da03679aa4
Seongil-Shin/Algorithm
백준/solutions/17140 Samsung sw test/17140 Samsung sw test.cpp
#include <iostream> #include <algorithm> #include <cstring> #include <vector> #define MAX_NUM 101 using namespace std; typedef struct Cell { int value; int count; bool operator < (Cell c) { if (count < c.count) return true; else if (c.count < count) return false; else { if (value < c.value) ret...
ALGO
0.999879
3.53381
44400b1b-849b-417a-8b11-86bc4de09c97
vishal8113/Data-Structures-And-Algo
LinkedList/ReverseADLL.cpp
// Reverse a doubly linked list #include<bits/stdc++.h> using namespace std; class Node{ public: int data; Node* next; Node* prev; Node(int val) { data=val; next=NULL; prev=NULL; } }; int LLlength(Node* head) { Node* temp =head; int cnt=0; while(temp!=N...
ALGO
0.999968
4.836186
8f0b58ac-93ed-4570-8e27-d0500d23111b
diptomistry/AlgorithmCPP
algoD/dynamicProgramming/rodClimbing.cpp
#include<bits/stdc++.h> using namespace std; int mat[100][100], dp[100][100]; int r, c; int call(int i, int j) { if(i>=0 && i<r and j>=0 && j<c){ /// If inside array if(dp[i][j]!=-1) return dp[i][j]; int res=INT_MIN; /// Moving to three default direction, also add current cell's...
ALGO
0.999945
4.206421
9a70c9e9-704b-4f3f-aa2d-48c60f959704
Prodigy343/CompetitiveProgramming
UVa/614B.cpp
#include <bits/stdc++.h> using namespace std; struct bigz_t { explicit bigz_t(int sign_ = POSITIVE, int digits = 0) : sign(sign_), v(digits, 0) {} bigz_t(int sign_, vector<int>& v_) : sign(sign_) {v.swap(v_);} bigz_t(bigz_t& rhs) : sign(rhs.sign) {v.swap(rhs.v);} bigz_t& operator =(bigz_t& rhs) {sign = rhs.sign; ...
ALGO
0.999891
4.630313
e9291b53-cefb-4a58-8fc1-150ca0651898
roy4801/solved_problems
leetcode/445.cpp
/* * Leetcode Medium 445. Add Two Numbers II * author: roy4801 * AC(C++) */ #include <bits/stdc++.h> using namespace std; #include "helper.h" typedef pair<int, int> P; typedef long long int LL; #define arr array #define PB push_back #define MP make_pair #define X first #define Y second class Solution { public: ...
ALGO
0.999836
6.099439
3c7c93a1-3283-400a-9f07-03273a47f0ec
2023-anik/My_Code_Archive
CodeForeces Problems/Monster_Monster.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define endl '\n' #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() void solve(){ int n, x; cin >> n >> x; vector<int> hp(n); for(auto &it:hp){ cin>>it; } sort(rall(hp)); int i, res = 0; fo...
ALGO
0.999854
4.61103
94b10bd9-0ba9-41b4-b87d-26c10dcb3472
manikanta2901/ubuntu
.history/imp/cpp/DataStructures/singlyLinklist/usingSTL_20200622143828.cpp
#include<bits/stdc++.h> using namespace std; void showlist(list <int> g) { list <int> :: iterator it; for(it = g.begin(); it != g.end(); ++it) cout << '\t' << *it; cout << '\n'; } int main(){ list<int> linklist; list<int> :: iterator it; int size; cout << "Enter the size of ...
ALGO
0.998725
3.624837
e0772b19-3429-4de5-8f9e-e8e47153f0af
shineahead/PAT_Basic_Level
PAT41.cpp
// // Created by shineahead on 2022-09-30. // #include<iostream> using namespace std; string a[1001]; int b[1001]; int main() { int N; cin >> N; for (int i = 0; i < N; i++) { string s; cin >> s; int ceshi; cin >> ceshi; int shangji; cin >> shangji; a[ceshi] = s; b[c...
ALGO
0.996096
3.38732
219304a1-9576-42c2-acd4-ea80dc1e7664
cuo-ren/LevOJ
P1176 小孩报数问题/P1176 小孩报数问题.cpp
#include <iostream> #include <cstdio> #include <vector> #include <string> using namespace std; int main() { int n; cin >> n; vector<string> names(n, ""); for (int i = 0; i < n; i++) { cin >> names[i]; } int w, s; scanf("%d,%d", &w, &s); vector<int> index(n, 0); for (int i = 0; i < n; i++) { index[i] = i;...
ALGO
0.999877
3.052466
3ea53085-a822-4367-9605-d62dd7034690
northwood1337/nicecock
misc/checksum_crc.cpp
#include "checksum_crc.hpp" #define BigShort( val ) WordSwap( val ) #define BigWord( val ) WordSwap( val ) #define BigLong( val ) DWordSwap( val ) #define BigDWord( val ) DWordSwap( val ) #define LittleShort( val ) ( val ) #define LittleWord( val ) ( val ) #define LittleLong( val ) ( val ) #define Li...
ALGO
0.871602
6.100175
482e40d3-b0ee-49d2-8b86-c2f96f60a120
shapong/GeeksforGeeks
Arrays/Largest Sum Contiguous Subarray-Kadanes/kadane_max_subarray.cpp
#include <iostream> #include <stack> using namespace std; int kadane(int* a,int n) { int max_so_far=0,max_ending_here=0; for(int i=0;i<n;i++) { max_ending_here += a[i]; if(max_ending_here < 0) max_ending_here = 0; else if(max_ending_here > max_so_far) max_so_f...
ALGO
0.999911
4.094477
d21443c0-b045-469b-80bc-ef6f5c262a59
mehta-karannn/DSA
c++/Basic/palindrome.cpp
#include<bits/stdc++.h> using namespace std; int main(){ string a,reverseA; cout<<"enter your string"; cin>>a; reverseA=string(a.rbegin(),a.rend()); if(a==reverseA){ cout<<"the string is a palindrome"; }else{ cout<<"the string is not palindrome"; } return 0; }
ALGO
0.999407
4.037663
9af24562-d054-424e-b1d5-f94d13820dce
leviathanbadger/project-euler-cpp
ProjectEulerCpp/highly-divisible-triangular-number-euler12.cpp
#include "stdafx.h" #include "euler.h" uint32_t divisorCount(uint64_t num) { if (num == 1) { return 1; } auto upTo = (uint64_t)floor(sqrt(num)); uint32_t count = 2; if (upTo * upTo == num) { upTo--; count++; } for (size_t q = 2; q <= upTo; q++) { ...
ALGO
0.999863
5.672898
6ac40a04-cca2-48b1-8810-c3810d1cc5e8
52North/IlwisObjects
core/geos/src/geomgraph/index/SimpleEdgeSetIntersector.cpp
#include <vector> #include <geos/geomgraph/index/SimpleEdgeSetIntersector.h> #include <geos/geomgraph/index/SegmentIntersector.h> #include <geos/geom/CoordinateSequence.h> #include <geos/geomgraph/Edge.h> using namespace std; using namespace geos::geom; namespace geos { namespace geomgraph { // geos.geomgraph namesp...
ALGO
0.999564
5.858613
17e39950-1edd-4c63-b5ed-16b14568c32d
alx2mtz/C--
Preparatoria/36tablademultiplicardel1al10.cpp
//tablas del 1 al 10// #include <stdio.h> int main () { int c=1,m,N=1; while(N<11) { while(c<11) { m=N*c; printf("%d",N); printf(" * "); printf("%d", c); printf(" = "); printf("%d\n", m); c=c+1; } N=N+1; c=1; printf("\n"); printf("\n"); } }
ALGO
0.995705
3.486935
b627481a-0c0a-41df-8c7c-4f1ba52514b5
ktechbyte/leetcode
3743-reschedule-meetings-for-maximum-free-time-i/3743-reschedule-meetings-for-maximum-free-time-i.cpp
class Solution { public: int maxFreeTime(int eventTime, int k, vector<int>& startTime, vector<int>& endTime) { int n = startTime.size(); int ans = 0, right = 0, left = 0; vector<int> sum(n+1); for(int i = 0; i<n; i++){ sum[i+1] = sum[i] + endTime[i] - startTime[i]; ...
ALGO
0.999938
5.631559
5801d9b2-e0af-45f1-9bea-6606714c2a69
KeerthiSaiPG/DSA-solved-Problems
medium/Rotate array.cpp
class Solution { public: void rotate(vector<int>& nums, int k) { int n = nums.size(); k = k%n; reverse(nums.begin(),nums.end()); reverse(nums.begin(),nums.begin()+k); reverse(nums.begin()+k,nums.end()); } };
ALGO
0.999965
6.064561
5f22a90b-0fe2-43a9-afe7-6cd393cb5afd
JnCrMx/blender-test
extern/bullet2/src/BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp
#include "btConvexPlaneCollisionAlgorithm.h" #include "BulletCollision/CollisionDispatch/btCollisionDispatcher.h" #include "BulletCollision/CollisionDispatch/btCollisionObject.h" #include "BulletCollision/CollisionShapes/btConvexShape.h" #include "BulletCollision/CollisionShapes/btStaticPlaneShape.h" #include "BulletC...
ALGO
0.999498
7.499608
bebc558a-22f0-4b1c-a212-522d389b44ad
prasaddds/C-
Day3/20.cpp
#include<iostream> using namespace std; class c2; class c1 { int val; friend void exchange(c1 &,c2 &); public: void indata(int a) { val=a; } void display(void) { cout<<val<<endl; } }; class c2 { int val2; friend void exchange(c1 &,c2 &); public: void indata(int a) { val2=a; } void dis...
ALGO
0.992507
4.731918
4eae28fe-2ca1-4d5b-b25e-e8330a583595
linyuansup/cpp
cxsj/sy/sy2/t4.cpp
/* * @Author: 李天阳_linyuansup * @Date: 2021-11-03 16:16:49 * @LastEditors: 李天阳_linyuansup * @LastEditTime: 2021-11-03 17:00:15 * @Description: file content * @FilePath: /cpp/sy2/t4.cpp */ #include <bits/stdc++.h> using namespace std; int main() { int i, n; int plu; double cos = 1., x; cin >> x; ...
ALGO
0.999737
3.6692
87a9fdae-af5c-4408-8328-44e351637c0a
danishred/Programming
DSA/In_C++/4_Arrays/maxEvenOddSubArr.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Efficient Mine int maxEvenOddSubArray(int arr[], int n) { // code here int res = 1, odd_cnt = 0, cnt = 0; for (int i = 0; i < n; i++) { if (odd_...
ALGO
0.999911
5.210489
618bec40-f70b-4369-a3c2-c6df37141fad
jakubmi9/polsl_ppk
Temat 10/Temat 10.cpp
// Temat 10.cpp : Defines the entry point for the console application. // #include "stdafx.h" //============================================================================== struct Tree { int Value = 0; Tree* LeftChild = nullptr; Tree* RightChild = nullptr; }; //=====================================================...
ALGO
0.999712
3.913987
3a9a6990-bf5b-4ec2-a314-87ba99767023
INET-Complexity/market-ecology
traded_company.cpp
using esl::economics::finance::dividend_announcement_message; #include <random> using esl::identity; using esl::economics::cash; using esl::economics::price; using esl::economics::accounting::inventory_filter; using esl::economics::finance::stock; using esl::economics::finance::share_class; using esl::law::owner; usi...
ALGO
0.970335
5.654767
c6d1e035-4d5f-4a11-ae35-ccbcd29921b0
wassimhamdi/Online-Judges-Codes
prefix.cpp
/* ID: kiruayo1 PROG: prefix LANG: C++ */ #include <cstdio> #include <iostream> #include <fstream> #include <set> #include <sstream> #include <cmath> #include<cstring> #include<vector> #include<algorithm> using namespace std; string tab[209]; int s[200009]; int s2[200009]; string sss=""; int N; int main(){ ifst...
ALGO
0.998147
3.735877
ecf19dcc-7834-4500-9620-5d59b670807f
devansh-02/Problems-LeetCode
3331-minimum-operations-to-exceed-threshold-value-i/minimum-operations-to-exceed-threshold-value-i.cpp
class Solution { public: int minOperations(vector<int>& nums, int k) { int count=0; int n=nums.size(); for(int i=0;i<n;i++) { if(nums[i]<k) count++; } return count; } };
ALGO
0.999916
5.629153
451b1b3f-a4e8-4f74-8bad-98328bb16c9a
PacktPublishing/Learn-Concurrency-with-C-
examples/mutexes/listing38.cpp
#include <mutex> #include <future> #include <vector> #include <print> std::recursive_mutex m; int globalResource = 0; using std::chrono_literals::operator""s; auto modifyResourceRecursively(int recursion_depth) -> void { auto lock = std::lock_guard(m); if (recursion_depth > 0) { std::print("Here we g...
TOOL
0.975607
5.805235
0f340e2c-83c3-48c5-9340-a286d2a54d69
KwongKaLok/CPP
Comp_2012/PA_4/openAddressingHashTable.cpp
#include "openAddressingHashTable.h" OpenAddressingHashTable::OpenAddressingHashTable(int m, int (*hash)(string, int)) : HashTable{m, hash} { table = new Cell[m]; for (int i = 0; i < m; i++) { table[i].magic = nullptr; table[i].status = EMPTY; } } OpenAddressingHashTable::~OpenAddressin...
ALGO
0.995753
5.050337
f5b2f942-fa74-48d5-b849-11163ee9d5a5
iam-rajuan/Problem-Solving
Codeforces-Problem-Solving/Live Contest/1020C.cpp
#include <iostream> #include <vector> #include <limits> using namespace std; void processTestCase() { int n; long long maxValue; cin >> n >> maxValue; vector<long long> first(n), second(n); for (int i = 0; i < n; ++i) cin >> first[i]; for (int i = 0; i < n; ++i) cin >> second[i]; bool ha...
ALGO
0.999749
5.346374
2eea2aca-e20b-43b4-910a-7e0326274186
SJTU-ACM/Templates
Spear-of-Longinus/acm/2016-07-27(Wuhan 2009)/E.cpp
#include<cstdio> #include<iostream> #include<algorithm> #include<queue> #include<cstring> #include<cctype> #include<map> #include<cassert> using namespace std; const int maxn=200005; int n,Qs,t; char cmd[200001]; int a[2005]; int value[maxn]; int cur; int len=0; int getn(){ int r=0;static char c=cmd[cur++]; while(!is...
ALGO
0.996026
3.582172
f92a9a35-285f-4595-850a-7cd1ab09243d
byoushinwokamu/baekjoon
src/1697-1.cpp
#include <iostream> #include <queue> using namespace std; int dis[100001]; int main() { cin.tie(NULL); cout.tie(NULL); ios::sync_with_stdio(false); int n, k; cin >> n >> k; dis[n] = 1; queue<int> q; q.push(n); while (!q.empty()) { int now = q.front(); q.pop(); if (now == k) { c...
ALGO
0.999739
3.875102
345325ed-3062-4a29-94cf-66c2053ddded
glerium/acm-life
codeforces/666A.cpp
#include <bits/stdc++.h> #define endl '\n' using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); string s; cin >> s; int n = s.size(); s = ' ' + s; set<pair<int,string>> st; set<string> ans; function<void(int, string)> dfs = [&](int x, string bk) -> void { ...
ALGO
0.998736
3.508547
8db12d63-b4d3-476f-8130-1baa00f8c120
zjukk/LeetCode-is-my-son
80-RemoveDuplicatesfromSortedArrayII.cpp
#include <iostream> #include <vector> #include <algorithm> #include <map> using namespace std; class Solution { public: int removeDuplicates(vector<int>& nums) { if (nums.empty()) return 0; int cnt = 1; for (int i = 0; i < nums.size(); ++i) { if (cnt > 2) {nums.erase(nums.begin()...
ALGO
0.999718
5.793984
ab5813ea-1b16-4654-9b1f-a9d0190eb58f
ishandutta2007/codeforces
t1dus/normal/1491/A.cpp
// --------------------------------------------------<TEMPLATE>-------------------------------------------------- // --------------------<optimizations>-------------------- /* #pragma GCC optimize("Ofast,unroll-loops") #pragma GCC target("avx,avx2,fma") */ // -------------------</optimizations>-------------------- /...
ALGO
0.999921
4.037986
296bc752-5cf0-4d8c-993b-eebd4aba2b8e
DrChenXX/homework
大一/实验3/9.今夕何夕.cpp
#include<iostream> using namespace std; int n; inline bool judge(int x) { return x % 100 ? x % 4 == 0 : x % 400 == 0; } int main() { cin >> n; int y,m,d; char c; while(n--) { int count = 0; cin >> y >> c >> m >> c >> d; if(m == 2 && d == 29) { y += 1; judge(y) ? count += 2 : cou...
ALGO
0.999812
3.707613
c25e26c8-6f77-4f41-84b7-34f808c1d152
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/10/01/18.cpp
#include <list> #include <map> #include <set> #include <stack> #include <queue> #include <algorithm> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cstring> #include <climits> #include <cfloat> using namespace std; const int oo = 0x3f3f3f3f; const double eps = 1...
ALGO
0.99938
4.599357
e251bae3-53d6-4efd-9a04-90e9f259f3f4
openjdk/playground
src/jdk.accessibility/windows/native/jabswitch/jabswitch.cpp
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <ctype.h> #include <Windows.h> #include <tchar.h> // This is the default buffer size used for RegQueryValue values. #define DEFAULT_ALLOC MAX_PATH // only allocate a buffer as big as MAX_ALLOC for RegQueryValue values. #define MAX_ALLOC 262144 static...
TOOL
0.896177
4.368389
fb23f728-78f5-410e-aef7-6ce8a50d9029
JackyLu0520/cpp
100.cpp
#include<iostream> using namespace std; void show(int); int main() { show(100); return 0; } void show(int lv) { if(lv!=1) show(lv-1); cout<<lv<<' '; }
ALGO
0.999884
3.568607
7a1a2cea-b710-499a-837e-b19f6daf0309
HoangAn2006/Code_C_in_school
DIEMTB/DIEMTB.cpp
#include<stdio.h> #include<math.h> int main() { float a,b,c ; scanf("%f%f%f", &a, &b, &c); printf("%.02f\n", (a+b+c)/3 ); }
ALGO
0.999155
3.64361
f2e50c8c-bba9-4e7d-84d5-de4caa19c9af
ebisenttt/atcoder
abc103/d/main.cpp
#include <iostream> #include <vector> #include <cmath> #include <algorithm> #include <numeric> #include <iomanip> #include <queue> #include <map> #include <fstream> using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) #define FOR(i, m, n) for(int i = m; i < n; i++) #define ALL(x) (x).begin(),(x).end() //so...
ALGO
0.999754
3.764281
746c3ed5-86ea-4b90-8df5-8f9b0eaf1543
JAFFER1272HUSSAIN/DostCare-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.998764
6.781775
02dddfb5-975f-47b9-a7c2-2199ec190415
SAgarwal-24/algorithms
dp/remove-boxes.cpp
#include "dp.h" /* * Given several boxes with different colors represented by different positive numbers. You may experience several rounds to remove boxes until there is no box left. Each time you can choose some continuous boxes with the same color (composed of k boxes, k >= 1), remove them and get k*k points. Fin...
ALGO
0.999731
5.542608
8f749388-473a-4b8a-bec6-4ab7f0ee2569
pvy-it-tdh/LeThachPhucVy_Cpp
Chapter3/challenge3.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { // test scores and the sum of scores double score1, score2, score3, score4, score5; double sumOfScores, averageScore; // enter five test scores cout << "Enter the first test score: "; cin >> score1; cout << "Enter the s...
ALGO
0.929827
5.914567
8a72596a-d034-47a5-b34e-c8b8634a247b
kmjp/procon
2022/tessoku/a/a29.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.999925
4.256055
91c9e41f-2355-4027-9d1f-c71ab1d25fd3
Shangyizhou/cpp-study
sort/merge_sort.cpp
#include <iostream> #include <vector> #include <algorithm> void show_info(const std::vector<int>& ivec) { for (auto i : ivec) { std::cout << i << " "; } std::cout << std::endl; } /* 归并排序: 时间复杂度:O(NlongN) 空间复杂度:O(N) */ std::vector<int> tmp; void merge_sort(std::vector<int> ivec, int left, ...
ALGO
0.999965
4.941917
5a26e686-cdfc-49ae-bb10-d5f63ba3dc49
Maverick-2207/Cpp-Chronicles-main
Testers/SJF.cpp
#include <iostream> #include <algorithm> // For sorting using namespace std; class Task { public: int id; int burstTime; int waitingTime; int turnaroundTime; }; bool compareByBurstTime(Task a, Task b) { return a.burstTime < b.burstTime; } int main() { int taskCount; cout << "Enter the to...
ALGO
0.999938
4.956329
b07cf033-faa6-4ab4-9de8-1fcd4f0fae31
Kenny3Shen/MyLeetcode
leetcode_by_cpp/665.非递减数列.cpp
/* * @lc app=leetcode.cn id=665 lang=cpp * * [665] 非递减数列 * * https://leetcode-cn.com/problems/non-decreasing-array/description/ * * algorithms * Easy (23.03%) * Likes: 367 * Dislikes: 0 * Total Accepted: 29.6K * Total Submissions: 128.5K * Testcase Example: '[4,2,3]' * * 给你一个长度为 n 的整数数组,请你判断在 最多 改...
ALGO
0.999985
6.053155
8b46cedf-7e4f-4747-a909-41c856c0b3b0
NovaPigeon/Programming_Practice
hw参考/hw8/2.cpp
#include <iostream> #include <cmath> #include <algorithm> #include <string> using namespace std; template <class T1,class T2> struct Closer { T1 stardard; T2 compare; Closer() {} Closer(T1 s, T2 c): stardard(s), compare(c) {} bool operator ()(T1 &a, T1 &b) { int ca = compare(a, stardard); ...
ALGO
0.994281
3.478249
ef3038f1-fdc3-4d86-8582-9eb05ca224ff
MYNKcodes/c-programming
pattern/tut8.cpp
#include<iostream> using namespace std; int main() { int n; cin>>n; for(int i=1; i<=n; i++){ for(int j=1; j<=n; j++){ if(j==i || j==(n-i+1)){ cout<<"*"; } else{ cout<<" "; } } cout<<endl; } }
ALGO
0.999943
3.863931
048a7bc6-b084-4950-bceb-d8a27f54ffb0
tiketiskte/HUHST-Algorithm-analysis-and-design
AE.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; const int maxn = 1000 + 10; ll a[maxn]; int n, k; int main(void) { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); while(cin >> n >> k) { for(int i = 0; i < n; i++) { cin >> a[i]; } sort(a,a + n)...
ALGO
0.999948
3.560011
ae2e49fd-86ab-4555-961c-30c48252adba
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_9442_2.cpp
#include <bits/stdc++.h> using namespace std; int n, k; long long a[50 + 1]; bool vis[50][50]; bool possible(long long need, int idx, int used) { if (idx == n) { if (used == k) return 1; return 0; } if (used >= k) return 0; if (idx == 0 && used == 0) for (int i = 0; i < (n); i++) for (int j = ...
ALGO
0.99995
3.81801
ba4ff150-743f-4bc6-ad0f-ed65dc064b7c
vanthang10tin/Project1
Tuan1/SUM_ARRAY.cpp
#include <bits/stdc++.h> #define Task "bai1" using namespace std; int n, a[100005]; int maxx = -1e9, minx = 1e9, sum = 0; int main() { ios_base::sync_with_stdio(NULL); cin.tie(NULL);cout.tie(NULL); if(fopen(Task".inp", "r")) { freopen(Task".inp", "r", stdin); freopen(Task".out", "w", s...
ALGO
0.999753
3.929141
8d148eb3-55f4-4598-b473-bb491902d02b
dagp06/AdventOfCode_2020
Source/Challenges/Challenge_12.cpp
#include "Challenge_12.h" #include "../Helpers/FileHelpers.h" //////////////////////////////////////////////////////////////////////////////////////////////////// std::string const CChallenge_12::sm_inputFilePath = "Inputs/Input_Challenge_12.txt"; #define DEBUG_LOGS false /* <==> Execution times <==> PART 1 : Set ...
ALGO
0.999173
5.459955
fc7714d4-1803-4bd7-9d37-aaf113bd570e
ishandutta2007/codeforces
ssrs_/normal/1418/A.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; for (int i = 0; i < t; i++){ long long x, y, k; cin >> x >> y >> k; cout << ((y + 1) * k - 1 + x - 2) / (x - 1) + k << endl; } }
ALGO
0.99975
3.712282
eb6506d8-0290-41eb-8a8d-44c1a72a3ad4
song89/Unreal-4.25
Engine/Source/Developer/TraceInsights/Private/Insights/ViewModels/TimerGroupingAndSorting.cpp
#include "TimerGroupingAndSorting.h" #include "Insights/Table/ViewModels/TableColumn.h" #include "Insights/ViewModels/TimerNodeHelper.h" #define LOCTEXT_NAMESPACE "TimerNode" // Sort by name (ascending). #define INSIGHTS_DEFAULT_SORTING_NODES(A, B) return A->GetName().LexicalLess(B->GetName()); ////////////////////...
TOOL
0.916119
7.009265
8e7d94ae-b0e5-48d7-bec6-a729fd756254
rafael2k/presto
modules/mime/mime_tools.cpp
#include "core/pch.h" #include "modules/pi/OpSystemInfo.h" #include "modules/url/url_man.h" #ifdef _MIME_SUPPORT_ #include "modules/mime/mimedec2.h" #include "modules/hardcore/mem/mem_man.h" #include "modules/viewers/viewers.h" #include "modules/idna/idna.h" #include "modules/encodings/charconverter.h" #include "...
TOOL
0.902107
3.643215
e5e427e3-1df5-488d-8e0b-11e721d6e688
kaiumuddin/DSA-Codes
Dynamic_Programming_Phitron/27.lcs_variation/2.print_shortest_common_supersequence.cpp
#include<bits/stdc++.h> using namespace std; const int N = 1005; vector<vector<int>> dp(N, vector<int>(N, -1)); int solve(string a, int n, string b, int m) { for (int i = 0; i <= n;i++) { for (int j = 0; j <= m; j++) { if (i == 0 || j == 0) dp[i][j] = 0; } } fo...
ALGO
0.999992
5.13484
d888c048-601d-4954-ad53-a97ec7e51204
gymnasiumlife/Gymnasium
src/crypto/siphash.cpp
#include <crypto/siphash.h> #define ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b)))) #define SIPROUND do { \ v0 += v1; v1 = ROTL(v1, 13); v1 ^= v0; \ v0 = ROTL(v0, 32); \ v2 += v3; v3 = ROTL(v3, 16); v3 ^= v2; \ v0 += v3; v3 = ROTL(v3, 21); v3 ^= v0; \ v2 += v1; v1 = ROTL(v1, 17); v1 ^= v...
ALGO
0.999722
6.860593
2a408a6c-d58f-4258-a421-80ffd8b56e6c
sushantpadha/cs104
unix/code/testPQ.cpp
/** (c) 2002 by Bhaskaran Raman and Regents of the University of California */ /** Program to test Priority Queue implementation */ #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <string.h> #include <iostream> #include "PriorityQueue.h" #include "Util.h" void usage(const char *progname) { fp...
ALGO
0.997656
5.425102
e82c8401-b8f1-464b-b716-994a0d500033
NeoBryant/Leetcode_test
面试金典/02-05.cpp
#include <iostream> using namespace std; // 从个位开始依次进行加分运算,并进位 struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; void display(ListNode* head){ ListNode* p = head; while (p != NULL) { cout << p->val << " "; p = p->next; } cout << endl; } ...
ALGO
0.999937
4.975323
356ff3a2-54f5-4b87-972c-8ca924775028
sohamghs02/revision
stringtoggle.cpp
#include<bits/stdc++.h> using namespace std; int main(){ string str; getline(cin,str); for(int i = 0; str[i] != '\0'; i++){ if(isupper(str[i])){ str[i] = tolower(str[i]); } else if(islower(str[i])){ str[i] = toupper(str[i]); } } cout<<...
ALGO
0.998406
5.186183
722124ee-9028-44ff-9765-975129637603
vskavronsky/dev-club
Cpp_Programs_From_Book/NestedTest.cpp
#include <iostream> int main() { int accumulator; std::cout << "This programm add the sequence of the numbers, entered by user" << std::endl; std::cout << "The addition will end, when user entered 0 number" << std::endl; std::cout << "The program will end, when sum is less or equal 0" << std::endl <<...
ALGO
0.992521
3.957843
44df2bb9-d469-473a-b2be-6a34b0c33433
MohamedAymanMohamedIbrahimEl-Adawy/cicd
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
03f44779-7400-4ee5-a621-af6f23f21ad5
Ivang71/university-tasks
4th_semester/Languages_and_methods_of_programming/examples/sh/Laba_5.cpp
#include <iostream> using namespace std; int countWord = 0; //char mass[] = { 'a', 'b', 'c', 'd', 'e','f','g','h','i','j','k','l','m','n','o','p','q','r', 's','t','u','v','w','x','y','z' }; const int ALPHABET_SIZE = 26; struct TrieNode { TrieNode* children[ALPHABET_SIZE]; bool is_end; }; TrieNode* getNode()...
ALGO
0.999764
4.509298
81bec494-69c9-4600-ac9a-6e46e4287f06
rheiland/covid19_cd8_prolif_death
physicell_updated_problem/custom_modules/external_immune.cpp
#include "./external_immune.h" using namespace PhysiCell; std::string external_immune_version = "0.4.0"; Submodel_Information external_immune_info; void external_immune_model_setup( void ) { // set version external_immune_info.name = "external immune"; external_immune_info.version = external_immune_version;...
ALGO
0.99103
5.554679
4b539614-a83b-4aaf-9a0a-3ea7a5798ca3
hi-ogawa/practice
codechef/LRNDSA03/SUBPRNJL/main.cpp
// AFTER CONTEST, TLE, WIP #include <bits/stdc++.h> using namespace std; // Utility #define ALL(X) (X).begin(), (X).end() #define RANGE(I, X, Y) for (int I = (X); I < (Y); I++) using ll = int64_t; using ull = uint64_t; namespace std { template<class ...Ts> istream& operator>>(istream& i, tuple<Ts...>& x) { app...
ALGO
0.999897
4.182045
72beb20a-27b2-49eb-886e-67a938d9ac60
grzegorz-szydlowski/robust-short-path
rsp/RobustSolverABSa.cpp
#include "RobustSolverABSa.h" #include <iostream> #include <cmath> RobustSolverABSa::RobustSolverABSa(Graph* g, Polytope* p) : graph(g), polytope(p), optimalValue(0.0) {} bool RobustSolverABSa::isDuplicate(const std::vector<std::vector<double>>& PF_psi, const std::vector<double>& c_psi) { for (const auto& poi...
ALGO
0.999935
6.195486
c79feacf-72f5-4003-8b36-a27c30ac9aa3
anubhavitis/Competitive-Programming
2-Codechef/May Long Challenge 2020/SHORTVS.cpp
//Mark XXVI #include<bits/stdc++.h> #define big(x) greater<x>() #define ll long long int #define mp make_pair #define pb push_back #define lb lower_bound #define ub upper_bound #define all(x) x.begin(), x.end() #define deb(x) cerr<<#x<<" : "<<x<<"\n"; #define IOS() ios_base::sync_with_stdio(0);cin.tie(0); #define rep(...
ALGO
0.999951
4.293556
2ad91c73-1dd4-40f5-bd52-e9975cce6574
eggag32/Competitive-Programming
Codeforces/Robot Vacuum Cleaner.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef pair<int, int> pi; #define debug(x) cerr << #x << ": " << x << endl #define debug2(x, y) debug(x), debug(y); #define repn(i, a, b) for(int i...
ALGO
0.998528
3.637448
93c98efc-6776-4044-a273-2bd3b25e4d1f
JJH123123123/codingtest_javafactory
SY/week09/Problem194.cpp
#include <bits/stdc++.h> using namespace std; int N, val; bool lr[22], rl[22]; std::vector<std::pair<int, int>> inputs[2]; int Check(const std::vector<std::pair<int, int>>& board, int idx, int cnt) { int res = 0; if(idx >= board.size()) return cnt; int y = board[idx].first, x = board[idx].second; if(!lr[y-x...
ALGO
0.999857
3.939582
e02c1eae-1713-4936-a7ea-591ee707589b
uniqss/leetcodecpp
0448/448_FindAllNumbersDisappearedinanArray1.cpp
#include "../inc.h" class Solution { public: vector<int> findDisappearedNumbers(vector<int>& nums) { int n = nums.size(); vector<int> ret; unordered_set<int> dict(nums.begin(), nums.end()); for (int i = 1; i <= n; ++i) if (dict.count(i) == 0) ret.emplace_back(i); ...
ALGO
0.996702
5.733181
556d7ef0-a60b-4d2c-a237-bfa3b804782e
mmhriyad/uva
10970_Big_Chocolate.cpp
#include <stdio.h> int main() { int N, M; while (scanf("%d %d", &N, &M) == 2) { printf("%d\n", (N * M) - 1); } }
ALGO
0.999527
3.500596
9b554289-82e8-400e-af89-077d6aa57486
GauravN0910/codeforces-cpc
GellyfishAndBaby'sBreath.cpp
#include<bits/stdc++.h> using namespace std; const long long mod = 998244353; long long pow2[100005]; void precompute(){ pow2[0] = 1; for(long long i=1;i<=100000;i++){ pow2[i] = (pow2[i-1] * 2) % mod; } } void solve(){ long long n; cin>>n; vector<long long> permA(n); vector<long...
ALGO
0.999967
4.779142
f0ffd10a-e531-42fe-b063-4a2f139bb6f8
sayymeoww/coding
OPT/tasks (demian)/block 6/day 25/task 5.cpp
const int maxn = 310000; char t[maxn]; int n; cin >> n; vector<int> v; for (int i = 0; i < n; i++) { scanf("%s", t); v.push_back(strlen(t)); } sort(v); int ptr = 0, cnt = 0; string res = ""; for (int i = 1; ptr < n || cnt; i++) { while (ptr < n && v[ptr] == i) { ptr++; cnt++; } i...
ALGO
0.99996
4.024035
06b9f719-2e39-40ad-bed1-8b2f1053ee2d
lilonghua1987/MvgSoft
libvision/viso.cpp
#include "viso.h" #include <math.h> namespace libviso { using namespace std; VisualOdometry::VisualOdometry(parameters param) : param(param) { J = 0; p_observe = 0; p_predict = 0; matcher = new Matcher(param.match); Tr_delta = Matrix::eye(4); Tr_valid = false; srand(0); } VisualOdometry::~Visual...
ALGO
0.945845
5.394853
ed10e07a-fe25-49df-bb20-ace80970437e
Deepak-png981/Data_Structures_And_Algorithms
Medium/Matchsticks game/matchsticks-game.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int matchGame(long long N) { // code here if(N%5 == 0) return -1; else return N%5; } }; //{ Driver Code Starts. int main() { int t; cin >...
ALGO
0.999651
5.621722
a0716243-e107-4087-89af-ada85156e479
sandeshkhadase/Leetcode-Solutions
Leetcode Solutions/lcof/面试题58 - II. 左旋转字符串/Solution.cpp
class Solution { public: string reverseLeftWords(string s, int n) { return s.substr(n) + s.substr(0, n); } };
ALGO
0.999243
6.630603
733ad86a-426c-4e06-a86d-6aa9b749cbbe
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/CodeLlama/top0-100/minimum-total-cost-to-make-arrays-unequal-Solution.minimumTotalCost/177901_Overflow.cpp
_asn1_ltostr (long v, char *str) { long d, r; char temp[LTOSTR_MAX_SIZE]; int count, k, start; if (v < 0) { str[0] = '-'; start = 1; v = -v; } else start = 0; count = 0; do { d = v / 10; r = v - d * 10; temp[start + count] = '0' + (char) r; c...
ALGO
0.999962
5.071745
98f66697-7163-4fb2-8f82-0dee8524c0e1
ankit-0369/Solving-DSA-Problems
Search in Linked List - GFG/search-in-linked-list.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; // } Driver Code Ends /* Link list node */ /* struct Node { int data; Node* next; Node(int x) { data = x; next = NULL...
ALGO
0.999848
5.241676
d5817b14-cb2a-483c-8818-f86e90ffdd36
Stayaccept/LeetCode
979. 在二叉树中分配硬币.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int ans=0; void dfs(TreeNode* rt){ if(rt==NULL) return; if(rt->left...
ALGO
0.999986
6.093372
ad2a69ef-fe55-4467-ab41-13c568ebd60f
out-ruined69/SD_PROJECTS
LAB_4/5_142_Harnagea_Andrei.cpp
#include <iostream> using namespace std; struct node { int data; node * next; }; int pop(node * & Front, node * & Rear) { if (Front == NULL) cout << "Underflow"; else { int x = Front -> data; node * temp = Front; Front = Front -> next; delete temp; if (Front == NULL) Rear = NULL;...
ALGO
0.999939
3.709895
3823842a-63f0-44fa-b853-4f5d61ebe582
maikbasso/plant-line-detection
libs/OpenCV/opencv-3.1.0/samples/cpp/tutorial_code/TrackingMotion/cornerHarris_Demo.cpp
/** * @function cornerHarris_Demo.cpp * @brief Demo code for detecting corners using Harris-Stephens method * @author OpenCV team */ #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <stdio.h> #include <stdlib.h> using names...
ALGO
0.99906
6.774387
cadb0140-5226-4e5e-a7da-de748d0b6de6
Striker736/ALQO
src/libzerocoin/Params.cpp
/** * @file Params.cpp * * @brief Parameter class for Zerocoin. * * @author Ian Miers, Christina Garman and Matthew Green * @date June 2013 * * @copyright Copyright 2013 Ian Miers, Christina Garman and Matthew Green * @license This project is released under the MIT license. **/ #include "Param...
TOOL
0.853295
6.723521
b86d0713-03a8-49f4-8c79-fae0c030baef
junHyeong7083/Backjoon
프로그래머스/unrated/181893. 배열 조각하기/배열 조각하기.cpp
#include <vector> using namespace std; vector<int> solution(vector<int> arr, vector<int> query) { for(int i = 0 ; i < query.size(); ++i) { if(i % 2 == 0) { arr.erase(arr.begin() + query[i] + 1, arr.end()); } else arr.erase(arr.begin(), arr.begin() + query[i]); } return ...
ALGO
0.999844
5.335808
1546571f-44d8-46ce-aae0-eb66af52962a
shaileshKumar55/DSA-in-cpp
Algorithm/02 Quicksort.cpp
#include <iostream> using namespace std; struct Array { int* A; int size; int length; }; void Swap(int* x, int* y) { int temp = *x; *x = *y; *y = temp; } void Display(struct Array* arr) { int i; for (i = 0; i < arr->length; i++) cout << arr->A[i]<<" "; } int Partition(struct Array* arr, int l, int h) { ...
ALGO
0.999912
3.937973
9717412e-f28e-47c7-adeb-0bf970c6f930
nitish166/Interview-Prepration
DataStructure/HashTable/LargestFibNo.cpp
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { int n; cin>>n; int arr[n]; for(int i=0;i<n;i++) { cin>>arr[i]; } vector<int> ans; for(int i=0;i<n;i++) { int temp = fib(arr[i]); } } }
ALGO
0.999792
4.452093
9bb95918-c0e1-4562-882e-7f6d2a389f19
graphretrieval/ESSIso
MQO/MQO/MQO/OverlapQueryGenerator.cpp
#include "OverlapQueryGenerator.h" #include"AdjacenceListsGraph.h" #include<random> #include<time.h> /* * We first find a base subgraph and then find a set of larger graphs that contains this base graph * We can specify how many graphs for each core-group. This version do the best to spread the label distribution. It ...
ALGO
0.863657
3.733196
623287c6-9953-42c0-a9e2-24b4149f1796
Shubhamm1211/GFG-
Difficulty: Medium/Sum of Middle elements of two sorted arrays/sum-of-middle-elements-of-two-sorted-arrays.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ //Position this line where user code will be pasted. class Solution { public: int SumofMiddleElements(vector<int> &arr1, vector<int> &arr2) { // code here int i=0,j=0; ...
ALGO
0.999959
5.974383
47474e9c-19ea-417f-a3e9-b5d20d72d920
Dpk0917/DSA-Hub
General/GFG-Sort0s,1sand2s.cpp
class Solution { public: void sort012(vector<int>& arr) { // code here sort(arr.begin(),arr.end()); // for(int i=0;i<arr.size();i++){ // for(int j=i+1;j<arr.size()-1;j++){ // if(arr[i]>=arr[j]){ // swap(arr[i],arr[j]); ...
ALGO
0.999959
5.309016
5ad7dc2c-8065-4c54-bf2c-cb174e075b06
M4573R/competitive-programming-archive
timus/volume-07/penalty_time.cpp
#include <iostream> using namespace std; constexpr unsigned int problems {10}; constexpr unsigned int reject_penalty {20}; inline void use_io_optimizations() { ios_base::sync_with_stdio(false); cin.tie(nullptr); } int main() { use_io_optimizations(); unsigned int qxx_time; unsigned int zz...
ALGO
0.998369
3.846557
2320e48f-ea1c-4cdc-b291-9e80be6112c5
millaker/MiGPU-llvm-project
libc/src/stdbit/stdc_leading_ones_ull.cpp
#include "src/stdbit/stdc_leading_ones_ull.h" #include "src/__support/CPP/bit.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(unsigned, stdc_leading_ones_ull, (unsigned long long value)) { return static_cast<unsigne...
ALGO
0.966863
6.172969