uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
785910ca-eee5-481f-ab7b-e7ba485772c3
VenkataGirishVelaga/Leetcode
516-longest-palindromic-subsequence/longest-palindromic-subsequence.cpp
class Solution { public: int longestPalindromeSubseq(string s) { int n = s.size(); string t = s; reverse(t.begin(), t.end()); vector<int> prev(n + 1), curr(n + 1); for(int i = 1; i <= n; i++){ for(int j = 1; j <= n; j++){ if(s[i - 1] == t[ j - 1]...
ALGO
0.999954
6.395834
3af986a2-95b5-4a21-8e86-9591c54d0d43
apache/cloudberry
src/backend/gporca/libgpopt/src/xforms/CJoinOrder.cpp
#include "gpopt/xforms/CJoinOrder.h" #include "gpos/base.h" #include "gpos/common/CBitSet.h" #include "gpos/common/clibwrapper.h" #include "gpos/io/COstreamString.h" #include "gpos/string/CWStringDynamic.h" #include "gpopt/base/CColRefSetIter.h" #include "gpopt/base/CDrvdPropScalar.h" #include "gpopt/operators/CLogic...
ALGO
0.984831
7.408317
3b449684-d6eb-4b75-8cef-0c6cc8fb8545
muskan-khushi/LeetCode
Graphs/maxFishInGrid.cpp
// You are given a 0-indexed 2D matrix grid of size m x n, where (r, c) represents: // A land cell if grid[r][c] = 0, or // A water cell containing grid[r][c] fish, if grid[r][c] > 0. // A fisher can start at any water cell (r, c) and can do the following operations any number of times: // Catch all the fish at cell ...
ALGO
0.999942
6.040356
6ec62143-5067-4904-b373-6778e4d9b4bf
YellowSquared/Contest_pekus
Source/1_semester/Contest2/H (IfItAintBrokenBreakIt).cpp
#include <iostream> #include <cmath> int main() { u_int64_t x = 0; std::cin >> x; bool flag = false; for (u_int64_t y2 = x; y2 <= x + x / 100; y2 += 1) { u_int64_t y = y2; u_int64_t prime_devisor1 = 0; u_int64_t amount_of_prime_devisors1 = 0; u_int64_t prime_devisor2 = 0; u_int64_t amount_o...
ALGO
0.999948
5.055225
9eb19bf6-685d-4a2c-bc3a-f5c6b6aebaa6
fredgrott/fluttertips_tricks
flutter_transparent_dialogs/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.99894
6.783336
198fc7ee-07c9-41cd-ae22-80d75f0e462d
ThuyenPV/entrance-flutter-nexlesoft
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.998859
6.785645
e41edeb9-f980-4dc7-b863-1511ed6cbbcf
Kaileshwaran13/CodeChef
500 - 1000 difficulty rating/Hardest Problem Bet.cpp
#include <bits/stdc++.h> using namespace std; int main() { // your code goes here long long int T; cin >> T; while (T--) { int a, b, c; cin >> a >> b >> c; int d = min({a,b,c}); if (d == a) cout << "Draw" << endl; if (d == b) cout << "Bob" << endl; if (d ...
ALGO
0.999795
4.734906
bd743868-dd0b-4842-aafa-b91a0595f9ce
ishandutta2007/codeforces
rafi22/normal/1137/B.cpp
#include <bits/stdc++.h> #define int long long #define double long double #define endl '\n' #define st first #define nd second #define pb push_back #define sz(x) (int)(x).size() using namespace std; double PI=3.14159265359; int inf=1000000000000000007; int mod=1000000007; int mod1=998244353; const bool multi=0; int ...
ALGO
0.999998
4.84573
26a6acb2-a9f7-4f0c-86b8-f88576c05e8f
delowarshizar/CPP-Programing
trianle.cpp
#include<bits/stdc++.h> using namespace std; int main() { double a[3]; cin>>a[0]>>a[1]>>a[2]; sort(a,a+3,greater<int>()); if(a[0]>= a[1] + a[2]) cout<<"NAO FORMA TRIANGULO"<<endl; else { if (a[0] * a[0] == a[1] * a[1] + a[2] * a[2]) cout << "TRIANGULO RETANGULO" << endl; ...
ALGO
0.999935
4.660989
ac8e6993-9959-4e31-b08a-336494f8d713
AakashKumar-Code/GFG-Daily_Practice
Easy/Party of Couples/party-of-couples.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 findSingle(int n, int arr[]){ // code here int x=arr[0]; for(int i=1; i<n; i++){ x^=arr[i]; ...
ALGO
0.999784
5.410173
9c9a521b-df8e-4a50-9752-1727af819104
shaoyuanhangyes/LeetCode
ๆ•ฐ็ป„/61.941.ๆœ‰ๆ•ˆ็š„ๅฑฑ่„‰ๆ•ฐ็ป„/61.941.ๆœ‰ๆ•ˆ็š„ๅฑฑ่„‰ๆ•ฐ็ป„.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: bool validMountainArray(vector<int>& A) { if(A.size()<3) return false; int left=0,right=A.size()-1; while(left<A.size()-1&&A[left]<A[left+1]){ left++; } while(right>0&&A[right]<A...
ALGO
0.999898
5.314795
b4c4a659-4704-4d7e-a0ee-311d9f76dca0
PLCwithoutP/GakwayaCpp
section15/15.7_Exercise7_FilterInMultiplesOf3/main.cpp
#include <iostream> #include <vector> int main(int argc, char **argv) { std::vector<int> numbers {1,21,4,5,7,3,9,3,5,17,15}; for (int i : numbers) { if (i % 3 == 0) { std::cout << i << " "; } } return 0; }
ALGO
0.996276
4.248188
68051624-905d-4574-84a1-aa01e9e68b59
StrivingLee/CPP_SUSTECH
Lab/Answers/Lab1/float.cpp
// print three float numbers with precision // Assignment1 P38 #include <iostream> #include <iomanip> using namespace std; int main(int argc, char **argv) { double a = 0.1, b = 0.2, c = 0.3; cout << fixed << setprecision(2); cout << a << endl << b << endl << c << endl; // you can ...
TOOL
0.94458
4.315049
f5e8d281-d104-4810-8512-d4901d8fe4c6
gerikzatorski/murmurations
src/main.cpp
#include <SFML/Graphics.hpp> #include <chrono> #include <iostream> #include "Boid.hpp" #include "Flock.hpp" #define NUM_BOIDS 50 #define WINDOW_WIDTH 1000 #define WINDOW_HEIGHT 800 using namespace std; using namespace murmurations; int main() { srand((unsigned int)time(0)); cout << "Starting murmur program" << ...
ALGO
0.981363
5.12605
4478d659-676c-45e4-84ce-891ac12a5b33
Noor-Nasri/daily-leetcode
1044-find-common-characters/find-common-characters.cpp
class Solution { public: vector<string> commonChars(vector<string>& words) { unordered_map<char, int> min_occur = {}; for (char c : words[0]){ if (min_occur.count(c)) min_occur[c]++; else min_occur[c] = 1; } for (int ind = 1; ind < words.size(); ind++){ ...
ALGO
0.999976
5.965068
d1cd22c4-1e77-4f8d-b152-bb17bbd68e58
khaledman6122/codeforces-A-B
A. George and Accommodation.cpp
// http://codeforces.com/problemset/problem/467/A // #include <iostream> using namespace std ; int main () { int n,p,q,c=0; cin>>n; for(int i=0;i<n;i++) { cin>>p>>q; if(p+2<=q) c++; } cout<<c<<endl; return 0 ; }
ALGO
0.999651
3.498168
f4296ace-25a2-4752-8bb7-84a5fc126200
dhirajpatil2346/compitative
cf 1600/mst.cpp
// C++ Program to find weight of // minimum spanning tree in a // complete graph where edges // have weight either 0 or 1 #include <bits/stdc++.h> using namespace std; // To store the edges of the given // graph map<int, int> g[200005]; set<int> s, ns; // A utility function to perform // DFS Traversal void dfs(int x)...
ALGO
0.999864
5.715919
7c7ec9ac-13cf-4cdb-b97b-f35be12929f0
ishandutta2007/codeforces
skydec/normal/253/D.cpp
#include<stdio.h> #include<cstring> using namespace std; int sum[405][405]; char str[405][405]; int u[27]; int n,m,ks;long long ans=0; int calc(int x1,int y1,int x2,int y2) { return sum[x2][y2]-sum[x1-1][y2]-sum[x2][y1-1]+sum[x1-1][y1-1]; } int main() { freopen("input.txt","r",stdin); freopen("output.txt","...
ALGO
0.999765
3.305176
a8abda82-563e-4612-818f-cb0efa0a37b8
aleksamarkoni/uvasolutions
00195 - Anagram/main.cpp
#include <iostream> #include <cstring> #include <algorithm> #include <cctype> using namespace std; bool comparator(char a, char b){ if(tolower(a) == tolower(b)){ return a<b; } return tolower(a) < tolower(b); } int main() { char word[1000]; int n; cin >> n; while(n--){ cin.ignore(); cin >> word; sort(...
ALGO
0.999812
5.103989
7ce5c19e-8539-43e2-a77d-2a411355da19
rafatbiin/cses-problem-set
sorting_and_searching/subarray_divisability.cpp
#include <bits/stdc++.h> using namespace std ; #define DEBUG(x) cout << '>' << #x << ':' << x << endl; #define mem(x,val) memset((x),(val),sizeof(x)) #define all(x) x.begin(),x.end() #define pb push_back #define mp make_pair #define PI acos(-1.0) #define N 1111111 #define M 1000000007 #define endl "\n" const int INF...
ALGO
0.999971
3.930034
30115404-c0fa-4f67-94ba-eaaf29d1631d
rkpdigital/Crystalfontz3D
10049G2LEG/platform/util.cpp
/* * PURPOSE: Assorted supporting functions. * * NOTES: * util.c/.h contains an assortment of supporting functions that are not specific to * this program: including: * * - math and min/max utilities and extensions * - vector manipulation utilities * - support for debugging routines * * * CHANGE HIST...
TOOL
0.971223
6.653421
86c74afc-b913-43cc-9d4b-2650f048f9e6
alexander050211/problem-solving
atcoder/abc-361/b.cpp
#include <bits/stdc++.h> #define endl '\n' using namespace std; typedef long long ll; typedef pair<ll, ll> pll; #define F first #define S second int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); vector<ll> arr(6), brr(6); for (int i = 0; i < 6; i++) cin >> arr[i]; for (...
ALGO
0.999987
3.224595
5b82fcf6-b4b3-4681-b091-dbf37913f264
RicardoLou/If_You_Do
ๅจ„ๅญ็†‡/LeetCodeDayly/lc3159.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: vector<int> occurrencesOfElement(vector<int>& nums, vector<int>& queries, int x) { int n = nums.size(); vector<int> record; for(int i = 0; i < nums.size(); i ++) { if (nums[i] == x) { record.pu...
ALGO
0.999619
5.636091
4eb76dba-149d-4d27-b381-706c7b87fcd3
osom8979/external
opencv-4.1.0/modules/imgproc/src/resize.sse4_1.cpp
/* //////////////////////////////////////////////////////////////////// // // Geometrical transforms on images and matrices: rotation, zoom etc. // // */ #include "precomp.hpp" #include "resize.hpp" namespace cv { namespace opt_SSE4_1 { class resizeNNInvokerSSE2 : public ParallelLoopBody { public: resizeNNI...
ALGO
0.974652
6.969998
9dc68d89-5e6e-4393-ac59-865cae484e43
kanhaiyasulay/Leetcode
1212-sequential-digits/sequential-digits.cpp
class Solution { public: vector<int> sequentialDigits(int low, int high) { vector<int> ans; queue<int> q; for(int i=1; i<9; i++) q.push(i); while(!q.empty()) { int front = q.front(); if(front >= low) ans.push_back(front); q.pop(); ...
ALGO
0.999934
6.217997
61f983d1-1b89-4470-afd0-5aea225ef2a3
g-akash/spoj_codes
chef_and_cook_off.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <string> #include <math.h> #include <map> #include <queue> #include <stack> #include <algorithm> #include <list> using namespace std; #define ll long long int #define ull unsigned ll #define umm(x,y) unordered_map<x,y > #define mm(x,y) map<x,y > ...
ALGO
0.998895
3.629534
17aed99a-a9dc-446c-9bca-eb650c30913d
naymur92/CompetitiveProgramming_or_DSA_CPP
codeforces/800_2002_A_Distanced_Coloring.cpp
/* https://codeforces.com/problemset/problem/2002/A */ #include <bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int n, m, k; cin >> n >> m >> k; int ans = min(n, k) * min(m, k); cout << ans << "\n"; } } /* 6 3 3 2 5 1 10000 7 3 4 3 2 7 8 9 6 2 5 4 */ /* 4 5 12 6 36 ...
ALGO
0.999953
4.733047
722c5621-0684-49dd-9be6-2ddff12bbff8
Admentus64/Gymnasium-Codings-Courses
Programmering A/CodeBlocks/Vektorn/main.cpp
#include<iostream> #include<vector> #include<algorithm> using namespace std; double raknaMedel(vector<double> v) { double summa=0; for(int i=0; i<v.size(); i++) summa+=v.at(i); return summa/v.size(); } double raknaMedian(vector<double> v) { sort(v.begin(),v.end()); int jamnt; if (v.s...
ALGO
0.999592
3.953794
abf9281d-a741-454c-81b4-182715767199
shenghuanjie/poj
problems/3195_ๆœ€ๅคงๅ…ฌ็บฆๆ•ฐ.cpp
/* 3195: ๆœ€ๅคงๅ…ฌ็บฆๆ•ฐ http://bailian.openjudge.cn/practice/3195/ ๆ่ฟฐ ่พ“ๅ…ฅ2ไธชๆญฃๆ•ดๆ•ฐ๏ผŒๆฑ‚ๅ‡บไป–ไปฌ็š„ๆœ€ๅคงๅ…ฌ็บฆๆ•ฐใ€‚ ่พ“ๅ…ฅ ่พ“ๅ…ฅไธคไธชๆญฃๆ•ดๆ•ฐ๏ผŒๅชๆœ‰ไธ€่กŒ๏ผŒๆ•ดๆ•ฐไน‹้—ด็”จไธ€ไธช็ฉบๆ ผๅˆ†ๅผ€ ่พ“ๅ‡บ ่พ“ๅ‡บๆœ€ๅคงๅ…ฌ็บฆๆ•ฐ๏ผŒๅชๆœ‰ไธ€่กŒ๏ผŒๅŒ…ๆ‹ฌไธ‰ไธชๆ•ฐๆฎ๏ผŒๅˆ†ๅˆซไธบ้‡‡็”จๅ่ฟ›ๅˆถ๏ผŒๅๅ…ญ่ฟ›ๅˆถๅ’Œๅ…ซ่ฟ›ๅˆถ่กจ็คบ็š„ๆœ€ๅคงๅ…ฌ็บฆๆ•ฐ๏ผŒ่พ“ๅ‡บๆ•ฐๆฎไน‹้—ด็”จ็ฉบๆ ผ้š”ๅผ€ ๆ ทไพ‹่พ“ๅ…ฅ 3 9 ๆ ทไพ‹่พ“ๅ‡บ 3 0x3 03 ๆ็คบ ๆณจๆ„ๅๅ…ญ่ฟ›ๅˆถ๏ผŒๅ…ซ่ฟ›ๅˆถ็š„่กจ็คบๆ ผๅผ */ #include<iostream> using namespace std; int gcd(int a, int b) //ๆฑ‚a, b็š„ๆœ€ๅคงๅ…ฌ็บฆๆ•ฐ { if(a%b ==0) return b; el...
ALGO
0.998519
4.380608
b8be3647-3c75-4333-9990-d4c62eacdbcf
0x1Shub/Data-Structures-And-Algorithms
Striver DSA Sheet/7-Recursion/7.3_Hard Recursion/03_N_Queen.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: bool isSafe1(int row, int col, vector<string> board, int n) { int duprow = row; int dupcol = col; while (row >= 0 && col >= 0) { if (board[row][col] == 'Q') return false; ...
ALGO
0.999919
5.855484
6df80ee1-df63-4f54-9f03-48d067f07363
Mr-Phoebe/BOJ-V3
kari/Cheat/testdata/code24.cpp
#include <stdio.h> #include <stdlib.h> main() { int T, N, count = 1; scanf("%d", &T); while(T--) { scanf("%d", &N); printf("Case #%d: Alice\n", count++); } }
ALGO
0.974655
3.413753
cc531103-50e6-4836-80a5-4976cc09da4d
Patryk2412/basis-of-programming-cpp
wskaลบniki/zadanie 4.cpp
/* Zadanie 4 โ€“ Kopiowanie tablicy dynamicznej Napisz funkcjฤ™ skopiujTablice(int* tab, int rozmiar), ktรณra skopiuje tablicฤ™ dynamicznฤ… do nowej. Pamiฤ™taj, ลผe w C++ zwykล‚e przypisanie nowaTab = staraTab; NIE KOPIUJE tablicy, tylko adres! Polecenie: 1. Stwรณrz dynamicznฤ… tablicฤ™ w main(). 2. Wypeล‚nij jฤ… wartoล›ciami np. t...
TOOL
0.87602
3.844275
85cce310-ba4f-48a4-980d-cce9d2ced510
Anushka-Bhowmick/DSA_Cpp
Leetcode-solutions/Kth Largest Element in an Array.cpp
class Solution { public: int findKthLargest(vector<int>& nums, int k) { // n is the size of nums vector int n=nums.size(); // creating a min heap for which we will set fixed size of k so that the top element will be the k'th largest element priority_queue <int, vector<int>, greater<...
ALGO
0.99998
5.679768
365ace59-0550-4cb4-8c04-861731890b93
satwikgm/LeetCode
N-Queen Problem - GFG/nqueen-problem.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: bool isSafe(int i , int j , vector<string> board) { int n=board.size(); int row=i , col = j; // upper diagon...
ALGO
0.998292
6.323905
3251bc66-88ce-4977-a01b-3eee2adf9c7c
metehkaya/Algo-Archive
Problems/Codeforces/Div_2/Educational_Codeforces_Rounds/Round_87/E.Graph_Coloring.cpp
#include <bits/stdc++.h> #define maxn 5001 #define pb push_back using namespace std; int n,m,n1,n2,n3,g; int col[maxn]; int ans[maxn]; int group[maxn]; int cnt[maxn][3]; int dp[maxn][maxn]; vector<int> adj[maxn]; vector<int> nodes[maxn][3]; void noSol() { puts("NO"); exit(0); } void dfs(int u , int c) { col[u] = ...
ALGO
0.999919
3.840452
8642213f-728c-4abb-b5d0-003469ee4fc8
AgarPiyush/Codechef
CNG1.cpp
#include<string.h> #include<stdio.h> long long int a[10000000]={0}; int main() { long long int i,j,k,t,m,c,d,max; scanf("%lld",&t); while(t--) { scanf("%lld %lld",&c,&d); a[c]=1; a[d]=1; a[c+d]=1; max=c; for(i=c;i<=1000;i++) { if(a[i]==1) { for(j=1;j*d<1000000;j++) { a[j*c]=1; ...
ALGO
0.999963
3.597737
ec1feed7-1b9c-41d0-8504-2ce8a2510438
ishandutta2007/codeforces
saketh/normal/585/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(0), cout.tie(0), cout.precision(15); int T, W, K; for (cin >> T; T; T--) { cin >> W >> K; string rows[3]; for (int i = 0; i < 3; i++) { cin...
ALGO
0.99973
3.81573
09978f3c-2b3d-41c5-bebb-a3b03498d831
rjs1442/ros2-reflexxes
ros-reflexxes/src/TypeIIRMLVelocityFallBackStrategy.cpp
// ---------------------- Doxygen info ---------------------- //! \file TypeIIRMLVelocityFallBackStrategy.cpp //! //! \brief //! Implementation file for the Type II On-Line Trajectory //! Generation algorithm //! //! \details //! For further information, please refer to the file TypeIIRMLVelocity.h. //! //! \date Marc...
ALGO
0.984791
6.705869
62fc0ed1-581f-4bf0-b4a3-798bc5bc8ec4
changtintin/cpp_learning
cpp_primer/VisualStudio2012/10/bind2.cpp
#include <algorithm> using std::for_each; #include <functional> using std::bind; using namespace std::placeholders; using std::ref; #include <iterator> using std::istream_iterator; #include <vector> using std::vector; #include <string> using std::string; #include <iostream> using std::cout; using std::cin; using ...
TOOL
0.936039
4.656515
356c9cc9-5fcf-4e83-a3d1-1a070ee5776e
ishandutta2007/codeforces
risujiroh/normal/1161/D.cpp
#include <bits/stdc++.h> using namespace std; using lint = long long; template<class T = int> using V = vector<T>; template<class T = int> using VV = V< V<T> >; template<unsigned P> struct ModInt { using M = ModInt; unsigned v; ModInt() : v(0) {} ModInt(auto x) : v(x >= 0 ? x % P : (P - -x % P) % P) {} const...
ALGO
0.999968
4.217324
f6cfc437-d7e3-4eec-8dde-2f8d441bb299
chaman-aggarwal/DSA-Practice-CB-May
Session1/InsertionSort.cpp
https://hack.codingblocks.com/app/contests/2340/1068/problem #include <bits/stdc++.h> using namespace std; void insertion_sort(int arr[], int n) { for(int i=1; i<n; i++) { int curr = arr[i]; int j = i-1; while(j>=0 && arr[j]>curr) { arr[j+1] = arr[j]; j-...
ALGO
0.999967
5.523137
f025938b-62b8-456d-9484-af2793013399
reuven-itzhakov/Leet-Code
3379-score-of-a-string/score-of-a-string.cpp
class Solution { public: int scoreOfString(string s) { int sum = 0; for(int i = 0; i < s.length()-1; i++){ sum += abs(s[i] - s[i+1]); } return sum; } };
ALGO
0.9999
5.592153
c1af7565-75ab-4f18-9719-3b990d079c8d
vasia1507/Calculator-QT
src/rpn.cpp
#include "rpn.h" #include <string.h> #include <stdlib.h> #include <stdio.h> #include <math.h> #include "datatypes.h" /* 0: ( 1: - (unary) 2: * 4: ^ 3: % 5: / 6: - 7: + 8: sin 9: cos 10: tan 11: asin 12: acos 13: atan 14: log 15: sqrt 16: mod 17: ln */ stack* parse(char *exp) { const char chrOps[] = "~*^%/-+"; ...
ALGO
0.999445
3.903394
3442ad50-f2a4-4a8a-aa33-5bb8194180b3
daszek0/zadania_public
indywidualny/100/kus Kulawy skoczek/kus_comment.cpp
// Jakub Daszkiewicz // zadanie Kulawy skoczek #include <cstdio> #include <algorithm> using namespace std; int r[1001][1001], dp[1001][1001]; int main() { int n, x, y; scanf("%d", &n); for (x = 0; x < n; x++) // x roล›nie w dรณล‚ { for (y = 0; y < n; y++) // y roล›nie w dรณล‚ { scanf("%d", &r[x][y]); // liczba...
ALGO
0.999983
3.309432
8272f795-b0cc-4af9-af2c-73a5cf2846b1
ghibli613/cp-coding
coding/big_o/lv2/lect10/wordfish.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; const int MOD = 1000000007; int main() { ios::sync_with_stdio(false); cin.tie(NULL); string s; while (cin >> s) { string ans = ""; int bestValue = -1; /// lฦฐu giรก trแป‹ chรชnh lแป‡ch lแป›n n...
ALGO
0.999905
3.36572
90cc0160-96e2-43d0-a468-97e2b0a1c5f3
bokutotu/atcoder
ABC/128/a.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> P; //ใƒžใ‚ฏใƒญ #define REP(i,n) for(ll i=0;i<(ll)(n);i++) #define REPD(i,n) for(ll i=(ll)(n)-1;i>=0;i--) #define FOR(i,a,b) for(ll i=(a);i<=(b);i++) #define FORD(i,a,b) for(ll i=(a);i>=(b);i--) #define ALL(x) (x).begin(),(x).end() //s...
ALGO
0.999499
3.181411
595b0127-b15a-4a5d-b246-a48c4647f29f
ishandutta2007/codeforces
subscriber/normal/513/A.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> #include<cstring> #define mp make_pair #define pb push_back #define F first #define S second #define SS stringstream #define sqr...
ALGO
0.999884
3.624078
a7fa5ed1-021a-4e5c-bb08-6a3e16d0e164
ordinarv/ACM
OJ/ๅ…ถไป–ๆฏ”่ต›/PAT/last/22.cpp
#include <stdio.h> int main () { int x,y,n; scanf("%d",&n); int m=0; for(x=1;x<=100;x++) { for(y=x;y<=100;y++) { if(x*x+y*y==n) { m=1; printf("%d %d\n",x,y); } } } if(m==0) { printf("No Solution"); } return 0; }
ALGO
0.99997
3.188298
593cb56e-1c9f-4240-8c45-59ee4eabc134
BhaskarThakur1997/Data-Structure-Using-c-
Math/armstrong_number.cpp
/* Armstrong Number */ /* check if a given number is armstrong number or not */ #include <iostream> #include <math.h> using namespace std; int main(){ int num; cin>>num; int sum = 0; int original_number = num; while(num>0){ int last_digit=num % 10; sum+= pow(last_digit,3); ...
ALGO
0.999942
4.626175
787d12d0-1f78-4b6f-a446-cdfa5a5cf236
abhayprakash/competitive_programming
spoj/TRICOUNT-5338729-src.cpp
#include<iostream> #include<stdio.h> using namespace std; int main() { unsigned long long int v[1000001]; v[0]=0; v[1]=1; unsigned long long int a2=4,a3=4; for(int i=2;i<1000001;i++) { v[i]=v[i-1]+a2; a2+=a3; if(i%2==0) a3+=2; else a3+=1; } ...
ALGO
0.999818
3.725469
b0a568b7-5f54-433e-ad01-b83dc1e1be43
eogud7126/algorithm_study
Algorithm/baekjoon/191015_1541(์žƒ์–ด๋ฒ„๋ฆฐ ๊ด„ํ˜ธ).cpp
#include<iostream> #include<string> #include<cstdio> #include<vector> #include<queue> #include<stack> #include<algorithm> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(NULL); vector<char> cal; queue<int> numbers; queue<char> plusminus; string str=""; queue<int> q_plus; queue<int> q_minus; ...
ALGO
0.999999
4.067173
5b47aada-bf0f-4575-8bf0-6d322da06437
MikaelVallenet/R-Type
libs/boost/libs/program_options/src/winmain.cpp
#define BOOST_PROGRAM_OPTIONS_SOURCE #include <boost/program_options/parsers.hpp> #include <cctype> using std::size_t; #ifdef _WIN32 namespace boost { namespace program_options { // Take a command line string and splits in into tokens, according // to the rules windows command line processor uses. // ...
TOOL
0.931761
6.211977
a3aee889-9569-4865-b79f-95f0ddcef22d
ishandutta2007/codeforces
antoine/normal/1102/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); int n, k; cin >> n >> k; map<int, vector<int>> occ; for (int i = 0; i < n; ++i) { int x; cin >> x; occ[x].push_back(i); if (k < (int) occ[x].size()) { cout << "NO\n"; ...
ALGO
0.999998
3.610956
d7e05fdf-33e0-4076-8898-5e8935e8db10
acc-cosc-1337-fall-2022-2/midterm-mwalton1204
src/question_3/main.cpp
#include "question3.h" int main() { int num1; int num2; int gcd; auto repeat = 'y'; while(repeat == 'y' || repeat == 'Y') { cout << "Enter an integer between 1-200:"; cin >> num1; cout << "\nEnter another integer between 1-200:"; cin >> num2; if (num1 >= 1 ...
ALGO
0.907498
5.163094
db67ae9f-b260-4f2d-b514-1d361c398409
kisuk010203/PS
C++/Graphs/Graph_Search/DFS/10101010.cpp
#include <bits/stdc++.h> using namespace std; vector<int> vec[100001]; int num[100001], cnt; bool ans = true; int find_reachable_min(int node, int parent) { int ret = num[node] = ++cnt; int cycles = 0; for (int v : vec[node]) { if (v == parent) continue; if (num[v]) { ...
ALGO
0.99997
4.854678
6d6bf7ff-2e9e-4650-be75-3a3f62fe7886
Anthonios-Deeb/OS-3
Q7/client.cpp
#include <iostream> #include <netinet/in.h> #include <unistd.h> #include <algorithm> #include <list> #include <vector> #include <exception> #include <arpa/inet.h> #include <cstring> #include "packets.hpp" #define PORT 9034 using namespace std; bool isValidCommand(const string &data) { // Check if the data contai...
WEB
0.975776
5.17206
5ba2705b-1972-4f33-9fef-0d333089b149
sinian666/codes_86_4
cpp_ๅ‰ฏๆœฌ20/chapter_graph/graph_adjacency_matrix.cpp
/** * File: graph_adjacency_matrix.cpp * Created Time: 2023-02-09 * Author: what-is-me (<EMAIL>) */ #include "../utils/common.hpp" /* ๅŸบไบŽ้‚ปๆŽฅ็Ÿฉ้˜ตๅฎž็Žฐ็š„ๆ— ๅ‘ๅ›พ็ฑป */ class GraphAdjMat { vector<int> vertices; // ้กถ็‚นๅˆ—่กจ๏ผŒๅ…ƒ็ด ไปฃ่กจโ€œ้กถ็‚นๅ€ผโ€๏ผŒ็ดขๅผ•ไปฃ่กจโ€œ้กถ็‚น็ดขๅผ•โ€ vector<vector<int>> adjMat; // ้‚ปๆŽฅ็Ÿฉ้˜ต๏ผŒ่กŒๅˆ—็ดขๅผ•ๅฏนๅบ”โ€œ้กถ็‚น็ดขๅผ•โ€ public: /* ๆž„้€ ๆ–นๆณ• */ ...
ALGO
0.999373
6.276136
b9ff4f79-4397-4d45-aa09-186f5c07ca5c
Janmansh/CompetitiveProgramming
FaceBook HackerCup/Round1/Q2/brute.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define int long long #define pb push_back #define mp make_pair int solve1(string s, int n){ ll i,j; int x = 0; int ans = 0; for(i=0;i<n;i++){ if(s[i] == 'F')continue; else if(s[i] == 'X' and x == -1){ continu...
ALGO
0.999642
3.928564
e40ff8e7-6ead-4853-a757-ac9788da7b39
sia162/LeetcodeQuestions
394-decode-string/394-decode-string.cpp
class Solution { public: string decodeString(string s) { stack<char>st; string ans; for(int i=0;i<s.length();i++){ if(s[i]==']'){ string str,newstr; while(st.size()>0 && st.top()!='['){ //storing string inside square brackets str+=st...
ALGO
0.999879
5.829159
823f85e5-7c58-4ac1-b6d3-317d9b7812d2
maheshshiva97/code_dummy
mirrorim.cpp
#include<iostream> using namespace std; int main() { int n,i,j,k; cout<<"enter a value"; cin>>n; for(i=0;i<=n;i++){ for(k=0;k<=i;k++) cout<<" "; for(j=0;j<=n-i;j++) { if(j==0||j==n-i||i==0) cout<<"* "; else cout<<" "; } cout<<endl; } return 0;}
ALGO
0.99952
3.141601
4a25fb2a-b739-4b21-9318-89680e3550fe
maggie-bao202/Classes
MainClasses.cpp
#include <iostream> #include <cstring> #include <vector> #include "Media.h" #include "VideoGame.h" #include "Music.h" #include "Movie.h" #include <iomanip> #include <iterator> using namespace std; /*Date: 11/12/19 Author: Maggie Bao Description: Classes prompts the user to input a keyword "ADD", "SEARCH", "DELETE", o...
TOOL
0.86981
5.041908
2dbd2ec5-c707-488b-afc4-c579253b9bc1
Prerna99-star/Hakerrank-30DaysofCode-Solutions
Interfaces.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <string> using namespace std; class AdvancedArithmetic{ public: virtual int divisorSum(int n)=0; }; class Calculator : public AdvancedArithmetic { public: int divisorSum(int n) { int total=0, i...
ALGO
0.999471
5.275908
b9c10bd8-11ac-4f56-b368-789eab772fe4
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_1496_11.cpp
#include <bits/stdc++.h> using namespace std; const long long N = 1e2 + 10; long long n, m, cnt, mark[N], ans[N]; vector<long long> nodes, adj[N], rev[N]; bool check = 1; void dfs(long long v) { mark[v] = 1; for (long long u : adj[v]) if (!mark[u]) dfs(u); nodes.push_back(v); } void sfd(long long v, long long...
ALGO
0.999949
3.978764
8adacc94-135d-42de-9e4c-993c98ce94c6
drcnic/hvcc-engtools-fall-2019
Labs/Lab 12/part 2/part_2.cpp
/* File: part_2.cpp * Author: Daric Niclas * Date: 11/20/19 * Purpose: */ #include <iostream> #include <iomanip> using namespace std; int main() { // define vars const int fieldWidth = 10; int arr1[4][3]; float avg[3]; for (int col = 0; col < 3; col++) { static int num = 1; int colSum = 0; // accumulat...
TOOL
0.985296
3.9753
cc541214-6a4f-4e2f-a18d-6ab1093b4578
andy489/Data_Structures_and_Algorithms
6 โ€“ Practice/code forces/0886C Petya and Catacombsโ€“1.cpp
// https://codeforces.com/problemset/problem/886/C #include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> notes(n + 1); int curr = 0; int t; for (int i = 1; i <= n; ++i) { cin >> t; notes[t] ? notes[t] = 0 : ++curr; ++n...
ALGO
0.999859
3.924912
9648569d-3b25-49d9-9262-f5f31e5f9dd5
Alpha00790/CodeForces
1328A.cpp
#include<bits/stdc++.h> using namespace std; int main() { long long int a,b; int c; cin>>c; for(int i = 0; i<c; i++){ cin>>a>>b; if(a<b){ cout<<b-a<<endl; } else if(a%b == 0){ cout<<0<<endl; } else if(a%b != 0){ cout<<b-a...
ALGO
0.999954
3.371102
3247863b-a16e-4cd6-ba85-bd2f24ca332f
Sumit-pd/DSA
greedy/maximumAndMinimumCostCandy.cpp
// Function to calculate minimum cost. #include<algorithm> long long minimumCost(vector<int> &cost, int n, int k) { sort(cost.begin(),cost.end()) ; int buy = 0 ; int free = n -1 ; long long mini = 0 ; while(buy <= free){ mini += cost[buy] ; //one bought k free buy++; ...
ALGO
0.999396
4.587608
10f5978c-1a2f-4db1-acd4-bce3ac2a01d3
ravireddy07/cpp-book
src/Data-Structure-Based/BFS.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> class Graph { map<T, list<T>> adjList; public: Graph() { } void addEdge(T u, T v, bool birid = true) { adjList[u].push_back(v); if (birid) adjList[v].push_back(u); } void printAdj() { for (auto i : adjList) {...
ALGO
0.999856
4.17673
6c026a25-4e2e-4d4b-a501-50f0593b1978
AndyJacobBarth/Problems
Kattis/shandy/shandy.cpp
#include <iostream> int main() { int B, L; std::cin >> B >> L; if (B < L) std::cout << 2*B << "\n"; else std::cout << 2*L << "\n"; return 0; }
ALGO
0.997904
3.13343
46d28fed-358a-4b8f-995e-5613b1dfb2c9
athrav138/C-plus-plus
C++/library_function.cpp
# include <iostream> # include <cmath> using namespace std; int main(){ cout<<"The squareroot of 4 is: "<<sqrt(4)<<endl; cout<<"The cuberoot of 8 is: "<<cbrt(8)<<endl; cout<<"The min from 4,8 is: "<<min(4,8)<<endl; cout<<"The max from 4,8 is: "<<max(4,8)<<endl; cout<<"The cube of 3 is: "<<pow(3,3)<<endl; }
TOOL
0.908746
3.456835
135a9cf0-895a-4d7d-aa21-d29859a0901c
ananta-shinde/sep-23
demos/largest Number.cpp
#include<stdio.h> int main(int argc, char const *argv[]) { int n1,n2,n3; printf("Enter first number"); scanf("%d",&n1); printf("Enter second number"); scanf("%d",&n2); printf("Enter third number"); scanf("%d",&n3); if(n1 > n2 && n1 > n3) { printf("%d\n",n1); }else if...
ALGO
0.999849
3.77194
fb8439c3-e951-429f-8068-0c25c3b0a224
tony9402/algorithm-template-legacy-4
src/segment_tree/main.cpp
#include<bits/stdc++.h> using namespace std; template<typename T> struct Segment { bool _set_size; int siz; vector<T> _tree; Segment():_set_size(false) {} Segment(int N):_set_size(true) { setSize(N); } void setSize(int N) { _set_size = true; for(siz = 1; siz <= N; siz <<=...
ALGO
0.999912
4.39254
37505211-c893-4cd8-81de-4361efa99f6c
Wesenheit/HPC2k25
Lab10/floyd-warshall/floyd-warshall-par.cpp
#include <iostream> #include <string> #include <cassert> #include <mpi.h> #include "graph-base.h" #include "graph-utils.h" void runFloydWarshallParallel(Graph* graph, int numProcesses, int myRank) { assert(numProcesses <= graph->numVertices); int m = graph->numVertices; int broadcastRank = 0; for (in...
ALGO
0.999878
5.857511
8ea744a2-75b2-42c1-bf86-9caeb795c575
Joe7M/SmallBasicPIGPIO
src/hashmap.cpp
#include "config.h" #include <cstdlib> #include <cstring> #include <cassert> #include <ctype.h> #include <cstdio> #include "var.h" #include "hashmap.h" #define MAP_SIZE 32 /** * Our internal tree element node */ typedef struct Node { var_p_t key; var_p_t value; struct Node *left, *right; } Node; /** * Ret...
ALGO
0.963982
6.167685
6b8d444e-bed3-4da8-a739-e93dffb4c1e1
113bommy/deepmind_codecontests_refine
cpp_gold_filter_file/cpp_train_6919_29.cpp
#include <bits/stdc++.h> using namespace std; const int MD = 30; const int M = (1ll << 30) - 1; int n, m, K; int lb(int x) { return x & (-x); } struct Que { int x, y1, y2, sym; bool operator<(const Que& o) const { return x < o.x; } } que[100100]; int tq; map<int, int> lg; bitset<32> qlb(int l, int r, int st, int ed...
ALGO
0.999935
4.521559
cd825d4e-9b09-4cfc-ac08-da86d1d0e770
atharv-patil/LAB
final cd lab/recursivedescent.cpp
// author: cholebhature lover #include <bits/stdc++.h> using namespace std; #define ll long long #define vi vector<ll> #define mpii map<ll, ll> #define mpsi map<string, ll> #define f first #define s second #define all(x) x.begin(), x.end() int i = 0; string a; int n; bool Y(), Z(), X(), W(); bool check(char x) { i...
ALGO
0.999866
3.58321
111239de-0c9b-41d2-a951-ce481aae6c0b
AndrewZhuCC/w800
components/amrnb/src/enc/src/g_pitch.cpp
/* ------------------------------------------------------------------------------ Pathname: ./audio/gsm-amr/c/src/g_pitch.c Date: 06/12/2000 ------------------------------------------------------------------------------ REVISION HISTORY Description: Placed into template and began to optimize. Description...
ALGO
0.998486
5.62798
13e4f33e-388c-4fc3-92f4-54a0ccfba443
khkg12/algorithm
ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค/[1์ฐจ]๋‰ด์Šค ํด๋Ÿฌ์Šคํ„ฐ๋ง.cpp
#include <string> #include <algorithm> #include <iostream> #include <set> using namespace std; int solution(string str1, string str2) { int answer = 0, min = 0, max = 0; vector<string> s1, s2, words; transform(str1.begin(), str1.end(), str1.begin(), ::tolower); transform(str2.begin(), str2.end(), str2.begin()...
ALGO
0.999705
4.657973
7b7786eb-b7bd-42d4-9ced-778feea9752f
Harshit-Hatwal/Coding-questions
0034-find-first-and-last-position-of-element-in-sorted-array/0034-find-first-and-last-position-of-element-in-sorted-array.cpp
class Solution { public: int firstoccurence(vector<int> &nums,int n,int target ) { int l=0; int r=n-1; int fo=-1; while(l<=r) { int mid=(l+r)/2; if(nums[mid]<target) l=mid+1; else if(nums[mid]==target) ...
ALGO
0.999914
6.412485
e3b6edd0-bbd9-45f9-bb95-d9ee374b9d64
morrischen890717/Leetcode
C++/189_sol1.cpp
class Solution { public: void rotate(vector<int>& nums, int k) { int n = nums.size(); k %= n; reverse(nums.begin(), nums.end()); reverse(nums.begin(), nums.begin() + k); reverse(nums.begin() + k, nums.end()); return; } };
ALGO
0.999966
6.058274
cc013b47-5e8a-4daa-86e3-b43bb58491e2
sarvex/leetcode-malbolge
solution/2100-2199/2160.Minimum Sum of Four Digit Number After Splitting Digits/Solution.cpp
class Solution { public: int minimumSum(int num) { vector<int> nums; while (num) { nums.push_back(num % 10); num /= 10; } sort(nums.begin(), nums.end()); return 10 * (nums[0] + nums[1]) + nums[2] + nums[3]; } };
ALGO
0.99994
6.176743
e5aa1adc-54f1-4461-b2ac-39bdb95c360b
RiqueSekido/USP_exercises
4_semester/JB algAvanc/TeoNum3.cpp
#include <bits/stdc++.h> using namespace std; #define p 1000000007 long long exp(int x, int y, int z); long long exp(int x, int y, int z) { // ((a ^ b) ^ c) mod p if(y == 0) { return 1 % z; } long long resultado = exp(x, y/2, z); resultado = (resultado * resultado) % z; if(y % 2 !...
ALGO
0.999934
4.358359
6a3f3fa4-d42a-49c4-9a84-57e99d6bda3e
Mosabbir512/Problem_solve
B. Make Them Equal.cpp
#include<bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define srt(x) sort(x.begin(),x.end()) #define pb(x) push_back(x) #define print(x) for(auto it: x)cout<<it<<" ";cout<<endl #define ll long long #define endl '\n' void solve() { int n,k=0; cin>>n; i...
ALGO
0.999801
3.828472
168087a4-ac9f-4b90-8e9f-ff342d10b2c8
Hasanul-Bari/contests
AtCoder Beginner Contest 148/D.cpp
#include<bits/stdc++.h> #define faster ios :: sync_with_stdio(0); cin.tie(0); cout.tie(0); #define ll long long #define ull unsigned long long #define pb push_back const double PI = acos(-1.0); using namespace std; int main() { faster int n,x; cin>>n; int c=0; for(int i=0,j=1; i<n; i++) { ...
ALGO
0.999952
3.443378
1d6231f5-c7f4-4c9c-891a-4478f0b5aba2
robert2653/CSES
Additional Problems/Maximum_Xor_Subarray.cpp
#include <bits/stdc++.h> // #pragma GCC target("popcnt") // C++ 20 vector grammer will not work using namespace std; using ll = long long; const int B = 29; const int N = 200000 * (B + 1); int tot = 0; int trie[N][2], cnt[N]; // 01 trie void reset() { tot = 0, fill_n(trie[0], 2, 0); } int newNode() { int x = +...
ALGO
0.999996
5.094561
928e6a31-5551-4c5a-b018-7f901b4c5dcd
Harshit-Lakhawat/c-
pivat using binarysearch.cpp
#include<iostream> using namespace std; int getpivat(int arr[], int n){ int s = 0; int e = n-1; int mid = s + (e-s)/2; while(s<e){ if(arr[mid] >= arr[0]){ s = mid + 1; } else{ e = mid; } mid = s + (e-s)/2; } return s; } int main(){ int arr[5] = {3, 8, 10, 17, 1}; ...
ALGO
0.999937
5.165936
48aadf6e-c0bf-490a-8c7f-07b45d2a2e4c
dvaitam/codeforces
1000-1999/1000-1099/1000-1009/1000/solE.cpp
#include<bits/stdc++.h> inline int read(){ char c=getchar();while (c!='-'&&(c<'0'||c>'9'))c=getchar(); int k=1,kk=0;if (c=='-')c=getchar(),k=-1; while (c>='0'&&c<='9')kk=kk*10+c-'0',c=getchar();return kk*k; }using namespace std; void write(int x){if (x<0)putchar('-'),x=-x;if (x/10)write(x/10);putchar(x%10+'0');} voi...
ALGO
0.999344
3.665143
a7e488b6-a55a-48eb-a62f-3c01d55da76d
profornnan/Problem-Solving
BOJ/๋‹ค์ต์ŠคํŠธ๋ผ/14221-ํŽธ์˜์ .cpp
#include <iostream> #include <vector> #include <queue> using namespace std; constexpr int INF = 987'654'321; struct Edge { int to; int cost; bool operator<(const Edge& rhs) const { return cost > rhs.cost; } }; int main(void) { cin.tie(nullptr)->sync_with_stdio(false); int N, M; cin >> N >> M; vector<vec...
ALGO
0.999986
4.729676
e51b7495-390e-4e23-ae98-927506576b42
Surmage/S0012E-Engine-main
exts/soloud/src/tools/tedsid2dump/sid.cpp
// Issues: // - Filter cutoff frequencies not 100% accurate // - Combined waveforms of the 6581 incorrect (SID card used 8580 anyway) // - filter distortion not emulated // - no joystick or paddle support // - probably many more #include <math.h> #include <memory.h> #include "sid.h" #include "Tedmem.h" #define ...
ALGO
0.931059
4.7598
7dd1772f-0f4e-40eb-aaa5-fdf2bb1d04e4
josuehfa/DAASystem
CoreSystem/lib/CGAL/examples/Generator/random_convex_hull_2.cpp
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/random_convex_hull_in_disc_2.h> #include <CGAL/Polygon_2_algorithms.h> #include <boost/random.hpp> #include <iostream> #include <vector> using namespace CGAL; typedef Exact_predicates_inexact_constructions_kernel K; typedef K::Point_2 ...
ALGO
0.994952
6.095601
f91f8372-fa42-4d31-b41a-fc5d70a4d325
szlin/hyperscan
src/fdr/fdr_compile.cpp
/** \file * \brief FDR literal matcher: build API. */ #include "fdr_internal.h" #include "fdr_compile.h" #include "fdr_confirm.h" #include "fdr_compile_internal.h" #include "fdr_engine_description.h" #include "teddy_compile.h" #include "teddy_engine_description.h" #include "grey.h" #include "ue2common.h" #include "u...
ALGO
0.987517
5.118683
9f796713-0715-40c6-9d1a-c5988235b213
sergniform/qt-creator
src/plugins/coreplugin/find/ifindfilter.cpp
#include "ifindfilter.h" #include <QPainter> #include <QPixmap> /*! \class Find::IFindFilter \brief The IFindFilter class is the base class for find implementations that are invoked by selecting \gui Edit > \gui {Find/Replace} > \gui {Advanced Find}. Implementations of this class add an additiona...
TOOL
0.884007
7.547178
b0244515-3a40-4fcd-9d0b-9c49668258f7
fengabriel/opencv_contrib
modules/optflow/samples/simpleflow_demo.cpp
#include "opencv2/optflow.hpp" #include <opencv2/core/utility.hpp> #include "opencv2/imgproc.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/highgui.hpp" #include <cstdio> #include <iostream> using namespace cv; using namespace cv::optflow; using namespace std; #define APP_NAME "simpleflow_demo : " static v...
ALGO
0.92553
5.98797
1d943128-aada-4c24-a0ed-f8563e1d5a14
Garvit-1/DSA
1704-special-positions-in-a-binary-matrix/special-positions-in-a-binary-matrix.cpp
class Solution { public: int numSpecial(vector<vector<int>>& mat) { vector<int> a(mat.size()),b(mat[0].size()); for(int i=0;i<mat.size();i++){ for(int j=0;j<mat[0].size();j++){ if(mat[i][j]==1){ a[i]++;b[j]++; } } } ...
ALGO
0.999968
5.647962
6edc75c9-87cd-48da-9d15-d780a0c9cc4e
StackDoubleFlow/LLVMStackPU
lldb/test/API/python_api/thread/main2.cpp
#include <stdio.h> #include <stdlib.h> int a(int); int b(int); int c(int); int a(int val) { if (val <= 1) return b(val); else if (val >= 3) return c(val); return val; } int b(int val) { int rc = c(val); void *ptr = malloc(1024); // thread step-out of malloc into function b. i...
TOOL
0.975292
3.954445
df13bb5d-6672-4727-a814-8c7ed39879e9
Masuma-Afroz-Juthi/Tools-for-learning-DSA
2_Data_Structure_And_Algorithm/15_DynamicProgramming/128_Edit_distance_mem.cpp
#include "iostream" #include "vector" using namespace std; int solve(string word1, string word2,int i,int j,vector<vector<int>> &dp) { if(i==word1.length()){ return word2.length()-j; } if(j==word2.length()){ return word1.length()-i; } if(dp[i][j] != -1){ return dp[i][j]; ...
ALGO
0.999998
5.366927
1b352ffa-3e58-46d4-a3c0-4da03b007bbd
thoomi/CarND-Path-Planning-Project
src/Eigen-3.3/bench/benchmarkXcwise.cpp
// g++ -O3 -DNDEBUG benchmarkX.cpp -o benchmarkX && time ./benchmarkX #include <iostream> #include <Eigen/Core> using namespace std; using namespace Eigen; #ifndef VECTYPE #define VECTYPE VectorXLd #endif #ifndef VECSIZE #define VECSIZE 1000000 #endif #ifndef REPEAT #define REPEAT 1000 #endif int main(int argc, c...
ALGO
0.95479
3.896122
5aaad5a2-4b44-47c6-9b2c-c7f1cc9e1276
PavithranChelliahpillai/competitiveprogrammingsols
ccc22s2.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int #define INF 0x3f3f3f3f #define MAX 10000001 //#pragma GCC optimize("O2") //#pragma GCC optimize("trapv") //#pragma GCC target("avx2,bmi,bmi2,popcnt,lzcnt") unordered_map<int,int>e; int x=0,t=0; int f(int a) { if (e[a]!=a) e[a]=f(e[a]); return ...
ALGO
0.999412
3.913565
dd48061b-598e-41ad-936e-17c842e5119e
sangyong-99/algorithm_study
algorithm_study/baekjoon/๊ทธ๋ž˜ํ”„ ํƒ์ƒ‰/14502.cpp
// // 14502.cpp // Test // // Created by ์‹ ์ƒ์šฉ on 2022/11/22. // #include <bits/stdc++.h> using namespace std; int N, M, arrays[10][10], visited[10][10], nx, ny, nx2, ny2; int dx[4] = {-1, 0, 1, 0}; int dy[4] = {0, 1, 0, -1}; queue<pair<int,int>> q; void input_data(){ for(int i = 0; i < N; i++){ for(int...
ALGO
0.999941
5.045572
d045e1fd-0ad5-4f8a-b1b9-a030ab3cba7c
ln53491/nsga2-portfolio-optimization
main.cpp
#include <math.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <time.h> #include <assert.h> #include <random> #include <eigen3/Eigen/Dense> #include "algorithm/nsga2.cpp" #include "algorithm/gridsearch.cpp" #include "algorithm/function.cpp" #include "algorithm/solution.cpp" #include "utils/datal...
ALGO
0.99992
6.065663