uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
20d9cb2f-2cb2-4a31-ae1c-cde8848a1d53
ishandutta2007/codeforces
yasugongshang/normal/821/B.cpp
#include<iostream> #include<cstdio> #include<cstring> #include<cstdlib> #include<set> #include<ctime> #include<vector> #include<cmath> #include<algorithm> using namespace std; inline void write(long long a){ if(a>=10)write(a/10); putchar('0'+a%10); } inline void writeln(long long a){ write(a); puts(""); } inline lon...
ALGO
0.99969
3.088578
ca117eba-ee13-4e7e-8ad1-d8316fa32aa1
RobotnicRabbit/UE4.15.SVN
Engine/Source/ThirdParty/ICU/icu4c-53_1/source/samples/legacy/newcol.cpp
/****************************************************************************** * This is the module that uses new collation ******************************************************************************/ #include <stdio.h> #include <stdlib.h> #include "unicode/ucol.h" // Very simple example code - sticks a sortkey...
TOOL
0.928963
5.966242
d7f8057f-c4e5-48db-9743-eb4ad6ca75ce
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Gemma/top0-100/stamping-the-grid-Solution.possibleToStamp/177898_+Info.cpp
xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size) { xmlParserCtxtPtr ctxt = NULL; xmlDocPtr ret; /* xmlInitParser(); */ ctxt = xmlCreateMemoryParserCtxt(buf, buf_size); if (ctxt) { ctxt->options -= XML_PARSE_DTDLOAD; ctxt->sax->ignorableWhitespace = soap...
ALGO
0.990559
4.728926
91e7f565-3ded-47da-956f-2ae039d14148
Viveknaik99/C_Programms
strncmp array.cpp
#include <stdio.h> #include <string.h> int main() { char str1[] = "Hello, World!"; char str2[] = "Hello, OpenAI!"; int n = 5; // Number of characters to compare int result = strncmp(str1, str2, n); if (result == 0) { printf("The first %d characters of the strings are equal.\n", n); } ...
ALGO
0.999306
4.286522
a2273e22-3468-4c7b-9824-c87c216dec0a
alvgaona/turtlesim-nav
src/turtle_nav/src/dynamics.cpp
#include "dynamics.h" casadi::MX unicycle_dynamics(const casadi::MX& x, const casadi::MX& u) { auto theta = x(2); auto v = x(3); auto omega = x(4); auto a = u(0); auto alpha = u(1); return casadi::MX::vertcat({ v * casadi::MX::cos(theta), v * casadi::MX::sin(theta), omega, a, alpha, ...
ALGO
0.925842
5.217568
15c0f0cc-4ccc-4f7e-b860-6aa25b4c7bf6
a5tronomy/ue5-ffcotw
Engine/Source/ThirdParty/CryptoPP/5.6.5/include/twofish.cpp
// twofish.cpp - modified by Wei Dai from Matthew Skala's twofish.c // The original code and all modifications are in the public domain. #include "pch.h" #include "twofish.h" #include "secblock.h" #include "misc.h" NAMESPACE_BEGIN(CryptoPP) // compute (c * x^4) mod (x^4 + (a + 1/a) * x^3 + a * x^2 + (a + 1/a) * x + ...
ALGO
0.999891
6.891787
68858331-cd8f-43bd-826c-a5e285783acf
raincross7/code-similarity
codes/train_code/problem146/problem146_293.cpp
#include <bits/stdc++.h> #define ri register #define int long long #define E (n+1) using namespace std; const int N=200010; inline int read() { int s=0, w=1; ri char ch=getchar(); while(ch<'0'||ch>'9') { if(ch=='-') w=-1; ch=getchar(); } while(ch>='0'&&ch<='9') s=(s<<3)+(s<<1)+(ch^48), ch=getchar(); ret...
ALGO
0.999562
3.524247
22a59e06-d5ea-49c1-8c3b-ee711fa72906
tmwilliamlin168/CP-YouTube
Google Kickstart/2021/Round B/B.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define ar array #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template <typename T> using oset = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_u...
ALGO
0.998023
3.957743
2af9f5ea-d0ba-4558-8f79-d03f0c04aa26
Parthiv-MEV/SoC-CP
cses_buildingRoads.cpp
#include<bits/stdc++.h> using namespace std; void dfs(int u, vector<vector<int>>& adj, vector<bool>& visited){ visited[u] = true; for(int v : adj[u]){ if(!visited[v]){ dfs(v, adj, visited); } } } int main(){ int n, m; cin >> n >> m; vector<vector<int>> adj(n + ...
ALGO
0.999985
4.74762
de01038f-ca30-4372-bc25-213347a46770
vinniapr/tugas-c-praktikum-sabtu
modul 8/modul 8 d.cpp
#include <stdio.h> main() { int A[11], i; int data[] = {12, 15, 7, 10, 5, 2, 17, 25, 9, 20, 35, 28, 14, 11, 999}; int j=0; //Menampilkan array printf("Isi array A: \n"); for (i=0; i<15; i++) { printf("%i ", data[i]); } //Array setelah perulangan printf("\n\nArray B: \n"); for (i=0; i...
ALGO
0.999951
3.094947
57653d78-cec0-409a-9990-a28a273c5a83
raincross7/code-similarity
codes/train_code/problem018/problem018_121.cpp
#include <bits/stdc++.h> #include <vector> #define rep(i, n) for(int i = 0; i < n; i++) #define repr(i, n) for(int i = n; i >= 0; i--) #define FOR(i, m, n) for(int i = m; i < n; i++) //#define INF 2e9 #define ALL(v) v.begin(), v.end() using namespace std; typedef long long ll; int main(){ string W; cin >> W;...
ALGO
0.999798
3.435062
065d4c37-1bb4-4998-8cf7-b9e168276b7a
GeisslerGroup/lammps-2Apr13-replica
src/fix_press_berendsen.cpp
#include "string.h" #include "stdlib.h" #include "math.h" #include "fix_press_berendsen.h" #include "atom.h" #include "force.h" #include "comm.h" #include "modify.h" #include "fix_deform.h" #include "compute.h" #include "kspace.h" #include "update.h" #include "respa.h" #include "domain.h" #include "error.h" using name...
ALGO
0.95563
6.135087
bf3aedc0-6014-409f-93b2-93df4d3f29d7
SeoyoonPark18/Problem_Solving
programmers/Level 2/소수 찾기.cpp
#include <string> #include <vector> #include <algorithm> #include <cmath> #include <set> using namespace std; set<int> _set; bool isPrime(int num) { if (num == 0 || num == 1) return false; for (int i = 2; i <= sqrt(num); i++) { if (num%i == 0) return false; //Ҽ } return true; } int solution(string numbers) ...
ALGO
0.99935
5.491344
2dd20338-fd02-4c64-9a69-081db4e83658
ishandutta2007/codeforces
nweeks/normal/1304/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MAXN = 1e5; const int MAXP = 21; int par[MAXP][MAXN]; int depth[MAXN]; vector<int> G[MAXN]; bool visited[MAXN]; int n; void dfs(int u, int p, int d) { par[0][u] = p; depth[u] = d; for (auto v : G[u]) if (v != p) dfs(v,u,d+1); } ...
ALGO
0.999967
4.571887
b24369b7-b49d-47dc-93e4-bf8c91c4d77e
AvinashSappati/DSA
Basic Maths/hcf.cpp
#include<bits\stdc++.h> using namespace std; int hcf(int m,int n) { int gcd = 1; // O(min(m,n)) -> Worst case //for(int i=1;i<=min(m,n);i++) //{ // if(m % i == 0 && n % i == 0) // { // gcd = i; // } //} //BETTER THAN UPPER ON...
ALGO
0.999933
4.750876
766975c6-ca20-464b-8f62-1cc73f5dcd63
21A91A05C1/GeeksforGeeks
Easy/K-Palindrome/kpalindrome.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: // int check(string &s1,string &s2,int i,int j,int ) int kPalindrome(string str, int n, int k) { // code here st...
ALGO
0.999972
5.786891
8c07964f-4db6-4efd-b25b-8f31c4956f33
ayeneo/android_bionic-1
libm/builtins.cpp
#include <math.h> #include "fpmath.h" double fabs(double x) { #if __arm__ // Both Clang and GCC insist on moving r0/r1 into a double register // and using fabs where bit-twiddling would be a better choice. // They get fabsf right, but we need to be careful in fabsl too. IEEEd2bits u; u.d = x; u.bits.sign ...
TOOL
0.948807
6.910477
e7ef9909-4b25-4c41-bda2-40620b9383eb
Laurilao/TAMK-perusteet
vko1/t4.cpp
#include <iostream> using namespace std; int main() { int luku1, luku2; cout << "Syota 1. luku: "; cin >> luku1; cout << "Syota 2. luku: "; cin >> luku2; int erotus = luku1 - luku2; int tulo = luku1 * luku2; cout << "Lukujen erotus on " << erotus << "." << endl; cout...
ALGO
0.999094
4.25981
e169033d-ef98-40d9-8b89-0ea56220938c
sangyun0914/Baekjoon
src/1292_S5x.cpp
/** * 백준 1292: 쉽게 푸는 문제 문제 동호는 내년에 초등학교를 입학한다. 그래서 동호 어머니는 수학 선행 학습을 위해 쉽게 푸는 문제를 동호에게 주었다. 이 문제는 다음과 같다. 1을 한 번, 2를 두 번, 3을 세 번, 이런 식으로 1 2 2 3 3 3 4 4 4 4 5 .. 이러한 수열을 만들고 어느 일정한 구간을 주면 그 구간의 합을 구하는 것이다. 하지만 동호는 현재 더 어려운 문제를 푸느라 바쁘기에 우리가 동호를 도와주자. 입력 첫째 줄에 구간의 시작과 끝을 나타내는 정수 A, B(1 ≤ A ≤...
ALGO
0.999778
4.823415
82704e04-e4f1-43ba-990e-07f56bdab979
ros-gbp/pcl-fuerte-release_defunct
tools/elch.cpp
#include <pcl/io/pcd_io.h> #include <pcl/point_types.h> #include <pcl/common/transforms.h> #include <pcl/registration/icp.h> #include <pcl/registration/elch.h> #include <iostream> #include <string> #include <vector> typedef pcl::PointXYZ PointType; typedef pcl::PointCloud<PointType> Cloud; typedef Cloud::ConstPtr Cl...
ALGO
0.976157
3.566354
9a22a6a5-0f02-4892-9238-5a3ea919b09c
Rakesh-Visave/DSA-Practice_Problem
patterns/pattern10.cpp
#include<iostream> using namespace std; int main(){ int n; int row; cout<<"Enter the size of Array"; cin>>n; for(row=1; row<=n; row++){ for(int col=1; col<=row; col++){ cout<<row-col+1; } cout<<endl; } }
ALGO
0.999876
4.025688
1084ff71-7d20-4839-987f-5922e1cecfda
amrharb/leetcode
0055-jump-game/0055-jump-game.cpp
class Solution { public: bool canJump(vector<int>& nums) { int n=nums.size(),mx=0; for(int i=0;i<n;i++){ if(i>mx) return 0; mx=max(mx,i+nums[i]); } return 1; } };
ALGO
0.999989
6.083365
5cf74888-b0eb-4fce-b287-00969e1e4d9f
shivanshu5416jais/ds-algo
Hashing/Ransom Note.cpp
#include <bits/stdc++.h> using namespace std; vector<string> split_string(string); // Complete the checkMagazine function below. void checkMagazine(vector<string> magazine, vector<string> note) { map<string,int>m1; for(auto i:magazine) m1[i]++; for(auto i:note) m1[i]--; for(auto i:m1) { if(i.second...
ALGO
0.999986
4.656805
b0e2ff89-b30d-4908-83de-04f3615994d8
sourabhraha/Placement_Prep
70-climbing-stairs/70-climbing-stairs.cpp
class Solution { public: /* nth step = 1 + (n-1)th step = 1 + 1 + (n-2)th step */ int dp[10000001]; int climb(int n) { if(dp[n] != 0) return dp[n]; if(n == 0) return dp[n] = 0; if(n == 1) ...
ALGO
0.999982
6.066844
f7c57a5d-483d-446d-bd47-ec580fecf6de
irfan-iiitr/CodeBase
segTree/maxSumofTwoNumbers.cpp
//https://www.spoj.com/problems/KGSS/ // You are given a sequence A[1], A[2], ..., A[N] ( 0 ≤ A[i] ≤ 10^8 , 2 ≤ N ≤ 10^5 ). There are two types of operations and they are defined as follows: // Update: // This will be indicated in the input by a 'U' followed by space and then two integers i and x. // U i x, 1 ≤ i ≤ N...
ALGO
0.999802
5.486106
296dcf3b-6055-4d95-ab7d-c7ba193597cf
poojaullegaddi/DSA
rev.cpp
/* reverse the array */ #include<iostream> #include<bits/stdc++.h> using namespace std; int main() { int a[20],n,i; cout<<"enter the size of the array" <<endl; cin>> n; cout<<"enter the array elements "<<endl; for(i=0;i<n;i++) { cin>>a[i]; } cout<<"the array elements are "<<endl; for(i=0;i<n;i++) { cout<...
ALGO
0.9997
3.967046
eb3a00df-81f5-445d-ba98-b818f6da2982
SujalAhrodia/Algorithms_DS
Practice/long_cont_sub.cpp
#include <iostream> using namespace std; //just ans int main() { int n; cin>>n; int A[n]; for (int i=0; i<n; i++) { cin>>A[i]; } int ans=1, count=1; bool flag=true; for(int i=0;i<n; i++) { flag=true; count=1; for(int j=i+1; j<n; j++) { for(int k=i; k<j; k++) { if(A[j]==A[k]) { ...
ALGO
0.999937
3.634443
c30fd4ea-f244-4724-bfdf-62a0ac7920eb
PAULOFELIX-TECNOLOGIA/FlutterHttpApiPessoa
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
699ac8f3-2f80-450a-9e87-bd878128aa0c
sauloajs/URI
1003.cpp
#include <iostream> #include <cmath> using namespace std; int main() { int A, B, SOMA; cin >> A; cin >> B; SOMA = A+B; cout << "SOMA = " << SOMA << endl; return 0; }
ALGO
0.99142
3.577478
34158479-7463-4ead-8bc2-9f0c888ad639
ragu-manjegowda/self-driving-car
Term02-SensorFusion-Localization-and-Control/MPC-Quizzes/polyfit/src/Eigen-3.3/doc/examples/Tutorial_ArrayClass_cwise_other.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { ArrayXf a = ArrayXf::Random(5); a *= 2; cout << "a =" << endl << a << endl; cout << "a.abs() =" << endl << a.abs() << endl; cout << "a.abs().sqrt() =" << endl << a.abs().sqrt() << endl...
ALGO
0.912797
3.130341
799b807f-d95a-4df2-97d8-1783cfd5e178
navneetk2001/CPP_Programs
Geeks for Geeks/Problem of the Day GFG/14. Intersection of 2 Arrays_GFG.cpp
Given two arrays a[] and b[] respectively of size n and m, the task is to print the count of elements in the intersection (or common elements) of the two arrays. For this question, the intersection of two arrays can be defined as the set containing distinct common elements between the two arrays. Example 1: Input: n...
ALGO
0.999893
6.123585
bdf2e17f-5ee4-4836-8e98-db64b832c614
dh434/leetcode
tree/450. 删除二叉搜索树中的节点.cpp
/* 给定一个二叉搜索树的根节点 root 和一个值 key,删除二叉搜索树中的 key 对应的节点,并保证二叉搜索树的性质不变。返回二叉搜索树(有可能被更新)的根节点的引用。 一般来说,删除节点可分为两个步骤: 首先找到需要删除的节点; 如果找到了,删除它。 说明: 要求算法时间复杂度为 O(h),h 为树的高度。 示例: root = [5,3,6,2,4,null,7] key = 3 5 / \ 3 6 / \ \ 2 4 7 给定需要删除的节点值是 3,所以我们首先找到 3 这个节点,然后删除它。 一个正确的答案是 [5,4,6,2,null,null,7], 如下图所示。...
ALGO
0.999996
6.596519
181e96c1-55ab-498f-b8ed-78c22b4db458
rstream-system/RStream
src/apps/pr_cf.cpp
// /* // * pagerank.cpp // * // * Created on: Aug 10, 2017 // * Author: Zhiqiang // */ // // #include "../core/engine.hpp" // #include "../core/scatter.hpp" // #include "../core/gather.hpp" // #include "../core/global_info.hpp" // // #include "../core/aggregation.hpp" // #include "../utility/ResourceManager....
ALGO
0.998565
3.556613
335f43ac-5215-4723-974e-06e12048e226
xuzx1210/LeetCode
39. Combination Sum.cpp
class Solution { public: vector<vector<int>> result; vector<int> cur; void dfs(vector<int> &candidates, int remain, int index) { if (remain < 0) return; if (remain == 0) { result.push_back(cur); return; } for (int i = index; i <...
ALGO
0.999989
6.343611
9aa6b44e-4df3-4a08-b9ca-4b9c07e8164c
HuanHuanHuanFFF/HuanF-CodeX
Code Instrumentality Initiative/CF/CF 1042 div3/E_Adjacent_XOR.cpp
// // Created by 幻 on 2025/8/10. // #include <bits/stdc++.h> using std::cin; using std::cout; using std::endl; using std::pair; using std::vector; using std::string; using ll = long long; using ull = unsigned long long; using ld = long double; using PII = pair<int, int>; constexpr ll MOD = 1e9 + 7; constexpr ll INF =...
ALGO
0.999961
5.268865
186800f7-5320-42b9-8d7b-5bafdc68d0d9
inchoel/DailyCoding
acmicpc.net/12813_BinaryOperation.cpp
#include <cstdio> #include <bitset> using namespace std; #define SIZE (100000) int main() { char a[SIZE+1]; char b[SIZE+1]; scanf (" %s", a); scanf (" %s", b); bitset<SIZE> A(a); bitset<SIZE> B(b); printf("%s\n", (A & B).to_string().c_str()); printf("%s\n", (A | B).to_string().c_str()); printf("%s\...
ALGO
0.99992
3.536387
80bb2975-f7f9-4800-b6cb-d58f2ee83016
AATHINARAYANAN22/c-108123020
simple interest.cpp
#include<stdio.h> int main() { float a,b,c,d; printf("Enter the princple and Rate of interset and Time :"); scanf("%f %f %f",&a,&b,&c); d=(a*b*c)/100; printf("The simple interest is : %f",d); return 0; }
ALGO
0.990319
3.204033
f51ee28b-3a74-4dfb-880f-76da30134df8
stwind/atcoder
contests/abc065/B/main.cpp
#include <bits/stdc++.h> using namespace std; // clang-format off #define forn(i, x, y) for(int i = x; i < y; i++) #define IOS ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(NULL) #define all(s) s.begin(), s.end() #define MOD 1000000007 #define DEBUG(x) cout << #x << ": " << x << endl; // clang-format on usin...
ALGO
0.999973
3.953501
7c34c6a7-0ca4-4e65-b059-4530cd3b168e
Drogheda/ACM
poj1061/main.cpp
#include <iostream> #include <cstring> #include <stdio.h> #include <stdlib.h> #include <cmath> #include <map> #include <algorithm> using namespace std; long long gcd(long long a, long long b) { return (a % b) ? gcd(b, a % b) : b; } void exgcd(long long a, long long b, long long &d, long long &x, long long &y) { ...
ALGO
0.99914
3.160483
2d370654-7188-4312-ad70-30e4e43d44c3
AbdelrahmanHamdyy/Problem-Solving
CodeForces/Old Contests Problems/Money, Money, Money!.cpp
#include <bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define all(v) v.begin(), v.end() #define sz(v) v.size() #define cin(v) for (int i = 0; i < sz(v); i++) cin >> v[i]; #define cout(v) for (auto i : v) cout << i << endl; typedef long long ll; typedef vecto...
ALGO
0.999566
3.5702
87dacf24-7ca9-4426-a4dd-5aecff6a9538
Asif-Abdullah01/XPSC_Batch_03
Week 06/N-Dotify_Playlist.cpp
#include <bits/stdc++.h> #define endl "\n" #define nn (cout << "NO\n") #define yy (cout << "YES\n") #define no (cout << "No\n") #define yes (cout << "Yes\n") #define ll long long #define ull unsigned long long #define gcd(a, b) __gcd(a, b) #define lcm(a, b) ((a / gcd(a, b)) * b) #define pii pair<int, int> #define pll p...
ALGO
0.999561
3.728261
1542999c-6dbe-4208-a876-4e8b6884311b
Koozzi/Algorithms
BJ/1929.cpp
#include <iostream> using namespace std; int M, N; bool check[1000001]; int main(){ cin >> M >> N; check[1] = true; for(int i = 2 ; i * i <= N ; i++){ if(!check[i]){ for(int j = i * i ; j <= N ; j += i){ check[j] = true; } } } for(int i =...
ALGO
0.999971
3.932451
699f7719-75ee-4d03-9e13-bd71fd426173
RomanRodionov/MotionMatching
sources/engine/render/frustum.cpp
#include "camera.h" #include "frustum.h" static vec4 plan(vec3 point, vec3 normal) { normal = normalize(normal); return vec4(normal, dot(normal, point)); } Frustum create_frustum_from_camera(const Camera& cam, const Transform &transform) { Frustum frustum; vec3 dir[3] = {-transform.get_forward(), -transform.g...
TOOL
0.865902
6.653877
181dce57-3ae9-4a28-ba5b-5cc7639519b8
Nimesh-Srivastava/DSA
C++/LeetCode/0463.cpp
// solution using dfs class Solution { public: int dfs(vector<vector<int>>& grid, int i, int j){ //if grid ended or water present or cell already visited, return 0 if(i<0 || j<0 || i>grid.size()-1 || j>grid[0].size()-1 || !grid[i][j] || grid[i...
ALGO
0.999956
6.215131
9dee06d7-fab8-403f-91c8-290b39b9cab4
IanChen15/ClothSimulation
extern/libigl/include/igl/setdiff.cpp
template < typename DerivedA, typename DerivedB, typename DerivedC, typename DerivedIA> IGL_INLINE void igl::setdiff( const Eigen::DenseBase<DerivedA> & A, const Eigen::DenseBase<DerivedB> & B, Eigen::PlainObjectBase<DerivedC> & C, Eigen::PlainObjectBase<DerivedIA> & IA) { using namespace Eigen; usi...
ALGO
0.996627
6.134378
62aec159-ffda-4b22-8f9d-0c8e6106348f
ishita126jain/Data-Structure
Minimum Moves to Convert String.cpp
class Solution { public: int minimumMoves(string s) { int ans=0; for(int i=0;i<s.size();i++){ if(s[i]=='X'){ ans++; i=i+2; } } return ans; } };
ALGO
0.999568
5.007911
3c1e5df7-bfcc-4849-835a-73cb1feceeef
bear65507/Codetree
250520/숫자 피라미드/number-pyramid.cpp
#include <iostream> using namespace std; int main() { int N; cin >> N; for (int i = 1; i <= N; i++) { for (int j = 1; j <= i; j++) cout << i << " "; cout << endl; } return 0; }
ALGO
0.99995
4.25607
655607f5-4ea3-41fa-98ea-1a9710a483b1
kanhaiyabaranwal/my-programs-old
Jitendra_ALGO/ALGO/050_T11_MaximumSizeSquareSub-matrix.cpp
/* http://www.geeksforgeeks.org/maximum-size-sub-matrix-with-all-1s-in-a-binary-matrix/ https://www.youtube.com/watch?v=_Lf1looyJMU */ #include<iostream> #include<algorithm> using namespace std; #define R 6 #define C 5 void printMaxSubSquare(bool M[R][C]) { int table[R+1][C+1]; int maxSize = 0; int rEnd = 0; int c...
ALGO
0.999825
4.990376
16cdb726-b8bb-45a2-a112-554e75bed0fc
vietnakid/ACM-ICPC
Gym/100004/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vi; typedef vector< vector<int> > vvi; typedef vector<ll> vl; typedef vector< vector<ll> > vvl; typedef pair<int, int> ii; typedef vector<ii> vii; typedef set<int> si; #define REP(i, a, b) \ for (int i...
ALGO
0.999926
4.534276
3b875a79-46d5-498a-9061-2068d48d969b
Farhan-Shahriar-Himel/XPSC_club
week4/Day3/Apple_tree.cpp
// Problem Link: https://codeforces.com/problemset/problem/1843/D #include<bits/stdc++.h> using namespace std; #define int long long const int N = 2e5 + 7; vector < int > g[N]; int leafs[N], vis[N]; void Reset(int n) { for (int i = 0; i <= n; i++) { g[i].clear(); vis[i] = 0; leafs[i] = 0; } } void dfs...
ALGO
0.999914
4.473136
f94ce538-8d6e-4205-af40-a7ed2d8c05d5
ckrahn/swginfinity-public
MMOCoreORB/src/server/zone/objects/group/tasks/UpdateNearestMissionForGroupTask.cpp
#include "UpdateNearestMissionForGroupTask.h" #include "server/zone/objects/group/GroupObject.h" #include "server/zone/objects/mission/MissionObject.h" #include "server/zone/objects/scene/SceneObject.h" #include "server/zone/objects/creature/CreatureObject.h" #include "server/zone/objects/player/PlayerObject.h" #includ...
TOOL
0.909329
6.534192
7fa5dcf4-775e-4bfc-bc98-b1aeb758fbda
qiyang-ustc/ALPS_SIF
eigen-3.4.0/bench/product_threshold.cpp
#include <iostream> #include <Eigen/Core> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; #define END 9 template<int S> struct map_size { enum { ret = S }; }; template<> struct map_size<10> { enum { ret = 20 }; }; template<> struct map_size<11> { enum { ret = 50 }; }; template<> struct ...
TOOL
0.940724
5.102006
c27f1eed-e24d-4f6b-b2ce-1a339cdfe3ed
arindam-bala/C-complete-Tutorial
array_pointer.cpp
#include<iostream> using namespace std; int main(){ int arr[5] = {1, 3, 4, 7, 5}; cout<<arr[0]<<endl; cout<<arr[3]<<endl; arr[2] = 55; //reassigning value at index 2 cout<<arr[2]<<endl; return 0; }
ALGO
0.979459
3.115412
7a44bfc0-1252-4441-bf01-c9085a46c7f2
nomaanhere/GeeksforGeeksPrac
Practice_Array/medianArray.cpp
#include <iostream> #include<algorithm> using namespace std; int main() { //code int t; cin>>t; while(t--){ int n; cin>>n; int a[n]; for(int i=0;i<n;i++){ cin>>a[i]; } sort(a,a+n); if(n%2 ==0){ cout<<(a[n/2]+a[n/2-1])/2<<endl;...
ALGO
0.999814
4.881059
93529442-859b-40a8-803b-30b60c441b36
zsebastian/TetrisSolver
TetrisSolver/Solver.cpp
#include "Solver.h" #include "EvaluationFunctions.h" Solver::Solver() :current_piece_count_(-1) { evaluations_.emplace_back(EvaluationFunction<0>(), EvaluationFunction<0>::weight()); evaluations_.emplace_back(EvaluationFunction<1>(), EvaluationFunction<1>::weight()); evaluations_.emplace_back(EvaluationFunction<2>...
ALGO
0.999662
5.926325
1a2eb965-79da-46fa-98bc-0f22492d3549
CAPS-UMU/gem5-21-1-Berti-IPCP
src/systemc/tests/systemc/misc/examples/a2901/a2901_alu.cpp
/***************************************************************************** a2901_alu.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**************************************************************************...
ALGO
0.985069
3.609735
5aa0f9ec-e7f7-482e-9f49-2a2a3aca8caa
Aryan-Kumar-Thakur/Leetcode-DSA-Submissions
0237-delete-node-in-a-linked-list/0237-delete-node-in-a-linked-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: void deleteNode(ListNode* node) { ListNode* prev=NULL; while(node->next){ node->val=node->next->val; ...
ALGO
0.999838
5.565672
752e81ab-2eef-4f34-a338-ad628ff1b132
raincross7/code-similarity
codes/train_code/problem138/problem138_298.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair< ll, ll > Pi; #define rep(i,n) for(int i=0;i<(n);i++) #define rep2(i,n) for(int i=1;i<=(n);i++) #define rep3(i,i0,n) for(int i=i0;i<(n);i++) #define pb push_back #define mod 1000000007 const ll INF = 1LL << 60; template<class T>bool chmax(T...
ALGO
0.999924
4.429268
8009f612-d5fa-48b4-8a64-e376e9fe4552
JjungminLee/Algorithm
2025_06/Boj_3151.cpp
#include<bits/stdc++.h> using namespace std; int n; vector<int>v; long long ans; int main(){ cin>>n; for(int i=0;i<n;i++){ int num; cin>>num; v.push_back(num); } sort(v.begin(),v.end()); // 0부터 n-2 만큼 돌면서 left의 시작점을 i+1로 for(int i=0;i<n-2;i++){ int left=i+1; ...
ALGO
0.999984
4.621488
85164697-7565-438b-9157-399660cb719a
YCNeo/OOP
NCCU_OJ/HW4/PROB.cpp
#include <iostream> using namespace std; int main(void) { int total = 0; for(int i = 1000; i < 10000; i++) if(i % 4 == 0 || i % 5 == 0 || i % 7 == 0 || i % 20 == 0 || i % 28 == 0 || i % 35 == 0 || i % 140 == 0) total++; cout << total << endl; return 0; }
ALGO
0.997466
3.780315
6c9329d6-b1ee-497b-8418-3143e7b6694f
SuvratZZZ/solved
solved/tri.cpp
#include <bits/stdc++.h> using namespace std; # define ll long long #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> # define pb push_back # define fl(i,n) for(ll...
ALGO
0.999436
4.535404
65723d87-1d3b-4b1d-98cd-7ad179ac98db
rizaust/sdust-cs-assignment
4thec/C.cpp
#include <bits/stdc++.h> using namespace std; class Cherry{ public: Cherry(double _w=0,double a=0){ w=_w*a; } void weight(double _w) { w=_w; } double weight() { return w; } void sold_weight(double _w)...
ALGO
0.999415
3.37206
22800196-d600-401e-88fb-33afef064cd4
HarshalAtre/Cpp-Codes
cpp/ch5/1_5_question4.cpp
#include <iostream> using namespace std; int main(){ int n1,n2,i; cin>>n1>>n2; int fact1=1; for(i=2;i<=n1;i++){ fact1=fact1*i; } int fact2=1; for(i=2;i<=n2;i++){ fact2=fact2*i; } cout<<fact1<<endl<<fact2; return 0; }
ALGO
0.999831
3.786354
4b1dce5d-33df-45e5-b643-a972373f3989
AkshayPradeep6152/letshack
C++ Programs/Reverse.cpp
#include <iostream> using namespace std; int main() { int n, reversedNumber = 0, remainder; cout << "Enter an integer: "; cin >> n; while(n != 0) { remainder = n%10; reversedNumber = reversedNumber*10 + remainder; n /= 10; } cout << "Reversed Number = " << reversedNum...
ALGO
0.997564
5.281188
cdefb048-28a4-43ef-94cc-07fbe7aa692a
sarvex/leetcode-php
solution/0800-0899/0826.Most Profit Assigning Work/Solution.cpp
class Solution { public: int maxProfitAssignment(vector<int>& difficulty, vector<int>& profit, vector<int>& worker) { int n = difficulty.size(); vector<pair<int, int>> job; for (int i = 0; i < n; ++i) { job.push_back({difficulty[i], profit[i]}); } sort(job.begin()...
ALGO
0.999961
5.876148
dd9af752-a5a9-48e9-927e-3082970501e9
ShubhamSingh1384/code-with-SSR
OOPs 1&2 29/Polymorphism.cpp
//Polymorphism :- Existing in multiple form // sirf return type change krne se nhi hoga argument change krna hoga #include<iostream> using namespace std; class A{ public: void sayhello(){ cout << "Hello shubham" << endl; } void sayhello(string name){ cout << "Hello " << name << endl; ...
TOOL
0.878908
3.860942
f3c48fd8-38d2-4d8f-9d32-cbad5e3c59b5
sinian666/codes_102_3
cpp_副本12/chapter_backtracking/permutations_ii.cpp
/** * File: permutations_ii.cpp * Created Time: 2023-04-24 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" /* 回溯算法:全排列 II */ void backtrack(vector<int> &state, const vector<int> &choices, vector<bool> &selected, vector<vector<int>> &res) { // 当状态长度等于元素数量时,记录解 if (state.size() == choices.size...
ALGO
0.999918
5.701356
89760ef9-3ec4-46f7-b572-0739adb154e4
EstebanQuerol/UJI_CNC_IEC61499
FORTE/src/modules/UJI_FMS/FMS_61499_FBS/Layer_3/L3_MMCore.cpp
/************************************************************************* *** FORTE Library Element *** *** This file was generated using the 4DIAC FORTE Export Filter V1.0.x! *** *** Name: L3_MMCore *** Description: Machine manager core *** Version: *** 0.0: 2014-10-06/EQUEROL - UJI - *****************...
ALGO
0.992848
5.225738
b1a0fead-4e2e-4f55-b510-45fced830d42
aniketyd/leetcode_solution
3678-design-task-manager/design-task-manager.cpp
class TaskManager { public: set<pair<pair<int,int>,int>>st; unordered_map<int,int>mp,mp2; TaskManager(vector<vector<int>>& tasks) { int n=tasks.size(); for(int i=0;i<n;i++){ st.insert({{tasks[i][2],tasks[i][1]},tasks[i][0]}); mp[tasks[i][1]]=tasks[i][2]; mp2[tasks[i][...
ALGO
0.999979
5.80677
18eaf9dc-0c35-4a24-b639-d2a5e5f32b72
sjtao98/Leetcode_backup_2
42-trapping-rain-water/42-trapping-rain-water.cpp
class Solution { public: int trap(vector<int>& height) { int n = height.size(); int l = 0, r = n-1; int res = 0; int lm = 0, rm = 0; while(l < r){ if(height[l] < height[r]){ lm = max(lm, height[l]); res += (lm - height[l]); ...
ALGO
0.999989
6.844129
b5135496-34bd-4ed3-80f9-d90fb4b3a2bc
yu7yu7/IE523_Financial_Computing
Assignment/Assignment 03/Assignment_03_Dutch_Miracle_Sudoku_Solver.cpp
#include <iostream> #include "Assignment_03_Dutch_Miracle_Sudoku_Solver.h" int main (int argc, char * const argv[]) { Sudoku x; x.read_puzzle(argc, argv); x.Solve(0,0); return 0; }
ALGO
0.971718
3.403167
aeaca7fb-2425-4719-8d42-6c3e180b9849
raincross7/code-similarity
codes/train_code/problem421/problem421_394.cpp
#include <iostream> #include <map> #include <algorithm> #include <string> #include <vector> #include <numeric> #include <cmath> #include <queue> #include <iomanip> #include <functional> #define CHMAX(a,b) a = std::max(a,b) #define CHMIN(a,b) a = std::min(a,b) #define MAXMIN(a,b,c) std::max(a,min(b,c)) #define CHABS(a...
ALGO
0.99989
3.742193
c5b4733b-8fff-4377-b010-5b0f93db30a9
soumyasavarn/DSA
Graphs and Heap/Heap_example.cpp
/*Soumya Savarn 220150031 DSAI */ /* Example of Heap: Tour Planner according to budget User Shares his budget with the program and it suggests him places around his budget. under his where he can visit . This program uses Max Heap. ADVANTAGE: When database is large this program will answer queries in log n time. */ ...
ALGO
0.990185
3.671809
6a0d54d1-7202-4883-b8bd-92f8650acd0a
ashwinpanchal/SOC-2024-CP
week1/Eraser1D.cpp
#include<bits/stdc++.h> using namespace std; int main(){ // #ifndef ONLINE_JUDGE // freopen("input.txt","r",stdin); // freopen("output.txt","w",stdout); // #endif int t; cin>>t; while(t--){ int n,k; cin>>n>>k; string s; cin>>s; int m = 0; int ...
ALGO
0.999809
3.865388
d85c4206-bd09-41a1-82ef-834e7faa3732
EliyaKaheni/ClassOfLife
cell.cpp
#include <bits/stdc++.h> #include <vector> using namespace std; // struct for DNA struct dna{ string rna; string mokamel; }; class Genome{ // Define DNA inside class dna d; public: //Input DNA void dna_set(string _rna, string _mokamel){ d.rna = _rna; d.mokamel = _moka...
ALGO
0.998822
4.472351
3c704076-13e4-4a41-a603-e69b37afbe10
OpenDroneMap/RenderDEM
render.cpp
#include <filesystem> #include <cmath> #include <algorithm> #include <array> #include "pdal/io/private/GDALGrid.hpp" #include "pdal/private/gdal/Raster.hpp" #include "render.hpp" #include "utils.hpp" namespace fs = std::filesystem; struct Tile{ double radius; Extent bounds; Extent bufferedBounds; std:...
DATA
0.867538
6.472968
905b31e6-b850-47d6-916a-602e517fb44f
7oSkaaa/LeetCode_DailyChallenge_2023
03- March/16- Construct Binary Tree from Inorder and Postorder Traversal/16- Construct Binary Tree from Inorder and Postorder Traversal (Ahmed Gamal).cpp
// Author: Ahmed Gamal // for this problem we want to build the tree using the postorder and inorder traversals // we can think of it as a divide and conquer problem where we divide the tree into two parts (left and right) and solve the problem for each part // but the question is how to divide the tree into two parts...
ALGO
0.99995
6.2781
23b5f9ce-e300-4af8-9c47-87d340f18388
gabriel-candeia/Competitive-Programming-Solutions
URI/Escola de Inverno CSBC - Dia 1/A.cpp
#include<bits/stdc++.h> #define maxn 105 using namespace std; const int inf = 1e9; char mat[maxn][maxn]; int n, m; bool isok(int x, int y){ return x>=0 && y>=0 && x<n && y<m; } int conv(char c){ if(c=='.') return 1; if(c<='9' && c>='1') return c-'0'; else return inf; } int so...
ALGO
0.999691
4.323301
b860adea-9768-4907-bdb3-911f0734ea52
stitch11/Aquayoup-624-21742
Core/src/tools/connection_patcher/Helper.cpp
#include "Helper.hpp" namespace Connection_Patcher { namespace Helper { // adapted from http://stackoverflow.com/questions/8593608/how-can-i-copy-a-directory-using-boost-filesystem void CopyDir(boost::filesystem::path const & source, boost::filesystem::path const & destination) { ...
TOOL
0.975903
5.498551
68f829d7-aeb5-41db-b5cd-38f777de69f5
VishwajeetSinghParihar750/CP
practice/cf-1702g2.cpp
// Author__ VISHWAJEET_SINGH_PARIHAR __ #pragma GCC optimize("Ofast") #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; template <class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statist...
ALGO
0.999976
4.960968
935deec2-1399-46a1-921b-2a80e999d7b3
samguns/leetcode
025-ReverseKGroup/cpp5/main.cpp
#include <iostream> #include <string> #include <vector> #include <sstream> #include <algorithm> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode* reverseKGroup(ListNode* head, int k) { ListNode dummy(0);...
ALGO
0.999853
5.520764
9a9cd36c-56bd-4c0e-b5fa-99ccd8faa392
NoeDebrois/CPP_APC
Exercises/Exercise Session 19 - 19:12:2024/mpiSolution/Simulator.cpp
// // Created by Federica Filippini on 18/01/23. // #include "Simulator.h" #include <unistd.h> bool Simulator::is_in_limits (const Particle& p) const { const Vector2D & position = p.get_position(); return is_in_limits(position); } bool Simulator::is_in_limits (const Vector2D& position) const { return x_min - ...
ALGO
0.999344
5.611336
dea2aa21-c536-4941-a026-35f62f5a4923
htucker98/CS260_Assignments
pointerlist.cpp
#include <iostream> /* linked list: all run time tests in main function */ struct NODE { int val; NODE* next; }; struct LIST { NODE *head; NODE *tail; }; void INSERT(int x, int p, LIST *L) { NODE *prv=new NODE; NODE *cur=new NODE; NODE *tmp=new NODE; cur=L->head; int i=0; while(i<p ...
ALGO
0.998628
3.79689
8491d77d-b08a-4aa4-a1b9-9d02d2ece802
8prashant/Code-force
average_height.cpp
/*A. Average Height time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Sayaka Saeki is a member of the student council, which has n other members (excluding Sayaka). The i -th member has a height of ai millimeters. It's the end of the school year and Sayaka wants...
ALGO
0.999863
4.090926
0940659f-ff0e-4b46-a5ac-3f7134a259aa
GuacheSuede/MSSubmission1234567890
submission/macd/boost_1_69_0/libs/program_options/src/split.cpp
#define BOOST_PROGRAM_OPTIONS_SOURCE #include <boost/program_options/parsers.hpp> #include <boost/tokenizer.hpp> #include <string> #include <vector> namespace boost { namespace program_options { namespace detail { template< class charT > std::vector<std::basic_string<charT> > split_unix( const st...
TOOL
0.951742
6.747805
ff320ba6-0b5f-4f22-8dd5-6103c9782ffe
LoiNguyennn/CompetitiveProgramming4_Solutions
Kattis_OJ/epigdanceoff.cpp
#include <iostream> using namespace std; int main() { int N, M; cin >> N >> M; bool has[M] = {false}; for (int i = 0; i < N; ++i) { for (int j = 0; j < M; ++j) { char c; cin >> c; if (c == '$') has[j] = true; } } int ans = 0; for (int i =...
ALGO
0.998788
3.573645
49c946b0-4bab-4c69-a09a-3a670006c81e
dobrevskasara/Structural-Programming
Tema6/Homework/Zadaca09.cpp
//Задача 9 //Напиши програма каде ќе се внесат две низи од 10 елементи и да се определи //производот на сумите на вредностите по позиции. Резултатот да се отпечати. #include <iostream> using namespace std; void fillArray(int array[], int n){ for(int i=0;i<n;i++){ cin>>array[i]; } } void printArray(in...
ALGO
0.998072
4.400234
8cd06658-b3a2-491b-8534-cf9001e8130e
raychow/LeetCode
C++/Best Time to Buy and Sell Stock III.cpp
class Solution { public: int maxProfit(vector<int> &prices) { if (prices.empty()) { return 0; } vector<int> leftResult(prices.size()); vector<int> rightResult(prices.size()); int lowest = prices.front(); int highest = prices.back(); int...
ALGO
0.999824
6.34877
6f93b544-d4f4-447f-857c-141c3de2cdad
noko206/AtCoder
abc/401-450/410/e.cpp
// clang-format off #include <bits/stdc++.h> using namespace std; #if __has_include(<atcoder/all>) #include <atcoder/all> using namespace atcoder; #endif #define _overload3(_1,_2,_3,name,...) name #define _REP(i,n) REPI(i,0,n) #define REPI(i,a,b) for(int i=int(a);i<int(b);++i) #define REP(...) _overload3(__VA_ARGS__,R...
ALGO
0.999955
3.762319
22cf7a90-0991-4e71-b9ab-a164f879384b
Prince0302/GFG_CONTEST_PROGRAMS
Heap/KMostOccuringElements.cpp
// Rest of the code is already given as Driver Code class Solution { public: struct mycmp{ bool operator()(pair<int,int> p1,pair<int,int> p2){ if(p1.second==p2.second){ return p1.first>p2.first; } return p1.second<p2.second;; } }; int kMostFr...
ALGO
0.999955
5.566423
f6a9448c-beef-49d9-9b2a-8b96442dd1e9
kimixuchen/leetcode
LeetCode-520-Detect Capital-Easy.cpp
/* LeetCode-520-Detect Capital 23/02/17 09:55:53 xuchen **/ #include <iostream> #include <sstream> #include <cfloat> #include <cctype> #include <unordered_set> #include <unordered_map> #include <priority_queue> #include <set> #include <cmath> #include <vector> #include <map> #include <cmath> #include <string> #include...
ALGO
0.999951
5.832244
c0a36c1e-6e72-48fe-9b81-c15ba04eb2a6
LovelyEther/ICPC
Codeforces/Codeforces Round #821 (Div. 2)/B.cpp
#include <bits/stdc++.h> using namespace std; int t, n, x, y; int main() { #ifndef ONLINE_JUDGE freopen("in.txt", "r", stdin); #endif scanf("%d", &t); while (t --) { scanf("%d %d %d", &n, &x, &y); if (x && y || !x && !y) { puts("-1"); continue; } if (!x) swap(x, y); if ((n - 1) % x) { puts("-1"); c...
ALGO
0.999755
3.543743
d71881cc-1e7f-4ac9-9d87-4c9bc9d8ff42
navendraagrawal9479/SdeSheetChallenge
149_serialize_and_deserialize_Binary_tree.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> class TreeNode { public: T data; TreeNode<T> *left; TreeNode<T> *right; TreeNode(T data) { this->data = data; left = NULL; right = NULL; } }; string serializeTree(TreeNode<int> *root) { // Write...
ALGO
0.99986
5.300355
b496c4a6-0459-4076-8577-ab7404f7a46a
sagsango/cp
code/tmp/dsu.cpp
// // blank.cpp // // // Created by Sagar Singh on 17/12/20. // #pragma GCC target("popcnt") #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <iostream> #include <iomanip> #include <fstream> #include <v...
ALGO
0.999157
3.352266
21e2115f-74eb-45e4-9b6e-86c182c7fa47
Devansh-1107/Data-Structure-and-Algorithm-DSA-
binarySearch_recurrsion.cpp
#include<iostream> using namespace std; bool binarySearch(int arr[],int s,int e, int key){ if(s>e){ return 0; } int mid=s+(e-s)/2; if(key==arr[mid]){ return 1; } if(arr[mid]>key){ return binarySearch(arr,s,mid-1,key); }else if(arr[mid]<key){ return binarySearc...
ALGO
0.999768
4.866369
9a8a08bd-50a8-4704-88e7-018a950c03e6
ishimwethierryhenry/mob_prog_assign_three
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
0b3b6bd2-b11f-4fa0-b4f5-773c55c7e835
raincross7/code-similarity
codes/train_code/problem349/problem349_25.cpp
#include <stdio.h> typedef struct{ char c; int n; }back; int main() { back card1[36],card2[36],tmp[36],temp; char c; int minj,i,j,a,N; scanf("%d",&N); for(i=0;i<N;i++){ scanf(" %c%d",&card1[i].c,&card1[i].n); scanf("%c",&c); } for(j=0;j<N;j++){ card2[j]=card1[j]; } a=0; fo...
ALGO
0.999971
3.098795
b794e584-7ad3-4d05-b663-6ecbe9781d0d
kunal2812/CP
codeforces/1573/B.cpp
#pragma GCC target ("avx2") #pragma GCC optimize ("O3") #pragma GCC optimize ("unroll-loops") #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define pf push_front #define ppb pop_back #define ppf pop_front #define yes cout << "YES" << endl; return #define no cout << "NO" << e...
ALGO
0.999889
3.902504
a833737f-adcb-4831-ae20-8594dec5f983
moinhameed27/Ultimate-DSA
Bit Manipulation/Odd or Even.cpp
// GFG : https://www.geeksforgeeks.org/problems/odd-or-even3618/1 // [C++]----------------------------------------------------------------------------------------------------------------------- // Way - I (Modulo) class Solution { public: string oddEven(int n) { return n % 2 == 0 ? "even" : "odd"; ...
ALGO
0.999894
5.625051
16a8e3ce-f162-45b0-a13c-65e15602b490
seemyhurt/projects_CPP
object_oriented_programming/arrays/linked_list/linked_list.cpp
// linklist.cpp // список #include <iostream> using namespace std; /////////////////////////////////////////////////////////// struct link // один элемент списка { int data; // некоторые данные link* next; // указатель на следующую структуру }; /////////////////////////////////////////////////////////// cla...
ALGO
0.959215
4.334283