uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
d9a2c321-5f26-401a-a001-2f00ef3f6143
momoyuus/library
test/library_checker/nim_product_64.test.cpp
#define PROBLEM "https://judge.yosupo.jp/problem/nim_product_64" #include<bits/stdc++.h> using namespace std; using ll = long long; #include "math/nimber.hpp" int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); int t; cin>>t; while(t--){ unsigned long long a,b; cin>>a>>...
ALGO
0.999185
5.679269
72d62578-6bb0-4116-a56d-b00233534e72
lyccrius/OI-Solution
CodeForces/1788A One and Two.cpp
#include <iostream> const int maxN = 1000; int t; int n; int a[maxN + 10]; int p[maxN + 10]; void mian() { int cnt = 1; std::cin >> n; for (int i = 1; i <= n; i++) std::cin >> a[i]; for (int i = 1; i <= n; i++) { p[i] = p[i - 1]; if (a[i] == 2) p[i]++; } if (p[n] & 1) { ...
ALGO
0.999781
4.511797
548cd2d5-bae8-49a9-b7cc-2f2ba04e34d3
RamAgrawal01/DSA
Strings/lec84_85.cpp/doublePointer.cpp
#include<iostream> using namespace std; void util(int *p) { // p = p+1; *p=*p+1; } int main(){ int a = 5; int *p = &a; cout<<"Before: "<<endl; cout<<"a: "<<a<<endl; cout<<"p: "<<p<<endl; cout<<"*p: "<<*p<<endl; util(p); cout<<"After: "<<endl; cout<<"a: "<<a<<endl; ...
TOOL
0.994375
3.039859
63abad66-3e98-4998-bc36-01ad541f49fc
adityabelgaonkar05/CompProgLog
C_I_Will_Definitely_Make_It.cpp
#include <bits/stdc++.h> #define int long long #define ab adityabelgaonkar using namespace std; signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--) { int n; cin >> n; int k; cin >> k; vector<int> a(n); f...
ALGO
0.999894
3.958881
9de817a0-d6f0-45f6-9dce-b1d36632079a
raincross7/code-similarity
codes/train_code/problem408/problem408_493.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for(int i = 0; i < (n); i++) #define rep1(i, n) for(int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ce(x) cerr << (x) << "\n" #define cesp(x) cerr << (x) << " " #define pb push_bac...
ALGO
0.999977
3.521958
f31929f3-6a8d-499a-a6a2-5ede8895ffc3
HassanCoulibaly/Weather_App
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
c16ae0f0-89a4-4f3d-b59d-9e00c0e405a9
qhb1001/For-that-dream
专题/图论/cf755C.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <string> #include <algorithm> using namespace std; const int MAX = 1e4 + 5; int n, fa[MAX], cnt[MAX]; int find(int x) { if (x == fa[x]) return x; return fa[x] = find(fa[x]); } void unit(int u, int v) { u = find(u); v = find(v); if (u == v...
ALGO
0.999938
4.106927
b4bacaaf-a488-4f9e-b9fc-3e90cc45e998
ankurkharb/Leetcode
139-word-break/word-break.cpp
class Solution { public: unordered_set<string> st; int n; int t[300]; bool solve(int idx,string &s) { if(idx>=n)return true; if(t[idx]!=-1) return t[idx]; if(st.find(s)!=st.end())return true; for(int l=1;l<=n;l++) { string temp = s.su...
ALGO
0.99987
5.933742
a8b80939-8741-4267-bc99-8f2e94290802
aazamali786/Codes
reversearray.cpp
#include<iostream> #include<vector> using namespace std; vector <int> reverse(vector<int> v,int n){ // n is the index from where we have to start reversing the order int s=n+1; int e=v.size()-1; while(s<=e){ swap(v[s],v[e]); s++; e--; } return v; } void print(vector<int> ...
ALGO
0.999856
4.493325
5d36528b-012c-4ac6-aad8-1f5f50930244
NoelBird/chocochip
sites/baekjoon/6603_로또/2.cpp
// 7 1 2 3 4 5 6 7 // 8 1 2 3 5 8 13 21 34 // 0 // 처음 여섯 개 고름 // 전략 - 백트랙킹 #define _CRT_SECURE_NO_WARNINGS #include<cstdio> #include<iostream> #define MAX_ARR 50 using namespace std; int arr[MAX_ARR] = { 0, }; int arrIdx[6] = {0, }; int n; void solution(int idx) { // base condition 2 - success if(idx==6) { fo...
ALGO
0.99994
4.416046
c6f8743e-800c-46f4-8ad2-91d4b8e655be
Mohammad-Ashikul-Islam/Competitive_Programming
DS & Algo/Data Structure/Untitled1.cpp
#include<iostream> #include<stdio.h> using namespace std; typedef struct node Node; struct node{ int data; Node* left; Node* right; }; Node *create_node(int item) { Node *new_node = new Node; new_node->data = item; new_node->left = NULL; new_node->right = NULL; return new_node; } void ad...
ALGO
0.999972
4.087792
28484122-6289-4f28-8274-5f6f52065b2a
ras675/CSES
DP/RemovingDigits.cpp
#include <iostream> #include <string> using namespace std; int main() { int n; cin >> n; int steps = 0; while (n != 0) { string num_str = to_string(n); // Convert integer to string to access each digit int max_digit = 0; for (char digit : num_str) { max_digit = max(...
ALGO
0.999951
5.969178
0cd7c9e0-9185-4066-a4ba-6a88e882a519
rzaharia/AssistantsTester
problems/sources/p69.cpp
int main() { int nums[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int len = 10; int result; if (len == 1) { return -1; } else if (len == 2) { result = nums[1]; return result; } int largest = nums[0], secondLargest = nums[1]; for (int i = 0; i < len; i++) ...
ALGO
0.999766
3.876052
8f8128c9-4ed7-49b5-81db-bb09a12cdeac
kaushiklucky/cpp-programing
7.2_2dArray/sumOfElements.cpp
#include<iostream> using namespace std; int main(){ int x,y; cout<<"Enter row no. : "; cin>>x; cout<<"Enter colom no. : "; cin>>y; int arr[x][y]; int sum=0; for(int i=0; i<x; i++){ for(int j=0; j<y; j++){ cin>>arr[i][j]; } }...
ALGO
0.998932
3.813022
d43a3cf8-b7af-40a7-9930-18fa39a08116
sidjha57/Coding
B_Make_AP.cpp
//Siddharth Jha #include<bits/stdc++.h> //#include<ext/pb_ds/assoc_container.hpp> //#include<ext/pb_ds/tree_policy.hpp> //#include <ext/pb_ds/trie_policy.hpp> //using namespace __gnu_pbds; using namespace std; //typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> pbds; //typedef trie<...
ALGO
0.999922
4.217021
39d7310b-94e0-47a8-bc6b-60453b35e854
dhanushbabuk/Leetcode
Medium/151-reverse-words-in-a-string/reverse-words-in-a-string.cpp
class Solution { public: string reverseWords(string s) { string temp = ""; vector<string>ans; for(auto c : s) { if(c != ' ') { temp+=c; } else if(temp!="") { ans.push_back(temp); ...
ALGO
0.999972
6.220011
3c386f09-6b17-4618-b8dc-47727539ccf7
Ashh98/LeetCode-Problems
0515-find-largest-value-in-each-tree-row/0515-find-largest-value-in-each-tree-row.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999989
6.266368
3f0e1797-f9cb-4e78-bd8f-446ea6bacb89
omkaranu04/CP_DSA
CP Conclave IITM/PS9/p3.cpp
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int t; cin >> t; while (t--) { int n, q; cin >> n >> q; int a[n]; for (int i = 0; i < n; i++) { ...
ALGO
0.999886
4.027157
f5dacd54-4be2-4455-a766-f09f218ffe74
ABOODABUAWWAD/LeetCode-problem-solve
0024-swap-nodes-in-pairs/0024-swap-nodes-in-pairs.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* swapPairs(L...
ALGO
0.999996
5.872272
5b526081-43ef-4661-b408-cd5911618120
danielgelbart/Graham
cpp/src/html/Phraser.cpp
#include <iostream> #include <set> #include <boost/algorithm/string.hpp> #include "ExcludedKeywords.h" #include "Logger.h" #include "Phraser.h" #include "HtmlParser.h" #include "Utils.hpp" using namespace std; typedef std::vector<wstring> Sentence; typedef std::vector<Sentence> Document; void buildSentences(const st...
TOOL
0.956166
4.721985
4a0dc5e9-79d0-4d97-b785-aeacecee2ae5
goropikari/CompetitiveProgramming
atcoder/abc304/e.cpp
/*https://atcoder.jp/contests/abc304/tasks/abc304_e*/ /*2025年03月04日 01時17分12秒*/ #include <atcoder/all> using namespace atcoder; // using mint = modint998244353; // using mint = modint1000000007; #include <bits/stdc++.h> #define all(v) (v).begin(), (v).end() #define rall(v) (v).rbegin(), (v).rend() #define rep(i, n) for...
ALGO
0.999954
4.887798
a4ae7b18-107f-41b4-a19a-196ce1151807
alihaq19/PF-week-6
fruit.cpp
#include <iostream> using namespace std; main() { string fruit; float quantity; string day; float price; cout<<"Enter the fruit you want to buy : "; cin>>fruit; cout<<"Enter the day you want to buy the fruit: "; cin>>day; cout<<"Enter the number of "<< fruit <<" you want to buy: "; ...
TOOL
0.907337
4.602281
dbafd1db-a7cf-46f2-9110-1c8d905795d4
abdelqayyim/C-Tic-Tac-Toe
build-mac/Boost/libs/gil/example/adaptive_threshold.cpp
#include <boost/gil.hpp> #include <boost/gil/extension/io/png.hpp> #include <iostream> using namespace boost::gil; // Demonstrates Adaptive Thresholding // threshold_adaptive works following either the mean or the gaussian method, and accepts also a direction // The direction indicates whether the pixels are assigne...
TOOL
0.906439
6.746938
05cdc84b-4bf0-4b9a-a376-63eca0ab5b2f
taylor-mitchell/OGLCI
external-libraries/boost_1_73_0/libs/graph/example/cycle_ratio_example.cpp
#include <cassert> #include <ctime> #include <boost/random/mersenne_twister.hpp> #include <boost/random/uniform_real.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/random.hpp> #include <boost/graph/howard_cycle_ratio.hpp> /** * @author Dmitry Bufistov * @author Andrey Parfenov */ using namesp...
ALGO
0.995899
5.801914
df1729d7-f80d-47f5-bde1-2ffc87954f3f
Shailesh6068/CPP
DSA Assignemnt/DSA QUE/DSA_3.cpp
#include <iostream> using namespace std; // Function to sort the array based on frequency and value using Insertion Sort void sortByFrequency(int arr[], int n) { int freq[1000] = {0}; // Frequency array (assuming the elements are in the range 0 to 999) // Step 1: Count the frequency of each element f...
ALGO
0.999997
6.192559
bb233307-a8c1-48ad-954f-ba8e9c679a1b
linyawd/prog2coursecpp
homework17/t_17_03.cpp
#include <iostream> #include <string> #include <stdexcept> #include <cassert> int charToDigit(char ch, int base) { int digit; if ('0' <= ch && ch <= '9') { digit = ch - '0'; } else if ('A' <= ch && ch <= 'F') { digit = ch - 'A' + 10; } else if ('a' <= ch && ch <= 'f') { digit =...
ALGO
0.912062
6.60998
7e122a8f-1f2a-441e-a392-55f5b7a629cb
swati082001/PSUP
CONTROLS-BASICS/Temperature state message.cpp
#include <iostream> using namespace std; int main() { int temp; cin >> temp; if(temp < 0){ cout << "Freezing weather"; } else if(temp>0 && temp<10){ cout << "Very cold weather"; } else if(temp>=10 && temp<20){ cout << "Cold weather"; } else if(temp>=20 && temp<30){ cout <<"Normal in temp"; } else...
TOOL
0.997957
3.749564
06f974dc-75e1-463d-8b13-a05f008cd130
aniketmaurya/am
oop/book/overview/p2.3.cpp
#include<iostream> using namespace std; int main() { int a,b; a=5,b=10; swap(a,b); cout<<"a="<<a<<"\t"<<"b="<<b<<endl; } void swap(int& x, int &y) { int temp; temp=x; x=y; y=temp; }
ALGO
0.99693
3.503273
bcd994f0-04f9-4b43-b5aa-44215a2befb5
seandewar/challenge-solutions
leetcode/easy/number-of-1-bits.cpp
// https://leetcode.com/problems/number-of-1-bits/ // // Standard library solution using std::bitset. // The number of set bits is also known as the Hamming Weight. // // Complexity: runtime O(1), space O(1). class Solution { public: int hammingWeight(const uint32_t n) { return bitset<32>{n}.count(); ...
ALGO
0.998825
7.316623
72623c82-cc2b-4f6f-881c-56ed219748a5
jingyu-tong/leetcode
Top_Interview_Questions/974_Subarray_Sums_Divisible_by_K.cpp
class Solution { public: int subarraysDivByK(vector<int>& A, int K) { unordered_map<int, int> mem{ {0, 1}}; // sum % k, count,这里放0,为了统计第一个整除 int ans = 0; int sum = 0; for (auto& ele : A) { sum += ele; int left = (sum % K + K) % K; ans...
ALGO
0.999848
5.679688
dc292fc1-54a6-4eca-a91f-1283d86db567
AmrAbuElyazid/CPP-Small-games
RockPaperScissors.cpp
#include <iostream> #include <time.h> #include <stdio.h>; #include <stdlib.h>; using namespace std; int comp; int compPoints = 0; int player; int playerPoints = 0; void getCompChoice(); void getPlayerChoice(); void newGame(); void evaluate(); int main() { srand ( (unsigned int)time(NULL) ); newGame(); system("...
ALGO
0.994789
3.595266
5c18bf8f-fc57-449f-b0fa-c6649ecb0dea
ejichen/game3
WalkMesh.cpp
#include "WalkMesh.hpp" #include "read_chunk.hpp" #include <glm/gtx/norm.hpp> #include <iostream> #include <fstream> #include <algorithm> #include <string> WalkMesh::WalkMesh(std::vector< glm::vec3 > const &vertices_, std::vector< glm::vec3 > const &normals_, std::vector< glm::uvec3 > const &triangles_) : vertices...
TOOL
0.974799
6.283096
897a3dc7-446d-4394-89e5-69674b0ceeed
AspyRain/AMZ_EXIA
KEIL CODE/F103/GNVEDA_TERMINAL_F103_step3/GNVEDA_TERMINAL_F103/Drivers/CMSIS/NN/Examples/ARM/arm_nn_examples/cifar10/arm_nnexamples_cifar10.cpp
/** * @ingroup groupExamples */ /** * @defgroup CNNExample Convolutional Neural Network Example * * \par Description: * \par * Demonstrates a convolutional neural network (CNN) example with the use of convolution, * ReLU activation, pooling and fully-connected functions. * * \par Model definition: * \par *...
DATA
0.860806
5.576705
4bf1a46f-fd87-47f5-9458-8aee728d7bbd
Arvln/LeetCode
Two_Pointers/Sliding_Window/1004.Max-Consecutive-Ones-III/1004.Max-Consecutive-Ones-III.cpp
class Solution { public: int longestOnes(vector<int>& nums, int k) { int l=0, r=0, ret=0; while (r<nums.size()) { if (nums[r]==0) k--; r++; while (k<0) { if (nums[l]==0) k++; l++; } ret=m...
ALGO
0.999982
6.124542
f4e40563-dd50-4b98-a977-8246fa59c495
qbit-t/qbit
boost/libs/spirit/example/qi/compiler_tutorial/mini_c/vm.cpp
#include "vm.hpp" #if defined(_MSC_VER) # pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' // (performance warning) #endif namespace client { int vmachine::execute( std::vector<int> const& code , std::vector<int>::const_iterator pc , std:...
TOOL
0.943742
5.702116
a1f7caeb-abc1-4119-bfba-d150dbdd2205
ajpauwels/5AxLer
libs/Cura/settings/SettingRegistry.cpp
#include "SettingRegistry.h" #include <sstream> #include <iostream> // debug IO #include <libgen.h> // dirname #include <string> #include <cstring> // strtok (split string using delimiters) strcpy #include <fstream> // ifstream (to see if file exists) #include "../../rapidjson/rapidjson.h" #include "../../rapidjson/d...
CONFIG
0.896196
3.454247
075eead7-06a0-4bbd-ae67-301f7566544b
AhJo53589/leetcode-cn
problems/missing-number/SOLUTION.cpp
//int missingNumber(vector<int>& nums) //{ // //int sum = (0 + nums.size() - 1 + 1) * (nums.size() + 1) / 2; // int sum = nums.size() * (nums.size() + 1) / 2; // for (auto i : nums) sum -= i; // return sum; //} ////////////////////////////////////////////////////////////////////////// int missingNumber(vector<int>& n...
ALGO
0.999828
5.501356
9a36144b-4e47-482c-b8fa-8714d9d6ade8
Sobuj54/DSA-with-CPP
problems solved/week_1/day_7/power_consumption.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n, P1, P2, P3, T1, T2; cin >> n >> P1 >> P2 >> P3 >> T1 >> T2; vector<pair<int, int> > periods(n); for (int i = 0; i < n; i++) { cin >> periods[i].first >> periods[i].seco...
ALGO
0.999226
4.081344
5a239da4-817c-4195-a6ac-468138b66cad
vishnu1345/dsa
old/intersection2.cpp
#include<bits/stdc++.h> using namespace std; void display(int arr[] , int n){ for(int i=0;i<n;i++){ cout<<arr[i]<<"\t"; } cout<<endl; } int main(){ int A[7] = {1,4,3,2,5, 8,9}; int B[5] = {6,3,2,7,5}; int n = 7; int m = 5; int ans[100]; int i = 0 , j = 0; int k = 0; ...
ALGO
0.999951
3.080305
fd64c36b-3cc3-4d22-82df-6c996af30c6c
077bel-030purshottam/C-Folder
project/project_1_simple_calculator/yes_no_type_calculator_2.cpp
#include <iostream> #include <cstring> using namespace std; void calculate() { // declaring the variables double num1, num2; char opera_tor; // asking input from the user cout << "Enter the value of num1 " << endl; cin >> num1; cout << "Enter the value of num2 " << endl; cin >> num2...
TOOL
0.948014
3.039126
589e0d03-0599-4778-98b6-389b6963e459
ChaoPeng13/DigraphSchedAnalysisFramework
src/ResponseTimeAnalysis.cpp
#include "ResponseTimeAnalysis.h" void ResponseTimeAnalysis::calculate_all_response_times(Stateflow** sfs, int n) { for (int i=0; i<n; i++) { calculate_response_time_by_rbf_with_static_offsets(sfs,i); //calculate_response_time_by_ibf_with_static_offsets(sfs,i); calculate_response_time_by_rbf_with_arbitrary_offs...
ALGO
0.996679
4.902816
7429c511-8821-4959-ad8c-2972503f889c
Rajesh351/Leetcodeall
3517-shortest-distance-after-road-addition-queries-i/3517-shortest-distance-after-road-addition-queries-i.cpp
class Solution { void createAdjList(vector<vector<int>>& adj, int n) { for (int i = 0; i < n - 1; i++) { adj[i].push_back(i + 1); } } void DFS(int src, vector<int>& topo, vector<int>& vis, const vector<vector<int>>& adj) { vis[src] = 1; for (int node : adj[src]) ...
ALGO
0.999983
6.349517
88e0e496-7c9e-46d7-b81b-1f4872531d54
Immraannn/DSA1-CPLUS
binaryoccurence52.cpp
#include<iostream> using namespace std; int firstoccurence(int arr[],int n,int key){ int s=0;int e=n-1; int mid=s+(e-s)/2; int ans=-1; while(s<=e){ if(arr[mid]==key){ ans=mid; e=mid-1; } else if(key>arr[mid]){//right mn jao s=mid+1; } else if(key<arr[mid]){//left mn jao e=mid-1; } mid=s+(e-s)/2; ...
ALGO
0.99996
5.015558
db241475-cf97-474e-890b-86c6112f8028
kpnaranj/University-Development-C-plus-plus
project_1pascal/src/project_1pascal.cpp
#include <iostream> #include <cmath> int body_structure(int n,int k ); int pascal_triangle (int n); int main(); int body_structure(int n, int k){ if (n==k||k==0){ return 1;} else{ return body_structure(n-1,k-1)+body_structure(n-1,k); } } int pascal_triangle (int n){ for (int i=0;i<=n;i++){ for (int j=0;...
ALGO
0.999753
4.032748
84c05009-3f26-4217-a37b-c3909c6a035e
Geeetech3D/Prusa_I3_3Dprinter
A10_marlin1.1.8/Marlin/ubl_motion.cpp
#include "MarlinConfig.h" #if ENABLED(AUTO_BED_LEVELING_UBL) #include "Marlin.h" #include "ubl.h" #include "planner.h" #include "stepper.h" #include <avr/io.h> #include <math.h> #if AVR_AT90USB1286_FAMILY // Teensyduino & Printrboard IDE extensions have compile errors without this inline void set_...
TOOL
0.976109
7.440089
dd1f7402-18e0-4851-aa8e-df1e3c38d4cf
jaesungj/EECS481meshLab
vcglib/apps/sample/aabb_binary_tree/aabb_binary_tree.cpp
#include <stdio.h> #include<vcg/complex/complex.h> #include<vcg/simplex/face/distance.h> #include<vcg/simplex/face/component_ep.h> #include <vcg/complex/algorithms/create/platonic.h> #include <vcg/complex/algorithms/update/normal.h> #include <vcg/complex/algorithms/update/component_ep.h> #include <vcg/complex/algorith...
TEST
0.959033
5.911983
b305d1f4-fd42-42c3-a07d-01e578632623
isshomin/algorithm_practice
프로그래머스/0/181901. 배열 만들기 1/배열 만들기 1.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; vector<int> solution(int n, int k) { vector<int> answer; for(int i=1; i*k <= n; i++) { answer.push_back(i*k); } sort(answer.begin(), answer.end()); return answer; }
ALGO
0.999985
3.96037
113d5b59-9c93-4204-bd7f-757f462a7e07
raincross7/code-similarity
codes/train_code/problem312/problem312_290.cpp
#ifdef BUILT_LOCAL #include "niklib.h" #endif #include <iostream> #include <utility> #include <vector> #include <stack> #include <queue> #include <algorithm> #include <string> #include <cstdio> #include <map> #include <set> #include <list> using namespace std; typedef long long ll; constexpr ll mod = 1000000007; ...
ALGO
0.999993
4.165463
e24566a1-b1f3-49c0-ae7e-315730d03268
durgeshkk/Codeforces-Contests
2024_03_06_Practice/Education_Round_165/C_Minimizing_the_Sum.cpp
/* Once in a LifeTime, Will never let you Down!! */ #include <bits/stdc++.h> #include<iomanip> #include <deque> #include <bitset> #include <cstdint> //#include <ext/pb_ds/assoc_container.hpp> // Common file //#include <ext/pb_ds/tree_policy.hpp> //using namespace __gnu_pbds; //#define ordered_set tree<int, null_type,le...
ALGO
0.999897
4.111608
7d399f49-bcb2-49cd-92a8-b50b84c63164
saurabhkr4/Contest
dsa.cpp
#include <bits/stdc++.h> using namespace std; bool isValid(vector<long long>& positive, vector<long long>& negative, long long maxSum) { long long posIndex = 0, negIndex = 0, currentSum = 0, maxObservedSum = 0; while (posIndex < positive.size() || negIndex < negative.size()) { while (currentSum + (posIndex < posi...
ALGO
0.999995
5.377434
5ae103bf-8757-436c-854b-f6e6acb697ef
schulzch/qml-ogdf
ogdfplugin/ogdf/src/ogdf/energybased/multilevelmixer/ScalingLayout.cpp
/* * $Revision: 2565 $ * * last checkin: * $Author: gutwenger $ * $Date: 2012-07-07 17:14:54 +0200 (Sa, 07. Jul 2012) $ ***************************************************************/ #include <ogdf/energybased/multilevelmixer/ScalingLayout.h> namespace ogdf { ScalingLayout::ScalingLayout() : m_minScalin...
ALGO
0.853202
5.84262
7927abca-448c-4426-bdf0-237cef912767
JJMats/CarND-MPC-Quizzes
polyfit/src/Eigen-3.3/bench/bench_reverse.cpp
#include <iostream> #include <Eigen/Core> #include <bench/BenchUtil.h> using namespace Eigen; #ifndef REPEAT #define REPEAT 100000 #endif #ifndef TRIES #define TRIES 20 #endif typedef double Scalar; template <typename MatrixType> __attribute__ ((noinline)) void bench_reverse(const MatrixType& m) { int rows = m.r...
TEST
0.931823
5.595998
a5b2e246-9c63-4079-b8d4-2e33305b53b6
ishandutta2007/codeforces
galen_colin/normal/794/B.cpp
#include <bits/stdc++.h> using namespace std; #define send {ios_base::sync_with_stdio(false);} #define help {cin.tie(NULL);} #define f first #define s second #define getunique(v) {sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end());} typedef long long ll; typedef long double lld; typedef unsigned l...
ALGO
0.999868
3.257351
3c0679f8-fab0-4905-a3fb-b893ccfdcc6c
Ginakira/Code-Archive
HZOJ/#237-递归实现排列型枚举.cpp
/************************************************************ File Name : #237-递归实现排列型枚举.cpp Author: Ginakira Mail: <EMAIL> Created Time: 2020/03/11 19:33:29 ************************************************************/ #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include ...
ALGO
0.999916
4.587095
be389378-5d07-4629-bdf0-e9089d668435
Krisbis/Sorting-algorithm-project
linkedList.cpp
#include "linkedList.h" #include <iostream> LinkedList::LinkedList() : head(nullptr), tail(nullptr) {} LinkedList::~LinkedList() { // Node *current = head; // while (current) // { // Node *temp = current; // current = current->next; // delete temp; // } // // Set head to nu...
ALGO
0.999451
5.132837
5df38f50-ebb0-4686-927c-7fe6da29a014
HPC-Fortran2CPP/Fortran2Cpp
data/readable_format/cpp/file2216.cpp
// mo_column.cpp #include <iostream> #include <vector> #include <cmath> class Column { public: void compute(int nz, std::vector<std::vector<float>>& q, std::vector<std::vector<float>>& t, std::vector<float>& z, int nproma) { compute_column(nz, q, t, z, nproma); } private: void compute_column(int n...
ALGO
0.999106
5.00228
b972e505-25b5-49a3-9bd1-bcf8f370e784
sammochen/cp
templates/eval.cpp
ll eval(const string& s) { const ll n = s.size(); ll dep = 0, start = -1, val = 0; VLL nums; string signs; for (ll i = 0; i < n; i++) { if (s[i] == ' ') continue; if (s[i] == '(') { if (dep++ == 0) { start = i; } } else if (s[i] == ')...
ALGO
0.999883
4.317723
ed1b6b4f-5942-4cc5-b0be-1b104b7a00dc
eliotayache-nv/GAMMA
src/Geometry/cylindrical.cpp
/* * @Author: eliotayache * @Date: 2020-05-05 15:17:31 * @Last Modified by: eliotayache * @Last Modified time: 2020-11-09 19:09:22 */ #include "../cell.h" #include "../constants.h" void Cell::computedV(){ double r = G.x[r_]; double dr = G.dx[r_]; double dz = G.dx[zcyl_]; double r1 = r - dr/2.; double r...
ALGO
0.983724
6.294367
e220b338-f88c-4cb3-89af-f1ab4b8d5226
Harshita05104/Leetcode-solved-questions
Check if strings are rotations of each other or not - GFG/check-if-strings-are-rotations-of-each-other-or-not.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to check if two strings are rotations of each other or not. bool areRotations(string s1,string s2) { if(s1.size()!=s2.size()) return false; for(int i=0;i<s1.si...
ALGO
0.999835
5.67883
eadff3ee-f202-4cdf-a71a-66168920dfee
autu-rain/Autu_Rain-xcpc-
最大权闭合子图.cpp
constexpr int inf = 1E9; template<class T> struct MaxFlow { struct _Edge { int to; T cap; _Edge(int to, T cap) : to(to), cap(cap) {} }; int n; std::vector<_Edge> e; std::vector<std::vector<int>> g; std::vector<int> cur, h; MaxFlow() {} MaxFlow(int n) { init(n); } void init(int n) ...
ALGO
0.999925
4.248445
1e0432ae-e663-4808-bfb8-b7b43ec3493a
Pasorra/leetcode
cpp/933. Number of Recent Calls/Solution.cpp
#include <queue> #include <iostream> using namespace std; class RecentCounter { public: int ping(int t) { requests.push(t); int smallest = t - 3000; while (requests.front() < smallest) { requests.pop(); } return requests.size(); } private: q...
ALGO
0.994722
6.261528
7cd21a08-5761-4a06-a2c8-3695b4d4bcb7
masumbillah06/Beecrowd-Solutions
bee_1467.cpp
#include<iostream> using namespace std; int main() { int a, b, c; while (cin>>a>>b>>c) { if( (a+b+c == 0) || (a+b+c == 3)) cout << "*" << endl; else if((a+b==0) || (a+b==2)) cout << "C" << endl; else if((c+b==0) || (c+b==2)) cout << "A" << endl; else if((c+a==0) || (c+a==2)) ...
ALGO
0.999834
3.445383
7b41c7e8-17b9-4f60-ad23-a8ad28369f75
Priya-Thakur25/LeetCode
2691-count-vowel-strings-in-ranges/2691-count-vowel-strings-in-ranges.cpp
class Solution { public: bool isSafe(int i, vector<string>&words){ string str = words[i]; char f = str.front(); char e = str.back(); if((f == 'a' || f == 'e' || f == 'i' || f == 'o' || f == 'u') && (e == 'a' || e == 'e' || e == 'i' || e == 'o' || e == 'u')){ return true; } return false; ...
ALGO
0.999948
6.510602
ad0c25d5-2c5f-441b-a77b-4f9846bd9d9d
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/july/temp2_20200708022414.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #include<unordered_map> #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define ...
ALGO
0.999986
4.119968
f11c7dae-c7c0-4c41-bb46-7fd185c2b75a
Bbblithe/learning-project
C++/实验/实验1/linear_list.cpp
#include<iostream> using namespace std; const int MaxSize = 100; template<typename DataType> class SeqList { public: SeqList(); //建立空的顺序表 SeqList(DataType a[], int n); //建立长度为n的顺序表 ~SeqList(); int locate(DataType x); //按值查找 void Insert(int i, DataType x); //插入操作,在第i个位置插入x DataType De...
ALGO
0.997576
3.745816
3469366c-0210-4feb-a58c-b92867d4a3aa
SPL-BGU/BiHS-Consistent-F2E
journal/abstractionalgorithms/PRAStar2.cpp
/* * $Id: praStar2.cpp * hog2 * * Created by Nathan Sturtevant on 6/23/05. * Modified by Nathan Sturtevant on 02/29/20. * * This file is part of HOG2. See https://github.com/nathansttt/hog2 for licensing information. * */ #include "PRAStar2.h" #include "FPUtil.h" using namespace GraphAbstractionConstants...
ALGO
0.999802
4.298307
e2c653ae-8b77-4d7d-a583-ef438b5155f5
omar-s-ta/solved-problems
UVA/Random/Ternary.cpp
#include <iostream> #include <string> #include <stack> using namespace std; int main() { long long _number; while (cin >> _number && _number >= 0) { if (_number == 0) { puts("0"); continue; } stack<char> _converted; while (_number != 0) { _converted.push((_number % 3) + '0'); _number /= 3; ...
ALGO
0.99993
4.254411
f3c8cf42-903c-41f0-ba0a-a84c1c941914
th1rt3en13/Faculdade
Programação 2 (Terceiro semestre)/Calculadora projeto/Prj_Calculadora avançado/calculadora_av.cpp
//calculadora_av.cpp #include <math.h> #include "calculadora_av.h" float potencia (float nn1, float nn2){ return pow(nn1,nn2); } float raiz (float nn1, float nn2){ return pow(nn1, 1/nn2); }
ALGO
0.868693
4.040298
0796b1ea-bf52-4d02-9d3e-12ad1eaf3d6b
TheoryInPractice/MI-bicliques
src/algorithms/OCTMIB.cpp
/** * @authors Eric Horton, Kyle Kloster, Drew van der Poel * * This file is part of MI-bicliques, https://github.com/TheoryInPractice/MI-bicliques, * and is Copyright (C) North Carolina State University, 2018. * It is licensed under the three-clause BSD license; see LICENSE. */ #include <ctime> // for timing #include...
ALGO
0.999511
6.76938
76c1c709-f750-4692-abaa-3ea12bbb8d8f
IvanDzanija/competitive_programming
CSES/IntroProblems/tower_of_hanoi.cpp
#include <algorithm> #include <cmath> #include <iostream> #include <set> #include <stack> using ll = int64_t; ll n; void solve(ll n, int from, int to, int help) { if (n == 0) return; else { solve(n - 1, from, help, to); std::cout << from << ' ' << to << std::endl; solve(n - 1, ...
ALGO
0.999924
4.068285
f0c72ce7-a651-4b8b-a761-0eb9e5d3ee02
manohar2000/CB-Algorithms
Graphs/ArrayOfLLImp.cpp
#include <iostream> #include <list> using namespace std; class Graph { int V; list<int> *l; public: Graph(int v) { V= v; l = new list<int> [V]; } void addNode(int a, int b, bool biDirection=true) { l[a].push_back(b); ...
ALGO
0.999501
4.865211
60383d17-3f3c-42ab-8b74-b3f7e265d61b
VetalKrushna/CPP_Slips
3slip_Q2.cpp
/*Q.2) Write a C++program to calculate following series: (1*1) +(2*2) +(3*3) + … +(n*n). */ using namespace std; #include<iostream> int main() { int i,n,s=0; cout<<"Enter limit:"; cin>>n; for(i=1;i<=n;i++) s=s+(i*i); cout<<"\nSum of series::"<<s; }
ALGO
0.999351
3.581062
7f87f30f-51f6-4df4-8fef-81547c0553e1
elizabeth-dayton/COMP2710
hw3/hw3/hw3.cpp
// Name: Elizabeth Dayton, ead0044. // Partner: NONE. // File Name: hw3.cpp // Due Date: 9/14/2018. // Collaboration: I did not use any external sources for this assignment. // Problem: Determines the greatest puzzle-solver of all time! # include <iostream> # include <cstdlib> # include <cassert> # include <ctime> us...
ALGO
0.993361
5.378765
0480f912-c002-4506-ab10-1a44ca33c0dd
SpeedCodeOrg/speedcode-problems-contrib
.sandbox_utils/include/parlaylib/examples/set_cover.cpp
#include <iostream> #include <string> #include "parlay/parallel.h" #include "parlay/primitives.h" #include "parlay/sequence.h" #include "set_cover.h" #include "helper/graph_utils.h" // ************************************************************** // Driver // ********************************************************...
ALGO
0.996649
6.810728
7956689a-3f74-4c1e-aaa4-6a86e992476a
Sowmik23/CompetitiveProgramming
CP-Algorithms/Algebra/5_Number systems/2_Gray code.cpp
#include <bits/stdc++.h> using namespace std; /* * Gray code is a binary numeral system where two successive values * differ in only one bit. * This code was invented by Frank Gray in 1953. */ /// finding gray code int g(int n){ return n^(n>>1); } /// finding inverse gray code; int rev_g(int g){ int n = 0; for...
ALGO
0.999964
3.915894
27da347e-fc4c-4ff1-8c50-b2563532b6d1
kgw0513/algorithm
오일러 경로 테크닉(ETT)/ETT.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <queue> #include <deque> #include <stack> #include <cmath> #include <set> #include <map> #include <bitset> #include <utility> #include <assert.h> #include <unordered_set> #include <unordered_map> //#include <ext/rope> #pragma warning(...
ALGO
0.999949
3.669679
d10c1998-e5e7-4cb6-be2d-fb7853ead43f
EmiRoberti77/cpp_samples
pointers/src/main.cpp
#include <iostream> using namespace std; int Add(int *a, int *b); void AddVal(int *a, int *b, int *result); void Swap(int *a, int *b); int main(){ int a(10); int b(5); int result(0); //add cout << "Add=" << Add(&a, &b) << endl; //addVal AddVal(&a, &b, &result); cout << "addVal="<< result << endl; ...
ALGO
0.99712
4.882532
6fe03221-2688-4e93-9de5-45a20e3cb3a1
YongHoonJJo/BOJ
5547.cpp
#include <stdio.h> int ans, fill; int a[210][210]; int visited[210][210]; int di[]={1, 0, -1, 0}; int dj[]={0, 1, 0, -1}; int safe(int i, int j) { return (0 <= i && i < 210) && (0 <= j && j < 210); } void filled(int i, int j) { a[i][j] = 2; for(int k=0; k<4; k++) { int ni = i+di[k]; int ...
ALGO
0.998454
3.091007
7ef62a6d-b63a-4316-9135-1a002d912dee
ammardab3an/AleppoCPC
level_2/subjects/complete search/dynamic programming/during session codes/cut_0.cpp
// By AmmarDab3an - Aleppo University #include "bits/stdc++.h" using namespace std; //#define int int64_t //#define lli int64_t typedef unsigned int uint; typedef long long int lli; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<lli, lli> pll; typedef pair<int, pii...
ALGO
0.999956
4.184023
f2334d94-298a-44b4-bd9e-b6b81074c832
fhajji/ntl
src/mat_lzz_p.cpp
#include <NTL/mat_lzz_p.h> #include <NTL/vec_long.h> #include <NTL/BasicThreadPool.h> #ifdef NTL_HAVE_AVX #include <immintrin.h> #endif NTL_START_IMPL #define PAR_THRESH_SQ (200) #define PAR_THRESH (40000.0) // ******************************************************* // // Matrix Window data structure: perhaps som...
ALGO
0.998623
4.299561
b5da70ae-482a-469e-a8b8-102439410b9c
minhphuc1304/leetcode_Daily
202501Jan/150125.cpp
class Solution { public: int minimizeXor(int num1, int num2) { int a = __builtin_popcount(num1); int b = __builtin_popcount(num2); int res = num1; for (int i = 0; i < 32; ++i) { if (a > b && (1 << i) & num1) { res ^= 1 << i; --a; ...
ALGO
0.999976
5.681091
b0c0c81b-feec-4007-adef-8c4375bbf389
Maaslak/Bioinfa
Bioinformatyka/Bioinformatyka.cpp
// Bioinformatyka.cpp: Definiuje punkt wejścia dla aplikacji konsolowej. #define _CRT_SECURE_NO_WARNINGS #include <vector> #include <stdio.h> #include <string> #include <fstream> #include <list> #include <time.h> #include <algorithm> #include <stdlib.h> #include <list> #include <map> #include <iostream> #include <ctim...
ALGO
0.998771
3.146213
822888b2-b592-48b1-8042-b3bb0d65b849
ishandutta2007/codeforces
gary2005/normal/NA/208.cpp
/** * author: gary * created: 29.03.2022 10:49:32 **/ #include<bits/stdc++.h> #define rb(a,b,c) for(int a=b;a<=c;++a) #define rl(a,b,c) for(int a=b;a>=c;--a) #define rep(a,b) for(int a=0;a<b;++a) #define LL long long #define PB push_back #define POB pop_back #define II(a,b) make_pair(a,b) #define FIR first #de...
ALGO
0.999989
3.686714
a8516944-412f-4de0-8244-35fb54a655ba
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_4981_1.cpp
#include <bits/stdc++.h> using namespace std; #define LL long long #define LD long double #define SC(t,x) static_cast<t>(x) #define AR(t) vector < t > #define PII pair < int, int > #define PLL pair < LL, LL > #define PIL pair < int, LL > #define PLI pair < LL, int > #define MP make_pair #define PB push_back #define PF...
ALGO
0.999983
4.18087
8351e0ae-ed71-44af-abbb-1ddb7edec572
dldkddkd/Competitive-Programming
Junyoung/Samsung/경사로.cpp
// https://www.acmicpc.net/problem/14890 #include <cstdio> using namespace std; const int MAXN = 100 + 2; int main() { int N, L; int map[2*MAXN][MAXN]; scanf("%d %d", &N, &L); for (int i = 0; i < N; i++){ for (int j = 0; j < N; j++){ scanf("%d", &map[i][j]); map[j+N][i] = map[i][j]; // 가로 세로 변...
ALGO
0.999853
3.018126
8b1efa35-256a-427d-8d01-ae5444cc3f7a
avalero/curso-cpp
ejemplos/funciones/composicion/sort/main.cpp
#include <vector> #include <iostream> #include <memory> #include <functional> using namespace std; shared_ptr<vector<int>> bubbleSort(vector<int> const &v) { auto sorted = make_shared<vector<int>>(v); for (int i = 0; i < sorted->size(); i++) { for (int j = 0; j < sorted->size() - i - 1; j++) { if ...
ALGO
0.999269
5.942855
b7b74517-806e-4a11-9fca-d353137c8364
biyotteu/algorithms
C++/edit.cpp
#include <bits/stdc++.h> using namespace std; struct node{ struct node *left, *right; char data; }; char str[100005]; void create(node *L, char vdata){ node *newNode = (node*)malloc(sizeof(node)); newNode->data = vdata; newNode->left = L; newNode->right = NULL; L->right = newNode; return; } void push(node *v,...
ALGO
0.999988
3.713418
38d0ab1f-6bad-4ba8-b1fe-585aba9e9eec
theomkargharge/DSA
Recursion/LetterCombinationofPhone.cpp
#include <iostream> #include <vector> #include <string> using namespace std; void solve(string digits, string output, int index, vector<string> &ans, string mapping[]) { // base case if (index >= digits.length()) { ans.push_back(output); return; } // processing int number =...
ALGO
0.999611
5.621332
fc57beb9-dab5-4705-acf4-98d00674f0fa
Reborn1998/code_cpp
数字子串.cpp
#include<iostream> #include<string> using namespace std; int main() { string a; while(getline(cin,a)) { int i; for( i=0;i<a.length();i++) { if(a[i]<'0'||a[i]>'9') { cout<<"No\n"; break; } } if(i==a.length()) { ...
ALGO
0.999535
3.080655
1b67530f-911e-40bd-9876-a6cae1d10161
anhhducc/NMLT_IT001.L11
Chuong02/Bai_124/Bai_124.cpp
#include <iostream> #include <cmath> using namespace std; int TinhAn(int); int TinhBn(int); int main() { int n; cout << "Nhap n: "; cin >> n; int kq1 = TinhAn(n); int kq2 = TinhBn(n); cout << "So hang thu " << n << " cua day la: " << kq1 << " " << kq2; return 1; } int TinhAn(int k) { int at = 2, bt = 1, ahh...
ALGO
0.999708
3.502502
0f47d13b-5065-4644-94e3-501f01416e5b
davestroud/CPP_Templates
File_Operations/12_lab/Lab 12 solution/circleKEY.cpp
//This program will read the radii of circles. This is an array of records where each record // will have the radius of the circle read from the keyboard and the diameter and area of the // circle will be calculated by the program. This information is stored in a binary file. // Then make an output file (with headin...
TOOL
0.928261
3.209633
4c4e2ef4-18ee-43dd-9280-883cf047b208
UmbaDumba/cote
프로그래머스/3/12904. 가장 긴 팰린드롬/가장 긴 팰린드롬.cpp
#include <iostream> #include <string> #include <vector> using namespace std; int solution(string s) { int answer = 1; vector<vector<bool>> dp(s.size(), vector<bool>(s.size(), false)); for(int i = 0; i<s.size(); i++) { dp[i][i] = true; } for(int i = 0; i<s.size()-1; i++) { ...
ALGO
0.999777
4.421221
95eda7a3-00bf-426c-8939-4f04be1a6517
masonarchhsieh/Training_LeetC
1694-make-sum-divisible-by-p/1694-make-sum-divisible-by-p.cpp
class Solution { public: int minSubarray(vector<int>& nums, int p) { unordered_map<int, int> m; long long sum = accumulate(nums.begin(), nums.end(), 0ll) % p; if (sum == 0) return 0; m[0] = -1; int cur_sum = 0; int res = (int) size(nums); for (auto...
ALGO
0.999948
5.777791
785e1782-d407-43d5-b008-88e270c7fad0
siddhant-uniyal/lc_solutions
sliding-window/2626-count-the-number-of-good-subarrays/2626-count-the-number-of-good-subarrays-0.cpp
class Solution { public: long long countGood(vector<int>& nums, int k) { unordered_map<int,int>mp; int n = nums.size(); int pairs = 0; long long ans = 0; int i = 0; for(int j = 0 ; j < n ; ++j){ pairs += mp[nums[j]]; ++mp[nums[j]]; ...
ALGO
0.999983
5.729422
d89167a2-12c7-4d8a-b072-68569ded2f1f
TraianDanciu/competitive-programming
problem-solutions/olympiads/rmi/2024/day1/octagon-55p.cpp
#include <stdio.h> #include <vector> #include <algorithm> const int MOD = 1'000'000'007; #define int long long int v[8]; int min(int a, int b) { return a < b ? a : b; } int max(int a, int b) { return a > b ? a : b; } // Cati de x si y exista a.i. x <= a, y <= b si y - x = k? int numWays(int a, int b, int k) { ...
ALGO
0.999957
4.612588
51f81be1-a37c-4fab-af33-0e43c1feb021
vijaypatel12/c-plus
Hackerrank.cpp
1 //pointer addition subtraction #include <iostream> using namespace std; void update(int *a, int *b) { int sum = *a + *b; int diff = *a - *b; *a = sum; *b = (diff >= 0) ? diff : -diff; // absolute difference } int main() { int a, b; cin >> a >> b; update(&a, &b); // passing addresse...
ALGO
0.998659
3.720639
349e5a8d-f397-41fe-a902-fbf5d7115c5c
Mayank-Digarse/GFG_DSA_Questions
Three way partitioning/Three way partitioning.cpp
class Solution{ public: //Function to partition the array around the range such //that array is divided into three parts. void threeWayPartition(vector<int>& array,int a, int b) { // code here int start = 0; int end = array.size()-1; int i = 0; while(...
ALGO
0.999969
5.348212
b85512e2-99b4-48a2-9687-faeba4472678
almishra/metadirective
llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
#include "llvm/CodeGen/GlobalISel/RegBankSelect.h" #include "llvm/ADT/PostOrderIterator.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/GlobalISel/LegalizerInfo.h" #include "llvm/CodeGen/GlobalISel/RegisterBank.h" #include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h" #include...
ALGO
0.950031
4.788036
80e20769-a004-4be5-9402-79e81bf4bab3
DawnteaStudio/TIL
coding-test/Baekjoon/2000/2167.cpp
#include <iostream> #define fast ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); using namespace std; struct solve { /* data */ }; int main() { fast; int height, width, k, sum; int start_w, start_h, end_w, end_h; cin >> height >> width; int arr[height][width]; for (int i = 0; ...
ALGO
0.99665
3.61935
6cdf8ea3-54d6-441f-8983-efcf9636728b
krishnausjs/cpp_programs
leetcode/twosum.cpp
#include <iostream> #include <vector> #include <map> #include<unordered_map> using namespace std; vector<int> twoSum(vector<int> &numbers, int target) { //Key is the number and value is its index in the vector. unordered_map<int, int> hash; vector<int> result; for (int i = 0; i < numbers.size(); i++) { int nu...
ALGO
0.999746
5.498398