uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
0383397e-d081-43be-b8d4-0e0c78b629a9
ishandutta2007/codeforces
hank55663/normal/1133/F1.cpp
#include<bits/stdc++.h> //#include<bits/extc++.h> using namespace std; //using namespace __gnu_pbds; //typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> set_t; #define mp(a,b) make_pair((a),(b)) #define pii pair<int,int> #define pll pair<LL,LL> #define pdd pair<double,double> #define p...
ALGO
0.999994
3.666232
5410eba9-03d3-4a2b-8578-f7701524531f
it5prasoon/DSAlgo-n-CP
DSA/6 Graphs/8_Detect_cycle_directed_graph.cpp
#include <iostream> #include <vector> int main() { int V, E; int x, y, w; std::cin >> V >> E; std::vector <std::vector <std::pair <int, int> > > graph_directed(V); std::vector <std::vector <std::pair <int, int> > > graph_undirected(V); for(int i = 0; i < E; i++) { std::cin >> x...
ALGO
0.999814
4.630347
1b5883bf-df9f-4e5d-8d04-783076b837e6
nirajbasnet/Unscented-Kalman-Filter-for-Tracking-Moving-Objects
src/main.cpp
#include <fstream> #include <iostream> #include <sstream> #include <vector> #include <stdlib.h> #include "Eigen/Dense" #include "ukf.h" #include "ground_truth_package.h" #include "measurement_package.h" #include "matplotlibcpp.h" #include <cmath> namespace plt = matplotlibcpp; using namespace std; using Eigen::Matrix...
DATA
0.930075
5.302376
197838ea-4f1f-41dc-a94a-8a182b1fc736
FatematujJohra/C-
file_3.cpp
#include<bits/stdc++.h> using namespace std; int main() { vector<string> uid={"A","B","A","C","D","B","D"}; vector<int> balance={10,20,10,30,15,10,20}; map<string,int>result; for(size_t i=0;i<uid.size();i++) { result[uid[i]]+=balance[i]; } cout<<"A="<<result["A"]<<endl; cout<<"B=...
ALGO
0.991389
4.080278
eccabf1d-f883-4e76-b774-022f67e38b16
coderkedarxp/HackerRank_Accepted_Solutions_CPP
Conditional_Statements.cpp
#include <iostream> using namespace std; int main() { int n; cin>>n; if(n>=1 && n<=9) { if(n==1) cout<<"one"; else if(n==2) cout<<"two"; else if(n==3) cout<<"three"; else if(n==4) cout<<"four"; else if(n==5) cout<<"five";...
ALGO
0.967429
3.770919
704933b9-4834-469a-bac6-08052d7eb1f7
BhuvanaChandraP/IPMP
week_3/22_sum_of_ll.cpp
#include <bits/stdc++.h> using namespace std; struct Node{ int data; Node* next; Node(int x){ data=x; next=NULL; } }; void printlist(Node *head){ Node *curr=head; while(curr!=NULL){ cout<<curr->data<<" "; curr=curr->next; } } Node* Sum(Node *h...
ALGO
0.99995
4.725681
4069d68d-222d-4426-b3a5-1df6e5a69676
PrinceCuet77/LeetCode
53 Maximum Subarray.cpp
class Solution { public: int maxSubArray(vector<int>& nums) { int a = nums[0], sum = 0; for ( int x : nums ) { sum += x; a = max(sum, a); sum = max(sum, 0); } return a; } };
ALGO
0.999892
6.20179
cd1a1b0a-a6b8-40fe-b755-37b003d187ae
shubham-goyal-0811/100Days2.0
day 35/Leetcode 2433 Find The Original Array of Prefix Xor.cpp.cpp
class Solution { public: vector<int> findArray(vector<int>& pref) { int n=pref.size(); if(n==1) return pref; vector<int> ans; ans.push_back(pref[0]); for(int i=0;i<n-1;i++){ ans.push_back(pref[i]^pref[i+1]); } return ans; } };
ALGO
0.999993
5.218014
d3333cb2-5e70-4f39-bdb2-7c607b2152ab
geekylearner-03/Leetcode_solutions
1-two-sum/two-sum.cpp
class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { // vector<int> ans; // for(int i = 0; i < nums.size(); i++) { // for(int j = i + 1; j < nums.size(); j++) { // if((nums[i] + nums[j]) == target) { // ans.push_back(i); // ...
ALGO
0.999825
6.229011
06837234-f2cc-4499-a4b4-1734d3e6caa8
yuanjielu-64/barn_challenge_lu
src/Components/TourGeneratorPDDL.cpp
#include "Components/TourGeneratorPDDL.hpp" #include "Utils/Misc.hpp" #include <fstream> namespace Antipatrea { bool TourGeneratorPDDL::GenerateTour(Tour &tour) { const int n = GetNrSites(); if(n == 0) return false; if(n == 1) { tour.m_order.clear(); tour.m_order.push_back(0); return FromOrde...
ALGO
0.962453
4.926154
e9dc2100-d1ce-4114-8454-2d08d2ffea17
Rishi-T2408/Leetcode-Questions
120-triangle/120-triangle.cpp
class Solution { public: int t[1001][1001]; int Solve(int i,int m,vector<vector<int>> &triangle) { if(m==(triangle.size()-1)) { if((i+1)<triangle[m].size()) return min(triangle[m][i],triangle[m][i+1]); else{ return triangle[m][i]; ...
ALGO
0.999992
6.140956
b1c86dbe-685e-470d-ba0d-b1916e8c192c
alexfp95/Advanced-Algorithms-and-Data-Structures
AVL Tree Implementation/main2.cpp
#include "ArbolAVL.h" #include "contador.h" #include "dni.h" #include <cstdio> #include <iostream> using namespace std; Contador DNI::Comparaciones; int main (void) { int N, P; int error=1; cout << "Algoritmos y Estructuras de Datos Avanzadas" << endl; cout << "Practica 7. Arboles AVL. Modo estadisticas....
ALGO
0.997547
3.847547
8a68d6ae-c936-4636-9c57-830ccebb726c
AlanBui1/Competitive-Programming-Solutions
coci14c4p4.cpp
#include <bits/stdc++.h> using namespace std; double n, x, flow[1005][1005], amt[1005], want[1005]; bool super[1005][1005], t; int a, b; vector <pair <int, double>> graph[1005]; double sq(double y){ return y*y; } void dfs(int curNode, int prevNode, double curFlow){ amt[curNode] = curFlow; // cout << curN...
ALGO
0.999938
4.094156
ed67ff92-3856-4e2d-944b-b007e727b18a
XingyuWang-Veronica/587-final-project
NQueens_MPI.cpp
#include "mpi.h" #include "omp.h" #include <iostream> #include <queue> using namespace std; int main(int argc, char * argv[]) { if (argc < 2) { cerr << "Format: <exe> <N>\n"; return 1; } int p, id, provided; // MPI_INIT(&argc, &argv); MPI_Init_thread(&argc, &argv, MPI_THREAD_MULTIPLE, &provided); ...
ALGO
0.999949
3.767869
a6dc2954-08ad-4dc6-bf3e-c1d0a6447f76
xianggao2012/TetrisEvolution
cocos2d/cocos/math/CCAffineTransform.cpp
#include "math/CCAffineTransform.h" #include <algorithm> #include <math.h> using namespace std; NS_CC_BEGIN AffineTransform __CCAffineTransformMake(float a, float b, float c, float d, float tx, float ty) { AffineTransform t; t.a = a; t.b = b; t.c = c; t.d = d; t.tx = tx; t.ty = ty; return t; } Vec2 __CCPoint...
TOOL
0.910351
6.373181
f953a9db-729f-4ec3-8b59-a5fd9a908e25
sarvex/leetcode-julia
solution/1600-1699/1662.Check If Two String Arrays are Equivalent/Solution.cpp
class Solution { public: bool arrayStringsAreEqual(vector<string>& word1, vector<string>& word2) { return reduce(word1.cbegin(), word1.cend()) == reduce(word2.cbegin(), word2.cend()); } };
ALGO
0.999642
6.44279
63cef242-5b6d-49c7-a828-044156966cbc
Moha7000/Adaptive-Huffman-coding
main.cpp
/* Adaptive Huffman Algorithm */ #include<bits/stdc++.h> using namespace std; #define not_symbol -1 // for internal nodes map<char,int> char_set; map<char,string> codes; int m, e, r; /* structure of each node */ struct node{ char symbol; int order, weight; bool nyt, root; node *left, *right, *par...
ALGO
0.999872
4.203462
9db008db-4339-46d9-8c20-718c0dd4830d
Karmvirjadeja/Bitmanipulation_Basics
MexiMize_Array.cpp
#include <bits/stdc++.h> using namespace std; int main() { int testCase; cin >> testCase; while (testCase--) { int n; cin >> n; set<int> s; for (int i = 0; i < n; i++) { int x; cin >> x; s.insert(x); } int maxEle = *s.rbegi...
ALGO
0.999867
4.545569
cda8a4b3-b04f-4a94-aa23-73c969c7c901
Parinitha-Samaga/DSA-SY-Sem1
reverseandsortsll.cpp
#include<iostream> using namespace std; class Node { public: int data; Node *next; }; class Llist { public: Node *head, *tail; Node * getnode(); void append(Node *); void create(); void display(); void reverse(); void sort(); Llist() { head=NULL; tail=NULL; } }; Node * Llist::getnode(...
ALGO
0.999884
4.091432
bdcace47-aab4-4e2b-93e3-c8d20bf6224e
reembot/syringe-detection
ocr/ocrPthread.cpp
#include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include <stdio.h> #include <stdlib.h> #include <iostream> #include <fstream> #include <vector> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> using namespace cv; using namespace std; #include <pth...
ALGO
0.97324
3.773483
b261f784-4f94-44c4-960c-1b11cfd76f3d
ishandutta2007/codeforces
cheetose/normal/1237/C1.cpp
#include<cstdio> #include<cstdlib> #include<iostream> #include<vector> #include<queue> #include<bitset> #include<string> #include<stack> #include<set> #include<unordered_set> #include<map> #include<unordered_map> #include<cstring> #include<complex> #include<cmath> #include<iomanip> #include<numeric> #include<algorithm>...
ALGO
0.999982
3.525417
252decc2-3a84-4525-a290-1eef9617bc31
StyleList94/problem-solving
programmers/level2/소수_만들기.cpp
#include <vector> #include <iostream> using namespace std; // 소수 판별 함수 bool isPrime(int k) { if (k == 1) return false; for (int i = 2; i*i <= k; i++) { if (!(k%i)) return false; } return true; } int solution(vector<int> nums) { int answer = 0; // 3개의 수 선택을 삼중 반복문으로 선택 for (int i = 0; i < nums.size() - 2; i+...
ALGO
0.999668
5.552158
fff56403-12d5-4970-8008-d4de51dea735
conankun/Dovelet
bead/397898_TLE.cpp
#include<iostream> #include<stdlib.h> using namespace std; int n,m; int map[101][101]; int small[101][101]; int big[101][101]; int path[10000]; int ind; int cnt; int vis[101]; void DFS(int bead) { int i; for(i=0;i<ind;i++) { big[bead][path[i]]=1; small[path[i]][bead]=1; } path[ind++]=bead; for(i=1;i<=n;i++) { ...
ALGO
0.999923
3.55597
b9ef7c3c-4876-4fcd-b5c8-0f7147d445a6
ishandutta2007/codeforces
flashmt/normal/830/C.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; long long k; cin >> n >> k; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; long long sumA = accumulate(begin(a), end(a), 0LL); vector<long long> cand; for (int x : a) for (int i = 1; i * i <= x; i++) { can...
ALGO
0.999957
3.760902
1afd83f1-bd8e-4e71-acc9-80802d38606c
vildritt/test_file_signature
lib/tools/hash/md5_hasher.cpp
#include <tools/hash/md5_hasher.hpp> #include <cstdint> #include <cstring> #include <cassert> namespace { #ifdef _WIN32 // TODO 0: improove detection for arm etc #define HASHER_MD5_LE_CPU 1 #define HASHER_MD5_BE_CPU 0 #else #if defined(__i386__) || defined(__x86_64__) || defined(__vax__) #define HASHER_MD5_LE_CPU 1 ...
ALGO
0.950923
7.333498
b362bff5-63ba-419a-9949-747d7b009071
enlighten5/symfit-kernel
subprojects/symcc-rt/src/backends/qsym/qsym/third_party/z3/src/ast/rewriter/arith_rewriter.cpp
#include "ast/rewriter/arith_rewriter.h" #include "ast/rewriter/arith_rewriter_params.hpp" #include "ast/rewriter/poly_rewriter_def.h" #include "math/polynomial/algebraic_numbers.h" #include "ast/ast_pp.h" void arith_rewriter::updt_local_params(params_ref const & _p) { arith_rewriter_params p(_p); m_arith_lhs ...
ALGO
0.997202
6.990637
56fcefc1-42c6-4725-b429-f066448f8d6e
cdelprato0/Saddleback-CC
CS3B - Assembly Lang/AW-1/main.cpp
/************************************************************************************ * AUTHOR :Chaz Del Prato * STUDENT ID :382108 * Assignment #1 :AW-1 * CLASS :CS3B * SECTION :T/TH 3:30 ************************************************************************************/ #include <iostre...
ALGO
0.998381
4.474921
306b1bf9-eef3-4dd6-ba75-60834ccfd8b1
YanAndrade61/Maratona-Programacao
cursoUFMG/aula0-Basico/querm.cpp
#include<bits/stdc++.h> using namespace std; #define _ ios_base::sync_with_stdio(0);cin.tie(0); #define endl '\n' #define f first #define s second #define ii pair<int,int> #define all(x) x.begin(), x.end() #define sz(x) (int)x.size() #define forn(i,n) for(int i = 0; i < n; i++) typedef long long ll; const int ...
TEST
0.978764
3.971053
66beea52-f0e6-4481-826c-2ec4ab8343bc
embecosm/Posit-for-RISC-V
SoftPosit/PPU_Debug/converter2.cpp
#include "source/include/softposit.h" #include <iostream> #include <random> #include <cstdlib> #include <time.h> #include <set> #include <iomanip> #include <windows.h> #include <chrono> #include <cmath> using namespace std; double rand_gen(double min, double max); int main() { double power; std::set<int> ran...
TOOL
0.918865
4.026448
d3c150a5-be66-4945-8e9c-43c20998f114
ThePavlentio/DZ2
zadacha1.cpp
#include <iostream> class Calculator { private: double num1{}; double num2{}; public: Calculator(double num1, double num2) { num1 = set_num1(num1); num2 = set_num2(num2); std::cout << "num1 + num2 = " << add() << std::endl; std::cout << "num1 - num2 = " << subtract_1_...
TOOL
0.907412
3.618299
4a26ed70-1e59-408e-ab0e-28eb92a50748
kunyavskiy/competitive-programming-archive
opencup/20-21/210516/B.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <fstream> #include <functional> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #include <set> #include <s...
ALGO
0.999939
4.036831
b8bcae2b-6e3d-43de-87d0-a735868691cf
jasha64/jasha64
2016/BZOJ3110-整体二分.cpp
#include <cstdio> #include <algorithm> using namespace std; const int N = 50007; struct OP {int s, l, r, q, v;} op[N], t[N]; int n, Q, Res[N]; inline int Lowbit(int x) {return x & -x;} struct BIT { int a[N], c[N]; void Modify(int* a, int x, int v) {for (; x <= n; x += Lowbit(x)) a[x] += v;} void Add(int l, int...
ALGO
0.999846
3.773732
03b723c5-f606-4f69-a692-3ec6ae4bb666
AbdullaKhan01/Competitive-Programming
AZ Practice/Phase3/Day40/RemoveMarbles.cpp
#include<bits/stdc++.h> #define mod 1000000007 #define mod2 998244353 #define ceil(a,b) ((a+b-1)/b) #define floor(a,b)((a-b+1)/b) #define fast_io() ios::sync_with_stdio(0);cin.tie(0); #define ll long long #define int long long #define vi vector<int> #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x)....
ALGO
0.999641
4.061394
83feb229-f8f8-49bf-8d61-acd92e4e5361
briannadrew/HPC-Assignment3
assn3_HPC.cpp
// Name: assn3_HPC.cpp // Author: Brianna Drew // ID: #0622446 // Date Created: 2021-11-17 // Last Modified: 2021-11-23 // libraries #include <stdio.h> #include <stdlib.h> #include <cmath> #include <mpi.h> int main (int argc, char** argv) { int procNum, procRank; // number of processes and process number const in...
ALGO
0.99999
3.410805
826bcb5c-3acf-4a9d-9cbe-d841228d6b7a
Moniruzzaman-Shawon/Tree-Data-Structure
Binary-Tree-Operations/level-order-traversal.cpp
// Recursive C++ program for level // order traversal of Binary Tree #include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *left, *right; Node(int value) { data = value; left = nullptr; right = nullptr; } }; // Function prototypes void printCurrentLe...
ALGO
0.999988
6.242846
60ec132e-5fb3-4bc0-82fb-506727d4241a
ishandutta2007/codeforces
rfpermen/normal/609/F.cpp
#include<bits/stdc++.h> #pragma GCC optimize("O3") #pragma GCC target("tune=native") #pragma GCC optimize("unroll-loops") using namespace std; template<class A, class B> ostream& operator<<(ostream& os, const pair<A, B> &p) { os << '(' << p.first << ',' << p.second << ')'; return os; } template<class T> ostream...
ALGO
0.999965
3.895812
724b80f9-00f4-4e40-bd86-dfa7a9304265
ishandutta2007/codeforces
nfssdq/normal/512/C.cpp
/*********************************************************************\ |--\ --- /\ |-----------| ----- /-------| | | \ | / \ | | / | | \ | / \ | | | | | \ | / \ ...
ALGO
0.999881
3.341258
ac61e206-9471-41f1-8bb0-57bf110c69e7
farhansyed1/Cpp-projects
Template-metaprogramming /prime.cpp
/* * Simple prime numbers functions * * Author: Farhan Syed * Year: 2024 Compile: g++ -o prime prime.cpp */ #include <iostream> #include <vector> #include <cmath> #include <sstream> // Function that returns a string of c++ code that initializes a vector or array with prime numbers. std::string hard_coded_primes(...
ALGO
0.999187
5.430903
13ff27c6-bfcf-4e51-9c5f-26a179b6a07e
ItsMeMisha/Algos3sem
Theme2/TaskE.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> template <typename T> struct Matrix { Matrix(const int sizeX, const int sizeY); std::vector<std::vector<T>> data; std::vector<T>& operator[](const int indx); const std::vector<T>& operator[](const int indx) const; const i...
ALGO
0.999961
4.290849
45cb0168-c3e9-4e5c-8f02-2b23cf399947
j-shifat-18/cp_codeforces
ArparesearchinMexicanwave.cpp
// https://codeforces.com/problemset/problem/851/A #include<iostream> using namespace std; int main() { int n , k , t ; cin>>n >>k >>t; if(t<=k) { cout<<t; } else if(t<=n) { cout<<k; } else if(t>n) { cout<<(n+k)-t; } return 0 ; }
ALGO
0.999945
3.565699
afc8cb0b-883c-4025-8798-e51f2c892338
jhbaek04/mfem-4.6
miniapps/dpg/pconvection-diffusion.cpp
// AMR runs // mpirun -np 4 pconvection-diffusion -o 3 -ref 15 -prob 1 -eps 1e-3 -beta '1 0' -theta 0.7 -sc // mpirun -np 4 pconvection-diffusion -o 3 -ref 20 -prob 2 -eps 5e-3 -theta 0.7 -sc // mpirun -np 4 pconvection-diffusion -o 2 -ref 20 -prob 3 -eps 1e-2 -beta '1 2' -theta 0.7 -sc // Description: // This exam...
ALGO
0.999707
5.261075
4189f787-71d4-45a8-99e2-7e91b907c572
ms376/flutter
ex08_container/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.998748
6.76073
4d5caf0f-3cae-45d9-b295-0a342b2b3172
doocs/leetcode
solution/0000-0099/0006.Zigzag Conversion/Solution.cpp
class Solution { public: string convert(string s, int numRows) { if (numRows == 1) { return s; } vector<string> g(numRows); int i = 0, k = -1; for (char c : s) { g[i] += c; if (i == 0 || i == numRows - 1) { k = -k; ...
ALGO
0.999998
6.395785
4882e237-1659-4d48-8ecb-344297a85199
ishandutta2007/codeforces
zylber/normal/1392/C.cpp
#include <iostream> #include <cstring> #include <cstdio> #include <cmath> #include <queue> #include <set> #include <map> #include <vector> #include <stack> #include <algorithm> #define MOD 1000000007 #define forn(a, n) for(int a = 0; a<(int) (n); ++a) #define dforn(a, n) for(int a = (n)-1; a>=0; --a) #define forall(a, ...
ALGO
0.999262
3.542201
524f59ee-e362-49fa-ba94-00c3a98a1519
w181496/OJ
Zerojudge/d212.cpp
#include <iostream> using namespace std; int main() { long long int a=0,b=1,c=2,d=0; while(cin>>a) { if(a>2) { for(int i=2;i<=a;i++) { d=c; c=b+c; b=d; } cout<<b<<endl; } else ...
ALGO
0.999963
3.073627
b126f741-ebb0-497a-a6d2-3d910bb1458b
ishandutta2007/codeforces
_nyusha_/normal/1601/D.cpp
#include<bits/stdc++.h> using namespace std; int const maxn = 5e5 + 5; pair < int, int > a[maxn]; int dp[maxn], pref[maxn]; main() { #ifdef HOME freopen("input.txt", "r", stdin); #endif // HOME ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, d; cin >> n >> d; for (int i = 1;...
ALGO
0.999982
3.933711
03dc069a-8ca3-447a-ab9f-5b86b8595c40
airen3339/llvm-project
libc/src/math/generic/fdim.cpp
#include "src/math/fdim.h" #include "src/__support/FPUtil/BasicOperations.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(double, fdim, (double x, double y)) { return fputil::fdim(x, y); } } // namespace LIBC_NAMESPACE_DECL
TOOL
0.853125
6.106887
e77a102b-6483-4dbd-9c8c-78d32bc58aa0
garvit018/CodeForces-Solutions
1800C1.cpp
<<<<<<< HEAD #include <bits/stdc++.h> using namespace std; #define int long long int #define pb push_back signed main() { int tt; cin >> tt; while (tt--) { int n; cin >> n; vector<int> arr(n), ans; for (int i = 0; i < n; i++) { cin >> arr[i]; ...
ALGO
0.999965
5.964174
d9581732-e5ed-48ab-b246-8c6411ad1990
arnavnagayech/dsa
Chapter-12 DP/5_Equal_Sum_Partition.cpp
#include <bits/stdc++.h> using namespace std; /* Time Complexity: O(sum*n) Auxiliary Space: O(sum*n) */ bool subsetSum(int arr[], int sum, int n) { bool t[n+1][sum+1]; for(int i=0;i<n+1;i++) //Initialization { for(int j=0; j<sum+1; j++) { if(i==0) t[i...
ALGO
0.999955
5.115448
f6e33c74-3866-4ef6-b315-d32365d95d85
Reem-Elkhouly/clang-custom-loop-pragma-NVM
lib/Analysis/CFGReachabilityAnalysis.cpp
#include "clang/Analysis/Analyses/CFGReachabilityAnalysis.h" #include "clang/Analysis/CFG.h" #include "llvm/ADT/BitVector.h" #include "llvm/ADT/SmallVector.h" using namespace clang; CFGReverseBlockReachabilityAnalysis::CFGReverseBlockReachabilityAnalysis( const CFG &cfg) : analyzed(cfg.getNumBlockIDs(), false...
TOOL
0.982911
7.079948
3fdbb99f-2162-4ff8-87ce-dd99c5de9c86
Amor568-UESTC/data-struct
链表/List/list.cpp
#include<iostream> using namespace std; template<typename T> struct Node { T val; Node* next; Node(const T item) :val(item), next(NULL) {} }; template<typename T> class List { private: Node* head; T end_value; private: void CreateList(Node<T>*& l) { T item; if (cin >> item) { if (item != end_value) ...
ALGO
0.98308
3.419282
2939e33c-2879-45c4-8b48-608600f53072
tongtzeho/OpenJudge
4013.cpp
#include<iostream> using namespace std; int main() { int n,a[11000],i,j,k; while(1==1) { cin>>n; if(n==0)return 0; a[0]=0; for(i=1;i<=n;i++) { cin>>a[i]; j=i; while(a[j]<a[j-1]) { k=a[j]; a[j]=a[j-1]; a[j-1]=k; j--; } } if(n%2==0)cout<<(a[n/2]+a[n/2+1])/2<<endl; else co...
ALGO
0.999984
3.306452
0620f250-98f5-4c30-8f0a-98361e153822
Sadiya194112/Algorithm-Basic-Code
LCS.cpp
#include<bits/stdc++.h> using namespace std; const int N=50; int b[N][N], c[N][N],m,n,i,j; int LCS(char s1[], char s2[]){ m = strlen(s1); n = strlen(s2); for(i=1; i<=m; i++) c[i][0]=0; for(j=0; j<=n; j++) c[0][j]=0; for(i=1; i<=m; i++){ for(j=1; j<=n; j++){ if(s1[i]==s2[j]){ ...
ALGO
0.999998
3.772086
0eedeaa3-bb93-44f8-b4d2-7100e07b1669
Gidi233/c
algorithm/LeetCode/136.cpp
class Solution { public: int singleNumber(vector<int>& nums) { set<int> sets; for(int i=0;i<nums.size();i++){ if(sets.find(nums[i])==sets.end()){ sets.emplace(nums[i]); } else{ sets.erase(nums[i]); } } re...
ALGO
0.999955
5.568263
b126522f-2296-4ad6-a314-e3bd3b4fa5bd
raincross7/code-similarity
codes/train_code/problem174/problem174_229.cpp
#include <bits/stdc++.h> #define rep(i,n) for(int i=0;i<n;i++) using namespace std; using ll = long long ; using P = pair<int,int> ; const int INF = 1e9; const int MOD = 1000000007; int gcd(int a,int b){ if(b ==0) return a; return gcd(b,a%b); } int main(){ int n,k; cin >> n >> k; vector<int> a(n)...
ALGO
0.999948
4.432281
a9fee848-3827-425d-a70b-ec5a8e016d7f
ALLETttttt/KBTU_ALGOS
lab6/i.cpp
#include <iostream> using namespace std; int partition(string &ar, int left, int right) { int pivot = ar[right]; int index = left; for (int i = left; i < right; i++) { if (ar[i] < pivot) { swap(ar[i], ar[index]); index++; } } swap(ar[index], ar[right]); return index; } void quick_sort(string &ar, int ...
ALGO
0.999967
5.149147
beb53770-7bc7-4184-ade6-582338022965
wsdanshenmiao/LearnMiniEngine
ThridParty/dxc/lib/Analysis/IPA/InlineCost.cpp
#include "llvm/Analysis/InlineCost.h" #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/CodeMetrics.h" #include "llvm/Analysis/ConstantFold...
ALGO
0.895583
5.697624
b641bebb-c103-4fd5-b85a-3d038d65a9b3
lwyeluo/ScriptChecker
third_party/android_crazy_linker/src/src/crazy_linker_elf_relocations.cpp
#include "crazy_linker_elf_relocations.h" #include <assert.h> #include <errno.h> #include <memory> #include "crazy_linker_debug.h" #include "crazy_linker_elf_symbols.h" #include "crazy_linker_elf_view.h" #include "crazy_linker_error.h" #include "crazy_linker_system.h" #include "crazy_linker_util.h" #include "linker_p...
TOOL
0.872446
7.730725
6999bb55-1ea7-4abf-b91f-8182c02f754f
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_2554_0.cpp
#include <bits/stdc++.h> int F(const void* x, const void* y) { return *(int*)x - *(int*)y; } unsigned N[555555], n; unsigned lo(unsigned k) { unsigned i; long long unsigned r = 0llu, t; for (i = 0; ++i < n;) if ((r += (t = (N[i] - N[i - 1]) * (long long unsigned)i)) > k) return N[i - 1] + (k - (r - t)) ...
ALGO
0.99995
3.574958
bff86cea-5ae4-4d06-95c5-08ea0cceb252
ishandutta2007/codeforces
lucina/normal/1061/F.cpp
#include<bits/stdc++.h> using namespace std; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); map<tuple<int,int,int>,int> m; int query(int x,int y,int z){ tuple<int,int,int> w=make_tuple(x,y,z); if(m.find(w)!=m.end()) return m[w]; printf("? %d %d %d\n",x,y,z); fflush(stdout);...
ALGO
0.999976
3.016522
66c9573d-0926-4752-935e-98d1f31789f0
R41NB0W-D4SH/OOP_Lab_Work
Lab_1/task12.cpp
#include <iostream> using namespace std; int main() { setlocale(LC_ALL, "Russian"); float df, all, f, raz1, raz2, s, p; cout << "Введите фунты стерлингов в современном формате: "; cin >> df; all = df * 240; df = static_cast<int>(df); f = df * 240; raz1 = all - f; raz1 = static_cast<int>(raz1);...
ALGO
0.974717
3.031833
b140dfef-1c84-4d27-8333-4f741cee8886
RodrigoSulca/BebeloApp
bebelo/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.99853
6.76775
eb203828-56a7-46e0-b306-1ddcb9e03e1b
ishandutta2007/codeforces
lucccff/normal/1575/F.cpp
#include <bits/stdc++.h> #define MOD 1000000007 #define maxn 300005 #define LL long long using namespace std; const LL mod1=998244353,mod2=1004535809,mod3=469762049,g1=3; const LL M=1LL*mod1*mod2; long long a[100010],b[100010],c[100010],d[100010]; map <int,int> p; long long inv(long long x) { if (x==1) return x;...
ALGO
0.999966
3.858764
e3db577b-6e9f-48a5-8b68-76ba285ae8ac
fdj32/fork_samples
cppreference/w/cpp/string/byte/strstr.cpp
#include <iostream> #include <cstring> int main() { const char *str = "Try not. Do, or do not. There is no try."; const char *target = "not"; const char *result = str; while ((result = std::strstr(result, target))) { std::cout << "Found '" << target << "' starting at '" <<...
ALGO
0.997805
5.496766
dd8de486-03ea-4274-901d-51b9133274b7
ChaosPKU/Exercise
Hihocoder 1479 三等分.cpp
/* 描述 小Hi最近参加了一场比赛,这场比赛中小Hi被要求将一棵树拆成3份,使得每一份中所有节点的权值和相等。 比赛结束后,小Hi发现虽然大家得到的树几乎一模一样,但是每个人的方法都有所不同。于是小Hi希望知道,对于一棵给定的有根树,在选取其中2个非根节点并将它们与它们的父亲节点分开后,所形成的三棵子树的节点权值之和能够两两相等的方案有多少种。 两种方案被看做不同的方案,当且仅当形成方案的2个节点不完全相同。 输入 每个输入文件包含多组输入,在输入的第一行为一个整数T,表示数据的组数。 每组输入的第一行为一个整数N,表示给出的这棵树的节点数。 接下来N行,依次描述结点1~N,其中第i行为两个整数...
ALGO
0.999964
4.210057
5de74916-eecf-4783-b7da-155449750eea
dkrekdslswk/landMine
land_mine_search/temporary_main.cpp
#include"land_mine_game_conptroller.h" #include"land_mine_game_setting_save.h" int game_start(int setting_high, int setting_width, int setting_mine, unsigned char* game_setting) { // ɾ ν int game_order = 0; do { Land_Mine_Game_Screen(setting_high, setting_width, land_mine_game_setting_save::ground()); game_o...
ALGO
0.979452
4.030033
e97f4141-7b26-4dcc-bf40-1b34d05c833f
nnnlog/codeforces
2020.09.25_Round_672/R672_B.cpp
#include <bits/stdc++.h> using namespace std; int sz(int n) { int r = 0; n <<= 1; while (n >>= 1) r++; return r; } int main() { cin.tie(0)->sync_with_stdio(0); cout.tie(0); int T; cin >> T; while (T--) { unordered_map<int, long long> mp; int n; cin >> n; while (n--) { int a; cin >> a; mp[sz(a)]+...
ALGO
0.999401
4.610441
abb6d66b-34ab-44c9-9f90-3f8ae01aeb74
HaseemDev/programming-college-assignment
65 Programs Assignment/21st.cpp
#include <iostream> using namespace std; int main() { int number, factorial = 1; cout << "Enter a number: "; cin >> number; int i = 1; while (i <= number) { factorial *= i; i++; } cout << "Factorial of " << number << " = " << factorial <<endl; return 0; }
ALGO
0.999589
4.43225
31ae9627-21ef-4129-99f1-c90179df34b5
pingchungchang/CP
apcsc31.cpp
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("O3") #define ll long long #define pll pair<ll,ll> #define pii pair<int,int> #define fs first #define sc second #define io ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define ld long double #define _all(T) T.begin(),T.end() int main(){ io int n,m;...
ALGO
0.999953
3.819245
2df5bc1a-8464-461c-abcf-531fcbb617c0
chiragsidana/programming
codechef/Non_Comprime_Neighbours.cpp
#include <bits/stdc++.h> #define int long long #define endl "\n" #define PI 3.141592653589793238 #define MOD 1000000007 #define FastIO ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #define vi vector<int> #define vb vector<bool> #define vc vector<char> #define pii pair<int,int> #define vpi vector<pii> #define rep(i,a...
ALGO
0.99991
3.838516
19e63746-0116-42b7-9e39-fe24523dea40
konyul/FG-PFE
pcdet/ops/pointnet2/pointnet2_stack/src/interpolate.cpp
#include <torch/serialize/tensor.h> #include <vector> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <cuda.h> #include <cuda_runtime_api.h> #include "interpolate_gpu.h" #define CHECK_CUDA(x) do { \ if (!x.type().is_cuda()) { \ fprintf(stderr, "%s must be CUDA tensor at %s:%d\n", #x, __FILE__, ...
DATA
0.857018
6.042449
c2ff99ed-a51a-4651-ba0e-7e6fffa8f99b
jdpadillaac/qr_code_manager
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
7bfe5d18-e068-454e-9925-a289407a0aec
tko919/library
Verify/LC_nim_product_64.test.cpp
#define PROBLEM "https://judge.yosupo.jp/problem/nim_product_64" #include "Template/template.hpp" #include "Math/nimber.hpp" int main(){ int t; cin>>t; while(t--){ Nimber a,b; cin>>a>>b; cout<<a*b<<'\n'; } return 0; }
ALGO
0.999036
5.725147
304a9d7c-d8ae-499f-a57d-3d7a14b00648
mohamedali559/Problem-Solving
CodeForces/J_Table_Tennis.cpp
/* بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيم قَالَ رَبِّ اشْرَحْ لِي صَدْرِي (25) وَيَسِّرْ لِي أَمْرِي (26) وَاحْلُلْ عُقْدَةً مِّن لِّسَانِي (27) يَفْقَهُوا قَوْلي */ #include <bits/stdc++.h> #define ln "\n" typedef long long ll; using namespace std; void solve() { ll...
ALGO
0.999991
4.527766
0099b888-59d2-4d5c-bd5d-d994f8c93c37
tsksnhr/programming_contest
atcoder/apg4b_ex26.cpp
#include <bits/stdc++.h> using namespace std; // 関数プロトタイプ宣言 int int_f(void); int print_int_f(void); int vec_f(void); int print_vec_f(void); // 変数宣言 int order_num; int order_count; int ans_num; int op_flg; char order_temp; char name; char name_memo; int num_buf; char op_buf; map<char, int> var_map; map<char, ve...
TOOL
0.909
4.595826
101bcc80-5b79-4a01-8aa8-4f09096b5f88
adil19-net/c-and-html-and-python
test36.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--){ int n,m; cin>>n>>m; long long int ans=0; vector<long long int> v1(m),v2,v3(m); for(int i=0;i<m;i++){ cin>>v1[i]; ...
ALGO
0.999894
4.346432
5f2410f6-06b2-4a15-aa34-56b1091db73a
EvilTasuki/Ontap
cau1.cpp
#include <bits/stdc++.h> using namespace std; int main(){ freopen("cau1.inp", "r", stdin); freopen("cau1.out", "w", stdout); int n, m; cin >> n; cin >> m; int tong = n + m, hieu = n - m; cout<<tong<<endl; cout<<hieu; }
ALGO
0.999785
3.389093
811bf075-d553-4462-8c6a-07e26fa3cb1c
Hertz-Lee/SICNU-OJ-200
R.cpp
#include<cstdio> int read(){ int x=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){ if(ch=='-')f=-1; ch=getchar(); } while(ch>='0'&&ch<='9'){ x=(x<<1)+(x<<3)+(ch^48); ch=getchar(); } return x*f; } void write(int x){ if(x<0)putchar('-'),x=-x; if(x>9)wri...
ALGO
0.999863
3.222372
98dd71ef-7a02-413b-8a86-d326d905d9a8
ShashankJaipurkar123/Leetcode-solution
0039-combination-sum/0039-combination-sum.cpp
class Solution { void combination(vector<int>& candidates, int target, vector<int> currComb, int currSum, int currIndex, vector<vector<int>>& ans){ if(currSum>target) return; //backtrack if(currSum==target){ ans.push_back(currComb); //store the solution and backtrack return; ...
ALGO
0.999978
6.383162
7ecbae9c-f079-44ff-8281-bb80cbdd352d
nikita12c/Data-Structures-
STL/List_Harry.cpp
#include<iostream> using namespace std; #include<list> void display(list<int> &lst){ list<int> :: iterator itr; for(itr=lst.begin(); itr!=lst.end();itr++){ cout<<*itr<<" "; } cout<<endl; } int main(){ list<int> list1; //list of length 0 list1.push_back(5); list1.push_back(2); list1.push_back(10); list1.push_back(1...
ALGO
0.986854
3.746397
ad3fbb03-2001-4de4-8113-70e9c5d342f2
DanceManiac/Advanced-X-Ray-Public
SourcesAXR/xrGame/player_spot_params.cpp
#include "stdafx.h" #include "player_spot_params.h" #include "game_base.h" #include "game_cl_capture_the_artefact.h" #include "game_cl_artefacthunt.h" #include "game_state_accumulator.h" namespace award_system { u32 const calculate_spots(game_PlayerState* ps) { return ps->m_iRivalKills - (ps->m_iTeamKills * 2) - ps-...
TOOL
0.967819
3.207898
3c552028-e4c1-4a4f-99c1-ca3463b5ec17
se-ashishgupta/Mastery-Data-Structure-and-Algorithm-form-Basic
7. Array/TwoSumII.cpp
#include <iostream> #include <vector> using namespace std; /* Problem Statement: ------------------ Given a **sorted** array of integers `arr` and an integer `target`, return the **1-based indices** of the two numbers that add up to `target`. Assume there is exactly one solution. Approach 1: Naive Solution (Brute Fo...
ALGO
0.999997
7.370934
07550fee-58ef-4840-b0fe-b551cc816bc7
vansh-codes/Competitive-Coding-Approaches
Unit4-DP/9_stockBuyAndSell.cpp
//? https://www.geeksforgeeks.org/problems/stock-buy-and-sell-1587115621/1 #include <bits/stdc++.h> using namespace std; vector<vector<int>> stockBuySell(vector<int> A, int n) { vector<vector<int>> result; if (n <= 1) { return result; } int buy = 0; int sell = -1; // -1 indicates no ...
ALGO
0.999975
5.352757
1b4a911a-1116-46af-83ed-e433c3973fff
alanrave/LeetCode
0130-surrounded-regions/0130-surrounded-regions.cpp
class Solution { public: void dfs(int row,int col,vector<vector<char>>&board,vector<vector<int>>&vis, int delrow[],int delcol[]) { vis[row][col]=1; int n=board.size(); int m=board[0].size(); for(int i=0;i<4;i++) { int nrow=row+delrow[i]; int nc...
ALGO
0.999912
6.248161
725debc5-8010-4d57-bbfe-258863b5570b
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_5768_19.cpp
#include <bits/stdc++.h> using namespace std; deque<pair<long long, long long>> batch; void insert_dreapta(long long n, long long m); long long eval(long long x); long double intersect(pair<long long, long long> a, pair<long long, long long> b); long long a[100010], b[100010]; long long dp[100010]...
ALGO
0.999869
3.499847
1625db00-03fc-4bbe-adc9-10e790e06d76
R-Hari-Narayan/Cpp
Vowel_checker.cpp
#include <iostream> using namespace std; int main(){ #ifndef ONLINE_JUDGE freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); #endif char alphabet; cin>>alphabet; cout<<alphabet<<endl; if (alphabet=='a' || alphabet=='e' || alphabet=='i' || alphabet=='o' || alphab...
ALGO
0.991245
3.780344
fcff6016-f3af-41c0-8b45-05504564b05b
kerBiy/ubb-computer-science
Algoritmica-Grafurilor/partial-shit/moore/moore.cpp
#include <fstream> #include <iostream> #include <queue> #include <vector> #define INF 9999 #define NIL -1 class Graph { private: int nodes; std::vector<std::vector<int>> adjList; std::vector<int> distance; std::vector<int> parent; public: Graph(int nodes) : nodes(nodes) { adjList.re...
ALGO
0.999968
5.235215
54ad3312-0b82-4e55-b576-b4d2e996f49e
seamanj/opencv-2.4.13.6
modules/ml/src/nbayes.cpp
#include "precomp.hpp" CvNormalBayesClassifier::CvNormalBayesClassifier() { var_count = var_all = 0; var_idx = 0; cls_labels = 0; count = 0; sum = 0; productsum = 0; avg = 0; inv_eigen_values = 0; cov_rotate_mats = 0; c = 0; default_model_name = "my_nb"; } void CvNormalBaye...
ALGO
0.998605
6.455945
26659dcd-85dd-466b-a1c6-7c0d0e7c2540
mohitbabani/CP-Probelm-Solutions
Contests/educational/lt.cpp
#include<bits/stdc++.h> using namespace std; #define ll int #define ld long double #define pb push_back #define ull unsigned long long #define inf 1e17 #define all(vec) vec.begin(),vec.end() #define f(i,a,b) for(ll i=a;i<b;i++) #define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); bool isPrime(ll n...
ALGO
0.999966
4.71175
e2a93024-b812-4cb5-a32f-b40d9706c972
interactivevislab/GeoTempPlugins
GeoTempCore/libigl-static/include/igl/copyleft/quadprog.cpp
#include "quadprog.h" #include <vector> #include <Eigen/Dense> IGL_INLINE bool igl::copyleft::quadprog( const Eigen::MatrixXd & G, const Eigen::VectorXd & g0, const Eigen::MatrixXd & CE, const Eigen::VectorXd & ce0, const Eigen::MatrixXd & CI, const Eigen::VectorXd & ci0, Eigen::VectorXd& x) { ...
ALGO
0.999984
6.006529
e833fe7f-8a4b-4587-a224-c48970d94f91
ishandutta2007/codeforces
unused/normal/691/E.cpp
#include <bits/stdc++.h> using namespace std; using matrix = array<array<int, 100>, 100>; long long a[105]; constexpr int MOD = 1000000007; matrix now; matrix matmul(const matrix &m1, const matrix &m2) { matrix ret{}; for (int k = 0; k < 100; k++) { for (int i = 0; i < 100; i++) { ...
ALGO
0.999977
4.346968
0ea13eb3-faa7-40df-bc38-67cf2796daf7
jshilong/GPT4RoI
mmcv-1.4.7/mmcv/ops/csrc/pytorch/upfirdn2d.cpp
// Modified from // https://github.com/rosinality/stylegan2-pytorch/blob/master/op/upfirdn2d.cpp /* Copyright (c) 2021, NVIDIA Corporation. All rights reserved. NVIDIA Source Code License for StyleGAN2 with Adaptive Discriminator Augmentation (ADA) =====================================================================...
TOOL
0.925526
7.056863
f01e6fda-40e7-4995-979e-decda801528f
sarvex/leetcode-haskell
solution/1200-1299/1235.Maximum Profit in Job Scheduling/Solution.cpp
class Solution { public: int jobScheduling(vector<int>& startTime, vector<int>& endTime, vector<int>& profit) { int n = profit.size(); vector<tuple<int, int, int>> jobs(n); for (int i = 0; i < n; ++i) jobs[i] = {endTime[i], startTime[i], profit[i]}; sort(jobs.begin(), jobs.end()); ...
ALGO
0.999993
6.070285
38518482-fc62-406d-a3ac-d18eab9e7685
PutintsevIvan/Arrays
Matrix1/Source.cpp
#include <iostream> using namespace std; #define tab "\t" #define delimiter "\n--------------------------------------------\n" void main() { setlocale(LC_ALL, ""); const int SIZE = 3; double arr[SIZE] = { 5,8,9 }; double matrix_three[SIZE][SIZE] = {}; double matrix_two[SIZE][SIZE] = {}; double matrix_result[SIZ...
ALGO
0.997935
3.704993
3dab3c9f-5948-41e7-8226-2f60fdf37115
Sillyplus/Solution
Tyvj/p1115.cpp
#include <iostream> #include <algorithm> #include <cstring> using namespace std; int a[110]; int b[100010]; int gcd(int a, int b) { return b == 0 ? a : gcd(b, a%b); } int main() { int n; cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; } sort(a, a+n); int ans = a[1]-a[0]; ...
ALGO
0.999897
3.659637
072c2664-76a0-4d85-a2ea-272dfc5e8f26
ferry-hhh/CXL-DMSim
src/systemc/tests/systemc/misc/unit/data/datawidth_bool_to_signed/promote_lost_carry/datawidth.cpp
/***************************************************************************** datawidth.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**************************************************************************...
ALGO
0.942562
5.70173
06a73c3b-27e6-4851-9520-f39083e6dd4e
connortynan/chess
src/engine/eval.cpp
#include "eval.hpp" #include <bit> #include "pst.hpp" namespace chess { namespace engine { static constexpr int piece_values[6] = { 100, 320, 330, 500, 900, 0}; // Midgame phase weights (used for tapered eval) static constexpr int phase_weights[6] = { 0, 1, 1, ...
ALGO
0.998668
6.575105
dca103d2-5df9-43ab-ad9e-dfbd74f683bd
konnofuente/mboa-pharmacie
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998693
6.797273
4c1c749d-58b4-4f64-891f-cded30c758e7
Ethan-Wu-juniper/Operating-System
hw3/0816004_ST.cpp
#include<bits/stdc++.h> using namespace std; #define PART 4 #define pii pair<int,int> vector<pii> part; vector<int> List; void partition_index(int size) { int i,j; int unit = size / PART; int left = size % PART; for(i=0;i<PART;i++) { part[i].first = i * unit; part[i].second = (i+1) * unit -1; } part[PART-1...
ALGO
0.99994
3.518596
8d818f31-7709-4502-9d7a-2814ad71dffc
KaueAmorim/Competitive-Programming
Codeforces/BusinessTrip.cpp
#include <bits/stdc++.h> using namespace std; #define _ ios_base::sync_with_stdio(0);cin.tie(0); #define dbg(x) cout << #x << " = " << x << endl #define f first #define s second typedef long long ll; const int INF = 0x3f3f3f3f; const ll LINF = 0x3f3f3f3f3f3f3f3fll; int main(){ _ int x, k; cin >> k; ...
ALGO
0.999953
3.680326