uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
185ccb90-d31c-44ee-b7fc-7d6907394120
slimepiki/atcoder
abc254/b/main.cpp
using namespace std; using ll = long long; using ull = unsigned long long; #include <bits/stdc++.h> void debug_out() { cerr << endl; } template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << to_string(H); debug_out(T...); } #ifdef __LOCAL #define debug(...) ...
ALGO
0.999985
3.92952
4f821c98-400b-4a1e-9866-d79cccf36577
schnehowebking/csefundamentals
semester2/BasicDSA_PS-II/Week04-Stac&Queue/Module14-Queue-implementation-and-STL/Implement_Queue_using_Stacks_Leetcode.cpp
#include<bits/stdc++.h> using namespace std; class MyQueue { public: stack<int>st; MyQueue() { } void push(int x) { st.push(x); } int pop() { stack<int> newSt; int lastval; while(!st.empty()) { int k = st.top(); ...
ALGO
0.9986
4.734855
a260f7fb-97df-4bd4-9432-90c8e7c81515
asadgulib/SVAM
include/igl/swept_volume_signed_distance.cpp
#include "swept_volume_signed_distance.h" #include "flood_fill.h" #include "signed_distance.h" #include "AABB.h" #include "pseudonormal_test.h" #include "per_face_normals.h" #include "per_vertex_normals.h" #include "per_edge_normals.h" #include <Eigen/Geometry> #include <cmath> IGL_INLINE void igl::swept_volume_signed...
ALGO
0.999879
6.430987
85f60f06-67b5-4987-8e05-3e23c1991641
yz1019117968/FSE-24-UniTrans
cleaned_data/transcoder_evaluation_gfg/cpp/ARRAY_RANGE_QUERIES_ELEMENTS_FREQUENCY_VALUE.cpp
#include <iostream> #include <cstdlib> #include <string> #include <vector> #include <fstream> #include <iomanip> #include <bits/stdc++.h> using namespace std; int f_gold ( int start, int end, int arr [ ] ) { unordered_map < int, int > frequency; for ( int i = start; i <= end; i ++ ) frequency [ arr [ i ] ] ++; ...
ALGO
0.999102
5.495883
f2b5386e-bd17-45f8-a2a1-3171819bcde6
makio93/competitive-atcoder
abc240/abc240_f/3/main0.cpp
// 学習3回目,自力AC #include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; #define rep(i, n) for (int i=0; i<(int)(n); ++(i)) #define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i)) #define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i)) #define rep3r(i, m, ...
ALGO
0.999893
4.293129
e38a2af0-8f3c-45cc-a305-cd793736f67f
ishandutta2007/codeforces
theoth_normie/normal/1548/C.cpp
#ifndef CPL_TEMPLATE #define CPL_TEMPLATE /* Normie's Template v2.5 Changes: Added warning against using pragmas on USACO. */ // Standard library in one include. #include <bits/stdc++.h> using namespace std; // ordered_set library. #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> us...
ALGO
0.999969
3.788072
092bbbdc-d8aa-45b6-a7e5-fb15b158b026
DHRUVSHARM/CPP_codes
buying_showels.cpp
#include<bits/stdc++.h> #include<iostream> using namespace std; /* to get unique elements in sorted order sort(fun_values.begin(),fun_values.end()); fun_values.erase(unique(fun_values.begin(),fun_values.end()),fun_values.end()); for(ll&x:fun_values) cout<<x<<" "; */ /* vector<int> primelist; for(...
ALGO
0.999914
5.174109
92206174-e16b-425d-9d17-ed57fd07cfb2
jamperezmondragon/Competitive-Programming
cses/Additional_Problems/String_Removals.cpp
#pragma GCC optimize("unroll-loops", "O3") #include <bits/stdc++.h> using namespace std; using ll = long long int; const ll MOD = 1e9 + 7; int main() { cin.tie(0)->sync_with_stdio(0); string S; cin >> S; vector<ll> dp(26, 0); for (auto e : S) { dp[e - 'a']++; for (int j = 0; j < 26; j++) { if (e...
ALGO
0.999941
4.81533
8873f81b-b053-4198-bb68-65e65b9c496f
0xpye/cp
code/115.power.cpp
#include <bits/stdc++.h> #define FOR(i, a, b) for(int i = (a); i <= b; i++) #define FORR(i, a, b) for(int i = (a); i >= b; i--) #define maxn 100005 #define F first #define S second using namespace std; int n, k; long long ans; pair <int, int> a[maxn]; bool comp(pair <int, int> A, pair<int, int> B){ return A.F > B.F...
ALGO
0.99994
3.613526
e4fb1a60-171a-4d99-b5b7-4eaaff80d22d
sarvex/leetcode-carbon
solution/2400-2499/2448.Minimum Cost to Make Array Equal/Solution.cpp
using ll = long long; class Solution { public: long long minCost(vector<int>& nums, vector<int>& cost) { int n = nums.size(); vector<pair<int, int>> arr(n); for (int i = 0; i < n; ++i) arr[i] = {nums[i], cost[i]}; sort(arr.begin(), arr.end()); vector<ll> f(n + 1), g(n + 1); ...
ALGO
0.999989
4.909894
1a75e86b-ab71-4e42-8529-6856724244c9
HafizulHaque/Coding-Problem-Solving
Minimum Spanning Tree/1029 - Civil and Evil Engineer.cpp
#include<bits/stdc++.h> using namespace std; #define mm 110 int pr[mm]; struct vertex { int u,v,w; bool operator <(const vertex &p)const { return w<p.w; } }; vector<vertex>edges; int find_r(int r) { if(pr[r]==r)return r; else{ pr[r]=find_r(pr[r]); return pr[r]; }...
ALGO
0.99964
3.717952
dce431c6-f9b9-4603-b24f-89b713d6d45a
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Mixtral/top0-100/build-a-matrix-with-conditions-Solution.buildMatrix/177789_DoS_Exec_Code_Overflow.cpp
poppler_page_prepare_output_dev (PopplerPage *page, double scale, int rotation, gboolean transparent, OutputDevData *output_dev_data) { CairoOutputDev *output_dev; cairo_surface_t *surface; double width, height; int cairo_width, cairo_height, cairo_rowstride, rotate; unsigned char *cairo_d...
ALGO
0.982242
4.152011
4b1d629e-8f2a-4b59-83c0-7758007118c9
Al-mizan/Competitive-Programming
codeforces/practice/B_Robin_Hood_and_the_Major_Oak.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define endl '\n' #define ff first #define ss second #define pi acos(-1) #define mod 1000000007 #define newline cout << '\n' #define no ...
ALGO
0.999839
4.513733
1770014b-1b9a-4432-b23f-a4dc0bd9785c
paulnewman1979/edocteel
026/263/main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <stdio.h> using namespace std; class Solution { public: bool isUgly(int num) { if (0 == num) return false; while (num % 5 == 0) { num /= 5; } while (num % 3 == 0) { num /= 3; } ...
ALGO
0.999892
5.479434
d679d707-5a7d-4c9e-8a6b-699f519f335b
shahjigar556/C-STL
algorithm/nextPermutation.cpp
#include <iostream> #include<algorithm> using namespace std; int main() { // your code goes here int arr[]={1,2,3}; cout<<"The 3! possible permutations with 3 elements:\n"; do{ cout<<arr[0]<<" "<<arr[1]<<" "<<arr[2]<<"\n"; }while(next_permutation(arr,arr+3)); cout<<"After loop: "<<arr[0]<<" "<<arr[1]<...
ALGO
0.999951
4.268589
aa3aaa15-6a44-4714-b15d-e5afa4bedb5d
ishandutta2007/codeforces
burnedchicken/normal/1735/D.cpp
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("Ofast,unroll-loops") #define ll long long #define int ll #define ull unsigned ll #define ld long double #define rep(a) rep1(i,a) #define rep1(i,a) rep2(i,0,a) #define rep2(i,b,a) for(int i=(b); i<((int)(a)); i++) #define rep3(i,b,a) for(int i=(b); i>=...
ALGO
0.99991
4.427327
4fb0fd9e-df90-456b-bf20-e1147fdb25f3
camilahinojosa26/tarea2_maze
laberinto/src/maze.cpp
#include "maze/maze.hpp" #include <cstdlib> #include <ctime> #include <iostream> #include <stack> #include <queue> namespace maze { const unsigned char Maze::WALL = '@'; const unsigned char Maze::EMPTY = '-'; const int Maze::NORTH = 0; const int Maze::SOUTH = 1; const int Maze::EAST = 2; const int Maze::WEST = 3; Ma...
ALGO
0.999781
5.939854
9e5a6fb7-b852-4317-85cb-9dc0fd994bd1
QuyetFCB275/DSA_PTIT
4014.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll merge(ll a[], int l, int pi, int r) { ll sum = 0; int i, j, k, dem; int n1 = pi - l + 1, n2 = r - pi; ll L[n1], R[n2]; for (i = l; i <= pi; i++) L[i - l] = a[i]; for (j = pi + 1; j <= r; j++) R[j - pi - 1...
ALGO
0.999849
4.234001
8fcabfd8-a816-4c9f-9742-583f6ca9dea8
alexpizarroj/competitive-programming
src/uva-online-judge/10816.cpp
#include <iostream> #include <vector> #include <queue> #include <set> #include <algorithm> #include <cassert> using namespace std; // UNION-FIND START vector<int> pset, set_size; int disjointSetsSize; void initSet(int N) { pset.assign(N,0); set_size.assign(N,1); disjointSetsSize=N; for(int i=0; i<N; i++) pset[i]=i...
ALGO
0.999229
4.16075
bc6f793c-ffaa-4ac8-8351-740ba3a7ea8b
ishandutta2007/codeforces
eddy1021/normal/414/A.cpp
#include <stdio.h> int getint(){ int x=0,tmp=1; char c=getchar(); while( (c<'0'||c>'9')&&c!='-' ) c=getchar(); if( c == '-' ) c=getchar() , tmp = -1; while(c>='0'&&c<='9') x*=10,x+=(c-'0'),c=getchar(); return x*tmp; } int n , k; void init(){ n = getint(); k = getint(); } void process(){ if( ...
ALGO
0.999985
3.728057
bc20f819-a9f0-4a27-b98d-fdda88bcfdd5
cm1100/acceleretaed_c-
asscoaiative_containers/counting.cpp
#include<iostream> #include<map> using namespace std; int main(){ string s; map<string,int> counters; while(cin>>s){ ++counters[s]; } for(map<string,int>::const_iterator it = counters.begin();it!=counters.end();++it){ cout<<it->first<<"\t"<<it->second<<endl; } return 0; ...
ALGO
0.99815
3.716834
d1fae9fa-7e07-4edf-99d7-6f7408f46381
kalina235/Visual-graph-clustering
eigen/doc/examples/QuickStart_example2_fixed.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; using namespace std; int main() { Matrix3d m = Matrix3d::Random(); m = (m + Matrix3d::Constant(1.2)) * 50; cout << "m =" << endl << m << endl; Vector3d v(1,2,3); cout << "m * v =" << endl << m * v << endl; }
ALGO
0.997351
3.375595
8ee8e107-6a2f-4edd-80a0-9370546e069b
arundprabhu/Competitive-Coding
Foundational/Stacks and Queue/HISTOGRA.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int lli; #define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) template<typename T> T gcd(T a, T b){return(b?__gcd(a,b):a);} template <typename T> T lcm(T a, T b){return (a*b)/gcd(a,b); } int main(){ fastio; #ifndef ONLINE_JUDGE...
ALGO
0.999574
3.298298
7d0d8e3f-a51a-4d3f-b9a7-cc1e93f3536c
CoderZeus/HackerRank
HackerRank/C30daysofCode/q13.cpp
#include <iostream> #include <vector> using namespace std; class Person{ protected: string firstName; string lastName; int id; public: Person(string firstName, string lastName, int identification){ this->firstName = firstName; this->lastName = lastName; this->id = identification; } void printPe...
TOOL
0.969026
5.770768
b3309c74-428b-4397-9603-92858bd4c70b
Tylermdistefano/CSC211
Asignments/asn4/main_1.cpp
#include <iostream> #include <string> bool row(int arr[9][9] , int r){ std::string store; for (int i = 0 ; i < 9 ; i++){ store.push_back(arr[r][i]); } for (int i = 0 ; i < store.size() ; i++){ for (int j = i+1 ; j < store.size() ; j++){ if (store[i]==store[j]){ store.erase(j,1); j= i; } } } if(store.size(...
ALGO
0.999719
4.878346
3bf0da08-be93-49c6-b1f2-dab92159fb31
gaonK/AlgorithmStudy
Session 5/gaonK/2-2/11729.cpp
#include <iostream> using namespace std; void hanoi(int st, int md, int ed, int N) { if (N == 0) { return; } hanoi(st, ed, md, N - 1); cout << st << ' ' << ed << '\n'; hanoi(md, st, ed, N - 1); } int main() { int N; cin >> N; cout << (1 << N) - 1 << '\n'; hanoi(1, 2, 3, N...
ALGO
0.999846
4.847284
06ec7141-aeb0-4d3c-a098-013c204b7c55
hellspawn679/practice-
geeksforgeeks/power.cpp
#include<iostream> #include<math.h> using namespace std; int main() { cout<<pow(5,3); return 0; }
ALGO
0.999126
3.5049
7b5e5424-9d97-4fab-b961-9985f3431531
AnirudhDaya/DSA-in-Cplusplus
DSA_in_c++/deletion_linked_list.cpp
#include <bits/stdc++.h> using namespace std; class node { public: int data; node *next; node(int val) { data = val; next = NULL; } }; void insertAtHead(node *&head, int val) { node *n = new node(val); n->next = head; head = n; } void insertAtTail(node *&head, int val)...
ALGO
0.999913
4.544645
09a93ef5-fcc9-414f-ba23-cf7faeb25fc7
taradgaonkartejas/Cpp
Day 2/Que_2.cpp
//2. Write a program to accept two integers x and n and compute x raised to n. #include<iostream> using namespace std; int main() {int x,n; int ans=1; cout<<"Enter Integer x"<<endl; cin>>x; cout<<"Enter Index n"<<endl; cin>>n; for (int i = 1; i <= n; i++) { ans=ans*x; } cout<<"x raised to n= "<<ans<<endl; ret...
ALGO
0.998145
4.035736
9f445d3b-ec9e-478d-9050-315af4faead3
adityak54/cp
before-aug-24/B_Diverse_Substrings.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int #define pi pair<int,int> #define pb push_back #define sortall(a) sort(a.begin(),a.end()) #define rsortall(a) sort(a.begin(),a.end(),greater<int>()) // Input Functions template<typename T>std::vector<T> input(int n) {std::vector<T> v(n);for (int i...
ALGO
0.999946
4.74023
a3831af9-a0c9-4c88-b83f-a941aa79fe6d
smartysagar21/SlidingWindow
SlidingWindow_09.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n,k; cin>>n>>k; string s,t; cin>>s>>t; vector<bool>flag(26,0); vector<int>v(26); for(int i=0; i<k; i++){ flag[t[i]-'a']=1; v[t[i]-'a']++; } int ct=0; for(int i=0; i<26; i++){ if(flag[i])ct++; } int i=0,j=0; int ans=n; while(j<n){ i...
ALGO
0.99995
3.978304
7cb422f4-08fb-494f-8018-3a3176b78c6a
o-zhongchong/leetcode
Leetcode/137.cpp
class Solution { public: int singleNumber(vector<int>& nums) { int x1, x2, mask; x1 = x2 = 0; for( auto i : nums) { x2 ^= (x1 & i); x1 ^= i; mask = ~(x1 & x2); x1 &= mask; x2 &= mask; } retu...
ALGO
0.999957
5.628093
2bdb583b-c5ab-4330-814f-a84430144903
kavin23923/Leetcode
problem/001-050/32.cpp
class Solution { public: int longestValidParentheses(string s) { int len = s.size(); int res = 0; vector<int> dp(len); for (int i = 1; i < s.size(); i++) { if (s[i] == ')') { if (s[i - 1] == '(') { dp[i] = i - 2 >= 0 ? dp[i - 2] + 2 : 2; } else if (i - dp[i - 1] > ...
ALGO
0.999742
6.083791
f7f47c17-bc25-4ff0-af4b-da913c9d395e
EngrAbuHorairah/Data-Structures-and-Algorithms-with-CPP
Circular-Queue-using-linklist.cpp
#include <iostream> using namespace std; // Node class for circular queue class Node { public: int data; Node* next; }; // Circular queue class class CircularQueue { private: Node* rear; // pointer to last element of the queue public: CircularQueue() { rear = NU...
ALGO
0.952474
6.357854
0e80f0d3-de01-4273-beac-175313702442
DGtal-team/DGtal
examples/geometry/surfaces/greedy-plane-segmentation-ex2.cpp
/** * @file geometry/surfaces/greedy-plane-segmentation-ex2.cpp * @ingroup Examples * @author Jacques-Olivier Lachaud (\c <EMAIL> ) * Laboratory of Mathematics (CNRS, UMR 5127), University of Savoie, France * * @date 2012/10/01 * * An example file named greedy-plane-segmentation-ex2. * * This file is part of ...
ALGO
0.99659
6.667065
cddb4ff6-1225-427d-9834-5dcf7e4f5a70
KOWSHIQKATTAMURI/GFG-Problem-of-the-day-solutions-by-Kowshiq-Kattamuri
Easy/Inorder Successor in BST/inorder-successor-in-bst.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // Tree Node struct Node { int data; Node *left; Node *right; Node(int val) { data = val; left = right = NULL; } }; // Function to Build Tree Node* buildTree(string str) { // Corner Case if(str.length() ...
ALGO
0.999912
5.633881
8fc14c62-be9d-4aab-8d90-dc931a7816d2
apennisi/fast_face_detector
matlab/cpp_files/gradientMex.cpp
#include "wrappers.hpp" #include <math.h> #include "malloc.h" #include "string.h" #include "sse.hpp" #define PI 3.14159265f // compute x and y gradients for just one column (uses sse) void grad1( float *I, float *Gx, float *Gy, int h, int w, int x ) { int y, y1; float *Ip, *In, r; __m128 *_Ip, *_In, *_G, _r; // c...
ALGO
0.999481
4.601232
f4735d8b-c7ee-45d3-9cae-2f0fef134446
xtf0214/CPP
Problem/Luogu/Training/213【动态规划3】区间与环形动态规划/CF607B.cpp
/** * @file : CF607B Zuma 祖玛 * @author : Tanphoon * @date : 2023/01/24 23:38 * @version : 2023/02/26 02:01 * @link : https://www.luogu.com.cn/problem/CF607B */ #include <bits/stdc++.h> using namespace std; const int INF = 0x3f3f3f3f; int n; vector<int> a; vector<vector<int>> f; int main() { ...
ALGO
0.999955
4.523226
d4ad030e-4fea-4d2e-bc58-92a9dee52f1a
umairinayat/DSA
Recursion/Reverse_string.cpp
#include <iostream> using namespace std; void reversestring(string &str, int i, int j) { if (i >= j) { return; } swap(str[i], str[j]); i++; j--; reversestring(str, i, j); } int main() { string str = "i am the one who can ecknow everything"; int j = str.length() - 1; c...
ALGO
0.9997
4.324653
70f3ed6f-ef06-492f-9a61-8e9c28dcbeab
ishandutta2007/codeforces
sofapuden/normal/1669/D.cpp
#include <bits/stdc++.h> #include <bits/extc++.h> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef double db; typedef string str; typedef pair<int,int> pi; typedef pair<ll,ll> pl; typedef pair<db,db> pd; typedef vector<int> vi; typedef vector<ll> vl; typ...
ALGO
0.999971
5.397974
6afaf22e-d160-4e9c-a86a-2c8546cfcb71
Christina-hshi/gatb-core
gatb-core/examples/tools/multithreading7.cpp
//! [snippet1] // We include what we need for the test #include <gatb/gatb_core.hpp> using namespace std; /********************************************************************************/ /* Multithreaded iteration of an integer range * actual working example that takes some t...
ALGO
0.993898
6.55645
16612b83-7105-45cd-ad4e-0f6c7f0c9f65
umar1207/cp
codechef/starter105/q2/main.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; void solve(); int main() { ios_base :: sync_with_stdio(false); cin.tie(NULL); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("error.txt", "w", stderr); freopen("output.txt", "w", stdout); #endif...
ALGO
0.999902
4.206345
f422c5a4-8e3e-4c8f-9def-494f964235b2
QIDITECH/QIDIStudio
src/libigl/igl/shape_diameter_function.cpp
template < typename DerivedP, typename DerivedN, typename DerivedS > IGL_INLINE void igl::shape_diameter_function( const std::function< double( const Eigen::Vector3f&, const Eigen::Vector3f&) > & shoot_ray, const Eigen::PlainObjectBase<DerivedP> & P, const Eigen::PlainObjectBase<Derive...
ALGO
0.999459
7.082757
ffa1d814-1071-49e6-9097-a3e30889d98c
Rahamat-prog/DSA
Partterns/pattern5.cpp
#include<iostream> using namespace std; int main() { int n; cin>>n; int i=1; while (i<=n) { int j=1; while(j<=i) { cout<<"*"<<" "; j=j+1; } cout<<endl; i=i+1; } return 0; }
ALGO
0.99997
3.709173
85bf226e-d3d8-4f2e-be01-9271602111b4
hieu-ln/IT81-06
CODEC2/AnhTuan_C2_Bai10.cpp
//Bt10; #include <iostream> using namespace std; struct Node { int info; Node *link; }; Node *sp; void init() { sp = NULL; } int isEmpty() { if(sp == NULL) return 1; return 0; } void Push(int x) { Node *p; p = new Node; p->info = x; p->link = sp; sp = p; } int Pop(int &x) { if(sp != NULL) { Node ...
ALGO
0.996053
3.372833
bafe0435-5e2b-49d9-bfdf-4bef81cf1ebe
RitvikVankayala/someque
luv series/Vectors and Pair/Vector.cpp
#include <bits/stdc++.h> using namespace std; void printVec(vector<int> v) { for (int i = 0; i < v.size(); i++) { cout << v[i] << " "; } cout << endl; } int main() { vector<int> vec; int n; cin >> n; for (int i = 0; i < n; i++) { int x; cin >> x; vec....
ALGO
0.999356
3.639053
0c9ad4d2-25bf-46cb-814e-f8f4219df61f
doomsday861/Allofit
lc.cpp
/** * lc biweek **/ #include<bits/stdc++.h> #define ll long long #define testcase ll t;cin>>t;while(t--) #define pb push_back #define fi first #define se second #define vll vector<ll> #define for0(i, n) for (ll i = 0; i < (ll)(n); ++i) #define for1(i, n) for (ll i = 1; i <= (ll)(n); ++i) #define run ios_base::sync_wit...
ALGO
0.999997
4.325615
6a973547-6a89-4b40-9c13-7e7a7ad58287
EmlynLXR/CCF
201812-1.cpp
#include <iostream> using namespace std; int r,y,g; int n; int main() { cin>>r>>y>>g>>n; int time = 0; int f,t; for(int i=0;i<n;i++) { scanf("%d %d",&f,&t); if(f == 0) time += t; else if(f == 1) { time += t; } else if(f == 2) { time += t + r; } else if(f == 3) { time += 0; } } ...
ALGO
0.999251
3.014289
55dde535-ee5d-4c5c-b4f8-04284f80359d
jungdaechul-coderepo/TBC_Lecture-git-
6.17/6.17.cpp
#include <iostream> #include<limits> #include<algorithm> #include<vector> using namespace std; int main() { vector<int> fibo{ 1,2,3,4,5,6,7,8,4,4,4,4,4,4000,4,4,4,4,4,4 }; //벡터를 사용하면 동적할당 배열보다 편리하게 사용 가능 //int fibo[]{ 1,2,3,4,5,6,7,8,4,4,4,4,4,4000,4,4,4,4,4,4 }; int max_num = numeric_limits<int>::lowest(); ...
ALGO
0.989192
3.817555
2f1295e9-603c-4730-938d-4da15a59e5cf
AdarshGaur/Competitive-Programming
LeetCode/1509. Minimum Difference Between Largest and Smallest Value in Three Moves.cpp
// Author: @AdarshGaur class Solution { public: int minDifference(vector<int>& nums) { int n = nums.size(); if(n <= 3) return 0; sort(begin(nums), end(nums)); int amplitude = nums.back() - nums[0]; for(int i = 0; i<4; i++){ amplitude = min(amplitude, nums[n-4 +i]...
ALGO
0.999856
5.529112
256cfaa3-e868-44a3-9247-c11f9cd6a677
Ankur8789/Cp-Solution
vsc++/C_Weather.cpp
// ankur randi randi randi #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; int N, idx; tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> T; typedef long long ll; const ll M = ...
ALGO
0.999991
4.28334
0c0eb50a-b5c7-4ec0-b7b8-c9595b80427f
mmur07/EDA-MARP-GdV-UCM
EDA/08_EjerciciosDesorganizados/EDA_ElementoMayoritario_Handicapped.cpp
// Nombre del alumno ..... // Usuario del Juez ...... #include <iostream> #include <iomanip> #include <fstream> #include <vector> template < typename T, typename Equal = std::equal_to <T > > int find_num_repeats(int ini, int fin, T elem, const std::vector<T>& vec) { int nReps = 0; for (int k = ini; k <= fin;...
ALGO
0.999892
4.169116
d3fc37f0-871a-491d-9eeb-3072df048c8e
aokblast/LeetCode_Problem_Solving
Eazy/232_Implement_Queue_using_Stacks.cpp
// //Runtime 0 //Memory Usgae 7.1 class MyQueue { public: /** Initialize your data structure here. */ stack<int> stk1, stk2; MyQueue() { } /** Push element x to the back of queue. */ void push(int x) { while(!stk1.empty()){ stk2.push(stk1.top()); stk1.pop(); ...
ALGO
0.992431
5.295526
02c07bac-f64d-4d2d-aa65-6ef0ad13c4fb
alexandraback/datacollection
solutions_5662291475300352_0/C++/IITianUG/GoogleR3.cpp
#include<bits/stdc++.h> using namespace std; int main() { ifstream IF; ofstream OF; int t,trm,i,d[100],h[100],m[100],n,xx,yy; IF.open("input.txt"); OF.open("output.txt"); IF>>t; for(trm=1;trm<=t;trm++) { IF>>n; for(i=0;i<n;i++) { IF>>d[i]>>h[i]>>m[i]; } ...
ALGO
0.999798
3.32392
9bc10381-dd7f-4d5c-828c-59ffd7f717e2
Kouros26/Animator
dependencies/ASSIMP/code/Common/SGSpatialSort.cpp
/** @file Implementation of the helper class to quickly find vertices close to a given position. Special implementation for the 3ds loader handling smooth groups correctly */ #include <assimp/SGSpatialSort.h> using namespace Assimp; // --------------------------------------------------------------------------------...
ALGO
0.998658
7.274989
a9e6920f-375c-4273-a6ac-8c96d9b9dd56
5thwin/baekjoon
14502/14502.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <queue> #include <cstring> #define FAST ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); #define MP make_pair typedef long long ll; using namespace std; int N, M; vector<pair<int, int> > virus; //바이러스의 위치 int vcnt = 0...
ALGO
0.999798
4.535587
b57b96c9-f9c5-48cd-be27-7a2be778d25f
pratzie100/LC_NEW
0070-climbing-stairs/0070-climbing-stairs.cpp
class Solution { public: //same as calculating fibonaci (n+1)th term //no need to handle n==0 corner case due to constraints int climbStairs(int n) { int prev2=1,prev=1; for(int i=2;i<=n;i++) { int current=prev+prev2; prev2=prev; prev=current; ...
ALGO
0.999983
6.358483
fad5caf6-a13e-45dc-aa8b-a59e95cb7813
aronno1912/CSE410-Computer_Graphics
off2/raster2.cpp
#include <bits/stdc++.h> #include <iostream> #include <stack> #include <cmath> using namespace std; #ifdef __linux__ #include <GL/glut.h> #elif WIN32 #include <windows.h> #include <glut.h> #endif struct Point { double x, y, z; }; struct Vector3D { double x, y, z; // Normalize the vector void normali...
ALGO
0.96611
5.166339
90529510-ff68-43f4-92a6-81c1fde223b2
dic1911/Momogram
TMessagesProj/jni/voip/libtgvoip/VoIPServerConfig.cpp
#include "VoIPServerConfig.h" #include <stdlib.h> #include "logging.h" #include <sstream> #include <locale> using namespace tgvoip; ServerConfig* ServerConfig::sharedInstance=NULL; ServerConfig::ServerConfig(){ } ServerConfig::~ServerConfig(){ } ServerConfig *ServerConfig::GetSharedInstance(){ if(!sharedInstance)...
TOOL
0.959335
5.935797
76bf7e69-50c0-48b0-a028-c8b4c8d2ad27
basavarajakj/DataStructure_Algo_CPP
03-CharArrayAndStrings/Strings/Intermediate/15-integerToRoman.cpp
#include <iostream> #include <string> using namespace std; class Solution { public: // Function to convert an integer to a Roman numeral string intToRoman(int num) { // Array of Roman numeral symbols in decreasing order of value string romanSymbols[] = {"M", "CM", "D", "CD", "C", "XC", "L", "X...
ALGO
0.999415
7.338027
841c2b10-5700-4a65-b0e9-aa2f75d186f4
shreshthtuli/SAT-Formulator
main2.cpp
#include <fstream> #include <vector> #include <sstream> using namespace std; int main(int argc, char *argv[]){ ifstream input(argv[1]); // sat output ifstream inputG(argv[2]); // graph file ofstream output; output.open(argv[3]); // results file stringstream ss; string sat; input >> sat; //...
ALGO
0.999471
3.495369
a577a633-c773-42e1-9aad-d3d0e7dcb003
P41NT/Competitive-Programming
Codeforces/1977C_NikitaAndLCM/C. Nikita and LCM.cpp
#include <bits/stdc++.h> using namespace std; namespace __DEBUG_UTIL__ { using namespace std; /* Primitive Datatypes Print */ void print(const char *x) { cerr << x; } void print(bool x) { cerr << (x ? "T" : "F"); } void print(char x) { cerr << '\'' << x << '\''; } void print(signed short int x...
ALGO
0.999925
4.277684
c5e28970-cf13-44fa-b5b1-e212641c1318
BZDOLiVE/YoloPlanarSLAM
Thirdparty/DBoW2/DBoW2/ScoringObject.cpp
#include <cfloat> #include "TemplatedVocabulary.h" #include "BowVector.h" using namespace DBoW2; // If you change the type of WordValue, make sure you change also the // epsilon value (this is needed by the KL method) const double GeneralScoring::LOG_EPS = log(DBL_EPSILON); // FLT_EPSILON // ------------------------...
ALGO
0.995184
5.906807
78873ab8-887e-4ab7-8dc0-4fd71b3d31ff
AbbyNaomi/flutter_summer_course_tornado
day_17_flutter_navigation/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.998122
6.76073
b6e66dd2-91c1-4f0c-ba0b-27219e59d348
lucferreiraleite/BlocTraining
flutter_counter/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.998606
6.783439
d5fe734e-168c-4af5-9c67-e78650782524
1s22s1/kanraniwa
20250126/abc194_a.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n'; int init() { cin.tie(nullptr); ios_base::sync_with_stdio(false); return 0; } int main() { init(); int A, B; cin >> A >> B; if (A + B >= 15 && B >= 8) { cout << 1 << endl; } else if (A + B >= 10 && B...
ALGO
0.997443
4.937809
f9370442-ea22-4231-bca3-13413d0e2257
anurag-sketch/Practice-Questions
2506-count-pairs-of-similar-strings/2506-count-pairs-of-similar-strings.cpp
class Solution { public: int similarPairs(vector<string>& words) { int ans = 0; vector<string> v; for(auto w: words){ set<char> s; for(auto c: w) s.insert(c); string t = ""; for(auto m: s) t += m; v.push_back(t); } ...
ALGO
0.999973
5.851473
30822e7d-1d6c-4d82-8fae-225fb3949833
ishandutta2007/codeforces
sd0061/normal/288/A.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <cstdlib> #include <cmath> #include <cctype> #include <queue> #include <stack> #include <utility> #include <set> #define pb push_back #define mp make_pair #define fi first #define se second using namespace std; #def...
ALGO
0.999817
3.072993
6add44c4-b2c1-4845-a926-980e12ed64e6
adi-chang/DasarPemrograman-24T2
Pertemuan-10/fizzbuzz.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> int isnumeric(const char* str) { for (int i = 0; i < strlen(str); i++) { if (!isdigit(str[i])) return 0; } return 1; } int get_int(const char* prompt) { char str[25]; do { char c; pri...
ALGO
0.999276
4.376482
467dd921-3367-4b9e-8768-5f239f4e96cd
Octobug/notes
algorithms_and_data_structures/leetcode/array/e_01313_decompress_run_length_encoded_list/main.cpp
#include <iostream> #include <vector> #include <string> #include "array.h" using namespace std; class Solution { public: vector<int> decompressRLElist(vector<int> &nums) { int size = 0; for (int i = 0; i < nums.size(); i += 2) { size += nums[i]; } vector<in...
ALGO
0.999222
5.064179
00b588c1-9f27-4367-9a17-1533db413939
khanhbuiduc/ICPC
algo_course/Thang4/Buoi4/1. tjalg/sol.cpp
#include <iostream> #include <vector> #include <math.h> #include <stack> int n, m; int low[10005], num[10005]; bool deleted[10005]; std::vector <int> adj[10005]; int timeDfs = 0; int scc = 0; std::stack <int> mystack; void dfs(int u) { low[u] = num[u] = ++timeDfs; mystack.push(u); for (int i = 0; i < (int) ...
ALGO
0.999721
5.476328
6139a66f-7f93-4866-83c0-40d6e25286d4
GitHubETRR/codigos-extras-carra762
C++/sumaYCompara.cpp
#include <iostream> using namespace std; //clase class num{ private : int x; int y; int z; public : //setters void set_x(int x_otro) { do { if(x_otro < 1000 && x_otro > -1000) x = x_otro; else cout << "ingrese un ...
ALGO
0.991628
3.908408
0045e664-26e8-478c-b149-6cf312674a8f
sohailokzz/fly-emirates-boarding-ui
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.998693
6.797273
2d61ba57-35bc-463c-85e8-7d6feba0ee7a
benedicka/Competitive-Programming
CodeForces/486A/12684767_AC_15ms_1832kB.cpp
#include<stdio.h> int main() { long long n; scanf("%lld",&n); if (n%2==0)printf("%lld\n",n/2); else printf("%lld\n",(n-1)/2-n); return 0; }
ALGO
0.999905
3.080963
6a098556-4358-433f-a487-f3df516538b5
vmskhan/coding_champs_dsa
Problems_and_Solutions/days-10 to 19/day-11/cpp/solution 2.cpp
class Solution { public: int searchInsert(vector<int>& nums, int target) { int low=0,high=nums.size()-1,mid=0; while(low<=high) { mid=(low+high)/2; if(nums[mid]==target) return mid; else if(target<nums[mid]) high=mid-1; ...
ALGO
0.999924
6.273694
01ccef4c-800b-4f7f-bc14-c4738e739121
shuttfubbb/CTDL-GT_D20PTIT
Bai_tap_CTDL&GT/DSA02024.cpp
#include <iostream> #include <string> #include <math.h> #include <climits> #include <vector> #include <algorithm> #include <iomanip> #include <ostream> #include <set> #include <utility> #define FOR(i,a,b) for(int i=a;i<=b;++i) #define FORD(i,a,b) for(int i=a;i>=b;--i) #define tester() int t; cin >> t; while (t--) usi...
ALGO
0.999961
4.225871
adf60d77-652b-4bb6-b6e6-ddf4d3316583
maarufmahmud/HR_30Day_Preparetion
W1_Mini-Max Sum.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int max=INT32_MIN, min=INT32_MAX, sum=0; int arr[5]; for(int i=0;i<5;i++){ cin>>arr[i]; if(arr[i]<min) min=arr[i]; if(arr[i]>max) max=arr[i]; sum+=arr[i]; } printf("%ld %ld\n", sum-max, sum-min); r...
ALGO
0.999914
3.836876
5aa15818-a39d-44b3-bcd5-4f8b702f9900
lekimson/lekimsonmocC_cuoiki
Chapter 6/challengs/challengs7.cpp
#include <iostream> using namespace std; // Ham chuyen doi nhiet do tu F sang do C. double Celsius( double fahrenheit) { double celsius; celsius = (fahrenheit - 32) * 5/9; return celsius; } int main() { for ( int fahrenheit = 0; fahrenheit <= 20; fahrenheit++) { double celsius = Celsius(f...
TOOL
0.956178
4.027188
a7139418-f9e8-4e6a-9658-b66f30f0c67d
21Cash/Competitive-Programming
Library/LIS (Longest Increasing Subsequence).cpp
int lengthOfLIS(vector<int>& nums) { int N = nums.size(); vector<int> buf; for(int x : nums) { auto ind = lower_bound(buf.begin(), buf.end(), x) - buf.begin(); if(ind >= buf.size()) buf.push_back(x); else buf[ind] = x; } return buf.size(); }
ALGO
0.999986
5.810904
223be793-f917-418d-a330-34eb51080a19
JiteshBhashwani/DSA
DSA-Practice/LOVEBABBAR-DSA-SHEET/Array/Move_all_the_negative_elements_to_one_side_of_the_array.cpp
#include <iostream> #include<vector> #include<algorithm> using namespace std; void move(vector<int>& arr){ int head = 0; int tail = arr.size()-1; while(head<tail) { while(arr[head++]<0); while(arr[tail--]>0); swap(arr[--head],arr[++tail]); } } int main() { vector<int> arr...
ALGO
0.999972
4.732906
7c5d7089-d2bd-42b2-8272-90d9c581552a
Navong/codetree-TILs
240907/2021년 날짜의 유무/with-or-without-2021.cpp
#include <iostream> using namespace std; bool isValidDate(int M, int D){ int dayInMonth[]={31,28,31,30,31,30,31,31,30,31,30,31}; if(M < 1 || M > 12){ return false; } if(D < 1 || D > dayInMonth[M-1]){ return false; } return true; } int main() { // 여기에 코드를 작성해주세요. int ...
ALGO
0.999953
4.782966
db61070c-8223-49d6-a5a9-32bc731c1ecd
zaaaato/kyopro
AOJ/iTP1/sortingThreeNumbers.cpp
#include <iostream> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int nums[3] = {a, b, c}; int nums_length = sizeof(nums) / sizeof(nums[0]); for (int i = 0; i < nums_length - 1; i++) { for (int j = 0; j < nums_length - 1 - i; j++) { if (nums[j] > nums[j + 1]) { ...
ALGO
0.999811
3.735809
95aff345-9f76-4a87-bb84-ac784fb7a36f
kinantanbagaspati/leetcode-submissions
1187-make-array-strictly-increasing/1187-make-array-strictly-increasing.cpp
class Solution { public: int makeArrayIncreasing(vector<int>& arr1, vector<int>& arr2) { // compact vector<int> srt; for(int i=0; i<arr1.size(); i++) srt.push_back(arr1[i]); for(int i=0; i<arr2.size(); i++) srt.push_back(arr2[i]); sort(srt.begin(), srt.end()); map<int...
ALGO
0.999977
5.067269
79820ccf-1da1-4826-adc1-ebe33af01168
faiyazMohd/DSA-Journey
examples/rerverseAnArray.cpp
#include <iostream> using namespace std; void reverseAnArray(int arr[], int n) { for (int i = 0; i < n/2; i++) { int temp; temp = arr[i]; arr[i] = arr[(n-1)-i]; arr[(n-1)-i] = temp; } // for (int i = 0, j = n - 1; i < n / 2; i++, j--) // { // int temp = a...
ALGO
0.999893
3.927542
8dbe4abd-3097-4e29-8663-4dc569c96210
AAIR-lab/CAT-RL
baselines/JIRP/src/automata_learning_utils/lib_SAT/libalf/src/conjecture.cpp
#include <set> #include <map> #include <list> #include <queue> #include <string> #ifdef _WIN32 #include <winsock.h> #include <stdint.h> #include <stdio.h> #else #include <arpa/inet.h> #endif #include <stdlib.h> #include "libalf/conjecture.h" #include "libalf/serialize.h" namespace libalf { using namespace std; //...
ALGO
0.997878
3.383931
107ea00b-0324-4744-aa4b-32e04aef3e60
terror/solutions
atcoder/abc086_b.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef unsigned int uint; typedef unsigned long long ull; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<vi> vvi; typedef vector<vl> vvl; typedef pair<int, int> ii; typedef map<int, int> MPII; typedef set<int> ...
ALGO
0.999973
4.566706
a2f0d7fa-063d-48bc-b9d4-cd2bf96f65c1
mvaloriani/InformaticaA
PreparazionePrimaProva/Ese11-TDE09022001.cpp
/* Si definisca una funzione che riceve in input due matrici m1 e m2 di NxN interi. La funzione calcola e restituisce il numero di elementi di m2 che sono pari alla somma di due qualsiasi elementi di m1 (se un dato elemento di m2 somma di pi coppie di elementi di m1, viene contato comunque una volta sola) La funzion...
ALGO
0.998787
4.441596
0e09f269-1f75-476c-8b1c-39eaaabeb2bd
taptipalit/dynpta
lib/Transforms/Scalar/DivRemPairs.cpp
#include "llvm/Transforms/Scalar/DivRemPairs.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/MapVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/GlobalsModRef.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/IR/Dominators.h" #include "llvm/IR/Function.h" #include "llvm/Pass.h" #inc...
ALGO
0.985808
7.81071
66f2b610-48bc-4847-b8eb-bc8f80c4f660
purecheeses/LearnOpenGL
cocos2d/cocos/3d/CCOBB.cpp
#include "3d/CCOBB.h" NS_CC_BEGIN #define ROTATE(a,i,j,k,l) g=a.m[i + 4 * j]; h=a.m[k + 4 * l]; a.m[i + 4 * j]=(float)(g-s*(h+g*tau)); a.m[k + 4 * l]=(float)(h+s*(g-h*tau)); static Mat4 _getConvarianceMatrix(const Vec3* vertPos, int vertCount) { int i; Mat4 Cov; double S1[3]; double S2[3][3]; S...
ALGO
0.998299
6.119939
6a4084df-84a9-4154-8115-d6c31962526c
xuese0513/CYICE-DOMjudge
History/5th/D/Code/predit_the_winner.cpp
#include<iostream> #include<vector> #include<math.h> using namespace std ; bool PredictTheWinner( vector<int> nums ) ; int findAns( vector<int>, int i, int j) ; int main() { int times ; long long num ; bool ans = false ; vector<int> list ; cin >> times ; for( int i = times ; i > 0 ; i-- ) { ci...
ALGO
0.999882
4.932925
6dfb3d3f-0340-429f-a17b-d6929d8d2349
minsoonss/BOJ-Algospot
괄호.cpp
#include <cstdio> #include <vector> #include <algorithm> using namespace std; vector <char> v; int cnt; void calc(); int main(){ int t; char a; scanf("%d%c",&t,&a); while(t--){ calc(); cnt = 0; } } void calc(){ char temp; while(1){ scanf("%c",&temp); if(temp != '(' && temp != ')'){ break; } else ...
ALGO
0.999842
3.613686
0b92e77e-cb11-483c-9117-4515bb84ec22
kwheelerj/Challenges
hackerrank/practice/InterviewPreparationKit/01_Warm-upChallenges/00_SockerMerchant.cpp
#include <bits/stdc++.h> #include <iostream> using namespace std; vector<string> split_string(string); // Complete the sockMerchant function below. int sockMerchant(int n, vector<int> ar) { if (n == 0 || n == 1) { return 0; } sort(begin(ar), end(ar)); int pair_cnt = 0; for (auto i = std::begin(ar); i < std::...
ALGO
0.99997
5.28661
c5bca3b3-8bcd-4d37-8f8d-a11055da11d5
n99joon/AlgorithmProblems
CPPTester/Math/IntAndComb/1037factor.cpp
#include <cstdio> main(){ int t,m=2e9,M=0,k; scanf("%d",&t); while(t--){ scanf("%d",&k); if(k>M)M=k; if(k<m)m=k; } printf("%d",m*M); }
ALGO
0.999642
3.427106
d84d55c5-b5cb-46f9-9b1e-c8db22d9d125
AniketR9/SEM_6_LP2
A1f.cpp
#include<bits/stdc++.h> using namespace std; class graph{ int v; map<string, int>name_id; map<int,string> id_name; unordered_map<int,vector<int>>adj; public: graph(){v=0;} void addEdge(int src, int dest){ adj[src].push_back(dest); adj[dest].push_back(src); } void input(){ ...
ALGO
0.99966
4.913761
b1dc85b7-0aab-4a6b-b66f-6a2e04cbba9b
digvijayizing/Leetcode-Solutions
Easy/Binary Search/binarySearch.cpp
class Solution { public: int search(vector<int>& nums, int target) { int l = 0; int h = nums.size() - 1; while (l <= h) { int m = l + (h - l) / 2; //use this instead of m= (l+h)/2 if (nums[m] == target) { return m; } ...
ALGO
0.999894
6.130206
da7a8a26-1247-4c1d-ad66-5a168f921124
ShivamShrivastav26112005/LEETCODE-PROBLEMS
Sliding Window/2134. Minimum Swaps to Group All 1's Together II.cpp
2134. Minimum Swaps to Group All 1's Together II -: A swap is defined as taking two distinct positions in an array and swapping the values in them. A circular array is defined as an array where we consider the first element and the last element to be adjacent. Given a binary circular array nums, return the minimum nu...
ALGO
0.999992
6.498415
39b81c3b-a881-47e3-9928-6fa82fd10e67
PawanKmr470/DSA_Practice_Set
DSA_CPP/21_Test_cpps/test4.cpp
#include <iostream> #include <list> #include <vector> #include <stack> using namespace std; class Graph { private: int noOfVertices; list<int> *adjList; public: Graph(int vertices) { noOfVertices = vertices; adjList = new list<int> [noOfVertices]; } void addEdge(int src, int dst) {...
ALGO
0.999931
5.640803
44e3a5cc-7b49-4dee-a831-26160745a90b
AhmadkhanAK/100-Days-cpp-challenge
day94.cpp
#include <iostream> using namespace std; int test(int x, int y) { if (x > 13 && y > 13) return 0; if (x <= 13 && y > 13) return x; if (y <= 13 && x > 13) return y; return x > y ? x : y; } int main() { cout << test(4, 5) << endl; cout << test(7, 1...
ALGO
0.999048
4.26597
8aa18f4a-4078-4a47-9949-a22881c792ed
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_5744_16.cpp
#include <bits/stdc++.h> using namespace std; const long long N = 1e5 + 5; const long long mod = 1e9 + 7; int main() { int t = 1; while (t--) { long long n, temp, sum; cin >> n; for (int i = n + 1; i <= 1003; i++) { sum = 0; temp = i; while (temp) { sum += temp % 10; te...
ALGO
0.999917
4.716251
5c8764d2-14cf-4830-ad9b-05ee5bafa596
alexandraback/datacollection
solutions_1673486_1/C++/papaya/p1.cpp
#include <stdio.h> #include <iostream> #include <time.h> #include <set> #include <cstdlib> #include <ctype.h> #include <string.h> #include <vector> #include <assert.h> #include <math.h> using namespace std ; #define MAX 200000 int n ; int L ; double p [ MAX ] ; double calc_1( ) { double sum = 2 * L ...
ALGO
0.999693
3.520614