uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
34f03c43-b6a4-4daf-bd9b-03c0bf6eb9a8
Iryna888/Discrete_models_2
Lab2.cpp
#include <conio.h> #include <iostream> #include <fstream> using namespace std; #define N 8 #define K 100000 int read_matrix(int matr[N][N]) { ifstream in("matrix.txt"); if (in.is_open()) { //Зчитування матриці з файла for (int i = 0; i < 8; i++) for (int j = 0; j < 8; j++) in >> matr[i][j]; //Вивід ...
ALGO
0.999654
3.429525
4f702602-d88d-4b94-a4a7-7bd4616f5613
bfeng/CryptoGRU
third_party/cryptoTools/thirdparty/linux/boost/libs/math/example/students_t_single_sample.cpp
#ifdef _MSC_VER # pragma warning(disable: 4512) // assignment operator could not be generated. # pragma warning(disable: 4510) // default constructor could not be generated. # pragma warning(disable: 4610) // can never be instantiated - user defined constructor required. #endif #include <boost/math/distributions/st...
ALGO
0.851624
6.199037
72fb26fa-d750-4f0b-a4aa-4519e33f7d94
h3136514/Algorithm
baekjoon/greedy/3621.cpp
#include <iostream> using namespace std; int N, D, a, sum, num[100001]; // 족보 int main(){ cin >> N >> D; for(int i = 0; i < N; i++){ cin >> a; num[a]++; } for(int i = 0; i <= N; i++){ if(num[i] > D){ sum += (num[i] - 2) /(D -1); } } cout << sum << ...
ALGO
0.999836
3.491857
a66f2378-65b2-4093-b54a-ea9316b81e36
JohnVlBetter/LeetCode
62.不同路径.cpp
/* * @lc app=leetcode.cn id=62 lang=cpp * * [62] 不同路径 */ // @lc code=start class Solution { public: int uniquePaths(int m, int n) { vector<vector<int>> map(m, vector<int>(n)); for (int i = 0; i < m; ++i) map[i][0] = 1; for (int j = 0; j < n; ++j) map[0][j] = 1; for (int i = 1; i...
ALGO
0.994432
5.83701
a42ffe31-a27c-44f0-8533-4659e5508020
ica1010/MyShop
my_shop_mobile/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.998503
6.76775
ee4ef268-2b18-4949-9f27-ae051ade549d
DuyMinh0102/My_Work
String - 16-10-2024/str_a19/str_a19.cpp
#include <bits/stdc++.h> using namespace std; string x, y; int cnt = 0; bool valid = true; int main() { getline(cin, x); getline(cin, y); for (int i = 0; i <= y.size()-1; i++){ valid = true; for (int j = i; j <= i+x.size()-1; j++){ if (j > y.size()-1){ valid = ...
ALGO
0.999856
3.897546
25c9fa7c-0aca-4f7a-aba3-7c717a3c6be9
tom3q/mesa
src/glsl/ir_hv_accept.cpp
#include "ir.h" /** * \file ir_hv_accept.cpp * Implementations of all hierarchical visitor accept methods for IR * instructions. */ /** * Process a list of nodes using a hierarchical vistor. * * If statement_list is true (the default), this is a list of statements, so * v->base_ir will be set to point to each...
ALGO
0.917473
6.35447
7eabb39b-57ca-4fe1-a02e-a3d699e79754
StoneMa/coderepo
数据结构/最大子串和/main.cpp
#include <iostream> #include <stdio.h> #define MAXSIZE 100 using namespace std; int MaxSum(int [],int); int main() { int a[10]; int i=0; while(i < 10){ scanf("%d ",&a[i]); i++; } printf("%d\n",MaxSum(a,10)); return 0; } int MaxSum(int a[],int n) { int b = 0; int sum = 0; ...
ALGO
0.999317
3.341568
fc2e38c7-3dd9-4ae0-94d8-fe0106feab61
Oscar-Cabr/CompetitiveProgramming
Codeforces/800-900/2033B - Sakurako and Water.cpp
/* The following is an original solution to the problem: 2033-B "Sakurako and Water" of Codeforces. Rated difficulty: 900. Language: C++20 (GCC 13-64). This solution isn't secured as "the most efficient one", but it is secured as an Accepted one under the given constraints. Techniques / Topics involved:...
ALGO
0.999884
4.755973
f7e19642-a805-426b-b8b6-ae7c4b6e6776
FirasBDarwish/Practicing-Data-Structures-Algorithms-in-C-
Algorithm Design Implementations/AVL Tree.cpp
/* This is an implementation of an AVL tree using: note: insertNode and deleteNode always take in the root node and return the root node. */ // AVL tree implementation in C++ #include <iostream> using namespace std; class Node { public: int key; Node *left; Node *right; int he...
ALGO
0.999907
5.999882
6435ac4e-8d17-49c4-9e83-117fb895ffbf
gdut-yy/leetcode-hub-java
lanqiao/src/main/java/lq250405/LQ250405T2.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; void solve() { int a, b, c; cin >> a >> b >> c; vector<pair<int, char> > v = {{a, 'l'}, {b, 'q'}, {c, 'b'}}; sort(v.begin(), v.end()); if (v[2].first > v[0].first + v[1].first) { cout << v[2].second << endl; } else {...
ALGO
0.999888
3.846897
e7b52866-4954-4ec3-bd26-cceacafa803e
ishandutta2007/codeforces
leapfrog/normal/1494/B.cpp
#include<bits/stdc++.h> using namespace std; template<typename T>inline void read(T &x) { x=0;char c=getchar(),f=0; for(;c<48||c>57;c=getchar()) if(!(c^45)) f=1; for(;c>=48&&c<=57;c=getchar()) x=(x<<1)+(x<<3)+(c^48); f?x=-x:0; } int Ca,n,U,R,D,L,b[5]; bool chk() { if(U==n-1&&(b[1]==0&&b[2]==0)) return 0; if(U==n&...
ALGO
0.998756
3.780821
f38cbb73-3d7d-4ab1-89e0-0b5ce8b84ef7
Abhinavjha07/InterviewBit
Math/Sum_of_Pairwise_Hamming_Distance.cpp
int Solution::hammingDistance(const vector<int> &A) { long long int sum = 0,mod=1e9+7; for (int i = 0; i < 32; i++) { int count = 0; for (int j = 0; j < A.size(); j++) if ( (A[j] & (1 << i)) ) count++; sum += (count * (A.size() - count) * 2)...
ALGO
0.999967
5.26257
c7e998d3-173f-4531-b95d-69dbf59e1586
richardbwang/Competitive-Programming
BFS/Chess Game.cpp
/* 2. Chess game XJOI - Problem ID: 7906Required Problem100pt(s) The Latest: Accepted 100 pt(s) The Best: Accepted 100 pt(s) Time Limit: 1000ms Memory Limit: 524288kB Description There are 8 black chess pieces and 8 white chess pieces on a 4x4 chessboard. 2 pieces are "neighboring" if their positions share a common ed...
ALGO
0.999909
4.614922
d869d65e-d3c9-48e8-afdf-9a5daef66234
OmNikam04/DSA-and-CP
DSAL_sheet/array/medium/rearraynge_array.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: vector<int> rearrangeArray(vector<int> &nums) { vector<int> temp1, temp2, ans; for (auto i = 0; i < nums.size(); i++) { if (nums[i] > 0) { // even number temp1....
ALGO
0.999982
4.884954
b2db9e60-6669-4648-84b9-dc4b0d653652
Ahnaf-41M/Codeforces_AtCoder
codeforces/1175/A.cpp
#include "bits/stdc++.h" #define ff first #define ss second #define MX 100005 #define pb push_back #define int long long #define PII pair<int,int> #define endl "\n" #define all(v) v.begin(),v.end() #define rep(i,a,b) for(int i = a; i <= ...
ALGO
0.999667
4.049202
7494ce68-5632-4e64-b866-19838e045336
thestupendous/cpp-again
templates/functionTemplates/templateFunction.cpp
#include <iostream> using namespace std; template <typename T> T max_non_std( T x, T y ) { return ( x < y ) ? y : x; } int main() { cout << max_non_std(3,200) << '\n'; cout << max_non_std(5.3,5.63) << '\n'; cout << max_non_std('A','P') << '\n'; cout << max_non_std("compiler","pile") << '\n'; return 0; }
ALGO
0.99762
4.161487
4ef3f214-3f27-435b-b63b-c51e23f4e481
threeal/aoc-space
day-07/puzzle-1.cpp
#include <iostream> #include <queue> #include <string> int main() { long long total{0}; std::string line{}; while (std::getline(std::cin, line)) { std::size_t i{0}; long long test{0}; while (line[i] != ':') { test = test * 10 + line[i] - '0'; ++i; } ++i; while (line[i] < '0...
ALGO
0.999331
5.330297
f8edc8f8-06ad-4804-9514-742006d85483
ishandutta2007/codeforces
maksim1744/normal/1136/A.cpp
/* 13.03.2019 20:35:09 */ #include <bits/stdc++.h> using namespace std; #ifdef HOME #define TAG_LENGTH 45 #define LR_LEFT left #define LR_RIGHT right #define LR_VALUE value #define LR_SECOND_VALUE mn #include "C:/C++ libs/print.cpp" #define showl cout << endl; #define shows cout << string(5, ' ') + string(TAG_LE...
ALGO
0.999947
4.300311
faf5e1a3-c49c-4c57-a275-c604995c384d
Bill-Gray/lunar
vislimit.cpp
/* The computations for sky brightness and limiting magnitude can be logically broken up into several pieces. Some computations depend on things that are constant for a given observing site and time: the lunar and solar zenith distances, the air masses to those objects, the temperature and relative humidity, and so ...
ALGO
0.998635
7.26154
3c0bcef6-36d3-4140-a569-813625563244
Alvinsjq/LiCo_Exam
pro98.cpp
#include <iostream> #include <limits.h> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; /** *1. 若任意节点的左子树不空,则左子树上所有结点的值均小于它的根结点的值; *2. 任意节点的右子树不空,则右子树上所有结点的值均大于它的根结点的值; *3. 任意节点的左、右子树也分别为二叉查找树。 *4. 没有键值相等的节点(no ...
ALGO
0.999994
5.241606
90458c29-676e-4f23-bd81-0c3bedee6372
Navneet7716/placement
array/Arrays/stockbuyandsell.cpp
#include<bits/stdc++.h> using namespace std; int main() { int arr[] = {1, 5, 3, 8, 12}; int n = 5; int profit = 0; for(int i=1;i<n;i++) { if (arr[i] > arr[i-1]) { profit += arr[i] - arr[i-1]; } } cout << profit; }
ALGO
0.999674
3.868993
e65288c1-0402-43e4-a59e-bc211b30f3a0
Tanay1805/cpp_lab_manual_29
Q7_29.cpp
// Write a program to find the sum of digits of a number until it becomes a single- // digit number. #include <iostream> using namespace std; int main(){ int n,z,x,sum=0; cout<<"Enter the Number:"; cin>>n; start: if(n>0){ z=n%10; x=n/10; sum=x+z; if(sum>10){ ...
ALGO
0.999891
6.384487
e8673982-3a77-48ac-84c9-0c46ed34a7eb
fmorenovr/ComputerScience_UCSP
MCC203-Computacion_Grafica/Trabajo_2_Fast-Winding-Numbers/fast-winding-number-soups/libigl/python/py_igl/py_cotmatrix.cpp
m.def("cotmatrix", [] ( const Eigen::MatrixXd& V, const Eigen::MatrixXi& F, Eigen::SparseMatrix<double>& L ) { return igl::cotmatrix(V,F,L); }, __doc_igl_cotmatrix, py::arg("V"), py::arg("F"), py::arg("L"));
ALGO
0.997125
5.819284
18f21f20-f920-4e06-88cf-154cc4664b6f
sid620/CSES
dp/coincombinations1.cpp
#include<bits/stdc++.h> using namespace std; #define MAX 1000000007 typedef long long int LL; int main(){ LL n,x; cin>>x>>n; vector<LL>dp(1000001,0); vector<LL>c(x,0); for(LL i=0;i<x;i++){ cin>>c[i]; } sort(c.begin(),c.end()); dp[c[0]]=0; for(LL i=1;i<=n;i++){ for(LL j=0;j<x;j++){ if(i>c...
ALGO
0.999992
3.661294
6292c17e-1f78-4809-9468-2401dc922795
nm-marques/FEUP-PROG
Crosswords Puzzle/Windows/cwcreator/verifications.cpp
/*Turma 8, Grupo 1, Trabalho 2 Parte 1(cwcreator) Nuno Miguel Fernandes Marques Ricardo Jorge de Arajo Ferreira */ #include "verifications.h" using namespace std; //Return whether the word is a simple word(A-Z) or not bool simpleWord(string word) { if (word.empty()) return false; for (size_t i = 0; i < word.le...
TOOL
0.915119
4.935887
d95f4900-1055-4376-9f8e-baa91404eb44
jnelson6/ALGORITHMS
Cs385/pa5/untitled.cpp
/******************************************************************************* * Name : inversioncounter.cpp * Author : Juila Nelson * Version : 1.0 * Date : October 25, 2019 * Description : Counts the number of inversions in an array. * Pledge : I pledge my honor that I have abided ...
ALGO
0.9998
4.991032
a5dbf526-d4f4-47ac-bf15-489da0e069a2
kamilszymczak1/my_solutions
cf/contests/1392/c.cpp
#include <iostream> #define MAX_N 200000 using namespace std; int arr[MAX_N]; int main() { ios_base::sync_with_stdio(0); int t, n; cin >> t; for(int k = 0; k < t; k++) { cin >> n; for(int i = 0; i < n; i++) cin >> arr[i]; long long result = 0; for(int...
ALGO
0.999946
3.909891
5b44874f-a79a-45e2-9557-618819d68e27
ducphanduyagentp/vbox-svn
src/VBox/Runtime/common/crypto/pkcs7-sign.cpp
/* $Id$ */ /** @file * IPRT - Crypto - PKCS \#7, Signing */ /********************************************************************************************************************************* * Header Files ...
TOOL
0.872819
7.691845
c3964e50-f95d-4fd8-a21f-1cf0dd97d60e
alexandraback/datacollection
solutions_5670465267826688_1/C++/zhj/C.cpp
#include<bits/stdc++.h> #define int64 long long #define sqr(x) (x)*(x) #define mk make_pair #define pb push_back #define fi first #define se second #define rep(i,x,y) for(int i=x;i<=y;++i) #define VI vector<int> #define VI64 vector<int64> #define VS vector<string> #define PII pair<int,int> #define PDD pair<double,doubl...
ALGO
0.999927
3.535257
d9e83713-42ce-4259-8dd1-2120e9a29988
strengthen/LeetCode
C++/253.cpp
__________________________________________________________________________________________________ class Solution { public: int minMeetingRooms(vector<Interval>& intervals) { map<int, int> m; for (auto a : intervals) { ++m[a.start]; --m[a.end]; } int rooms = 0...
ALGO
0.999993
6.197299
8d867a79-dc1c-47a3-85ac-de43031121ff
rizalkhairan/Tucil2_13523063
src/quadtree.cpp
#include "quadtree.hpp" #include "image.hpp" /* QuadTreeNode */ QuadTreeNode::QuadTreeNode() : rowStart(0), colStart(0), rowEnd(0), colEnd(0), averageR(0), averageG(0), averageB(0), error(0), isDivisible(true), isLeaf(true) { for (int i = 0; i < 4; i++) { children[i] = nullptr; } } QuadTreeNod...
ALGO
0.999139
6.317003
97e9deb3-d656-49a1-8b0d-08653a52a9e5
jiturajsharma/C_plush_plush_In_Class
Loops/Loops2/QuestionOperators/SumOfdigit.cpp
// WAP to print sum of digits of a given number #include<iostream> using namespace std; int main(){ int n; cout<<"Enter the number : "; cin>>n; int lastDigit = 0; int sum = 0; while(n>0){ lastDigit = n%10; sum +=lastDigit; n/=10; } cout<<sum; }
ALGO
0.999138
4.7105
005995eb-f2fa-44fa-940a-bbd2794895ea
Vdtpro/DSA
Cây nhị phân/Delete/B17.cpp
#include<bits/stdc++.h> using namespace std; using ull = unsigned long long; using ll = long long; #define file() freopen("Test2.inp", "r", stdin); freopen("Test2.out", "w", stdout); #define faster() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define pq_min priority_queue<int, vector<int>, greater<int>> #d...
ALGO
0.999986
4.482829
3dba9d89-230d-46a1-88d9-35b124c78f74
mtkinverse/DS
Sorting Algorithms/ShellSort.cpp
#include<iostream> using namespace std; template <class t> void printArray(t arr[],int n){ for(int i=0;i<n;i++) cout<<arr[i]<<" "; cout<<endl; } template <class t> void ShellSort(t arr[],int size){ for(int interval = size; interval>0 ; interval/=2){ for(int i=interval;i<size;i++){ int...
ALGO
0.999845
5.062263
c585c690-6cd1-479e-ada7-eac83f9d19f6
mukuldeep/cs
cp/CSES/cses_1637_wrong.cpp
// // Created by me on 07-04-2021. // #include <bits/stdc++.h> #define SYNC ios_base::sync_with_stdio(false); cin.tie(nullptr); #define DRIVER int main(){SYNC ll t=1;W_(t)soln(t);return 0;} #define TEST_DRIVER int cc_main(){SYNC ll t=1;W_(t)soln(t);return 0;} #define FR_(a,c) for (ll (a)=0;(a)<(c); (a)++) #define FR_...
ALGO
0.999334
3.88688
13668e6f-1a29-4647-81fc-f67519eccee4
burakcoskun/programming_contests
codeforces/educational_181/C/soln.cpp
#include <bits/stdc++.h> using namespace std; long long bad(long long x) { long long res = 0; res += (x/2 + x/3 + x/5 + x/7); res -= (x/(2*3) + x/(2*5) + x/(2*7) + x/(3*5) + x/(3*7) + x/(5*7)); res += (x/(2*3*5) + x/(2*3*7) + x/(2*5*7) + x/(3*5*7)); res -= (x/(2*3*5*7)); return res; } int mai...
ALGO
0.999884
4.329107
fe90b33f-e51c-46c6-b140-7ec8ca39fa2a
Fusion-OS/frameworks_native
services/surfaceflinger/layerproto/LayerProtoParser.cpp
#include <android-base/stringprintf.h> #include <layerproto/LayerProtoParser.h> #include <ui/DebugUtils.h> using android::base::StringAppendF; using android::base::StringPrintf; namespace android { namespace surfaceflinger { bool sortLayers(LayerProtoParser::Layer* lhs, const LayerProtoParser::Layer* rhs) { uint...
TOOL
0.959811
7.071126
02668b7f-4806-4166-b48c-8b9fd5cae678
tayu0110/atcoder
arc142/c.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int root = 3; int dist[110]; for (int i = 1; i <= n; i++) { dist[i] = 0; if (i == root) { continue; } cout << "? " << root << " " << i << endl; int d; cin >> d; if (d < 0) { return 0; } dist...
ALGO
0.999944
3.468309
3de4334a-bdab-48b3-9afa-2f05e52ee082
Wulonghua/PhyBS
3rd/eigen/doc/examples/tut_arithmetic_scalar_mul_div.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { Matrix2d a; a << 1, 2, 3, 4; Vector3d v(1,2,3); std::cout << "a * 2.5 =\n" << a * 2.5 << std::endl; std::cout << "0.1 * v =\n" << 0.1 * v << std::endl; std::cout << "Doing v *= 2;" << std::endl; v *= 2; std::cout << ...
ALGO
0.989503
3.669638
9b47a2dc-6926-4b5c-bcb6-d29cad59923e
Karma-1710/DSA_Cpp
Graphs/04_Kruskal_Algorithm.cpp
#include<iostream> #define V 7 #define I 32767 #define E 9 using namespace std; void Union(int u, int v, int S[]){ if(S[u] < S[v]){ S[u] = S[u] + S[v]; S[v] = u; }else{ S[v] = S[v] +S[u]; S[u] = v; } }; int Find(int u, int S[]){ int x = u; while(S[x] > 0){ x...
ALGO
0.999953
4.506406
65efb177-f70d-4601-96fc-af27be9f24a8
EmeraldMiningCo/Ebits
src/miner.cpp
#include <miner.h> #include <amount.h> #include <chain.h> #include <chainparams.h> #include <coins.h> #include <consensus/consensus.h> #include <consensus/tx_verify.h> #include <consensus/merkle.h> #include <consensus/validation.h> #include <hash.h> #include <key_io.h> #include <validation.h> #include <masternode.h> #...
ALGO
0.9953
5.283387
9cf84c5c-4ad0-4832-9bb5-811c55f5f53a
sarvex/leetcode-crystal
solution/0100-0199/0102.Binary Tree Level Order Traversal/Solution.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.999984
6.456469
273ba005-30dd-4f38-8273-a8dbad560055
rueey/Solutions
pulse.cpp
#include <bits/stdc++.h> using namespace std; #define pii pair<int,int> #define mp make_pair #define pb push_back int INFINITE = 0x3f3f3f3f; int N, S, T; int main(){ freopen("input.txt", "r", stdin); scanf("%i%i%i", &N, &S, &T); int c = N; for(int i = 0; i < N; i++){ int a; scanf("%i", &a); if(2*a < S || 2*...
ALGO
0.999917
3.500599
8f14bdd5-e75f-4e82-b862-6f3209e31b79
SuperMiro0809/Introduction-to-programming-FMI-All-Problems
Sem. 05/Pract.05/zad10.cpp
#include <iostream> using namespace std; int pow(int a, int b) { int result = 1; for (int i = 0; i < b; i++) { result *= a; } return result; } int getLastDigitsOfNumber(int& num, int k) { int result = 0; for (int i = 0; i < k; i++) { int digit = num % 10; if...
ALGO
0.999785
4.11301
683484ca-a8e5-4465-9d17-da1001c2342a
utupointko/hacker-rank-problems
modified-kaprekar-numbers.cpp
bool isKapreker(int n) { if (n == 1) return true; int d = to_string(n).length(); long sq = (long)n * (long)n; string s = to_string(sq); int len = s.length(); if (len == 1) return false; string l = s.substr(0, s.length() / 2); string r = s.substr(s.length() / 2); ...
ALGO
0.997816
5.3221
c768a0dd-a185-4947-b556-0fe3a04e67c1
satya117/DSA_CPP
arrays/max.cpp
/*Search for the max ele in an array*/ #include<iostream> using namespace std; int max(int arr[],int n) { int max = INT_MIN; int i; for(i=0;i<n;i++){ if(arr[i]>max){ max = arr[i]; } } return max; } int main(){ int n; cout<<"Enter size of ele: "<<endl; ci...
ALGO
0.997305
3.838691
364291c0-d5f8-4190-ba20-87b1840376fb
Yuvraj02/Data-Structures-and-Algorithms
Linked List/remove_cycle.cpp
#include <iostream> using namespace std; class Node{ public: int data; Node *next; Node(int val){ this->data = val; this->next = NULL; } }; void insertAtTail(Node* &tail, int val){ Node *newNode = new Node(val); tail->next = newNode; tail = newNode; } void pr...
ALGO
0.999913
4.805088
1b3acbad-171b-4f62-bfc0-976d738bb080
lueasf/DSA
6_Bitmanip/C++/lc1863.cpp
#include <vector> using namespace std; class Solution { public: int subsetXORSum(vector<int>& nums) { vector<int> res; dfs(0, nums, {}, res); int sum = 0; for (int num : res) { sum += num; } return sum; } private: void dfs(int start, vector<int>&...
ALGO
0.99999
5.859133
33947b0f-5703-4b7f-abda-19a013bc58e3
alenming/myQipai
QipaiGame/cocos2d/cocos/platform/winrt/sha1.cpp
#include "platform/winrt/sha1.h" /* * Define the SHA1 circular left shift macro */ #define SHA1CircularShift(bits,word) \ (((word) << (bits)) | ((word) >> (32-(bits)))) /* Local Function Prototyptes */ void SHA1PadMessage(SHA1Context *); void SHA1ProcessMessageBlock(SHA1Context *); /* * SHA1Rese...
ALGO
0.961025
7.107961
d5fb78de-9bec-4d71-9708-980da9b6c635
ishandutta2007/codeforces
fishcathu/normal/1686/B.cpp
#include<bits/stdc++.h> #define ls i<<1 #define rs i<<1|1 #define fi first #define se second #define min amin #define max amax #define pb push_back using namespace std; using ll=long long; using pii=array<int,2>; constexpr int N=1E5+10; constexpr int inf=1E9; constexpr int p=998244353; int qpow(int x,int n=p-2){int y=1...
ALGO
0.999591
4.58539
3d9da097-bb1d-4fea-896f-90590a7833d1
tahanebti/tnlib
types/conponents_types/class_type/Modular_object.cpp
#include <iostream> using namespace std; template<typename T> class Number { public: using Type = typename decay<decltype(T::value)>::type; constexpr Number() : value() {} template <typename U> Number(const U& x) { value = normalize(x); } template <typename U> static Type normalize(const U& x) { ...
TOOL
0.875624
5.092331
fd9c5881-9466-4ed8-9951-db8237608f74
lupeng25/ls
生成括号/生成括号.cpp
#include <iostream> #include <set> #include <vector> #include <string> using namespace std; class Solution { public: vector<string> generateParenthesis(int n) { vector<string> result; string path = ""; DFS(result, path, n, 0, 0); return result; } /* 采用递归树的思想 : left: 左括号的数量 right:右括号数量 n:括号的对数 当lef...
ALGO
0.999925
5.135873
e4713e45-e03d-40f9-8aef-948816b678ce
AndreiDany/flutter_app_3_tema
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
eff49e53-202a-4ccf-9b0e-2d01d0c521d8
adityapadwal/Data-Structures-And-Algorithms
Practise_DSA/Arrays/revArrayUsingVector.cpp
#include<iostream> #include<vector> using namespace std; vector <int> reverse(vector<int> v) { int s=0; int e=v.size()-1; while(s<=e) { swap(v[s], v[e]); s++; e--; } return v; } int main() { vector<int> v; v.push_back(11); v.push_back(7); v.push_back(3); v.push_back(12)...
ALGO
0.9998
4.595973
2d44578d-47ba-4b20-9a2a-5e5da65f326f
godnoTA/acm.bsu.by
4. Алгоритмы на графах/67.2. Поиск в глубину #3568/[OK]230311.cpp
#include <fstream> #include <iostream> #include <map> #include <list> #include <vector> using namespace std; int main() { ifstream fin ("input.txt"); ofstream fout ("output.txt"); int n, x; fin >> n; int *answer = new int[n]; for(int i = 0; i < n; i++) answer[i] = 0; list<int> listEmpty; map<int, li...
ALGO
0.999943
3.556205
2599bc34-964b-4e09-b4a0-33a884d9bd22
Voltern/SwiftShaderGit
third_party/LLVM/lib/Analysis/IntervalPartition.cpp
#include "llvm/Analysis/IntervalIterator.h" using namespace llvm; char IntervalPartition::ID = 0; INITIALIZE_PASS(IntervalPartition, "intervals", "Interval Partition Construction", true, true) //===----------------------------------------------------------------------===// // IntervalPartition Impleme...
ALGO
0.989778
7.492572
ee4ed33c-005e-4a3e-a554-23da8ed60b0c
mhp38/LeetCode
94. Binary Tree Inorder Traversal.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.99999
6.675249
30fef5a1-9c69-4296-84a4-52e9b6f8c4a1
arafat-yasin-2413/COURSE-3-DS
WEEK -3/Revision Mod 10.5/3_check_palindrome.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node *prev; Node(int val) { this->val = val; this->next = NULL; this->prev = NULL; } }; void insert_at_tail(Node *&head, Node *&tail, int val); void print_normal(Node *head); int si...
ALGO
0.999639
4.828814
7b8922d6-d483-4c1d-ad31-56180e3e4e4e
kbcgang/kbc
dat/School/Grade9/GAME-30-11-2024/DC.cpp
///Kiên is reliable!!! ///Made by Nguyễn Hữu Đạt #include<bits/stdc++.h> #define ll long long #define kien main #define mod 1000000007 using namespace std; int n,m,p,t,B,a[100005],b[100005]; ll res,ans; kien() { // if(fopen(".inp","r")) // { // freopen(".inp","r",stdin); // freopen(".out","w",stdout);...
ALGO
0.999815
3.293774
0a96d6b9-74c6-4623-ac26-a0a999029850
oss5824/practice
최소신장트리/6497.cpp
#include<iostream> #include<queue> #include<algorithm> #include<cstring> #include<map> #include<string> #include<stack> #include<cmath> #include<set> #include<vector> #include<list> #include<limits.h> #define INF 1e9 typedef long long ll; using namespace std; int par[200000]; int N, M; vector<pair<int, pair<int, int>>>...
ALGO
0.99974
4.254616
d3c95d59-2976-4dbc-9705-52dfc055d9ea
taewoocode/cppalgorithm
kundol/dp/fibobottomup.cpp
#include<bits/stdc++.h> using namespace std; int dp[1004]; int main(){ memset(dp, -1, sizeof(dp)); int n = 10; dp[0] = 0; dp[1] = 1; for(int i = 2; i <= n; i++){ dp[i] = dp[i - 1] + dp[i - 2]; } cout << dp[n] << '\n'; return 0; }
ALGO
0.999976
4.170794
6f8128b7-a89d-4f54-b0bc-ec848f062355
MingzhenY/code-warehouse
CodingWebsites/WHU_OJ/Volume1/P1062.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #define LL long long using namespace std; void F(LL a,LL b){ int L,A[4]; L=a/b; for(int i=0;i<4;++i){ a%=b; a*=10; A[i]=a/b; } if(A[3]>=5) ++A[2]; if(A[2]>=10){ A[1]+=A[2]/10; ...
ALGO
0.996426
3.132545
a0e53386-a6f3-4c33-b63e-24f1866b299f
Adronhuman/algotester
Дракон і дороги/main.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int N,M,A,B; cin>>N>>M; vector <vector<int>> graph; vector<int> d; vector<int > count_of_ways; vector<int> seen; for(int i = 0;i<N+1;i++){ vector<int>x; graph.push_back(x); d.push_back(9999999999); coun...
ALGO
0.999984
4.94145
05369241-b224-40e1-8dcc-7ab8a7362e68
siddiqui-zeeshan/Leetcode
Code/Count Good Nodes in Binary Tree.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.999952
6.101297
a3404e11-b0cb-4d74-a5dd-d7d26f6f635d
kabasset/FewChallenger
Few/src/lib/Amplitude.cpp
#include "Few/Amplitude.h" #include <algorithm> #include <cmath> #include <complex> // #include <hdf5.h> // #include <hdf5_hl.h> #include <string> namespace Few { // This code assumes the data is formated in the following way const int Ne = 33; const int Ny = 50; // initialize amplitude interpolants for each mode v...
TOOL
0.946177
4.517396
5e071559-62aa-4316-9c4f-4e8cb80787d5
walid123780/Problem-Solving
codeforces/1634/A.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { int n,m; cin>>n>>m; string s,p; cin>>s; p=s; reverse(s.begin(), s.end()); int cnt=0; if(m==0) { cout<<"1"<<endl; } els...
ALGO
0.999985
3.693278
5b3cb745-68c6-48c5-846e-e8956fd94c77
kmjp/procon
atcoder/past001-040/past015/e.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.999902
3.808056
dedfb0e0-1574-4c68-a9af-33829be86656
dpidpalyi/lippman
ch10/ex_10_37.cpp
#include <iostream> #include <vector> #include <list> using std::cout; using std::endl; using std::vector; using std::list; int main() { vector<int> vi{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; list<int> li(vi.crbegin() + 3, vi.crbegin() + 8); for (const auto &e : li) cout << e << " "; cout << endl; return 0; }
TOOL
0.955028
3.008376
85c7a25d-7e2e-454d-a471-c28244e156a6
asmae-th/-Donor
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
d50b61df-47b3-4687-8502-e940b6890820
ngng628/competitive-programming
atcoder/ABC/ABC173/E/main.cpp
# include <atcoder/modint> # ifndef ONLINE_JUDGE # include <nglib/atcoder.hpp> # endif # ifdef ngng628_library using mint = atcoder::modint1000000007; istream& operator >>(istream& is, mint& r){ int t; is >> t; r = t; return is; } ostream& operator <<(ostream& os, const mint& r){ return os << r.val(); } mint operator""...
ALGO
0.999977
4.657731
bdf9ddaa-e726-4999-9fd0-d3e34b993b14
Harshit1487/DSA
Day 18/Tree157e.cpp
//https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/ class Solution { public: TreeNode* binary(int l ,int r, vector<int>& nums){ if(l>r) return NULL; int m = (l+r)/2; TreeNode* root = new TreeNode(nums[m]); root->left = binary(l, m-1, nums); root->righ...
ALGO
0.999991
6.761607
16e0f0ec-c552-4f62-9245-c9f48ddd6486
babatosorus/Fractals
src/mandelbrot.cpp
#include "mandelbrot.h" #include <complex> int MandelBrot::getIteration(double x, double y) { std::complex<double> z = 0; std::complex<double> c(x, y); auto iterationNum = 0; while (iterationNum < m_maxIteration) { z = z*z + c; double r = std::abs(z); if (r > 2.0) { break; } ...
ALGO
0.99914
5.024376
c9af01e9-b453-4847-ad01-69115c3c8062
meetthehorizon/competitive-programming
Problem_Sets/CSES/Mathematics/Distributing_Apples.cpp
/* Kshitij Sharma github: meetthehorizon */ #include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define INF 10000000000000000 #define FOR(i, n) for (size_t i = 0; (i) < (n); (i)++) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() void solve(int); bool test_cases = fal...
ALGO
0.99995
5.183342
e5ef4e70-65fe-4c08-9a45-292512e76921
Mshikalgar/c-and-cpp
21_vowel_using_switch.cpp
#include <iostream> using namespace std; int main() { char ch; cout << "enter any character :"; cin >> ch; switch (ch) { case 'A': case 'a': case 'U': case 'u': case 'E': case 'e': case 'I': case 'i': case 'O': case 'o':...
ALGO
0.895797
3.610186
5325aeef-1e61-4e14-90ad-9f82a39ccf54
ishandutta2007/codeforces
fcwww/normal/1119/E.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <cstdlib> #include <set> using namespace std; typedef long long ll; int n; int main() { scanf("%d",&n); int i; ll s=0,ans=0,x; for(i=1;i<=n;i++) { scanf("%lld",&x); ll t=min(x/2,s); ans+=t; x-=(t<<1); s-=t; ans+=x/3; s+=x%3; } printf...
ALGO
0.999875
3.299214
fa0654ac-a96e-49b2-a154-fb9ca0aaf85a
gcourchinoux/llvm-gaspard
lib/CodeGen/PostRASchedulerList.cpp
#include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/CodeGen/AntiDepBreaker.h" #include "llvm/CodeGen/LatencyPriorityQueue.h" #include "llvm/CodeGen/MachineDominators.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineLoopInfo.h" #include "llvm/CodeGen/Mach...
ALGO
0.96282
7.331048
3e194a62-8157-4c9e-bf4c-78720b2e9e5d
MuhammadAbbasi/DSA_Semester3
LAB Project/opencv-3.4.3/modules/photo/src/align.cpp
#include "precomp.hpp" #include "opencv2/photo.hpp" #include "opencv2/imgproc.hpp" #include "hdr_common.hpp" namespace cv { class AlignMTBImpl CV_FINAL : public AlignMTB { public: AlignMTBImpl(int _max_bits, int _exclude_range, bool _cut) : name("AlignMTB"), max_bits(_max_bits), exclude_ra...
TOOL
0.911774
5.329306
c1865b47-3619-47dc-b93b-74ee955478c4
alexandraback/datacollection
solutions_5658571765186560_0/C++/shik/pd.cpp
// by shik {{{ #include <bits/stdc++.h> #include <unistd.h> #define SZ(x) ((int)(x).size()) #define ALL(c) begin(c),end(c) #define REP(i,n) for ( int i=0; i<(int)(n); i++ ) #define REP1(i,a,b) for ( int i=(int)(a); i<=(int)(b); i++ ) #define FOR(it,c) for ( auto it=(c).begin(); it!=(c).end(); it++ ) #define MP make_pai...
ALGO
0.999753
3.759195
54163061-8f0e-45a4-8b18-04c1e9bcc729
kyshott/Leetcode-Solutions
#1910 - Remove All Occurrences of a Substring/substringremoval.cpp
class Solution { public: string removeOccurrences(string s, string part) { std::string stack; for(char c : s) { stack.push_back(c); if(stack.size() >= part.size() && stack.substr(stack.size() - part.size()) == part) { stack.erase(stack.size() - part.size(), ...
ALGO
0.999799
6.492532
c3162ccd-6bab-4e6f-b17f-e5a5ea121f09
Lim-YongKwan/Algorithm
백준/BOJ_2631.cpp
#include<iostream> #include<algorithm> #define endl "\n" using namespace std; int cares[201]; int DP[201]; void solve(int n){ int Max = 0; DP[0] =1; for(int i = 1;i<n;i++){ DP[i] = 1; for(int j = 0;j<i;j++){ if(cares[i]>cares[j]){ if(DP[j] >= DP[i]){ ...
ALGO
0.999978
3.675987
80b2d324-ba0c-491d-a009-785a6f48afe5
VizKey01/My_Computer_Programing
data_structure/checkmap.cpp
#include <bits/stdc++.h> using namespace std; //--------------------- define zone ------------------------ #define ll long long #define db double #define pi pair<int,int> #define pis pair<string, string> #define stp() ios_base::sync_with_stdio(false);cin.tie(0); #define ending(x) if((x) == "x") break; #define nloop(x)...
ALGO
0.999942
3.962837
c3ef8d18-9a84-480e-80f2-4918ca187ce9
lrcuomo/-Confederados-Exhibit
Table2/Installer/OmekaTable2/OmekaTable2/qzxing/zxing/zxing/qrcode/encoder/MaskUtil.cpp
#include "MaskUtil.h" #include <zxing/common/IllegalArgumentException.h> #include <stdlib.h> namespace zxing { namespace qrcode { // Penalty weights from section <IP_ADDRESS> const int MaskUtil::N1 = 3; const int MaskUtil::N2 = 3; const int MaskUtil::N3 = 40; const int MaskUtil::N4 = 10; /** * Apply mask penalty ...
ALGO
0.996304
4.852857
b8f580ed-7485-4c41-ae60-80d4649ed38e
algo-study-embedded-21/algorithm-study
sohee/17_robot_on_the_conveyor_belt.cpp
/* pair<int, int> 迭 κ */ #include <iostream> #include <vector> using namespace std; // N 100ε // 迭 111 ߴ Ÿ pair<int, int> arr[205]; int n, k; int cnt; void rotate(){ pair<int, int> temp = arr[2*n]; for (int i = 2*n; i > 1; i--) { arr[i] = arr[i - 1]; } arr[1] = temp; if (arr[n].second == 1) { arr[n]....
ALGO
0.999997
4.082966
ea400ef4-c94e-47fa-bd4e-c80b7587e5a4
Erkaman/graphics-experiments
ewa/math/matrix4f.cpp
#include "matrix4f.hpp" #include "math_common.hpp" #include "vector3f.hpp" #include "vector4f.hpp" #include "log.hpp" using std::string; Matrix4f Matrix4f::CreatePerspective( const float fov, const float aspectRatio, const float near, const float far) { float ymax = near * tan(fov * PI/360.0f); float xmax =...
TOOL
0.986044
7.033242
a3c98b6e-928a-48bf-aefa-be9b7d99b186
DrSwad/CP
Submissions/Others/CoU IUPC 2023/A.cpp
#include <bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; int add(int a, int b) { int c = a + b; return c < mod ? c : c - mod; } int mul(int a, int b) { return 1ll * a * b % mod; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; vector<int> a(n); for (in...
ALGO
0.999885
5.0049
dc0594c9-6a65-4e88-888a-af3140f6ff18
kunalbandooni/InterviewBit
Consecutive Parent - Child.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ void util(TreeNode* root, int &res) { if(!root) return ; if(root->left ) if(abs(root->val-(root->left->val))...
ALGO
0.999943
5.526674
f4e4a7a5-a19f-4554-b891-3abfd4dfb07b
Zeeman08/templates
cpp/DSU.cpp
int par[N], siz[N]; void dsu_init() { for(int i = 1; i <= n; i++) par[i] = i, siz[i] = 1; } int find_par(int x) { if(x == par[x]) return x; return par[x] = find_par(par[x]); } void unite(int x, int y) { x = find_par(x), y = find_par(y); if(x == y) return; if(siz[x] < siz[y]) swap(x, y); par[...
ALGO
0.999828
4.000068
21e3fa42-a807-4227-9535-717f14b1cbc6
ishandutta2007/codeforces
rivalq/normal/652/D.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define ook order_of_key #define fbo find_by_order #define ...
ALGO
0.999994
4.741425
a190696e-de62-4ca8-a688-5a1ae3d76be2
qualit527/HIT_QEC
decoders/LLRBP4_decoder/eigen/failtest/qr_int.cpp
#include "../Eigen/QR" #ifdef EIGEN_SHOULD_FAIL_TO_BUILD #define SCALAR int #else #define SCALAR float #endif using namespace Eigen; int main() { HouseholderQR<Matrix<SCALAR, Dynamic, Dynamic> > qr(Matrix<SCALAR, Dynamic, Dynamic>::Random(10, 10)); }
TEST
0.954119
3.0876
db7e5d08-eaa0-428b-b35b-8193ca4ccb7b
Adityasinghvats/CPP---code
11_searching/sqrt.cpp
// It makes the point that binary search is not only applicalbe on index #include<iostream> using namespace std; int main(){ int x = 20; int lo = 0, hi = x; while(lo<=hi){ int mid = lo+(hi-lo)/2; long long m = (long long) mid; long long num = (long long) x; ...
ALGO
0.999987
3.705348
c7c3730a-7dff-4f6a-865f-f7acd40b2c4d
xwarden/301CRAdvancedGamesProgrammingGenadiMihovResit
301AdvancedGamesServer/301AdvancedGamesServer/libraries/Box2D/include/Box2D/Dynamics/Joints/b2FrictionJoint.cpp
#include <Box2D/Dynamics/Joints/b2FrictionJoint.h> #include <Box2D/Dynamics/b2Body.h> #include <Box2D/Dynamics/b2TimeStep.h> // Point-to-point constraint // Cdot = v2 - v1 // = v2 + cross(w2, r2) - v1 - cross(w1, r1) // J = [-I -r1_skew I r2_skew ] // Identity used: // w k % (rx i + ry j) = w * (-ry i + rx j) //...
ALGO
0.981508
7.567667
1174bfe2-3954-4ff0-b939-04bb5e515383
yizhifang123/Coding-Projects
USACO Bronze/disctinctnumber.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int N, L; cin >> N >> L; string stalls; cin >> stalls; vector<int> cow_positions; for (int i = 0; i < N; ++i){ if (stalls[i] == '1'){ cow_positions.push_back(i); } } i...
ALGO
0.999878
3.953472
c5c9f7ea-e879-448a-977b-abef99c17ed0
npnkhoi/Competitive-programming
AtCoder/ABC215/C.cpp
#include <bits/stdc++.h> using namespace std; int main() { string s; int k; cin >> s >> k; sort(s.begin(), s.end()); for (int i = 1; i < k; ++ i) { next_permutation(s.begin(), s.end()); } cout << s; }
ALGO
0.999987
4.586549
ed295ad4-d74f-42a2-bad2-ccf8aee6203b
raincross7/code-similarity
codes/train_code/problem406/problem406_336.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n; uint64_t a[100'000], b[100'000]; uint64_t x = 0; cin >> n; for(int i=0;i<n;++i) cin >> a[i]; for(int i=0;i<n;++i) x ^= a[i]; for(int i=0;i<n;++i) b[i] = a[i] & (~x); int st = 0; for(int i=59;i>=0;--i){ for(int...
ALGO
0.999989
4.00381
02286cb4-ab1d-47ab-805f-6edbb229320f
YousefIIV/mycode
rpn.cpp
#include <iostream> #include <stack> using namespace std; int main() { stack<int> operandStack; while (true) { cout << "Enter n to type a number, o for an operator, or q to quit: "; char c; cin >> c; if (c == 'n') { int n; cout << "Enter the number: "; cin >> n; operan...
ALGO
0.984092
5.798445
59d54249-a7dd-4697-907f-0c490892131c
Aeolian1231/project
snack.cpp
#include<iostream> #include<windows.h> #include<conio.h> #include<deque> #include<ctime> #include<stdexcept> using namespace std; struct Snake { //ṹ char image; short x, y; // }; class snakeGame { public: snakeGame(); void printMap(); void gotoxy(short x, short y) { hOut = GetStdHandle(STD_OUTPUT_...
TOOL
0.996127
3.176871
21bcf5bc-e8e4-4e1a-9de6-ca187fa14a17
ryusuke920/paiza-Qiita
C++/D/一番小さい値_1.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { // 入力を受け取る vector<int> n(5); for (int i = 0; i < 5; ++i) { cin >> n[i]; } // ans に配列 n の最小値を格納する int ans = *min_element(n.begin(), n.end()); // 答えを出力する cout << ans << endl; retur...
ALGO
0.999691
4.546599
a5663415-bc65-4c1c-b7f6-513af53ebecb
MDzimah/UCM-Data-Structures
Soluciones/33_Reconstruccion_arb_bin.cpp
#include <iostream> #include <fstream> #include <memory> #include <cassert> #include <vector> #include <stack> /* Implementacin de la clase BinTree para representar rboles binarios. Para realizar este ejercicio no es necesario modificar la clase. */ template <class T> class BinTree { public: BinTree...
ALGO
0.999987
6.016083
7623e79c-3c2d-4907-bb61-124ad45ca79e
Kawser-nerd/CLCDSA
Source Codes/AtCoder/agc023/A/2438747.cpp
#include<iostream> #include<algorithm> #include<map> #include<vector> #include<string> using namespace std; int main() { int n; cin >> n; long long int a[n]; for(int i = 0; i < n; i++) { cin >> a[i]; } long long int sum[n + 1]; sum[0] = 0LL; for(int i = 0; i < n; i++) { sum[i + 1] = sum[i] + a[i]; } ma...
ALGO
0.999959
3.628124