uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
4e6b37e6-2096-452c-9a7e-b97a81e4623d
bill2766/patGo
1043/1043. advanced.cpp
#include <cstdio> #include <vector> using namespace std; bool isMirror; vector<int> pre, post; void getpost(int root, int tail) { if(root > tail) return ; int i = root + 1, j = tail; if(!isMirror) { //ๆญฃๅธธ็š„ๅ‰ๅบ while(i <= tail && pre[root] > pre[i]) i++; while(j > root && pre[root] <= pre[j]) j...
ALGO
0.999999
3.701421
533a712e-2deb-4a2b-abb7-b4d1bf8fcc4d
oosuiw/orb_slam3_ros-melodic
orb_slam3/Thirdparty/g2o/g2o/types/se3mat.cpp
#include "se3mat.h" namespace g2o { void SE3mat::Retract(const Eigen::Vector3d dr, const Eigen::Vector3d &dt) { t += R*dt; R = R*ExpSO3(dr); } Eigen::Matrix3d SE3mat::ExpSO3(const Eigen::Vector3d r) { Eigen::Matrix3d W; W << 0, -r[2], r[1], r[2], 0, -r[0], -r[1], r[0], 0; const...
ALGO
0.940506
6.890913
592e1aff-f0dc-4fa5-a2ae-a6de96607d8e
TushalKaklottar/math_calculator
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
3f045ee4-8146-49e6-be1b-a06845d0afe8
Halleys123/Codeforces
900/AlicesAdventuresinChess/AlicesAdventuresinChess.cpp
#ifdef LOCAL #include <fstream> #include <ostream> #include <istream> #endif #include <iostream> #define N 1 #define S -1 #define E 1 #define W -1 void solution() { int n, a, b; int x = 0, y = 0; std::cin >> n >> a >> b; std::string str; std::cin >> str; bool check = false; char c; for (int i = 0; i < 20; i+...
ALGO
0.999857
4.104623
fdecd40a-5fb4-4ca2-ae34-a25c8e58258f
ishandutta2007/codeforces
m_99/normal/1633/A.cpp
#include <stdio.h> #include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) #define Inf 1000000001 int main(){ int _t; cin>>_t; rep(_,_t){ int n; cin>>n; while(n%7!=0){ n++; if(n%10==0)n-=10; } cout<<n<<endl; } return 0; }
ALGO
0.999774
3.446933
2d789587-7d62-42da-bb79-3e6fc14de430
CppKarim/Competitive-Programming
CSES/Sorting/appartments.cpp
#include <iostream> #include <cmath> #include <vector> #include <algorithm> #include <iterator> #include <string> using namespace std; typedef long long ll; int main() { ll g=0,n, m, k;cin >> n >> m >> k; ll t;vector<ll>tenant; for (auto i = 0;i < n;i++) { cin >> t; tenant.push_back(t); } vector<ll>flat;for (auto ...
ALGO
0.999963
3.739633
0f527618-c9b4-4fbd-b7f7-5d8b40cf85c9
TomaSajt/prog-solutions
codeforces/problemset/1217D - Coloring Edges.cpp
#include <bits/stdc++.h> #define pb push_back #define speed ios::sync_with_stdio(0),cin.tie(0),cout.tie(0) using namespace std; #define int long long int n, m, a, b, kellkettooo = 0; vector<int> entered, leaved, is_back_edge; vector<vector<pair<int, int> > > g; void dfs(int u) { entered[u] = 1; for (auto w :...
ALGO
0.999871
4.110214
25db18b5-fb09-4ad7-ad02-971226323a9d
TTP1128/wangjunrui-s-code
็ฌฌไบŒ่ฝฎๅˆท้ข˜/2.kmp/zoo.cpp
#include<cstdio> #include<cstring> #define re register using namespace std; const int mod=1000000007,N=1e6+5; int num[N],p[N]; char s[N]; inline void solve() { scanf("%s",s+1); int len=(int)strlen(s+1),ans=1; num[1]=1; for(re int i=2,j=0,t=0; i<=len; ++i) { while(j&&s[i]!=s[j+1]) j=p[j]; if(s[i]==s[j+1]) ...
ALGO
0.999978
4.34645
cf4f5dba-0728-4e02-94d2-3d3da71743a8
alexleeucsc/cse216proj
firrtl-sig-klee/kleetests/klee_shr/generated_cpp_files/klee_shiftright_176_6.cpp
#include <array> #include "uint.h" #include "sint.h" #include <iostream> #include "klee.h" #include <assert.h> #include <algorithm> template<int w1, int w2> void callshr() {{ uint64_t a; uint64_t b; klee_make_symbolic(&a, sizeof(a), "a"); klee_make_symbolic(&b, sizeof(b), "b"); a = a & ((1 << w1...
ALGO
0.914387
5.121899
e8b8d222-c043-4bf4-84d6-b4a3766ae573
deliciousqoo/CodingStudy
Coding_Study/Coding_Study/bj_2231.cpp
/* * 2231 * ฮธฦฎ * 20240228 */ #include <iostream> #include <string> using namespace std; int calculator(int num) { int total = 0; string temp = to_string(num); for (int i = 0; i < temp.size(); i++) { total += temp[i] - '0'; } return num + total; } int main() { int N; cin >> N; int ans = 0; for (int i ...
ALGO
0.999881
4.477361
8e90d647-f480-41d6-8886-6cc2331b1edc
czb53090/C
14-ๅ†’ๆณกๆŽ’ๅบ๏ผˆ็”ฑๅคงๅˆฐๅฐ๏ผ‰ๅนถๆ’ๅ…ฅไธ€ไธชๆ•ฐไฟๆŒๆŽ’ๅบ.cpp
# include <stdio.h> # include <stdlib.h> int main(void) { int a[11] = {2, 3, 23, -8, -1, 0, 5, 22, 10, 55}; int i, j, t, x; // for (i=0; i<10; i++) printf("%d ", a[i]); printf("\n"); //--ษดะก printf("ฮช\n"); for (i=0; i<10; i++) for (j=0; j<9-i; j++) if (a[j] < a[j+1]) { t = a[j]; a[j] = a[j+1...
ALGO
0.9998
3.298086
2666b8c0-5e91-46ee-831d-a405909fe9ea
rio137/Codeforces_solve
427_D2_A_Police_Recruits.cpp
#include<bits/stdc++.h> using namespace std; int main() { int sizes,hired=0,untreated=0; cin>>sizes; int arr[sizes]; for(int i=0;i<sizes;i++) { cin>>arr[i]; if(arr[i]>=0) { hired+=arr[i]; } else if(arr[i]==-1) { if(hired>0) ...
ALGO
0.999927
3.682965
873d8bab-2ab7-4a89-89df-62e4040a2a72
pranavms13/Rixe
src/cryptonote_basic/miner.cpp
#include <sstream> #include <numeric> #include <boost/utility/value_init.hpp> #include <boost/interprocess/detail/atomic.hpp> #include <boost/algorithm/string.hpp> #include "misc_language.h" #include "syncobj.h" #include "cryptonote_basic_impl.h" #include "cryptonote_format_utils.h" #include "file_io_utils.h" #include ...
TOOL
0.965841
6.960347
58609eee-4412-47d6-ac33-a003acc70f27
nicole8806/src
FDM/JSBSim/models/FGAerodynamics.cpp
#include <iostream> #include <sstream> #include <iomanip> #include <cstdlib> #include "FGFDMExec.h" #include "FGAerodynamics.h" #include "input_output/FGPropertyManager.h" #include "input_output/FGXMLElement.h" using namespace std; namespace JSBSim { IDENT(IdSrc,"$Id: FGAerodynamics.cpp,v 1.55 2014/09/03 17:26:28 b...
ALGO
0.86074
4.1351
c9b5cecd-03a5-4b26-a56a-c9982c4a9167
xiaoxistudy/work
av/media/libstagefright/codecs/amrnb/common/src/lsp_lsf.cpp
/* Pathname: ./audio/gsm-amr/c/src/lsp_lsf.c Functions: Lsp_lsf Lsf_lsp ------------------------------------------------------------------------------ REVISION HISTORY Description: Updated template used to PV coding template. Description: Deleted variables listed in the Local Stores Needed/Modified ...
ALGO
0.999161
6.377015
aa51132e-2c69-420c-b5c6-eff2d53c74a9
fatchat/genstats
math/buckets.cpp
#include <stdexcept> #include "math/buckets.h" namespace Stat { Buckets::Buckets(size_t npositions, size_t nletters) : buckets_(npositions) , created_(false) , column_total_(0) { create_(nletters); } void Buckets::create_(size_t nletters) { if(created_) throw std::runtime_error("...
TOOL
0.951306
6.544662
16a715b9-1bfc-4332-9f83-6fb63d0d065f
Nakib-Arman/CSE318---ArtificialIntelligence
3.ChainReaction/.history/main_20250615091959.cpp
#include <bits/stdc++.h> using namespace std; #define DEPTH 2 class Cell { int orb_num; int critical_mass; char color; public: Cell() { this->orb_num = 0; this->color = 'W'; this->critical_mass = 4; } // Cell(int orb_num, char color) { // this->orb_num = orb_...
ALGO
0.9992
4.651039
1a695e03-6eaa-495b-9973-7d5664e2f22e
agrmadhav/datasSructuresAndAlgo
heaps/using_stl.cpp
#include<bits/stdc++.h> using namespace std; int main(){ priority_queue<int> maxheap; maxheap.push(4); maxheap.push(456); maxheap.push(45); maxheap.push(93); maxheap.push(2); priority_queue <int,vector<int>,greater<int> >minheap; minheap.push(4); minheap.push(456); minheap.pus...
ALGO
0.997562
3.699254
aa58ebad-9b40-4159-b708-835fbb8cfdf8
sa-y-an/leetAction
solutions/problems/wiggle_subsequence/solution.cpp
class Solution { vector <vector <int>> dp; public: int longestLen(vector <int> &nums, int idx, int prev, int wiggle){ int n = nums.size(); if( idx == n ) return 0; if( dp[idx][prev] != -1 ) return dp[idx][prev]; int take = 0, diff = ...
ALGO
0.999987
5.537152
224a0047-2315-4b93-b0a2-1851423e5b69
joaopedronardari/URIOnlineJudgeAnswers
Category1/1044.cpp
#include<iostream> using namespace std; int main(){ int a,b; cin >> a >> b; if (a%b == 0 || b%a == 0) cout << "Sao Multiplos" << endl; else cout << "Nao sao Multiplos" << endl; return 0; }
ALGO
0.999735
3.801669
dd56ac63-b5d2-4272-9728-2930cb8454c8
iliao8/Laboratornie-rabotu
1 ะปะฐะฑะฐ 2 ะทะฐะดะฐะฝะธะต.cpp
#include<iostream> #include <string> using namespace std; int main() { setlocale(0,""); double x; cout<<"ะ’ะฒะตะดะธั‚ะต ั‡ะธัะปะพ ะดะปั ะฟั€ะพะฒะตั€ะบะธ \n"; cin>>x; if(x>0){ cout<<"ะงะธัะปะพ ะฟะพะปะพะถะธั‚ะตะปัŒะฝะพะต\n"; }else if(x<0){ cout<<"ะงะธัะปะพ ะพั‚ั€ะธั†ะฐั‚ะตะปัŒะฝะพะต \n"; }else if(x == 0){ cout<<"ะงะธัะปะพ ัะฒะปัะตั‚ัั ะฝัƒะปั‘ะผ \n"; }else{ cout<<"ะ’ั‹ ะฒะฒะตะปะธ ะฝะตะธะทะฒะตัั‚...
ALGO
0.9983
3.137126
e3230956-cfe7-4285-921c-c2695e65f362
untuned07/CodeChef
FillCandies.cpp
// Codechef Problem: https://www.codechef.com/problems/FILLCANDIES #include <iostream> using namespace std; int main() { // your code goes here int t, n, k, m; cin >>t; while(t--){ cin >>n >>k >>m; int h = k*m; if (n % h ==0){ cout <<n/h <<endl; }else{ cout<< (n/h)+1 <<endl; ...
ALGO
0.999926
3.881938
67ad7264-a325-41fc-af19-ac07ea9c5c13
gchaperon/cracking-the-coding-interview
legacy/src/01-arrays-and-strings/04-palindrome-permutation.cpp
#include <algorithm> #include <string> #include <unordered_map> #include <utility> #include <catch2/catch_test_macros.hpp> bool is_ascii_letter(unsigned char c) { return (c >= 65 && c <= 90) || (c >= 97 && c <= 122); } bool is_palindrome_permutation(std::string str) { std::transform(begin(str), end(str), begin(str)...
ALGO
0.951695
6.90257
3bc8b3c5-2130-4711-8c40-425ebb1ca29c
RadonX-MM/frameworks_av
media/libstagefright/codecs/amrnb/dec/src/d_plsf_3.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/d_plsf_3.c Functions: D_plsf_3 ------------------------------------------------------------------------------ INPUT AND OUTPUT DEFINITIONS Inputs: st -- Pointer to type struct D_plsfState mo...
ALGO
0.999461
6.625631
fc828ea0-4ff0-4d97-8fef-53f0831eb4d2
jurbn/mrgcv-pacs
lab2/exercise_3/matrixmult_gettime.cpp
#include <iostream> #include <cstdlib> #include <sys/time.h> using namespace std; int main(int argc, char *argv[]) { // clock_t time; // time = clock(); struct timeval start, end, start_mult, end_mult; gettimeofday(&start, NULL); int N = std::atoi(argv[1]); int i, j, k; // Memory alloca...
ALGO
0.998102
3.561769
6e41a25c-fede-4990-8a4b-0f2748e34e24
itonyluke/cpp_modules
08/ex00/main.cpp
#include "easyfind.hpp" int main(void) { std::cout << GREY << START_END << WHITE << std::endl; std::list<int> lst1; lst1.push_back(2); lst1.push_back(7); lst1.push_back(22); lst1.push_back(11); lst1.push_back(34); int n = 7; std::list<int>::const_iterator itl = easyfind(lst1, n); if (*itl == n) { std::c...
ALGO
0.979737
4.69102
444d7386-e010-476e-9bd0-bf9f6ef9e634
GuacheSuede/MSSubmission1234567890
submission/sma/boost_1_69_0/libs/hana/benchmark/fold_left/execute.std.array.erb.cpp
#include "measure.hpp" #include <array> #include <cstdlib> #include <numeric> int main () { boost::hana::benchmark::measure([] { long long result = 0; for (int iteration = 0; iteration < 1 << 10; ++iteration) { std::array<int, <%= input_size %>> values = {{ <%= input_siz...
TEST
0.897561
3.801625
ddc8516e-29f1-4e59-8a31-d95e8e89a060
DanBarbu/PHES_Searching
src/pretty_set.cpp
#include "phes_base.h" int display = false; vector<vector<Pair>> pairs; bool check_reservoir(Reservoir& reservoir, Model<bool>* seen, vector<ArrayCoordinate> *used_points, BigModel& big_model){ Model<short>* DEM = big_model.DEM; Model<char>* flow_directions = big_model.flow_directions[0]; for(int i = 0; i<9; i++...
ALGO
0.919926
4.482166
97e1d647-47c5-4cc6-beda-07718f19b9e0
hisaos/AtCoder-AC
ABC/149_C.cpp
#include<iostream> using namespace std; bool isPrime(int x); int main() { int x; cin >> x; while(1) { if (isPrime(x)) break; x ++; } cout << x << endl; return 0; } bool isPrime(int x) { if (x == 2) return true; if (x % 2 == 0) return false; for (int i = 2; i < x / 2; i ++) if (...
ALGO
0.999343
3.931554
6747034d-bb06-42cb-9208-d65f6b1b331a
twenj/cprogram
C++ Primer Plus/5.4 formore.cpp
// formore.cpp -- more looping with for #include <iostream> const int ArSize = 16; // example of external declaration int main() { long long factorials[ArSize] {}; factorials[1] = factorials[0] = 1LL; for (int i = 2; i < ArSize; i++) factorials[i] = i * factorials[i - 1]; for (int i = 0...
ALGO
0.997895
3.35935
c40e4bf4-e08f-4864-89b1-28a918360882
igorbragaia/algorithms
interviewbit/Greedy Algorithm/Distribute-Candy.cpp
int Solution::candy(vector<int> &A) { vector<int>candies(A.size(),0); vector<int>minimosLocais; if(A[0] <= A[1]){ minimosLocais.push_back(0); candies[0]=1; } for(int i = 1; i<(int)A.size()-1;i++){ if(A[i] <= A[i-1] and A[i] <= A[i+1]){ minimosLocais.push_back...
ALGO
0.999987
5.367385
a5c7198c-54a6-49bc-a354-6c7e718a2fb4
parthvekariya73/DSA-all-Concept-Code
DSA C++/28 Refernce Varible & Static vs Dynamic Memory.cpp
#include<iostream> using namespace std; void update(int n) { n++; } void update2(int& n) { // int& n as Referance Variable.. n++; } // Bad practic :- /*int& func(int a) { int num = a; int& ans = num; return ans; } int* fun(int n) { int* ptr = n; return ptr; }*/ int getsum(int *arr, int n) { int sum = 0; fo...
ALGO
0.991887
3.909071
1b1967c5-3cc3-4030-8a58-6c511f205c75
nekrotzar/luciart
src/geometry/patch.cpp
#ifdef __APPLE__ #include "patch.h" #else #include "geometry/patch.h" #endif PolygonPatch::PolygonPatch(){ Polygon(); } PolygonPatch::PolygonPatch(int num, std::vector<Vec3> &v, std::vector<Vec3> &n, const Material &m){ Polygon(num, v ,m); normals = n; } bool PolygonPatch::intersect(const Ray &ra...
TOOL
0.891208
5.853685
2dbd79bc-4ca6-4fbe-b5d5-66b3a945940c
raincross7/code-similarity
codes/train_code/problem468/problem468_205.cpp
#define _GIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(v) v.begin(), v.end() using namespace std; using ll = long long; using P = pair<int, int>; int main(void) { int X, A; cin >> X >> A; if (X < A) { cout << 0 << endl; } else { ...
ALGO
0.998549
3.272919
a6764204-c7fd-4e39-b87d-d75674449050
chrisduvivier/webserv
srcs/ServerConfig.cpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ServerConfig.cpp :+: :+: :+: ...
CONFIG
0.982731
5.061518
4228fc02-cb4e-4850-9989-c2e47b3c8a71
Om21610018/DSA-Codes
Dynamic Prograrmming/mcoins.cpp
#include <bits/stdc++.h> using namespace std; int main() { int k, l, m; cin >> k >> l >> m; vector<bool> dp(1000005, 0); dp[1] = 1; dp[k] = 1; dp[l] = 1; for (int i = 2; i <= 1000000; i++) { if (i == k || i == l) continue; dp[i] = !(dp[i - 1] and ((i - k >= ...
ALGO
0.999953
3.984189
dbf84c59-305c-4516-9aa8-55e3ef0b5052
RajV95/DAA
October 30th/30_10_23_Q4.cpp
// DFS CONNECTEDNESS // DFS IMPLEMENTATION #include<bits/stdc++.h> using namespace std; vector<int> ans; void dfs(vector<vector<int>> &a,int n,vector<int> &visited) { ans.push_back(n); visited[n]=1; for(int i=0;i<a[n].size();i++) { if(visited[i]!=1 && a[n][i]!=0) { dfs(a,i,...
ALGO
0.999839
4.874066
d93c20b7-c8d3-424a-ac21-3ed2d9996827
ser94mor/sensor-fusion
third_parties/eigen-3.3.7/bench/sparse_setter.cpp
//g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.005 -DSIZE=10000 && ./a.out //g++ -O3 -g0 -DNDEBUG sparse_product.cpp -I.. -I/home/gael/Coding/LinearAlgebra/mtl4/ -DDENSITY=0.05 -DSIZE=2000 && ./a.out // -DNOGMM -DNOMTL -DCSPARSE // -I /home/gael/Coding/LinearAlgebr...
ALGO
0.981176
4.156673
a381e4d7-eb0f-4af6-b214-f195eb748576
danchesler/Problems
numIslands.cpp
/* Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water. */ void dfs(vector<vector<char>>& M, int y, int x) { vec...
ALGO
0.999976
6.616796
a6e2b154-8345-4c87-942f-6772557bd9ed
nelsonifechukwu/Data-structures-and-visualizing-algorithms
Think like a Programmer/binary-trees.cpp
#include <iostream> #include <stdlib.h> #include <string.h> class binaryTree { public: int countLeaves(); private: struct binaryTreeNode { int data; binaryTreeNode *right; binaryTreeNode *left; }; typedef binaryTreeNode *treePtr; treePtr _root; int privateCountLeaves(treePtr rootPtr); }; int ...
ALGO
0.99846
5.584075
3b328ef8-94fc-4522-b4e7-2ba205c0d4db
raincross7/code-similarity
codes/train_code/problem198/problem198_442.cpp
#include<bits/stdc++.h> using namespace std; int main() { string a,b; int i; cin>>a>>b; if(a.size()==b.size()) { for(i=0; i<a.size(); i++) { cout<<a[i]<<b[i]; } } else if(a.size()>b.size()) { for(i=0; i<b.size(); i++) { cout<<a[i]<<b[i]; } cout<<a[...
ALGO
0.999903
3.386393
8930f742-8e05-4cd5-ba87-8c69b288ee3e
Sumit11Rawat/Leetcode_codes
15-3sum/3sum.cpp
class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>>fans; set<vector<int>>s; sort(nums.begin(),nums.end()); for(int i=0;i<nums.size();i++){ int j=i+1; int k=nums.size()-1; while(j<k){ int sum=nums...
ALGO
0.999928
5.781514
b2400ec9-5ea9-4801-8cb4-227499d8ef43
vivkumar2830/dp
string subsequences/edit_distance.cpp
#include<bits/stdc++.h> using namespace std; // int ed(int i , int j , string &s1 , string &s2 , vector<vector<int>> &dp){ // if( i < 0) return j+1; // if( j < 0) return i+1; // if(dp[i][j] != -1){ // return dp[i][j]; // } // if( s1[i] == s2[j] ){ // return dp[i][j] = ed(i-1 , j-1...
ALGO
0.999974
5.393515
a2d0f8b3-83eb-41a0-a001-9f51273e3367
Time1ess/MyCodes
CtCI/18.12-Max Sum of Sub Matrix/solution2.cpp
class SubMatrix { public: void precompute_sums(vector<vector<int>>& mat, vector<vector<int>>& sums, int n) { for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { if(i == 0 && j == 0) { sums[i][j] = mat[i][j]; } else if(i == 0) { ...
ALGO
0.999969
5.098435
c03241b3-1b57-4593-a6a2-ba984a35155d
k1nsenka/atcoder
code/archive/Discount_fare.cpp
#include"bits/stdc++.h" using namespace std; int main(){ int X, Y; cin >> X >> Y; cout << X + Y / 2 << endl; return 0; }
ALGO
0.998496
3.090977
34ea73a9-9f29-4e56-a76a-895f76cd372f
miiitomi/atcoder
ABC/abc263/d.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll N, L, R; cin >> N >> L >> R; vector<ll> A(N); for (int i = 0; i < N; i++) cin >> A[i]; vector<ll> S(N+1, 0); for (int i = 0; i < N; i++) { S[i+1] = S[i] + A[i]; } vector<ll> Y(N+1, 0); ll n...
ALGO
0.999875
3.100049
3b7e7307-96f2-4235-8b42-80bb5892e2a0
duynm07/leetcode-solution-v2
1xxx/1887-ReductionOperationsToMakeTheArrayElementsEqual/1887.cpp
#include <iostream> #include <queue> #include <stack> #include <unordered_map> #include <vector> using namespace std; class Solution { public: int reductionOperations(vector<int> &nums) { sort(nums.begin(), nums.end(), greater()); int ans = 0; for (int i = 1; i < nums.size(); i++) ...
ALGO
0.999892
5.613448
f7c69886-b49d-4ddd-aa5b-98cb642c2c32
CRYPTOcoderAS/OLD-CPP-Programs
stacks.cpp
#include <cstdlib> #include <iostream> #include<conio.h> #include<process.h> using namespace std; int Pop(int[],int &); int Push(int[],int&,int); void display(int[],int); const int size = 50; int main() { int Stack[size],item,top=-1,res; char ch='y'; while(ch=='y'||ch=='Y') { cout<<"\nEnter item for inse...
ALGO
0.99912
3.899961
ad123ecd-54ae-4782-a821-f6b9206e82b3
Photin1a/PHR-ALM
test.cpp
#include "PHR_alm.hpp" #include <chrono> #include <iostream> using namespace std; class Opt : public PHR_ALM { public: int N_ = 5000; Opt() { // num of Equality and Inequality PHR_ALM::e_num_ = N_ / 2; PHR_ALM::ine_num_ = N_ / 2; } protected: virtual double Cost(const Eigen::VectorXd &x) override...
ALGO
0.99948
5.901345
1000e52f-cd63-4452-a1f8-ccb3b7fd5d48
galletas1712/programming.in.th
11/1113.cpp
#include <bits/stdc++.h> using namespace std; int n, k, res; long long o[1000001], r[1000001]; char a[1000002]; map<long long,int> mp; int main() { scanf("%d%d%s",&n,&k,a+1); for(int i = 1; i <= n; i++) { o[i] = o[i-1]; r[i] = r[i-1]; if(a[i] == 'O') o[i]++; else r[i]++; } ...
ALGO
0.99938
3.593276
d4f1816c-451d-4368-90b8-b059d31024fc
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_9630_70.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; cout << (n - 2) * (n - 2) << endl; return 0; }
ALGO
0.998607
3.267606
b0108c0e-69a1-46ad-889b-79f09ce03fc3
SilviaAmAm/BXDinPlumed
include/plumed/adjmat/ClusteringBase.cpp
#include "ClusteringBase.h" #include "AdjacencyMatrixBase.h" #include "AdjacencyMatrixVessel.h" namespace PLMD { namespace adjmat { void ClusteringBase::registerKeywords( Keywords& keys ){ ActionWithInputMatrix::registerKeywords( keys ); } ClusteringBase::ClusteringBase(const ActionOptions&ao): Action(ao), ActionW...
ALGO
0.968575
5.900464
dae7f7a3-8142-475c-9d7b-e4247e7ac983
laurihuju/Chess-AI
Chess-AI/main/pieces/bishop.cpp
#include <vector> #include <cmath> #include "bishop.h" #include "../move.h" #include "../gameState/gameState.h" /// <summary> /// The additions and reductions of the value of white bishop at different positions. /// </summary> int bishopValueAdditions[8][8] = { {-20, -10, -10, -10, -10, -10, -10, -20}, {-10, 0, 0, 0...
ALGO
0.985105
6.173694
544695bf-052c-4040-8a11-f2bc264d3467
Kecheng-Ye/My_Leetcode
Problem/By section/Math/Problem 386/problem_386.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: // Time: O(n), Space: O(1) vector<int> lexicalOrder(int n) { vector<int> result(1, 1); while(result.size() < n) { int back = result.back(); if(back * 10 <= n) { result.push_b...
ALGO
0.999808
6.405852
b3a75f15-021c-4908-b634-9a986a24dbf7
rpask00/codeforces_cpp
dp_cpp/C_Letter.cpp
#include <iostream> #include <string> using namespace std; int main() { int n; string s; int dp[2][2]{}; cin >> s; int i = 1; for (char c : s) { if (c < 91) { dp[0][i % 2] = dp[0][(i + 1) % 2]; dp[1][i % 2] = min(dp[0][(i + 1) % 2], dp[1][(i + 1) ...
ALGO
0.999832
3.594533
e0dc8043-da5b-4842-a00a-91c98a071f3c
naveen04561/cpp_programs
LRU.cpp
#include<bits/stdc++.h> using namespace std; void printResult(int pages,float hits) { cout<<"Total number of references: "<<pages<<endl; cout<<"Total number of page faults: "<<pages-hits<<endl; cout<<"Total number of hits: "<<hits<<endl; cout<<"Hit Ratio: "<<hits/pages<<endl; } void lru(int pages,int ...
ALGO
0.999428
4.124024
d4015876-1d35-4cba-99d1-b595b1598439
akarshmadan4/crack-your-placement-challange
Dynamic Programming/Minimum Insertion Steps to Make a String Palindrome.cpp
//prerequsite- LCS nad longest palindromic subsequence class Solution { public: int lcs(string s1,string s2) { int n=s1.length(); int m=s2.length(); vector<vector<int>>dp(n+1,vector<int>(m+1,0)); for(int i=0;i<=n;i++) { dp[i][0]=0; } for(int j=...
ALGO
0.999972
6.034394
4326b0fd-9f13-4dc3-9e17-3da63db72b45
sjp-1024/OJ_Code
19.cpp
/************************************************* &Author: &Description:Believe in yourself. &File Name: 19.cpp &Created Time: 19Century 2019ๅนด06ๆœˆ30ๆ—ฅ ๆ˜ŸๆœŸๆ—ฅ 20ๆ—ถ17ๅˆ†04็ง’ CST Day/181 and Week/26 of this year ************************************************/ #include<stdio.h> #include<stdlib.h> #include<time.h> struct...
ALGO
0.999789
3.589689
34f4c487-9849-4e34-8f05-512f05143cc6
zijun-lin/CarND-MPC-Quizzes
global_kinematic_model/src/Eigen-3.3/doc/examples/QuickStart_example.cpp
#include <iostream> #include <Eigen/Dense> using Eigen::MatrixXd; int main() { MatrixXd m(2,2); m(0,0) = 3; m(1,0) = 2.5; m(0,1) = -1; m(1,1) = m(1,0) + m(0,1); std::cout << m << std::endl; }
ALGO
0.974318
3.474624
5bfd3050-ae8e-497f-9f62-1fdb35c6bae8
Sagar231/cpp_prac
n_prac1.cpp
#include<iostream> using namespace std; int main(){ int n; cin>>n; int reverse; while(n>0){ int lastdigit = n%10; reverse = reverse*10+lastdigit; n = n/10; //Here n is an integer so the value of n should be stored as integer not somthing like 12.4 } cout<<reverse<<end...
ALGO
0.999766
4.566465
2d07ce08-adfc-424d-ae19-dae7659f495c
wawzysys/Algorithm
ๆฏ”่ต›/bd/1.cpp
#include <bits\stdc++.h> using namespace std; const int N = 100010; using ll = long long; ll n; ll a[N]; ll b[N]; ll x, y, c; // ๆ€ป็‚นๆ•ฐ int h[N], w[N], e[N], ne[N], idx; // ้‚ปๆŽฅ่กจๅญ˜ๅ‚จๆ‰€ๆœ‰่พน int dist[N]; // ๅญ˜ๅ‚จๆฏไธช็‚นๅˆฐ1ๅท็‚น็š„ๆœ€็Ÿญ่ท็ฆป bool st[N]; // ๅญ˜ๅ‚จๆฏไธช็‚นๆ˜ฏๅฆๅœจ้˜Ÿๅˆ—ไธญ int nihao() { ...
ALGO
0.999993
3.6962
5dd0efb4-9cdf-41ea-92af-d65b284fe24b
dlwlgn21/DataStructures
HongLabDataStructures-main/Ex0203_Fibonacci/Ex0203_Fibonacci.cpp
#include <iostream> #include <cassert> #include <algorithm> // swap #include <iomanip> // setw using namespace std; int Fibonacci(int n) { if (n == 0) return 0; // F0 = 0 else if (n == 1) return 1; // F1 = 1 else { int prev1 = 0; int prev2 = 1; int accum = 0; for (int i = 2; i <= n; ++i) { accu...
ALGO
0.998855
4.723902
a180e530-17c0-415d-a408-58d4868436ff
veerviren/Competitive-Programming
codeforces/Codeforces Round 938 (Div. 3)/D_Inaccurate_Subsequence_Search.cpp
/*------------------------------------------------------- Competitive programming Name: Viren Variya (direction_) Nothing is impossible, as you believe you can do it You can do it!!! -------------------------------------------------------*/ #include <iostream> #include <iomanip> #include <algorithm> #include <vector> #...
ALGO
0.999921
4.121688
73d56f6e-e118-4ece-bf0f-61243090df3f
lammps-qmdff/lammps-qmdff
lammps-modified/src/USER-SMD/fix_smd_integrate_ulsph.cpp
#include <stdio.h> #include <string.h> #include "fix_smd_integrate_ulsph.h" #include <math.h> #include <stdlib.h> #include <string.h> #include "atom.h" #include "comm.h" #include "force.h" #include "neighbor.h" #include "neigh_list.h" #include "neigh_request.h" #include "update.h" #include "integrate.h" #include "respa...
ALGO
0.98406
4.72033
49dbd121-d004-4c7a-bfbc-d9dc84f95786
kuang-jy/cpp-project
WD/graph/P2820.cpp
#include <iostream> using namespace std; int n,k,set[110]; struct node{ int s,e,w; }edges[100000]; int partition(int low,int high){ node pivot = edges[low]; while (low < high) { while(low < high && edges[high].w >= pivot.w) high--; edges[low] = edges[high]; while(low < high && ...
ALGO
0.999961
3.982913
2104e6ec-2b2d-4b1e-87f3-017a68a331fe
SadykovaZ/05.11.18_Stack_Queues
05.11.18/Queue_.cpp
#include "Queue_.h" bool Queue_::empty() const { return arr.size() == 0; } int Queue_::size() const { return arr.size(); } double & Queue_::front() { return arr[0]; } const double & Queue_::front() const { return arr[0]; } double & Queue_::back() { return arr[arr.size() - 1]; } const double & Queue_::back() const ...
TOOL
0.896034
4.357169
14d86dbb-56c4-43c9-af0f-1808050a5e74
manikanta2901/CCC
.history/Day 3/Practice/Answers/Caesar Cipher_20210307162703.cpp
// // #include <cmath> // // #include <cstdio> // // #include <vector> // // #include <iostream> // // #include <algorithm> // // using namespace std; // // int main(){ // // int size,k; // // string s; // // cin >> size >> s >> k; // // for (int i = 0; i <= size; i++) { // // if (s[i] >= 'ma...
ALGO
0.99889
4.178504
11a1491e-66f0-4483-a3b1-43db600a7ce9
syf1913/IBAMR
examples/navier_stokes/ex1/example.cpp
// Config files #include <SAMRAI_config.h> // Headers for basic PETSc functions #include <petscsys.h> // Headers for basic SAMRAI objects #include <BergerRigoutsos.h> #include <CartesianGridGeometry.h> #include <LoadBalancer.h> #include <StandardTagAndInitialize.h> // Headers for application-specific algorithm/data ...
ALGO
0.999367
7.014144
f07c2003-8fa3-4c44-8e56-da4ed4d551bd
yihsunphys/Competitive_Programming
LeetCode/0674. Longest Continuous Increasing Subsequence.cpp
class Solution { public: int findLengthOfLCIS(vector<int>& nums) { vector<int> dp(nums.size(), 1); for(int i = 0; i < nums.size()-1; i++){ if(nums[i+1]>nums[i]) dp[i+1] = max(dp[i+1], dp[i]+1); } return *max_element(dp.begin(), dp.end()); ...
ALGO
0.999837
6.075201
1afafd68-9f17-4a63-b4d9-d2ac0c139dd4
pavankumarsai18/LeetCode
0152-maximum-product-subarray/solution.cpp
class Solution { public: int maxProduct(vector<int>& nums) { const int n = nums.size(); if(n == 1) return nums[0]; // long long maxProduct[n+1]; // long long minProduct[n+1]; long long ans = INT_MIN; // maxProduct[0] = 1; ...
ALGO
0.999996
5.984008
9f0d1211-d8be-4337-82fe-8dc4f5f8c298
Napier-0b/AtCoder
abc132_a.cpp
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; string ans = "No"; if (S[0] == S[1] && S[2] == S[3] && S[0] != S[2]) ans = "Yes"; if (S[0] == S[2] && S[1] == S[3] && S[0] != S[1]) ans = "Yes"; if (S[0] == S[3] && S[1] == S[2] && S[0] != S[1]) ans = "Yes"; co...
ALGO
0.999966
3.572512
64ce53d9-242a-4d18-878a-ffeb566979d9
alexandraback/datacollection
solutions_5765824346324992_0/C++/theph/main.cpp
#include <fstream> #include <iostream> #include <vector> #include <algorithm> struct barber { long long work_cost; long long wait_time; int number; }; inline bool wait_tima_compare(barber a, barber b) { return a.work_cost < b.work_cost; } inline bool number_compare(barber a, barber b) { return a.number < b.numb...
ALGO
0.999932
4.299728
c03f544c-7a36-419f-a787-695a17a197d2
MedAzizTousli/Competitive-Programming-Solutions
AtCoder/ABC147/B - Palindrome-philia.cpp
#include<bits/stdc++.h> using namespace std; int main() { string s; cin >> s; int nb = 0; for (int i=0,j=s.size()-1; i<s.size()/2; j--,i++) { if (s[i] != s[j]) nb++; } cout << nb; return 0; }
ALGO
0.999887
3.712855
9dee6df8-0739-4556-a8cc-106dfeb9111c
BajajGirik/DS-Algo
algo-analysis/dp/main/q1.cpp
#include "../headers/dp.h" #include "../headers/utils.h" int main() { file_io("IO/q1/input.txt", "IO/q1/output.txt"); int n; std::cin >> n; int a[n]; for(int i = 0; i < n; ++i) { std::cin >> a[i]; } int res = matrix_chain_multiplication(a, n); std::cout << res << "\n"; return 0; }
ALGO
0.999918
3.954348
29e69c34-a994-4232-8119-bc902c88f3df
RadhikaF/SENG1120
Assignment 2/node.cpp
/* Author: R.Feron StNo:c3256870 Lab:Tuesday 12pm Date: 2 - September - 2017 Course: SENG1120 Task: Assignment 1 This file contains is the implementations file for the node class. It contains the implementations of the member functions listed in the header file. */ #include <iostream> namespace radhika_assignment ...
TOOL
0.947375
5.243378
8f73dbbc-4c54-4a22-aaf5-98c93d884f3e
2694048168/LeetCodeAlgorithm
C++/isPalindrome.cpp
/** * @File : isPalindrome.cpp * @Brief : ๅ›žๆ–‡้“พ่กจ * @Link : https://leetcode-cn.com/problems/palindrome-linked-list/ * @Author : Wei Li * @Date : 2021-07-30 */ #include <iostream> // Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullp...
ALGO
0.999889
5.975815
1322d746-b4e2-44a9-b5c0-a6ae24b2c27f
Akrit2013/caffe-dev-160608
tools/generate_pairwise_map.cpp
// This program is used in PROJ1603, which use CRF to predict the image depth map. // This program can generate the pairwise map according to the segment boundary map. // The output map is a float N x N, the N is the number of the superpixels. // The input: // 1. A lmdb file containing the superpixels label map in datu...
DATA
0.925523
6.229364
894f6e36-b508-4d70-a18a-67b603d22fb7
GPUOpen-LibrariesAndSDKs/DirectXShaderCompiler
tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
#include "clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h" #include "clang/AST/Expr.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/StmtCXX.h" #include "clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h" #include "clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h" #include "llvm/ADT/DenseMap.h" #i...
ALGO
0.999117
7.813581
e69ac7f3-f2de-4ed8-ac9d-864981b0fa7d
joel-2004/final-year-prjct-phase-1
Smart-Attendance-and-Engagement-Detection-System/Code/dlib-master/examples/krr_classification_ex.cpp
/* This is an example illustrating the use of the kernel ridge regression object from the dlib C++ Library. This example creates a simple set of data to train on and then shows you how to use the kernel ridge regression tool to find a good decision function that can classify examples in our da...
DATA
0.86945
7.777054
075d381b-60ff-4bb1-8a63-8961109c718d
SureshMurugaiyan/MATH5414FA18_SURESH
mesh.cpp
// C++ Script to simulate 2D incompressible flow #include <iostream> #include <math.h> #include <fstream> using namespace std; void mesh2Dsquare(double* X, double *Y, double *Z, int nxc, int nyc,int nx, int ny, int nc){ // North boundary const double xmin_n = -0.5; // left co-ordinate const double...
ALGO
0.948965
3.35115
0c07f487-23a4-4805-a60c-4b1a0514336c
rbr2411/codeforces
dp.cpp
#include<iostream> using namespace std; static int count = 0; long long fib(int n, long long *memo) { if(memo[n] != -1) return memo[n]; count ++; if (n==0) { memo[n] = 0; return 0; /* code */ } if (n==1) { memo[n] = 1; return 1; /* code */ ...
ALGO
0.999866
5.42795
d4fb0f28-a870-43fc-86cc-65a9fc66408d
salihmarangoz/DrawOnConsole
cpp_game_snake/gameobjects.cpp
#include "gameobjects.h" /*------------------------------------ SNAKE ---------------------------------------------------------*/ Snake::Snake(int length, int start_i, int start_j, Direction start_direction, int delay_) // TESTED OK! { int x; // temp // set start values rear = 0; head = length-1; direction ...
ALGO
0.979346
4.848028
28424b5b-937f-4ac0-b842-c2ae946ea85f
nkvelkov/UP2014
homework/homework1/Zadacha 6.cpp
#include<iostream> using namespace std; int main () { int br,min,ost; cout << "Broj uprazhnenija: "; cin >> br; min = br*45; cout << "Upr. sa prodylzhili obshto " << min <<" min."<<endl; ost=15-br; cout << "Ostavat oshte "<< ost <<" uprazhnenija."<<endl; return 0; }
ALGO
0.990068
3.412394
df2920b5-6dc1-4dae-b906-8c0b66b236d1
Emmanuelusman2004/RPI-CS1200-DATA-STRUCTURES
CSCI1200/Lab/Lab6/checkpoint1 (1).cpp
#include <iostream> #include <string> #include <vector> template <class T> void print(std::vector<T> &data, const std::string &label) { std::cout << label << " "; for (int i = 0; i < data.size(); i++) { std::cout << " " << data[i]; } std::cout << std::endl; } template <class T> void reverse(std::vector<T>...
ALGO
0.995674
5.136395
29b8bbb0-635c-4dd7-9949-4320e37d5a61
darrinmwiley/jeeves
kb/tank/tank.cpp
/* BEGIN ANNOTATION PROBLEM URL: https://open.kattis.com/problems/tank TAGS: binary search, shoelace theorem EXPLANATION: - Binary search through all possible height of the water, for each candidate: + Draw a line y = candidate through the polygon + Compute the area of the polygon created by the points below or ...
ALGO
0.999975
5.236701
f3188565-983a-4179-9361-c90f791aea0a
kkm431/Leetcode
0031-next-permutation/0031-next-permutation.cpp
class Solution { public: void nextPermutation(vector<int>& nums) { int n = nums.size(); // Step 1: Find the pivot - the first element from the end that breaks the descending order // We start from the second last element (n-2) and compare with its next element int i = n - 2;...
ALGO
0.999988
7.163268
5f323378-f213-48b9-b0c8-e0a65b713af5
SinghRajan41/code
my_codeforces_solutions/singh_rajan41/normal/1380/A.cpp
#include<iostream> #include<vector> #include<queue> #include<set> #define ll long long int using namespace std; bool isPrime[100001]; void init(); bool solve(); int main() { int t; cin>>t; while(t--) { solve(); } return 0; } bool solve() { int n,k; cin>>n; int arr[n],idx[n+1]...
ALGO
0.999964
3.422664
01cb79bf-53fe-4228-ba60-d9d0eb00de48
vivekkrsk/c-
days.cpp
// days.cpp // shows days from start of year to date specified #include <iostream> using namespace std; int main() { int month, day, totaldays; int dayspermonth[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; cout << "\nEnter month (1 to 12): "; cin >> month; cout << "Enter date ( 1 to 31...
TOOL
0.970903
3.153436
63772b0e-9eb6-4d26-af17-138d4b0ace42
JatinChauhan108/binary-search-adv-problems
Prata.cpp
#include <bits/stdc++.h> using namespace std; bool isPossible(vector<int> ranks,int target, int prata){ int time = 0; // time taken by ith cook int cookedPrata = 0; // already cooked pratas for(int i = 0; i<ranks.size(); i++){ for(int j = 1...
ALGO
0.999948
4.030941
c18b64bf-e2c8-44bc-a0c7-3703a1bcccfa
DeepanjaliIshte/C-and-CPP-Programming
Negative element.cpp
#include <stdio.h> int main() { int n, i; printf("Enter the number of elements in the array: "); scanf("%d", &n); int arr[n]; // Input array elements printf("Enter %d elements: \n", n); for (i = 0; i < n; i++) { scanf("%d", &arr[i]); } // Print negative elements prin...
ALGO
0.959764
4.075847
66c1196a-e2a9-47b2-8523-b3e632ff1460
JunBye/Winter_coding
2์ฃผ์ฐจ/4๋‹จ๊ณ„/์ดํ•˜๋™/1110 ๋”ํ•˜๊ธฐ ์‚ฌ์ดํด.cpp
/* https://www.acmicpc.net/problem/1110 0๋ณด๋‹ค ํฌ๊ฑฐ๋‚˜ ๊ฐ™๊ณ , 99๋ณด๋‹ค ์ž‘๊ฑฐ๋‚˜ ๊ฐ™์€ ์ •์ˆ˜๊ฐ€ ์ฃผ์–ด์งˆ ๋•Œ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์—ฐ์‚ฐ์„ ํ•  ์ˆ˜ ์žˆ๋‹ค. ๋จผ์ € ์ฃผ์–ด์ง„ ์ˆ˜๊ฐ€ 10๋ณด๋‹ค ์ž‘๋‹ค๋ฉด ์•ž์— 0์„ ๋ถ™์—ฌ ๋‘ ์ž๋ฆฌ ์ˆ˜๋กœ ๋งŒ๋“ค๊ณ , ๊ฐ ์ž๋ฆฌ์˜ ์ˆซ์ž๋ฅผ ๋”ํ•œ๋‹ค. ๊ทธ ๋‹ค์Œ, ์ฃผ์–ด์ง„ ์ˆ˜์˜ ๊ฐ€์žฅ ์˜ค๋ฅธ์ชฝ ์ž๋ฆฌ ์ˆ˜์™€ ์•ž์—์„œ ๊ตฌํ•œ ํ•ฉ์˜ ๊ฐ€์žฅ ์˜ค๋ฅธ์ชฝ ์ž๋ฆฌ ์ˆ˜๋ฅผ ์ด์–ด ๋ถ™์ด๋ฉด ์ƒˆ๋กœ์šด ์ˆ˜๋ฅผ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค. ๋‹ค์Œ ์˜ˆ๋ฅผ ๋ณด์ž. 26๋ถ€ํ„ฐ ์‹œ์ž‘ํ•œ๋‹ค. 2+6 = 8์ด๋‹ค. ์ƒˆ๋กœ์šด ์ˆ˜๋Š” 68์ด๋‹ค. 6+8 = 14์ด๋‹ค. ์ƒˆ๋กœ์šด ์ˆ˜๋Š” 84์ด๋‹ค. 8+4 = 12์ด๋‹ค. ์ƒˆ๋กœ์šด ์ˆ˜๋Š” 42์ด๋‹ค. 4+2...
ALGO
0.999931
4.951825
6166418c-848f-4ca4-bb3c-9b9874865a4c
yash-prince/prince
q1.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; for (int i = a; i <= b; i++) { if(i<=9){ if(i==1){ cout<<"one"<<endl; }else if(i==2){ cout<<"two"<<endl; }else if(i==3){ cout<<"three"<...
ALGO
0.999875
3.516148
1c068d41-bc22-4828-a818-952efa585366
manikanta2901/ubuntu
.history/SRM/elab/DAA/DivideAndConquer/ClosestPair_20210226145950.cpp
#include<bits/stdc++.h> #include<iostream> using namespace std; float GetDist(pair<int,int>p,pair<int,int>q){ return } int main(){ int size; cin >> size; vector<pair<int,int>> points; for(int i = 0; i < size; i++){ int x,y; cin >> x >> y; points.push_back(make_pair(x,y)); ...
ALGO
0.999618
4.295663
aad1f8e0-999f-48a8-a1b3-0a8af0404f19
hygoni/precise-leak-sanitizer
llvm/tools/llvm-tapi-diff/DiffEngine.cpp
using namespace llvm; using namespace MachO; using namespace object; StringRef setOrderIndicator(InterfaceInputOrder Order) { return ((Order == lhs) ? "< " : "> "); } // The following template specialization implementations // need to be explicitly placed into the llvm namespace // to work around a GCC 4.8 bug. nam...
TOOL
0.851789
6.731928
1e8bc394-8115-478b-b75a-c2e2afff6ed1
vedanth2001/Leetcode-Submissions
0049-group-anagrams/0049-group-anagrams.cpp
class Solution { public: vector<vector<string>> groupAnagrams(vector<string>& strs) { vector<vector<string>> result; int n = strs.size(); vector<string> sortedStrs(n); unordered_map<string, vector<int>> mp; sortedStrs=strs; for(int i =0;i<n;i++){ sort(sort...
ALGO
0.999993
6.528076
c82cd301-0cf0-40b0-b9d6-8b1bd2d7e639
MikamiTetsuro365/Atcoder
ABC151/B.cpp
#include "bits/stdc++.h" using namespace std; typedef long long int ll; typedef pair<ll, ll > pi; typedef pair<pair<ll, ll >, ll > pii; vector<ll > vec; vector<vector<ll > > vec2; ll MOD = 1000000007; ll INF = 1145141919454519; int main() { ll N, K, M; cin >> N >> K >> M; ll sum = 0; for(ll i = 0; i...
ALGO
0.99996
3.80047
7ff529db-b029-4298-8669-11e64df9003b
udacity/CarND-MPC-Quizzes
polyfit/src/Eigen-3.3/bench/sparse_cholesky.cpp
// #define EIGEN_TAUCS_SUPPORT // #define EIGEN_CHOLMOD_SUPPORT #include <iostream> #include <Eigen/Sparse> // g++ -DSIZE=10000 -DDENSITY=0.001 sparse_cholesky.cpp -I.. -DDENSEMATRI -O3 -g0 -DNDEBUG -DNBTRIES=1 -I /home/gael/Coding/LinearAlgebra/taucs_full/src/ -I/home/gael/Coding/LinearAlgebra/taucs_full/build/lin...
ALGO
0.99426
4.147974
fb3aa841-fb59-4f3e-9f77-33513582c4c1
XsChen524/FYP-2022-Server
snark/depends/libsnark/libsnark/zk_proof_systems/ppzksnark/ram_ppzksnark/examples/demo_ram_ppzksnark_prover.cpp
/** ***************************************************************************** * @author This file is part of libsnark, developed by SCIPR Lab * and contributors (see AUTHORS). * @copyright MIT license (see LICENSE file) **************************************************************************...
TOOL
0.862708
6.346759
762bbd1b-f4c4-4e34-a21d-e45d45bdeaed
itemon/clu
src/core/CLucene/util/MD5Digester.cpp
#include "CLucene/_ApiHeader.h" #include "_MD5Digester.h" CL_NS_DEF(util) static unsigned char PADDING[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; #def...
TOOL
0.901374
6.419133
2fa04e12-7c5a-4d34-a564-04c13ec3cbb6
5Bh03m1k/Leetcode
149-max-points-on-a-line/max-points-on-a-line.cpp
class Solution { public: int area(int x1,int x2, int x3 , int y1, int y2 , int y3) { int a = x1*(y2-y3) + x2*(y3-y1) + x3*(y1-y2); return a; } int maxPoints(vector<vector<int>>& s) { int max = 0; for(int i = 0 ; i<s.size() ; i++) { for(int j = i+1 ; j<...
ALGO
0.999961
5.731475