uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
1becf48b-ad8e-4b9a-afcc-06b1ee6d9d89
ishandutta2007/codeforces
aaaaajack/normal/538/A.cpp
#include<cstdio> #include<cstring> using namespace std; char s[200]; char t[20]="CODEFORCES"; int main(){ scanf("%s",s); int i,slen=strlen(s),tlen=strlen(t),x=0,y=0; for(i=0;i<slen&&i<tlen;i++){ if(s[i]==t[i]) x++; else break; } for(i=0;i<slen&&i<tlen;i++){ if(s[slen-1-i]==t[tlen-1-i]) y++; else break; } ...
ALGO
0.99996
3.108303
86934315-d9a1-4acf-8281-9269bbbab95c
kundan111/Leetcode-solutions
peak-index-in-a-mountain-array/peak-index-in-a-mountain-array.cpp
class Solution { public: int peakIndexInMountainArray(vector<int>& A) { return max_element(A.begin(), A.end()) - A.begin(); } };
ALGO
0.999851
5.554739
027533f9-6966-4c8f-aba2-91f17f7a6c3f
oshaikh/samples
samples/factorialInCpp/factorialInCppEclipse/src/factorialInCppEclipse.cpp
#include <iostream> using namespace std; #include "factorial.h" int main() { int n = 4; cout << "factorial(" << n << "): "<< factorial(n) << endl; return 0; }
ALGO
0.954162
4.362798
dcb1d3fc-213d-42ec-a8d7-22f4d22a16e4
zeroplusone/AlgorithmPractice
Leetcode/290. Word Pattern.cpp
class Solution { public: bool wordPattern(string pattern, string s) { unordered_map<char, string> m; string now; int j=0; unordered_set<string> ss; for(int i=0;i<pattern.length();++i) { now=""; while(j<s.length() && s[j]!=' ') { now+=s[...
ALGO
0.999153
6.122181
7acc07ca-b9e4-459f-aa48-7165552aa6d5
uzipaz/MyRepository
EulerProblems/EnglishWord.cpp
#include "EnglishWord.h" EnglishWord::EnglishWord() { word = 0; length = 0; } EnglishWord::EnglishWord(const char* str) { word = 0; length = 0; this->setWord(str); } EnglishWord::EnglishWord(const EnglishWord& rhs) { word = 0; length = 0; *this = rhs; } void EnglishWord::setWord(cons...
TOOL
0.917426
4.479616
7d128ddd-1f6e-4258-b89b-ee652884ed3e
Sokus/engineering-thesis
src/shared/graphics/kernel.cpp
#include "kernel.h" #include <gl/shader.h> #include <math.h> #include <stdio.h> #include "glm/gtc/constants.hpp" namespace Game { GL::ShaderProgram &kernel1DProgram() { static auto result = GL::ShaderProgram::ForPostprocessing(R"glsl( #version 330 core in vec2 v_uv; ...
TOOL
0.957596
5.827992
15b55bba-8c83-4b94-b3c2-648e10f97d6e
nicholasyan/Challenge-Problems
Fibonacci/fibo_recursive.cpp
#include <iostream> using std::cout; using std::cin; using std::endl; int fibo(int n); /* Print the nth number of Fibonacci sequence (recursively). * * (Assume that 0 is the 1st number.) */ int main() { int n; cin >> n; cout << fibo(n) << endl; return 0; } int fibo(int n) { // start seque...
ALGO
0.998763
5.690823
6c138316-58d7-42d1-b99f-2052c9529581
xxioachou/ACM
contest/牛客小白月赛94/C.cpp
#include <bits/stdc++.h> #define x first #define y second #define sz(x) ((int)x.size()) using namespace std; typedef long long ll; typedef pair<int, int> PII; const int inf = 0x3f3f3f3f; const ll INF = 1e18; void solve() { int n; cin >> n; vector<ll> a(n + 1), s(n + 1); for(int i = 1; i <= n; i++) { cin >> a[i...
ALGO
0.999837
3.462565
1d6a9c50-fd5d-46cf-be0b-24c0818839b0
abma/streflop
libm/dbl-64/e_acosh.cpp
/* See the import.pl script for potential modifications */ /* @(#)e_acosh.c 5.1 93/09/24 */ #if defined(LIBM_SCCS) && !defined(lint) static char rcsid[] = "$NetBSD: e_acosh.c,v 1.9 1995/05/12 04:57:18 jtc Exp $"; #endif /* __ieee754_acosh(x) * Method : * Based on * acosh(x) = log [ x + sqrt(x*x-1) ] * we have ...
ALGO
0.998628
5.421777
f7ffc788-a77e-4227-9230-039f43246e8b
nodegxq/LeetCode
counting/majority-element.cpp
class Solution { public: int majorityElement(vector<int>& nums) { int count = 0; int candidate = 0; for (int num : nums) { if (count == 0) { candidate = num; // change candidate } if (num == candidate) { count++; // same ...
ALGO
0.999961
6.012084
36db812f-78e6-4fc5-8ed1-3e404576c7bc
lolicow/doge
glm/test/gtx/gtx_simd_mat4.cpp
/////////////////////////////////////////////////////////////////////////////////// /// OpenGL Mathematics (glm.g-truc.net) /// /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Permission is hereby granted, free of charge, to any person obtaining a copy /// of this software and associated documentatio...
TEST
0.981763
6.438685
ad95e3a1-7a1f-4722-ab22-c6fa4299d583
jmhong-simulation/glfw_examples
glm/test/gtx/gtx_simd_mat4.cpp
/////////////////////////////////////////////////////////////////////////////////// /// OpenGL Mathematics (glm.g-truc.net) /// /// Copyright (c) 2005 - 2012 G-Truc Creation (www.g-truc.net) /// Permission is hereby granted, free of charge, to any person obtaining a copy /// of this software and associated documentatio...
TEST
0.985671
6.515547
13765289-dc79-4dba-bb94-0c82e76e5ef8
OsamaFahim/Skin_Lesion_Detection_and_Analysis_Using_Image_Processing
Project_Files/read_file.cpp
#include"component_label.h" #include"Dice_coefficient.h" #include"k_means.h" #include"RLC.h" int main() { Mat cimage = imread("D:/data structures university/Assignment1/Assignment 1/Original Images/IMD042.bmp");//loading an image// Mat ximage = imread("D:/data structures university/Assignment1/Assignment 1/Ground Tru...
ALGO
0.974024
3.587981
8fc45d20-daca-434e-837b-7f039e71515b
h-di/Programming-Questions
project Euler/cpp/Euler 0003.cpp
// // Created by hadi on ۰۴/۰۷/۲۰۲۰. // #include <iostream> using namespace std; int main() { auto n = 600851475143; int LargestFactor = 0; int i = 2; while (i * i <= n) { if (n % i == 0) { n /= i; LargestFactor = i; } else i++; } if ...
ALGO
0.999928
5.292062
567350ab-a1db-4ff8-9649-b99cf5b15e2c
Struna1292/LeetCode
3522-find-the-power-of-k-size-subarrays-i/3522-find-the-power-of-k-size-subarrays-i.cpp
class Solution { public: vector<int> resultsArray(vector<int>& nums, int k) { if (k == 1) { return nums; } bool window = false; int currCounter = 1; vector<int> output; for (int i = 1; i < nums.size(); i++) { if (ou...
ALGO
0.999901
5.77511
0c6cb64c-ba3f-4fad-9c3c-4fe6319c5278
nazmul-me/Online-Judge
codeforces/3A.cpp
#include <bits/stdc++.h> using namespace std; #define SYNC ios_base::sync_with_stdio(0) #define CT cin.tie(0) #define sf(a) scanf("%d", &a) #define sff(a, b) scanf("%d %d", &a, &b) #define sfff(a,b,c) scanf("%d %d %d", &a, &b, &c) int main() { string s,t; int a,b; cin>>s>>t; s[0]=s[0]-'...
ALGO
0.999936
3.092362
5ce1388c-4c02-4604-b1bd-cd4ea5a1b501
avihyb/OS_EX1
q5/q5.cpp
#include <iostream> #include <vector> #include <cstdlib> #include <ctime> #include <climits> #include <algorithm> int maxSubArraySumLinear(const std::vector<int>& nums) { int maxSum = nums[0], currSum = nums[0]; for (size_t i = 1; i < nums.size(); ++i) { currSum = std::max(nums[i], currSum + nums[i]); ...
ALGO
0.999
6.37003
10386b36-6906-4cde-9aea-7a6391f8f286
monircse061/My-All-Codes
CODEFORCE/1013C.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int map<ll,ll>m; int main(){ ll n,a[100009],x=1; scanf("%I64d",&n); for(int i=1;i<=n*2;i++){ scanf("%I64d",&a[i]); m[a[i]]++; if(m[a[i]]>=(n*2)/2){ x=0; } } if(x==0||n==1){ ...
ALGO
0.999795
3.573717
0924e67c-75fc-4cfb-af20-55832b98be01
MaSteve/UVA-problems
UVA10374.cpp
#include <iostream> #include <unordered_map> using namespace std; int main() { unordered_map<string, string> candidates; unordered_map<string, int> votes; int T; cin >> T; while (T--) { candidates.clear(); votes.clear(); int n; cin >> n; string s; get...
ALGO
0.999917
5.003673
47785270-c73a-4ae9-824f-be966c267d27
Chetan0078/DSA-lessgo
c++ basics/Binary Search/HOWmanyTimesROTATED.cpp
#include<bits/stdc++.h> using namespace std; int HOWmanyTIMESrotated(vector<int> nums){// number of times rotated is the index of min element array int n=nums.size(); int low =0, high = n-1; int ans = 0; while(low<=high){ int mid = (low+high)/2; cout<<low<<" "<<mid<<" "<<high<<endl; ...
ALGO
0.999939
4.768286
a7956c19-f69d-460e-8d58-6c18f7e9a949
Thisayang/Codeforces
1496A_Split_it.cpp
#include <bits\stdc++.h> #define ll long long #define ld long double using namespace std; int main() { ios::sync_with_stdio(false), cin.tie(0), cout.tie(0); int t, n, k; string s; cin >> t; while(t --) { cin >> n >> k >> s; if(n < 2 * k + 1) puts("NO"); else { for(int i...
ALGO
0.999734
3.893156
a8110a01-7721-4105-b6c8-af3b7b257081
Sean0628/competitive_programming
aoj/itp1/7/a.cpp
#include <bits/stdc++.h> int main() { int m, f, r, t; char grade; while (true) { scanf("%d %d %d", &m, &f, &r); if (m == -1 && f == -1 && r == -1) break; if (m == -1 || f == -1) { grade = 'F'; } else { t = m + f; if (t >= 80) { grade = 'A'; } else if (t >= 65) { ...
ALGO
0.999372
3.983287
ec3c4a2c-764a-4cdb-8503-157b166c6aaf
LilDevsy0117/ProblemSolving
프로그래머스/2/42626. 더 맵게/더 맵게.cpp
#include <string> #include <vector> #include <queue> using namespace std; int solution(vector<int> scoville, int K) { int answer = 0; priority_queue<int, vector<int>, greater<int>> pq; for(int i = 0; i<scoville.size(); i++){ pq.push(scoville[i]); } while(pq.top() < K && pq.size() >= 2)...
ALGO
0.999621
5.538015
57604494-6654-4ef2-a078-21e0aa81dfcf
caitlyncaggia/cpp-basics
Notes/Week 04-05 - Functions/FibonacciRatio.cpp
#include <iostream> #include <iomanip> #include <cmath> using namespace std; long int Fibonacci(int); int main() { int number; long int nthFibonacci; long int nminus1Fibonacci; cout << "How far to you want to go in the Fibonnacci series? >> " ; do { cin >> number; } while (number < 2); cout << setprecision(10); nt...
ALGO
0.972317
3.659374
d4b71536-922e-4937-92a0-878fdce05806
quyifei23/gem5-CXL
gem5/src/systemc/tests/systemc/misc/synth/synth-1.0/gcd/gcd.cpp
/***************************************************************************** gcd.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /***************************************************************************** ...
ALGO
0.999683
6.050015
daccad45-5b32-4ced-8a49-7cfec69ffc8f
PixysOS/external_aac
libFDK/src/arm/fft_rad2_arm.cpp
/* ----------------------------------------------------------------------------- Software License for The Fraunhofer FDK AAC Codec Library for Android © Copyright 1995 - 2018 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. All rights reserved. 1. INTRODUCTION The Fraunhofer FDK AAC Codec Lib...
ALGO
0.999267
6.172439
7b091c9d-8678-4126-890b-f2f4e0376978
ishandutta2007/codeforces
darkkcyan/normal/1553/F.cpp
#pragma GCC optimize ("O3") #include <bits/stdc++.h> using namespace std; // #define constexpr(...) (__VA_ARGS__) using ll = long long; using ld = long double; const ld eps = 1e-8; // for matching the kactl notes #define sz(x) ((int)x.size()) #define rep(i,a,b) for (int i = (int)(a); i < (int)(b); ++i) #define all(...
ALGO
0.99996
3.405808
cc679018-e660-4d38-b27d-a349148c7b7d
hyuny223/chl-ORB-SLAM2-CUDA
Thirdparty/DBoW2/DBoW2/FORB.cpp
#include <vector> #include <string> #include <sstream> #include <stdint-gcc.h> #include "FORB.h" using namespace std; namespace DBoW2 { // -------------------------------------------------------------------------- const int FORB::L=32; void FORB::meanValue(const std::vector<FORB::pDescriptor> &descriptors, FOR...
ALGO
0.993937
6.539618
b7ee386e-9ac3-45c1-8727-a160241a9b17
canon4444/AtCoder
etc./colopl2018-qual/B.cpp
#include <iostream> #include <string> using namespace std; int main() { int N, X; string S; cin >> N >> X >> S; int T[N]; for( int i = 0; i < N; ++i ) cin >> T[i]; long long int ans = 0; for( int i = 0; i < N; ++i ) ans += (S[i] == '0') ? T[i] : ( (X < T[i]) ? X : T[i] ); cou...
ALGO
0.999904
4.200626
d45fcec2-de66-43dd-b7c2-3e45e6abfe0d
hihihi28/dsa_codeptit
DUONG-DI-DEN-NODE-LA.cpp
#include<bits/stdc++.h> using namespace std; int n, visited[1001], pre[1001]; vector<int> adj[1001]; vector<int> la; void bfs(int u){ visited[u] = true; queue<int> q; q.push(u); while (q.size()) { int v = q.front(); q.pop(); for(int x: adj[v]){ if(!visited[x]){ ...
ALGO
0.999951
5.105688
58a6f157-0a6f-4005-bec7-91d23a45d092
BuildDear/MemoryController
main.cpp
#include <iostream> #include <string> #include <chrono> #include <thread> #if defined(_WIN32) || defined(_WIN64) #include <windows.h> #include <tlhelp32.h> #include <psapi.h> #else #include <cstdlib> #include <cstring> #include <cstdio> #include <fstream> #endif using namespace std; #if defined(_WIN32) || defined(_W...
TOOL
0.963535
4.967132
b7644b2f-6685-4f39-9603-e8e6413c61a8
TheMaRauDer28/Goblet-of-fire
34B.cpp
#include<bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr) #define ll long long int main() { fast; int n,m; cin>>n>>m; vector<int> v(n); for (int i = 0; i < n; i++) { cin>>v[i]; } sort(v.begin(),v.end()); ...
ALGO
0.999986
3.724355
3f1bdb1f-a23e-4e9b-a326-8cb763ccac71
RomeshKTripathi/CP
EP6/sololearn11.cpp
#include<bits/stdc++.h> using namespace std; class Queue { int size; int* queue; public: Queue() { size = 0; queue = new int[100]; } void add(int data) { queue[size] = data; size++; } void remove() { if (size == 0) { cout << "Queue is empty"<<endl; return; } else { for (in...
ALGO
0.999828
4.91834
70994d7f-bfc4-4ccb-966b-1e02d300c53b
alifalhasan/CP-code-vault
Codeforces/Educational Round/Educational Codeforces Round 97 (Rated for Div. 2)/C - Chef Monocarp/96961483.cpp
#include<bits/stdc++.h> using namespace std; const int N=205; int a[N],dp[N][(N << 1)]; int main() ios_base::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL); int i,j,n,t; cin >> t; while(t--) { cin >> n; for(i=1;i<=n;i++)cin >> a[i]; sort(a+1,a+n+1); for(i=1;...
ALGO
0.999904
4.42231
0b5b3d9f-a7ac-4a0f-87fb-f9ada2380755
prateekshyap/DSA
Dynamic-Programming/LC_1277_CountSquareSubmatricesAllOnes.cpp
/* https://leetcode.com/problems/count-square-submatrices-with-all-ones/ * Given a m * n matrix of ones and zeros, return how many square submatrices have all ones. */ class Solution { public: int countSquares(vector<vector<int>>& mat) { int m = mat.size(); int n = mat[0].size(); int sum...
ALGO
0.999878
6.221567
dceacdf2-7363-4506-80cf-d46e43e9b03c
KHvic/codeforces
1374B.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t,x; cin >> t; while(t--) { cin >> x; int cnt3 = 0; while(x%3==0) { cnt3++; x/=3; } int cnt2 = 0; while(x%2==0) { cnt2++; x/=2; } if(...
ALGO
0.999585
4.113409
b0fdf95e-6f50-4c31-af70-14fd5a6aa76c
yongwhan/codeforces
690F1.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> ii; int main() { cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); int n,a,b; cin>>n; map<int,int> deg; for (int i=0; i<n-1; i++) cin>>a>>b, deg[a]++, deg[b]++; int ret=0; for (auto it : deg) { int cur=it.second;...
ALGO
0.998995
4.038557
cdcdd9f2-afd0-4f9a-aea4-688fe8bf441b
PiperBetle/MyCode
Panasonic2020C Sqrt Inequality.cpp
//不向焦虑与抑郁投降,这个世界终会有我们存在的地方。 #include<iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<cassert> #include<tuple> #include<cmath> #define siz(x) int((x).size()) #define cauto const auto #define all(x) (x).begin(),(x).end() #define fi first #define se second using std::cin;using std::cout; using st...
ALGO
0.99971
3.520804
3b5961e7-d975-4881-8f2c-7537c5c39263
markwinds/toolbox
backEnd/src/setting/setting.cpp
#include "setting.h" #include "httpServer.h" #include "util.h" #include <curl.h> #include <filesystem> #include <fstream> #include <string> #ifndef TOOLBOX_VERSION #define TOOLBOX_VERSION "v1.0.0" #endif #define BASE_URL std::string(LOCAL_API_BASE_URL) + "/setting" #define GITHUB_OWNER "markwinds" #define GITHUB_REPO...
TOOL
0.945175
3.465757
cf1ec9ad-ec29-4c32-9c66-5e0480495640
ArpitaSatsangi/DSA-using-cpp
005. sorting/bubble sort.cpp
#include <iostream> using namespace std; void BubbleSort(int arr[],int n) { bool swapped=false; for(int i=0;i<n-1;i++) { for(int j=0;j<n-i-1;j++) { if(arr[j]>arr[j+1]) { swap(arr[j],arr[j+1]); swapped=true; } } ...
ALGO
0.999952
4.906167
b033cead-cf55-4850-ad38-9ecf0fff0528
mr-vicky/Algorithms
04]. Sliding Window Technique/01_Find_the_maximum_sum_of_k_consecutive_elements.cpp
#include<iostream> #include<limits.h> using namespace std; // TC: O(n*k) // SC: O(1) int getMaxSumSubArray1(int arr[], int k, int n){ int max_sum=0; for(int i=0; i<n-k; i++){ int curr_sum=0; for(int j=i; j<i+k; j++){ curr_sum+=arr[j]; } max_sum = max(curr_sum, max_su...
ALGO
0.999759
5.341805
44fd637b-8edd-4ee5-a533-f1dad5245434
poyiray/---
acwing/金明的预算方案.cpp
#include <bits/stdc++.h> using namespace std; const int N = 4e4; int f[N], n, m, v[3][N], w[3][N], len[N], a[N]; int main() { cin >> m >> n; for (int i = 1; i <= n; i++) { int V, W, q; cin >> V >> W >> q; if (!q) { a[++a[0]] = i; v[0][i] = V; w[0][i] = W; } else { v[++len[q]][q] = V; w[l...
ALGO
0.999744
3.600448
b7ba57c0-b44f-4dea-8693-b65ce1242c2e
Pranav0786/COdeForEnjoy
30_Graph_Striver/05_Number_of_Distinct_Islands.cpp
// gfg #include <bits/stdc++.h> using namespace std; #define ll long long class Solution { public: void dfs(int i, int j, int bi, int bj, vector<pair<int, int>> &temp, vector<vector<int>> &vis, vector<vector<int>> &grid) { vis[i][j] = 1; int n = grid.size(), m = grid[0].size(); int del...
ALGO
0.999906
5.936957
a7ecfbe5-ff3e-4f34-8929-f0e6f543f3ac
SeonJun-Hwang/PS
Dynamic Programming/1613.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; const int INF = 1e9; int _min(const int a, const int b) { return b ^ ((a ^ b) & -(a < b)); } int main() { ios_base::sync_with_stdio(false); cin.tie(0); int n, k; cin >> n >> k; vector<vector<int>> board(n, vector<int>(n, INF)); for ...
ALGO
0.999963
4.027244
d3fe387d-ee39-4b72-b7fc-e77e0ce9ee88
AmedeoSanson/programmiC
04-13-2023 es di riordino vettori/main.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> #define N 8 int main(void){ int vettore[N]; int somma = 0; int max[N], min[N],s=0,d=0; int kmax, kmin; srand(time(NULL)); for(int i = 0; i < N; i++){ max[i]=0; min[i]=0; } for(int i = 0; i < N; i++){ vettore[i] = rand() % 100; printf(" %i : %i\n...
ALGO
0.999567
3.318108
ea83161d-4366-43d6-9b6d-fec566d11d1a
AdneMoretti/Competitive-programming
C++/ED/mo.cpp
const int BLK = 600; // tamanho do bloco, algo entre 500 e 700 eh nice struct Query { int l, r, idx; Query(int l, int r, int idx): l(l), r(r), idx(idx) {} bool operator<(Query other) const { if(l/BLK != other.l/BLK) return l/BLK < other.l/BLK; return (l/BLK & 1) ? r < other.r : ...
ALGO
0.999296
4.247045
a0c0e1d4-9b8e-497e-9348-644c3fdc8d4c
ashwani361/Leetcode-Solutions
1029-two-city-scheduling/1029-two-city-scheduling.cpp
class Solution { public: int twoCitySchedCost(vector<vector<int>>& v) { int n = v.size(); sort(v.begin(), v.end(), [](vector<int>& a, vector<int>& b){ return a[1]-a[0]>b[1]-b[0]; }); int ans =0; for(int i=0; i<n; i++){ if(i>=n/2){ ...
ALGO
0.999993
6.176065
49ad7335-d235-4ba2-9e09-19564eb42561
pranesh25joshi/leetcode
1610-xor-operation-in-an-array/xor-operation-in-an-array.cpp
class Solution { public: int xorOperation(int n, int start) { int r = 0; for(int i =start ; i <=start+2*(n-1); i= i+2){ r^=i; } return r; } };
ALGO
0.999869
5.222021
7f01db4f-9414-4c15-8f2a-3d4847d59a30
MinjiK11/Algorithm
Sorting/Algorithm/bubble_sort.cpp
#define SWAP(x,y,t) ((t)=(x), (x)=(y), (y)=(t)) void bubble_sort(int list[], int n){ int i, j, temp; for(i=n-1;i>0;i--){ for(j=0;j<i;j++){ if(list[j]>list[j+1]) SWAP(list[j],list[j+1],temp); } } }
ALGO
0.999967
4.023345
f0fe6a4b-8edc-4b22-8aec-cd801430282f
wdk59/Algorithm
프로그래머스/2/42839. 소수 찾기/소수 찾기.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; bool isPrime(int num) { for (int i = 2; i < num; i++) { if (num % i == 0) { return false; } } return true; } void DFS(string num, string now, vector<bool>& visited, vector<int>& pr...
ALGO
0.999263
5.693299
560b74ae-8c27-4ca3-beb7-95475c58ed0a
ashbunnn/advent_of_code_2024
Day 4/Part 2/day4_part2.cpp
#include <bits/stdc++.h> using namespace std; const vector<pair<int, int>> directions = { {1, 1}, {-1, -1}, {-1, 1}, {1, -1} }; bool searchWord(const vector<string>& grid, int row, int col, vector<vector<bool>>& used) { int rows = grid.size(); int cols = grid[0].size(); if(grid[row...
ALGO
0.99984
6.222795
ec4ebd67-dcba-4b05-b69b-59d16d1f554e
TonyMorse92/Algo_DS_Imp
add.cpp
#include <iostream> using namespace std; int add(int x, int y) { return x+y; } int main() { int x = 15, y = 10; cout << "Sum of 15 and 10 is " << add(x, y) << "\n"; return 0; }
TOOL
0.983122
4.897775
bfc657a8-29c2-4e6e-83d9-d11d546ea222
ehnryx/acm
google-codejam/2022/qualifier/d.cpp
#include <bits/stdc++.h> using namespace std; #define _USE_MATH_DEFINES #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> namespace { using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; } using l...
ALGO
0.999956
4.29563
6800d903-6377-409f-9a5d-ba0e44d25cef
YUgyeong-Choi/Coding_Test
sloved/sloved/7568.cpp
#include <iostream> using namespace std; int main() { int getNum; cin >> getNum; int people[50][3]; for (int i = 0; i < getNum; ++i) { cin >> people[i][0] >> people[i][1]; people[i][2] = 1; } for (int i = 0; i < getNum; ++i) { for (int j = 0; j < getNum; ++j) { if (i != j) { if (people[i][0] < peop...
ALGO
0.999915
4.252104
3f2bae86-6fe8-4ba2-bd11-aacadaf21054
aryatyagi14/cs225Labs
lab_dict/anagram_dict.cpp
/** * @file anagram_dict.cpp * Implementation of the AnagramDict class. * * @author Matt Joras * @date Winter 2013 */ #include "anagram_dict.h" #include <algorithm> /* I wonder why this is included... */ #include <fstream> using std::string; using std::vector; using std::ifstream; /** * Constructs an Anagram...
TOOL
0.894916
6.16516
93b694e2-55ce-462c-8658-6f4179afa846
yplusplus/aabbyy
20130920/J.cpp
#include <iostream> #include <cstring> #include <cstdio> #include <algorithm> using namespace std; #define ll long long const int N = 11111; ll a[N]; int gauss(int row, int col) { int i, r, c; for (r = 0, c = col - 1; r < row && c >= 0; r++, c--) { for (i = r; i < row; i++) if (a[i] >> c & 1) break; if (i == ...
ALGO
0.999934
4.120963
ad18b07a-e83f-45f0-9977-647cf9d8c25f
Saurabhn16/CP-dsa
DSA/binaryTree/preInPostorder/inpre_Post.cpp
//{ Driver Code Starts // #include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *left; struct Node *right; Node(int x) { data = x; left = NULL; right = NULL; } }; void printPostOrder(Node *root) { if (root == NULL) return; p...
ALGO
0.99999
6.047984
65ae9b77-132d-4255-8780-7fceb0c2933f
mohitGitHxb/DataStructuresAndAlgo
Contests Upsolving Leetcode and GFG/Dynamic Programming/Non Standard DP/Find maximum non decreasing array length bw118.cpp
#include <bits/stdc++.h> using namespace std; // Idea: // 1. say max_len[i] is the result/answer for first i elements //1a. max_len[0] = 0; max_len[1] = 1 // 2. say last_val[i] is last value of array // after performing optimal operations for first i elements // 3. max_len[i] = max(max_len[i], max_len[q]+1) for all val...
ALGO
0.999744
4.997149
add74676-c93e-42e1-8903-ea7b8f72ca22
kashapov17/a-ds
work4/def/htable.cpp
/** * @brief chain hash table with additive hashing implementation * @file htable.cpp * @author Kashapov Yaroslav * @date 2020 */ #include "htable.h" #include <cmath> htable::htable() { table = new std::vector<std::list<int>>; _size=0; } htable::~htable() { delete table; table = nullptr; } void ...
ALGO
0.937151
4.717108
b3d33a9d-c73c-4848-b88e-405aa3efc28b
JaGrid23/RPICoursework
Data Structures/Homework/DS-HW6_Ricochet_Robots/HW6/HW6/main.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <cstdlib> #include <string> #include <cassert> #include <map> #include "board.h" #include "history.h" #include "solutions.h" using namespace std; typedef map<int, vector<int> > v_vec; typedef vector<pair<char, Position> > GoalVec; // =================...
ALGO
0.998966
5.670928
7187601e-5ee6-4ed4-8423-79ac7cdf29fa
pingchungchang/CP
a243.cpp
#include <iostream> using namespace std; int v1[101][101] = {}; int v2[101][101] = {}; int ans[101][101] = {}; int main(){ int m,n,o,p; cin>>m>>n>>o>>p; if(n != o){ cout<<"Error"; return 0; } for(int i =0;i<m;i++){ for(int j =0;j<n;j++){ cin>>v1[i][j]; } } for(int i =0;i<o;i++){ for(int j =0;j<p;j+...
ALGO
0.999211
3.047821
887ebd98-79fe-4847-9e55-5eeae078bdd9
Babasaheb-Bhalekar/CrackYourPlacement
Linked List/Q31_Flattening a Linked List.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; struct Node *next; struct Node *bottom; Node(int x) { data = x; next = NULL; bottom = NULL; } }; class Solution { public: // Function which returns the root of the flattened linked list. Node *flatten(Node *root) { ...
ALGO
0.999965
4.952428
3621c921-ec0a-4c99-b269-4a0053d6aeb2
bhanutejaindla/-Strivers-SDE-Sheet-Challenge-
Modular Exponentiation_CN.cpp
#include <bits/stdc++.h> int modularExponentiation(int x, int n, int m) { // Write your code here. long long int ans=1; while(n>0) { if (n % 2 == 1) { ans = ((ans % m) *(long long int) (x % m)) % m; n = n - 1; } else { x=((long long int)(x%m)*(lon...
ALGO
0.999995
5.543602
d66e7a86-ce80-4876-9a29-6e55f3ca993a
letangphuquy/Flutter-Lab-Exercises
lab7_destini/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.998374
6.772262
17c2cd15-98e5-4bd8-be94-ab71a9258a8c
Loki-chen/Compile_via_MLIR
third_party/llvm-project/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move.pass.cpp
// <algorithm> // UNSUPPORTED: c++03, c++11, c++14, c++17 // template<input_iterator I, sentinel_for<I> S, weakly_incrementable O> // requires indirectly_movable<I, O> // constexpr ranges::move_result<I, O> // ranges::move(I first, S last, O result); // template<input_range R, weakly_incrementable O> // req...
TEST
0.895425
7.166468
254c3f40-9615-45da-901c-0446a0c795d1
Theparia/Advanced-Programming-Course-Projects
CA5/src/InputFunctions.cpp
#include "InputFunctions.hpp" #include <sstream> #include <cstdlib> using namespace std; #define CENTER_OF_FIRST_HOUSE_X 153 #define CENTER_OF_FIRST_HOUSE_Y 206 #define HOUSE_LENGTH 60 typedef vector<int> wave_t; typedef vector<FPoint> path_t; vector<string> get_parsed_data(string data_line, char delimiter) { s...
ALGO
0.972252
3.281583
12d342cf-772a-4ce0-a147-a2111e0a24c1
Rony1031/PrepBytes
HeapDecrease.cpp
#include <bits/stdc++.h> using namespace std; void swap(int *a,int *b) { int temp = *a; *a = *b; *b = temp; } int parent(int i) { return (i/2); } int left(int i) { return (i*2); } int right(int i) { return (i*2)+1; } void insert(int heap[],int *size,int val) { int i = (*size); *size +=1; heap[i] ...
ALGO
0.999992
3.466216
1dd6e4b0-2ab3-4ed3-a2a1-1869e2bc2a27
wocantudou/Opencv4.9.0
modules/video/src/tracking/detail/tracker_mil_state.cpp
#include "../../precomp.hpp" #include "opencv2/video/detail/tracking.detail.hpp" #include "tracker_mil_state.hpp" namespace cv { namespace detail { inline namespace tracking { /** * TrackerStateEstimatorMILBoosting::TrackerMILTargetState */ TrackerStateEstimatorMILBoosting::TrackerMILTargetState::TrackerMILTargetSt...
ALGO
0.986191
6.451598
4464f1c9-2f76-4e35-9c56-399238b5f41e
liemroym/competitive_programming
Codeforce/good_numbers_easy.cpp
#include <bits/stdc++.h> using namespace std; #define LL long long #define ull unsigned long long #define pb(x) push_back(x) #define mp(x,y) make_pair(x,y) #define fo(i, s, n) for (LL i = s; i < n; i++) #define INF 10e10+7 #define __gcd gcd // gcd(4, 6) = 2, gcd (30, 90) = 30, greatest common divisor #define PI ...
ALGO
0.999383
3.156721
a45eb6b7-d9f3-4e9e-9731-607468193e35
Krishantchauhan/Coding
7-Strings/Anagram.cpp
#include <bits/stdc++.h> using namespace std; int main() { // your code goes here string s1="GEEKSFORGEEKS"; string s2="FORGEEKSGEESK"; if(s1.length() != s2.length()){ printf("False"); return 0; } sort(s1.begin() , s1.end()); sort(s2.begin() , s2.end()); if(s1==s2) printf("True"); else ...
ALGO
0.999989
3.453076
c5480d12-a8bd-49b6-bc25-9bd938d6aa0c
sarvex/leetcode-object-pascal
solution/2200-2299/2264.Largest 3-Same-Digit Number in String/Solution.cpp
class Solution { public: string largestGoodInteger(string num) { for (char i = '9'; i >= '0'; --i) { string t(3, i); if (num.find(t) != string::npos) return t; } return ""; } };
ALGO
0.999826
6.228439
f3b354e3-3388-4b91-ae24-32b6f734b20b
pedrohp-machado/MaratonaProgramacao
Aula_7/Robin Hood/main.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int test; cin >> test; while (test--) { int people, k, a, help = 0, money = 0; cin >> people >> k; while(people--){ cin >> a; if (a >= k) money += a; else if (a == 0) { ...
ALGO
0.999433
3.499852
2068e426-1278-4e87-97c2-9e0fd83090f2
eros-lige/LeetCode
Insert_Interval.cpp
/** * Definition for an interval. * struct Interval { * int start; * int end; * Interval() : start(0), end(0) {} * Interval(int s, int e) : start(s), end(e) {} * }; */ class Solution { public: bool merge(Interval & a,Interval & b){ if(a.end>=b.start){ a.end=a.end<b.end?b...
ALGO
0.999981
5.768554
7e3bf74d-dfba-4693-94ee-da9a4f6fea86
lee-jeong-geun/ps
swexpert/1486.cpp
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; int N, B, H[25], result; /* 전체 탐색하면서 B보다 클때 B와의 차이가 최소인 경우를 찾으면 된다. */ void func(int depth, int hap) { if(depth == N) { if(hap >= B) { result = min(result, hap - B); } return; } ...
ALGO
0.999815
3.26586
31ac96d6-2d68-4103-b938-076617d2e99e
hungnt61h/PTIT-Algorithms
SPOJ/P184PROI.cpp
#include <iostream> #include <vector> using namespace std; long long p, q, n, tmp; vector<long long> a, m; void calc(long long a, long long b) { if (a == 0 || b == 0) return; tmp = a/b; m.push_back(tmp); a -= b*tmp; calc(b, a); } void run() { if (n > 1 && a[n-1] == 1){ a[n-2]++; ...
ALGO
0.999955
3.519193
b19da8ba-729d-4f81-a033-8576a8a2de50
JulioZanotto/CarND-Path_planning-Project_P7
src/Eigen-3.3/bench/perf_monitoring/gemm/lazy_gemm.cpp
#include <iostream> #include <fstream> #include <vector> #include <Eigen/Core> #include "../../BenchTimer.h" using namespace Eigen; #ifndef SCALAR #error SCALAR must be defined #endif typedef SCALAR Scalar; template<typename MatA, typename MatB, typename MatC> EIGEN_DONT_INLINE void lazy_gemm(const MatA &A, const Ma...
ALGO
0.972297
6.117427
e475e925-f402-44a9-8ccb-7af0099669b0
Tilak612/c--tutorial
bit_manipulation/Q3.cpp
/* Q) write a program to generate all possible subsets of a set {a,b,c} abc {} 000 0 {c} 001 1 {b} 010 2 {b,c} 011 3 {a} 100 4 {a,c} 101 5 {a,b} 110 6 {a,b,c} 111 7 */ #include<iostream> using namespace std; void subsets(int arr[], int n){ for(int i=0;...
ALGO
0.996919
4.519029
581b172e-7535-40b1-b907-fb5ff76aed3f
Arpit-Verma-2003/Date_Structures
maximumSumPathofaBinaryTree.cpp
class Solution { public: int maxiPath(TreeNode* root,int& maxi){ if(root==NULL) return 0; int leftm = max(0,maxiPath(root->left,maxi)); int rightm = max(0,maxiPath(root->right,maxi)); maxi = max(maxi,leftm+rightm+root->val); return max(leftm,rightm)+root->val; } int ...
ALGO
0.999981
6.280275
8684a7ff-e64b-4480-a2c4-43bc488082ca
EnnLTNKN/CSES
RestaurantCostumers.cpp
#include<bits/stdc++.h> using namespace std; #define int long long int32_t main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; #define pii pair<int, int> vector<pii> a; for (int i = 1; i <= n; i ++){ int x, y; cin >> x >> y; a.push_back(pii(x,...
ALGO
0.999863
4.077566
482c9fbf-4bb0-4f27-95a7-125268afe7b6
1604078-MEHEDI/Codeforces
codeforces/999/B.cpp
#include <bits/stdc++.h> using namespace std; int a[101],t=0; // Function to print the divisors void Divisors(int n) { // Note that this loop runs till square root for (int i=1; i<=sqrt(n); i++) { if (n%i == 0) { // If divisors are equal, print only one if (n/i == i)...
ALGO
0.999991
4.227262
b93d6349-97ea-4efa-97f2-24d05f2d7d18
Mr-Aditya-Jadhav/SDE-Sheet-Coding-Interview-Problems
Day 12/k-max-sum-combinations.cpp
//https://www.codingninjas.com/studio/problems/day-29-k-max-sum-combinations_8230768?challengeSlug=striver-sde-challenge #include <bits/stdc++.h> vector<int> kMaxSumCombination(vector<int> &A, vector<int> &B, int N, int K){ // Write your code here. sort(A.begin(),A.end()); sort(B.begin(),B.end()); vector<i...
ALGO
0.999953
4.659312
2ab9de6a-00d0-4409-baa1-e250cf6caa6e
Atik203/C_and_CPP
C++/Know_Your_Level.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; vector<int> adj[N]; bool visited[N]; int level[N]; vector<int> s_level; void bfs(int s, int l) { queue<int> q; q.push(s); visited[s] = true; level[s] = 0; while (!q.empty()) { int u = q.front(); q.pop(); ...
ALGO
0.999994
4.153454
853a4995-cad6-456b-9138-a5b7b1f2fc90
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_11490_4.cpp
#include <bits/stdc++.h> using namespace std; const int mx = 5005; const int inf = 0x7fffffff; long long h[mx], dp[mx + 1], ma[mx + 1]; long long he(int l, int r) { long long s = 0; for (int i = l; i <= r; ++i) { s += h[i]; } return s; } int main() { int n; scanf("%d", &n); for (int i = 0; i < n; ++i)...
ALGO
0.999877
3.602874
352a0375-c144-4902-ae46-ff0d9e09949c
hyeonseong0917/Codeforces
random/1832C.cpp
#include <iostream> #include <algorithm> #include <vector> #include <map> #include <cmath> using namespace std; #define ll long long int main() { // your code goes here int t=0; cin>>t; while(t--){ ll n; cin>>n; vector<ll> v; ll pre_num=-1; for(ll i=0;i<n;++i){ ll a; cin>>a; if(a==pre_num) conti...
ALGO
0.999691
3.955404
6efc80b7-194f-4a63-afb5-508f58c258be
Aditya-255/Cplusplus_OR_CPP_program
p26.cpp
/* 1 22 333 4444 */ #include<iostream> using namespace std; int main(){ int n; cin>>n; int i=1; while(i<=n){ int s=n-i; int c=i; int j=1; while(j<=i){ while(s){ cout<<" "; s=s-1; } while(c){ cout<<c; c=c-1; } // cout<<i; j=j+1; } cout<<endl; i=i+1; } }
ALGO
0.999987
3.521497
90564648-02f8-4015-98f6-3f3b6fd392b3
David-Xiang/Online-Judge-Solutions
OJ/2025/250616/LC2016.cpp
/* * @lc app=leetcode id=2016 lang=cpp * * [2016] Maximum Difference Between Increasing Elements */ #include <iostream> #include <vector> using namespace std; // @lc code=start class Solution { public: int maximumDifference(vector<int> &nums) { int min_elem = 1e9 + 10; int ans = -1; f...
ALGO
0.999753
5.571979
d3210bbc-77a0-4b09-a1df-d90f851a2a4d
sanchitpandya/100-programs
85.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; printf("Enter the number of elements in the array: "); scanf("%d",&n); printf("Enter the elements in the array: "); int arr[n]; for(int i=0;i<n;i++) scanf("%d",&arr[i]); sort(arr,arr+n); int r_arr[n]; int j=0;...
ALGO
0.999967
3.726199
d7fe2235-a7b4-4773-84af-cb60393293bd
ezeteze/android_frameworks_av
media/libstagefright/codecs/amrwb/src/deemphasis_32.cpp
/* ------------------------------------------------------------------------------ Filename: deemphasis_32.cpp Date: 05/08/2004 ------------------------------------------------------------------------------ REVISION HISTORY Description: -----------------------------------------------------------------------...
ALGO
0.999758
6.02347
8dd9c434-1b82-4a8e-a27a-07d7f69292c2
jamesdjuhartono/UVa-Problems
src/p10041.cpp
#include <iostream> #include <math.h> #include <algorithm> using namespace std; int compare (const void * a, const void * b) { return ( *(int*)a - *(int*)b ); } int main() { int numCase; int size, min, max, sum, opt; int array[500]; cin >> numCase; for(int i = 0; i < numCase; i++) { ...
ALGO
0.998869
4.414644
9dbbe93e-8282-4a74-bff5-42d809351a3a
haritonn/ASA
ASA_strings1/kmp.cpp
#include <iostream> #include <vector> #include <string> using namespace std; //префикс-функция vector<int> prefix_function(const string &s) { int n = s.size(); vector<int> p(n, 0); for (int i = 1; i < n; i++) { int j = p[i - 1]; while (j > 0 && s[i] != s[j]) j = p[j - ...
ALGO
0.999558
5.331986
b47accf1-acdc-433c-b53d-a6fd15635df0
olegrpavlenko/Interview-Prep
2024-cycle/two_pointers/3sum.cpp
class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { std::sort(nums.begin(), nums.end()); /* test bin_search for(int i = 0; i < nums.size(); ++i) { std::cout << "searching for element " << nums[i] << " at index " << i << std::endl; int look = bin...
ALGO
0.999966
5.495952
c3293a7d-5473-4693-beef-03d18e01cb7f
WhiteWidden/LeetCode-test
wintertest34/wintertest34.cpp
// wintertest34.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 /*给你一个整数数组 nums,返回 数组 answer ,其中 answer[i] 等于 nums 中除 nums[i] 之外其余各元素的乘积 。 题目数据 保证 数组 nums之中任意元素的全部前缀元素和后缀的乘积都在 32 位 整数范围内。 请 不要使用除法,且在 O(n) 时间复杂度内完成此题。*/ #include <iostream> #include <vector> #include <algorithm> using namespace std;//除自身以外数组的乘积 void numsinput(v...
ALGO
0.999966
4.763902
4288d4e1-5531-4d18-93dd-9912a2fd1b28
HossainMaruf/Online-Judge-Solution
URI/1004 - Simple Product.cpp
#include <iostream> using namespace std; int main() { int a, b; cin>>a>>b; cout<<"PROD = "<<a*b<<endl; return 0; }
ALGO
0.970136
3.911226
54f55753-d538-420b-a1d4-18c83abc9fe6
ishandutta2007/codeforces
subscriber/normal/238/E.cpp
#include<stdio.h> #include<iostream> #include<vector> #include<cmath> #include<algorithm> #include<memory.h> #include<map> #include<set> #include<queue> #include<list> #include<sstream> #define mp make_pair #define pb push_back #define F first #define S second #define SS stringstream #define sqr(x) ((x)*(x)) #define m0...
ALGO
0.999927
3.544638
7c6dbca8-27f7-4001-99e1-6dc7e4a160bf
Keshav1707/Submissions
D_Eating.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define ll long long #define di(x) \ ll x; \ cin >> x #define vecll vector<ll> #define sz(x) ((int)(x).size()) #define pb push_back #define po pop_back #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define endl "\n"...
ALGO
0.999918
4.153057
fb0e823c-d6dd-4729-9eec-f2890aa5278a
GlodonOpenSrc/Qt5.6.3_Glodon
qtbase/src/corelib/tools/qstring.cpp
#include "qstringlist.h" #include "qregexp.h" #include "qregularexpression.h" #include "qunicodetables_p.h" #ifndef QT_NO_TEXTCODEC #include <qtextcodec.h> #endif #include <private/qutfcodec_p.h> #include "qsimd_p.h" #include <qnumeric.h> #include <qdatastream.h> #include <qlist.h> #include "qlocale.h" #include "qlocal...
TOOL
0.985153
4.763162
8d5fbabf-1a69-4a2c-9739-5cd8de95ea16
nadimnesar/Online-Judges-Accepted-Solutions
CodeForces/1176A/36010935_AC_15ms_8kB.cpp
/*BISMILLAHIR RAHMANIR RAHIM*/ #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define all(x) x.begin(), x.end() #define dot(x) fixed << setprecision(x) #define eps 1e-9 #define MAX 100000 #define PI acos(-1.0) //3.1415926535897932 #define f...
ALGO
0.999954
4.11256
40560930-5d4d-4c18-85c4-e01c3313df8d
fafa1899/BuildCppDependency
Source/boost-1.86.0/libs/hana/benchmark/transform/execute.std.array.erb.cpp
#include "measure.hpp" #include <algorithm> #include <array> #include <cstdlib> 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_s...
TEST
0.915906
3.436713
094a9374-ced6-4c05-babc-d448e0ab725b
simonmandlik/Competitive-programming-solutions
Codejam/2008_1B_A.cpp
#include <bits/stdc++.h> #pragma GCC optimize ("Ofast") using namespace std; #define EPS (1e-10) #define DEBUG(x) cout << "> " << #x << ": " << x << endl; #define REP(i, n) for (int i = 0; i < (n); i++) #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define FORD(i, a, b) for (int i = (a); i >= (b); i--) #define B...
ALGO
0.999316
4.198032
cbbfeb1b-efc8-4eaa-8fb9-59c668ca5579
alexeysas/sdc-path-planning
src/Eigen-3.3/doc/examples/TemplateKeyword_flexible.cpp
#include <Eigen/Dense> #include <iostream> using namespace Eigen; template <typename Derived1, typename Derived2> void copyUpperTriangularPart(MatrixBase<Derived1>& dst, const MatrixBase<Derived2>& src) { /* Note the 'template' keywords in the following line! */ dst.template triangularView<Upper>() = src.template...
TOOL
0.981191
5.804369