uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
00945bc9-5e20-457b-8b2f-826b8bcc6de2
SaikiranM007/Coding-Exercises
Counter.cpp
#include<iostream> using namespace std; void rec1(int n){ if(n==0){ return ; } else{ rec1(n-1); cout<<n<<"\n"; } } int main(int argc, char const *argv[]) { rec1(5); return 0; } <EMAIL>
ALGO
0.999672
4.351465
c52832de-db19-4ef0-a507-2b75a41736ca
TwinkleGupta07/Leetcode-Practice
410-split-array-largest-sum/410-split-array-largest-sum.cpp
class Solution { public: int splitArray(vector<int>& nums, int m) { int start = 0, end = 0; for(int i=0; i < nums.size(); i++){ start = max(start, nums[i]); end += nums[i]; } while(start < end){ int mid = start + (end - start) / 2; ...
ALGO
0.999965
6.122509
f4b72b63-7677-4f89-bcaf-0bf2a2420305
SaudCh/CC-Lab-Task
week 13/stack.cpp
#include <stdio.h> #include <stdlib.h> #define size 5 int arr[size]; int index = -1; int top = size; bool isEmpty(){ if(index == -1){ return true; }else{ return false; } } bool isFull(){ if(index == size-1){ return true; }else{ return false; } } void push(int val){ if(isFull()){ return; } ind...
ALGO
0.994696
3.978296
77d26e49-b42e-4019-a083-6e70049ce9a2
sathishkumarg5024/Data-Structures-and-Algorithm-Master-Course-Supreme-Batch
Basics_+_Patterns_29th January 2023/Pattern-3_Hollow-shape.cpp
// This is the pattern of hollow shape (generic code for both square and rectangle). If we want hollow square the simple put r and c as equal values #include<iostream> using namespace std; int main(){ int r = 4; // For generic code int c = 6; // For generic code for(int row = 0;row<r;row=row+1){ // Out...
ALGO
0.997854
3.045962
0c8b3678-8b47-407d-aeca-745880cac09c
AcmeUI/android_frameworks_native
opengl/libs/EGL/BlobCache.cpp
//#define LOG_NDEBUG 0 #include "BlobCache.h" #include <android-base/properties.h> #include <errno.h> #include <inttypes.h> #include <log/log.h> #include <chrono> namespace android { // BlobCache::Header::mMagicNumber value static const uint32_t blobCacheMagic = ('_' << 24) + ('B' << 16) + ('b' << 8) + '$'; // Bl...
TOOL
0.911794
7.629368
62faf1a5-cdaf-47b5-aa61-baad63abb28b
tangina-sultana/knowledgegraph
src/kognac/compression/hashcompressor.cpp
#include <kognac/hashcompressor.h> #include <kognac/hashmap.h> #include <kognac/lz4io.h> #include <kognac/stringscol.h> #include <kognac/hashfunctions.h> #include <kognac/triplewriters.h> #include <kognac/filemerger.h> #include <string> #include <boost/filesystem.hpp> using namespace std; namespace fs = boost::filesy...
DATA
0.987652
5.414224
c426201a-89a2-451d-adb8-83c44b310698
akshitmethi/algorithms
DSA_Cpp/reverse_string.cpp
#include<bits/stdc++.h> using namespace std; class node { public: int val; node * left; node * right; node(int value){ this->val = value; } }; void swap(int *a, int *b){ *a = *a+*b; *b = *a-*b; *a = *a - *b; } int main(){ int arr[] = {1,2,3,4,5,6,7,8,9}; int siz = 9; int k=6; int s=0,e=k-1; while(s<si...
ALGO
0.999941
3.069515
1d18b603-b7de-4fe8-8ac6-dda827c05576
raincross7/code-similarity
codes/train_code/problem198/problem198_160.cpp
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) using namespace std; using P = pair<int, int>; using ll = long long; int main() { string s, t; cin >> s >> t; string ans = ""; rep(i, t.size()) { ans += s[i]; ans +=...
ALGO
0.999908
4.117212
43e9c2e8-9fd1-47b2-a153-10d56ef6e887
mkury/PrograSistemas
Progra Sistemas/Progra Sistemas/Programas Segundo Parcial/funcionesyArreglos/main.cpp
#include <iostream> using namespace std; int numero[4]; void ingreso (int numero[]){ int i; for (i=0; i<5;i++){ cout<<"Ingresar Numero: "; cin>>numero[i]; } for (i=0; i<5;i++){ int cont = i+1; cout<<"Numero "<<cont<<": "<<numero[i]<<"\n...
ALGO
0.906722
3.525135
60ae82b0-d8f3-4824-832d-a9e50009ecb3
rgsk/cpp-dsa-endgame
src/CSES/1. Introductory Problems/9. Bit Strings/main.cpp
#include <bits/stdc++.h> using namespace std; int mod = 1000000007; int main() { #ifndef ONLINE_JUDGE // For getting input from input.txt file freopen("input.txt", "r", stdin); // Prlong longing the Output to output.txt file freopen("output.txt", "w", stdout); #endif int n; cin >> n; int ...
ALGO
0.999899
4.715374
8b239d34-99cf-4626-9ef1-5ff21c71b44f
ali3alnasser/faiss
perf_tests/bench_scalar_quantizer_distance.cpp
#include <gflags/gflags.h> #include <omp.h> #include <cstdio> #include <map> #include <benchmark/benchmark.h> #include <faiss/impl/ScalarQuantizer.h> #include <faiss/perf_tests/utils.h> #include <faiss/utils/random.h> using namespace faiss; DEFINE_uint32(d, 128, "dimension"); DEFINE_uint32(n, 2000, "dimension"); DEFI...
TEST
0.975289
6.491876
11d899ad-e456-4a86-8450-08ff4c13b702
Temikmapper77/Coursera-WhiteBelt
Week 04/Task 07 - Rational Numbers/rational_map.cpp
#include <iostream> #include <sstream> #include <numeric> #include <string> #include <set> #include <map> #include <vector> using namespace std; class Rational { public: Rational() { num = 0; den = 1; } Rational(int numerator, int denominator) { SetNumbers(numerator, denominator)...
ALGO
0.897895
4.83224
75ee04a8-e3de-417c-85e7-2007be805b6a
Kaarti22/Solutions_DSA_CP
Dynamic Programming/minimum_path_sum.cpp
/* Link: https://leetcode.com/problems/minimum-path-sum/description/ Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. Note: You can only move either down or right at any point in time. Example 1: Input: grid = [[1,...
ALGO
0.999977
6.5658
74c288ed-8331-42f3-a134-7131931efa07
A-PhantomStar/NewC-Stuff
School/Module 2/Week7/Problem_num9/main.cpp
#include <iostream> #include <vector> using namespace std; void sortArray(vector<int>& array) { int n = array.size(); for (int i = 0; i < n - 1; ++i) { for (int j = 0; j < n - i - 1; ++j) { if (array[j] > array[j + 1]) { swap(array[j], array[j + 1]); } } ...
ALGO
0.999896
5.72986
bf776167-8769-45dd-b71a-95edd0e2998a
raincross7/code-similarity
codes/train_code/problem484/problem484_432.cpp
#include <iostream> #include <string> using namespace std; int main() { string S, T; cin >> S >> T; for (unsigned int i = 0; i < S.length(); i++) { if (S[i] != T[i]) { cout << "No" << endl; return 0; } } cout << "Yes" << endl; return 0; }
ALGO
0.999996
3.759357
7884fb8a-f127-49ec-b6f5-91f1c1a5365a
Sunny011703/fmart
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
7558c8d8-39d6-44e6-9f46-7d5cb3ae0433
Future-Outlier/OOP-ITSA
C_MM35.cpp
#include <bits/stdc++.h> using namespace std; int main() { long x; while (cin >> x) { if (x % 400 == 0) { cout << "Bissextile Year" << '\n'; } else if (x % 100 == 0) { cout << "Common Year" << '\n'; } else if (x % 4 == 0) { cout << "Bissextile Year"...
ALGO
0.999795
5.326016
b8a3cfb0-28ea-4c78-ab89-fdd2af423796
Chester991/Codeforces_Questions
A-set/1327A_Sum_of_Odd_Integers.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define int long long const int MOD = 1e9 + 7; const int INF = LLONG_MAX >> 1; signed main() { ios::sync_with_stdio(false); cin.tie(NULL); int tc; cin >> tc; while (tc--) { int n, k; cin >> n >> k; if (n % 2 != 0 &&...
ALGO
0.999817
4.26493
1875ac53-4d2f-4b74-bdef-2ad7b3d79af3
shashank321-png/DSA
Tree/boundaryTraversal.cpp
// Boundary Traversal of Tree #include<bits/stdc++.h> using namespace std; struct Node{ int data; Node *left,*right; Node(int k){ data=k; left=NULL; right=NULL; } }; bool isLeaf(Node* root){ return ((!root->left) && (!root->right)); } void addLeftNode(Node* root,vector<i...
ALGO
0.999938
4.459994
139a1598-78d5-4036-ab7e-9eaa29264a63
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-gpt4/Codenet/p01564/614200666/original.cpp
#define NDEBUG #include <algorithm> #include <cassert> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <tuple> #include <vector> using namespace std; typedef long long ll; struct LCNode { typedef LCNode *NP; typedef int D; static const int INF = 1LL << 25; static c...
ALGO
0.999992
4.425738
88d5dc9e-d5ef-4ef6-9c26-b8f4faf63bef
ishandutta2007/codeforces
jcvb/normal/611/D.cpp
#include<cstdio> #include<algorithm> #include<cstring> #include<iostream> #include<cstdlib> #include<cmath> #include<vector> #include<map> #include<set> #include<queue> #include<bitset> #define cl(a) memset(a,0,sizeof(a)) using namespace std; typedef long long ll; typedef double db; const db pi=3.1415926535897932384626...
ALGO
0.99999
4.076731
c042c0ec-e98f-45e7-8f5f-44129c6709b0
Marcus-Jon/common_algorithms_cpp
quick_sort.cpp
#include <iostream> using namespace std; int partition(int num_array[], int first, int last) { int pivot = num_array[first]; int leftmark = first + 1; int rightmark = last; int temp; bool finished = false; while(!finished) { while(leftmark <= rightmark && num_array[leftmark] <= pivot) { ...
ALGO
0.999978
5.385945
d4b153e7-a006-4469-898d-436e40b7c487
rajan1602/DSA_IN_C-
QUEUE/Que_using_st.cpp
#include<bits/stdc++.h> using namespace std; class Queue{ stack<int> st; public: Queue() {} void push(int x){ stack<int> temp; while(!st.empty()){ temp.push(st.top()); this->st.pop(); } st.push(x); // this line insert the element from bottom of...
ALGO
0.999293
4.416217
782ec2be-bb5a-4341-ac57-4c895aa4846c
Prajwal0311/C-
Factorial_Func.cpp
#include<iostream> using namespace std; int fact(int n) { int factorial=1; if( n==0 || n==1 ){ return 1; } else{ for(int i=2;i<=n;i++) { factorial=factorial*i; } return factorial; } } int main() { int n; cin>>n; int factorial; factorial=fact(n); co...
ALGO
0.999931
5.250169
1f20f4bd-7d30-4a30-a194-cd5df9febeb7
gecarval/FlockSim
srcs/classes/Boid.cpp
#include "../../includes/classes/Boid.hpp" // CONSTRUCTOR Boid::Boid(void) { this->rotation = 0; this->radius = BOID_SIZE; this->stats = (t_boid){ (t_lifestats){MAX_HEALTH, MIN_BIRTH_ENERGY, 0.0f, 0, 0, 0, true, false}, 0, Vector2Zero(), RED, 50, 0.0, 10, 0.06, 5, 0.035, 0.5, 0.35, 0.1, ...
ALGO
0.990492
6.641488
4ab83153-bb3c-4143-8f5c-e26361d6a28d
JakobAarestrup/PRJ4
TrainBrain/software/TableDetector/opencv_all/opencv-4.1.0/samples/cpp/3calibration.cpp
/* * 3calibration.cpp -- Calibrate 3 cameras in a horizontal line together. */ #include "opencv2/calib3d.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include "opencv2/core/utility.hpp" #include <stdio.h> #include <string.h> #include <time.h> using namespace c...
TOOL
0.986972
5.557015
971103fe-98c1-43d8-b3e4-ef67cb91b8c6
cqszhuangyang/unity_pcm2amr
Android/AMR/amrlib/jni/opencore/codecs_v2/audio/gsm_amr/amr_nb/common/src/mult_r.cpp
/* Filename: mult_r.cpp ------------------------------------------------------------------------------ MODULE DESCRIPTION Multiplication function with rounding and overflow control ------------------------------------------------------------------------------ */ /*-----------------------------------------------...
ALGO
0.998039
6.224941
3361e590-0a8a-481c-984c-a94c8204ff7e
donzoru/GN-template-demo
buildtools/third_party/libc++/trunk/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/upper_bound.pass.cpp
// <algorithm> // template<ForwardIterator Iter, class T> // constexpr Iter // constexpr after c++17 // upper_bound(Iter first, Iter last, const T& value); #include <algorithm> #include <vector> #include <cassert> #include <cstddef> #include "test_macros.h" #include "test_iterators.h" #if TEST_STD_VER > 17 T...
TEST
0.978803
7.253215
9e86876f-9802-4906-a880-b1d2b0148bb7
chaurasiya-ayush/CodeForces
Queue_at_the_school.cpp
#include <bits/stdc++.h> using namespace std; int main() { string str ; int cnt= 0; int n,x; cin >>n >>x>> str; for(int j=0;j<x;j++) for(int i = 0; i < n; i++ ){ if(str[i]=='B' && str[i+1]=='G'){ str[i]='G';str[i+1]='B'; i++; } } cout << str << endl; retu...
ALGO
0.999359
3.700308
d0582c42-2cca-4dac-8997-75516efce997
ZhifuWei/Feng
snake.cpp
#include "snake.h" #include <conio.h> #include "tools.h" #include <iostream> void Snake::InitSnake()//初始化蛇 { for (auto& point : snake) { point.PrintCircular(); } } void Snake::Move()//蛇增长 { switch (direction) { case Direction::UP: snake.emplace_back(Point(snake.back().GetX(), s...
TOOL
0.993743
4.933619
a2ccf3e1-81e4-4675-a0d7-e8c94e436877
kmjp/procon
codeforce/441-460/453/c.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZER...
ALGO
0.99975
4.035431
455a0f99-61b1-4636-a9ed-1933723974f8
Arisha598/DSA_100days
day25/1st.cpp
//custom comparator use #include<iostream> #include<algorithm> #include<vector> #include<string.h> using namespace std; bool cmp(char first , char second){ return first > second; } bool compare(int a , int b){ return a>b; } int main(){ string s="babbar"; sort(s.begin(),s.end() , cmp); cout << s << e...
ALGO
0.997743
4.008859
98afe5e3-ca5a-4605-8a79-eec8901a3095
hyo-limilimee/algorithm
algorithm-C/baekjoon_C/src_2743.cpp
#include <stdio.h> #include <string.h> #pragma warning(disable: 4996) int main() { char word[100] = " "; scanf("%s",&word); int count = 0; for (int i = 0; i< strlen(word); i++) { count++; } printf("%d", count); return 0; }
ALGO
0.998501
3.220301
5ec3a3d4-ea88-46bc-8383-b7ee57659a9d
thegamer1907/Code_Analysis
Implementation/1525.cpp
#include<bits/stdc++.h> using namespace std; int main() { string str; cin>>str; if(str.size()<7) cout<<"NO"<<endl; else{ for(int i=0;i<str.size();i++) { int flag=0; for(int j=i+1;j<=i+6;j++) { if(str[i]!=str[j]) ...
ALGO
0.999883
3.541471
b4a02e6b-a760-4e70-af02-6e2d3dc69158
MayankKunal/LeetCodeproblems
3174-minimum-number-of-changes-to-make-binary-string-beautiful/minimum-number-of-changes-to-make-binary-string-beautiful.cpp
class Solution { public: int minChanges(string s) { int n=s.size(); int count=0; for(int i=0;i<n;i+=2) { if(s[i]!=s[i+1]) count++; } return count; } };
ALGO
0.999961
5.650373
90107e6e-a698-403e-bfab-923a423bdad8
johan-sun/ivmm
kmaxpath.cpp
#include <iostream> #include <string> #include <boost/program_options.hpp> #include <boost/range.hpp> #include <boost/range/adaptors.hpp> #include <boost/filesystem.hpp> #include <shapefil.h> #include "transitionGraph.h" using namespace std; namespace po = boost::program_options; namespace fs = boost::filesy...
DATA
0.948892
4.757912
5a25150c-5912-4eef-b906-3c9605e6ac42
shilx544/leetcode
二叉树/108. 将有序数组转换为二叉搜索树.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* sortedArrayToBST(vector<int>& nums) { if (nums.empty()) { return ...
ALGO
0.999995
6.915322
36523861-0316-435e-8a5d-0799cd6172fe
raincross7/code-similarity
codes/train_code/problem500/problem500_408.cpp
#include <bits/stdc++.h> using namespace std; #define all(a)a.begin(),a.end() #define rep(i,n) for (int i = 0; i < (n); ++i) using ll=long long; using ll=long long; const int INF = 1<<30; const ll INFll =1LL<<62; const int mod = int(1e9)+7; using V = vector<ll>; using P = pair<ll,ll>; int main() { string s;cin >>s...
ALGO
0.999466
3.898539
cb6c012a-6fe6-4d83-949b-45f2e6a52056
SatyamBaranwalUP-65/C-
Chapter4-PatternPrinting/StarTriangleVertically.cpp
#include<iostream> using namespace std; int main(){ int n; cin>>n; for(int i = 1; i<=n; i++){ for(int j = 1; j<=n-i; j++){ cout<<" "; } for(int j =1; j<=i; j++){ cout<<"* "; } cout<<endl; } }
ALGO
0.999932
3.731159
4ce23b23-6261-459b-8ef4-88129b359a8f
jiho7407/PS
Other Contests/University/SUAPC/2024S/contest/M.cpp
#include <bits/stdc++.h> #define ll long long #define lll __int128 #define ld long double #define rep(i,l,r)for(int i=(l);i<(r);i++) using namespace std; typedef pair<int, int> pii; typedef pair<ll, ll> pll; void fastio(){ cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false); } struct Fenwick{ ve...
ALGO
0.999726
3.840223
7c1c7e5c-7c34-4eef-be28-2eafdadc29f8
dirtyg2120/parallel-computing-ass1
sense-reversing-barrier/srb_pthreads.cpp
#include <iostream> #include <vector> #include <pthread.h> #include <chrono> #include <iomanip> class SenseReversingBarrier { private: int count; int initial_count; bool sense; pthread_mutex_t mutex; pthread_cond_t cond; public: SenseReversingBarrier(int n_threads) : count(n_threads),...
TEST
0.913168
6.163692
13f03f2f-4cf4-4972-af2b-22bc4511068a
Linsanity81/TileableShell
ext/libigl/include/igl/copyleft/comiso/miq.cpp
#include "miq.h" #include "../../local_basis.h" #include "../../triangle_triangle_adjacency.h" #include "../../cut_mesh.h" #include "../../LinSpaced.h" // includes for VertexIndexing #include "../../HalfEdgeIterator.h" #include "../../is_border_vertex.h" #include "../../vertex_triangle_adjacency.h" // includes for Po...
ALGO
0.998859
5.056123
0702117b-9939-4a18-a1f0-86384487d453
Avinash0308/LeetCodePOTDSolution_2023
JUN 11 2023 -- Snapshot Array Solution.cpp
class SnapshotArray { vector<unordered_map<int,int>> v; int sna = 0; public: SnapshotArray(int length) { v.resize(length); } void set(int index, int val) { v[index][sna] = val; } int snap() { sna++; return sna-1; } int get(int index, int...
ALGO
0.943933
6.211698
4ef58915-fefe-49a9-8778-5ae1e7bc18e4
wxharry/MyLeetCode
698.partition-to-k-equal-sum-subsets.cpp
/* * @lc app=leetcode id=698 lang=cpp * * [698] Partition to K Equal Sum Subsets */ // @lc code=start class Solution { public: bool canPartitionKSubsets(vector<int>& nums, int k) { int n = nums.size(); int sum = accumulate(nums.begin(), nums.end(), 0); if(nums.size() < k || sum % k) ret...
ALGO
0.999949
6.220375
a90f119a-b868-4fd6-b0f1-cd3a6d4b9263
GunnarGramser/cpp_base_camp
get_started/get_started_solution/get_started/main.cpp
#include <iostream> using namespace std; int main() { // const int life = 4; // prefix the int declaration with a "qualifier" // of "const" makes it's a constant value int life; life = 4; int card; card = 40; int my_card = card; // With pointer int *my_pointer; // declare the pionter with the `*` my_po...
TOOL
0.914036
3.454912
33143cae-1576-42d3-82a4-fb1ba62ce313
hhh07/multi_nat
ctcdecode/third_party/boost_1_67_0/libs/compute/perf/perf_stl_set_union.cpp
#include <vector> #include <algorithm> #include <iostream> #include "perf.hpp" int rand_int() { return static_cast<int>((rand() / double(RAND_MAX)) * 25.0); } int main(int argc, char *argv[]) { perf_parse_args(argc, argv); std::cout << "size: " << PERF_N << std::endl; std::vector<int> v1(std::floor...
ALGO
0.968278
5.510092
2ac25517-51f4-49e6-aa19-719433d93a10
ritujashinde97/Competitive_Programming
FindAllDuplicatesInAnArray.cpp
class Solution { public: vector<int> findDuplicates(vector<int>& nums) { sort(nums.begin(),nums.end()); vector<int> v; if(nums.size()==1) return{}; for(int i=0;i<nums.size()-1;i++) { if(nums[i]==nums[i+1]) v.push_back(nums[i]); } ...
ALGO
0.999979
5.345069
c7d884ff-8d04-4d8b-afc1-77a51adff102
MuhammadBasyuny97/myLeetcode
0066-plus-one/0066-plus-one.cpp
class Solution { public: vector<int> plusOne(vector<int>& digits) { size_t s{digits.size()}; ++digits[s-1]; while(digits[s - 1] > 9 && s > 1){ digits[s - 1] = 0; ++digits[s - 1 - 1]; --s; } if (di...
ALGO
0.999861
6.872186
1e120287-4124-4d26-90ca-1c05514bc825
u-wyh/luogu-code
P1783.cpp
#include<bits/stdc++.h> using namespace std; const int MAXM = 805; const double sml = 1e-5; int n,m; double dis[MAXM][MAXM]; bool vis[MAXM]; struct node{ int x,y; }nums[MAXM]; bool cmp(node a,node b){ return a.x<b.x; } bool dfs(int u,double x){ //cout<<u<<endl; if(nums[u].x==nums[m].x){ retu...
ALGO
0.999952
4.181316
698d0235-8117-4861-bf19-02a1c58e449f
Siddhant-Mahato/DSA
018. Recursion-4/1.3-Pallindrom_check.cpp
#include<iostream> using namespace std; bool checkPalindrome(string str, int i, int j) { //base case if(i>j) return true; if(str[i] != str[j]) return false; else{ //Recursive call return checkPalindrome(str, i+1,j-1); } } int main() { string name = "BookkooB...
ALGO
0.998826
4.614996
ec267638-5df9-4fdf-a104-521bea653f7f
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_3767_3.cpp
#include <bits/stdc++.h> using namespace std; void display(vector<long long> &a) { for (long long z : a) cout << z << " "; cout << endl; } long long dx[4] = {0, 0, 1, -1}; long long dy[4] = {1, -1, 0, 0}; const long long mod = (long long)1e9 + 7; const long long INF64 = 3e18; void smxl(long long &a, long long b) { ...
ALGO
0.999794
3.092328
e20608ee-8a77-4474-9d98-a5fd9d19af04
rishabh-munjal/DSA-cpp
CodeForces/1029(D3)/B.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define int long long const int MOD = 1e9 + 7; const int INF = LLONG_MAX >> 1; signed power(int a , int b ){ if(b == 0 ) return 1 ; int half_power = power(a, b/2); if(b% 2 == 0 ) return half_power * half_power ; else ...
ALGO
0.999886
4.774426
df156f22-7642-448c-8d90-2755a4a255e6
Sampurankishoresrivastava/DSA
leetcode/42. Trapping Rain Water.cpp
class Solution { public: int trap(vector<int>& height) { int n= height.size(); // int a[n]; // int b[n]; vector<int> a(n); vector<int> b(n); a[0]= height[0]; b[n-1]= height[n-1]; for(int i=1; i<n; i++) { a[i]= max(a[i-1], height[i])...
ALGO
0.999975
6.678387
2f88349e-f90e-444b-81b2-4119fb30fa80
ftiasch/acm-icpc
codeforces/58-codeforces-beta-round-54/C.cpp
// Codeforces Beta Round #54 // Problem C -- Trees #include <cstdio> #include <cstring> #include <map> #include <algorithm> #define foreach(i, v) for (__typeof((v).begin()) i = (v).begin(); i != (v).end(); ++ i) int n; std::map <int, int> count; int main() { scanf("%d", &n); for (int i = 0; i < n; ++ i) { ...
ALGO
0.999732
4.154377
9d3eb97c-8dea-4251-b879-ae3d5f123a13
ishandutta2007/codeforces
ivan100sic/normal/378/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cerr.tie(nullptr); int x, y, a=0, b=0, c=0; cin >> x >> y; for (int i=1; i<=6; i++) { int u = abs(i-...
ALGO
0.999777
4.21074
21ce8de7-7ef7-4769-a640-b43fb0e30ddf
Zeal-xx/pvpgn-twilight
pvpgn/src/d2cs/cmdline.cpp
#include "common/setup_before.h" #include "setup.h" #include "cmdline.h" #include <cstdio> #ifdef WIN32 # include "win32/service.h" #endif #include "compat/strcasecmp.h" #include "common/conf.h" #include "common/xalloc.h" #include "common/eventlog.h" #include "version.h" #include "common/setup_after.h" namespace pv...
TOOL
0.868653
5.714871
74b62587-8503-4eb6-8b4b-22f4ebbad405
jeffreylin0909/I2P-FinalProject
unittest/state_test.cpp
#include <iostream> #include <cstdlib> #include "../src/state/state.hpp" #include "../src/config.hpp" int main(){ srand(RANDOM_SEED); State state; std::cout << state.encode_output() << std::endl; state.get_legal_actions(); for(auto move: state.legal_actions){ std::cout << move.first.first << " " << m...
ALGO
0.976957
4.196708
344c8726-5312-4314-8587-ec4a73184058
elitostajunior/logica-programacao-the-coder
Arquivos/Exercicio 3.9.cpp
/* 9. Crie um programa para calcular o salrio de uma vendedora. O programa deve pedir o valor vendido no ms pela vendedora. Se o valor for at R$ 10.000,00 ela recebe o salrio base mais 2% do valor vendido. Se a vendedora vendeu entre R$ 10.000,00 e R$ 100.000,00, ela recebe o salrio base mais 3,5% do valor vendido. S...
ALGO
0.956071
4.445845
d43184df-6b57-4d9c-a3d0-30a5994c780c
vivekpatidar549/GFG
Easy/Transform to Sum Tree/transform-to-sum-tree.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *left; struct Node *right; }; // Utility function to create a new Tree Node Node* newNode(int val) { Node* temp = new Node; temp->data = val; temp->left = NULL; temp->right = NULL; ...
ALGO
0.999515
7.150795
4a13dc96-4345-4267-8baf-b7909ead9fe0
QuantumGhost/yuzu
externals/vcpkg/buildtrees/boost-config/src/ost-1.79.0-fedf4ab989.clean/checks/std/cpp_lib_boyer_moore_searcher_17.cpp
// See http://www.boost.org/libs/config for the most recent version.// // Revision $Id$ // #ifdef __has_include #if __has_include(<version>) #include <version> #endif #endif #include <functional> #ifndef __cpp_lib_boyer_moore_searcher #error "Macro << __cpp_lib_boyer_moore_searcher is not set" #endif #if __cpp_li...
TOOL
0.966885
4.248095
c46915bd-bc4a-4ac8-9546-feb363285032
KUMARANKIT3012/Leetcode
GCD of two numbers.cpp
class Solution { public: int GCD(int n1, int n2) { while(n2 != 0) { int temp = n2; n2 = n1 % n2; n1 = temp; } return n1; } };
ALGO
0.999374
3.625948
732a03d1-20f1-477d-974e-0fce807ed450
AutomotiveNegotiation1/-K-AutoDrivingLocalization
src/positioning/matlab/Positioning_Alg_20231004/codegen/lib/fusion/exp.cpp
// Include Files #include "exp.h" #include "rt_nonfinite.h" #include <cmath> // Function Definitions // // Arguments : creal_T &x // Return Type : void // namespace coder { void b_exp(creal_T &x) { if (x.re == 0.0) { double d; d = x.im; x.re = std::cos(d); x.im = std::sin(d); } else if (x.im ==...
ALGO
0.945403
4.655853
c338efcc-26f5-4155-9e75-3ee0ef066d67
TypeErrorEngine2022/Alien-Attack
src/Utils/CollisionManager.cpp
#include "../../include/headers/UtilsHeader/CollisionManager.h" #include "../../include/headers/UtilsHeader/Vector2D.h" #include "../../include/headers/UtilsHeader/BulletHandler.h" #include "../../include/headers/UtilsHeader/Quadtree.h" #include "../../include/headers/EntityHeader/Bullet.h" #include "../../include/he...
TOOL
0.867669
4.184841
9f77844f-8161-4b17-b9bf-939a23165988
chenjunshuo/test
test.9.24.求十个数中最大数改错/test.9.24.求十个数中最大数改错/十个数最大.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #define _CRT_SECURE_NO_WARNINGS 1 #include<stdio.h> int main() { int i=0; int arr[10]={0}; printf("ʮÿպŸ"); for(i=0;i<10;i++) { scanf("%d",&arr[i]); } int MAX=arr[0];//ܸMAXֵΪ0Ϊܱ֤ʮΪ for(i=1;i<10;i++) { MAX=MAX>arr[i]?MAX:arr[i]; } printf("ʮֵΪ:%d",MAX); return 0; }
ALGO
0.998664
3.107318
399d071f-6535-4105-b28c-2e792d46cca0
ClashM/McGlassonCameron_CIS5_47948
Lab/Lab4_TruthTable/main.cpp
/* * File: main.cpp * Author: Cameron McGlasson * Created on October 8, 2018, 2:43 AM * Lab 4 Modified from... */ /* * File: main.cpp * Author: Dr. Mark E. Lehr * Created on October 4th, 2018, 10:25 AM * Purpose: Truth Table */ //System Libraries Here #include <iostream> using namespace std; //User ...
TEST
0.87288
3.547968
3aa53a89-5620-4477-8ecc-d8e5adb5d247
saikatcodec/CP
icpc/C_-_Wordle_with_Friends.cpp
#include <bits/stdc++.h> using namespace std; #define nl "\n" int main() { ios_base::sync_with_stdio(false); cin.tie(NULL), cout.tie(NULL); int n, w; cin >> n >> w; cin.ignore(); map<char, int> mp; vector<char> v; string str; for (int i = 0; i < n; i++) { getline(cin, ...
ALGO
0.997562
4.099765
d4efe269-1cb6-414a-aa4f-f5cfee9d7ec9
JasonShin10/DailyAlgorithm
DP/BaekJoon_11053*.cpp
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <map> #include <queue> #include <string> #include <math.h> #include <cstring> #include <stack> #include <cctype> using namespace std; int n; int arr[1004] = {}; int dp[1004] = {}; int main() { ios_base::sync_with_stdio(false); cin.t...
ALGO
0.999976
3.860615
4dd404d5-3899-41d1-94ca-25e3470d6722
MOHIT-IITP/Leetcode
416.cpp
#include<bits/stdc++.h> using namespace std; class Solution { // left => we are taking // right => we are not taking public: bool recur(int index, vector<int> & nums, int target, vector<vector<int>> & dp){ if(index >= nums.size()) return false; if(target <= 0) return false; ...
ALGO
0.999966
5.256948
bbab3b4e-f0e8-4f7e-9641-c3e3e8db07e6
krejenel/Bac_info_2024
bac.info.official.2022/Sesiunea specială – 20 mai 2022/mate-info/Problema_3.cpp
#include <iostream> #include <bits/stdc++.h> #include <values.h> using namespace std; ifstream f("date.in"); int main() { int aux=0,x,maxx=0,nr=1,lung=0; f>>x; aux=x; while(f>>x) { if(x!=aux) { if(nr==aux) { lung=lung+nr; } ...
ALGO
0.999852
3.124458
e89ddc6b-ddfb-462c-a6f3-0eb4115268a1
johannesrauch/Competitive-Programming
onlinejudge/11367/11367.cpp
#include <bits/stdc++.h> #define fst first #define snd second #define N 1000 #define C 101 #define INF 2147483647 using namespace std; typedef long long llong; typedef vector<int> vi; typedef set<int> si; typedef pair<int, int> pii; int n, m; // vertices, edges int p[N]; // fuel prices int d[N][N]; // distances vi ad...
ALGO
0.999953
4.347985
1ca3d0b2-9c8d-4a6d-b364-942c8dfb601f
blueskyson/leethub
0338-counting-bits/0338-counting-bits.cpp
class Solution { public: vector<int> countBits(int n) { vector<int> result; result.push_back(0); for (int i = 1; i <= n; i++) { int bits = result[i / 2] + (i & 1); result.push_back(bits); } return result; } };
ALGO
0.999994
6.459557
036f1fc0-62ac-4201-a257-8bc9b5ca0d09
Christian19988/CS499-ePortfolio
Enhancement Three/CS 300 Project ABCU/ABCU Project Enhanced code.cpp
#include <iostream> #include <fstream> #include <sstream> #include <vector> #include <string> #include <algorithm> using namespace std; // Represents a course struct Course { string courseNum; string courseName; vector<string> prerequisites; Course() {} Course(string num, string name, vector<stri...
TOOL
0.882095
7.434365
2a12f0ab-b5a4-442c-a739-fa14343879c2
sadrultoaha/Competitive-Programming
Online Judge Solves/UVA/UVa 11713 - Abstract Names.cpp
/** SunWalker **/ #include<bits/stdc++.h> using namespace std; #define IN freopen("IN.txt","r",stdin) #define OUT freopen("OT.txt","w",stdout) #define fastread() {ios_base::sync_with_stdio(false);cin.tie(0);} #define MEM(a,b) memset(a,b,sizeof(a)) #define dbg(args...) {cerr<<"-->";debugger::call(#args,ar...
ALGO
0.999974
5.117781
3a567282-8b65-4fc5-af1f-6a7d02f915c3
a5tronomy/ue5-ffcotw
Engine/Source/ThirdParty/FreeImage/FreeImage-3.18.0/Source/OpenEXR/IlmImf/dwaLookups.cpp
// // A program to generate various acceleration lookup tables // for Imf::DwaCompressor // #include <cstddef> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <vector> #include <OpenEXRConfig.h> #ifdef OPENEXR_IMF_HAVE_SYSCONF_NPROCESSORS_ONLN #include <unistd.h> #endif #include <half.h> #include...
ALGO
0.990324
4.595673
2b61ba33-82b1-4565-b9f6-01720a76e7c0
AtesArkuran/Modern_Cpp
modules/ROOT/examples/Operatör ve Karar/Ornek8/main.cpp
#include <iostream> using namespace std; int main() { int sayi; cout << "1-7 arasinda sayi giriniz: "; cin >> sayi; switch (sayi) { case 1: cout << "Pazartesi" << endl; break; case 2: cout << "Sali" << endl; break; case 3: ...
TOOL
0.927921
3.541806
215b2ba2-5f5f-4dbb-b435-8064257b996d
tr-lgtm/helloGit
indexMinMaxElement.cpp
#include "indexMinMaxElement.h" template<class Type> size_t indexMinElement(Type * array, int size) { size_t index{}; for (int i = 0; i < size; i++) { if(array[index] > array[i]) { index = i; } } return index; } template<class Type> size_t indexMaxElement...
ALGO
0.997148
4.867456
a31239dc-6a98-4f91-94d5-e8ad9fd427eb
fupengfei058/algorithm
Leetcode/22. Generate Parentheses.cpp
/*Generate Parentheses:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.*/ //一开始left = n,right = 0;当left还剩余左括号数大于0的时候,添加左括号,并将left – 1,right + 1; //当right目前还需要的右括号数大于0的时候,添加右括号,并将right – 1; //当left和right都等于0的时候,表示当前是一个符合格式条件的字符串,将该字符串cur放入result数组中,最后返回result。 class...
ALGO
0.999734
6.597699
fd0b6697-1111-4012-8d09-ddef3006e25f
alanzhao1/chromium-libcxx
test/std/algorithms/alg.modifying.operations/alg.replace/pstl.replace_copy.pass.cpp
// UNSUPPORTED: c++03, c++11, c++14 // UNSUPPORTED: libcpp-has-no-incomplete-pstl // template<class ExecutionPolicy, class ForwardIterator1, class ForwardIterator2, class T> // ForwardIterator2 // replace_copy(ExecutionPolicy&& exec, // ForwardIterator1 first, ForwardIterator1 last, // ...
TEST
0.88852
6.408719
f3fbe8f3-2e3f-4478-b3ee-0070857aa408
coolcash/RubyCoin
src/crypter.cpp
#include "crypter.h" #include "script.h" #include "scrypt.h" #include <string> #include <vector> #include <boost/foreach.hpp> #include <openssl/aes.h> #include <openssl/evp.h> #ifdef WIN32 #include <windows.h> #endif bool CCrypter::SetKeyFromPassphrase(const SecureString& strKeyData, const std::vector<unsigned char>...
TOOL
0.861874
7.322043
f4ab17ea-5d5f-4c5c-baa6-9dbe744317a3
fangda-cu/MultiTrackerDevelopment
ElTopo/eltopo3d/broadphasegrid.cpp
// --------------------------------------------------------- // // broadphasegrid.cpp // Tyson Brochu 2008 // // Broad phase collision detection culling using three regular, volumetric grids. // // --------------------------------------------------------- // -------------------------------------------------------...
ALGO
0.993381
7.421185
d4ff033a-cf8e-4474-b1f6-3d7181a18551
Kriti2019/GFG_
Difficulty: Medium/Not a subset sum/not-a-subset-sum.cpp
//{ Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: long long findSmallest(vector<int> &arr) { // Your code goes here. long long smallestMissing = 1; // Initialize the ...
ALGO
0.999374
5.569415
2fca128b-b34c-464d-8f86-33e81fc2bca8
hribby/hrib_orchard
codeforces/primes/main.cpp
/* o o <|> <|> / \ < \ o/ \o \o__ __o o__ __o/ \o__ __o o__ __o o__ __o o__ __o/ <|__ __|> | |> /v | | |> /v |> /v |> /v | / ...
ALGO
0.99944
4.371982
eb0ec973-0fab-4b54-8101-52ed6a07dbbf
StarsDriver/Application-of-SA-Algorithm
avarage.cpp
//8Ƭ̳ȷֲ #define FLOWER_AREA 0.5 //ֲռ #define FLOWER_COUNT 12 #define MAX_WIDTH 5 #define MIN_WIDTH 3 #define MAX_LENGTH 60 #define MIN_LENGTH 10 #define MAX_AREA 2200 //·ռ #define MIN_AREA 1900 //·ռС //ģ˻ #define eps 1e-9 // #define delta 0.98 //ϵ #include<iostream> #include<vector> #include <cstdlib> #include <ctim...
ALGO
0.998465
3.218836
60eba9a8-843f-4a41-861a-71f7bc4e6b40
reecelikesramen/cs1521
projects/project6/project6-turnin/LinkedSortedList.cpp
/** @file * * @course CS1521 * @section 1 * @term Spring 2021 * * Implementation file for a pointer-based implementation of the ADT * sorted list. * * Adapted from pages 374-377 in Carrano 7e. * * @author Frank M. Carrano * @author Timothy Henry * @author Steve Holtz * * @date 16 Mar 2021 * *...
TOOL
0.993777
6.49865
c3101d08-9112-493d-bd1b-f8c1e0667104
hjiang13/LLMs-in-IR
POJ-104/59/1589.cpp
#include <iostream> using namespace std; int main() { int n,i,j,m,a[100][100],count=0,k; char b; cin>>n; for(i=0; i<n; i++) { for(j=0; j<n; j++) { cin>>b; if(b=='#') a[i][j]=6; if(b=='.') a[i][j]=0; if(b=='@') a[i][j]=1; } } cin>>m; for(k=1; k<m; k++) { for(i=0; i<n; i++) { for(j=0; j<n; j++) { if(a[i][j]==1) { if(a[i-...
ALGO
0.999574
3.177919
7603af5e-0a84-4d50-83e2-f27b42529b34
baoxingsong/dCNS
impl/getCnsForMultipleSpecies.cpp
// // Created by Baoxing song on 2019-01-09. // #include "getCnsForMultipleSpecies.h" /** TODO: should be updated * The problem with this one is that the MSA output must have the reference sequence there * The alignment without reference would not be used */ class Combination{ private: std::vector<int...
ALGO
0.997507
4.304178
0ec1f548-55d1-4872-b540-b2aab6eac779
kaidul/LeetCode_problems_solution
source-code/Find_All_Duplicates_in_an_Array.cpp
class Solution { public: vector<int> findDuplicates(vector<int>& nums) { vector<int> result; for(int i = 0; i < nums.size(); ++i) { int indx = abs(nums[i]) - 1; if(nums[indx] < 0) { result.push_back(indx + 1); } nums[indx] = -nums[indx]...
ALGO
0.999965
5.915683
7a0efcd2-1ff3-44de-8173-74588d6dd3e3
MPSLab-ASU/ccf
gem5/src/systemc/tests/systemc/misc/semantic/2.5/T_2_5_1_1.cpp
/***************************************************************************** T_2_5_1_1.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**************************************************************************...
ALGO
0.932279
4.250536
7c29010c-ff29-4bb0-b24c-993cdbdeefaf
TimmMuranov/harmony_core
core/key.cpp
#include "headers.h" #include <iostream> using namespace std; Key::Key(){ Note n; mainTone = n; lad = "dur"; mod = 'n'; } void Key::change(string n){ if(n[0] <= 'G' && n[0] >= 'A'){ lad = "dur"; n[0] += 32; } else if (n[0] <= 'g' && n[0] >= 'a'){ lad = "mol"; } else return; mainTone.name = ...
ALGO
0.990062
4.241494
33c2ef3d-3935-44fe-86cc-780288972163
skyshore2001/symfind
symfind.cpp
#include <stdio.h> #include <unistd.h> #include <string.h> #include <stdlib.h> #include <time.h> #include <ctype.h> #include <sys/stat.h> #include <vector> #include <string> using namespace std; #define VERSION "2.2" // load 57586 files (56K), 1600408 symbols (1.6M) // 903M - perl // 223M - c++ x64, no optimization....
TOOL
0.960517
3.833768
a1ab3a04-56c8-48b7-8a53-df09157e7089
istaslis/HelixHoughCMS
MLoVetere/HTTrackSeeding/src/sPHENIXTracker_projection.cpp
#include "MLoVetere/HTTrackSeeding/interface/sPHENIXTracker.h" #include <cmath> #include <iostream> #include <algorithm> #include <sys/time.h> using namespace std; using namespace Eigen; //using namespace SeamStress; static inline double sign(double x) { return ((double)(x > 0.)) - ((double)(x < 0.)); } void sPHEN...
ALGO
0.982512
4.209854
e492e4f0-7f21-49ab-bf1f-dbddd477ee25
arahuln/learn
B_BerSU_Ball.cpp
#include<bits/stdc++.h> using namespace std; int f(int i,int j,vector<int>&s1,vector<int>&s2,vector<vector<int>>&dp){ if(i==0||j==0)return 0; if(dp[i][j]!=-1)return dp[i][j]; if(abs(s1[i-1]-s2[j-1])<=1)return dp[i][j]=1+f(i-1,j-1,s1,s2,dp); else{ return dp[i][j]=max(f(i-1,j,s1,s2,dp),f(i,j-1,s1...
ALGO
0.999946
4.545999
129bc2b1-1776-4c94-bb81-a24fea168c65
thiagozilber/Trabalho-3-ALESTI
Master/main.cpp
#include <iostream> #include <list> #include <fstream> #include <sstream> #include "Palavra.hpp" #include "WordTree.hpp" using namespace std; int main(){ // lista de palavras std::list<Palavra> lista; string line, pal, sig; // ponteiro para o arquivo fstream fin; // abre o arquivo fin.open("dicio...
TOOL
0.889523
4.171241
188f9366-3fde-4ceb-829f-80919612cd37
roy4801/solved_problems
cf/1657/A.cpp
/* * CF 1657 A * author: roy4801 * AC(C++) */ #include <bits/stdc++.h> using namespace std; #define USE_CPPIO() ios_base::sync_with_stdio(0); cin.tie(0) typedef long long int LL; typedef unsigned long long ULL; typedef pair<int, int> P; typedef pair<LL, LL> PLL; #define X first #define Y second #define INF 0x3f3f...
ALGO
0.99963
3.379381
9c94fc57-0d71-4371-99ae-311232d10ad2
pkuzyc/DeepDendrite
src/nrn_modify/src/ivoc/mymath.cpp
#include <../../nrnconf.h> #include <InterViews/geometry.h> #include "mymath.h" #include "classreg.h" #include "oc2iv.h" #include <math.h> #include <stdio.h> extern "C" int hoc_return_type_code; static double distance_to_line(void*) { return MyMath::distance_to_line(*getarg(1), *getarg(2), *getarg(3), *getarg(4), ...
TOOL
0.976441
5.754593
8c07ce83-4b12-45f5-91b9-54b5d5465854
AyushmaanPandey11/Dsa-Repository-in-Cpp
DynamicProgramming/PerfectSquares.cpp
#include<iostream> #include<vector> using namespace std; int solveMem( int n , vector<int> & dp ) { if( n == 0 ) return 0; if(dp[n]!= -1) { return dp[n]; } int ans= n; for( int idx=1 ; idx*idx <= n ; idx++ ) { ans = min( ans...
ALGO
0.999943
4.684125
11e9283f-7ac2-48b2-a7ac-5030861e5d2b
hsoft-star/CLeetcode
73.Set Matrix Zeroes.cpp
class Solution { public: void setZeroes(vector<vector<int>>& matrix) { if (matrix.empty()) return; if (matrix[0].empty()) return; int m = matrix.size(); int n = matrix[0].size(); int c = 1; int r = 1; for (int i = 0; i < m; i++) { for (int j = 0; ...
ALGO
0.998635
6.435106
800b9f27-7009-4079-a5b8-51f3322889a1
lds217/lds
CLAOJ/dice.cpp
#include <iostream> using namespace std; int main() { int t; cin>>t; while(t--) { int n; cin>>n; cout<<7-n<<"\n"; } }
ALGO
0.999808
3.588145
f064a6d5-cf67-4a4b-bde8-394c52b09d68
anurag-111/allSubmissions
maximum-twin-sum-of-a-linked-list/Accepted/5-17-2023, 9_37_19 PM/Solution.cpp
// https://leetcode.com/problems/maximum-twin-sum-of-a-linked-list /** * 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(n...
ALGO
0.999975
5.746443
8259732f-9a5d-45dd-98be-bd3d8b923464
hyeonseong0917/Codeforces
random/1931E.cpp
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <stack> using namespace std; #define ll long long bool comp(pair<int,int> a, pair<int,int> b){ return a.second>b.second; } int main() { // your code goes here int t=0; cin>>t; while(t--){ int n,m; cin>>n>>m; vector<int> v(n...
ALGO
0.99996
5.453153