uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
d2f9c029-32c0-4a36-b6a6-75aba72792cb
ishandutta2007/codeforces
175iq/normal/1619/D.cpp
#include <bits/stdc++.h> using namespace std; //Utility functions #define pb push_back #define sz size() #define fi first #define se second #define all(c) (c).begin(),(c).end() //For loops #define FE(i,a,b) for(int i=a; i<=b; i++) #define FRE(i,b,a) for(int i=b; i>=a; i--) #define FA(x,cont) for(auto& x : cont...
ALGO
0.999925
4.831479
8df12d50-fa7c-4a75-a6fa-9e8f115a3da2
SuperBigFive/Charming_XCPC
AtCoder/ABC/ABC310/B.cpp
#include <bits/stdc++.h> #define ll long long #define int ll using namespace std; const int N = 2e5 + 5; int n, m; void init () {} void charming () { init (); cin >> n >> m; vector <int> p (n + 5), c (n + 5); vector <vector <int> > F (n + 5, vector <int> (m + 5)); for (int i = 1; i <= n; ++i) { cin >> p[i] >>...
ALGO
0.999998
3.858084
30f7fae1-8805-4458-ac52-8213efaff036
darion-yaphet/ClickHouse-25.5.3.75-stable
src/Common/iota.cpp
#include <base/defines.h> #include <Common/iota.h> #include <Common/TargetSpecific.h> namespace DB { MULTITARGET_FUNCTION_AVX2_SSE42( MULTITARGET_FUNCTION_HEADER(template <iota_supported_types T> static void NO_INLINE), iotaImpl, MULTITARGET_FUNCTION_BODY((T * begin, size_t count, T first_value) /// NOLINT ...
ALGO
0.962515
7.406258
91f1f735-73c8-4536-847c-c15c02744726
exarus/Parallel-Programming-KPI
lab5-win32/parallel-programming-lab5/parallel-programming-lab5.cpp
/*+=================================================================== * Паралельне прогорамування - 1. Основи паралельного програмування * Лабораторна робота N 5. * ПОТОКИ В БИБЛИОТЕКЕ WIN32 * F1 1.16: d = ((A + B)* (C *(MA*MD))) * F2 2.23: f = MAX(MK * ML - MO) * F3 3.28: v = MAX(MR*S) + MIN((MT*MW + MV)) * Гунавард...
ALGO
0.99715
4.260584
ca96f0f6-2534-481c-8b60-e899f13dba88
Darshanpakhale26/90daysofLeetcode
110distanceBetweenBusStops.cpp
// Distance Between Bus Stops #include <iostream> #include <vector> class Solution { public: int distanceBetweenBusStops(std::vector<int>& distance, int start, int destination) { int sum = 0; for (int i = 0; i < distance.size(); i++) { sum += distance[i]; } int clockwis...
ALGO
0.999908
6.105314
a4567ed6-f50f-46f7-b59b-1ee64df16329
ashmit2c1/cp31_sheet
800_rating/A_Doremy_s_Paint_3.cpp
#include<bits/stdc++.h> using namespace std; #define lint long long #define forloop(x,y) for(int i=x;i<y;i++) #define secondfor(x,y) for(int j=x;j<y;j++) #define print(x) cout << x << "\n"; #define output(arr) for(int i=0;i<arr.size();i++){cout<<arr[i]<<" ";} #define asort(v) sort(v.begin(), v.end()) #define dsort(v) s...
ALGO
0.999784
4.069696
5a128d71-54ad-4db0-aa64-df33edc8d6be
franshamk/scantest
deps/boost_1_82_0/libs/graph/example/cc-internet.cpp
/* IMPORTANT!!! ~~~~~~~~~~~~ This example uses interfaces that have been deprecated and removed from Boost.Grpah. Someone needs to update it, as it does NOT compile. */ #include <boost/config.hpp> #include <fstream> #include <vector> #include <string> #include <boost/graph/connected_components.hpp> #includ...
ALGO
0.891154
7.36576
6a4c0789-e18d-480b-b49d-0aedc190a7de
KimDoKy/Cpp-ex-200
5674-782/082.cpp
#include "stdafx.h" #include <iostream> using namespace std; int main() { int data1[3] = { 0, 1, 2 }; data1[0] += 10; data1[1] = 100; data1[2] -= 2; cout << "== data1 ==" << endl; for (int i = 0; i < 3; i++) cout << "data1[" << i << "] = " << data1[i] << endl; return 0; }
ALGO
0.945144
3.120995
2accf566-0e03-4ab4-8cb4-dfbe1f20c60c
myhoon/FAFFT_HQC
circuitgenerator/circuitgenerator/v17/strategy.cpp
#include <memory.h> #include <random> #include <stdlib.h> #include "strategy.h" mt19937 rand_generator(time(NULL)); vector<xpair> strgy1(vector<ROW> &m) { /* compatible with non-square matrix.*/ vector<xpair> seq; int row_size = m.size(); int col_size = m[0].size(); int *mark = new int[row_size]; memset(mark,...
ALGO
0.999959
4.167548
8d25543b-c7b9-4d8a-9754-90975ab34ab1
amantibrewal310/Data-Structure-and-Algorithms
Dynamic Programming/wines_problem.cpp
#include<bits/stdc++.h> using namespace std; #define int long long /* Given the prices of wines are given we can sell only extreme last or first pieces of wine. Prices of wines inc every year yth year = p[i] * y find the maximum profit */ int profit(vector<int> &prices, int i, int j, int y, int dp...
ALGO
0.999663
4.396989
6c6b7480-94f3-48df-baa3-4c679864e1c2
wanglg007/Cplusplus17
02_concurrency/example01/Ex01_07.cpp
//(1.7)使用层次锁来避免死锁 #include <mutex> class hierarchical_mutex { public: explicit hierarchical_mutex(unsigned level) { } void lock() { } void unlock() {} }; hierarchical_mutex high_level_mutex(10000); // 1 hierarchical_mutex low_level_mutex(5000); // 2 int do_low_level_stuff() { retu...
ALGO
0.910679
4.158063
6f2fb0e2-0e21-447a-972f-f413a5dff916
tofergregg/CodeReview
course/cs106b/1176/midterm/p2/student_53.cpp
string decode(string seq) { string number; int firstNumber = 1; for(int k = 0; k < seq.size(); k++) { if(seq[k] == 'D') { firstNumber++; } else { break; } Queue<int> lessThan; if(firstNumber != 1) { for(int i = 1; i < firstNumber; i++) { lessThan.enqueue(i); } } Queue<int> greaterThan; if(fir...
ALGO
0.999584
4.35475
8feb7d18-a457-4f7d-b414-aa244a7c4855
tixidi/ros_stent_graft
iiwa_vs_core/src/iiwaControl/iiwa/Eigen-3.3.3/doc/examples/Tutorial_ArrayClass_mult.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; using namespace std; int main() { ArrayXXf a(2,2); ArrayXXf b(2,2); a << 1,2, 3,4; b << 5,6, 7,8; cout << "a * b = " << endl << a * b << endl; }
ALGO
0.996037
3.527115
1980018d-0adb-47e1-80a7-db10cfa4c283
Koweiyi/LC_cpp
3.无重复字符的最长子串.cpp
/* * @lc app=leetcode.cn id=3 lang=cpp * * [3] 无重复字符的最长子串 */ #include <bits/stdc++.h> using namespace std; // @lc code=start class Solution { public: int lengthOfLongestSubstring(string s) { // int alpha[256] = {0}; // int l = 0, r = -1; // int res = 0; // while (l < s.siz...
ALGO
0.999658
6.038829
b6a36c56-852c-4cfd-8645-264e6f51f9fa
YunshiuanOAO/CP
Atcoder/Panasonic Programming Contest (AtCoder Beginner Contest 195)/abc195_b.cpp
// Problem: B - Many Oranges // Contest: AtCoder - Panasonic Programming Contest (AtCoder Beginner Contest 195) // URL: https://atcoder.jp/contests/abc195/tasks/abc195_b // Memory Limit: 1024 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://cpeditor.org) #include<iostream> #include<iomanip> #include<math...
ALGO
0.999744
4.537209
3b873024-dd34-40c9-8123-174ca7a9ecfd
dzungpng/material-point-method-jello-simulation
Deps/libigl/include/igl/bfs.cpp
#include "bfs.h" #include "list_to_matrix.h" #include <vector> #include <queue> template < typename AType, typename DerivedD, typename DerivedP> IGL_INLINE void igl::bfs( const AType & A, const size_t s, Eigen::PlainObjectBase<DerivedD> & D, Eigen::PlainObjectBase<DerivedP> & P) { std::vector<typename ...
ALGO
0.999658
4.747497
61b7ea8e-4a6b-4e2c-9205-ce70926849f7
patelalay231/Leetcode-Problem-Solutions
1460-number-of-substrings-containing-all-three-characters/1460-number-of-substrings-containing-all-three-characters.cpp
class Solution { public: int numberOfSubstrings(string s) { int n = s.length(); vector<int> idx(3,-1); int cnt = 0; for (int i = 0; i < n; i++) { idx[s[i] - 'a'] = i; if(idx[0] != -1 && idx[1] != -1 && idx[2] != -1){ cnt += 1+ min(min(idx[0],id...
ALGO
0.99996
5.373202
f42b25e1-e99e-42ee-acc1-2bec09f6cd4c
goldcoin/goldcoin-0.7.5
BuildDeps/deps/boost/libs/graph/example/isomorphism.cpp
#include <boost/config.hpp> #include <iostream> #include <boost/graph/isomorphism.hpp> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/graph_utility.hpp> /* Sample output: isomorphic? 1 f: 9 10 11 0 1 3 2 4 6 8 7 5 */ int main() { using namespace boost; const int n = 12; typedef adj...
ALGO
0.994875
6.298136
df345deb-d2c3-428f-b4cd-a4d82b250072
immannishanmukh/leetcode
739-daily-temperatures/daily-temperatures.cpp
class Solution { public: vector<int> dailyTemperatures(vector<int>& temperatures) { stack <int> s ; int n=temperatures.size(); // cout << n; vector<int> a(n,0); s.push(n-1); for (int i=n-2 ;i>=0 ;i--) { while (!s.empty() && temperatures[s.top()] <= tempe...
ALGO
0.999964
5.827736
cd2fa933-95a8-4690-9159-83133297ebfa
lightofaugust/rgbd-slam
src/slamBase.cpp
/************************************************************************* > File Name: src/slamBase.cpp > Author: xiang gao > Mail: <EMAIL> > Implementation of slamBase.h > Created Time: 2015年07月18日 星期六 15时31分49秒 ************************************************************************/ #include "slamBase.h" ...
ALGO
0.962557
6.059824
6bd538f8-00d1-4460-ac61-d8235d265baa
d-risck/prova04bill
Fila_Sequencial/fila.cpp
#include <iostream> #include "fila.h" void filaInit(Fila * fila) { fila->comeco = 0; fila->fim = 0; fila->tamanho = 0; } int filaIsEmpty(Fila * fila) { if (fila->tamanho == 0) { return true; } else { return false; } } int filaIsFull(Fila * fila) { if (fila->tamanho == MAX_FILA_SIZE) { return true; } el...
ALGO
0.931242
4.752169
f63a3962-8eb1-43b4-b82c-dc1dbcf41104
sinian666/codes_102_4
cpp_副本3/chapter_graph/graph_dfs.cpp
/** * File: graph_dfs.cpp * Created Time: 2023-03-02 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" #include "./graph_adjacency_list.cpp" /* 深度优先遍历 DFS 辅助函数 */ void dfs(GraphAdjList &graph, unordered_set<Vertex *> &visited, vector<Vertex *> &res, Vertex *vet) { res.push_back(vet); // 记录访问顶点 ...
ALGO
0.999953
6.036538
74d3d4c2-2522-4553-afc1-99c21e5bef65
adaptech-cz/Tesseract4Android
tesseract4android/src/main/cpp/tesseract/src/src/classify/mfoutline.cpp
#include "mfoutline.h" #include "blobs.h" #include "classify.h" #include "clusttool.h" //If remove you get caught in a loop somewhere #include "mfx.h" #include "params.h" #include <cmath> #include <cstdio> namespace tesseract { /*---------------------------------------------------------------------------*/ /** Conv...
ALGO
0.95264
5.832043
c97bb561-07da-4975-bdc4-6b8a131b5486
zhouZH704403055/Cpp_program
求有多少种方法从矩阵左上角到右下角/test.cpp
#include<iostream> long long factorial(int x) { long long ret=1; for(int i=2;i<=x;i++) { ret*=i; } return ret; } int main() { int m=0; int n=0; std::cin>>m; std::cin>>n; if(m<=0||n<=0) { std::cout<<0; return 0; } std::cout<<(factorial(m+n)/(f...
ALGO
0.999947
4.512391
cf08bda7-8598-439e-a174-206418e51ec7
loliet-L/DSA_SHEET
LeetCode/LeetCode75/9-longestPalindromWord.cpp
/* You are given an array of strings words. Each element of words consists of two lowercase English letters. Create the longest possible palindrome by selecting some elements from words and concatenating them in any order. Each element can be selected at most once. Return the length of the longest palindrome that yo...
ALGO
0.999878
6.156521
d7e86c6e-2bd4-4a7b-b145-a2d3ea583c7b
chlwnsdjs12/algorithm
Cpp/bj1003.cpp
#include <iostream> #include <vector> using namespace std; // 알고리즘은 맞으나 시간 초과가 뜸 // 알고리즘 수정 필요 struct Fibo { int sum_0, sum_1; void print() { cout << sum_0 << " " << sum_1 << "\n"; } }; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); Fibo fibo; int t, n; ...
ALGO
0.999916
3.833941
c0f6be7f-d9fa-4516-8232-eb43481fd0e5
Xander1540/Mapping-ListView-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.9988
6.76073
9cd8fa1b-48bd-44f7-b1fd-a3df5c468391
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_12818_34.cpp
#include <bits/stdc++.h> using namespace std; int main(int argc, const char* argv[]) { int n; int x; int y; int a[10000] = {}; int b; int count = 0; cin >> n >> x >> y; for (int i = 0; i < n; i++) { cin >> a[i]; } b = x - y; if (b > 0) { cout << n; } if (b <= 0) { for (int i = 0; i...
ALGO
0.999953
3.295352
d3da75bc-fe42-4624-90ac-c1225191bf10
psoumyasephali/programming-street-150
sprint3/pattern2.cpp
// * * * * * // * * * * * // * * * * * // * * * * * // * * * * * #include<iostream> using namespace std; int main(){ int n; cin>>n; for(int i=1; i<=n; i++){ for(int j=1; j<=n; j++){ cout<<"* "; } cout<<endl; } }
ALGO
0.999873
3.878118
6681df90-b9b7-40c5-a6fb-576690fcdd71
manhwork/DSA-Code-Ptit
Duyet do thi/dem_so_ao.cpp
#include <bits/stdc++.h> using namespace std; //10 12 //W........WW. //.WWW.....WWW //....WW...WW. //.........WW. //.........W.. //..W......W.. //.W.W.....WW. //W.W.W.....W. //.W.W......W. //..W.......W. int n,m; int a[105][105]; int dx[8]={-1,-1,-1,0,0,1,1,1}; int dy[8]={-1,0,1,-1,1,-1,0,1}; void ql(int i,int j){ ...
ALGO
0.999556
4.007679
bccf0534-10b2-42c0-a523-39fd21324551
IamCheng/code-in-college
Problem C Rattraps11651.cpp
#include<stdio.h> #include<set> #include<algorithm> using namespace std; int num[1000010]; int main() { int T, i; scanf("%d", &T); while(T--) { int A, N, K, B, M; scanf("%d%d%d%d%d", &A, &N, &K, &B, &M); for(i = 0; i < N; i++) { num[i] = A; A = (((...
ALGO
0.999958
3.088016
1b73186b-ca25-435a-92d5-21cf7e7442c9
neutrino2306/C-Exercises
编程基础题目集6-4 求自定类型元素的平均.cpp
#include <stdio.h> #define MAXN 10 typedef float ElementType; ElementType Average( ElementType S[], int N ); int main () { ElementType S[MAXN]; int N, i; scanf("%d", &N); for ( i=0; i<N; i++ ) scanf("%f", &S[i]); printf("%.2f\n", Average(S, N)); return 0; } ElementType Average( Ele...
ALGO
0.996223
3.608438
fed1838c-9160-444a-9427-54382e0108b5
maruti-panchal/DSA
Vector/lastOccurenceDigit.cpp
#include <iostream> #include <vector> using namespace std; int main() { vector<int> v; int size = v.size(); for (int i = 0; i < 5; i++) { int ele; cin >> ele; v.push_back(ele); } int x; cout << "Enter the number to find the Occurrence :- "; cin >> x; int occ =...
ALGO
0.999872
4.815681
b3b28fb2-659a-4dde-af92-29df62af4d1d
KeyaanKR/CSES
Sorting and Searching/Maximum_Subarray_Sum_II.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ll n, a, b; cin >> n >> a >> b; vector<ll> nums(n); for (ll i = 0; i < n; i++) cin >> nums[i]; vector<ll> prefix_sum(n + 1); prefix_sum[0] = 0; for (ll i = 1; i <= n; i++) prefix_sum[i] = prefix_sum[i - 1] + n...
ALGO
0.998376
3.290545
e167aa34-52fe-41c2-a204-ee457c2a571d
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Phi/top0-100/longest-unequal-adjacent-groups-subsequence-ii-Solution3.getWordsInLongestSubsequence/177920_nan.cpp
char **XGetFontPath( register Display *dpy, int *npaths) /* RETURN */ { xGetFontPathReply rep; unsigned long nbytes = 0; char **flist = NULL; char *ch = NULL; char *chend; int count = 0; register unsigned i; register int length; _X_UNUSED register xReq *req; LockDisplay(dpy); GetEmptyReq (GetFontPat...
ALGO
0.991801
4.045272
d197c62e-1638-458b-a7c2-fbb16af93143
rPankaj05/Leetcode_Solutions
Grouping Of Numbers - GFG/grouping-of-numbers.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution { public: int maxGroupSize(int arr[], int N, int K) { vector<int> dp(K,0); for(int i=0;i<N;i++){ int rem=arr[i]%K; ...
ALGO
0.999905
5.433946
e2274ad0-edcd-438e-9208-730245e00d0b
huakunyang/SummerTTS
eigen-3.4.0/bench/dense_solvers.cpp
#include <iostream> #include "BenchTimer.h" #include <Eigen/Dense> #include <map> #include <vector> #include <string> #include <sstream> using namespace Eigen; std::map<std::string,Array<float,1,8,DontAlign|RowMajor> > results; std::vector<std::string> labels; std::vector<Array2i> sizes; template<typename Solver,type...
TOOL
0.997945
6.326138
979388c3-862c-46d8-9bcf-8ca9f4164e97
Deep-anjali01/ACC-45Days-of-Code
Day32.cpp
#include <iostream> #include<bits/stdc++.h> using namespace std; int main() { // your code goes here int t; cin>>t; while(t--){ unsigned long long int n,c,sum=0; cin>>n; int a,b; cin>>a>>b; c=log2(n); cout<<c*a+(c-1)*b<<endl; } return 0; }
ALGO
0.998324
3.798057
d4a43b1a-f6b5-4c0b-aca0-a21aad7baea0
ugozapad/budapeshtengine
thirdparty/bullet/src/BulletSoftBody/btSoftBody.cpp
///btSoftBody implementation by Nathanael Presson #include "btSoftBodyInternals.h" #include "BulletSoftBody/btSoftBodySolvers.h" #include "btSoftBodyData.h" #include "LinearMath/btSerializer.h" #include "LinearMath/btImplicitQRSVD.h" #include "LinearMath/btAlignedAllocator.h" #include "BulletDynamics/Featherstone/btMu...
ALGO
0.965753
5.810265
000f2556-9e6c-4caa-9595-7fc801b4f27d
FauzanArrizal/Algoritma-dan-Struktur-Data-Assignment
Modul12 - Graph and Tree/Guided 2.cpp
#include <iostream> using namespace std; struct TNode { int data; TNode *left; TNode *right; TNode (int value) { data = value; left = NULL; right = NULL; } }; void preOrder(TNode *node) { if (node != NULL) { cout << node->data << " "; preOrder (node->le...
ALGO
0.999832
5.574708
2ac3c7f5-4c19-4aa1-81c2-908a267e0d14
nafi103/Solved-Problems
Practice/2024/G_Vlad_and_Trouble_at_MIT.cpp
#include <bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace std; using namespace chrono; using namespace __gnu_pbds; /********************************Macros********************************/ #define mod 1000000007 #define pb push_back #define inf 0x3f3f3f3f #de...
ALGO
0.999697
4.108958
b8c7c2ef-d509-4877-b6d0-5a781a04b709
Mrtriste/Leetcode
Solutions/240.cpp
#include <iostream> #include <string> #include <vector> #include <queue> #include <deque> #include <list> #include <stack> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <algorithm> #include <cmath> #include <memory.h> #include <functional> using namespace std; bool searchMat...
ALGO
0.999864
4.922921
cafca730-7a8d-4015-a8da-3fa179c3c132
Choyon10/Coding-Practice-C-
linklistnodedel.cpp
#include<bits/stdc++.h> using namespace std; struct Node{ int data; Node *link; }; Node *head; void insertdata(int value) { Node *tem = new Node(); tem->data = value; tem->link = NULL; if (head == NULL) head = tem; else { Node *tem1 = new Node(); tem1 = head; ...
ALGO
0.999943
3.8854
ffd9fc31-6c5c-400e-bd6a-f81b0dd07d1d
jan-kotek/mhdeal
examples/utility-demo-test/main.cpp
#include "util.h" #include "problem.h" #include "equationsMhd.h" #include "parameters.h" #include "initialConditionDummy.h" // Dimension of the problem - passed as a template parameter to pretty much every class. #define DIMENSION 3 // Type of equations, must be from the enumeration EquationsType defined in equations....
ALGO
0.999503
5.123805
e0d121e5-27c2-4979-9ed0-c981ab09ea65
JiaWenHa/CoScan_ws
src/CGAL-4.9.1/examples/QP_solver/convex_hull_containment2.cpp
// Example: check whether a point is in the convex hull of other points #include <cassert> #include <vector> #include <CGAL/Cartesian_d.h> #include <CGAL/MP_Float.h> #include "solve_convex_hull_containment_lp2.h" // choose exact floating-point type #ifdef CGAL_USE_GMP #include <CGAL/Gmpzf.h> typedef CGAL::Gmpzf ET; #e...
ALGO
0.999854
6.686131
995c26f2-1e79-4768-ad8b-16fb2e8a14fc
UjjwalSharma07/LeetCodes
239-sliding-window-maximum/239-sliding-window-maximum.cpp
class Solution { public: vector<int> maxSlidingWindow(vector<int>& nums, int k) { deque<int>q; vector<int>ans; for(int i=0; i<k; i++){ while(!q.empty() && nums[q.back()]<=nums[i]){ q.pop_back(); } q.push_back(i); } ...
ALGO
0.99999
6.086222
efde4f79-aabf-4cdf-8191-6519184639b4
solovyov-private/train-cpp
Accelerated_CPP/find_if.cpp
#include <algorithm> #include <iostream> int main () { auto myvector = {1, 2, 3, 4, 5}; auto it = std::find_if_not(myvector.begin(), myvector.end(), [](int number){return number % 2 == 0;}); if (it != myvector.end()) { std::cout << "Even element found in myvector: " << *it << '\n'; } else { std::cout ...
ALGO
0.984936
5.151041
96b8e059-a8bc-49a6-8b37-7f98baf4144f
RyuSunaga/GO
IGO_ver3/BoardManager.cpp
//BoardManagerNX̎ #include <string> #include <iostream> #include <vector> #include <cstdio> #include <cstdlib> #include "BoardManager_ver3.h" BoardManager::BoardManager() { //-----------------------------------------------񂵂gȂȂ炱 int BoardTmp[121] = { 3,3,3,3,3,3,3,3,3,3,3, 3,0,0,0,0,0,0,0,0,0,3, 3,0,0,0,0,0,0...
ALGO
0.959853
3.628598
ff2e6523-ea79-45b6-ae3d-e3f231be2507
ishandutta2007/codeforces
kmjp/normal/1523/C.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define ...
ALGO
0.999784
3.965261
8e6cb842-ea29-4f2f-90ec-4a4e694311ef
braincorp/panda_bullet_dependencies
bullet/Extras/CDTestFramework/Opcode/Ice/IceRevisitedRadix.cpp
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /** * Contains source code from the article "Radix Sort Revisited". * \file IceRevisitedRadix.cpp * \author Pierre ...
ALGO
0.999987
6.312493
1ba794ed-5a04-4f8e-8db7-e325574a77db
whdgur9121/CodeTree_PS
250723/열 단위로 반복하여 출력/print-in-column.cpp
#include <iostream> using namespace std; int main() { // Please write your code here. int n; cin >> n; for(int i = 1; i<=n; i++) { for(int k = 1; k<=n; k++) { cout << i; } cout << endl; } return 0; }
ALGO
0.999904
3.858609
c67294b9-bc90-43ba-a4ce-ef83e5545381
marble234/LAMMPS
src/USER-OMP/pair_eam_omp.cpp
/* ---------------------------------------------------------------------- Contributing author: Axel Kohlmeyer (Temple U) ------------------------------------------------------------------------- */ #include "math.h" #include "string.h" #include "pair_eam_omp.h" #include "atom.h" #include "comm.h" #include "force.h...
ALGO
0.99961
6.153506
f6e865ed-93a9-4d3f-8615-82ce06a94ccd
Dazag/ender3-pro
Marlin/src/libs/vector_3.cpp
#include "../inc/MarlinConfig.h" #if ABL_PLANAR || ENABLED(AUTO_BED_LEVELING_UBL) #include "vector_3.h" #include <math.h> /** * vector_3 */ vector_3 vector_3::cross(const vector_3 &left, const vector_3 &right) { const xyz_float_t &lv = left, &rv = right; return vector_3(lv.y * rv.z - lv.z * rv.y, // YZ...
TOOL
0.868281
6.841526
1666b964-7ffd-4155-aa61-95068b8b3509
brandonching/CSCI261
SetXC/LXC/main.cpp
/* CSCI 261: Assignment 7: Lab 7B - Starcraft * * Author: Brandon Ching * Resources: N/A * * Description: */ // Libraries #include <iostream> // For cin, cout, etc. #include "BinarySearchTree.hpp" // Library namespace using namespace std; // Constants int main() { BinarySearchTree<int> *tree = new BinaryS...
ALGO
0.996805
4.498345
22d0a68d-cbed-4a05-ad1d-e094df673e1d
nakatamaho/mplapack
mplapack/reference/Csyconv.cpp
#include <mpblas.h> #include <mplapack.h> void Csyconv(const char *uplo, const char *way, INTEGER const n, COMPLEX *a, INTEGER const lda, INTEGER *ipiv, COMPLEX *e, INTEGER &info) { // // -- LAPACK computational routine -- // -- LAPACK is a software package provided by Univ. of Tennessee, -- // -...
ALGO
0.999196
3.409407
a74bd0c8-94c3-4f41-8925-21397ad21e8c
mooncoindev/mooncoin-0.13
src/script/sign.cpp
#include "script/sign.h" #include "key.h" #include "keystore.h" #include "policy/policy.h" #include "primitives/transaction.h" #include "script/standard.h" #include "uint256.h" #include <boost/foreach.hpp> using namespace std; typedef std::vector<unsigned char> valtype; TransactionSignatureCreator::TransactionSign...
ALGO
0.940841
6.640901
830ef266-cfa6-4954-b823-9d7c10bb2abd
domibel/IonTorrent-VariantCaller
BaseCaller/TreephaserSSE.cpp
#include "TreephaserSSE.h" #include <vector> #include <algorithm> #include <math.h> #include <cstring> #include <cassert> #include "BaseCallerUtils.h" #include "DPTreephaser.h" #define SHUF_PS(reg, mode) _mm_castsi128_ps(_mm_shuffle_epi32(_mm_castps_si128(reg), mode)) #define AD_STATE_OFS (0*MAX_VALS*4*sizeof(float...
ALGO
0.997848
3.006786
04a8f348-3a51-4c0c-a7b4-1532c059069c
ishandutta2007/codeforces
heno239/normal/1137/B.cpp
#include<iostream> #include<string> #include<cstdio> #include<vector> #include<cmath> #include<algorithm> #include<functional> #include<iomanip> #include<queue> #include<ciso646> #include<random> #include<map> #include<set> #include<complex> #include<bitset> #include<stack> #include<unordered_map> #include<utility> usi...
ALGO
0.999999
3.437807
39da0cad-49f9-485c-a7f3-f594ba9f24f3
Rakshitha911/9110434198_PARVAM_CEC
c++/prgm60.cpp
#include <iostream> using namespace std; int main() { char ch; cout << "Enter a letter: "; cin >> ch; if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u') cout << ch << " is a vowel." << endl; else cout << ch << " is not a vowel." << endl; return 0; }
TOOL
0.963047
5.080863
e2c0a8e9-26bb-4ddf-957c-726fa8ab25b4
Abdullah-Builds/Data_Structures_And_Algorithms_Practice_Set_1
LAB#2/matrix_multiply.cpp
#include "matrix_multiply.h" #include<iostream> using namespace std; using namespace N; void Multiply::multi(int** arr1, int** arr2, int** res, int r, int c) { for (int i = 0; i < r; ++i) { for (int j = 0; j < c; ++j) { res[i][j] = 0; for (int k = 0; k < c;...
ALGO
0.999691
3.793289
d704daca-8cb9-4faf-88ce-d5527de638de
Nero-TheThrill/UE4_ShortTest
UnrealEngine-4.25/Engine/Source/ThirdParty/IntelTBB/IntelTBB-2019u8/examples/parallel_for/tachyon/src/triangle.cpp
/* * triangle.cpp - This file contains the functions for dealing with triangles. */ #include "machine.h" #include "types.h" #include "vector.h" #include "macros.h" #include "intersect.h" #include "util.h" #define TRIANGLE_PRIVATE #include "triangle.h" static object_methods tri_methods = { (void (*)(void *, voi...
ALGO
0.979227
7.743589
376c3991-e0a8-44f7-8d64-bfc69d63f6eb
mateuslana7/ufop-works
AEDs I/TP3/Código Fonte/pesq_binaria.cpp
#include"pesq_binaria.h" void TBinario_Construir_Binario(TBinario* binario,int num) { binario->n=0; binario->max=num; binario->v=new TDados[num]; for(int i=0; i<num; i++) { binario->v[i].cont = 0; } } void TBinario_Inserir(TBinario* binario,TDados* dados,int *comp) { int i; TDados aux; if(binario->n==binar...
ALGO
0.999035
3.749302
5bd97777-4d35-4da2-8182-575026b35629
Themis-Team/ThemisCore
src/optimizing/optimizer_simplex.cpp
/*! \file optimizer_simplex.cpp \author Avery Broderick \brief Implementation file for the optimizer_simplex class */ #include "optimizer_simplex.h" #include <stdio.h> #include <iostream> #include <fstream> #include <cmath> #include <algorithm> #include <iomanip> namespace Themis{ optimizer_simplex::optimize...
ALGO
0.999847
6.417183
ed2a696a-184f-4cd0-bc1c-ac45efd3f532
WYK15/swift-Ollvm10
libcxx/test/std/containers/sequences/forwardlist/forwardlist.modifiers/insert_after_size_value.pass.cpp
// <forward_list> // iterator insert_after(const_iterator p, size_type n, const value_type& v); #include <forward_list> #include <cassert> #include "test_macros.h" #include "min_allocator.h" int main(int, char**) { { typedef int T; typedef std::forward_list<T> C; typedef C::iterator I; ...
TEST
0.88557
4.589219
320caa42-e57a-421c-9410-17617141c515
fardosaNoor/c---lessons
searchnsort/linearserach.cpp
#include <iostream> using namespace std; int main () { /*set found to false; set position to –1; set index to 0 while index < number of elts. and found is false if list[index] is equal to search value found = true position = index end if add 1 to index end while return po...
ALGO
0.999758
4.055964
bc7d19cb-14e8-4d44-90ce-22158434634e
BrunaoW/Maquina_de_Busca
Maquina_de_busca/indice_invertido.cpp
#include "indice_invertido.h" IndiceInvertido::IndiceInvertido() { } IndiceInvertido::~IndiceInvertido() { } map<Palavra, set<Documento>>& IndiceInvertido::ObterRegistros() { return this->registros_; } void IndiceInvertido::CalcularCoordenadasParaMapaDePalavras(Documento& documento, int numeroDeDocumentos) { for ...
ALGO
0.946315
3.599097
3c8bd477-2c4e-43f0-b06e-cd6d1568459b
Mansipawar22/Data-Structure-and-Alogorithim
Data Structure & Algorithim/2. Array/p.cpp
#include<bits/stdc++.h> using namespace std; // int largest(int arr[], int size) // { // int res = 0; // for (int i = 1; i < size; i++) // { // if(arr[i] > arr[res]) // { // res = i; // } // } // return res; // } // int secondLargest(int arr[], int size) // { /...
ALGO
0.999904
4.282938
53472916-89f8-4db9-87a3-100b6114c9f6
felipe-barroso45/LPR-Class
Aula_8/Ex_2/Program.cpp
/*Defina uma struct Livro com os seguintes campos: Titulo, Autor, AnoPublicacao, NumeroPaginas e Preco. Crie um programa que permita ao usuário inserir dados de 3 livros e, em seguida, calcule e exiba o preço total dos livros cadastrados e a média de páginas dos livros.*/ #include <iostream> #include <string> using na...
TOOL
0.904358
5.578837
7401fd49-eba0-4b18-a1cc-80f6bbe3703b
Thang-ND/applied-algorithms
Mid Exam/DOI.CPP
#include <bits/stdc++.h> using namespace std; #define NMAX 1000006 int n; int a[NMAX]; int hillL; int hillR; int hill = 0; int valleyL; int valleyR; int valley = 0; void HILL() { int it=1, jt, kt; int i=1; while(i <= n-1) { it = i; while(i <= n-1 && a[i+1] > a[i]) i++; jt = i; ...
ALGO
0.999956
4.682702
4da96b14-7c43-47a9-9a72-a95227fc7ffa
arjunsingh4545/leetcode
6-zigzag-conversion/zigzag-conversion.cpp
class Solution { public: string convert(string s, int numRows) { if (numRows <= 1 || numRows >= s.size()) { return s; } // Create a vector of strings to hold each row std::vector<std::string> rows(numRows); int currentRow = 0; bool goingDown = false; ...
ALGO
0.999983
7.16086
5da28c4f-0225-4342-9a39-97b1bc421200
Chanhohoho/Algorithm
프로그래머스/Level 2/039. 모음 사전.cpp
#include <string> #include <vector> using namespace std; int answer, flag; string s = "AEIOU"; void check(int now, string word, string temp){ if(now==5) return; for(int i=0; i<5; i++){ answer++; string nowWord = temp + s[i]; if(nowWord == word){//찾았을 때 flag=1; ...
ALGO
0.999337
5.453469
fc8e5cc7-6fb6-49da-85ec-63e5cd657852
kartikeyasm/DSA
Tree/leafCount.cpp
/* template <typename T> class BinaryTreeNode { public : T data; BinaryTreeNode<T> *left; BinaryTreeNode<T> *right; BinaryTreeNode(T data) { this -> data = data; left = NULL; right = NULL; } }; void inOrder(BinaryTreeNode<int> *root, int &count){ if(roo...
ALGO
0.999165
5.711143
7b9cb838-69a5-4e41-a45e-bdf625f6f54d
MaheswariDhanisetti/GeeksforGeeks
Medium/Find the Safe Position/find-the-safe-position.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int safePos(int n, int k) { // code here if(n==1) return 1; int m = safePos(n-1,k); // shift by k if((m+k)%n==0) // this condition to avoid resu...
ALGO
0.999952
5.304469
b5828ff6-a63e-42ca-9db1-1aef488b727d
arif-03/codes
A_I_Wanna_Be_the_Guy.cpp
/*******CODE********/ #include <bits/stdc++.h> using namespace std; typedef vector<string> vstr; typedef vector<long long> vll; #define pb push_back #define ll long long #define all(v) v.begin(),v.end() #define acs(v, x) accumulate(all(v), x); #define acm(v,x) accumulate(all(v), 1,multiplies<ll>()); #define ers(num) nu...
ALGO
0.999902
3.356296
309d500c-b7dd-4402-a745-427de02e1377
wangwei2009/EventDetector
eigen/doc/special_examples/Tutorial_sparse_example.cpp
#include <Eigen/Sparse> #include <vector> typedef Eigen::SparseMatrix<double> SpMat; // declares a column-major sparse matrix type of double typedef Eigen::Triplet<double> T; void buildProblem(std::vector<T>& coefficients, Eigen::VectorXd& b, int n); void saveAsBitmap(const Eigen::VectorXd& x, int n, const char* file...
ALGO
0.997317
5.429372
7e933eef-e9aa-468a-a076-b7fc9d900f36
qihaoqian/ECE285Project
sdf/eigen-3.3.7/unsupported/doc/examples/MatrixPower.cpp
#include <unsupported/Eigen/MatrixFunctions> #include <iostream> using namespace Eigen; int main() { const double pi = std::acos(-1.0); Matrix3d A; A << cos(1), -sin(1), 0, sin(1), cos(1), 0, 0 , 0 , 1; std::cout << "The matrix A is:\n" << A << "\n\n" "The matrix power A^(pi/4) is:\n"...
ALGO
0.999765
3.789887
bf53fea1-cab9-4946-9f56-d074802d6d6e
ishandutta2007/codeforces
everule/normal/1393/B.cpp
#include <iostream> #include <bits/stdc++.h> #define mp make_pair #define pb push_back using namespace std; using ll = long long int; template<typename T> ostream& operator+(ostream& out, const vector<T> &vec){ for(const auto &x : vec){ out<<x<<" "; } out<<"\n"; return out; } template<typename T...
ALGO
0.999997
4.2409
ddf2df8c-bc43-472e-a633-55665eb9cba5
ishandutta2007/codeforces
neal/normal/1463/C.cpp
#include <algorithm> #include <array> #include <cassert> #include <chrono> #include <cmath> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <vector> using namespace std; template<typename A, typ...
ALGO
0.99993
5.238576
8a18aa56-a3e7-4940-ae29-3fc98a231eac
ishandutta2007/codeforces
danya.smelskiy/normal/864/B.cpp
#include <bits/stdc++.h> using namespace std; int n,ans; string s; int dp[205]; inline void solve(string ss){ for (int i=0;i<26;++i) dp[i]=0; for (int i=0;i<ss.size();++i) ++dp[ss[i]-'a']; int res=0; for (int i=0;i<26;++i) if (dp[i]) ++res; ans=max(ans,res); } int main(){ ...
ALGO
0.99994
4.262075
5225b63c-16a4-43e8-8351-c826b0b5613f
shinobisoft/android_frameworks_av
media/libstagefright/codecs/amrwb/src/voice_factor.cpp
/* ------------------------------------------------------------------------------ Filename: voice_factor.cpp Date: 05/08/2007 ------------------------------------------------------------------------------ REVISION HISTORY Description: ------------------------------------------------------------------------...
ALGO
0.999605
5.889938
89ec5274-2d9a-4ca1-9d23-851b9820cc2c
sczzq/symmetrical-spoon
leetcode/docu/cppsort.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { std::vector<int> v{5, 7, 4, 2, 8, 6, 1, 9, 0, 3}; std::sort(v.begin(), v.end()); for(auto x : v) cout << x << ' '; cout << '\n'; v = {1}; std::sort(v.begin(), v.end()); for(auto x : v) cout << x << ' '; cout <...
ALGO
0.999589
4.294294
58c3bd2a-758c-4707-a0bf-0730bd375b80
UCL/COMP0130_22-23_Topic_03
Coursework_03/Source/ThirdParty/g2o/g2o-master/g2o/examples/bal/bal_example.cpp
#include <Eigen/Core> #include <Eigen/Geometry> #include <iostream> #include "g2o/EXTERNAL/ceres/autodiff.h" #include "g2o/core/auto_differentiation.h" #include "g2o/core/base_binary_edge.h" #include "g2o/core/base_vertex.h" #include "g2o/core/batch_stats.h" #include "g2o/core/block_solver.h" #include "g2o/core/optimi...
ALGO
0.987304
6.516361
7ce940c2-2d85-413e-bd6f-86db2bd09f08
unusable/quickbms
libs/ppmd/unppmdi.cpp
// modified and fixed by Luigi Auriemma for memory2memory decompression (rev2) // note that the original code is... horrible and not only not portable but even // incompatible using some tunes or optimizations (for example -mtune can't be used) // I hope to have fixed it a bit but it's probably simpler to rewrite every...
ALGO
0.996736
3.785498
40bf30f6-e44f-436f-8f97-f1be5f05dcff
shahinsafaroff/cpp
pointers_for__array_size_enlargening/main.cpp
#include <iostream> using namespace std; void resizeArray(int *&array, int currentSize, int newSize){ int *temp = new int [newSize]; for (int i = 0; i < currentSize; ++i){ temp[i] = array[i]; cout<<array[i]<<" "; } cout<<endl; delete [] array; array = temp; for (int i = 0; i...
ALGO
0.934268
3.472727
cd565e46-8c08-4200-ae8d-c2b6411184c8
davidand36/libEpsilonDelta
calendar/CopticCalendar.cpp
#include "CopticCalendar.hpp" #include "Assert.hpp" #include "DivMod.hpp" #include "CalendarLibText.hpp" using namespace std; namespace EpsilonDelta { //namespace EpsilonDelta //***************************************************************************** static c...
ALGO
0.971806
5.75141
258cf7a1-7e5a-4859-975b-8875ac75b3c5
barnaba/cppp
1.4.2/1.13.1.cpp
#include <iostream> int main() { for (int i = 50; i <= 100; i++) std::cout << i << " "; std::cout << std::endl; }
TOOL
0.89798
3.011353
21ab9a9d-335f-486d-8421-b9ad8c6eccc0
Mrsuyi/algorithm
leetcode/297.cpp
#include <iostream> #include <vector> #include <stack> #include <string> #include <unordered_map> #include <unordered_set> #include <set> #include <algorithm> #include <queue> #include <deque> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), ri...
ALGO
0.997687
4.583137
568fc67b-322f-4cea-a3d9-7b1eac4c1c81
Felle33/Competitive-Programming
usaco/gold/graphs/dsu/RoadConstruction.cpp
#include <algorithm> #include <iostream> #include <cmath> #include <vector> #include <queue> #include <cstring> #include <unordered_map> #include <map> #include <set> #include <iomanip> #define all(x) (x).begin(), (x).end() typedef long long ll; using namespace std; const ll MOD = 1e9 + 7; const ll DIM = 1e6; const ...
ALGO
0.999971
4.652204
cea45026-efeb-42d8-9007-1cdd775b2489
keijak/comp-pub
atcoder/typical90/090/main.cpp
#include <bits/stdc++.h> #define REP_(i, a_, b_, a, b, ...) \ for (int i = (a), END_##i = (b); i < END_##i; ++i) #define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__) #define ALL(x) std::begin(x), std::end(x) using i64 = long long; #include <boost/multiprecision/cpp_int.hpp> // using i128 = boost::mu...
ALGO
0.999968
4.327787
1387bd9c-579f-495a-8265-980593b399ce
trilinos/Trilinos
packages/percept/src/percept/stk_rebalance_utils/RebalanceUtils.cpp
#include <percept/stk_rebalance_utils/RebalanceUtils.hpp> #include <stk_util/parallel/ParallelReduce.hpp> #include <stk_mesh/base/GetEntities.hpp> #include <stk_mesh/base/Field.hpp> //#include <stk_mesh/base/FieldData.hpp> #include <stk_mesh/base/Entity.hpp> #include <stk_mesh/base/BulkData.hpp> //-------------------...
TOOL
0.912875
5.696185
9d5330ab-a9e5-415a-bd49-316a36819556
hzfsls/leetcode-supercrawl
data/1908.game-of-nim/code_snippets/sol.cpp
class Solution { public: bool nimGame(vector<int>& piles) { } };
ALGO
0.999582
5.180366
046b616a-5795-4763-a281-d7ebe20efed4
Meantint/Baekjoon
Silver III/BOJ_14562/BOJ_14562.cpp
#include <iostream> #include <queue> #include <vector> using namespace std; int n; int BFS(int s, int t) { queue<pair<pair<int, int>, int>> q; q.push(make_pair(make_pair(s, t), 0)); while (!q.empty()) { int start = q.front().first.first; int target = q.front().first.second; int c...
ALGO
0.99995
4.930404
61424e67-588d-48af-8680-e99ae929661e
SeokhunEom/Coding_Test
Baekjoon code/2577.cpp
#include <stdio.h> int main() { int a, b, c, product; int n[10] = {0, }; scanf("%d %d %d", &a, &b, &c); product = a * b * c; while(product) { n[product % 10]++; product /= 10; } for(int i = 0; i < 10; i++) { printf("%d\n", n[i]); } return 0; }
ALGO
0.999942
4.17552
6d59f196-8191-432f-8569-499a692f290a
prajwalbagewadi/Cplusplus_Activity_01-26-01-2024-
acvitity/newcode27_1_24.cpp
#include<iostream> #define N 9 using namespace std; int arr[N][N]={ /* original matrix: // 0 1 2 3 4 5 6 7 8 { 9, 0, 0, 4, 0, 0, 0, 1, 6}, //0 { 7, 3, 0, 2, 0, 0, 9, 5, 0}, //1 { 0, 6, 4, 0, 0, 0, 7, 0, 0}, //2 { 0, 0, 0, 0, 9, 0, 0, 3, 2}, //3 { 0, 0, 0, 5, 0, 1, 0, 0, 0}, //4 { 6, ...
ALGO
0.999673
4.360545
e23f2397-df3f-44d3-94b2-cc4fa1501d97
bbercovici/SBGAT
SbgatCore/source/SBGATObs.cpp
#include <SBGATObs.hpp> #include <SBGATMassProperties.hpp> vtkStandardNewMacro(SBGATObs); //---------------------------------------------------------------------------- // Constructs with initial 0 values. SBGATObs::SBGATObs(){ this -> SetNumberOfOutputPorts(0); this -> SetNumberOfInputPorts(1); } SBGATObs::~SB...
ALGO
0.850344
5.976173
1e1aa58a-23a2-4b2d-9d24-514f5bf866a7
binayuchai/DSA-practice-
Matrix/SearchingItemInMatrix/search(O(N)).cpp
//Time complexity : O(N) // Space Complexity : O(1) #include<bits/stdc++.h> #include<conio.h> using namespace std; #define N 3 void display(int matrix[][N]) { for(int i=0; i<N; i++) { for(int j=0; j<N; j++) { cout<<matrix[i][j]<<" "; } cout<<endl; } } // Searching Element void SearchItem(int matrix[][N...
ALGO
0.999159
4.033914
75e164a5-0abf-4a3b-b291-83327e7701b7
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_10871_14.cpp
#include <bits/stdc++.h> using namespace std; template <class T> int size(const T& a) { return a.size(); } using ll = long long; bool SetMax(ll& a, ll b) { if (a < b) return false; a = b; return true; } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; vector<int> a(n);...
ALGO
0.999984
4.408325
bfd3537a-b519-49cc-9a22-6551cd0dfb89
LMODroid/platform_external_skia
src/core/SkChecksum.cpp
#include "src/core/SkChecksum.h" #include <cstring> // wyhash, a fast and good hash function, from https://github.com/wangyi-fudan/wyhash // likely and unlikely macros #if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__) #define _likely_(x) __builtin_expect(x, 1) #define _unlikely_(x) __builtin_e...
ALGO
0.994338
6.149329
5c6b79ee-876b-43d6-87e1-0bcf4f16f94a
william1lai/UVa-OJ-Problems
11150.cpp
#include <iostream> using namespace std; int main() { int dp[601]; dp[0] = 0; dp[1] = 0; dp[2] = 1; for (int i = 3; i <= 600; i++) { dp[i] = (i / 3) + dp[(i / 3) + (i % 3)]; } int n; while (cin >> n) { cout << dp[n*3] << "\n"; } return 0; }
ALGO
0.999785
3.498132
dbacf878-e8cb-4f7e-a1d7-98624e9507f0
ishandutta2007/codeforces
origenes/normal/1373/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define FOR(i, a, b) for (int (i) = (a); (i) <= (b); (i)++) #define ROF(i, a, b) for (int (i) = (a); (i) >= (b); (i)--) #define REP(i, n) FOR(i, 0, (n)-1) #define sqr(x) ((x) * (x)) #define all(x) (x).begin(), (x).end() #de...
ALGO
0.99909
4.681897