uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
5c3933ef-3bc7-4274-8304-802d41e28dc5
finch185277/Introduction.to.Operating-Systems
hw4/main.cpp
/* Student No.: 0616214 Student Name: YU-AN CHEN Email: <EMAIL> SE tag: xnxcxtxuxoxsx Statement: I am fully aware that this program is not supposed to be posted to a public server, such as a public GitHub repository or a public web page. */ #include <fstream> #include <iostream> #include <limits> #include <pthread.h> ...
ALGO
0.999837
4.646521
e82c7ef3-e2b9-4b50-adf3-79a346246575
ps2997/LeetCode
0162-find-peak-element/0162-find-peak-element.cpp
class Solution { public: int findPeakElement(vector<int>& arr) { int s = 0; int e = arr.size()-1; int mid = s + (e-s)/2; while(s<e){ if(arr[mid+1]>arr[mid]){ s = mid+1; } else{ e = mid ...
ALGO
0.999905
5.411802
7da5aa42-d779-493d-a250-76cb52e9de58
jovanovicm/doug
stockfish/src/material.cpp
#include <cassert> #include <cstring> // For std::memset #include "material.h" #include "thread.h" using namespace std; namespace Stockfish { namespace { #define S(mg, eg) make_score(mg, eg) // Polynomial material imbalance parameters // One Score parameter for each pair (our piece, another of our pieces)...
ALGO
0.998037
6.803736
45a1cb1c-cc85-4f99-a884-4be22353c403
Y7EA/Competitive-Programming
Graphs/Graph Traversal/BFS.cpp
#include <bits/stdc++.h> using namespace std; #define ar array #define ll long long const int MAX_N = 1e5 + 5; const ll MOD = 1e9 + 7; const ll INF = 1e9; int n, m; vector<int> adj[MAX_N], dist; void bfs(int s) { dist.assign(n + 1, -1); queue<int> q; dist[s] = 0; q.push(s); while (q.size()) { ...
ALGO
0.999984
5.145522
da981590-3cff-44e1-9a0c-d578627d757f
thachuy/Cpp
Buoi2/baive1.cpp
#include<iostream> #include<string> #include<iomanip> using namespace std; struct sinhvien{ string maso; string hoten; int namsinh; float diem_tb; }; typedef struct sinhvien SINHVIEN; void NhapThongTinSinhVien(SINHVIEN &x){ cout << "Nhap ma so sinh vien: "; cin >> x.maso; cout << "Nhap ho ten sinh vien: "; ci...
TOOL
0.976817
3.802922
0e476ab3-cac3-4c96-95b5-ddb5784013a0
SanidhayaSharma141/Coding-assignments
Data Structures Assignments/CS21B1024_ThreadedBinaryTree.cpp
/* Name: Sanidhaya Sharma Roll NO: CS21B1024 Asssignment: Threaded Binary tree for faculty */ #include <bits/stdc++.h> using namespace std; struct faculty { struct faculty *left; string name; string deptt; int age; char gender; bool leftThread; bool rightThread; struct facul...
ALGO
0.993026
3.527868
a985e955-13aa-4b86-ad94-64696073f3a8
lussatisantos/Curso-C-
12/ponteiro2.cpp
# include <iostream> using namespace std; int main() { int *p; int vetor[10]; p = vetor; cout << p << "\n\n"; *(p+=1); // incrementar o ponteio *p = 20; cout << vetor[1] << "\n\n"; p = &vetor[2]; cout << p << "\n\n"; return 0; }
ALGO
0.985049
3.342379
ba1edc5c-c2cb-498c-94c1-d500734324f6
Az1zbekx/PDP
1.1/5.cpp
#include <bits/stdc++.h> #define int long long using namespace std; //int MOD = 1e9 + 7; void solve(){ cout << " 3 " << endl; cout << " 232 " << endl; cout << " 12321 " << endl; cout << " 232 " << endl; cout << " 3 " << endl; cout << endl; cout << "1234321" << endl; cout << " 23432 " << endl; c...
ALGO
0.999621
3.398559
de3bd23b-58c8-44bf-b4c7-023aef80d27a
pvy-it-tdh/LeThachPhucVy_Cpp
Chapter10/challenge14.cpp
#include <iostream> using namespace std; int main() { int employeeNumber; double grossPay, stateTax, federalTax, ficaWithholdings; double totalGrossPay = 0, totalStateTax = 0, totalFederalTax = 0, totalFicaWithholdings = 0, totalNetPay = 0; cout << "Payroll Report\n"; cout << "Enter 0 for employee...
TOOL
0.993064
5.541415
da76e108-9bc5-4f41-be56-f1118b829401
Kishan-Ved/comparc
Q1a.cpp
#include<bits/stdc++.h> using namespace std; long long int f(int a){ if(a==0 || a==1) return a; return f(a-1) + f(a-2); } int main(){ struct timespec start, end; clock_gettime(CLOCK_MONOTONIC, &start); for(int i=0;i<50;i++){ cout<<f(i)<<endl; } clock_gettime(CLOCK_MONOTONIC, &end);...
ALGO
0.998608
3.935826
62911954-abfe-41e9-8eed-54c07312ed10
holgerthies/pc
topcoder/srm 641/ShufflingCardsDiv2.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <limits> #include <tuple> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cst...
ALGO
0.9998
4.539111
ed8e66d8-b0b6-420a-98b0-709cc503bc13
avaxman/libhedra
include/hedra/copyleft/cgal/generate_mesh_hex.cpp
#include <hedra/copyleft/cgal/generate_mesh.h> #include <boost/config.hpp> #include <iostream> #include <vector> #include <queue> #include <algorithm> #include <utility> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/connected_components.hpp> #include <CGAL/Search_traits_2.h> #include <CGAL/Orthogonal...
ALGO
0.998136
4.304644
b12fcc59-d4a2-4f44-a887-17c10724b29a
plamena-ilieva/SDA-2023-2024
Seminars/Seminar02/Tasks/Positives and negatives/Solution.cpp
template <typename T> int partition(T* arr, int len, T pivot) { int i = 0, j = len - 1; while (true) { while (arr[j] > pivot) j--; while (arr[i] < pivot) i++; if (i < j) std::swap(arr[i], arr[j]); else return j; } } void positivesAndNegatives(int* X, size_t len) { partition<int>(X, len, 0); }...
ALGO
0.999636
4.590856
86b96179-ad3b-4a52-9458-9a2cda7c7ccc
Albgondiga/icpc
Codeforces/Contests/28ago2024/a/a.cpp
#include <bits/stdc++.h> using namespace std; #define forr(i, a, b) for (int i=a; i<b; i++) #define forn(i, n) forr(i, 0, n) #define sz(c) ((int)c.size()) #define zero(v) memset(v, 0, sizeof(v)) #define forall(it, v) for (auto it=v.begin(); it!=v.end(); ++it) #define pb push_back #define pf push_front #define mp make_...
ALGO
0.999879
4.848524
f79ed293-103e-430c-abe3-9a9f25d54e3a
uraich/TinyML
Arduino/TFLM_ESP32/src/tensorflow/lite/micro/kernels/squared_difference.cpp
#include "tensorflow/lite/c/common.h" #include "tensorflow/lite/kernels/internal/quantization_util.h" #include "tensorflow/lite/kernels/internal/reference/binary_function.h" #include "tensorflow/lite/kernels/internal/reference/integer_ops/add.h" #include "tensorflow/lite/kernels/kernel_util.h" #include "tensorflow/lite...
ALGO
0.992754
7.627947
ea5e238b-b4ba-4421-a9a7-5bfef5c0070d
SamudraMitra/cses
dynamic programming/Mountain_Range.cpp
// Sarthak stalk krna buri baat hoti hai #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define max3(a, b, c) max(max(a, b), c) #define ...
ALGO
0.999998
4.785452
9c20be0a-09e2-4059-87bb-11eeedd38f35
raincross7/code-similarity
codes/train_code/problem176/problem176_493.cpp
#include <iostream> #include <cstdio> #include <algorithm> using namespace std; char s[30005]; int pre[30005][11]={0}; int suf[30005][11]={0}; int vis[1005]={0}; void solve(int dd,int num){ for(int i=0;i<10;i++){ for(int j=0;j<10;j++){ if(pre[dd-1][i]&&suf[dd+1][j]){ vis[i*100+nu...
ALGO
0.999741
3.640473
d1329d44-640d-49cb-abcb-df6394411ad7
vsharkovski/Competitive-Programming
Programs/Codeforces/1027C - Minimum Value Rectangle.cpp
#include <bits/stdc++.h> #define endl '\n' #define EPS 1e-9 #define all(v) begin(v), end(v) using namespace std; typedef long long ll; typedef std::pair<int, int> ii; typedef std::vector<ii> vii; typedef std::vector<int> vi; const ll mod = 1e9 + 7; template<typename T> T gcd(T a, T b){T c; while(b){c=b; b=a%b; a=c;}...
ALGO
0.999696
3.684122
0f2bb8f3-cd80-4ecb-ac60-096e11da198b
NeoGeographyToolkit/StereoPipeline
src/asp/OpenMVG/multiview/solver_essential_kernel.cpp
#include <asp/OpenMVG/multiview/solver_essential_five_point.hpp> #include <asp/OpenMVG/multiview/solver_essential_kernel.hpp> #include <asp/OpenMVG/multiview/solver_fundamental_kernel.hpp> #include <asp/OpenMVG/numeric/poly.h> #include <cassert> namespace aspOpenMVG { namespace essential { namespace kernel { using n...
ALGO
0.999865
6.240843
531f58a8-9f24-4efc-8f20-2fee4f934fb5
malasiot/maplite
src/3rdparty/vcglib/eigenlib/unsupported/doc/examples/MatrixLogarithm.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { using std::sqrt; MatrixXd A(3,3); A << 0.5*sqrt(2), -0.5*sqrt(2), 0, 0.5*sqrt(2), 0.5*sqrt(2), 0, 0, 0, 1; std::cout << "The matrix A is:\n" << A << "\n\n"; std::cout << "...
ALGO
0.998378
3.621207
85f750c6-9676-4879-8c0b-89660fbbe6ce
SahibAlMowt/sem_3
sen 25/6_8.cpp
#include <iostream> #include <forward_list> #include <iterator> int main() { std::forward_list<int> fl {3, 4, 5}; fl.push_front(2); // fl.push_back(6); auto iter = std::next(fl.begin()); iter = fl.erase_after(iter); fl.insert_after(iter, 4); for(int x: fl) { std::cout << x << "\n"; } return 0...
TOOL
0.961236
3.81309
ed36413e-36fe-4b19-87ef-0c3a679bb438
Korea-Univ-BLP-Lab/Substring-Search-Algorithm
src/GetFST.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "FST.h" /* Ʒ ؾ */ //FST *fst_fst; //int *fst_freq; //char **fst_info; /*****************************************************************************/ char **entry_table=NULL; /* Է ܾ */ char *entry_string=NULL; /* Է ܾ ڿ */ static int make_...
ALGO
0.938461
3.455963
da27f9f1-ad32-40ed-9799-30714c9fac0a
dhingrahimanshu/CompetitiveProgramming
LeetCode/2530. Maximal Score After Applying K Operations.cpp
class Solution { public: long long maxKelements(vector<int>& nums, int k) { priority_queue<int> pq; for (auto & it : nums) pq.push(it); int i = 0; long long ans = 0; while (i < k) { int ele = pq.top(); pq.pop(); ans += ele; pq.push(ceil(1.0...
ALGO
0.999975
5.507973
17e4e027-65c8-4bc2-8668-3ee33b5a407b
scaevolabars/quantlib
EuropeanOption.cpp
// // Created by serge on 6/5/2022. // #include "EuropeanOption.h" #include <math.h> double EuropeanOption::N(double value) const { return 0.5 * erfc(-value * M_SQRT1_2); } double EuropeanOption::CallPrice() const { double tmp = sig *sqrt(T); double d1 = (log(U/K) + (b + (sig*sig)*0.5)*T)/tmp; do...
ALGO
0.998991
6.753106
9b239c8b-1795-4557-a6e3-5afd879ebf67
sukhbinder/uqtoolkitV3
cpp/app/model_inf/model_inf.cpp
/// \file model_inf.cpp /// \author K. Sargsyan 2015 - /// \brief Command-line utility for model parameter inference #include <unistd.h> #include <sstream> #include <map> #include <iostream> #include <string> #include <math.h> #include <getopt.h> #include "func.h" #include "post.h" #include "mrv.h" #include "infer...
ALGO
0.996709
5.82057
2847e7f8-c793-4dd0-a305-60d353f2fe0c
langningchen/XMOJ
4205.cpp
#include <bits/stdc++.h> using namespace std; int n, a[110], ans = 0, ans2 = 0, tmp = 0; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &a[i]); } int i = n - 1; while (i > 0) { if (a[i] != -1) { for (int j = 1; j <= a[i]; ...
ALGO
0.999616
3.318886
05abb0f7-6fff-4285-bd00-91ff2c9d27e7
xcloudyunx/Informatics
uva/927.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; #define INF 1000000000 int main() { int C, i, d, k, n, p, pp; ll total, cn; cin >> C; while (C--) { cin >> i; vi c(i+1); for (int j=0; j<=i; j++) cin >> c[j]; cin...
ALGO
0.999628
3.113465
d3b1e8d9-6f83-468c-b73b-482c27d2e0a3
m-i-n-s-u/codingpractice2024
단어정렬/단어정렬/main.cpp
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; bool compare(string first, string second) { if (first.length() == second.length()) { return first < second; } else { return first.length() < second.length(); } } int main() { int number; string word; vector<st...
ALGO
0.999893
4.590612
b9669338-df38-4fbf-8fb1-c8b189c9b385
theravijangid/DSA
DnC/QuickSort.cpp
#include<iostream> using namespace std; int partition(int* arr, int s, int e) { // step 1 - choose a pivot element int pivotIndex = s; int pivotElement = arr[s]; // step2 - find the right position for pivot and place it in its right posistion int count = 0; for(int i=s+1; i<=e; i++) { ...
ALGO
0.999987
4.930881
1448128d-303e-4749-803d-9aff10dcfdec
oymeir/mat-msgm
software/DiscreteMultiscale1.2.tar/discrete_multiscale/ChooseCoarseGreedy_mex.cpp
#include "mex.h" #include <string.h> // for memset /* * Choose variables for coarse grid * Greedy algorithm * * After selection, * * \sum_{j\in coarse} c_ij > beta \sum_j c_ij for all i * * Starting with an empty coarse set, we sequentially add variables from fine * That their \sum_{j\in coarse} c_ij (to ...
ALGO
0.999361
5.613188
da91dd6f-0007-421d-8b16-248919f8dc89
ruleless/programming
alg/poj/archive/3308/7300440_AC_32MS_744K.cpp
#include <iostream> #include <cstdio> #include <cmath> using namespace std; #define eps 10e-20 #define MAX 10e10 double G[156][156]; int m,n; double c[156][156],f[156][156]; bool vis[156]; int que[156],head,tail,pre[156]; void ek(int s,int t) { int i,j,k; memset(f,0,sizeof(f)); while(true) { memset(vis,0,sizeo...
ALGO
0.999909
3.286983
dc69fedb-afd9-4f13-a313-6a3a8406c674
cryptopia-com/skale-gas-miner
lib/cryptopp/blake2.cpp
// blake2.cpp - written and placed in the public domain by Jeffrey Walton // and Zooko Wilcox-O'Hearn. Based on Aumasson, Neves, // Wilcox-O'Hearn and Winnerlein's reference BLAKE2 // implementation at http://github.com/BLAKE2/BLAKE2. // // The BLAKE2b and BLAKE2s numbers are cons...
ALGO
0.988403
7.822941
c94a128f-ad02-4b4a-86b3-a2e5fd60e8b2
RyanGao67/DjangoGirl
testCode/testCpp.cpp
#include <iostream> #include <vector> /*fdosijrije dm;fkrlkd mvlfdsldsr*/ using namespace std; // TODO // todo // class Solution { public: int numTrees(int n) { vector<int> G(n+1, 0); G[0]=G[1]=1; for(int i=2; i<=n; i++){//mdlair for(int j=1; j<=i; j++) G[i]+=G[...
ALGO
0.999979
5.411772
d5e629e2-47e3-4c0c-a6dd-c71267ea0ce8
AmrARaouf/algorithm-detection
graph-source-code/467-D/7850254.cpp
//Language: GNU C++ #pragma comment(linker, "/STACK:64000000") #include <iostream> #include <cstdio> #include <cassert> #include <cmath> #include <cstring> #include <ctime> #include <cstdlib> #include <vector> #include <stack> #include <queue> #include <deque> #include <string> #include <map> #include <set> #include <...
ALGO
0.99996
3.874493
a1f22967-02ea-4597-b206-ae502df791ca
mahrth/Cpp-Buch2
2020.08/src/Konzepte/Polymorphie/komplex02.cpp
#include <array> #include <cmath> #include <iostream> #include <sstream> using namespace std; class Komplex { private: double re, im; public: constexpr Komplex(double re=0, double im=0) : re{re}, im{im} {} constexpr double real() const { return re; } constexpr double imag() const { return im; } string text() con...
ALGO
0.880312
4.199538
d544bcfe-c9fa-46b9-8127-385029c20a21
MrinmoiHossain/Uva-Solution
C++/uva10082.cpp
#include <bits/stdc++.h> using namespace std; char change(char n); int main(void) { string s; while(getline(cin, s)){ int len = s.length(); for(int i = 0; i < len; i++) cout << change(s[i]); cout << endl; } return 0; } char change(char n) { switch(n) { ...
ALGO
0.999106
3.759416
05f3755d-3743-491b-952c-0b71fa642f36
light0011/algorithm
算法/23-从上到下打印二叉树.cpp
struct BinaryTreeNode{ int value; BinaryTreeNode* left; BinaryTreeNode* right; } void PrintFromTopToBottom(BinaryTreeNode* pTreeRoot){ if(!pTreeRoot) return; std::deque<BinaryTreeNode *> dequeTreeNode; dequeTreeNode.push_back(pTreeRoot); while(dequeTreeNode.size()){ BinaryTreeNode *pNode = dequeTree...
ALGO
0.999947
4.499334
3dcf0a04-8518-49b5-81d3-e7795916270e
turneja123/competitive-programming-library
Problem/Data Structures/LCM GCD Love.cpp
//https://www.spoj.com/problems/LGLOVE/ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define endl "\n" #define ll long long #define IOS ios_base::sync_with_stdio(false); cin.tie(nullptr); const int N = 1e5 + 5; const long long M = 1e9 + 7; int a[...
ALGO
0.99994
4.799112
1e05777b-9aa9-497b-8e59-a878a44a1eaa
willkill07/AdventOfCode2021
days/Day10.cpp
#include <algorithm> #include <bitset> #include <cctype> #include <limits> #include <memory> #include <numeric> #include <ranges> #include <vector> #include <scn/all.h> #include "AdventDay.hpp" #include "Day10.hpp" namespace detail { using namespace day10; using Day = AdventDay<id, parsed, result1, result2>; } u...
ALGO
0.998418
6.192324
b79bf605-1af9-46bb-b318-1ab31c7e2159
vishal-patel17/online_challenges_solutions
factorial_challenge.cpp
/* Input An integer t, 1<=t<=100, denoting the number of testcases, followed by t lines, each containing a single integer n, 1<=n<=100. Output For each integer n given at input, display a line with the value of n! Example Sample input: 4 1 2 5 3 Sample output: 1 2 120 6 */ #include <iostream> #include <forward_...
ALGO
0.999745
5.431079
e28583c2-d93b-4b6a-a389-981fc6f70cc6
asdf77616385/ceph-12.2.1
src/boost/libs/regex/performance/performance.cpp
#include "performance.hpp" #include <list> #include <fstream> #include <iostream> #include <iomanip> #include <boost/chrono.hpp> #include <boost/detail/lightweight_main.hpp> #include <boost/regex.hpp> #include <boost/filesystem.hpp> void load_file(std::string& text, const char* file) { std::deque<char> temp_copy; ...
TEST
0.862618
5.57634
477a2591-0a37-4c03-8a75-35b2012112ec
BitcoinGod/BitcoinGod
src/merkleblock.cpp
#include "merkleblock.h" #include "hash.h" #include "consensus/consensus.h" #include "utilstrencodings.h" CMerkleBlock::CMerkleBlock(const CBlock& block, CBloomFilter& filter) { header = block.GetBlockHeader(); std::vector<bool> vMatch; std::vector<uint256> vHashes; vMatch.reserve(block.vtx.size());...
ALGO
0.997924
6.063735
d7a4377b-de2c-49f0-b3d1-abb46e6cda92
donayam1/Channelizer
Native/setintersection2/setintersection.cpp
// #include "../Enclave_t.h" #include <stdio.h> #include <string> // #include <stack> #include <fstream> #include <vector> #include "../../Shared/shared.h" #include <stdlib.h> using namespace std; volatile int x = 0; /** s: int array to check for duplicate values number: the number to look for efreq: the fr...
ALGO
0.977902
4.331089
c0bf6d6c-30d4-46a1-8a20-a3014a045992
hendrikweisser/Fido
src/generateLinProg.cpp
#include "Matrix.h" #include "Random.h" #define R 1000 int main(int argc, char**argv) { if ( argc == 3 ) { int seed = time(NULL); // seed = 0; // cerr << seed << endl; srand(seed); int n = atoi(argv[1]); int K = atoi(argv[2]); int i; Array<string> nam...
ALGO
0.977038
4.42281
0174786d-a563-41ba-8370-de7d8bab0879
RuriApoka/UVaOJ
UVa10812.cpp
#include <cstdio> using namespace std; int main() { int n, sum, difference; scanf("%d", &n); while (n--) { scanf("%d%d", &sum, &difference); if ((sum < difference) || (1 == ((sum - difference) % 2))) { puts("impossible"); } else { printf("%d %d\n", ((sum - difference) >> 1) + difference, ((sum - di...
ALGO
0.999344
3.509741
82ca660e-1768-4c22-960e-51649e9cb71b
xinjiyuan97/NOIP-ACM
NOIP/跳石头.cpp
#include <iostream> #include <limits.h> using namespace std; int N, M; int L, _max, _min; int D[50002], Sub[50002]; int check(int x) { int move = 0, l; int res = L + 10; for (int i = 0; i < N; i++) { l = Sub[i]; if (l < x) while (l < x && i < N) { i++; l += Sub[i]; move++; ...
ALGO
0.999989
3.270293
5f9b0ef7-1446-41de-bf86-143c6c178261
serszab/HighwayDriving
src/Eigen-3.3/bench/sparse_cholesky.cpp
// #define EIGEN_TAUCS_SUPPORT // #define EIGEN_CHOLMOD_SUPPORT #include <iostream> #include <Eigen/Sparse> // g++ -DSIZE=10000 -DDENSITY=0.001 sparse_cholesky.cpp -I.. -DDENSEMATRI -O3 -g0 -DNDEBUG -DNBTRIES=1 -I /home/gael/Coding/LinearAlgebra/taucs_full/src/ -I/home/gael/Coding/LinearAlgebra/taucs_full/build/lin...
ALGO
0.992059
4.147974
2b6f9e15-b527-4c86-9d79-a733d12d5f82
ja0xfu2/llvm.0014
clang-tools-extra/clang-include-fixer/find-all-symbols/tool/FindAllSymbolsMain.cpp
#include "FindAllSymbolsAction.h" #include "STLPostfixHeaderMap.h" #include "SymbolInfo.h" #include "SymbolReporter.h" #include "clang/ASTMatchers/ASTMatchFinder.h" #include "clang/ASTMatchers/ASTMatchers.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendActions.h" #include "clang/Lex/Pre...
TOOL
0.967213
7.603081
65f7a1dc-3775-47f3-a9e5-015999437055
ibrahim1118/LeetCode-Solutions
1813-sentence-similarity-iii/1813-sentence-similarity-iii.cpp
class Solution { public: bool areSentencesSimilar(string s1, string s2) { string x = ""; vector<string>s , ss; for (auto i: s1) { if (i==' ') { s.push_back(x); x=""; } else x+...
ALGO
0.999973
5.717122
6ea379e8-5f0a-4766-9767-76cfc59e3c66
Junaid7200/University-Labs
Data Structures/Trees/.history/labPlan9_20240515223436.cpp
#include <iostream> #include <queue> using namespace std; class Treenode { public: int data; Treenode* left; Treenode* right; Treenode () {} Treenode (int d) {data = d; left = nullptr; right = nullptr;} }; Treenode* Insert (Treenode* root, int data) { if (root == nullptr) { return...
ALGO
0.999933
3.683321
c4545584-86f3-4a64-892c-77a05494a51c
NishantWankhade/tasks
task1.cpp
#include <iostream> #include <vector> using namespace std; /*Task1: take an integer array from user and print the square of each elements of the array .*/ int square(int n) { return n * n; } int main() { int n; cout<<"Give size of array : "; cin>> n; vector <int> array(n); for(int j = 1; j <= n; j++...
ALGO
0.897553
3.38665
aef7322e-e9be-4533-b5bb-41139da7fd64
gimhantharuke456/soilapp
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
bdcfd14f-af8d-42be-858a-d0a6657678dd
UlrikGroth/bachelor
Code/toolbox_graph/mex/gw/gw_toolkit/trackball.cpp
/* * Trackball code: * * Implementation of a virtual trackball. * Implemented by Gavin Bell, lots of ideas from Thant Tessman and * the August '88 issue of Siggraph's "Computer Graphics," pp. 121-129. * * TB_Vector manip code: * * Original code from: * David M. Ciemiewicz, Mark Grossman, Henry Moreton, and ...
ALGO
0.999723
5.53977
b6e5439c-0c77-42ad-b007-3b825f133289
whlongg/HSG11
DTQGSPRING/ContestAlgorithm/D1_TimX.cpp
#include <bits/stdc++.h> using namespace std; #define double long double int main() { ios_base::sync_with_stdio(0); cin.tie(0); double s; cin >> s; double l = 0, r = s; while (r - l > 1e-12) { double mid = (l + r) / 2; if (mid * mid + sqrt(mid) >= s) r = mid; ...
ALGO
0.999635
3.777318
1aa4e3d1-744c-41f9-b620-1905e73379dc
AbdelrahmanShaheen/leetcode-solutions
611-valid-triangle-number/611-valid-triangle-number.cpp
class Solution { public: int triangleNumber(vector<int>& nums) { int sz = nums.size(); int cnt = 0; sort(nums.begin() ,nums.end()); for(int i = 0 ;i < sz-2; i++){ for(int j = i+1 ;j < sz - 1; j++){ auto it = lower_bound(nums.begin()+(j+1) ,num...
ALGO
0.999991
6.083294
2456440f-6660-4766-8b2a-52cdcbad3c5c
nonamexx-cell/graphs
Rat in a Maze.cpp
#include <bits/stdc++.h> using namespace std; int x[] = {1,0}; int y[] = {0,1}; int flag = 0; int n; int isvalid(int a,int b) { if(a<n && b<n && a>=0 && b>=0) return 1; return 0; } void call(vector<vector<int>> &maze,int x1,int y1) { if(x1 == n-1 && y1 == n-1) { flag = 1; retur...
ALGO
0.999957
4.621089
81efd4d9-3626-465e-80cc-47d7a3cb134e
PriyanshuSingh21july/Programming--language-
C++_C/17.While.cpp
#include <iostream> using namespace std; int main() { int i = 5; while (i < 10) { cout << i << " "; i++; } return 0; }
TOOL
0.987162
3.198921
f103f5d7-dc08-404a-8490-5db17df3e402
113bommy/LogicalErrorFixCodeT5
logicalErrorFix_CodeT5_Linenumber/model/cpp/CodeT5_LineNumber_cpp_output/Problem_41_output_152.cpp
#include <bits/stdc++.h> template <typename T> bool umin(T &a, const T &b) { return (a > b ? a = b, 1 : 0); } template <typename T> bool umax(T &a, const T &b) { return (a < b ? a = b, 1 : 0); } using namespace std; const int N = 1001; int n, k; int colors[N][N]; int diff = 0; void slv(vector<vector<int> > sts) { if ((...
ALGO
0.999672
3.756448
21005342-0cab-4e4a-a53e-98018c3e955c
AniketKul/CMPS229_OpenLambda_Ceph
experiments/single-node/docker/boost/libs/bimap/example/bimap_and_boost/property_map.cpp
// VC++ 8.0 warns on usage of certain Standard Library and API functions that // can be cause buffer overruns or other possible security issues if misused. // See http://msdn.microsoft.com/msdnmag/issues/05/05/SafeCandC/default.aspx // But the wording of the warning is misleading and unsettling, there are no // po...
TOOL
0.919641
5.739435
78e0eb06-5f75-4276-a31a-4e894b4dcf63
DWGTech/DWG
deps/libigl/include/igl/ambient_occlusion.cpp
template < typename DerivedP, typename DerivedN, typename DerivedS > IGL_INLINE void igl::ambient_occlusion( const std::function< bool( const Eigen::Vector3f&, const Eigen::Vector3f&) > & shoot_ray, const Eigen::MatrixBase<DerivedP> & P, const Eigen::MatrixBase<DerivedN> & N, const i...
ALGO
0.998272
7.428507
b28a5480-3453-4e08-9a0d-d8fb5ad8adfa
intjarmansuri/gfg_potd
Split the Array.cpp
class Solution { public: int countgroup(vector<int>& arr) { int n = arr.size(); int totalXOR = 0; // Calculate the XOR of all elements in the array for(int i = 0; i < n; i++) { totalXOR ^= arr[i]; } // If totalXOR is not zero, it's imp...
ALGO
0.999986
6.002274
0468884f-7dba-4096-9bfa-d6b342478784
jpsi-0895/dsa
Linked List/Circular LIinked List/Projects/CircularLinkedListProject/src/main.cpp
#include <iostream> #include "CircularLinkedList.h" int main() { CircularLinkedList cll; cll.insertAtEnd(10); cll.insertAtEnd(20); cll.insertAtEnd(30); cll.insertAtEnd(40); std::cout << "Circular Linked List: "; cll.display(); std::cout << "Searching for 20: " << (cll.search(...
ALGO
0.997265
6.019873
85b8c01a-15cd-4c2a-b59d-e49bb24ffc74
dborchard/c-faiss
IndexIVFPQFastScan.cpp
#include <faiss/IndexIVFPQFastScan.h> #include <cassert> #include <cinttypes> #include <cstdio> #include <omp.h> #include <memory> #include <faiss/impl/AuxIndexStructures.h> #include <faiss/impl/FaissAssert.h> #include <faiss/utils/distances.h> #include <faiss/utils/simdlib.h> #include <faiss/utils/utils.h> #inclu...
ALGO
0.978111
4.363216
939605bb-1cd2-48d2-abe2-d14da8ac17c2
kate-ly-zhao/Eckel_ThinkingInCPP
Chp12/CopyingWithPointers.cpp
//: C12:CopyingWithPointers.cpp // Solving the pointer aliasing problem by // duplicating what is pointed to during // assignment and copy-construction. #include "../require.h" #include <string> #include <iostream> using namespace std; class Dog { string nm; public: Dog(const string& name) : nm(name) { cout << "Cre...
TOOL
0.885641
5.466886
fdde1859-3689-477a-bac9-5a85d1e216fd
DivergenOko/Work_experience_C_plusplus
Lesson 4.1/Lesson 4.1.cpp
/*Задача №7: Заправка машины на АЗС.На АЗС имеется четыре терминала. В одном из них можно заправиться только бензином(код топлива1), во-втором - только дизельныи топливом(код топлива 2), в третьем - только газом (код топлива 3), а в четвертом - любым из перечисленных видов топлива (код топлива 4). На АЗС приезжают одн...
ALGO
0.9865
3.431602
fe6d7d98-47b7-436e-9ce9-9c6dc9903c82
khieramihoub/CP-why-not
roman to integer .cpp
class Solution { public: int romanToInt(string s) { unordered_map<char , int> conversion = { {'I' , 1} , {'V' , 5} , {'X' ,10} , {'L' , 50} , {'C' , 100} , {'D' , 500} , {'M' , 1000} } ; int res = 0 ; for(int i = 0 ; i < s.length() ; ++i){ if( i +1 < s.length() && co...
ALGO
0.999758
6.302464
2bf9e372-c161-43ab-afe8-fbeeb397aed2
Peap0ds-23/Leetcode_Submissions
407-trapping-rain-water-ii/trapping-rain-water-ii.cpp
class Solution { public: int trapRainWater(vector<vector<int>>& height) { int n = height.size(); int m = height[0].size(); // pair<int, pair<int, int>> //{height, {r, c}} priority_queue<pair<int, pair<int, int>>, vector<pair<int, pair<int, int>>>, greater<pair<int, pair<in...
ALGO
0.999963
6.280606
5809f052-95a4-4dc4-b370-3f7761b2f295
yosupo06/library-checker-problems
graph/cycle_detection/gen/random_dense.cpp
#include <cstdio> #include <vector> #include <tuple> #include <utility> #include <algorithm> #include "random.h" #include "../params.h" int main(int, char* argv[]) { long long seed = atoll(argv[1]); auto rnd = Random(seed); int N = rnd.uniform(N_MIN, 1000LL); int M = rnd.uniform(M_MAX-100000, M_MAX); ...
TOOL
0.92419
3.844903
c39db13c-1ee0-4a41-a790-700bebddcc2e
DysonHoang/Tin-Hoc
on tap/kiem tra snnt/main.cpp
#include <bits/stdc++.h> using namespace std; bool snt(int x) { if(x<2) return 0; for(int i=2;i<=sqrt(x);i++) if(x%i==0) return 0; return 1; } int main() { int a; cin>>a; if(snt(a)) cout<<1; else cout<<0; }
ALGO
0.999883
4.698317
7377cbaa-953e-4f0b-b63a-888314893965
yzzupgo/MFTCG
Data/abc123_b/ytcode/ac/4870145.cpp
#include <iostream> #include <vector> using namespace std; int EditNums(int n){ if(n % 10 == 0){ return n; }else{ return (n / 10 + 1) * 10; } } int main(void){ int nums[5]; int Enums[5]; int sum = 0; int ans = 10000; for(int i = 0;i < 5;i++){ cin >...
ALGO
0.999695
3.597276
7d80fc4e-c48e-4cd9-9008-5670637d5040
sarvex/leetcode-j
solution/0500-0599/0502.IPO/Solution.cpp
using pii = pair<int, int>; class Solution { public: int findMaximizedCapital(int k, int w, vector<int>& profits, vector<int>& capital) { priority_queue<pii, vector<pii>, greater<pii>> q1; int n = profits.size(); for (int i = 0; i < n; ++i) { q1.push({capital[i], profits[i]}); ...
ALGO
0.999996
5.250391
d8a6cb64-1e7c-47c1-94ef-bee8088f580f
alibaba069/Prog-CPP
Ueb4/Container/Container.cpp
#include <iostream> #include <string> # include <vector> using namespace std; typedef struct paar{ string word; int count; }Paar; Paar inputname() { Paar uno; cout << "Geben Sie ein Wort ein:"; cin >> uno; cout << uno << endl; } int main() { vector <string> vector1; int n; Paa...
ALGO
0.974678
3.770776
b920c2b0-ff22-4d4c-868f-f843411512fa
sunnylpu/sunny-code
c++ programming/loops/factorial_program.cpp
#include <iostream> using namespace std; int main(){ int n,fact; cin>>n; fact=1; int i=1; while(i<=n){ fact=fact*i; i++; } cout<<fact; }
ALGO
0.999992
4.775894
320d8121-2b9e-4a43-9984-cb675fa45366
tsyxyz/leetcode-solutions
71_SimplifyPath.cpp
#include <gtest/gtest.h> #include <string> #include <stack> using namespace std; /* * 如果是字符,入栈 * 如果前一个也是字符、字符串,那就在前一个尾部添加当前字符 * 如果是/:如果前一个也是/,那就不入栈,如果前一个不是/,那就入栈 * 如果是.:出栈一个 * 如果出栈后栈为空,就入栈一个/ * 结束后,将栈内元素全部pop出 * 如果最后一个是/就删掉 * */ class Solution { public: string simplifyPath(string path) { stack<...
ALGO
0.999246
6.126358
f20bb79c-473f-4610-bbce-320adafe5d38
artteam0/OAIP-1-semestr
lab09 (first part) гс/В1/ЛР 9 В1 парабол/ЛР 9 В1 №1/ЛР 9 В1 №1.cpp
#include<iostream> using namespace std; int main() { double a = 1, b = 3, n = 200, h, s1 = 0, s2 = 0, i, x, S; h = (b - a) / (2 * n); x = a + 2 * h; for (i = 1; i < n; i++) { s2 += pow(x, 3) - 3; x += h; s1 += pow(x, 3) - 3; x += h; } S = (h / 3) * ((pow(a, 3) - 3) + 4 * (pow(a, 3) - 3 + h) + 4 * s1 + 2 ...
ALGO
0.998642
3.464321
24f894fa-f229-4fb9-a205-8ced361593d1
alexandraback/datacollection
solutions_5769900270288896_0/C++/yajun/B.CPP
# include <stdio.h> # include <string.h> # include <iostream> typedef long long int lli; using namespace std; # define testin freopen("B-small-attempt0.in", "r", stdin) # define testout freopen("out.txt", "w", stdout) const int N = 20; int R, C; const int INF = 999999; int cb(int x) { int re = 0; while (x) ...
ALGO
0.99931
4.453375
ffe374d9-6b1f-4c4d-8f4d-efc6853e330c
primitivorm/latino-llvm
lib/Tooling/FileMatchTrie.cpp
#include "latino/Tooling/FileMatchTrie.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" #include <string> #include <vector> using namespace latino; using namespace tooling; namespace { /// Defa...
TOOL
0.960808
7.455324
25b9aa3b-3617-44ab-88de-5249b30b6e08
francois141/nori-ray-tracer
ext/nanogui/ext/eigen/doc/examples/class_Block.cpp
#include <Eigen/Core> #include <iostream> using namespace Eigen; using namespace std; template<typename Derived> Eigen::Block<Derived> topLeftCorner(MatrixBase<Derived>& m, int rows, int cols) { return Eigen::Block<Derived>(m.derived(), 0, 0, rows, cols); } template<typename Derived> const Eigen::Block<const Derive...
TOOL
0.934409
5.865374
ee051b76-5336-459a-b9c0-fddca90e1342
SharifdotG/SharifdotG-s-CodeVault
HackerRank/Algorithms/Easy/ACM ICPC Team/acm-icpc-team.cpp
#include <bits/stdc++.h> using namespace std; int main() { int attendees, topics; cin >> attendees >> topics; vector<string> topic(attendees); for (int i = 0; i < attendees; i++) { cin >> topic[i]; } int maxTopics = 0, maxTeams = 0; for (int i = 0; i < attendees - 1; i++) { ...
ALGO
0.999956
4.894543
cf0f840d-4f05-47e3-935c-29ae2b2a35f7
TitikshaBansal/LeetCode
Easy/divideAStringIntoGroupsOfSizeK.cpp
class Solution { public: vector<string> divideString(string s, int k, char fill) { vector<string> ans; int n = s.length()/k; if(s.length()%k != 0) n++; int idx =0; for(int i=0; i<n; i++){ string curr = s.substr(idx, k); idx+=k; if(i == n-1)...
ALGO
0.998515
6.371502
09d523ad-ff4f-4506-b994-1829b90332da
LebrancWorkshop/Learn-CPP-from-Youtube
progth0000/progth0000.cpp
#include <iostream> int main() { int a, b; std::cin >> a >> b; std::cout << a + b << std::endl; return 0; }
ALGO
0.98696
3.573302
09fac2dd-1d8a-413b-90e2-7a36d87541f8
AbhishekKumarMajumdar/CODSOFT
Codesoft/Task_3.cpp
#include <iostream> using namespace std; char board[]={'0','1','2','3','4','5','6','7','8','9'}; //Game Board: void displayBoard(string a,string b){ system("cls"); cout<<"===========================\n"; cout<<"=======Tik Tac Toe ========\n"; cout<<a<<"(X) ========= "<<b<<"(O)\n\n"; cout<<" |...
ALGO
0.998691
4.196419
70043818-21d7-4195-87f6-ddd6be76d309
Djokovic0311/LeetCode
problems/prime_number_of_set_bits_in_binary_representation/solution.cpp
class Solution { public: int findSetBits(int n){ int count=0; while(n){ n=n&(n-1); count++; } return count; } bool checkPrime(int x){ return (x == 2 || x == 3 || x == 5 || x == 7 || x == 11 || x == 13 || x == 17 || x == 19); ...
ALGO
0.999948
5.570217
2957ed25-d87d-44ac-8272-e70681b836c0
aman02022003/Data-Structures-and-Algorithms
Reverse-Vowels-of-a-String.cpp
class Solution { public: bool isVowel(char ch){ ch=tolower(ch); return ch=='a' || ch=='e'|| ch=='i' ||ch=='o' ||ch=='u';//this is vowel ch; } string reverseVowels(string s) { int i=0; int j=s.size()-1; while(i<j){ if(isVowel(s[i])&&isVowel(s[j]))...
ALGO
0.999963
6.439557
f6259584-1c16-4e26-9a53-4ea7aace3c19
koNoJOJOga/Algorithmic_learning-main
代码随想录专项刷题/图/岛屿数量_dfs.cpp
# include <iostream> # include <vector> using namespace std; int dir[4][2] = {0, 1, 1, 0, -1, 0, 0, -1}; void dfs (vector<vector<int>>& grid, vector<vector<bool>>& visited, int x, int y) { for (int i = 0; i < 4; ++ i ) { int next_x = x + dir[i][0]; int next_y = y + dir[i][1]; if (next_x < 0...
ALGO
0.99987
4.318012
df7bff09-3ea5-4db6-9ed9-c07486b6e1ef
jeeb/ffdshow-tryouts
unrar/model.cpp
/**************************************************************************** * This file is part of PPMd project * * Written and distributed to public domain by Dmitry Shkarin 1997, * * 1999-2000 * * Cont...
ALGO
0.999289
4.935517
b3ddfc9e-fa36-4d54-aa60-66a094ce54c0
liuchuo/Algorithm
20160122-1/20160122-1/main.cpp
//算法训练 出现次数最多的整数 //时间限制:1.0s 内存限制:512.0MB //提交此题 // 问题描述 // 编写一个程序,读入一组整数,这组整数是按照从小到大的顺序排列的,它们的个数N也是由用户输入的,最多不会超过20。 //然后程序将对这个数组进行统计,把出现次数最多的那个数组元素值打印出来。如果有两个元素值出现的次数相同,即并列第一, //那么只打印比较小的那个值。 // 输入格式:第一行是一个整数N,N £ 20;接下来有N行,每一行表示一个整数,并且按照从小到大的顺序排列。 // 输出格式:输出只有一行,即出现次数最多的那个元素值。 //输入输出样例 //样例输入 //5 //100 //150 ...
ALGO
0.999837
4.345819
af9bceb0-88e9-4eeb-bed1-33cf888c1248
TeamRocket3/Blender
extern/bullet2/src/BulletCollision/Gimpact/btGImpactShape.cpp
#include "btGImpactShape.h" #include "btGImpactMassUtil.h" #define CALC_EXACT_INERTIA 1 void btGImpactCompoundShape::calculateLocalInertia(btScalar mass,btVector3& inertia) const { lockChildShapes(); #ifdef CALC_EXACT_INERTIA inertia.setValue(0.f,0.f,0.f); int i = this->getNumChildShapes(); btScalar shapemass = ...
ALGO
0.932757
6.914712
54a2d078-1e93-4f62-9af1-8366bfd4bcca
Yougendy/hw4
equal-paths.cpp
#ifndef RECCHECK //if you want to add any #includes like <iostream> you must do them here (before the next endif) #include<iostream> #endif #include "equal-paths.h" using namespace std; // You may add any prototypes of helper functions here bool IfEqualPaths(Node * node, int depth, int& LeafDepth){ if (node == NULL)...
ALGO
0.999559
4.649975
25db3d7c-00f8-4ada-83a7-1f7cf0843412
devweekends/Fellowship-2025-DSA-Series
Level 1/Week 10/Backtracking/40. Combination Sum II/code.cpp
/* Problem: 40. Combination Sum II This is similar to Combination Sum I but with key differences: 1. Each element can only be used once 2. We need to handle duplicates in the input array 3. We skip duplicate elements at the same level to avoid duplicate combinations 4. We use backtracking with careful duplicate handli...
ALGO
0.999993
7.6739
32480ce7-16d0-4413-9adb-a6e4d1378c59
its-me-anubhav/DSA-
RECURSION/fibonacci.cpp
#include<iostream> using namespace std; int fibonacci(int n) { if (n<=1) { return n; } else { int fib = fibonacci(n - 1) + fibonacci(n - 2); return fib; } } void printFibonacciSeries(int n) { for (int i = 0; i < n; i++) { cout << fibonacci(i) << " "; } } int main() { int n; ...
ALGO
0.99986
4.899099
62205632-ee3b-4153-8018-21571bc824e0
janhohenheim/boost
libs/geometry/doc/src/examples/algorithms/relate.cpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // QuickBook Example // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle //[relate //` Shows how to detect if a point is inside a polygon, or not #include <iostream> #include <boost/geometry.hpp> #include <boost/geometry/geometries/point_xy.hp...
ALGO
0.99869
6.485822
de5d31cc-dd05-443e-84f8-f784dab4bb9e
ChordXD/2019Autumn
pat1013.cpp
/* *********************************************** Author :Chord Email:<EMAIL> Created Time :2019/10/4 18:23:06 File Name :pat1013.cpp ************************************************ */ #include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <vector> #include <queue> #include <set> #inc...
ALGO
0.999774
4.281782
7107209d-a50d-4e20-b6bb-6c7123f1be2c
ishandutta2007/codeforces
fdg/normal/717/H.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <memory.h> #include <map> #include <queue> #include <ctime> using namespace std; int a[100002], b[100002]; vector<int> g[50005]; int whT[1000002], whP[50005]; bool go(int n, int m) { for (int i = 0; i < n; ++i) ...
ALGO
0.999969
3.258235
282fc9f2-bdba-40ad-9bf6-ce8903b3a9ea
ishandutta2007/codeforces
xllend3/normal/277/D.cpp
/* Date: 2014/10/22 08:23:06 Wednesday Author: xllend3 */ #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<complex> #include<cstdio> #include<string> #include<vector> #include<queue> #include<cmath> #include<stack> #include<map> #include<set> #define X first #define Y second #define m...
ALGO
0.999941
3.424003
19548998-cc97-442d-be3d-c891fa465b79
phamdocaohiep/samples
snippets/cpp/VS_Snippets_CLR/Generic.SortedList/cpp/remarks.cpp
#using <System.dll> using namespace System; using namespace System::Collections::Generic; public ref class Example { public: static void Main() { // Create a new sorted list of strings, with string // keys. SortedList<int, String^>^ mySortedList = gcnew SortedList<int, Stri...
TOOL
0.991959
5.007149
944afc10-8b2f-49d3-91a5-215d8f8baee1
hakosaj/aoc2021
9d/9.cpp
#include <iostream> #include <algorithm> #include <bitset> #include <chrono> #include <cmath> #include <cstring> #include <fstream> #include <iterator> #include <map> #include <numeric> #include <omp.h> #include <set> #include <sstream> #include <string> #include <unordered_map> #include <vector> using std::cout; usi...
ALGO
0.999198
4.051771
bb7275b9-77c7-4eda-95f8-e135834c37eb
MaxCosta0/CompetitivePrograming
Neps/ContagemDeAlgarismos.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back typedef pair<int, int> pii; typedef vector<int> vi; typedef vector<pair<int, int>> vpii; typedef long long ll; int N; string str; int digits[15]; void sumdigits(char x){ if(x == '0') digits[0]++; else if(x == '1') digits[1]++; else if(x == '2') ...
ALGO
0.99917
4.284471
7d7f308a-1224-4287-8ed7-dfb7f16675b9
letgit0/dss
patterns/2.cpp
#include <iostream> using namespace std; int main(){ int i; for(i=0;i<5;i++){ for( int j=0;j<=i;j++){ cout<<" * "; } cout<<endl; } }
ALGO
0.999918
3.280496
acd97276-9878-44c4-a045-af1fb03b394d
alexandraback/datacollection
solutions_1673486_1/C++/CrBoy/A.cpp
#include <cstdio> using namespace std; int main(int argc, const char *argv[]) { int T, A, B; int casen = 0; double min_expect, expect, prob, all_prob; scanf("%d", &T); while(casen<T){ scanf("%d%d", &A, &B); min_expect = B+2; // drop and retype all_prob = 1; for(int i = 1; i <= A; i++){ expect = 0; ...
ALGO
0.998174
3.273124