uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
6a900396-48ab-42f7-8b88-e53e26c917ae
AlexGliesch/competitive-programming
uva/12646 - Zero or One.cpp
#include <ciso646> #include <iostream> using namespace std; int main() { int a, b, c; while (cin >> a >> b >> c) { if (a != b and b == c) cout << 'A' << endl; else if (b != c and a == c) cout << 'B' << endl; else if (c != a and a == b) cout << 'C' << endl; else cout << '*' ...
ALGO
0.999926
4.30681
f53de3fb-56ab-4d39-8d1a-a1cbde0517fb
PTD504/DSA_Practice
CSES_Problem_List/Sorting_and_Searching/SubarrayDivisibility.cpp
/* ########################################### Source: CSES Problem statement: Given an array of n integers, your task is to count the number of subarrays where the sum of values is divisible by n. Input The first input line has an integer n: the size of the array. The next line has n integers a_1,a_2,...,a_n: the con...
ALGO
0.999963
4.719545
5720da70-5a9d-4b5c-ae9a-c4274439da21
CarryNotKarry/Template
KMP.cpp
#include<iostream> #include<cstdio> #include<cstdlib> #include<algorithm> #include<cstring> using namespace std; char sa[1000010],sb[1000010]; int lena,lenb,j,nxt[1000010]; int main() { scanf("%s",sa+1);lena=strlen(sa+1); scanf("%s",sb+1);lenb=strlen(sb+1); for (int i=2;i<=lenb;i++) { j=nxt[i-1]; ...
ALGO
0.999974
3.218894
2d43c7ff-a78f-4ef1-b81d-f5b7c7a65811
SubharoopKabi/USCKIIT-Consistent-coding
Linked List/3_detectloop.cpp
#include<iostream> using namespace std; class Node { public: int data; Node *next; Node(int data) { this->data = data; this->next = NULL; } }; Node* floydDetectLoop(Node* head) { if(head == NULL) return NULL; ...
ALGO
0.99997
6.190112
dcf509a9-c574-4ce7-b61d-9823cc6aaeec
pratzie100/Leetcode
0092-reverse-linked-list-ii/0092-reverse-linked-list-ii.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* vtoll(vecto...
ALGO
0.999998
5.637755
bf364e7c-d4fc-4b82-b827-19cee3ccec68
Hackerifyouwant/Data-Structure-and-Algorithm
Set/Disjoint_Set.cpp
#include<iomanip> #include<iostream> #define ll long long #define endl '\n' using namespace std; int FindSetCollapsing(int *subset, int i){ int root; for(root = i; subset[root] >= 0; root = subset[root]) while(i != root){ int parent = subset[i]; subset[i] = root; i = parent; ...
ALGO
0.999798
4.082752
f104d932-c8a3-466b-9248-23d3d8ab5e87
IrinaMBejan/Personal-work-contests
Algorithmics/Problems from various contests/monkey.cpp
#include <fstream> #include<iomanip> #define NMAX 25 using namespace std; ifstream fin("monkey.in"); ofstream fout("monkey.out"); int n,m; char mat[NMAX][NMAX]; int dl[4]= {-1,0,1,0}; int dc[4]= {0,1,0,-1}; int pas,pasmax; bool uz[27]; void citire(); void bordare(); void bkt(int x, int y); void afisare(); int main()...
ALGO
0.999849
3.264643
dd57cd10-4ae1-4f63-903d-e2f57596bf5a
Nghia03092004/Competitive-Programming
Codeforces/Mảng cộng dồn, tìm kiếm nhị phân, mảng hiệu/BONUS.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define For(i, l, r) for (auto i = (l); i <= (r); i++) #define Ford(i, l, r) for (auto i = (l); i >= (r); i--) #define ii pair <int, int> #define fi first #define se seco...
ALGO
0.999907
3.430041
4bff6cb4-1022-49cd-9edd-a7cc31c5e277
Spotless-face-under-earth/CypherLessonsCode
SPNcoding/source/main.cpp
// #include <iostream> // #include <vector> // #include <string> // #include <random> // #include <bitset> // #include <thread> // #include <mutex> // #include <algorithm> // const int BIT_LENGTH = 4; // 每组比特数 // const int GROUP_COUNT = 4; // 组数 // const int ROUNDS = 4; // 轮数 // // S盒和P盒 // const std::vector<int> ...
ALGO
0.999975
3.076438
6c1c3e11-2449-4d28-844e-a82df922bd18
yangco-le/LeetCode
夏令营准备/简单密码/main.cpp
#include<bits/stdc++.h> using namespace std; int main() { string str; while (getline(cin, str)) { if (str == "ENDOFINPUT") break; getline(cin, str); for(int i = 0; i < str.size(); i++) { if ('A' <= str[i] && str[i] <= 'Z') str[i] = (str[i] - 'A' - 5 + 26) %...
ALGO
0.996007
4.412132
e6d8ea12-2f2a-4162-b580-082a8cdf39c3
winmutase21/WinMutASE21Artifact
tools/clang/lib/Edit/EditedSource.cpp
#include "clang/Edit/EditedSource.h" #include "clang/Basic/CharInfo.h" #include "clang/Basic/SourceManager.h" #include "clang/Edit/Commit.h" #include "clang/Edit/EditsReceiver.h" #include "clang/Lex/Lexer.h" #include "llvm/ADT/SmallString.h" #include "llvm/ADT/Twine.h" using namespace clang; using namespace edit; voi...
TOOL
0.95328
7.715918
41643004-a34d-4fa5-ab1e-4511c5c04adb
WEN1WE/PAT
A1006.cpp
/* * 1. 此题主要对输入进行记录,然后比较 * 2. 字符串可以直接比较大小 */ #include <iostream> using namespace std; int main() { int n; string unlockTime = "24:00:00"; string lockTime = "00:00:00"; string id, signIn, signOut, unlockId, lockId; cin >> n; for (int i = 0; i < n; i++) { cin >> id >> signIn >> signO...
ALGO
0.999243
4.027075
998be1ab-88ad-4cdb-b2fc-fe87b95496a6
shubhamnag14/Let-s-C
LOOPs/3_COMBINATION.cpp
#include<stdio.h> #include<conio.h> main() { int i,j,k; printf("All combinations of 1,2,3 are:\n\n"); for(i=1;i<=3;i++) { for(j=1;j<=3;j++) { for(k=1;k<=3;k++) { printf(" %d%d%d ",i,j,k); } } } return 0; }
ALGO
0.996288
3.070908
f8d3c47b-2425-4cd0-beb0-99332467ec0b
ishandutta2007/codeforces
mhq/normal/1096/G.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int mod = 998244353; int sum(int a, int b) { int s = a + b; if (s >= mod) s -= mod; return s; } int sub(int a, int b) { int s = a - b; if (s < 0) s += mod; return s; } int mult(int a, int b) { r...
ALGO
0.999986
4.684634
1190a151-18a6-4311-a1fe-4f265444c891
IvanRenison/ProgrammingProblems
ICPC contests/Brazil Subregional 2019-2020/I.cpp
// https://codeforces.com/gym/102346 #include <bits/stdc++.h> #define fore(i, a, b) for (int i = a, gmat = b; i < gmat; i++) #define FIN ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std; typedef long long ll; typedef unsigned long long ull; constexpr ull INF = 1ull << 60; vector<optional<ull>> sol...
ALGO
0.999839
4.955305
e67bd8b4-2858-49d7-9df4-c1d3e21cd12d
ishandutta2007/codeforces
hbfs-/normal/750/E.cpp
#include <iostream> #include <cstdio> #define mid ( (l + r) >> 1 ) #define ls l,mid,t<<1 #define rs mid+1,r,t<<1^1 #define N 200005 using namespace std; struct Node{ int F[5][5]; }tr[4*N],id,ans; int a[N],ll,rr,n,q; char s[N]; inline void ut(int &x,int y) { x = min(x,y); } Node operator +(Node p1,Node p2) { Node ...
ALGO
0.999854
3.674526
5b4052cd-1d76-4023-a81a-427e0541730c
wonderspig/macaque
array/0016-3SumClosest.cpp
/** 题目: 给定一个包括 n 个整数的数组 nums 和 一个目标值 target。找出 nums 中的三个整数,使得它们的和与 target 最接近。返回这三个数的和。假定每组输入只存在唯一答案。 示例: 输入:nums = [-1,2,1,-4], target = 1 输出:2 解释:与 target 最接近的和是 2 (-1 + 2 + 1 = 2) 。 提示: 3 <= nums.length <= 10^3 -10^3 <= nums[i] <= 10^3 -10^4 <= target <= 10^4 ...
ALGO
0.999986
5.878253
e05080c4-86b0-4c80-91bb-fffb1f4e6c25
Nanored4498/Code-Forces
1500/1536C.cpp
#include <iostream> #include <algorithm> #include <map> using namespace std; typedef pair<int, int> pii; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while(t--) { int n; cin >> n; string s; cin >> s; map<pii, int> m; int D = 0, K = 0; for(char c : s) { if(c == 'D...
ALGO
0.999372
4.414588
48e8fd1d-0505-46bc-a26a-c5bb65b3f3d7
Gcotcot/Modules_CPP
git_CPP_09/ex02/PmergeMe.cpp
#include "PmergeMe.hpp" PmergeMe::PmergeMe(void) { } PmergeMe::~PmergeMe(void) { } void PmergeMe::add_value(int value) { this->vect.insert(this->vect.begin(), value); this->deck.push_front(value); } void PmergeMe::aff_vect(void) { clock_t start = clock(); this->vect = this->merge_vect(this->vect); clock_t end ...
ALGO
0.997872
4.393391
9c3aff76-65ae-415b-a138-2468160b46fb
neeagwl/CSES_Solutions
mathematics/tempCodeRunnerFile.cpp
#include<bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define fo(i,n) for(i=0;i<n;i++) #define ll long long #define si(x) scanf("%d",&x) #define sl(x) scanf("%lld",&x) #define ss(s) scanf("%s",s) #define pi(x) printf("%d\n",x) #define pl(x) printf("%lld\n",x) #define ps(s) printf("%s\n",s) #define pb...
ALGO
0.999664
3.597153
03f7b7a0-c0e4-425c-a6f8-de7ff1fcd15b
utsavnavadiya11/alarms_flutter
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.99887
6.783439
4496b2c3-a48d-4abc-9cef-647f22139464
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_4696_1.cpp
#include <bits/stdc++.h> using namespace std; long long int gcd(long long int a, long long int b) { if (a == 0) return b; return gcd(b % a, a); } long long int lcm(long long int x, long long int y) { return ((x * y) / gcd(x, y)); } bool prime(long long int n) { if (n == 1) return false; if (n == 2) return tru...
ALGO
0.999834
3.75417
9def1b75-e697-4e49-bd07-015bc12cb190
shawon39/C-C-plus-plus-Programming
Weekly Contest/Weekly/test.cpp
#include <bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL) #define yes printf("YES\n") #define no printf("NO\n") bool cmp(string a,string b){ return a.size() < b.size(); } //sort(s,s+n,cmp); // descending order bool myfun(int a, int b){ return a>b; } ...
ALGO
0.999666
3.651948
c38d6ab9-db03-40d3-9617-fb7c6511557b
semerdzhiev/sdp-samples
modern-c/tree-various.cpp
// treeprint.cpp : Defines the entry point for the console application. // by Gheorghi Penkov #include "stdafx.h" #include <iostream> #include <sstream> #include <functional> #include <string> #include <list> #include <memory> #include <map> std::string INPUT = "\ A 3 B C D \n\ B 2 E F \n\ C 1 G \n\ D 2 H I \n\ H 2 ...
ALGO
0.987453
3.984107
eacc0eaa-e87d-4fd9-b665-da2cf94c2c21
ApurboShib/Programming
Round_house/check_bit_is_on_off.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' // check the last bit = (x&1) bool check_last_bit(int x) { return (x & 1); } // check the kth bit bool check_the_kth_bit(int x, int k) { return (x >> k) & 1; } // ekta number er kon kon bit ta on ache seta check kore lagbe; void check_on_bit(int x...
ALGO
0.982964
4.864952
1cef7039-a834-41ea-9eca-ef07c6d1b279
PaukIsUha/optimizing_formating_code
predictions/submissions-aizu-coop-gpt4/Codenet/p02315/484633776/response_8.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N, W; cin >> N >> W; vector<int> value(N), weight(N); for (int i = 0; i < N; i++) cin >> value[i] >> weight[i]; vector<int> dp(W+1, 0); for (int i = 0; i < N; i++) { for (int w = W; w >= weight[i]; w--) { dp[w] = max(dp[w - weight[...
ALGO
0.999982
4.422692
20a4554c-d717-49da-8ca4-40d50864e31d
Syhire/CompetitivePrograming
Kompetitive 1/2/Quadrant.cpp
#include <stdio.h> using namespace std; int main() { int x, y; scanf("%d %d", &x, &y); if (x > 0 && y > 0) printf("1"); else if (x < 0 && y > 0) printf("2"); else if (x < 0 && y < 0) printf("3"); else printf("4"); }
ALGO
0.999994
3.980128
874ba787-2e81-404d-8778-2b0248374169
icemkilicc/-dynamically-allocated-arrays
main.cpp
#include <sstream> #include <fstream> #include "Reading.h" #include "Game.h" using namespace std; void Clear(int** Mmatrix , int** Kmatrix,int keyMatrix_row,int mapMatrix_row){ // deallocate memory using delete operator for (int i = 0; i < keyMatrix_row; i++) { delete[] Kmatrix[i]; } delete...
ALGO
0.98983
3.458127
6d8d55c5-34aa-4c6e-97f1-f9b100a454dc
Taiblockzero/Data-Structures-Homework-1
Domashno 1 SDP Ivailo Iliev 45119 v2/main.cpp
#include "Stack.h" #include <iostream> using namespace std; int main() { char* result; Stack s1("A"); s1.fillStack(); result = s1.getResult(); cout << result << endl; Stack s2("AB"); s2.fillStack(); result = s2.getResult(); cout << result << endl; Stack s3("3(A)"); s3.fillStack(); result = s3.getResult(...
ALGO
0.878197
4.367751
1d2e3047-7442-446f-b938-47919aecb53f
JR8ll/2025_TCB
2025_TCB/Solver_ILS.cpp
#include "Solver_ILS.h" #include "Schedule.h" using namespace std; Solver_ILS::Solver_ILS(Sched_params& params) : schedParams(&params) {} double Solver_ILS::solveILS(Schedule& sched, initializer<pJob> init, prioRule<pJob> rule, int iTilimSeconds, double pWait) { // initialize unique_ptr<Schedule> tempSched =...
ALGO
0.999879
3.92183
fdd56848-0276-41ec-8344-6d9742eb7425
MagicConchCpp/LeetCode
code/53.最大子序和.cpp
/* * @lc app=leetcode.cn id=53 lang=cpp * * [53] 最大子序和 */ // @lc code=start #include <bits/stdc++.h> using namespace std; class Solution { public: int maxSubArray(vector<int>& nums) { } }; // @lc code=end
ALGO
0.999708
6.271441
c95ce478-1480-4576-892c-1d661e87128e
xiaol-luo/lxl-cpp-code
AutoConfig/Config/CsvConfig/config_base/config_base.cpp
#include "config_base/config_base.h" #include "CsvParser/csv.h" namespace Config { static const char * Field_Name_int_val = "int_val"; static const char * Field_Name_float_val = "float_val"; static const char * Field_Name_int_vec = "int_vec"; static const char * Field_Name_int_int_map = "int_int_ma...
CONFIG
0.891082
5.269123
60b9fd8a-a9fe-4a86-8b7b-97d139527969
KNSoft/WinSDK-Diff
Source/ucrt/mbstring/mbscspn.cpp
#ifndef _MBCS #error This file should only be compiled with _MBCS defined #endif #include <corecrt_internal.h> #include <corecrt_internal_mbstring.h> #include <locale.h> #include <stddef.h> #include <string.h> /*** *ifndef _RETURN_PTR * _mbscspn - Find first string char in charset (MBCS) *else * _mbspbrk - Find f...
ALGO
0.992857
5.504082
5cce787e-a042-405f-bebf-e77682940901
wazedrifat/Vjudge
LightOJ/1303/22941612_AC_7ms_2084kB.cpp
#include<bits/stdc++.h> using namespace std; int main( ) { int test,visit[25][25],f[25],done[25]; vector<int>v; cin>>test; for(int t=1 ; t<=test ; t++) { int n,m; cin>>n>>m; cout<<"Case "<<t<<": "; v.clear(); memset(visit, 0, si...
ALGO
0.999841
3.687312
c4714986-16a2-4c47-8fea-84b5bf09a653
ssk4988/Coding
CSES/treealgorithms/pathqueries.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using pi = pair<int, int>; using pl = pair<ll, ll>; using pd = pair<ld, ld>; using vi = vector<int>; using vl = vector<ll>; using vd = vector<ld>; using vpi = vector<pi>; using vpl = vector<pl>; using vpd = vector<pd>; using vv...
ALGO
0.999762
4.207764
7e7486bb-b7ae-4da9-84b2-9e1ce773fc0d
vedrocks15/Updated_openCV
opencv-4.5.0/samples/tapi/opencl_custom_kernel.cpp
#include "opencv2/core.hpp" #include "opencv2/core/ocl.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/imgproc.hpp" #include <iostream> using namespace std; using namespace cv; static const char* opencl_kernel_src = "__kernel void magnutude_filter_8u(\n" " __global const ...
TOOL
0.91754
6.118151
21c8578b-565a-4de0-a4cb-d82f228fbeb2
JCFDev501/AI_MallSIM
Source/AIMallSim/Considerations/HomeConsideration.cpp
#include "Considerations/HomeConsideration.h" #include "Patron.h" #include "Util/DecisionContext.h" #include "Util/ScheduledActivity.h" float UHomeConsideration::Score(const FDecisionContext& Context) { const APatron* Patron = Cast<APatron>(Context.Actor); if (!Patron) { return 0.0f; // Context.Ac...
TOOL
0.95131
6.128591
858e9597-a408-44b6-923d-45e6b8082243
hellozin/TIL
box/Algorithm/Solved/SW_Expert_Academy_4613.cpp
#include <cstdio> #include <cstring> int main(void) { FILE* file = fopen("sample_input_flag.txt", "r"); int numTestCase = 0; fscanf(file, "%d", &numTestCase); int* W = new int[50]; int* B = new int[50]; int* R = new int[50]; for (int testCount = 1; testCount <= numTestCase; testCount++) { memset(W, 0, size...
ALGO
0.998871
4.118098
a9468153-6b7a-4a57-9830-1e584d2b800d
Hunndayne/UIT
Lập trình hướng đối tượng - IT002/Tuan1/Cau5/Cau5.cpp
// Cau5.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <string> using namespace std; struct hocsinh { string hoten; float toan; float van; float dtb; }; float tinhtb(float a, float b) { return (a + b) / 2; } int main() { h...
TOOL
0.912577
3.536681
c8944aef-24bd-4702-8bdd-f5de8af2fb81
Noodle3D/ZCookie
algorithm/HDU/HDU4356 Three Eggache God.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int MAXN = 2010; const int MOD = 1000000007; __int64 factorial[MAXN]; __int64 n, ans, c[MAXN]; __int64 w[MAXN], a[MAXN]; __int64 cnt[MAXN]; void init() { factorial[0] = 1; for(int i=1;i<MAXN;++i) { factorial[i] = ...
ALGO
0.999976
3.805634
80e0648e-e4ae-4f17-8735-61d05bd38df9
TheParadox20/competitive_programming
findMyPart/substring.cpp
#include <iostream> using namespace std; int main(){ cout<<"Enter search string: \n"; string search,sub_string; cin>>search; cout<<"Enter the substring to be searched: \n"; cin>>sub_string; int num=0; while (true) { if(search.find(sub_string)>0 && search.find(sub_string)< 1844551...
ALGO
0.998637
4.257666
c77b61e8-af21-4118-85aa-86755542d41d
AshrafRahul/VJudge
150/T_Division.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; while(t--){ int val; cin >> val; //int val = abs(n); if(val>=1900) cout << "Division 1" << endl; else if(val>=1600 && val<=1899) cout << "Division 2" << endl; else if(val>=1400 && val...
ALGO
0.998995
4.011399
90a5a6e3-ff35-4eee-9d3a-7a96fec7132c
christenbc/tuni-cpp-intensive-course
extras/recursirve_factorial_example.cpp
#include <iostream> using namespace std; unsigned factorial(unsigned n){ if(n == 0) return 1; else return n*factorial(n-1); } int main() { cout << factorial(5) << endl; }
ALGO
0.999774
5.100503
268ac837-d351-4b71-98e2-a0e787738b45
gauravaror/codechef
Practice/Easy/factorial1.cpp
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> #include <stdint.h> #ifdef ONLINE_JUDGE #include <unistd.h> #endif #ifndef ONLINE_JUDGE #include <sys/io.h> #include "/usr/x86_64-w64-mingw32/include/intrin.h" #endif // return __rdtsc(); #define BUFSIZE 8192 class Reader...
ALGO
0.999738
4.057331
94ac9b41-7f4a-441d-94bb-93970f9347a7
MJGHY4848/DS-and-ALGO
Recurssion/N_queen_problem.cpp
#include <iostream> using namespace std; bool isSafe(int **arr, int x, int y, int n) { for (int row = 0; row < x; row++) { if (arr[row][y] == 1) { return false; } } int row = x; int col = y; while (row >= 0 && col > 0) { if (arr[row][col] == 1) ...
ALGO
0.999827
5.576813
706f68d9-c237-4e90-a083-862b1494893f
qihaoqian/ECE285Project
sdf/eigen-3.3.7/doc/examples/tut_matrix_resize.cpp
#include <iostream> #include <Eigen/Dense> using namespace Eigen; int main() { MatrixXd m(2,5); m.resize(4,3); std::cout << "The matrix m is of size " << m.rows() << "x" << m.cols() << std::endl; std::cout << "It has " << m.size() << " coefficients" << std::endl; VectorXd v(2); v.resize(5); ...
ALGO
0.956989
3.882785
69d1cf41-83e2-4ae6-8043-da59c5a561eb
kangsw1025/TIL
SolveProblem/20/20.08/20_08_18/200818_2042_구간 합 구하기.cpp
#include<iostream> #include<algorithm> #include<vector> using namespace std; class segment { public: int n; vector<long long> sum; segment(vector<long long>& vec) { n = vec.size(); sum.resize(n * 4); init(vec, 0, n - 1, 1); } long long init(vector<long long>& vec, int left, int right, int node) { if (lef...
ALGO
0.999989
4.792665
07d9b449-f755-4d88-97da-429f0cba88d7
AndreiZherder/cpp-practice
while2.cpp
/*Дано целое число, не меньшее 2. Выведите его наименьший натуральный делитель, отличный от 1. Формат входных данных Вводится целое положительное число. Формат выходных данных Выведите ответ на задачу. Sample Input: 15 Sample Output: 3 */ #include <iostream> using namespace std; int main(){ int N; int i = ...
ALGO
0.999853
4.486455
87b95c8b-8797-4857-b006-ea762228cf1d
ajdillhoff/CSE1320-Examples
c++/containers/list_example.cpp
#include <iostream> #include <list> #include <string> using namespace std; class Ship { string name_; int id_; public: Ship(string name, int id) : name_{name}, id_{id} {} auto & name() const { return name_; } auto & name() { return name_; } auto & id() const { return id_...
TOOL
0.984249
5.712451
ea2c9ebe-27dd-4b46-bc38-f685f5aeb35d
sultancodess/leetcode-
C++/wiggle-sort.cpp
// Time: O(n) // Space: O(1) class Solution { public: void wiggleSort(vector<int>& nums) { for (int i = 1; i < nums.size(); ++i) { if (((i % 2) && nums[i] < nums[i - 1]) || (!(i % 2) && nums[i] > nums[i - 1])) { // Swap unordered elements. swap(n...
ALGO
0.999996
5.988345
c87caf3f-4b37-407b-86aa-c507a9b5fa11
ishandutta2007/codeforces
burnedchicken/normal/1023/E.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define int long long #define ull unsigned long long #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=(...
ALGO
0.999987
3.15816
c1068300-7a76-4fc6-ac04-310cf79d0707
Santanujana2001/My-Leetcode-Solutions
1685-sum-of-absolute-differences-in-a-sorted-array/1685-sum-of-absolute-differences-in-a-sorted-array.cpp
class Solution { public: vector<int> getSumAbsoluteDifferences(vector<int>& nums) { int n=nums.size(); vector<int>v(n); int sum =accumulate(nums.begin(),nums.end(),0); int lnum=0,rnum=0,lsum=0,rsum=0; for(int i=0;i<nums.size();i++){ rnum=n-(lnum+1); rsu...
ALGO
0.999926
5.606713
30e9c831-f03f-4524-a259-1f55ecbed97f
soncuco2/B-i-S-n
BTVN8_5.cpp
#include<stdio.h> int UCLN(int a, int b){ // Lap to'i khi 1 trong 2 s' bang' 0 while (a*b != 0){ if (a > b){ a %= b; // a = a % b }else{ b %= a; } } return a + b; // return a + b, boi v lc ny hoac a , b d bang 0. } int main(){ int a; int b; printf("Nhap va...
ALGO
0.999183
3.62292
296168fd-582b-47af-9f45-89e3e5e3d1f7
Mq-b/Loser-HomeWork
src/群友提交/第01题/CPU眼里的指针.cpp
//!msvc /********************************************************************* * Auther : yongheng * Date : 2023/8/14 23:00 *********************************************************************/ #include <iostream> #include <vector> #include <functional> __attribute((constructor)) int func () { std::cout << "1 ...
TOOL
0.944889
4.570356
5feeb0e8-c650-49b3-98fe-8528852ff262
ishandutta2007/codeforces
aestas16/normal/1539/F.cpp
/* I will never forget it. */ // 392699 #include <bits/stdc++.h> using namespace std; template <class T> void fr(T &a, bool f = 0, char ch = getchar()) { for (a = 0; ch < '0' || ch > '9'; ch = getchar()) ch == '-' ? f = 1 : 0; for (; ch >= '0' && ch <= '9'; ch = getchar()) a = a * 10 + ch - '0'; a =...
ALGO
0.999992
3.861309
ebe14c5a-f040-41a1-9878-bc0e9b87b5e7
liusonglei796/code
leetcode重排链表.cpp
class Solution { public: void reorderList(ListNode* head) { ListNode*fast=head; ListNode*slow=head; while(fast->next&&fast->next->next){ fast=fast->next->next; slow=slow->next; } ListNode*cur=slow->next; slow->next=nullptr; ListNode*pre=nullptr; while(cur){ ListNode*temp=cur->...
ALGO
0.999982
5.675853
69450430-62e6-4edd-b125-318ef23e5e9f
kidclone3/CP
OnlineJudge/atcoder/abc128_c.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define vi vector<int> #define vl vector<long long> #define vb vector<bool> #define ll long long #define pii pair<int, int> #define all(x) x.begin(), x.end() #define FORIT(i, s) for (auto it=(s.begin()); it!=(s.end()); ++it) #define F_OR(i, a, b, s) fo...
ALGO
0.999903
3.806638
b99c6820-f3c5-418c-b00a-ebc3acb8e6d7
Nouha314/server_room
server_room/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.997266
6.785645
c4c41eda-1bf5-42d6-9794-6d29ddb72a04
ishandutta2007/codeforces
nantf/normal/1237/E.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> PII; const int maxn=111111,mod=998244353; #define MP make_pair #define PB push_back #define lson o<<1,l,mid #define rson o<<1|1,mid+1,r #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define ROF(i,a,b) for(int i=(a);i>=(b);i--) #defi...
ALGO
0.999884
3.661032
4d337b75-7fd4-4bb5-95f5-64d4afe9bd36
MRDGH2821/Code-Dump
Student Programs/Sample Programs/ch1/many_polygons.cpp
#include <simplecpp> main_program { int nsides; turtleSim(); repeat(10) { cout << "Type in the number of sides: "; cin >> nsides; repeat(nsides) { forward(50); left(360.0 / nsides); } } wait(5); }
ALGO
0.958366
4.386536
855a1a26-c7ec-439d-a1de-cde6919afee3
likethestarsF/Backjun-Saves
_Silver/2090.cpp
// 240815 1 #2090 // Random Marathon 11 F // 00:30 #include <algorithm> #include <iostream> #include <queue> #include <vector> using namespace std; #define ll long long class my { ll int n; vector<ll int> num; ll int GCD(const ll int &a, const ll int &b) { ll int next; ll int first = max(a, b); ll i...
ALGO
0.999984
4.192991
a7d896d7-8cd4-453f-b7f5-5c0a247ca97d
haxbos/Vscode_Backup
01C++_Learn/Container/07_list容器/demo_排序.cpp
#include<iostream> #include<list> using namespace std; #include<string> //将person自定义数据类型进行排序,Person中有姓名、年龄、升高 //排序规则:按照年龄升序,如果年龄相同,则按升高降序 class Person{ public: string m_name; int m_age; int m_height; Person(string name,int age,int height){ m_name=name; m_age...
ALGO
0.998798
4.364373
017fc165-10c9-429a-9ccb-2c136557bab0
ishandutta2007/codeforces
hydro-bot1/normal/1392/C.cpp
// Hydro submission #623c5e1cf7716b87f5f05acd@1648123420259 #include <bits/stdc++.h> using namespace std; #define int long long inline int read() { int x = 0, f = 0; char c = 0; while (!isdigit(c)) f |= c == '-', c = getchar(); while (isdigit(c)) x = (x << 3) + (x << 1) + (c & 15), c = getchar(); retu...
ALGO
0.999435
4.357507
20c75da3-baf4-498e-83ac-2b5a8a8f77ec
HaelC/LeetCode
C++/42. Trapping Rain Water/sol1.cpp
class Solution { public: int trap(vector<int>& height) { if (height.empty()) { return 0; } int size = height.size(); vector<int> left_max(size), right_max(size); left_max[0] = height[0]; right_max[size-1] = height[size-1]; for (int i = 1; ...
ALGO
0.999984
7.208673
1e750315-c1c9-4822-891d-9469b4ca9ce6
yjaiswal05/Face-recognition-
opencv/OpenCV 4.5.2.tar/opencv-opencv-39d2578/3rdparty/openexr/IlmImf/ImfRle.cpp
#include <string.h> #include "ImfRle.h" #include "ImfNamespace.h" OPENEXR_IMF_INTERNAL_NAMESPACE_SOURCE_ENTER namespace { const int MIN_RUN_LENGTH = 3; const int MAX_RUN_LENGTH = 127; } // // Compress an array of bytes, using run-length encoding, // and return the length of the compressed data. // int rleCompress...
ALGO
0.996502
5.188163
297c4ccb-2021-40d0-8c78-f5824c49f7e0
Lee-Duck-03/template_cp
codetumlumtala/830.cpp
/* ________ _______ _______ _____ _______ | _____| | \ | \ / \ | \ | |_____ | 0 | | 0 | | _ | | 0 | | _____| | _ / | _ / | |_| | | _ / | |_____ | | \ \ | | \ \ | | | | \ \ |________| |__| \__\ |__| \__\ ...
ALGO
0.999848
3.712406
33f0bb3d-d23d-40d2-ba7e-40fde5bf9761
toby0622/CPE-Practice-Code
UVA 10140 Prime Distance/main.cpp
#include <iostream> #include <cmath> #define MAX 46341 #define TOTAL 4793 using namespace std; int numOfPrime = 0; int checkPrime[MAX]; int prime[TOTAL]; void primeFilter1() { int i; int j; prime[numOfPrime++] = 2; int MaxCheckValue = sqrt(46341); for (i = 3; i < MaxCheckValue; i += 2) { ...
ALGO
0.999888
4.400694
a9573d51-fb6e-4290-885b-91ebd574cfee
lesyeuxdelamour/DSAStudyingPTIT
Sorting and Searching/DSA06013.cpp
#include <bits/stdc++.h> #define _sinusoid_() int main() #define endl "\n" #define faster(); ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); using namespace std; using ll = long long; const int MOD = 1e9 + 7; _sinusoid_() { faster(); int tc; cin >> tc; while(tc--) { int n, k; cin >> n >> k; int cnt ...
ALGO
0.999376
4.361932
0cb86819-7f5b-4935-9b73-cc92516411f4
Divya063/programming
challenge/coding_challenge.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define N 100005 #define MOD 1000000007 #define dd double #define DEBUG(x) cout << '>' << #x << ':' << x << endl; int binary_search(int prefix_sum[], int key, int l, int r){ int mid; while (l < r) { mid = l + ((r - l) >> 1); // ...
ALGO
0.999473
4.415686
a20606ab-6638-4a2f-8610-dc75022ce795
morrischen890717/Leetcode
C++/864_hard.cpp
class Solution { class Cell { public: int i, j, state; Cell(int i, int j, int state){ this->i = i; this->j = j; this->state = state; } }; public: void addKey(Cell* cell, int key){ cell->state |= (1 << key); return; } bo...
ALGO
0.999933
5.765259
4b0c17fa-6985-4228-9ee5-5a8697e1d9d9
AbhJ/some-cp-files-2
codechefCHFDORA.cpp
#include <bits/stdc++.h>//CHFDORA #define ll long long int #define pb push_back #define ibs ios_base::sync_with_stdio(false) #define cti cin.tie(0) using namespace std;//coded by abhijay mitra #define watch(x) cout << (#x) << " is " << (x) << endl // int a[10000][10000]; int main() { int t;cin>>t; while(t--){ ...
ALGO
0.999955
3.586078
eee160ce-bc5c-41bb-a5fa-4e4325007c50
gamergenic/js-spice
src/source/wrapped/vsep.cpp
#include "wrapped/vsep.h" extern "C" { #include <SpiceUsr.h> } #include "utility/pack.h" #include "utility/unpack.h" Napi::Value vsep(const Napi::CallbackInfo& info) { Napi::Env env = info.Env(); Napi::HandleScope scope(env); SpiceDouble v1[3], v2[3]; if( Unpack("vsep", info) .rec(v1, "v...
TOOL
0.927147
6.182826
eb87c3ee-2611-4735-94e5-b7d60abec67e
agravi987/semester-II-all-notes
Oops_notes/module4/STL/Standard template library/Algorithm/algorithms.cpp
#include <iostream> #include <vector> #include <algorithm> // For sort, reverse, find, count, for_each, transform #include <numeric> // For accumulate using namespace std; /* This program demonstrates the usage of various STL algorithms including: - sort: To sort the elements of a container. - reverse: To reverse t...
ALGO
0.99953
5.877607
4a6a1785-4cbc-4e64-b6e6-16ea03f40ca1
lfisher5/CPSC-122
project7.cpp
/* Class: CPSC 122 - 02 Team Member: Lauren Fisher Submitted by: Lauren Fisher GU Username: lfisher5 FileName: project7.cpp Program illustrates dynamic allocation of memory and linked lists To build: g++ project7.cpp project7Tst.cpp To execute: ./a.out */ #include <iostream> using namespace std; #include "project7.h...
ALGO
0.979965
4.00123
86082467-598c-4156-bd94-a97546d55087
raincross7/code-similarity
codes/train_code/problem436/problem436_66.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n,i,sum=0; cin>>n; int a[n]; for(i=0;i<n;i++) { cin>>a[i]; sum=sum+a[i]; } if((sum*1.0/n)>(sum/n+.50)) sum=sum/n+1; else sum=sum/n; long long total=0; for(i=0;i<n;i++) total=tota...
ALGO
0.999916
3.38812
4825a449-ea0d-42f1-ba7f-f20a5c3bb138
EnHsiangChu/VLSI_Physical_Design_Automation
HW1_FM/src/main.cpp
#include <iostream> #include <vector> #include <string> #include <map> #include <cstdlib> #include <ctime> #include "../include/parser.h" #include "../include/struct.h" #include "../include/util.h" using namespace std; double maxCellSize = 0; double W = 0; int Pmax = 0; string outfile_name = "0"; int main(int argc,...
ALGO
0.99748
3.683532
16d54308-8afa-4899-9d49-16857d1aac80
abubakaristiak/Codeforces-Problems
800 rating/B_Maximum_Multiple_Sum.cpp
/* * Bismillahir Rahmanir Raheem * * * * * Coder : abubakaristiak * * * * Created : 2025-04-10 || 23:40:41 * * * * File : B_Maximum_Multiple_Sum.cpp */ // https://codeforces.com/problemset/problem/1985/B #include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #def...
ALGO
0.999865
4.675877
c8d81994-cf49-49ba-acb8-ae1f8a2e5dac
sency90/boj
11650.cpp
#include <stdio.h> #include <functional> #include <vector> #include <queue> using namespace std; struct Coord{ int x, y; bool operator>(const Coord& rhs) const { if(x > rhs.x) return true; else if(x == rhs.x) { if(y > rhs.y) return true; else return false; } ...
ALGO
0.99975
4.192247
2737276a-0274-4e77-8bc5-297027f1ed25
baejaeho18/code
0-Education/cpp/OrderedSet/orderedList.cpp
#include "orderedList.h" #include <limits> #include <iostream> void add(OrderedList* ordered, int v) { Node* node = new Node; node->element = v; node->next = nullptr; Node* crnt = ordered->head; if (crnt == nullptr) { ordered->head = node; ordered->m_size++; } else if (v < crnt->element) { node->next = c...
ALGO
0.986783
4.918524
74678351-9ca2-440a-8425-3a760abc07c7
dcfbf/Pain
main.cpp
#include <bits/stdc++.h> #include <chrono> using namespace std; /* //1 int main() { int x; cin >> x; for (int i = 0; i<x; i++){ for (int j = 0; j<x; j++){ if(i == j){ cout << 0 << " "; } else{ cout << 1 << " "; } } cout << "\n"; } } */ //2 /* int main(){ in...
ALGO
0.999763
3.401346
7d43ea58-389b-4e53-b9bf-720ecbc7ac9d
helenjw/CSC317
lab4/libigl/include/igl/copyleft/comiso/frame_field.cpp
#include <igl/triangle_triangle_adjacency.h> #include <igl/edge_topology.h> #include <igl/per_face_normals.h> #include <igl/copyleft/comiso/nrosy.h> #include <iostream> namespace igl { namespace copyleft { namespace comiso { class FrameInterpolator { public: // Init IGL_INLINE FrameInterpolator(const Eigen::Matri...
ALGO
0.998784
4.619872
1b015f86-5765-4f1a-9fe9-59e54abadf38
leekaka/leetcode
95.unique-binary-search-trees-ii.cpp
/* * [95] Unique Binary Search Trees II * * https://leetcode.com/problems/unique-binary-search-trees-ii/description/ * * algorithms * Medium (33.41%) * Total Accepted: 114.9K * Total Submissions: 343.9K * Testcase Example: '3' * * Given an integer n, generate all structurally unique BST's (binary search ...
ALGO
0.999942
6.705424
223db8e3-e8b2-45cd-9e22-b11c1ec0cd25
kkeshavv/Leetcode
0019-remove-nth-node-from-end-of-list/0019-remove-nth-node-from-end-of-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* removeNthFr...
ALGO
0.999967
5.853449
b4dae7d6-b8cf-4e9f-ada3-cb60a0c1c5e7
MaJluHoBKa/Sort
src/PyramidalSort.cpp
#include <iostream> #include <vector> #include <chrono> #include <random> int random(int low, int high) { std::random_device rd; std::mt19937 gen(rd()); std::uniform_int_distribution<> dist(low, high); return dist(gen); } void heapify(std::vector<int> &banks, int count, int i) { int large = i; ...
ALGO
0.994803
3.845015
38502efe-c79f-4be6-afb3-72b038c3b961
BekaKavlelashvili/Algorithms
Exercise23/Exercise23.cpp
#include <bits/stdc++.h> using namespace std; //მოცმეულია A და B რიცხვი, თქვენი დავალებაა A-დან B-მდე დათვალოთ ბედნიერი რიცხვების რაოდენობა. //რიცხვს ეწოდება ბედნიერი თუკი ის 6-ნიშნა რიცხვია და მისი პირველი სამი ციფრის ჯამი უდრის ბოლო სამი ციფრის ჯამს. int main(){ int A, B; cin >> A >> B; int res = 0; ...
ALGO
0.999544
4.506448
0540ffb1-d784-45d0-b538-695e5d75236c
aryangupta9680/DSA-Solved-Questions
LeetCode/Construct_Binary_Search_Tree_from_Preorder_Traversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999996
6.295311
6bf4f4ea-acab-4ee5-9033-5ee732c99eb6
thefubit/projectLIFE
frameworks/js-bindings/cocos2d-x/cocos/base/CCConfiguration.cpp
#include "base/CCConfiguration.h" #include "platform/CCFileUtils.h" NS_CC_BEGIN extern const char* cocos2dVersion(); Configuration* Configuration::s_sharedConfiguration = nullptr; Configuration::Configuration() : _maxTextureSize(0) , _maxModelviewStackDepth(0) , _supportsPVRTC(false) , _supportsETC1(false) , _supp...
CONFIG
0.938311
6.165888
246476ec-66a0-469b-8327-5ebf445d71da
AST-TheCoder/CP-Solutions
CodeForces/GNU C++14/1566B | MIN-MEX Cut/128603807.cpp
#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; #define ll long long int #define pb push_back #define mp make_pair #define all(x) x.begin(),x.end() #define Max 100000000000000 #define min_heap priority_queue <ll, v...
ALGO
0.999974
4.39315
a8e8f732-3b5e-49e7-af2b-3201a6d87c59
Riku-li/Algorithms
FavoriteSeq.cpp
#include <iostream> #include <vector> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; vector<int> b(n); for (int i = 0; i < n; i++) { cin >> b[i]; } int left = 0, right = n - 1; while (left <= right) {...
ALGO
0.999844
4.44368
7ec47364-28ab-48d3-82ba-24f19927fa91
myscale/MyScaleDB
src/AggregateFunctions/AggregateFunctionMLMethod.cpp
#include "AggregateFunctionMLMethod.h" #include <IO/ReadHelpers.h> #include <IO/WriteHelpers.h> #include <Interpreters/castColumn.h> #include <Columns/ColumnArray.h> #include <Columns/ColumnTuple.h> #include <Common/FieldVisitorConvertToNumber.h> #include <Common/typeid_cast.h> #include <Common/assert_cast.h> #include...
TOOL
0.869603
6.860369
a4eee32b-5ff0-476f-93c9-4a32f139ef2d
Yaman-bot/leetcode
205-isomorphic-strings/205-isomorphic-strings.cpp
class Solution { public: bool isIsomorphic(string s, string t) { map<char,char>m,m1; int n=s.length(); if(n!=t.length()) return false; for(int i=0; i<n; i++){ if(m.count(s[i])==1){ if(m[s[i]]!=t[i]) return false; ...
ALGO
0.999974
5.885351
19f75a77-ac02-45cd-b6a2-6504765211e2
tanishqg5325/CodeChef
KATANA.cpp
#include <bits/stdc++.h> using namespace std; void fastscan(int &number) { register int c; number = 0; c = getchar(); for (; (c>47 && c<58); c=getchar()) number = number*10 + c - 48; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int n,k=0,ans=0; fastscan(n); ...
ALGO
0.999863
3.668098
b451db47-3fa5-4313-9156-ca041c55bad0
JessJess-Choi/ProblemSolving
백준/2749-피보나치 수3.cpp
#include <iostream> #include <vector> #define ll long long #define mat vector<vector<ll>> #define MOD 1000000 using namespace std; mat mul(mat a, mat b){ mat ret(a.size(), vector<ll>(b.size())); for(int i=0;i<a.size();i++) for(int j=0;j<b[0].size();j++) for(int k=0;k<b.size();k++) ...
ALGO
0.999993
4.071406
d10cb5c7-3b4e-4b6b-a06a-82c0f1e97fd2
amanjain44/DSA
13)Stack/display.cpp
#include<iostream> #include<stack> using namespace std; int main(){ // stack<int>st; // st.push(10); // st.push(20); // st.push(30); // st.push(40); // st.push(50); // stack<int>temp; // while(st.size()>0){ // cout<<st.top()<<" "; // int x = st.top(); ...
ALGO
0.999873
3.752177
efbd08f7-02e6-4d38-99aa-280475405146
Arrebol2020/AcWing
level1/Course2/Examples/AcWing664.cpp
#include <iostream> #include <cstdio> using namespace std; // 三角形 int main(){ double a, b, c; cin >> a >> b >> c; if(a + b > c and a + c > b and b + c > a) printf("Perimetro = %.1lf", a+b+c); else printf("Area = %.1lf", (a+b)*c/2); return 0; }
ALGO
0.999725
3.793323
88ca0ca4-4b30-46f2-b3a4-2dbaaedf5d77
SINGHxTUSHAR/DSA-SINGHxTUSHAR
Leetcode-Solutions/Middle_of_the_Linked_List.cpp
//Author: TUSHAR SINGH // Intuition: // Since middle ele is always n/2 + 1, so simply calculate the length of linked list and traverse in list and check for middle ele. // Approach: // * Calculate the length of linked list. // * middle ele will be n/2 + 1. // * Traverse in linked list till head != NULL. // * If the p...
ALGO
0.999985
6.40793
1b870ca7-33fe-4c4f-af0f-ed2d393d2554
Qeerser/Algorithm-Design
Midterm/Quiz1/2.1.cpp
#include<iostream> #include <vector> #include <bits/stdc++.h> using namespace std; void combi(int n,vector<int> &sol,int len , int k , int chosen,set<int> t,int &sum,map<int,vector<int>> date){ if(sol[len-1] )for (auto i : date[len-1]) if(!t.count(i))t.insert(i); if(chosen > sum)return; if (len < n && t.si...
ALGO
0.999858
3.785771
d36b76c4-609c-4071-b113-9ce8b20f4df2
VelvetOrg/3D-Game-Engine
Project/Deps/Include/BulletInverseDynamics/MultiBodyTree.cpp
#include "MultiBodyTree.hpp" #include <cmath> #include <limits> #include <vector> #include "IDMath.hpp" #include "details/MultiBodyTreeImpl.hpp" #include "details/MultiBodyTreeInitCache.hpp" namespace btInverseDynamics { MultiBodyTree::MultiBodyTree() : m_is_finalized(false), m_mass_parameters_are_valid(true), ...
ALGO
0.975147
6.481207
ad21c840-f741-4370-9c26-cae4d2105faf
chubelocchoc/NhapMonLapTrinh
Chuong01/Bai078/Bai078.cpp
#include <iostream> using namespace std; int main() { int x, n; cout << "Nhap x, n: "; cin >> x; cin >> n; int s = 1; int temp = x; for (int i = 1; i <= n; i++) { s += temp; temp *= x; } cout << "Ket qua S(" << x << "," << n << ") = " << s; return 1; }
ALGO
0.999972
4.158999
0a9fe8c8-7a35-4f01-ac2c-d53f4ccdaaff
ShawnTSH1229/XEngine
ThirdParty/boost_1_78_0/libs/graph/test/dfs_cc.cpp
#include <boost/concept_archetype.hpp> #include <boost/graph/depth_first_search.hpp> #include <boost/graph/graph_archetypes.hpp> int main() { using namespace boost; typedef default_constructible_archetype< sgi_assignable_archetype< equality_comparable_archetype<> > > vertex_t; { typ...
ALGO
0.931995
5.304609