uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
985e5baa-ee51-4c0b-9b9a-d82a4cd0954e
UtkirbekYuldoshev96/Cpplus-dastur-tilida-1000-homeworks
16-mavzu/3/main.cpp
#include <iostream> using namespace std; int main() { int a,b, son = 0; cout<<"a = "; cin>>a; cout<<"b = "; cin>>b; for(int i=b-1; i>=a; i--){ cout<<"i = "<< i << endl; son++; } cout<<"Raqamlar yig'indisi = "<< son << endl; return 0; }
ALGO
0.984988
3.133337
84bb4015-931c-48fe-9980-f7a9a8385e57
shivanand0/CP-2-Practicals
Practical 8/practical_8-1.cpp
// Distinct Subsequences #include <iostream> #include <iomanip> #include <vector> #include <algorithm> #define MAXZ 101 using namespace std; class integer { friend ostream & operator << (ostream&, const integer & ); public: integer() {}; integer(unsigned int orginal) { do { digits.push_back(org...
ALGO
0.999942
4.447062
d141c197-4434-42d9-8ee7-98f2a935f193
kanish-10/DSA
StriverA2Z/C++/13_BinaryTree/morris_traversal_inorder.cpp
#include<bits/stdc++.h> #include "Node.h" using namespace std; void getInorder(Node *root) { vector<int> inorder; Node *cur = root; while (cur) { if (!cur->left) { inorder.push_back(cur->data); cur = cur->right; } else { Node *prev = cur->left; ...
ALGO
0.999987
5.807835
50b11276-54ac-4503-9ed9-9645acdaec22
joowook/algorithm
etc/etc/L.cpp
//#include<iostream> //#include<vector> //#include<algorithm> //#include<string.h> //using namespace std; // //int arr[20001][20001]; //bool ch[20001]; //long long ans = 1000000000; //long long a[3]; //int n, m; //void findre(int index, long long w) //{ // if (ch[index]) // return; // ch[index] = true; // ...
ALGO
0.99999
4.051241
ad36ae5e-4b71-4c0a-9f70-adb27ac1ecbe
arifparvez14/Basic-and-competetive-programming
Online-Judge-Solution/UVA Solutions/11614(Etruscan Warriors Never Play Chess).cpp
#include<bits/stdc++.h> using namespace std; int main() { long long int T,n,s; cin>>T; while(T--) { cin>>s; n=(sqrt(1+8*s)-1)/2; printf("%lld\n",n); } return 0; }
ALGO
0.99972
3.660555
cedaa341-7a75-43d1-b814-1a2ce2a9ba68
rundel/advent_of_code_2021
day06/day06.cpp
#include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] int sim(std::vector<int> x, int days) { for(int i=0; i<days; i++) { Rcpp::Rcout << i << "\n"; int n = 0; for(int j=0; j < x.size(); j++ ) { x[j]--; if (x[j] == -1) { n++; x[j] = 6; } } for(...
ALGO
0.999447
4.503662
2cb0bb68-51d6-4f07-a023-3b8d42c7a383
pinakin2050/CPP-Others
12-Functions/NearByIntFns.cpp
#include<iostream> #include<cmath> int main() { float f=2.777; std::cout<<"Value of f:"<<f<<std::endl; std::cout<<"Round off value of f:"<<nearbyint(f)<<std::endl; double d=1341.7767; std::cout<<"Value of d:"<<d<<std::endl; std::cout<<"Round off value of d:"<<nearbyint(d)<<std::endl; long...
ALGO
0.983416
3.405755
694847b6-6ad0-4a1d-be23-fc9026111747
PrathamGupta99/revisewithArsh
Goldman_Sachs/07_distribute_in_circle.cpp
#include <iostream> using namespace std; /* https://www.interviewbit.com/problems/distribute-in-circle/ */ int solve(int A, int B, int C) { int ans = (C + A - 1) % B; if (ans == 0) ans = B; return ans; }
ALGO
0.999933
4.554864
8c597185-8905-4faa-a02f-f78f004341a3
juneharold/USACO
usaco_practice/silver/silv_practice/XCorr.cpp
#include <iostream> #include <algorithm> using namespace std; #define ll long long #define f first #define s second const ll MAX=3e5+5; ll N, M, a, b, pfs[MAX]={}; pair<ll, ll> x[MAX]={}, y[MAX]={}; ll bs1(ll i) { ll lo=1, hi=M; while (lo<hi) { ll mid=(lo+hi)/2; if (y[mid].f<i+a) lo=mid+1; ...
ALGO
0.999576
3.728087
575ae603-d28a-4039-bcf7-7208f3e4e4df
JrSousaJ/Uri-Solved-Problems
1610.cpp
#include<bits/stdc++.h> using namespace std; int cor[10002]; vector<vector<int > > g; bool aa=false; void dfs(int u) { cor[u]=1; for(int i=0;i<g[u].size();i++) { int v=g[u][i]; if(cor[v]==0) { dfs(v); } else if(cor[v]==1) { aa=true; return ; } ...
ALGO
0.999961
4.754819
5817e8bf-8eff-4d82-8e28-6cfc74ed1bac
alexandraback/datacollection
solutions_2463486_0/C++/Hungry/solution.cpp
#include <cstdio> #include <cstdlib> #include <cmath> #include <iostream> #include <cstring> #include <vector> #include <map> #include <queue> #include <stack> #include <algorithm> using namespace std; long long num[40] = { 0, 1, 2, 3, 11, 22, 101, 111, 121, 202, 212, 1001, 1111, 2002, 10001, 10101, 10201, 11011, 1111...
ALGO
0.999925
3.629129
97c43027-b326-4602-810b-c27032598e59
jayeshpatel8/Coding-Practise-using-Leetcode-Coding-Platform
problems/number_of_ways_of_cutting_a_pizza/solution.cpp
class Solution { public: int dp1[51][51][11], M, N, mod = 1e9 + 7; int ways(vector<string>& pizza, int k) { M = pizza.size(), N = pizza[0].size(); vector<vector<int>> psum(M+1,vector<int>(N+1)); for (int i=0; i<M; i++){ for (int j=0; j<N; j++){ ps...
ALGO
0.999847
5.567092
d617a6de-ba8a-4804-a4b1-36095758b6ac
raincross7/code-similarity
codes/train_code/problem263/problem263_69.cpp
#include <bits/stdc++.h> using namespace std; void chmax (int &x, int a) { x = max(x, a); } int h, w; char s[2004][2004]; set < int > ver_bor[2004], hor_bor[2004]; // vertical borders, horizontal borders signed main () { cin >> h >> w; for (int i = 0; i < h; ++i) { for (int j = 0; j < w; ++j) { ...
ALGO
0.999667
4.118085
fcc9912c-7c03-4821-b08a-89c7c59b81a1
akshatrksingh/Data-Structures-and-Algorithms-Practice-CPP
CSES-1667-MessageRoute.cpp
// SSSP on unweighted graph #include <bits/stdc++.h> using namespace std; vector<int> vis; vector<vector<int>>adjList(100000); void printPath(vector<int> &parent, int j) { if (j == -1) return; printPath(parent, parent[j]); cout<<j+1<<" "; } void messageRoute(vector<vector<int>> &adjList, int V) {...
ALGO
0.999976
4.529098
35ad274b-d266-40c2-8a44-81468f21f272
ishandutta2007/codeforces
alexxela12345/normal/1450/C1.cpp
//#pragma GCC optimize("Ofast,unroll-loops,fast-math,inline,no-stack-protector") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.1,sse4.2,avx,avx2,abm,mmx,popcnt") #include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; vector<string> arr(n); for (int i = 0; i < n; i++) { ...
ALGO
0.999942
5.890286
f8cdca3a-cbef-4f5e-8730-d99579500976
cledybs/Parallel_Computing
CPD_T01/main.cpp
#include <iostream> #include <chrono> const int MAX = 10; int main() { double A[MAX][MAX], x[MAX], y[MAX]; int i, j; for (i = 0; i < MAX; i++) { x[i] = i + 1; y[i] = 0; for (j = 0; j < MAX; j++) { A[i][j] = i * j; } } auto start1 = std::chrono::high_r...
ALGO
0.994035
4.025556
e9be7253-75d7-423f-aa6c-d2c8ba9509e3
austinguish/lammps
lib/kokkos/example/multi_fem/BoxMeshPartition.cpp
#include <iostream> #include <sstream> #include <stdexcept> #include <limits> #include <BoxMeshPartition.hpp> //---------------------------------------------------------------------------- namespace { void box_partition( size_t ip , size_t up , const BoxType & box , BoxType * ...
ALGO
0.994928
6.148699
97b22d4c-567c-422c-8bce-fbc4e1af9636
raincross7/code-similarity
codes/train_code/problem353/problem353_439.cpp
#include <iostream> #include <string> #include <vector> #include <list> #include <map> #include <queue> #include <stack> #include <algorithm> #include <fstream> #include <sstream> #include <iomanip> using namespace std; long long MOD = 1000000007; int main(){ int N; cin >> N; priority_queue<pair<int, int...
ALGO
0.999672
3.743491
740f7fb5-8005-41b1-97c4-57c97ce57321
NotAPattern/programming-languages-labs
C++/Lab0/Lab01/Main.cpp
#include <iostream> #include <conio.h> #include <cstring> #include <fstream> #include <stdio.h> #include "Header.h" using namespace std; int main() { setlocale(LC_ALL, "RUS"); double **A; int n = 0, m = 0; A = new double*[n]; char buffer[100]; file_input(A, n, m, buffer); system("pause"); return 0; } /*double...
ALGO
0.97201
3.12413
7811c193-737e-4248-8c9b-fda24ceb5832
AndHager/SysCallStubber
llvm-project/compiler-rt/lib/fuzzer/FuzzerIOWindows.cpp
#include "FuzzerExtFunctions.h" #include "FuzzerIO.h" #include <cstdarg> #include <cstdio> #include <fstream> #include <io.h> #include <iterator> #include <sys/stat.h> #include <sys/types.h> #include <windows.h> namespace fuzzer { static bool IsFile(const std::string &Path, const DWORD &FileAttributes) { if (FileA...
TOOL
0.887571
5.735372
aefe3738-12d8-4a78-bb4b-8060ac2f56f5
JunBinLiang/Road-To-1900
Leetcode/Trie/1268-Search Suggestions System(M).cpp
struct Trie { int tr[(100000 + 10)][26]; vector<string> a[(100000 + 10) * 26]; int id = 1; void init() { memset(tr, -1, sizeof tr); } void add(string& s) { int u = 0; for(int i = 0; i < s.size(); i++) { int c = s[i] - 'a'; if(tr[u][c] == -1) ...
ALGO
0.999973
6.424974
6a662035-c7ab-4ab0-b9b3-f3536be2e316
lol-James/CPE
One_star_Questions/019_Box_of_Bricks/Box_of_Bricks.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, set_count = 1; while (cin >> n) { if (n == 0) break; int sum = 0, a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; sum += a[i]; } int avg = sum / n, ans = 0; for...
ALGO
0.999338
3.40486
bbbb276f-1fc7-4d2c-b494-044cae21be9a
dongkeqin/CodeCloneCorpus
medium/corpus/cpp/24.cpp
#include "X86.h" #include "X86InstrInfo.h" #include "X86Subtarget.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/ProfileSummaryInfo.h" #include "llvm/CodeGen/LazyMachineBlockFrequencyInfo.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/Ma...
TOOL
0.856813
4.592903
514529e2-2aff-4269-90c4-406621b5f97b
leewoojye/Baekjoon_Online_Judge
baekjoon_online_judge/1261b.cpp
#include <iostream> #include <vector> #include <queue> #include <string> #include <chrono> using namespace std; struct state { int x, y, broken; state(int xP, int yP, int bP) : x(xP), y(yP), broken(bP) {} bool operator>(const state& other) const { return broken > other.broken; // 다익스트라는 broken이 작은...
ALGO
0.999906
5.703853
b2f909cc-2212-4f97-957f-56b5da60eaec
hadleyhzy34/data_structure_and_algorithm
stack/LeetCode_stack/71_simplify_path.cpp
#include <stdio.h> #include <string> #include <iostream> #include <stack> #include <unordered_map> #include <queue> #include <vector> using namespace std; class Solution71 { public: string simplifyPath(string path) { stack<string>s; auto it=path.begin(); while(it!=path.end()){ /...
ALGO
0.999816
5.193183
49aa090d-9558-497a-bc6f-fc1ba5b1e969
jiv-256/cpp
02_Basic_question_using_functions/02_Factorial.cpp
// write a programe for calculating factorial (nCr = n! / r! * (n - r)!) #include<iostream> using namespace std; int numerator(int n){ int num = 1; // Initialize num to 1 for(int i = n; i >= 1; i--){ num = num * i; } return num; } int denominator(int n, int r){ int part1 = 1; // r! f...
ALGO
0.999636
5.714063
d6df03ff-55e4-4074-af88-a03c50c63266
sajjad-ali-01/Data-Structures-and-algorithm
Graphs/BFS(Breadth-First Search).cpp
#include <iostream> using namespace std; int visited[7] = {0,0,0,0,0,0,0}; int arr[7][7] = { {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0}, {0,0,0,0,0,0,0} }; class queue{ private: int rear; int front...
ALGO
0.999986
3.985847
1619824c-edc0-4a27-a36b-d228f4f557b2
acquaman/acquaman
source/Eigen/unsupported/test/NumericalDiff.cpp
#include <stdio.h> #include "main.h" #include <unsupported/Eigen/NumericalDiff> // Generic functor template<typename _Scalar, int NX=Dynamic, int NY=Dynamic> struct Functor { typedef _Scalar Scalar; enum { InputsAtCompileTime = NX, ValuesAtCompileTime = NY }; typedef Matrix<Scalar,InputsAtCompileT...
TEST
0.981836
6.185318
bc5dc6a5-3ec3-425e-bbf8-7300824936b3
ZeaLot4J/Algorithms-DataStructures
StackApplication.cpp
#include <iostream> #include <cstdlib> #define MAXSIZE 100 using namespace std; /* 可以输入0~9之间的数,进行表达式加减乘除运算 */ typedef struct iStack { int data[MAXSIZE]; int top; }iStack; typedef struct cStack { char data[MAXSIZE]; int top; }cStack; void InitStack(iStack &S) { S.top = -1; } void InitStack(cSta...
ALGO
0.999574
3.524692
ed58e434-dcac-4fe9-a756-6efd8499285a
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_5078_25.cpp
#include <bits/stdc++.h> using namespace std; int main() { long double a, b; cin >> a >> b; cout << (long long)trunc(a * b); }
ALGO
0.99943
4.127501
03216cc5-20a0-4d9c-90d6-10cedd1f8f19
Aman12b/Uni-uebungs-bsp
Pr1_Uebungs_Bsp/week1/Aufgabe1_7/Aufgabe1_7.cpp
#include<iostream> #include<cmath> using namespace std; int main(){ double betrag, kurs{0.85}; int auswahl; cout<<"Geben sie eine Geldbetran ein"<<endl; cin>> betrag; cout<<"Fuer Doller auf Euro waehlen sie 1"<<endl; cout<<"Fuer Euro auf Doller waehlen sie 2"<<endl; cin>> auswahl; swit...
ALGO
0.918436
4.614192
4e3db1d8-c740-4a31-8f39-56065e2e9544
shelltdf/osgall
prebuild/cgal-master/Interpolation/examples/Interpolation/surface_neighbor_coordinates_3.cpp
// example with random points on a sphere #include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/point_generators_3.h> #include <CGAL/algorithm.h> #include <CGAL/Origin.h> #include <CGAL/surface_neighbor_coordinates_3.h> #include <iostream> #include <iterator> #include <vector> typedef CGAL...
ALGO
0.998294
6.636925
d24403b6-b099-4ad4-840d-094d6787cdb0
redeff/cmp
training-camp/2019/03/B/main.cpp
#include <bits/stdc++.h> using namespace std; struct Point { double x; double y; }; double dot(Point a, Point b) { return a.x*b.x + a.y*b.y; } double cross(Point a, Point b) { return a.x*b.y - a.y*b.x; } Point operator+(Point a, Point b) { return Point {a.x+b.x, a.y+b.y}; } Point operator-(Point a, Point b) {...
ALGO
0.999874
4.183442
53475ad3-2f66-4207-b1dd-0a198dda7aad
imsay3m/cs-fundamentals-2023
semester-02/basic-data-structures/week-06/conceptual-session-01/search-recursive-bst.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *left; Node *right; Node(int val) { this->val = val; this->left = NULL; this->right = NULL; } }; void insert(Node *&root, int v) { Node *newNode = new Node(v); if (root == NULL) {...
ALGO
0.99999
4.506966
83f6bfde-862a-4d6e-8c83-6dbe93aec089
jle148/AI-project-1
Project1-jle148.cpp
//main.cpp #include "bc.h" #include "fc.h" #include <iostream> using namespace std; int main(){ string problem; string solution; cout << "Starting backwards chaining code....\n" << endl; bc backwards; problem.assign(backwards.start()); cout << "Done with backwards chaining, your problem is ...
ALGO
0.987985
4.198942
8944d03e-9e03-4f14-878c-5039af7c7c8a
CircuitDev192/Assorted_Cpp_Programs
Programming 1 and 2 Files/Even-While-For/even-while.cpp
/* * Name: Matthew Ashmore * Course: CSC 2134 * Program Name: even-while.cpp * Program Description: Using a while loop, this program will display all odd numbers from 1-100. */ #include <iostream> using namespace std; int main() { //Declare variable for loop counter int count = 1; //As long as count i...
ALGO
0.989299
4.131223
052b9e9a-910d-4f32-b24f-5ec3b10248c7
khristinatsymbala/CPPTrainingHubCoursesExercisesRepository
Beginning C++ Programming - From Beginner to Beyond/Section_11_Functions/03_FunctionPrototypes.cpp
// Area of Circle and Volume of a Cylinder /* ---------Section 11 - Function Prototypes ---------------- The compiler must 'know' about a function before it is used - Define func before calling them: - OK for small programs - Not a practical solution for larger programs - Use function prototypes: - tell ...
TOOL
0.980034
6.650808
0bf3d229-602e-4d04-b40c-32e986e2f44b
AditiMishra2003/leetcode_practice_questions
0092-reverse-linked-list-ii/0092-reverse-linked-list-ii.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* reverseBet...
ALGO
0.999998
5.712447
9affd3b0-a68d-499e-ba77-79ac39ec74f4
stamp465/C_Programming
Camp2_61/Basic/MonteCarlo.cpp
#include<bits/stdc++.h> using namespace std; int main() { double N,in=0; cin >> N; for(int i=0;i<N;i++) { double a,b; cin >> a >> b; double d = sqrt(a*a+b*b); if(d<=1) in++; } double out = in/N; printf("%.3f",out); }
ALGO
0.995686
3.758091
0b17627a-0208-4c47-b05c-7afbebd17780
Amoo-Srwsh/solve-rubik-s-cube
Rubiks-Cube-Solver-master/Rubiks-Cube-Solver-master/src/rCube.cpp
#include <iostream> #include "../headers/rCube.hpp" #define debug /* * When referencing the cube, the front face will be 0, the back will be 3 * The east side face will be 1, the west will be 4 * The top side face will be 2, the bottom 5 * * */ /* Just for reference these are the proposed faces of completion...
ALGO
0.99323
6.106557
18f23c8b-949b-46df-bf82-6a3c7935e279
Ducwjbu/BaitapLTNC
7.1.cpp
#include <bits/stdc++.h> using namespace std; int binary_search(int a[], int n, int x){ int l = 0, r = n-1; int mid = (l+r)/2; if(mid == x){ cout << "FOUND"; return 1; } else if(x < mid){ r = mid - 1; } else l = mid + 1; cout << "NOT FOUND"; return 0; } int main(){ int n; cin >> n; int a[n]; for(...
ALGO
0.999978
4.523112
3f1ebaf8-fb0e-4589-913e-2b9e85065815
Satyam22462/MatrixCalculator
app/src/main/cpp/eigen-3.4.0/bench/vdw_new.cpp
#include <iostream> #include <Eigen/Core> using namespace Eigen; #ifndef SCALAR #define SCALAR float #endif #ifndef SIZE #define SIZE 10000 #endif #ifndef REPEAT #define REPEAT 10000 #endif typedef Matrix<SCALAR, Eigen::Dynamic, 1> Vec; using namespace std; SCALAR E_VDW(const Vec &interactions1, const Vec &inter...
ALGO
0.999723
3.519938
5bd51d5f-6956-4cfb-b1fd-9f298de3a1ba
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_1571_1.cpp
#include<iostream> #include<vector> #include<set> using namespace std; static const int MAX = 100000; vector<int> G[MAX]; int N; bool visited[MAX]; int prenum[MAX], parent[MAX], lowest[MAX], timer; void dfs(int current, int prev) { prenum[current] = lowest[current] = timer; timer++; visited[current] = true; ...
ALGO
0.999966
4.924045
6da5cd04-0f34-4078-be10-013526074480
irtefa/dumbshit
lab06/collage.cpp
#include "collage.h" /** * Constructor * @param layers - PNG images that will be used in the collage * @param coords - where each image is relative in the entire collage's coordinate system */ Collage::Collage(const vector<PNG> & layers, const vector<Point> & coords) { this->layers = layers; this->coords =...
ALGO
0.99241
4.759011
5d39358a-9ee7-44b5-be08-cf4e8f7f13a7
rofnavarro/42-CPP
cpp02/ex03/bsp.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* bsp.cpp :+: :+: :+: ...
ALGO
0.998942
5.981748
183c808d-e997-4111-af13-92b9b0b08682
IIIIIIIIIU/TXT
20171027/Codeforces883F.cpp
#include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; string s[401],t; int main() { int n; scanf("%d",&n); bool ok; int k,len; for(int i=1;i<=n;i++) { cin>>s[i]; len=s[i].size(); /*if(i==9) { int as=47; }*/ t.clear(); for(int j=0;j<len;j++) { if(s[i...
ALGO
0.997992
3.275801
87b73dbf-6653-4dbc-af54-2de39ce23d74
soolabettu/cp
atcoder/abc_215/d.cpp
#include "bits/stdc++.h" using namespace std; using ll = long long; using vs = vector<string>; using vi = vector<int>; using vl = vector<ll>; using vb = vector<bool>; using pi = pair<int, int>; using pl = pair<ll, ll>; using vpi = vector<pair<int, int>>; using vpl = vector<pair<ll, ll>>; using ld = double; #define sz...
ALGO
0.999971
3.851017
0f759766-38df-4a7f-a1a8-61e526b90ece
Kaileshwaran13/CodeChef
1400 - 1600 difficulty rating/GCD and LCM.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n, m, k; cin >> n >> m >> k; int tem = gcd(n, m); int tem1 = min(n, m); if (k <= 1) cout << tem + tem1 << endl; else cout << tem * 2 << ...
ALGO
0.999971
3.995091
638dd5ca-a171-4c64-b4a7-7982fb7ee427
khaledsliti/CompetitiveProgramming
cses/Sorting_And_Searching/1073.cpp
// We only fail when we stop trying #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define endl '\n' #define D(x) cerr << #x << " = " << (x) << '\n' #define sz(x) ((int)(x).size()) #define all(x) (x).begin(), (x).end() typedef long long ll; int main() { int n; cin >> n; m...
ALGO
0.999732
4.198437
711dab9b-5214-4847-821e-f258c90e698f
atharvarakshak/competitivecoding
AliceBobAndCandies.cpp
#include <bits/stdc++.h> using namespace std; /* TYPES */ #define ll long long #define pii pair<int, int> #define pll pair<long long, long long> #define vi vector<int> #define vll vector<long long> #define mii map<int, int> #define si set<int> #define sc set<char> /* FUNCTIONS */ #define f(i,s,e) for(long long int i...
ALGO
0.999563
3.663917
6f5b3177-6c3f-4745-9afd-b5fe3e0a1aed
kovaliova-anastasiya/CourseProject
NandreyN-termpaper-4b613b3ab1df/WindowsApp/Sorter/main.cpp
#include "mpi.h" #include <iostream> #include <Windows.h> #include <string> #include <vector> #include <chrono> const char* executable_name = R"(C:\Users\andre\PycharmProjects\term_paper\WindowsApp\Sorter\x64\Release\ProcessSorter.exe)"; // main.exe NUMBER_OF_PROCS NUMBER_OF_FILES MODE int main(int argc, char* argv[]...
TOOL
0.984211
3.839747
c2149517-71ac-4e7f-9fd9-1489fa5e3766
gitter-badger/AlgorithmsAndDataStructures
Hanoi/main.cpp
#include <iostream> #include <vector> #include <utility> #include <map> #include <string> //---------------------------------------------------------------------------------------------------------------------------------------------- typedef std::pair<int, int> Move; enum Towers {A, B, C}; //------------------------...
ALGO
0.999743
5.666679
66b786ce-34f4-42c0-b029-1f149c3cd080
amitprat/PracticeCode
longestSubsetInArrWithMaxDiffOf1.cpp
/*Reference : http://www.careercup.com/question?id=5644609608744960*/ Given a list of integers, e.g.: { 2, 6, 7, 9, 1, 0, 1, 2, 3, 6 } . Write an time efficient algorithm to find the longest subset in which the difference between the minimum and maximum numbers is 0 or 1. The subset can have a length of 0 and can ho...
ALGO
0.999846
4.574113
81e7b21d-9d39-46a9-a394-5e1199704953
ambak/CSES-solutions
Range Queries/Distinct Values Queries.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int M = 200009; int d[M]; int t[M]; int nn[M]; void update(int x, int v) { for (; x < M; x += x & -x) { t[x] += v; } } int query(int x) { int res = 0; for (; x > 0; x -= x & -x) { res += t[x]; } return res; } int main() { int n, q;...
ALGO
0.999972
4.080729
9cbf7c54-3444-452d-b444-6e49881eb933
565353780/sdf-generate
sdf_generate/Lib/ManifoldPlus/3rd_party/libigl/tutorial/715_MeshImplicitFunction/main.cpp
#include <igl/copyleft/marching_cubes.h> #include <igl/sparse_voxel_grid.h> #include <igl/opengl/glfw/Viewer.h> #include <Eigen/Core> #include <iostream> #include "tutorial_shared_path.h" int main(int argc, char * argv[]) { // An implicit function which is zero on the surface of a sphere centered at the origin wit...
ALGO
0.952183
7.383038
e60dd2af-87e9-4057-8305-b06003efb9fc
mnhtrieu/advent2021
02_day/02_day.cpp
#include <bits/stdc++.h> using namespace std; using ll=long long; using ld=double; #define FOR(i,a,b) for(ll i=a;i<(ll)b;++i) #define F(n) FOR(i,0,n) #define FF(n) FOR(j,0,n) #define aa first #define bb second #define PB push_back #define EQ(a,b) (fabs(a-b)<=(fabs(a+b)*EPS)) #define MOD ((ll)(1e9+7)) // #define FILE "...
ALGO
0.999837
4.912299
19c0167a-d55a-45d6-909c-be786ebc5dea
mdmehedi121888/math-for-competitive-programming
Prime-number.cpp
#include<bits/stdc++.h> typedef long long ll; using namespace std; bool isPrime(int n){ if(n<2) return false; if(n==2 || n==3) return true; if(n%2==0 || n%3==0) return false; for(int i=5;i*i<=n;i+=6) if(n%i==0) return false; return true; } void solve(){ int n;cin>>n; cout<<isPrime(n); } int main(){ ios_base::sync_wit...
ALGO
0.999903
4.253062
6068c384-ac3a-415b-96ad-f571c9a691e6
Tushar-mn/dsa_practice
886-score-of-parentheses/score-of-parentheses.cpp
class Solution { public: int scoreOfParentheses(string s) { stack<int> st; st.push(0); for(char c: s){ if(c == '('){ st.push(0); } else { int inner = st.top(); st.pop(); int outer = st.top(); st.pop(); ...
ALGO
0.999898
5.633632
d86e4056-5d8a-49db-b99d-a233b63ad34a
thegamer1907/Code_Analysis
contest/1542580778.cpp
#include<iostream> #include<fstream> #include<istream> #include<ostream> #include<vector> #include<deque> #include<set> #include<map> #include<queue> #include<string> #include<cstring> #include<sstream> #include<cmath> #include <stdlib.h> #include<iomanip> #include<algorithm> #include<assert.h> using n...
ALGO
0.999829
3.498266
e779ee51-a890-4193-a588-64f767a214b3
turzacse/BS-23-Preparations
RedBlue.cpp
#include <iostream> #include <vector> #include <cstdlib> #include <ctime> #include <bits/stdc++.h> using namespace std; // Function to simulate drawing two balls from the bag pair<int, int> drawBalls(vector<int>& bag) { int idx1 = rand() % bag.size(); // Random index for the first ball int ball1 = bag[idx1]; ...
ALGO
0.999782
6.128024
32a079bc-5a53-4793-ac34-b41e40ddaf8b
fciapsa/Competitive-Programming
AceptaElReto/406YongeStreet.cpp
#include <iostream> #include <string> int main() { int i, j, k, prev, T, x; std::string s; std::cin >> s; while(std::cin) { i = 0; prev = -1; while (i < s.size()) { while (i < s.size() && s[i] != '|') ++i; if (i != s.size()) { j = i - 1; k = i - 1; while (j > prev) { if (s[j] != '.')...
ALGO
0.988082
3.177491
346aaa9d-c63b-4caf-aa3c-c1cfa177a26d
min02choi/Cpp-Programming
C++ Programming/Week11/MultiInheritance.cpp
#include <iostream> #include <string> #include <vector> /* ߻ */ using namespace std; class Polygon { protected: int m, n; public: Polygon(int m, int n); void draw(); virtual ~Polygon(); // Ӱ踦 ο дٸ destructor virtual ϴ // virtual void draw() = 0; }; class Rectangle : public Polygon { public: Rectangle(int ...
ALGO
0.984808
3.314827
3b8e50b5-54b7-43ea-a3ce-149aa7995f53
sqmedeiros/sblp2023-time-vs-energy
1140-Projects/c++/rand30/2984311.cpp
// Problem Link :- /* By- Anand Singh */ #include<bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> //#include <ext/pb_ds/tree_policy.hpp> //#include <ext/pb_ds/trie_policy.hpp> //using namespace __gnu_pbds; using namespace std; #define getFast ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0) #defin...
ALGO
0.999696
3.819535
3aff8cd7-121b-44f3-ba75-28615d1cece8
AnastasiaStulova/EuroLLVM2018Hack
lib/Analysis/ModuleSummaryAnalysis.cpp
#include "llvm/Analysis/ModuleSummaryAnalysis.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/MapVector.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llv...
TOOL
0.929174
6.787498
19f67f18-83e4-4cfe-8814-6b82caed427c
tranminh21202/DSACode
src/solocphat2.cpp
#include<bits/stdc++.h> using namespace std; vector<string> v; void init(){ queue<string> q; q.push("6"); q.push("8"); v.push_back("6"); v.push_back("8"); while(1){ string tmp = q.front(); q.pop(); if(tmp.length() == 15) break; q.push(tmp + "6"); q.push(tmp + "8"); v.push_back(tmp + "6"); v.push_ba...
ALGO
0.999288
4.870976
b5f4da07-0d40-49df-8ca6-e218bc2fbeca
Zewang0217/programing_design_ECNU_-
1088password.cpp
/* #include <iostream> #include <string> using namespace std; string proccess(string plaintext, string key) { string ciphertext = ""; int i = 0; for (auto& ch : plaintext) { if (ch == ' ') { ciphertext += ' '; continue; } int shift = key[i % key.length()] - 'A'; char encrypted = ((ch - 'A' + shift) %...
ALGO
0.999025
4.714896
95d24e11-6ad2-40a6-b724-5fe064c05407
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_11888_3.cpp
#include <bits/stdc++.h> using namespace std; inline int read() { int x = 0, f = 1; char c = getchar(); while (c < '0' || c > '9') { if (c == '-') f = -1; c = getchar(); } while (c >= '0' && c <= '9') { x = x * 10 + c - '0'; c = getchar(); } return x * f; } int a[300005]; set<pair<int, int...
ALGO
0.999402
3.60826
fa9ae4eb-d7ad-4f0b-9e06-8d8ea3d5795e
DangerousCactus/BOJ
Number_of_different_substrings_2.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; struct SuffixArray { vi sa, lcp; SuffixArray(string& s, int lim = 256) { // or b...
ALGO
0.999991
4.840136
eb2843a5-f915-4057-84d6-2d8174d8c81e
zkxshg/AlgoToolBox
Math_CheckStrainghtLine.cpp
// Determine if points in sets are in same one straight line bool checkStraightLine(vector<vector<int>>& coordinates) { int num = coordinates.size(); if (num == 2) return true; double k, b; bool vertical = false; int x1 = coordinates[0][0], x2 = coordinates[1][0]; int y1 = coordinates[0][1], ...
ALGO
0.998338
4.954765
ee3f77aa-5011-4c36-a8ed-f5e6966e4eb6
Misaka2298/Misaka2298_OI_Project
比赛/Accoders多校联训/测试6/A正解 - 0的个数.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 1e6+10; int n; long long cnt2, cnt5; signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); freopen("zero.in", "r", stdin); freopen("zero.out", "w", stdout); cin >> n; for(int i = 1 ; i <= n ; i ++) { long long a; cin >> a; if(a == 0) ...
ALGO
0.999938
4.828933
4d3d8eb4-6e8b-42da-ae20-cc50ff907f91
vina123baov/Weekly-Report-Combinatorics-and-Graph-Theory-
Week 6/Tree_Degree_Sequence.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> #include <cmath> #include <set> using namespace std; // P 10.2.17 bool isTreeDegreeSequence(vector<int> degrees) { int n = degrees.size(); int sum = 0; for (int d : degrees) { if (d < 1) return false; sum += d; ...
ALGO
0.997312
5.847727
a21a3dc9-adc0-4a41-aa56-5383ab7e0588
securesystemslab/llvm-project
mlir/lib/Dialect/Vector/VectorUtils.cpp
#include "mlir/Dialect/Vector/VectorUtils.h" #include "mlir/Analysis/LoopAnalysis.h" #include "mlir/Dialect/Affine/IR/AffineOps.h" #include "mlir/Dialect/StandardOps/IR/Ops.h" #include "mlir/Dialect/Vector/VectorOps.h" #include "mlir/IR/Builders.h" #include "mlir/IR/IntegerSet.h" #include "mlir/IR/Operation.h" #include...
ALGO
0.922706
6.865187
226ab35a-d981-4cec-be65-4dd1f0bfcdeb
Munawertaj/Codeforces
B_Taisia_and_Dice.cpp
/* Date: 27 January 2023 Problem Link: https://codeforces.com/contest/1790/problem/B Author: Tareq Munawer Taj CSE, Rajshahi University */ #include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define ld long double #define pb push_back #define mp make_pair #define pii pair<int, int> #define...
ALGO
0.99976
4.593815
abebd3a8-900f-4dd9-9f32-a411b234e88a
ahsabshiraz/gfg-question
2.MATHEMATICS/2_palindrome.cpp
// Palindrome number #include <iostream> using namespace std; bool ispalindrome(int n) { int chk = n; int res = 0; while (chk != 0) { int l = chk % 10; res = res * 10 + l; chk = chk / 10; } if (res == n) return true; else return false; } int main() { ...
ALGO
0.999792
3.63154
b295af74-cac3-46d4-9dee-7f0c3e6f70d2
SelfishHawk/C-DSA
Linked_list.cpp/12_deleteMiddle.cpp
#include <iostream> using namespace std; class node { public: int data; node *next; node(int data) { this->data = data; this->next = NULL; } }; void insert(node *&head, int d, int pos) { if (head == NULL) { node *temp = new node(d); head = temp; } if ...
ALGO
0.999961
5.095298
2b19e759-cae4-4cfc-9758-658676db734b
vanishasamriddhi/Leet
2134-minimum-swaps-to-group-all-1s-together-ii/2134-minimum-swaps-to-group-all-1s-together-ii.cpp
class Solution { public: int minSwaps(vector<int>& nums) { int ans = INT_MAX; int total = 0; for (auto& n : nums) if (n == 1) ++total; if (total == nums.size() || !total) return 0; int curOnes = 0; int s = nums.size(); s -= total - 1; for (int i = s; i <...
ALGO
0.999995
5.884316
aa451539-bb7e-4cb2-a0fc-7e062def58b8
HekpoMaH/Olimpiads
grupa C/olimpiada/oblasten/2011/raboti/Shumen/Shumen/C/AYI/barrels.cpp
#include<iostream> #include<algorithm> #include<cmath> using namespace std; long long s,n,ans,trans; long long barrels[124]; int main() { int i; cin>>s>>n; for(i=1;i<=n;i++) cin>>barrels[i]; sort(barrels,barrels+(n+1)); for(i=n;i>0;i--) { if(s>=barrels[i]) { trans=s/b...
ALGO
0.999892
3.080167
355095f4-ddab-4ff7-ae48-17edc531a979
MuXiongGuo/study_primer
10/lesson10_demo2.cpp
#include "iostream" #include "algorithm" #include "string" #include "vector" using namespace std; void elimDups(vector<string> &words) { sort(words.begin(), words.end()); // 将重复元素放到后面去, 并返回第一个重复位置的迭代器 auto end_unique = unique(words.begin(),words.end()); // 删除多余的元素 words.erase(end_unique, words.end...
ALGO
0.998967
5.026798
93b85050-947a-438b-9b83-187106c3faea
a446187673/Cpp-LeetCode
556. The next larger element III.cpp
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; //556. 下一个更大元素 III https://leetcode.cn/problems/next-greater-element-iii/ class Solution { public: int nextGreaterElement(int n) { string s = to_string(n); int i = s.size()-2; while (i >= 0 && s[i]...
ALGO
0.999828
4.680591
7e13ac86-cf37-4878-8faf-817c73247712
turneja123/competitive-programming-library
Algorithm/Data Structures/Submatrix Sum Query.cpp
//https://cses.fi/problemset/task/1652 #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 = 1005; int a[N][N]; int pref[N][N]; void prep...
ALGO
0.999669
4.176834
85faf524-ec08-4eb2-a6e1-dc8b0dd016ee
gmocornejos/nyoka_snd_lib
examples/fftwest.cpp
#include <iostream> #include <stdlib.h> #include <complex> #include <ogg_vorbis.hh> #include <plot.hh> #include <fftwest.hh> using namespace std; int main(int argc, char *argv[]){ const char *fname = argv[1]; //decode int smpls_num = samples_number(fname); double smpls_rate = samples_rate(fname); double *buffe...
ALGO
0.852649
4.035014
02f2430b-f177-4870-8054-04849e0da15d
Shubham-Choudhury/GeeksforGeeks-Problems
2024/06 June/Number of Rectangles in a Circle/main.cpp
// Link: https://www.geeksforgeeks.org/problems/rectangles-in-a-circle0457/1 #include <iostream> #include <cmath> using namespace std; class Solution { public: int rectanglesInCircle(int r) { int count, maxLength; double i; count = 0; for (i = 0.5; i <= r; i += 0.5) { ...
ALGO
0.999053
4.760866
27d0cfda-9388-4e19-ab36-cde2c952ba15
PriyanshuDas/college-work
Archieved Programs/IndiaHacks/C.cpp
#include <bits/stdc++.h> #define pf printf #define sf scanf #define ll long long int #define mp make_pair #define pb push_back using namespace std; int n; vector <int> arr; vector <int> imp; int check (int pos) { int ans = 0; for(int i = 0 ; i < n-1; i++) { int flag = 0; swap(arr[pos], arr[i]); for(int j =...
ALGO
0.999988
3.736322
7ed86ee9-c662-4aaf-9d80-4fdb381754d0
A-stick-bug/CCC-Solutions
2019/CCC '19 S5 - Triangle The Data Structure.cpp
/* https://dmoj.ca/problem/ccc19s5 Basically implementing the editorial: https://dmoj.ca/problem/ccc19s5/editorial Using max 2D BIT, after figuring out that you have to align the triangle to the right, the problem becomes mostly implementation Align triangle like this for max BIT queries 3 1 2 4 2 1 6 1 4...
ALGO
0.999972
4.399048
a8fa681c-b71e-4ebb-80f6-0e56b43539ba
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_8816_0.cpp
#include <bits/stdc++.h> using namespace std; const int siz = 1e5 + 10; const long long modu = 1e9 + 7; long long power(long long x, long long y, long long modu) { if (!y) return 1LL; long long ans = 1LL; x = x % modu; while (y) { if (y & 1LL) ans = (ans * x) % modu; y >>= 1LL; x = (x * x) % modu; ...
ALGO
0.999985
4.528924
773e9609-0921-41dd-b2e2-77c605395e1f
TejaChilumula/Leetcode_Submissions
891-ScoreAfterFlippingMatrix/891-ScoreAfterFlippingMatrix.cpp
// Last updated: 7/2/2025, 11:51:48 PM class Solution { public: int matrixScore(vector<vector<int>>& grid) { // first make all 0's to 1's in the ist column, so that all the rows has 0 in ist column needs to change. which contributes lot /* 1. check cols and if has less no of 1's then flip that col ...
ALGO
0.999978
6.652858
49bf553e-784a-431e-90f8-d24b0a20e6c5
jbikker/tinybvh
tiny_bvh_gpu2.cpp
// This example shows how to build a GPU path tracer with instancing // using a TLAS. TinyOCL is used to render on the GPU using OpenCL. // A more elaborate (and efficient) example is in tiny_bvh_interop. #define FENSTER_APP_IMPLEMENTATION #define SCRWIDTH 1280 #define SCRHEIGHT 720 #include "external/fenster.h" // ht...
ALGO
0.940303
5.939449
0b90da7a-46e9-4a15-8f2f-1580875390e6
Mohamed-Taher-Marnissi/Problem-Solving
leetcode/leetcode Daily Challenge/623.AddOneRowToTree.cpp
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), left(left), right(right) {} }; class Solution { public...
ALGO
0.999995
6.282814
606b8f4e-247d-44c4-bb25-f12ae795ba67
tridhapuku/DSP_MLIR
libc/src/math/generic/cosf.cpp
#include "src/math/cosf.h" #include "sincosf_utils.h" #include "src/__support/FPUtil/BasicOperations.h" #include "src/__support/FPUtil/FEnvImpl.h" #include "src/__support/FPUtil/FPBits.h" #include "src/__support/FPUtil/except_value_utils.h" #include "src/__support/FPUtil/multiply_add.h" #include "src/__support/common.h...
ALGO
0.998804
7.581007
f937574e-48b9-417b-be92-600050a1eee8
Dongyeon97/Baekjoon-Online-Judge
01. 단계별로 풀어보기/05. 문자열/2675번 문자열 반복.cpp
/* * @title : 2675번 문자열 반복 * @content : 문자열 * @author : 박동연 * @date : 230605 * @time : 0ms * @memory : 2024KB * @state : 완료 */ #include <iostream> #include <string> using namespace std; int main() { int iT = 0; int iR = 0; string tS = {}; string tP = {}; cin >> iT; for (int i = 0; i < iT; ...
ALGO
0.99865
3.759611
add0a613-e5bc-4298-97ec-fd908d7d6cf5
Manthanlimbasiya007/android_store
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.998859
6.785645
9493519b-8e00-4af2-91bb-71563bb4ae9e
chiragbalicpp/cpp
pattern(4).cpp
/* ABCDEEDCBA ABCDDCBA ABCCBA ABBA AA */ #include<iostream> using namespace std; int main() { int n ; cin >> n; for (int i = 0; i<n; i++){ char ch = 'A'; for (int j=1; j<=n-i; j++) { cout <<ch; ch++; } ch=ch-1; ...
ALGO
0.999943
3.961189
057188d4-2e7f-46b0-b3bf-84ffa49dd382
ishandutta2007/codeforces
hitonanode/normal/965/B.cpp
#include <bits/stdc++.h> using namespace std; struct fast_ios { fast_ios(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_; #define FOR(i, begin, end) for(int i=(begin),i##_end_=(end);i<i##_end_;i++) #define REP(i, n) FOR(i,0,n) template<typename T> istream &operator>>(istrea...
ALGO
0.999915
4.600409
a2da137d-3eb1-4a1b-9fb1-fa4fda2dbf51
yliu-cs/ACM
CodeForces/CodeForces-1255B.cpp
#include <bits/stdc++.h> int main() { // std::ios::sync_with_stdio(false); // std::cin.tie(nullptr); int t; std::cin >> t; while (t--) { int n, m; std::cin >> n >> m; std::vector<int> a(n); for (int i = 0; i < n; ++i) { std::cin >> a[i]; } if (m < n || n == 2) { std::cout <<...
ALGO
0.999736
3.735965
8dc3d52a-03d9-46ec-b735-39cc63e67759
bentoper/Competitive
Contests/CF627/d.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define fst first #define snd second #define fr(i,n) for(int i=0;i<n;i++) #define frr(i,n) for(int i=1;i<=n;i++) #define pv(x, n) fr(iii, n) printf("%d%c", x[iii], " \n"[iii==n-1]) #define pvv(x, n) frr(iii, n) printf("%d%c...
ALGO
0.999979
3.499806
53b48c4c-e472-4a0c-85cd-953980444a4c
raincross7/code-similarity
codes/train_code/problem136/problem136_235.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repr(i, a, b) for(int i = a; i < b; i++) #define all(x) (x).begin(),(x).end() // 昇順ソート #define rall(v) (v).rbegin(), (v).rend() // 降順ソート #define FastIO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0) ty...
ALGO
0.999993
4.205589
100c777a-722e-4d68-9bc6-37ea255d117e
mashfiqur05/Problem-Solving
Codeforces/495A_Digital_Counter.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define Bismillah() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); /// Fast IO. #define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield); #define mem(a,b) memset(a, b, sizeof(...
ALGO
0.999118
4.426344
696578c4-2692-48ac-bf12-bca4e7f5e2ef
code-bajju/Data-structure-programs
004-STL/02-Deque.cpp
#include <iostream> #include <deque> using namespace std; int main(){ deque<int> d; d.push_back(1); d.push_front(2); d.push_back(3); d.push_front(4); d.push_back(5); d.push_front(6); for(int i = 0; i < d.size(); i++) cout << d[i] << endl; return 0; }
ALGO
0.987089
4.639401
83c82256-429d-4491-8229-ca4ee98aa426
Destabilisator/Bsc_ITP_MP
headers/methods/ED/naiv.cpp
#include "naiv.h" /////////////////////////////// naiver Ansatz /////////////////////////////// namespace ED::naiv { void fillHamilton(double **hamilton, const double &J1,const double &J2, const int &N, const int &SIZE) { for (int s = 0; s <= SIZE - 1; s++) { for (int n = 0; n < N / 2; n++) ...
ALGO
0.995081
4.010563
943182a9-539a-45c6-8676-42c543657d98
TheTrackOne/CPlus-Exercise
Exercise/Write a Program to Find the Largest Among 3 Numbers.cpp
//Q8. Write a Program to Find the Largest Among 3 Numbers. #include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; if (a > b && a > c) { cout << "a is the largest." << endl; } else if (b > a && b >> c) { cout << "b is the largest." << endl; } ...
ALGO
0.999888
4.336651