uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
88d9a178-d953-4921-8650-39a6b7656b52
saepuddinm/tugas-pemrograman-c-sabtu
tugas-7/tugas mandiri 2 pertemuan 7.cpp
#include <stdio.h> int main() { int A[11]; int count = 0; int input; printf("Masukan 11 bilangan genap:\n"); while (count < 11) { scanf("%d", &input); if (input %2 == 0){ A[count] = input; count++; } } printf("Data dalam array A adalah:\n"); for (int i = 0; i< 11; i++) { if (i % 3 == 0 &&...
ALGO
0.990455
3.113461
ff3a602a-fac5-433b-8b7a-69a9026283bc
wsnewman/learning_ros
Part_5/cartesian_planner/src/example_arm7dof_cart_path_planner_main2.cpp
// example_arm7dof_cart_path_planner_main2: reverse path // wsn, July, 2016 // example using cartesian path planner to compute viable horizontal moves for arm7dof // choose: tool-flange z-axis pointing up, i.e. flange acts like platter // try to move horizontally along x axis, preserving orientation // e.g. to carry a...
ALGO
0.999505
4.240342
751812af-da93-43f1-9980-1f877657cb29
amineleghouil/LeetCode
0974-21-2799-count-complete-subarrays-in-an-array/0974-21-2799-count-complete-subarrays-in-an-array.cpp
class Solution { public: int countCompleteSubarrays(vector<int>& nums, int left = 0, int res = 0) { int k = unordered_set<int>(nums.begin(),nums.end()).size(); unordered_map<int, int> mpp; for (int i = 0; i < nums.size(); ++i) { mpp[nums[i]]++; while (mpp.size() == k...
ALGO
0.999914
6.249535
6522a1f3-6f8b-47c6-8ed7-75b8e42f2df0
BlaBlaHuman/huffman-coding-archiver
src/encoder.cpp
#include "encoder.h" #include "huffman_tree.h" #include <vector> #include <unordered_map> #include <string> #include <algorithm> #include <iostream> #include <stdexcept> std::size_t encoder::writeEncodedMessage(std::ofstream& os, std::ifstream& is, std::unordered_map<char, std::string>& table) { std::size_t bytes ...
TOOL
0.938461
6.239735
eae5a2ba-2ccc-46cf-b622-2539b079e3eb
raincross7/code-similarity
codes/train_code/problem098/problem098_336.cpp
#include<iostream> #include <climits> #include<vector> #include<list> #include<numeric> #include<algorithm> #include<string> #include<cmath> #include<set> #include<map> #include<stack> #include<queue> #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define REP(i,n) for(int i=0;i<(n);i++) using namespace std; typedef long l...
ALGO
0.999588
3.799856
267e6e90-96da-438e-9c59-e811534c51cb
EURO-KOLYAN/CnC_Generals_Zero_Hour
Generals/Code/Libraries/Source/WWVegas/WWLib/hash.cpp
/* $Header: /VSS_Sync/wwlib/hash.cpp 3 10/17/00 4:48p Vss_sync $ */ /*********************************************************************************************** *** Confidential - Westwood Studios *** ***************************************************...
ALGO
0.954048
6.212384
db4234a5-4424-4467-a030-e8f4116d468e
GustavSkou/LeetCode
Cpp/11. ContainerWithMostWater.cpp
#include <vector> using namespace std; class Solution { public: int maxArea(vector<int>& height) { int left = 0, right = height.size()-1, maxContainerSize = 0, containerSize; while(left < right) { containerSize = (right - left) * min(height...
ALGO
0.999905
6.690936
94fadee7-abdf-4a09-8b53-ccfc677d8c70
Soumojitshome2023/DSA-CPP-College-3rd-Sem
CPP Day 12 13 Oct 2023/stack_using_linked_list.cpp
#include <iostream> using namespace std; // ============================ Node ============================ struct Node { int data; struct Node *next; }; struct Node *top = NULL; // ============================ Push ============================ void push(int val) { struct Node *newnode = (struct Node *)mal...
ALGO
0.994035
4.614185
35f372c9-e4d6-4218-969a-9c90b0a7156a
Xilinx/llvm-aie
llvm/lib/CodeGen/PHIElimination.cpp
#include "llvm/CodeGen/PHIElimination.h" #include "PHIEliminationUtils.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/CodeGen/LiveInterval.h" #include "llvm/CodeGen/LiveIntervals.h" #include "llvm/CodeGen/LiveVariabl...
ALGO
0.999258
7.766791
1e684c8a-19d0-40f5-840e-8b6654d9bd8d
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_6160_3.cpp
#include <bits/stdc++.h> using namespace std; const long long N = 10000100; vector<int> v[30]; long long d[30] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97}; long long pri[4000100]; long long cnt; bool b[N]; long long n, m; long long power(long...
ALGO
0.999986
3.945507
61cb2628-6e67-40ed-ad99-a488517f6b3e
SlinkEEE/Oregon-State-Comp-Sci
162/Lab 7 - Circular Linked List/main.cpp
/********************************************************************* ** Program name: Circular Linked List ** Author: Devin Gendron ** Date: 2/25/18 ** Description: Use circular linked list to create a queue data struct. *********************************************************************/ #include <iostream> #inclu...
ALGO
0.908781
5.866639
022bcaa0-cb88-4498-bd8d-57a50fae5ad2
petio01bg/Estructura_de_Datos
CarnetPuntos2.cpp
// TAD CarnetPuntos #include <iostream> #include <cassert> #include <fstream> #include <string> #include <utility> #include <stdexcept> #include <sstream> #include <unordered_map> #include <unordered_set> #include <list> using namespace std; class CarnetPuntos { public: //O(1) CarnetPuntos() {} //O(1) void nuev...
TOOL
0.927033
5.250811
4eb8de16-983c-4c70-913b-1fb00f4bcc88
WaterWan/Second_One_Cpp
高精度计算/n的阶乘.cpp
#include<iostream> #include<string.h> using namespace std; int main(){ const int maxn = 50000; int n, c, k; int f[maxn + 1]; while(cin >> n){ memset(f,0,sizeof(f)); f[0] = 1; for(int i = 1; i <= n; i++){ c = 0; for(int j = 0; j <= maxn; j++){ int s = f[j] * i + c; f[j] = s % 10; c = s / 10...
ALGO
0.999874
3.801536
7ed34c1f-d564-4bd6-8cc9-c5e5e66dc912
someblue/ACM
hust/network/F/main.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <queue> using namespace std; typedef long long ll; typedef pair<int,int> pii; const int INF = 1e9; const double eps = 1e-6; const int maxn = 1000; int cas = 1; struct Edge{ int from,to,cap,flow; Edge() {} ...
ALGO
0.99983
3.579325
cb2ff60a-0287-4664-8f8c-4ac1d8acfb78
ishandutta2007/codeforces
sonechko/normal/998/D.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ff first #define ss second #define mp make_pair #define pb push_back const int N = 500 + 11; map<int,bool> mt[N]; ll n; ll ans=0; void rec(int l, int x) { if (mt[l][x]==1) return; mt[l][x]=1; if (l==n+1) {ans++; return;} rec(l...
ALGO
0.999718
3.969725
163b8de2-81b4-4193-9a1e-d1b2f221343e
exploreanand/DSA-Solutions
7_Reverse_Integer.cpp
#include <iostream> using namespace std; class Solution{ public: int reverse(int x){ int ans = 0; while (x!=0) { int digit = x%10; if (ans > INT_MAX/10 || ans < INT_MIN/10) { return 0; } ans = ans*10 + digit; ...
ALGO
0.999961
5.57773
0f38973f-2f42-43ba-ae76-ee07165572e8
rostislavYurievich/cpp-2023
2/src/1.ixx.cpp
module; #include <cmath> export module student_1bib21083.Lab2.Variant17.Task1; namespace RBPO::Lab2::Variant17::Task1{ double a(double i){ return std::pow(-1,i) * (i+1) / (std::pow(i,3)+1); } export double f1(double x){ return std::sqrt(std::pow(3*x+2,2)-24*x)/(3*std::sqrt(x)- 2/std::sq...
ALGO
0.999451
3.805824
1258f4eb-d531-435e-8198-cb0f15da4a45
dbdxnuliba/various_algorithms
MathAlgebra/fast_hadmard_transform.cpp
// // 添字 XOR 畳み込み (高速アダマール変換) // // verified: // ABC 212 H - Nim Counting // https://atcoder.jp/contests/abc212/tasks/abc212_h // #include <bits/stdc++.h> using namespace std; // Fast Hadamard Transform // N must be 2^K for some K namespace FastHadamardTransform { template<class T> void trans(vector<T> &v,...
ALGO
0.999918
4.912287
4387edf9-93d6-4c5a-a7af-53c056ee1be1
thegreatpeon/HackerRankChallenges
HackerRankChallenges/Day10.cpp
#include "Day10.h" void runDay10() { int input, biggest = 0, current = 0; std::vector<int> binary; std::cin >> input; while (input > 0) { binary.push_back(input % 2); input = input / 2; } for (int i = 0; i < binary.size(); i++) { if (binary[i] == 1) { current++; if (current > biggest) { ...
ALGO
0.999923
5.114054
871528df-95ab-4aa2-9e15-20bd8de9e132
ravi2320/GFG-POTD
385. Word Break.cpp
/* Word Break Difficulty: MediumAccuracy: 40.86%Submissions: 135K+Points: 4 You are given a string s and a list dictionary[] of words. Your task is to determine whether the string s can be formed by concatenating one or more words from the dictionary[]. Note: From dictionary[], any word can be taken any number of time...
ALGO
0.999837
7.029364
559b48ea-2105-4b77-bf4e-83ac8b25bbd6
gagandeepahuja09/Competitive-Programming-Contests
AtCoder/Beginner 142/F - Pure.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int #define N 1000001 int main() { ll n, m; cin >> n >> m; vector<vector<ll>> adj(n); for(int i = 0; i < m; i++) { int u, v; cin >> u >> v; adj[u - 1].push_back(v - 1); } vector<ll> ans; for(int i = 0...
ALGO
0.999995
4.008698
3060ff00-a46a-4e62-ad61-0ba031419d9c
SuperBigFive/Charming_XCPC
AtCoder/ABC/ABC260/B.cpp
#include <bits/stdc++.h> #define ll long long #define int ll #define vi vector <int> #define pii pair <int, int> #define pb push_back #define fir first #define se second using namespace std; const int maxn = 2e6 + 5; int n, x, y, z; struct stu{ int math; int eng; int tot; int sum; }people[maxn]; bool vis[maxn]; v...
ALGO
0.99997
3.246117
6b0d780d-c657-4cab-abf2-15d1e8be743c
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_test_88_10.cpp
#include <bits/stdc++.h> using namespace std; bool arraySortedOrNot(long long int arr[], long long int n) { if (n == 0 || n == 1) return true; for (int i = 1; i < n; i++) if (arr[i - 1] > arr[i]) return false; return true; } void solve() { long long int n; cin >> n; long long int a[n]; for (long long ...
ALGO
0.999873
4.94793
d54a6a44-f3a4-4fbb-876c-ef97f9b9b96f
TheParasiteProject/development
vndk/tools/header-checker/src/utils/config_file.cpp
#include "utils/config_file.h" #include <json/json.h> #include <llvm/Support/raw_ostream.h> #include <fstream> #include <map> #include <string> static const std::string GLOBAL_SECTION_NAME = "global"; namespace header_checker { namespace utils { static std::map<std::string, bool> LoadFlags(const Json::Value &secti...
CONFIG
0.971279
7.178522
468470bb-a6c9-4d74-8f36-959438565f1b
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_10433_9.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O2") using namespace std; long long dis(pair<long long, long long> a, pair<long long, long long> b) { return abs(a.first - b.first) + abs(a.second - b.second); } int main() { cin.tie(0); ios::sync_with_stdio(0); long long x0, y0, ax, ay, bx, by; cin >> x0 >> y0 >...
ALGO
0.999816
4.792204
2677579f-9b1d-4db9-8fe0-401dd9d96880
siraj-codes/My-All-Cpp-Programs
LAB_NUMBER_5/Question no-05(a).cpp
#include <iostream> using namespace std; int main() { int sum=0; for(int i=1;i<=10;i++) { sum+=i; cout<<sum<<"\t"; } return 0; }
ALGO
0.990644
3.533339
8746b331-995c-4bab-974b-7b810cfc90b9
harshrajhrj/code-with-enjoy
tree_problems/connect_nodes_v1.cpp
// Using level order traversal // Using pre order traversal #include <bits/stdc++.h> using namespace std; #define FOR(x, to) for (x = 0; x < (to); x++) #define FORI(x, to) for (x; x < (to); x++) #define FORR(x, arr) for (auto &x : arr) #define ALL(a) (a.begin(), a.end()) #define mem(a, n) memset(a, n, sizeof(a)) type...
ALGO
0.999925
5.17915
ff070fc7-3c6b-414e-8e5b-4006c05e0241
arronwelch/cplusplus
code/Essential C++ by Stanley B.Lippman/Chapter 2. Procedural Programming/2.7.cpp
// 2.7 Defining and Using Template Functions #include <iostream> #include <vector> #include <list> using namespace std; // void display_message(const string&, const vector<int>&); // void display_message(const string&, const vector<double>&); // void display_message(const string&, const vector<string>&); // // void...
TOOL
0.879953
5.377967
a68f6dff-c9f0-4602-b0d0-49c29b9ca1c0
Boltiten/Semester5
IDATT2101_DataAlgo/Oving5/Oppgave2.cpp
/** * Last = n inputs / m størrelse på tabell. * n = 10_000_000 * 10_000_000/0.75 = 12_500_000 = m. Finn et primtall eller toerpotens som er større og nære * * * Lag en array med tilfeldige tall * * */ #include <iostream> #include <list> #include <stdlib.h> #include <time.h> #include <chrono> #include <arra...
ALGO
0.992588
3.464515
4a97fe98-024f-49a4-9aca-577521c366e3
Team-PyRated/PyRated
Final/Dataset/B2016_Z5_Z3/student3386.cpp
/B16/17 (Zadaća 5, Zadatak 3) //Autotestovi by Enil Pajic (mail: <EMAIL>) //Za autotestove se obracati *iskljucivo* osobi koja ih pise #include <iostream> #include <cmath> #include <stdexcept> #include <initializer_list> #include <limits> #include <string> using std::string; using std::cout; class Razlomak { long ...
ALGO
0.851623
3.932589
e3a9acf4-a329-4f1e-b214-98f71e56af70
chaubey12/code_practice
epi_cpp/08_Searching/08_matrix_search.cpp
#include <iostream> #include <vector> #include <memory> #include <algorithm> using namespace std; bool MatrixSearch(const vector<vector<int>>& A, int x){ int row=0, col=A.size()-1; while(row < A.size() && col >= 0){ if(A[row][col] == x){ return true; }else if(A[row][col] < x){ ...
ALGO
0.999805
4.763707
0275d179-df7c-4067-9a48-d103610361be
Sumanth-NR/CompetitiveProgramming
Platforms/CodeForces/RandomProblems/A_Cut_Ribbon.cpp
#include <bits/stdc++.h> using namespace std; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); int n, a, b, c; cin >> n >> a >> b >> c; constexpr int INF = 1e9 + 7; vector<int> dp(n + 1, -INF); dp[0] = 0; for (int i = 1; i <= n; ++i) { if (i >= a) { ...
ALGO
0.999913
3.794544
ded89a9c-5343-408d-b2c6-261207d7095b
profornnan/Problem-Solving
BOJ/동적 계획법/12996-Acka.cpp
#include <iostream> #include <cstring> using namespace std; constexpr int MOD = 1'000'000'007; constexpr int MAX_S = 50; int dp[MAX_S + 1][MAX_S + 1][MAX_S + 1][MAX_S + 1]; int dfs(int s, int d, int k, int h) { if (d < 0 || k < 0 || h < 0) return 0; if (s == 0) return d == 0 && k == 0 && h == 0 ? 1 : 0; int...
ALGO
0.999827
4.83717
7c5c6df3-2025-4a5f-9469-6eec42d88d3d
muiruat/ProblemSolving
0x0F 정렬 II/시리얼 번호/my-solution.cpp
#include <iostream> #include <algorithm> using namespace std; string arr[50]; bool cmp(const string &a, const string &b) { if (a.length() != b.length()) return a.length() < b.length(); int aSum = 0; for (char c : a) if (c >= '0' && c <= '9') aSum += c - '0'; int bSum = 0;...
ALGO
0.999904
5.300341
d8cc1ece-5154-44c8-aeb6-7bcc25cd370a
NIRVANALAN/maze_stack
maze_stack/Source.cpp
#include <iostream> #include <stack> #include <algorithm> #include <string> using namespace std; int maze[100][100]; auto w = 0; auto h = 0; auto x = 0; auto y = 0; void print_maze() { cout << "your maze:" << endl; for (int i = 0; i <= w + 1; ++i) { for (int j = 0; j <= h + 1; j++) { cout << maze[i][j] << " ...
ALGO
0.99971
4.438366
ef51785e-6ccf-4127-a8c1-02bf78a963ca
Girdhar2/CodeforcesCodes
C_Little_Girl_and_Maximum_Sum.cpp
#include <bits/stdc++.h> #define vpll vector<pair<ll, ll>> #define pll pair<ll,ll> #define rep(i, n) for (ll i = 0; i < n; i++) #define forl(i, a, b) for(ll i=a;i<b;i++) #define vll vector<ll> #define ll long long #define ld double #define pb push_back #define mp make_pair #define ff first #define ss second #define re...
ALGO
0.999974
3.564994
f5aeb5b7-594d-42e4-a124-93a08fd4cac7
amanmeena14/POTD-solutions
gfg/29dec_2024.cpp
class Solution { public: vector<int> intersectionWithDuplicates(vector<int>& a, vector<int>& b) { // code here set<int> st; vector<int> res; for(int i=0;i<a.size();i++){ st.insert(a[i]); } for(int j=0;j<b.size();j++){ if(st.find(b[j])!=st.end...
ALGO
0.999729
5.027743
7b7d5e41-e42f-4a59-9965-d2cad779832e
ishandutta2007/codeforces
hollwoq_pelw/normal/1540/A.cpp
/* // is short or still long ??? hollwo_pelw's template(short) // Note : -Dhollwo_pelw_local */ #include<bits/stdc++.h> using namespace std; void FAST_IO(string filein = "", string fileout = "", string fileerr = ""){ if (fopen(filein.c_str(), "r")){ freopen(filein.c_str(), "r", stdin); freopen(fi...
ALGO
0.99995
4.070688
6576fe67-44f0-45d0-a5c0-bfac2b94ef3f
Naf-Second/Codeforces-Journey-using-CPP
Polycarp and the Day of Pi.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while(t--) { string pi = "31415926535897932384626433832795"; string n; cin >> n; int track = 0; for(int i=0;i<30;i++) { ...
ALGO
0.999847
3.94152
77cf52b1-8ba9-42c6-9378-d05d2e90e2d8
manya706/DSA-Codebase
Difficulty: Easy/DFS of Graph/dfs-of-graph.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: void dfs(int i, vector<int> adj[], int V, bool vis[], vector<int> &res) { if(vis[i]==true) return; vis[i]= true; ...
ALGO
0.99997
6.402256
52211161-a635-43f2-88a7-0de6d1057511
DevGithub007/My_Codes
sum vs xor1.cpp
#include<bits/stdc++.h> using namespace std; int main() { long long n,x,i,j,count=0; cin >>n; for(i=0;i<=n;i++) { if((n+i)==(n^i)) { // printf("%lld ",i); ++count; } } printf("%lld\n",count); return 0; }
ALGO
0.999912
3.559682
682fc7c1-1b4e-41d1-9e73-e6f72374592b
codepilgrimz/hyperNEAT
NE/HyperNEAT/Hypercube_NEAT/src/Experiments/HCUBE_XorCoExperiment.cpp
#include "HCUBE_Defines.h" #include "Experiments/HCUBE_XorCoExperiment.h" #ifdef EPLEX_INTERNAL using namespace NEAT; namespace HCUBE { XorCoExperiment::XorCoExperiment(string _experimentName,int _threadID) : Experiment(_experimentName,_threadID) {} NEAT::GeneticPopulation* XorC...
ALGO
0.970002
4.956572
4b816811-4d2a-49fd-b85e-74674b1cd5fb
Not-Helpful/ctfs
hxp2022/browser_insanity/kolibrios-7fc8595/contrib/sdk/sources/Mesa/mesa-9.2.5/src/gallium/drivers/r600/sb/sb_liveness.cpp
#include "sb_shader.h" #include "sb_pass.h" #define LIV_DEBUG 0 #if LIV_DEBUG #define LIV_DUMP(a) do { a } while (0) #else #define LIV_DUMP(a) #endif namespace r600_sb { bool liveness::visit(container_node& n, bool enter) { if (enter) { n.live_after = live; process_ins(n); } else { process_outs(n); n.live...
ALGO
0.91388
5.991225
61f51b07-1acc-4784-8599-fc9f778c8f25
luckzhangfengbo/Question_Bank
haoj/385海港.cpp
/************************************************************************* > File Name: 385海港.cpp > Author: > Mail: > Created Time: 三 10/14 19:53:34 2020 ************************************************************************/ #include <iostream> #include <vector> #include <algorithm> #include <map> #include <...
ALGO
0.99938
3.544257
acd77540-eb7e-4e25-97fa-b8500427d42c
proModeLife/InternPrep
CSES/Introductory_Problems/Apple_Division.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <cstring> #include <queue> #include <stack> #include <map> #include <set> #include <bitset> #include <iomanip> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); // Your ...
ALGO
0.999956
4.581361
163b742b-21d3-45a9-842f-65cf369b72c7
april211/AI_Learning
Project/Single-objective_optimization/6_2/test.cpp
#include <algorithm> #include <cstdlib> #include <ctime> #include <iostream> #include <random> #include <stack> #include <vector> const double PI = 3.1415926; int main() { double x = -0.52478; double fitness$ = 0.4 + (sin(PI * 4.0 * x) / (PI * 4.0 * x)) + 1.1 * (sin(PI * (4.0 * x + 2.0)) / (PI * (4.0 * x + 2...
ALGO
0.999504
3.677574
104c6b4c-690e-4623-a878-a5ba33b565a8
ProgramExecuter/LeetCode-Daily
03-May2022/10-CombinationSumIII.cpp
// Time Complexity - O(~9!) // Space Complexity - O(N) class Solution { public: void util(int &k, int n, vector<int> &curr, vector<vector<int>> &res) { if(curr.size() == k && n == 0) { // Found one of the result res.push_back(curr); return; } int ...
ALGO
0.999979
6.792737
e07b99bf-eb7f-4552-95a0-f2b8a1a24bfb
dorianjagusch/cpp_piscine
cpp09/ex02/src/vecSortPmergeMe.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* vecSortPmergeMe.cpp :+: :+: :+: ...
ALGO
0.999081
4.820493
31db94c4-74ff-417b-b9c7-13124be17d8d
131e55/VSBlock
VSBlock/cocos2d/cocos/base/ccUtils.cpp
#include "base/ccUtils.h" #include <stdlib.h> #include "base/CCDirector.h" #include "renderer/CCCustomCommand.h" #include "renderer/CCRenderer.h" #include "platform/CCImage.h" #include "platform/CCFileUtils.h" NS_CC_BEGIN int ccNextPOT(int x) { x = x - 1; x = x | (x >> 1); x = x | (x >> 2); x = x | ...
TOOL
0.941637
6.246926
731c8554-3981-47bc-af5b-f9e120973d86
muskangupta3356/MyLeetCode
17-letter-combinations-of-a-phone-number/17-letter-combinations-of-a-phone-number.cpp
class Solution { public: void helper(int index, int n,string digits,vector<string> &res,unordered_map<char,vector<char>> &mp, string temp) { if(index==n) { res.push_back(temp); } char d = digits[index]; vector<char> values = mp[d]; for(char c : value...
ALGO
0.999959
6.832743
b815cc60-7903-46e6-806f-04fe4d9944a9
mihesow/c-introduction
1dimesionarray.cpp
#include <iostream> using namespace std; int main () { int arr[5] = {10,20,30,40,50};//declaring and initializing array C++ //Accessing each variable cout<<arr[0]<<endl; }
ALGO
0.978498
3.091501
98bfd428-4e1f-4cbc-898a-2a4af67b5ec8
efeslab/nvm-file-indexing
api/p-hot/boost_1_73_0/libs/icl/example/partys_height_average_/partys_height_average.cpp
/** Example partys_height_average.cpp \file partys_height_average.cpp \brief Using <i>aggregate on overlap</i> a history of height averages of party guests is computed. In partys_height_average.cpp we compute yet another aggregation: The average height of guests as it changes over time. This is...
ALGO
0.963911
6.924452
7ad6f94e-f706-4abf-bff0-b888068b44b4
itsrahulhere/DSA
Binary Tree/13. Height (Maximum Depth) in BT.cpp
//Problem: https://practice.geeksforgeeks.org/problems/height-of-binary-tree/1/ int height(struct Node* node){ if(!node) return 0; return 1 + max(height(node->left), height(node->right)); }
ALGO
0.999757
5.945446
d4136c42-bb0d-4cab-9386-0b8a3ca3356b
jylkkakai/idle-game
src/Game.cpp
#include "Game.h" #include "Enemy.h" #include "Weapon.h" #include "raylib.h" #include "raymath.h" #include <iostream> // #include <random> // #include <time.h> static float checkTowerCollision(const Tower &tower, std::vector<Enemy> &enemies) { float dp = 0; for (auto &enemy : enem...
TOOL
0.871468
4.762933
70758c28-396d-452c-aab7-f48f30e5d7fb
Tithi-Paul/Problem_solving
class test 3.cpp
#include<stdio.h> #include<math.h> #include<string.h> int main() { char n[1000]; int num,i,result,j; double sum, l; while(scanf("%s", n)!=EOF) { l=strlen(n); sum=0; for(i=0; i<l; i++){ sum=sum+pow(n[i]-'0' , l); } result=0; for(j=0; j<...
ALGO
0.999912
3.975341
ac1dbba8-067e-42ff-a828-e2af15383a7b
vysh112/MIT-Manipal-IT-Lab-2023
Algorithms AL Lab/selectionsort.cpp
#include <iostream> using namespace std; int c=0; void swap(int *xp, int *yp) { int temp = *xp; *xp = *yp; *yp = temp; } void selectionSort(int arr[], int n) { int i, j, min_idx; c++; for (i = 0; i < n-1; i++) { c++; c++; min_idx = i; for (j = i+1; j < n; j++) ...
ALGO
0.999798
3.809686
ba4263e3-ad8f-42e6-96b9-448c34262dea
abdullah-621/LeetCode
144-binary-tree-preorder-traversal/binary-tree-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.999976
6.355296
7e32f49b-66ae-4b0d-b29f-e627a6f25557
Mo-yang22/CMU-15445-2022fall
src/optimizer/optimizer.cpp
#include "optimizer/optimizer.h" #include <optional> #include "common/util/string_util.h" #include "execution/plans/abstract_plan.h" namespace bustub { auto Optimizer::Optimize(const AbstractPlanNodeRef &plan) -> AbstractPlanNodeRef { if (force_starter_rule_) { // Use starter rules when `force_starter_rule_` is...
ALGO
0.883289
7.865147
7385d262-91f5-41f2-bba0-1ff2fe9dcf1f
utk1725/My-code
Kthancestor.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node* left; Node* right; Node(int data){ this -> data = data; left = NULL; right = NULL; } }; bool kthancestor(Node* root, int k,Node* p){ //base case if(root == NULL) return false; if(...
ALGO
0.999989
3.597095
771a1100-a290-435f-a64c-86a733863745
Gagandeepkhalsa/Leetcode-Problems-
2720-minimize-the-maximum-difference-of-pairs/minimize-the-maximum-difference-of-pairs.cpp
class Solution { public: int minimizeMax(vector<int>& nums, int p) { ranges::sort(nums); int l = 0; int r = nums.back() - nums.front(); while (l < r) { const int m = (l + r) / 2; if (numPairs(nums, m) >= p) r = m; else l = m + 1; } return l; } private:...
ALGO
0.999901
6.158124
006ce44f-27b5-4b22-81d5-eac5287d680c
milindgoel15/C-CPP
DAY 2/table.cpp
#include <stdio.h> int main() { int number; printf("Enter your number to get the table: "); scanf("%d", &number); printf("The table of %d is: \n", number); for (int i = 0; i <= 10; i++) { printf("%d x %d = %d\n", number, i, (number*i)); } }
TOOL
0.855417
3.958558
a39d4753-a609-4db6-9a86-5018f0fb931d
onora-hbl/fall-challenge-2023
first_basic_algo_top100.cpp
#include <iostream> #include <string> #include <vector> #include <list> #include <algorithm> #include <map> #include <math.h> #include <set> using namespace std; #define LEFT_MIDDLE 2000 #define RIGHT_MIDDLE 8000 #define TOP_LIMIT 2500 #define TOP_MIDDLE 3750 #define MID_LIMIT 5000 #define MID_MIDDLE 6250 #define BO...
TOOL
0.887883
3.644736
af567ee0-2e4f-4830-b0a2-9f1ca895cbb4
YeongTaek4723/AlogrithmStudy
6week/10026.cpp
#include<iostream> #include<queue> #include<algorithm> using namespace std; queue<pair<int, int>> q; int n; char map[101][101]; int visit[101][101] = { 0, }; int dx[4] = { 1, 0, 0, -1 }; int dy[4] = { 0, 1, -1, 0 }; void init_visit() { for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { visit[i][j] ...
ALGO
0.999136
3.940354
b6f19d86-61c7-4d1d-82ea-1d17e887a408
CarlosDaniel111/competitive-programming
Codeforces/Div/Curso Berzerk/K. Conan and Agasa play a Card Game.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using pi = pair<int, int>; using vi = vector<int>; #define pb push_back #define SZ(x) ((int)(x).size()) #define ALL(x) begin(x), end(x) #define FOR(i, a, b) for (int i = (int)a; i < (int)b; ++i) #define ROF(i, a, b) for (int i = (int)a - 1; i >= (int...
ALGO
0.999708
4.710069
c1504cc2-b014-4d82-a401-6ffa5e4d136a
Jan-Malinowski/USACO
silver/milk_visits.cpp
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; #define rep(i, n) for(int i=0; i<n; i++) const int _ = 1e5; vector<int> adj[_], farm(_), comp(_); bool visited[_]; int curComp; void dfs(int node){ if(visited[node]){ return; } comp[node]=curComp; ...
ALGO
0.999907
4.143952
c8ff606f-bdef-4a07-a2ec-51b31fff4660
h-jch/cppprimer-5th-edition
3/3_14.cpp
#include <iostream> #include <vector> using namespace std; int main(){ vector<int> v; int n; while(cin>>n) v.push_back(n); for(auto i:v) cout << i << " "; cout << endl; return 0; }
ALGO
0.992307
3.506269
10c8950e-fb31-442c-aee5-f99061e319a9
sinigr54/DesignPatterns
behavioral/classic_visitor.cpp
// // Created by Alexander Chekh on 06.09.2018. // #include "behavioral.h" /* * Classic Visitor (Double Dispatch) */ #include <iostream> #include <sstream> using namespace std; namespace classic_visitor { struct DoubleExpression; struct AdditionExpression; struct SubtractionExpression; struct Expressio...
TOOL
0.911694
7.522237
e32e32f1-2000-47d1-a289-abe364bf6623
danache/coding
leetcode/leetcode496/leetcode496/main.cpp
#include <iostream> #include <vector> #include <stack> #include <map> using namespace std; vector<int> nextGreaterElement(vector<int>& findNums, vector<int>& nums) { vector<int> res; stack<int> sta; map<int,int>mp; if(findNums.size() == 0) return res; sta.push(nums[0]); for(int i = 1; i ...
ALGO
0.99986
4.91765
77941b63-9e56-4c79-b73f-8102ec5712fd
smhx/dmoj
christmas_cards/main.cpp
#include <cstdio> #include <algorithm> #define MAXN 5005 #define INF 1000000000000000LL typedef long long ll; using namespace std; int N; ll c[MAXN], d[MAXN], dp[MAXN][MAXN]; int main() { scanf("%d", &N); for (int i = 0; i < N; ++i) scanf("%lld%lld", c+i, d+i); for (int i = N-1; i >= 0; --i) { for (int j = N-1; ...
ALGO
0.999941
3.443424
1a36cc51-fcd2-4f60-af1c-85a33f8363d7
jesuswr/cp-codes-and-problems
K.kings_colors.cpp
#include <iostream> #include <vector> #include <queue> #include <stack> #include <algorithm> #include <math.h> #include <string> #include <cstring> #include <set> #include <map> #include <unordered_map> #include <assert.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<int, pair<i...
ALGO
0.999968
3.952489
275d1015-b1b7-4995-a66f-8ebda7e4d8c3
raincross7/code-similarity
codes/train_code/problem456/problem456_381.cpp
#include<bits/stdc++.h> using namespace std ; typedef long long ll ; void solve(){ int n ; cin>>n ; int arr[n] ; unordered_map<int,int> mp ; for(int i=0;i<n;i++){ cin>>arr[i] ; mp[arr[i]]=i+1 ; } for(int i=0;i<n;i++){ cout<<mp[i+1]<<" " ; } } int main(){ int y ; y=1 ; //cin>>y ; while(y--)...
ALGO
0.999915
3.936351
7e6581f3-f48a-45b2-b84f-232724e61063
kimjihyo/daily-coding-challenge
boj/15681/solution.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; int n, r, q; vector<vector<int>> adj; vector<int> sizes; vector<bool> visited; int countNumberOfSubtreeNodes(int root) { visited[root] = true; int n = 1; for (auto u : adj[root]) { if (!visited[u]) { n += countNumberOfSubt...
ALGO
0.999944
4.670622
f2c41401-1650-4f70-a373-e310386d3dc4
ajaysoni12/Striver_AtoZ_DSA_Sheet
Step11 - Dynamic Programming/DP18-cntSubsetWithGivenDiff.cpp
#include <bits/stdc++.h> using namespace std; int f2(int ind, int tar, vector<int> &arr, vector<vector<int>> &dp) { // base case if (ind == 0) { if (tar == 0 && arr[0] == 0) return 2; if (tar == 0 || arr[0] == tar) return 1; return 0; } if (dp[ind][t...
ALGO
0.999935
5.378102
6e877c8a-9ec8-4906-8ac5-775f0d97d928
Jay7221/competitve-programming
codeforces/normal_rounds/Round810/C.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long void solve(){ ll n, m, k; cin >> n >> m >> k; vector<ll> a(k); for(int i = 0; i < k; ++i){ cin >> a[i]; } vector<ll> columns(k); for(int i = 0; i < k; ++i){ columns[i] = a[i] / n; } ll tmp = 0; for(auto col : columns){ if(col > 1){ tm...
ALGO
0.999659
3.65574
a017debc-63c1-4af1-8b35-12fdc4ae9b3d
NidhiSahu2/DATA-STRUCTEURE-ALGORITHM-Cpp-GFG-PROBLEM-
impqu.cpp
#include<iostream> #include<map> using namespace std; void revresestr(string& str) { int n =str.length(); for(int i=0 ;i<n/2; i++) { swap(str[i],str[n-i-1]); } } int main() { string str = "nidhi"; revresestr( str); cout<<str; return 0; }
ALGO
0.999542
3.916648
fe1c5053-3f3f-4364-927f-286deb422e21
realwecan/person_detection_voc2012
py-faster-rcnn/caffe-fast-rcnn/examples/cpp_classification/classification.cpp
#include <caffe/caffe.hpp> #ifdef USE_OPENCV #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> #endif // USE_OPENCV #include <algorithm> #include <iosfwd> #include <memory> #include <string> #include <utility> #include <vector> #ifdef USE_OPENCV using names...
DATA
0.945007
7.697945
d94f319b-cf13-451e-8020-3f5b78110df8
EoinDavey/Competitive
Kattis/Swap_To_Sort.cpp
#include<bits/stdc++.h> using namespace std; const int MX_NK = 1000*1000+2; int p[MX_NK]; int N,K; int find(int i){return p[i] = (p[i]==i ? i : find(p[i]));} int join(int a, int b) { p[find(a)]=find(b);} int main(){ for(int i = 0; i < MX_NK; ++i) p[i]=i; scanf("%d %d",&N,&K); int a,b; while(K-...
ALGO
0.999995
4.072937
091f646e-dc09-4d0f-a8b5-982f748a18e8
sgeektn/N1K0M3K-ransomware
cryptopp/xtrcrypt.cpp
// xtrcrypt.cpp - originally written and placed in the public domain by Wei Dai #include "pch.h" #include "asn.h" #include "integer.h" #include "xtrcrypt.h" #include "nbtheory.h" #include "modarith.h" #include "argnames.h" NAMESPACE_BEGIN(CryptoPP) XTR_DH::XTR_DH(const Integer &p, const Integer &q, const GFP2Elemen...
ALGO
0.993542
6.184609
2a3de21d-d698-4f7b-b346-0e6e2c321210
belmix/zen
src/coins.cpp
#include "coins.h" #include "memusage.h" #include "random.h" #include "version.h" #include <assert.h> /** * calculate number of bytes for the bitmask, and its number of non-zero bytes * each bit in the bitmask represents the availability of one output, but the * availabilities of the first two outputs are encoded...
TOOL
0.926156
7.023859
42ce1d23-c69e-43bc-ad3d-9230e75e6e0b
duocnguyen6799/remove_emoji_input_formatter
example/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.998771
6.797273
d8447217-7957-4bf0-9710-46f824533638
gen-gematogen/leetcode_tasks
48.cpp
class Solution { public: void rotate(vector<vector<int>>& matrix) { int n = matrix.size(); for (int i = 0; i < n; ++i){ for (int j = i; j < n - i - 1; ++j){ int tmp1, tmp2; tmp1 = matrix[j][n - i - 1]; matrix[j][n - i - 1] = matrix[i][j];...
ALGO
0.999979
6.307176
48ef0b68-8484-44a1-899c-e06f29d98314
randbatch-md/gromacs-rbe
src/gromacs/mdlib/energydrifttracker.cpp
/*! \internal \file * \brief Implements functions from the EnergyDriftTracker class. * * \author Berk Hess <<EMAIL>> * * \ingroup module_mdlib */ #include "gmxpre.h" #include "energydrifttracker.h" #include <cmath> #include <string> #include "gromacs/utility/gmxassert.h" #include "gromacs/utility/real.h" #inc...
TOOL
0.940943
7.202731
2288ddd3-7d71-4121-b946-cb3658af9658
ehrustanovic9/Programiranje-I
Zadaci_2/Zadatak_2_X1.cpp
#include < iostream > using namespace std; bool f(int); bool g(int, int); int main() { int n, d, c = 0; do { cout << "Unesite n: "; cin >> n; } while (n < 100 || n>1000); do { cout << "Unesite d: "; cin >> d; } while (d < 0 || d>9); for (int i = 2; i <= n; i++) { c += f(i) * g(i, d); } ...
ALGO
0.993446
4.147859
acae9dbb-9178-4f5d-8fb4-9cf83358afeb
vfolunin/archives-solutions
EOlymp/4459.cpp
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <set> #include <map> #include <string> using namespace std; void printPath(vector<pair<int, int>> &from, int start, int finish) { vector<int> path; for (int v = finish; v != start; v = from[v].first) path.push_back(fro...
ALGO
0.999855
4.288098
3b5e1274-300a-4dbe-bce5-d2093055213e
szrr/GPUANNsIndex_GDS
anns/bam_2.19/include/freestanding/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/ctor_iter_iter_comp.pass.cpp
// <queue> // template <class InputIterator> // priority_queue(InputIterator first, InputIterator last, const Compare& comp); #include <queue> #include <cassert> #include <functional> #include <cstddef> #include "test_macros.h" int main(int, char**) { int a[] = {3, 5, 2, 0, 6, 8, 1}; int* an = a + sizeof(...
TEST
0.938812
5.00913
dc35cb35-1358-4abd-b7d4-8fa14bfa7e21
chandra71/CPP-DSA
Recursion/ArrayReversal.cpp
#include<bits/stdc++.h> using namespace std; void ReverseArray(int i, int arr[], int n){ if(i>=n/2) return; swap(arr[i], arr[n-i-1]); ReverseArray(i+1, arr, n); } int main(){ int n; cin>>n; int arr[n]; for(int i = 0; i<n; i++) cin>>arr[i]; ReverseArray(0, arr, n); for(int i = 0; ...
ALGO
0.99998
4.582458
2c9b9cf9-b7b8-4df2-9ea1-aee3a11a1c74
mar-ina-17/UP
task1.6.cpp
#include "iostream" #include "math.h" using namespace std; int main(){ double a,b,c,D,x1,x2; cout<<"a:, b:,c:"<<endl; cin>>a; cin>>b; cin>>c; D= b*b-(4*a*c); cout<<"D= "<<D<<endl; if(D>0) { x1=(-b+sqrt(D))/2*a; x2=(-b-sqrt(D))/2*a; cout<<"rounded x1= "<<round(x1)<...
ALGO
0.99978
4.063405
85eeb861-1a1e-479d-9624-c196d3915bd9
anaypaul/LeetCode
SetMismatch.cpp
//Approach 1 class Solution { public: vector<int> findErrorNums(vector<int>& nums) { unordered_set<int> us; int rep = -1; for(auto x: nums){ if(us.find(x)== us.end()){ us.insert(x); }else{ rep = x; } } int lo...
ALGO
0.999916
6.195132
2eb021c1-d262-4f39-992b-97224e35894e
sasha1508/cpp1
Основы C++/cpp1_DZ5/Zadacha_5/Zadacha_5.cpp
// ** Написать функцию, которой передается не пустой одномерный целочисленный массив, // она должна вернуть истину если в массиве есть место, в котором сумма левой и правой части массива равны. // Примеры: checkBalance([1, 1, 1, || 2, 1]) → true, checkBalance([2, 1, 1, 2, 1]) → false, // checkBalance([10, || 1, 2, 3,...
ALGO
0.998649
4.743733
22908b6a-fca4-422b-9392-ef0519dd7d59
dtkien205/TRR2-PTIT
Review/Prim.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' int n, s; vector<pair<int, int>> adj[105]; bool used[105]; void prim(int s) { vector<tuple<int, int, int>> MST; int d = 0; used[s] = true; while (MST.size() < n - 1) { int min_w = 1e9, u, v; for (int ...
ALGO
0.999942
3.294832
5c9cedcf-9354-46f4-8dd6-66c9bdb21b9d
ttumppi/ThirdPersonTutorial
Source/ThirdPersonTutorial/Vector2DWithMinMax.cpp
#include "Vector2DWithMinMax.h" #include "MinMaxSpan.h" #include "vector" #include "GlobalMutexFunctions.h" Vector2DWithMinMax::Vector2DWithMinMax(double x, double y, const std::vector<MinMaxSpan>& spanX, const std::vector<MinMaxSpan>& spanY) { _x = x; _y = y; _spanX = spanX; _spanY = spanY; } Vector2DWithMinM...
TOOL
0.940808
6.286765
6969dce7-5d40-4d4c-ae38-0f0cafafe544
krishna25092005/ACC45DAYSOFCODE-2024
Day 37/Convert Sorted Array to Binary Search Tree.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.999997
7.373276
a8d381f7-31be-4a7b-98ec-e1f24e787d68
AveesLab/carla-truck-application
tracking/object_tracking_ros2/src/eigen3/bench/spmv.cpp
//g++-4.4 -DNOMTL -Wl,-rpath /usr/local/lib/oski -L /usr/local/lib/oski/ -l oski -l oski_util -l oski_util_Tid -DOSKI -I ~/Coding/LinearAlgebra/mtl4/ spmv.cpp -I .. -O2 -DNDEBUG -lrt -lm -l oski_mat_CSC_Tid -loskilt && ./a.out r200000 c200000 n100 t1 p1 #define SCALAR double #include <iostream> #include <algor...
ALGO
0.990284
4.293816
63109f66-816f-4b01-825d-fe7c0487be77
theGateway1/DSA
DSA - Revision/Array/(A++) Find Missing and duplicate/(A+++) Find duplicate.cpp
//1. When modifying given input is allowed use swap sort vector<int> repeatedNumber(vector<int> &nums) { int i=0, n = nums.size(); vector<int> res(2,0); while(i<n){ if(nums[i] != nums[nums[i]-1]) swap(nums[nums[i]-1], nums[i]); else i++; } f...
ALGO
0.999915
5.586957
149b1aa1-8e39-41d7-8a95-552cf51ef20d
viishalvermaa/Leetcode
779-k-th-symbol-in-grammar/779-k-th-symbol-in-grammar.cpp
class Solution { public: int kthGrammar(int n, int k) { int mid=pow(2,n-1)/2; if(n==1 && k==1) return 0; if(k<=mid) return kthGrammar(n-1,k); else return !kthGrammar(n-1,k-mid); } };
ALGO
0.999982
6.042017
5076c866-7d13-47f4-bf68-4720277ce935
paandahl/tripfinger-ios
3party/osrm/osrm-backend/data_structures/coordinate_calculation.cpp
#include "coordinate_calculation.hpp" #include "../util/mercator.hpp" #include "../util/string_util.hpp" #include <boost/assert.hpp> #include <osrm/coordinate.hpp> #include <cmath> #include <limits> namespace { constexpr static const float RAD = 0.017453292519943295769236907684886f; // earth radius varies between...
ALGO
0.995926
6.733527
ab13a6ed-ca74-404d-968c-ddbaa71ba0e1
SaulinTuhin/LeetCode
Cpp/Problem_70.cpp
#include <iostream> using namespace std; // Problem - 70: https://leetcode.com/problems/climbing-stairs/ // C++ Solution! class Solution { public: int climbStairs(int n) { int prev = 1, prev_prev = 1; for (int i = 1; i < n; i++) { int temp = prev; prev += prev_prev; ...
ALGO
0.999907
5.664252
9da948fb-e6fd-4155-9b1b-82e91bcef23f
BrunoBReis/c-cpp-study
UnB/Nilton/Labs/Lab2/ex4/main.cpp
#include <iostream> using namespace std; // Functions bool inclusao(float *pvalores, float pv, int pcapacidade, int &ptamanho); void vector_size(int capacidade, float *valores); int main() { // definindo as caracteristicas do vetor float *valores; int capacidade = 10, tamanho = 0; valores = new floa...
ALGO
0.967814
4.866475
82a292ae-c2f0-40ce-bad9-9e98350fc3b7
Nakib-Arman/CSE318---ArtificialIntelligence
4.DecisionTree/.history/a_20250709204808.cpp
#include<bits/stdc++.h> using namespace std; class Node { int column_num; string label; unordered_map<string,Node*> children; float threshold; public: Node(int column_num){ this->column_num = column_num; this->label = ""; this->threshold = 0; } Node(string labe...
ALGO
0.996825
4.974736
b3226b01-499b-4e10-9ace-aff87cb076c9
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_12334_13.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 2000 + 100; string s[maxn]; int n, m; queue<pair<int, int> > q; int d[maxn][maxn] = {}; pair<int, int> mt[maxn][maxn]; int sz = 0, sz2 = 0; bool mark[maxn][maxn]; void f(int i1, int j1, int i2, int j2) { mark[i1][j1] = mark[i2][j2] = true; mt[i1][j1] = ...
ALGO
0.999989
3.486167