uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
59d6104d-9188-4ed3-9167-8121cf05be38
ishandutta2007/codeforces
arbuzick/normal/1339/A.cpp
#include<bits/stdc++.h> #define int long long using namespace std; signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; for (int i = 0; i < t; ++i) { int n; cin >> n; cout << n << endl; } return 0; }
ALGO
0.998707
3.839531
51c70da1-b8d8-4d56-8743-2fb7f9d35c39
Yuriel849/WaferDefectDetection
VisionApp/thirdparty/opencv_481/sources/3rdparty/carotene/src/absdiff.cpp
#include <algorithm> #include "common.hpp" #include "vtransform.hpp" namespace CAROTENE_NS { #ifdef CAROTENE_NEON namespace { template <typename T> struct AbsDiff { typedef T type; void operator() (const typename internal::VecTraits<T>::vec128 & v_src0, const typename internal::VecTra...
ALGO
0.990411
7.183696
612c67db-d281-45ab-97a4-509e4b6074b6
Abdul-Rahimm/LeetCode_2024
3. March/8. 3005. Count Elements With Maximum Frequency.cpp
class Solution { public: int maxFrequencyElements(vector<int> &nums) { unordered_map<int, int> mp; int highest = 0; int count = 0; for (int i : nums) { mp[i]++; highest = max(highest, mp[i]); } for (auto pair : mp) { ...
ALGO
0.999897
5.937366
ded75ec9-711f-4986-a8be-aefe0fc4180a
Shahadat-360/Competitive-Programming
Team231a.cpp
#include<bits/stdc++.h> using namespace std; int main(void) { int n; int count = 0; cin >> n; while (n--) { int a, b, c; cin >> a >> b >> c; if(a&b || b&c || a&c) count++; } cout << count; return 0; }
ALGO
0.999633
4.686734
7f16588d-d15b-4576-b47d-ae36bb665524
cryeo/rfpe
BeliefDivision.cpp
/* * BeliefDivision.cpp * * Created on: 2012. 11. 21. * Author: chaerim */ #include "BeliefDivision.h" #include "Util.h" BeliefDivision::BeliefDivision() { dimension = 0; } BeliefDivision::BeliefDivision(int dimension) { configure(dimension); } void BeliefDivision::configure(int dimension) { this->dim...
ALGO
0.970965
4.066489
cf23866a-14d2-40ce-8875-a067e4c1acbf
wooj22/Programing2Q
Programing2Q_Project/Programing2Q_Project/907 accumulate.cpp
// accumulate // // ํŠน์ • ๊ตฌ๊ฐ„์— ์žˆ๋Š” ์›์†Œ๋“ค์„ ํŠน์ • ๋ฐฉ์‹์— ๋งž๊ฒŒ ์Œ“์•„์„œ ๋ฆฌํ„ดํ•ด์ฃผ๋Š” ํ•จ์ˆ˜. // ์ง€์ •ํ•œ ๊ตฌ๊ฐ„์— ์†ํ•œ ๊ฐ’๋“ค์„ ๋ชจ๋“  ๋”ํ•œ ๊ฐ’์„ ๊ณ„์‚ฐํ• ๋•Œ ํ™œ์šฉ. // ๊ธฐ๋ณธ์ ์œผ๋กœ ๋”ํ•˜๊ธฐ ์—ฐ์‚ฐ๋งŒ ํ•˜์ง€๋งŒ, ์กฐ๊ฑด์ž๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋”ํ•˜๊ธฐ ์ด์™ธ์˜ ์—ฐ์‚ฐ๋„ ํ•  ์ˆ˜ ์žˆ๋‹ค. // // accumulate( start, last , ์ดˆ๊ธฐ๊ฐ’ ) // accumulate( start, last , ์ดˆ๊ธฐ๊ฐ’, OP ) #include <numeric> // #include <vector> #include <iost...
ALGO
0.993907
5.405699
35b60b62-4866-4097-a707-da253ab4d052
wang12d/ProgrammingPractices
OJ/uva10976.cpp
#include <iostream> #include <vector> #include <algorithm> using std::cin; using std::cout; using std::endl; using std::vector; int main(int argc, char** argv) { int k; while (cin >> k) { int doubleK{2*k}; vector<std::string> outputs; int cnt{0}; for (int y{k+1}; y <= doubleK; ...
ALGO
0.998429
4.484353
46e44069-efdd-4171-bd78-76a25ac8e8a7
ritikadeshmukh12/operating_system
lru_paging.cpp
//C++ implementation of above algorithm #include<bits/stdc++.h> using namespace std; // Function to find page faults using indexes int pageFaults(int pages[], int n, int capacity) { // To represent set of current pages. We use // an unordered_set so that we quickly check // if a page is present in set or no...
ALGO
0.999964
5.533767
f6a1e702-f5a4-4cbd-bf3e-f090a63ef27b
kjsce-codecell/Intro-to-CP25
Day 2- DSA and Other Concepts/ConstantTime.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int arr[] = {10, 20, 30, 40, 50}; // Constant Time O(1) cout << "First Element : " << arr[0] <<"\n"; // Always takes the same time return 0; }
ALGO
0.878429
3.545038
ed224b24-ec44-4ba4-8af7-1738a9e51714
X3eRo0/i_am_learning_C_CPP
sem1/[CPP]_vigenere.cpp
#include <iostream> #include <string.h> #include <ctype.h> using namespace std; //Usage: ./vigenere [-e/-d] <key> <message> void encrypt(char *, char *); void decrypt(char *, char *); int main(int argc, char *argv[]) { if(argc<4) { cout<<"Usage: ./vigenere [-e/-d] <key> <message>"<<endl; return 1; } if(str...
ALGO
0.999755
4.287161
85b031bd-f065-4d41-b271-e27914c7e973
cyan-chatter/DS-Algo
Linked List with OOverloading.cpp
#include <iostream> using namespace std; class node{ public: int data; node* next; node(int d){ data = d; next = NULL; } }; /* class LinkedList{ node*head; node*tail; public: LinkedList(){ head = NULL; tail = NULL; } void insert(){ } ...
ALGO
0.999696
4.048236
7e983867-10e9-411f-a91c-55a55d0fae93
cmodi1/Highway-Driving-Project
src/Eigen-3.3/unsupported/doc/examples/MatrixSinh.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { MatrixXf A = MatrixXf::Random(3,3); std::cout << "A = \n" << A << "\n\n"; MatrixXf sinhA = A.sinh(); std::cout << "sinh(A) = \n" << sinhA << "\n\n"; MatrixXf coshA = A.cosh(); std::cout << "cosh(A) = \n"...
ALGO
0.975474
5.890235
c4d45b73-c031-420e-831f-5637c1e12e21
Signior-X/cp
graphs/dfs.cpp
#include <bits/stdc++.h> using namespace std; #define test int T; cin >> T; while(T--) #define printv(ele) for(auto &vl : ele) cout << vl << " "; cout << "\n"; #define ll long long #define vi vector<int> #define vvi vector<vector<int>> vvi graph; vi visited; void dfs(int curr) { visited[curr] = true; cout << cur...
ALGO
0.999858
5.44113
a51f64fc-c024-452f-b834-e3475cd4cc6d
aquadrop/Face-Expression-Recognition
opencv-2.4.5/modules/objdetect/src/matching.cpp
#include "precomp.hpp" #include "_lsvm_matching.h" #include <stdio.h> #ifndef max #define max(a,b) (((a) > (b)) ? (a) : (b)) #endif #ifndef min #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif /* // Function for convolution computation // // INPUT // Fi - filter object // map ...
ALGO
0.999102
5.028316
195dedf9-8876-4372-8c8d-ae347f71fa1e
mmarcolino/ula4Bits
ula.cpp
int l0 = 10, l1 = 11, l2 = 12, l3 = 13; int x, y, w; int pos, aux; String process[100]; String mode; void setup() { pinMode(l0, OUTPUT); pinMode(l1, OUTPUT); pinMode(l2, OUTPUT); pinMode(l3, OUTPUT); Serial.begin(9600); } void loop() { if (Serial.available() > 0) { mode = Serial.readString(); ...
TOOL
0.978032
4.533974
0e3f28f0-33cb-483e-81be-99d2698a227a
bahromnematov/shared_preferense
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
e6dbabf5-7417-4bf0-bfe8-5a3393e80c6b
lca-123/Calculator
include/Calculator.cpp
#include <graphics.h> #include <string> #include "calculatorh.h" #include<time.h> using namespace std; void basicalInit(); void loadPicture(string choice); void releasePicture(); string mouseJudge(mouse_msg mouseMsg, string choice); string outterStrJudgeFirst(string str, string outterStr, string beforeStr); string inn...
TOOL
0.86886
3.183829
dbfd9b04-2f90-4028-bab7-cde66c9e86fb
Johniel/contests
atcoder/abc017/A/main.cpp
// atcoder/abc017/A/main.cpp // author: @___Johniel // github: https://github.com/johniel/ #include <bits/stdc++.h> #define each(i, c) for (auto& i : c) #define unless(cond) if (!(cond)) using namespace std; template<typename P, typename Q> ostream& operator << (ostream& os, pair<P, Q> p) { os << "(" << p.first << ...
ALGO
0.999048
4.274513
4576dea4-790f-4a27-8515-3f9f3d59032c
AshaSatpathy08/SUPREME_2.0
week4/custom comparator/code.cpp
#include<algorithm> #include <iostream> #include<vector> using namespace std; void print(vector<int> &v){ for(int i = 0; i < v.size(); i++){ cout << v[i] << " "; } cout << endl; } void printVv(vector<vector<int>> &v){ for(int i = 0; i < v.size(); i++){ vector<int>&temp = v[i]; ...
ALGO
0.999541
4.986904
c1ff17b5-448f-4440-956a-cf41c0fb4ca0
Paramesh612/LeetCode
0205-isomorphic-strings/0205-isomorphic-strings.cpp
class Solution { public: bool isIsomorphic(string s, string t) { if (s.size() != t.size()) return false; unordered_map<char,char>mp1; unordered_map<char,char>mp2; for (int i = 0; i < s.size(); i++) { if (mp1.find(s[i]) == mp1.end() && mp2.find(t[i]) == mp2.en...
ALGO
0.99998
6.301212
921e055a-5d2b-4aaa-b6d1-7f313ec2bae2
wangzhicheng2013/algorithm
algorithm16.cpp
#include <iostream> #include <vector> #include <functional> #include <cassert> using namespace std; //using tax_func = function<double(double)>; typedef double (*tax_func)(double); class tax_compute { public: inline static tax_compute &get_instance() { return tax_compute_; } public: double get_tax(d...
ALGO
0.999071
3.98205
b0c122ca-4614-4104-bf8b-eb17bb43fc2c
dcseal/finess
lib/3d/blanks/ProjectRightEig.cpp
#include "tensors.h" // * TEMPLATE * // // This is a user-supplied routine that projects // Wvals onto the right eigenvectors ofthe flux // Jacobian; the result is stored in Qvals. // // For the 3D balance law: // // q_t + f_x + g_y + h_z = psi // // There are three potential matrices to consider: f'(q), ...
ALGO
0.967619
3.615589
cd0d844b-465a-4d98-a3e2-6aae012471b2
ishandutta2007/codeforces
cookiedoth/normal/1017/B.cpp
/* Code for problem B by savkinsd2089 Generated 08 Aug 2018 at 08.09 pm The Moon is Waning Crescent (11% of Full) ] Il] ^_^ ^_^ =_= */ #include <iostream> #include <fstream> #include <vector> #include <set> #include <map> #include <algorithm> #include <iomanip> #include <cmath> #include <ctime> #include <funct...
ALGO
0.999911
3.93194
9ef0a04d-8917-4a73-95e2-d00f958f058f
Sandi2156/TLE-Eliminators-Level-2-Problems
2-difference-arrays/1-little_girl_and_maximum_sum.cpp
#include <bits/stdc++.h> // This will work only for g++ compiler. #define for0(i, n) for (int i = 0; i < (int)(n); ++i) // 0 based indexing #define for1(i, n) for (int i = 1; i <= (int)(n); ++i) // 1 based indexing #define forc(i, l, r) for (int i = (int)(l); i <= (int)(r); ++i) // closed interver from l to r r inclu...
ALGO
0.999987
4.572785
d754b3c1-8308-49eb-b225-d08c5e1e6419
coderrishu12/Leetcode
0787-cheapest-flights-within-k-stops/0787-cheapest-flights-within-k-stops.cpp
class Solution { public: int findCheapestPrice(int n, vector<vector<int>>& flights, int src, int dst, int k) { vector<int> result(n, INT_MAX); unordered_map<int, vector<pair<int, int>>> adj; for(auto &vec: flights){ int from = vec[0]; int to = vec[1]; ...
ALGO
0.999772
5.625879
2480849d-459c-40fa-a996-391cd74fb1b5
its-mayankanand/Practiceee
LinkedList/LL3.cpp
#include<iostream> using namespace std; class Node { public: int data; Node *next; Node(int val) { data = val; next = NULL; } }; //Solution class to encapsulate the insertAtEnd method class Solution { public: Node *insertAtEnd(Node *&head,int x) { //step1:...
ALGO
0.998905
4.931475
4e378114-583a-401c-a951-4d01591dda16
ishandutta2007/codeforces
aestas16/normal/1248/B.cpp
#include <cstdio> #include <algorithm> #define ll long long template<class T>void fr(T &a) { T s=0,w=1;char ch=getchar(); while(ch<'0'||ch>'9') {if(ch=='-')w=-1;ch=getchar();} while(ch>='0'&&ch<='9') s=s*10+ch-'0',ch=getchar(); a=w*s; } template<class T>T fr() {T a;fr(a);return a;} #define R() fr<l...
ALGO
0.9999
3.537605
5186d74f-f4e6-4369-883c-144eed7bb935
norlen/kattis
cpp/betting.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { double p; cin >> p; cout << setprecision(10) << fixed << (100.0 / p) << endl << (100.0 / (100.0 - p)) << endl; }
ALGO
0.998591
3.547132
b8323732-6fe6-4598-9fc8-db3a57a0b003
raincross7/code-similarity
codes/train_code/problem444/problem444_187.cpp
#include <stdlib.h> #include <cmath> #include <cstdio> #include <cstdint> #include <string> #include <iostream> #include <vector> #include <utility> #include <algorithm> #include <map> using namespace std; using ll = long long; int main(){ int N,M; cin >> N >> M; vector<pair<bool,int>> prob(N,make_pair(false,0))...
ALGO
0.999757
3.844944
e153eae3-3c15-4bd9-aea8-6820eea0b1c3
bwyogatama/Mordred
src/cpu/select.cpp
#include <math.h> #include <chrono> #include <cstdlib> #include <iostream> #include <immintrin.h> #include "tbb/tbb.h" #include "tbb/parallel_for.h" #include "utils/cpu_utils.h" using namespace std; using namespace tbb; #define BATCH_SIZE 2048 float selectIfCPU(float* in, float* out, int num_items, float cutpoint,...
ALGO
0.992032
5.840423
ee055f2b-425a-4497-a00b-30b43f8aad37
CodeBySushant/SolvedLeetcode
leetcode-main/leetcode-main/solution/0700-0799/0780.Reaching Points/Solution.cpp
class Solution { public: bool reachingPoints(int sx, int sy, int tx, int ty) { while (tx > sx && ty > sy && tx != ty) { if (tx > ty) tx %= ty; else ty %= tx; } if (tx == sx && ty == sy) return true; if (tx == sx) return ty > sy ...
ALGO
0.999961
5.255299
232a9e6a-ce72-4a6a-bde9-833da2706e38
AmiEklasMohin/LeetCode
power_of_three.cpp
/*https://leetcode.com/problems/power-of-three/*/ #include <iostream> using namespace std; class Solution { public: bool isPowerOfThree(int n) { while (n > 1 and (n % 3) == 0) { n /= 3; } return n == 1; } }; int main() { int num; cin >> num; Solution ans; bo...
ALGO
0.999769
5.548307
fa7f10fa-8b92-486b-b969-84a89187b26e
Pseudo-iitian/Competitive-Programming-LUV-
3_luv_rangesOverflow.cpp
#include<bits/stdc++.h> using namespace std; int main(){ // precedence of a datatype : // char -> int -> long int -> long long int -> float -> double // char b ='a'; // cout<< b + 1; // char, int, long int, long long int, flaot, double // -10^9 < int < 10^9 // -10^12 < long int < 10^12 // -10^18 < long long...
ALGO
0.998202
3.36989
6c8582e1-00d0-444f-849c-2106e28806f5
anniasebold/prog2-ufms
8-lista_encadeada/lista-simples2/arquivo-unico/prg-listaEncadeada.cpp
#include <stdio.h> /*printf*/ #include <stdlib.h> /*malloc, calloc, free*/ struct celula { int chave; struct celula *prox; }; /*void desalocar(celula* &L); void inserir_inicio(int n, celula* &lst); void remover(int x, celula* &lst);*/ void inserir_fim(int n, celula* &lst); void imprimir(celula *lst); int...
ALGO
0.998531
3.50251
728da9f4-42df-49f9-9847-66ac976a832b
kobe24o/LeetCode
algorithm/leetcode706_design-hashmap.cpp
class MyHashMap { int *data; public: /** Initialize your data structure here. */ MyHashMap() { data = new int[1000001]; memset(data, -1, 1000001*sizeof(int)); } /** value will always be non-negative. */ void put(int key, int value) { data[key] = value; } ...
ALGO
0.999392
6.008231
63c139fc-a869-4933-99cb-6fc2d41850a5
hhhnnn2112/NOI-ACcode-Explanation
Explanation2/P4995.cpp
#include <bits/stdc++.h> using namespace std; int n, a[999]; int main() { scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &a[i]); } sort(a, a + n + 1); long long ans = 0; for (int i = 0, j = n; i < j;) { ans += (a[i] - a[j]) * (a[i] - a[j]); i++; ans += (a[i] - a[j]) * (a[i] - a[j]); j--; } ...
ALGO
0.999911
3.444042
f98722e2-28ce-4066-9ca3-8d0a65811abf
jaredjxyz/SDCNanodegree
CarND-Path-Planning-Project/src/Eigen-3.3/doc/examples/class_CwiseBinaryOp.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; // define a custom template binary functor template<typename Scalar> struct MakeComplexOp { EIGEN_EMPTY_STRUCT_CTOR(MakeComplexOp) typedef complex<Scalar> result_type; complex<Scalar> operator()(const Scalar& a, const Scalar& b...
ALGO
0.958998
6.700232
4cbe62ae-ac76-4a6f-8e9c-2b9e15abe4c0
rdelfin/cs354project1
src/SceneObjects/Sphere.cpp
#include <cmath> #include "Sphere.h" #include <iostream> #include <glm/gtx/io.hpp> using namespace std; bool Sphere::intersectLocal(ray& r, isect& i) const { r.d = glm::normalize(r.d); glm::dvec3 v = -r.getPosition(); double b = glm::dot(v, r.getDirection()); double discriminant = b*b - glm::dot(v,v) + 1; if(...
ALGO
0.972686
4.071873
bdc218d8-2600-414a-a1ed-ab16d176b9b4
otmanesabir/HackerRank
Language Proficiency/C++/for-loop.cpp
#include <iostream> #include <cstdio> #include <vector> using namespace std; string OddEven(int a){ if (a % 2 == 0){ return "even"; } else { return "odd"; } } int main() { int a, b; cin >> a >> b; vector<string> eng = {"one", "two", "three", "four", "five", "six", "seven", "eig...
ALGO
0.99991
4.16842
96b71412-f1f2-4c76-af61-fa2299907c7e
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_11418_15.cpp
#include <bits/stdc++.h> using namespace std; string s; bool notpalin(int l, int r) { for (int i = l, j = r; i < j; i++, j--) { if (s[l] != s[r]) return true; } return false; } int main() { cin >> s; int res = 0; for (int i = 0; i < s.size(); i++) { for (int j = 0; j < s.size(); j++) { if (not...
ALGO
0.999814
4.162291
43e174c5-ffe1-45db-8196-2ebfcaa5f33f
anirudhchahar/leetcode-solution
eggdropopt.cpp
#include <bitset>stdc++.h> #include <iostream> using namespace std; const D=101; int static dp[D][D]; int Solve(int eggs, int floors){ if( dp[eggs][floors] != -1){ return dp[eggs][floors]; } if( eggs == 1 || floors==0 || floors==1){ return floors; } int ans = INT_MAX; for(int k...
ALGO
0.999669
4.662122
c2e86715-c85c-4c5a-9604-3eef0ca9d0fb
pacosw1/Data-structures
Queues&Stacks/Queue.cpp
#include <iostream> using namespace std; //my implementation of a Queue List struct Node { int val; Node *next; Node(int x) { val = x; next = NULL; } }; struct Queue { private: Node *head; //start of the queue Node *tail; //end of the queue public: Queue() { ...
ALGO
0.996435
3.94089
d59de58a-1d66-4e86-836d-8f66fea9458a
thevivekmishra/Data-Structure
00_LEET_CODE/Searching questions/k_diffPairInAnArr.cpp
// leetCode - k diff pair in an array Prob no 532 // class Solution // { // public: // int findPairs(vector<int> &nums, int k) // { // sort(nums.begin(), nums.end()); // set<pair<int, int>> ans; // int i = 0, j = 1; // while (j < nums.size()) // { // int ...
ALGO
0.999842
5.839352
1deb278f-c675-4bd5-96a6-0194c1f43fe5
Sid-bit28/Competitve-Programming
Leetcode/Striver String/151. Reverse Words in a String.cpp
#include<bits/stdc++.h> using namespace std; #define F first #define S second #define EB emplace_back #define all(x) std::begin(x), std::end(x) #define sz(x) (int)(x).size() #define rep(i, a, b) for(long long i = a; i < (b); ++i) #define endl '\n' #define debarr(a, n) cerr << #a << " : ";for(int i = 0; i < n; i++) cerr...
ALGO
0.999934
5.054804
0a99565e-36fd-45f8-86d2-d2acc4f488bb
gParshav/Leetcode
Dynamic Programming/Buy and Sell Stock - 2/code.cpp
class Solution { public: int findProfit(int i, vector<int>& prices, int haveStock){ if(i==prices.size()-1){ if(haveStock){ return prices[i]; } else{ return 0; } } if(haveStock){ int sell = prices[...
ALGO
0.999916
5.584796
92c77c8b-f382-4d47-acd2-f49d9ba61c5c
jsyeh/leetcode
2684/maximum-number-of-moves-in-a-grid.cpp
// LeetCode 2684. Maximum Number of Moves in a Grid // ๅ‹•ๆ…‹่ฆๅŠƒ้กŒ๏ผšๅพžๆœ€ๅทฆ้‚Šๅ‡บ็™ผ๏ผŒๅพ€ๅณไธŠ/ๅณ/ๅณไธ‹่ตฐใ€Œๆญฅๆญฅ้ซ˜ๆ˜‡ใ€่ถŠ่ตฐ่ถŠ้ซ˜๏ผŒๆœ€ๅคš่ตฐๅนพๆญฅ class Solution { public: int maxMoves(vector<vector<int>>& grid) { int M = grid.size(), N = grid[0].size(); bool visited[M][N]; // ๅฏไปฅ่ตฐๅˆฐ็š„้ปž for(int i=0; i<M; i++) { visited[i][0] = true; ...
ALGO
0.999997
5.983895
6f360d68-3879-4ba8-9876-9215d134a9e0
abdulaziz023/Finix_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.998784
6.761023
7c8f75e8-785e-41e4-9690-703f4b049d70
wuyongfa-genius/Algorithms
algorithms/greedy_algorithm/min_platforms.cpp
//Given the arrival and departure times of all trains that reach a railway station, the task //is to find the minimum number of platforms required for the railway station so that no train waits. //We are given two arrays that represent the arrival and departure times of trains that stop. #include<bits/stdc++.h> using ...
ALGO
0.999864
5.964919
f78f1479-9355-4db9-ac25-1ecd0b1c66ca
alokkumar07/leetcode
142-linked-list-cycle-ii/142-linked-list-cycle-ii.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *detectCycle(ListNode *head) { if(head==NULL || head->next==NULL) return NULL; ListNode *slow =...
ALGO
0.99989
5.398759
223decdf-9cf1-4ac5-a2c1-22510c5b3a22
rumdien113/Algorithm
CODEFORCES/Div4_806/A.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define pf push_front #define db long double #define st first #define nd second #define fast ios_base::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL); #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() ...
ALGO
0.999937
5.088975
b365d17b-28fb-4ba7-9c47-c53a7651e86d
mb305151/MBrepo
Podzielne/Podzielne/Podzielne/Podzielne.cpp
// Podzielne.cpp : Ten plik zawiera funkcjฤ™ โ€žmainโ€. W nim rozpoczyna siฤ™ i koล„czy wykonywanie programu. // #include <iostream> using namespace std; #include <stdio.h> int main() { int a, b; int count = 0; cin >> a >> b; for (int i = a; i <= b; i++) { if (i % 3 == 0 || i % 5 == 0) { count++; } } cout << c...
ALGO
0.999357
4.443622
30f33b32-2ece-485a-882d-e4c99d5c9c2e
Mahudesh/Data-Structures-And-Algorithms
Dynamic Programming/DP On LIS/Longest Continuous Increasing Subsequence.cpp
class Solution { public: int findLengthOfLCIS(vector<int>& nums) { // if(nums.size()) int cnt=1; int ans=1; for(int i=0;i<nums.size()-1;i++) { if(nums[i]<nums[i+1]) { cnt++; } else { ...
ALGO
0.999958
5.984614
9f3413d6-2241-418e-81c9-158e224b87c4
Raozey/The-Mistery-of-Algorithm
Binary tree/108ConvertArraytoBST.CPP
#include <iostream> #include <algorithm> #include "printTree.h" using namespace std; TreeNode* sortedArrayToBST(vector<int>& nums){ if(nums.size() == 0) return nullptr; int left = 0; int right = nums.size() -1; int mid = (left + right)/2; TreeNode* root = new TreeNode(nums[mid]); vector<int> ...
ALGO
0.999972
5.628506
00bc10ad-7c4c-4052-8f5b-ecd988207422
ishandutta2007/codeforces
777777777plus/normal/1340/C.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e4+5; const int M = 1e3+5; int n,m,g,r; int d[N]; int f[N][M]; int q[N*M*2]; int main(){ cin>>n>>m; for(int i=1;i<=m;++i){ cin>>d[i]; } d[++m]=n; cin>>r>>g; sort(d+1,d+m+1); for(int i=m;i>=1;--i)d[i]=d[i]-d[i-1]; int L=N*M,R=N...
ALGO
0.999906
3.206318
583a2c36-6487-429a-b2a2-d4b85272b845
Alberto-MeloL/EstudandoFlutter
FlutterCurso/ola_mundo_flutter/sorteio/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.997398
6.76073
f28aa57e-8193-47dd-be3b-0b20d61029af
jstatlab/packageC
src/distributions.cpp
#include <packagec_arma.h> //' @title Generate Random Wishart Distribution //' @description Creates a random wishart distribution when given degrees of freedom and a sigma matrix. //' @param df An \code{int}, which gives the degrees of freedom of the Wishart (df > 0). //' @param S An \code{matrix} with dimensions m x ...
ALGO
0.995349
5.921176
30274983-9e26-48b1-87a9-70f27440dedb
trhgquan/CPP
sth_else/MISC/SUMPOS.cpp
/** * SUMPOS - https://codechef.com/LTIME92C/problems/SUMPOS * Codechef January Lunchtime Division C - 2021. * * Code by @trhgquan - https://github.com/trhgquan */ #include<bits/stdc++.h> #define longint int64_t using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); // Solution goes...
ALGO
0.999887
5.641008
8f5fd3c5-b439-404c-8cb7-71d07c17efe7
AmiriShavaki/competitive-programming
contests/icpc/L.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int32_t main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; int pos_cnt = 0, neg_cnt = 0; while(n--) { int a_i; cin >> a_i; pos_cnt += a_i >= 0; neg_cnt += a_i < 0; } cout...
ALGO
0.99998
4.722527
018e4785-5067-47bd-a9a4-ff3ddce6aeed
R0LEX7/DSA-
Trees/Binary Trees/863_Leetcode.cpp
#include <bits/stdc++.h> #include<unordered_map> #include <queue> // 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 { private: void markParents(TreeNode* root, unordere...
ALGO
0.999999
6.231957
43095d70-6c94-437a-a2fb-a815ff7237ad
880066/algorithms
projecteuler0029_performance.cpp
#include <iostream> #include <math.h> using namespace std; int main(void) { int a = 100, b=100, count=0,total; total = ((a-2)+1) * ((b-2)+1); for(int i = 2; i<= sqrt(a) ; i++) { for(int j = 3; pow(i,j) <= a ;j++) { if(pow(i,j)<=a) { count+=((((b-(b % j))/j)-2)+1); } } } count+...
ALGO
0.998541
3.9498
ae9d35c7-0612-4919-bae5-7b99ee791842
xmg2024/Leetcode-Solutions
2001-2500/2473-Minimum-Cost-to-Buy-Apples/cpp-2473/main.cpp
/// Source : https://leetcode.com/problems/minimum-cost-to-buy-apples/description/ /// Author : liuyubobobo /// Time : 2022-11-28s #include <iostream> #include <vector> #include <list> #include <queue> using namespace std; /// Dij /// Time Complexity: O(V^2*logE + V^2) /// Space Complexity: O(V^2) class Solution {...
ALGO
0.999801
5.443428
644d0ad8-32e7-45f0-8ac2-3205ee9a9940
VinayakJamadar/DSA
Tree/Lect 21 Vertical Order Traversal of Binary Tree/code.cpp
// Problem: Vertical Order Traversal of Binary Tree // Tree // 1 // / \ // 2 3 // / \ / \ // 4 10 9 10 // \ // 5 // \ // 6 // VerticalOrder: [ // [4], // [2, 5], // [1, 9, 10, 6], // [3], // [10] // ] // Time Complexity: O(n*log(n...
ALGO
0.999985
6.288195
e95bf8c3-f73b-4e99-a065-d4380b9fb437
hargunmujral/Competitive-Programming
validate-stack-sequences.cpp
class Solution { public: bool validateStackSequences(vector<int> &pushed, vector<int> &popped) { stack<int> s; const int n = popped.size(); int iter = 0; for (const int &i : pushed) { s.push(i); while (s.size() && iter < n && s.top() == popped[iter...
ALGO
0.999101
6.2819
cf27e68f-8a10-43cf-ad04-ca643a4fa346
pratyushpanda91/Leetcode_DCC
2025/May/12_2094. Finding 3-Digit Even Numbers.cpp
class Solution { public: vector<int> findEvenNumbers(vector<int>& digits) { vector<int> mpp(10, 0); for (int i = 0; i < digits.size(); i++) mpp[digits[i]]++; vector<int> res; for (int i = 1; i <= 9; i++) { if (mpp[i] == 0) continue; mpp[i]--; ...
ALGO
0.999726
6.29221
d22d7bf3-ddd3-4752-9387-44b5cdf93ac6
mrcirniko/OS_labs
lab4/src/lib1.cpp
#include "lib.hpp" extern "C" int PrimeCount(int a, int b) { int count = 0; bool flag = true; for (int i = a; i <= b; ++i) { if (i <= 1) { continue; } for (int j = 2; j < i; ++j) { if (i % j == 0) { flag = false; break; ...
ALGO
0.99399
3.703844
05fdbec6-f6e5-4d35-b1c2-72dcdd5d1ad7
Tariqul-huda/CP-problem
Codeforces/B_Counting.cpp
#include "bits/stdc++.h" using namespace std; #define max(a, b) (a < b ? b : a) #define min(a, b) ((a > b) ? b : a) #define mod 1e9 + 7 #define FOR(a, c) for (int(a) = 0; (a) < (c); (a)++) #define FORL(a, b, c) for (int(a) = (b); (a) <= (c); (a)++) #define FORR(a, b, c) for (int(a) = (b); (a) >= (c); (a)--) #define INF...
ALGO
0.999757
3.206037
9bd0040f-5878-4595-a746-8c2d17937db5
201851019-iiitv/CPP-WorkSpace-
c++ file/GN.cpp
// Created by Ambesh kumar #include "bits/stdc++.h" //I already compile this file in my computer system to save the time //if get the compiler error then you should change this header to // #include "bits/stdc++.h" ---> #include <bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define fo(i, n) for (...
ALGO
0.999993
4.890947
12b9ecb5-b37f-4eee-a281-c0852dea8281
appiniakhil/Leetcode_solutions
solutions/0118-Pascal's Triangle.cpp
class Solution { public: //Time Complexity :O(n*n) && Space Complexity :O(n*n) vector<vector<int>> generate(int numRows) { vector<vector<int>> dp(numRows); dp[0].push_back(1); for(int i=1;i<numRows;i++) { for(int j=0;j<=i;j++) { if(j == 0...
ALGO
0.99999
5.622332
89f74a81-b9e6-48f9-83cb-7b556715a06b
maeth2/Leetcode
easy/find_mode_in_binary_search_tree.cpp
#include <iostream> #include <cstring> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <queue> using namespace std; using ll = long long; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(in...
ALGO
0.999993
4.61632
0258efdd-ad0e-4d53-9101-e19539be585d
za233/Polaris-Obfuscator
src/lldb/test/API/functionalities/process_save_core_minidump/main.cpp
#include <cassert> #include <iostream> #include <thread> void g() { assert(false); } void f() { g(); } size_t h() { size_t sum = 0; for (size_t i = 0; i < 1000000; ++i) for (size_t j = 0; j < 1000000; ++j) if ((i * j) % 2 == 0) { sum += 1; } return sum; } int main() { std::thread t1(...
TEST
0.951986
4.76661
a170115f-8198-4e83-bb65-52cecd15c7a7
fatemehakbary82/-1
tarkib1.cpp
#include <iostream> using namespace std; int tarkib(int n , int r) { if (r==0 || r==n) return 1; else return tarkib(n-1 , r-1)+tarkib(n-1 , r); } int main() { int n,r; cout<<"Enter n : "; cin>>n; cout<<"Enter r:"; cin>>r; if(n<r) { cout<<"n shoud biger tha...
ALGO
0.999708
4.82874
4a5de6e4-78df-40bf-8075-25079f6d3fdb
todorkermedchiev/SDA
homeworks/hw2/hw2-task1.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { int count; cin >> count; int* numbers = new int[count]; int* result = new int[count]; for (int i = 0; i < count; ++i) { cin >> numbers[i]; } int counter...
ALGO
0.999654
4.741214
b2762f9c-df22-4e99-bca3-8a03fa22acb8
user992199/ISA_Practice
22-03/sieve.cpp
#include<iostream> #include<vector> #include<cmath> using namespace std; void sieve(int n1, int n2){ vector<bool> v(n2+1, true); v[2] = true; for(int i = 2; i <= sqrt(n2); i++){ if(v[i]){ for(int mult = i * i; mult <= n2; mult += i){ v[mult] = false; } } } for(int i = n1; i <= n2; i++){ if(v[i]) co...
ALGO
0.998942
3.985642
b763bfcc-7988-41cc-8fd6-940c7c4b64c5
soulaim/worldofapo
src/physics/octree.cpp
#include "octree.h" Octree::Octree(Location _bot, Location _top, int _depth): top(_top), bot(_bot), hasChildren(false), depth(_depth), n(0) { center = (top + bot)/2; } void Octree::split() { for(int x = 0; x < 2; ++x) { FixedPoint bot_x; FixedPoint top_x; if (x == 0) { bot_x = bot.x; top_x = center...
ALGO
0.974401
5.754248
1295f8c5-4a1b-4bd7-aad4-575606b5733c
l236/algorithm
chapter6/next.cpp
#include <cstdio> #include <algorithm> //Include next_permutation api. using namespace std; int main() { int n, p[10]; scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d", &p[i]); sort(p, p + n); do { for (int i = 0; i < n; i++) printf("%d ", p[i]); // Output th...
ALGO
0.999945
4.598288
c01bf50e-28fd-4b2f-8264-e57e8da8c1ef
Mahesh22500/cp-templates
D_Weights_Assignment_For_Tree_Edges.cpp
#include<bits/stdc++.h> using namespace std; #define int long long const int N=1e3+5; const int M=998244353; int32_t main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); int tt; cin>>tt; while(tt--){ int n; cin>>n; vector<int>b(n+1); for(int i=1;i<=n;i++) cin>>b[i]; vector<int>p(n+1); for(int i=1;i<=n;i++...
ALGO
0.999873
4.323221
a4c4d013-aa0b-49d2-bed4-823f9ab1c6cb
nelsonvergara/mangos
dep/src/g3dlite/GImage_bayer.cpp
/** @file GImage_bayer.cpp @author Morgan McGuire, http://graphics.cs.williams.edu @created 2002-05-27 @edited 2006-05-10 */ #include "G3D/platform.h" #include "G3D/GImage.h" namespace G3D { void GImage::BAYER_G8B8_R8G8_to_Quarter_R8G8B8(int width, int height, const uint8* in, uint8* out) { debugAssert(...
ALGO
0.927149
6.124008
4315f02c-6dc8-4d44-a629-1ac4f5547d35
frextrite/Data-Structures-Algorithms-Hacktoberfest-2K19
Data Structures/Binary Tree/C++/NodesBetweenTwoLevels.cpp
//Nodes between two given levels #include<bits/stdc++.h> using namespace std; struct node { int key; struct node *left, *right; }; // A utility function to create a new BST node struct node *newNode(int item) { struct node *temp = (struct node *)malloc(sizeof(struct node)); temp->key ...
ALGO
0.999843
4.426216
b6f86de9-ef72-4fad-b244-cb6758a08db3
kashishpratap9/DSA
2265-partition-array-according-to-given-pivot/partition-array-according-to-given-pivot.cpp
class Solution { public: vector<int> pivotArray(vector<int>& nums, int pivot) { vector<int>temp(nums.begin(), nums.end()); vector<int>left; vector<int>p; vector<int>right; for(int i=0;i<nums.size();i++){ if( nums[i]< pivot) left.push_back( nums[i])...
ALGO
0.999977
5.805044
71605520-582f-443a-8fe4-966e228ed4cb
goguma1000/programmers_codingtest
baekjoon/data_structure/2493[ํƒ‘].cpp
#include <iostream> #include <vector> #include <stack> using namespace std; int main() { std::ios::sync_with_stdio(false); std::cin.tie(NULL); std::cout.tie(NULL); int n; cin >> n; vector<int> heights(n); vector<int> result(n, 0); for (int i = 0; i < n; i++) { cin >> heights[i]; } stack<int> s; s.push(n - ...
ALGO
0.999997
4.846377
199e4100-6fb7-45b6-b6a0-566d7dc3cad1
Shipu8644/Common-problems-of-UVA
12019 - Doom's Day Algorithm.cpp
#include <stdio.h> char week[7][10] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}; int total[13] = {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365}; int main() { int n, m, d; while (~scanf("%d",&n)) while (n --) { scanf("%d%d",&m,&d); puts(week[(total[m-1]+...
ALGO
0.999805
3.556248
c7242c3b-195b-4a57-a199-d6d8ef9ced38
stikhead/mindgym
codeforces/B/1367B.cpp
#include<bits/stdc++.h> using namespace std; void parityCheck(int b){ int odd = 0, even = 0, temp; for(int i=0; i<b; i++){ cin >> temp; if(i%2==0 && temp%2!=0){ even++; } if(i%2!=0 && temp%2==0){ odd++; } } if(odd==even){ cout<<even...
ALGO
0.999647
4.541122
7d0e8e03-9082-4ac0-874a-e0aecdd048a1
qeuete/cplus8
DynamicLib/DynamicLib.cpp
#include "Header.h" #include <string> #include <algorithm> using namespace std; extern "C" { __declspec(dllexport) bool checkFunction(const char* str, const char* chars) { string str_s(str); string chars_s(chars); return std::all_of(chars_s.begin(), chars_s.end(), [&str_s](char c) { ...
TOOL
0.934199
4.861746
eb733220-5de3-4239-b46a-82cf2f513e20
anuragbansals/Cpp-Programs
DP/targetSum.cpp
#include<bits/stdc++.h> using namespace std; int main() { freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); int n,k; cin>>n; int a[n]; for(int i=0;i<n;i++) cin>>a[i]; cin>>k; bool res[n+1][k+1]; for(int i=0;i<=n;i++) res[i][0] = true; for(int ...
ALGO
0.999995
3.850696
c4362b26-ebe9-4ce7-af74-dd7f1bfe2114
bashirafarhin/leetcode-potd
1753-path-with-minimum-effort/path-with-minimum-effort.cpp
class Solution { public: int minimumEffortPath(vector<vector<int>>& heights) { int R=heights.size(); int C=heights[0].size(); vector<vector<int>>dist(R,vector<int>(C,1e9)); dist[0][0]=0; int dx[]={-1,0,1,0}; int dy[]={0,1,0,-1}; priority_queue<pair<int,pair<in...
ALGO
0.999961
6.051676
76a5f3fd-4ef4-49c4-a1f1-04ac3c9abe04
Saifu0/Competitive-Programming
CP/1500/hoof_paper_scissors.cpp
// ----- In the name of ALLAH, the Most Gracious, the Most Merciful ----- #include<bits/stdc++.h> using namespace std; void __print(int x) {cerr << x;} void __print(long x) {cerr << x;} void __print(long long x) {cerr << x;} void __print(unsigned x) {cerr << x;} void __print(unsigned long x) {cerr << x;} void __print...
ALGO
0.999923
3.574586
7219802d-d131-4ef9-a0cf-2486b0cc57dc
Saksham-Aggarwal-1/Leetcode-problems
79-word-search/79-word-search.cpp
class Solution { public: bool solve(vector<vector<char>>& board, string word, int x, int y, int i) { if(i == word.length()) return true; if(x<0 || y<0 || x >= board.size() || y>= board[0].size()) return false; if(board[x][y] != word[i]) return...
ALGO
0.999832
6.233325
d95e799a-6634-443a-942a-f48a99716a4c
DevaranjanaaS/Leetcode
1797-goal-parser-interpretation/goal-parser-interpretation.cpp
class Solution { public: string interpret(string command) { string ans=""; for(int i=0;i<command.size();i++){ if(command[i]=='G'){ ans+='G'; } else if(command[i]=='(' && command[i+1]==')'){ ans+='o'; i++; ...
ALGO
0.998378
4.859144
b1a65ae7-7eb9-478e-aa21-cf3c23c87327
TerryAlu/Apriori-FPG
ibm_datagen/poidev.cpp
#include <math.h> #include "dist.h" #define PI 3.141592654 float PoissonDist::poidev(float xm) // Returns as a floating-point number an integer value that is a // random deviate drawn from a Poisson distribution of mean xm, using // ran1(idum) as a source of uniform random deviates. { //float gammln(float xx); flo...
ALGO
0.999809
4.073329
05ceb532-100b-4aff-abdb-4c61684d61dc
eddyrene/bio-lab
LAB 10/progEvolutive.cpp
#include <iostream> #include <vector> #include <string> #include <cmath> #include <algorithm> #include <cstdlib> #include <list> using namespace std; typedef struct { string cadena; bool active=false; }estado; typedef struct { vector<estado> vectEstados; double fit=0; int inicial=0; vector<int> VA; string ou...
ALGO
0.999983
3.248992
8d126666-1a0f-41f0-baa2-9557cf431c7d
hmit/codedump
fractionToDecimal.cpp
/* * Solution to https://oj.leetcode.com/problems/fraction-to-recurring-decimal/ */ #include <cstdlib> #include <cstdio> #include <iostream> #include <map> #include <vector> #include <string> #include <sstream> using namespace std; class Solution { typedef long long int NType; typedef vector< NType > NList; ...
ALGO
0.999699
5.638216
fea8e05e-09e3-48eb-a04e-6c503efffff6
nimashoghi/gem5
src/systemc/tests/systemc/misc/unit/data/datawidth_signed/promote_extension/datawidth.cpp
/***************************************************************************** datawidth.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**************************************************************************...
ALGO
0.985257
5.296924
d54aa225-2414-4db3-b755-b151c7a9c3c3
tienit150198/ACM
Contest/bkdnMath2/M2_5/main.cpp
#include <bits/stdc++.h> #define ll long long int #define Max 1000007 #define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); using namespace std; ll a[Max]; void sieve() { for(ll i = 1 ; i <= Max ; i++) a[i]++; for(ll i = 2 ; i <= Max ; i++) { a[i]++; for(ll j = i*2 ; j <= ...
ALGO
0.999792
3.720073
f4ebf0db-23ae-469d-84f0-8189653e71a5
Tanvin2442002/Code-Forces
B_Mahmoud_and_Ehab_and_the_bipartiteness.cpp
#pragma GCC optimize("O3") #include <bits/stdc++.h> #ifndef ONLINE_JUDGE #include "F:\Codeforces\debug.h" #else #define dbg(x...) #define dbgc(x...) #endif using namespace std; #define ll long long #define float long double #define vf(v) (v).begin(), (v).end() #define vr(v) (v).rbegin(), (v).rend() #define endl "\n" ...
ALGO
0.999082
5.030979
e5d9345f-7ba9-4c08-9aad-d283a78d4f87
jaredramey/AutomationTest_Playground
Engine/Source/Developer/NaniteBuilder/Private/NaniteDisplace.cpp
#include "Components.h" #include "DisplacementMap.h" #include "Affine.h" #include "LerpVert.h" #include "AdaptiveTessellator.h" #include "Math/Bounds.h" #include "Engine/EngineTypes.h" #include "Engine/Texture2D.h" namespace Nanite { static FVector3f GetDisplacement( const FVector3f& Barycentrics, const FLerpVert& ...
ALGO
0.910976
7.800528
f0f8ae05-a5a2-4319-8455-18ad784730de
linhanyu/ACM
2013_Sichuan/UESTC837.cpp
//// //// Created by Henry on 16/11/27. //// #include <cstdio> const int MAXN = 100000 + 10; int A[MAXN]; int n,t,ans; int main(){ scanf("%d",&t); for (int cases = 1; cases <= t ; ++cases) { ans = 1; printf("Case #%d: ",cases); scanf("%d",&n); for (int i = 0; i < n; ++i) {...
ALGO
0.999224
3.561066
af370dd8-cb92-4f73-a5d2-f24b23b9fad9
skynetit123/flutter_skynetcode
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
c6509bbc-60de-4fde-b5bf-8e7789e2c920
Yash-Desh/ECE752_Project
Intel_Pin/source/tools/SimpleExamples/opcodemix.cpp
/*! @file * This file contains a static and dynamic opcode mix profiler */ #include <vector> #include <iostream> #include <iomanip> #include <fstream> #include <unistd.h> #include "pin.H" #include "control_manager.H" using namespace CONTROLLER; /* =================================================================...
TOOL
0.962053
6.629904
9ecc1e71-9e82-40f5-aa34-5aca2088eabf
imshakibhasan/my-algorithms
codeforce/plus_or_minus.cpp
/** * @file plus_or_minus.cpp * @author Shakib Hasan (<EMAIL>) * @brief * @version 0.1 * @date 2023-03-19 * * @copyright Copyright (c) 2023 * Problem : https://codeforces.com/contest/1807/problem/A */ #include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while (t--) { i...
ALGO
0.999935
5.372207
e5d0c132-eae1-42d3-b4a2-803edefe6922
safiullah-foragy/Data-structure-implementation
Tower_of_hanoy_non_recursive.cpp
#include <bits/stdc++.h> using namespace std; void towerOfHanoi(int N, char BEG, char AUX, char END) { stack<tuple<int, char, char, char, int>> st; int step = 1; // Initial push of parameters to the stack st.push(make_tuple(N, BEG, AUX, END, step)); while (!st.empty()) { tie(N, BEG, AUX...
ALGO
0.99999
6.063003