uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
a08712de-6850-45d0-ac0e-02da578c3a2d
MohamadAshrafSalama/User-Stories-generation
Code_Snippets/91-100/s069623181.cpp
#include <iostream> #include <string> #include <algorithm> #include <vector> #include <iomanip> #include <cmath> #include <queue> #include <stack> #include <cstdlib> #include <map> #include <iomanip> #include <set> #include <stdio.h> #include <ctype.h> using namespace std; #define pie 3.141592653589793238462643383279 #...
ALGO
0.999925
3.402603
a7cd5ed7-1bb8-4258-b2be-625ab39dee5f
Kartik-Mathur/cpp4june
Lecture-16-Recursion/MergeSort.cpp
#include <iostream> using namespace std; void merge(int*a, int*b, int*c, int s, int e) { int m = (s + e) / 2; int i = s, j = m + 1, k = s; while (i <= m and j <= e) { if (b[i] < c[j]) { a[k] = b[i]; k++; i++; } else { a[k++] = c[j++]; } } // Agar j ke elements bach gaye toh unhe a ke andar a...
ALGO
0.999992
4.680883
1f4af495-5101-4ef2-bd80-9cc58f5ed1f1
Soumyajit-io/CppWithDSA
02. fundamentals 1/loops/for loop/reverse.cpp
#include<iostream> using namespace std; int main(){ cout<<"enter the nth term : "; int n ; cin>>n; for (int i=n;i>=1;i-- ){ cout<<i<<endl; } }
ALGO
0.997443
3.164214
ba8e6a50-79ed-4327-8665-b83518140d70
choyinhsuan/ADA
minihw-p5.cpp
#include <iostream> #include <limits.h> #include <stdbool.h> #include <vector> #include <list> #include <stdio.h> #include <queue> using namespace std; typedef struct Vertex{ long long id; long long l; long long c; }vertex; long long V; long long M; vector<vertex> map[1000000]; vertex key[1000000]; bool mstS...
ALGO
0.999931
4.091414
9f5fc3e3-c7f0-47ac-bdfc-4485cb0795d5
xianfengshang/tinynet
src/util/string_utils.cpp
namespace StringUtils { struct LocaleModifier { LocaleModifier(const char* new_locale) { saved_locale = std::setlocale(LC_ALL, NULL); std::setlocale(LC_ALL, new_locale); } ~LocaleModifier() { std::setlocale(LC_ALL, saved_locale.c_str()); } std::string saved_locale; }; void ...
TOOL
0.96452
3.134604
b8695fdd-2b99-469d-a477-de3901e9c2b9
whquddn55/Algorithm_BojSolves
2000/2056.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; template<typename a, typename b> ostream& operator<<(ostream& os, const pair<a, b>& pai) { os << pai.first << ' ' << pai.second; return os; } template<typename a, typename b> istream& operator>>...
ALGO
0.999717
3.889856
e2e9fc64-d39b-452f-9814-3457f33365b0
ishandutta2007/codeforces
275307894a/normal/793/G.cpp
#include<bits/stdc++.h> #define I inline #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) #define abs(x) ((x)>0?(x):-(x)) #define re register #define RI re int #define ll long long #define db double #define lb long db #define N 10000 #define M 1000000 #define mod 1000000007 #define Mod (mod-1) #def...
ALGO
0.999967
3.589751
932712fe-3ee6-4d77-b267-027b8742b2b4
asriniv2-git/interview_prep
container_with_most_water.cpp
/*Given n non-negative integers a1, a2, ..., an , where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of the line i is at (i, ai) and (i, 0). Find two lines, which, together with the x-axis forms a container, such that the container contains the most water. Notic...
ALGO
0.999981
6.680051
4ae49416-df4f-4954-a2c0-e4c8d7392e05
KamilFurtak7/Huffman-algorithm
Huffman.cpp
#include "Huffman.h" #include <iostream> #include <iomanip> #include <cmath> #include <stdexcept> #include "Exceptions.h" using namespace std; using namespace MyRuntimeExceptions; void calculateStatistics(const vector<pair<char, double>>& data, const unordered_map<char, string>& codeMap, char mode, int fi...
ALGO
0.993963
4.977926
886af7be-0f75-4680-af4b-c26e0ebfc47d
coconan/kata
pat/PAT全套答案_1001至1049/pat1049.cpp
#include<stdio.h> #include<stdlib.h> long long howmanyones1(int N) { int temp=N; int i=0; int dec[20]; int o[10]={1,10,100,1000,10000,100000,1000000,10000000,100000000,1000000000}; while(temp>0) { dec[i++]=temp%10; temp/=10; } long long ones=0; i--; while(i>0) { int d=dec[i]; if(d==1) ones+=o[i-1...
ALGO
0.999855
3.586282
d1262046-fa61-4a83-9b0f-2c079fff159b
huiseon37/PS
BOJ/C++/1000-10000/5671.cpp
//5671 #include <stdio.h> int main() { int n,m,i; int a,b,c,d; int count; while (scanf("%d %d", &n, &m) != EOF) { count = 0; for (i = n; n <= m; n++) { i = n; if (i >= 1000) { a = i % 10; i /= 10; b = i % 10; i /= 10; c = i % 10; i /= 10; d = i % 10; i /= 10; if (a...
ALGO
0.999601
3.341904
7d75ec64-1c78-4c72-a0db-7bf7d7426263
nguyentuss/Competitive-Programming
CP/OnlineJudge/CodeForce/CodeForce/1626B.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); int t; cin >> t; while (t--) { string s; cin >> s; int a = 0 , b = 0; int pos = -1 , sum = 0; for (int i = 0 ; i < (s.size() - 1) ; i++) { a = ...
ALGO
0.999637
5.744778
8db91229-6a8a-4777-8b34-3b9502ec8f15
cgg7777/daily-algorithm-study
hyelie/Leetcode/DailyChallenge/230731-/17. Letter Combinations of a Phone Number.cpp
// Runtime 0 ms Beats 100% // Memory 6.7 MB Beats 18.80% class Solution { public: vector<string> mappings = {"", "", "abc", "def", "ghi", "jkl", "mno", "pqrs", "tuv", "wxyz"}; vector<string> answer; void permutation(int cur_depth, int max_depth, string &result, string &digits){ if(cur_depth == max_...
ALGO
0.999807
6.62952
ea7f4d1a-436f-4b68-8dbc-4e3ffae754ef
0x1zen/Oops-cpp
operatoroverloading.cpp
#include<iostream> #include<vector> #include<limits.h> #include<set> #include<string.h> #include<algorithm> using namespace std; class Param{ public: int val; void operator+(Param& obj2){ int value1=this->val; int value2=obj2.val; cout<<(value2-value1); } }; int main() { Para...
ALGO
0.99842
3.230458
dd106b0c-af59-440d-b663-a08a8938b94d
jasiukiewicztymon/SPOJ
FR_08_03.cpp
#include <iostream> #include <vector> #include <string> using namespace std; int main() { int time; cin >> time; string password, enter; bool bV; for (int i = 0; i < time; i++) { bV = false; cin >> password >> enter; for (int j = 0; j < password.size(); j++) { if (pa...
ALGO
0.988684
3.288098
ef5e9ce8-592c-4ff5-b906-48e1eeda70fa
Squirrelcoding/usaco-problems
bronze/2017/jp3/main.cpp
#include <algorithm> #include <bits/stdc++.h> using namespace std; // Finds the outermost flipped cow by area. Returns (-1, -1) if all zero. // This is the WRONG strategy. pair<int, int> find_outermost_tile(vector<vector<int>>& grid) { int n = grid.size(); for (int layer = n - 1; layer >= 0; --layer) { if (gr...
ALGO
0.99998
5.429267
9809bb82-f69b-48cc-809a-5a215558e167
AganithShanbhag/DSA
Common Programs/longestArithmeticSubarray.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int array[n]; for(int i = 0; i < n; i++)cin>>array[i]; int ans = 2; int pd = array[1] - array[0]; int j = 2; int current = 2; while(j<n){ if(pd == array[j] - array[j-1])current++; else { ...
ALGO
0.998836
3.778518
dcde1062-83c9-418e-a663-b3e83d612896
EduardoDavilaZ/Ejercicios_Iniciales-Cpp
Iniciales4/Ejercicio22.cpp
//Leer un número entero de tres dígitos y determinar si el primer dígito es igual al último. //Autor: Eduardo Davila Z. #include <iostream> using namespace std; bool funcion (int); main(){ int n; do { cout << "Introduce un numero de 3 dígitos: "; cin >> n; if (n < 100 || n > 999) { ...
ALGO
0.999004
3.601374
b4256e20-660b-4f46-a1aa-3d7a60244c5a
raincross7/code-similarity
codes/train_code/problem392/problem392_474.cpp
#include <iostream> #include <bitset> using namespace std; int main() { char c; cin >> c; if(c == 'a' || c == 'i' || c == 'u' || c == 'e' || c == 'o'){ cout << "vowel" << endl; }else{ cout << "consonant" << endl; } return 0; }
ALGO
0.998877
3.853545
8f276053-2e20-480e-95d6-bfdd80fe2ae7
nemosminer/ccminerx16r-x16s
groestlcoin.cpp
#include <string.h> #include <stdint.h> #include <cuda_runtime.h> #include <openssl/sha.h> #include "sph/sph_groestl.h" #include "cuda_groestlcoin.h" #include "miner.h" // CPU hash void groestlhash(void *state, const void *input) { uint32_t _ALIGN(64) hash[16]; sph_groestl512_context ctx_groestl; sph_groestl512_...
ALGO
0.991235
4.026439
1fcb3d5e-f04c-46ba-a8e4-f244aea46eea
Shirin-P/Projects
venv/Lib/site-packages/sklearn/svm/src/liblinear/tron.cpp
#include <math.h> #include <stdio.h> #include <string.h> #include <stdarg.h> #include "tron.h" #ifndef min template <class T> static inline T min(T x,T y) { return (x<y)?x:y; } #endif #ifndef max template <class T> static inline T max(T x,T y) { return (x>y)?x:y; } #endif static void default_print(const char *buf) {...
ALGO
0.999563
5.847107
feaf3784-4b04-49a0-a746-e1fc59520551
YourRatzon/algo
uva/10368_euclids_game.cpp
#include <stdio.h> #include <bits/stdc++.h> using namespace std; // TIMER std::clock_t __start; double __duration; void start_timer() { __start = std::clock(); } void print_timer() { __duration = (std::clock() - __start) / (double)CLOCKS_PER_SEC; std::cout << "Duration (msec): " << __duration * 1000 << '\n'; } // ...
ALGO
0.999914
3.478364
aededb94-9eb5-4b39-b338-87f9b70f0439
jasust/Algorithms
Miscellaneous/exam/prvi1.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; int p, n, H[100], P[100], sol, k; char s[100]; int _hash(int i, int j ) { int ret = H[j]; if (i) ret -= H[i-1] * P[j-i+1]; return ret; } int bin(int x, int y) { int l=0, r=y; while (l<r) { int m = (l+r)/2; ...
ALGO
0.999978
3.534171
957f018c-43da-4feb-85b3-5e82321b8c7e
cat-bear-get/C-test
test6.cpp
/* // // Created by jingwei on 2021/8/15. // #include <iostream> using namespace std; void showValue(const int &value) { //value=100; cout << "value=" << value << endl; } int main() { // //ʹóβΣֹ //const int & ref = 10; int a = 100; showValue(a); } */
TOOL
0.875415
3.546168
e905ecbc-3dbb-4347-a2e9-e0b283410b25
raincross7/code-similarity
codes/train_code/problem469/problem469_246.cpp
#include<bits/stdc++.h> using namespace std; #define MAXN 200005 #define MAXVAL 1000005 int a[MAXN]; int f[MAXVAL]; //1:0->1×ÔÉí³öÏÖ1´Î£¬1->2»ò0->2 ±»±ðµÄÊýÕû³ý int n, ans; int main(){ scanf("%d", &n); for(int i = 1; i <= n; i++) scanf("%d", &a[i]); sort(a+1, a+n+1); if(a[1] == 1){ if(a[2...
ALGO
0.99991
3.144974
7dde7276-0424-4d04-b65f-b075cd81e913
nastyapond/MAI
VOF-method/operations.cpp
#include "operations.h" double df_dx(const table_function& f, const grid& g, int i, int j) { if (i < 0 || i >= f.points.size()) { return 0; } if (j < 0 || j >= f.points[i].size()) { return 0; } if (i == 0) { return (f.points[i + 1][j] - f.points[i][j]) / g.de...
ALGO
0.999573
5.908202
d2f2eb86-1018-4b54-bdf7-7534bf328546
HieuMap01/OOP
Luyen_Tap/CODE/Cơ Bản/NumBer_Array3.cpp
/* NumberArray (3) Hãy thiết kế một lớp có tên là NumberArray cho phép thể hiện một mảng số thực có thể lưu trữ nhiều nhất 100 phần tử. Với những hàm thành viên sau: - Hàm tạo mặc định, không lưu trữ phần tử nào (kích thước lúc tạo là 0). (Gợi ý: cần 1 biến thành viên lưu trữ kích thước của mảng) - getSize: ...
TOOL
0.856821
4.305569
d4bcf3a9-b796-4891-8614-3c4e2f5d6b58
sslab-gatech/juxta
analyzer/libs/z3/src/solver/solver_na2as.cpp
#include"solver_na2as.h" #include"ast_smt2_pp.h" solver_na2as::solver_na2as(ast_manager & m): m_manager(m) { } solver_na2as::~solver_na2as() { restore_assumptions(0); } void solver_na2as::assert_expr(expr * t, expr * a) { if (a == 0) { assert_expr(t); } else { SASSERT(is_uninterp_...
ALGO
0.987161
4.981005
2ae5d22d-f320-4b2c-8f9a-754ee2b8731b
sxmbaka/Competetive-Programming
codeforces/268B.cpp
// n = 3 // 1, 2, 3 // 2, 3 -> clear // 1, 3 -> clear // 1, 2, 3 -> accepted #include <bits/stdc++.h> using namespace std; #define ll long long #define py cout << "YES" << endl #define pn cout << "NO" << endl #define fr(x) for (int i = 0; i < x; i++) void solve() { int n, r = 1; cin >> n; ll ans = n; ...
ALGO
0.999926
4.327089
904d2439-58c1-422d-912c-9345c4155f34
Chetan1912/1DSA-CODES-TOPIC-VISE
stack/practice/9_minimum_bracket_reversal.cpp
#include <stack> int findMinimumCost(string str) { // odd condition if (str.length() % 2 == 1) { return -1; } stack<char> s; for (int i = 0; i < str.length(); i++) { char ch = str[i]; if (ch == '{') s.push(ch); else { // ch i...
ALGO
0.999495
4.995212
3a696458-a3a2-48e2-908a-065f23f4d6a1
pexip/os-llvm-toolchain-19
libcxx/test/std/algorithms/alg.sorting/alg.min.max/max_comp.pass.cpp
// <algorithm> // template<class T, StrictWeakOrder<auto, T> Compare> // requires !SameType<T, Compare> && CopyConstructible<Compare> // const T& // max(const T& a, const T& b, Compare comp); #include <algorithm> #include <functional> #include <cassert> #include "test_macros.h" template <class T, class C> voi...
TEST
0.925719
5.576212
93f110c5-9cf8-490b-a9c6-90a7dcda6240
Ukeme-Edet/CodeForces
1878c_vic.cpp
/** * @file 1878c_vic.cpp * @author Ukeme Edet (<EMAIL>) * @brief The solution to the problem Vasilije in Cacak(https://codeforces.com/problemset/problem/1878/C) * @version 0.1 * @date 2024-03-17 * * @copyright Copyright (c) 2024 * */ #include <bits/stdc++.h> using namespace std; /** * @brief The main func...
ALGO
0.99979
5.279388
974108f6-c916-4c59-ae51-06bcb1dfdf17
Shahdev32/Cpp_Programming
shapes2.cpp
#include<iostream> using namespace std; int main () {for(int i=1;i>=4;i++){ for(int j=5;j>0;j--){ cout<<" "; for(int k=1;k<=i;k++) cout<<"*"; } cout<<endl; } system("pause") ; return 0 ; }
ALGO
0.998796
3.129879
4f4fe334-9372-4a42-a721-808a15b5cb2c
anipatil72/My_Competitive_Programming
182.cpp
#include <bits/stdc++.h> using namespace std; int GCD(int a,int b) { if (b==0) { return a ; } return GCD(b,a%b); } long solve(int A, int B) { long long ans = (long long)A*B/GCD(A,B); return ans; } int main() { return 0; }
ALGO
0.999835
4.838058
167a892a-aac2-4511-9ce5-bfe597e7acd5
Ellen172/NEPS
neps 162.cpp
#include<bits/stdc++.h> int main() { int d; scanf("%d", &d); if(d<=800){ printf("1\n"); } else if(d<=1400){ printf("2\n"); } else if(d<=2000){ printf("3\n"); } return 0; }
ALGO
0.995516
3.244989
d5ef31ed-6e87-447d-898d-fc3375d23eda
iamrudhresh/GeeksforGeeks
Difficulty: Medium/Minimum repeat to make substring/minimum-repeat-to-make-substring.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: int minRepeats(string& s1, string& s2) { // code here int cnt = 1; string temp = s1; while(temp.length() < s2.length()){ ...
ALGO
0.999893
5.809664
e237688c-03eb-415f-8c88-af7077308450
vkupendar/flutter-prac
listtile/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.998496
6.762122
61c9a8b0-9c61-4f2e-8960-7c839f7e83b5
kasyap1234/codingproblems
Reverse a linked list - GFG/reverse-a-linked-list.cpp
// { Driver Code Starts //Initial Template for C++// C program to find n'th Node in linked list #include <stdio.h> #include <stdlib.h> #include<iostream> using namespace std; /* Link list Node */ struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; ...
ALGO
0.999851
5.855443
8336d737-bf48-4ca6-8f84-862be45fd895
DevSonseol/Algorithm
프로그래머스/H_index.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; int solution(vector<int> citations) { int answer = 0; sort(citations.begin(), citations.end()); int up, down; for (int i = 0; i <= 10000; i++) { up = 0; down = 0; for (int j = 0; j < citations...
ALGO
0.999958
6.096318
9716f959-29e9-481b-8a3c-50566451b214
raincross7/code-similarity
codes/train_code/problem390/problem390_298.cpp
#include <bits/stdc++.h> typedef long long int LL; typedef unsigned long long int ULL; using namespace std; // 插入此處 LL bs(LL A, LL B) { // [1, 2, ..., A-1] x [B+1, B+2, ...] // find max n st [1, 2, ... n] x [B+1, B+2, ..., B+n] is affordable // given n, the max is (B+n+1)^2 / 4 LL lo = 1, hi = A; i...
ALGO
0.99992
4.817875
30eb84b8-9200-41a8-bd48-3429bf98eb13
boddicheg/competitive
leetcode/1-99/066_plus_one.cpp
#include <iostream> #include <vector> #include <set> #include <algorithm> using namespace std; #define watch(x) std::cout << (#x) << " is " << (x) << std::endl template<typename T> void print(const T &container) { std::cout << "["; for (const auto &e : container) std::cout << e << " "; std::cout ...
ALGO
0.999755
5.835198
fd37660d-927d-4d96-a239-98931ac200fc
ArutoriaWhite/Competitive-programming
uva624.cpp
#include <bits/stdc++.h> #define de(x) cout << #x << "=" << x << ", " #define dend cout << '\n' #define Eriri ios::sync_with_stdio(0), cin.tie(0); #define F first #define S second using namespace std; typedef pair<int,int> Pii; const int N = 25, M = 5e6; int dp[N][M], a[N], m, n, nex[N][M], used[N][M], t; int f (int ...
ALGO
0.999975
3.345243
1e03c162-b1fb-46bd-8331-fe420749a05d
dragon-web/second_stage_review
day_3_8/test3.cpp
#include <iostream> #include <string> #include <functional> #include <unistd.h> using namespace std; string Solution(string str) { string Ch; string temp; for(int i = 0;i < str.size();++i) { int count = 1; int pos = i; for(int j = i + 1;j < str.size();++j) { ...
ALGO
0.999987
4.413142
6e7c9ca5-1773-43ef-abf2-03d45d6961d0
TanYongF/algorithm
2022-5-14/898.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define ms(s,val) memset(s, val, sizeof(s)) const int inf = INT_MAX; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), l...
ALGO
0.999937
5.25902
7ad78942-d9ff-4eaf-b383-7416196ca0cd
Ishan-77/DSA
0011-container-with-most-water/0011-container-with-most-water.cpp
class Solution { public: int maxArea(vector<int>& H) { int ans = 0, i = 0, j = H.size()-1, res = 0; while (i < j) { if (H[i] <= H[j]) { res = H[i] * (j - i); i++; } else { res = H[j] * (j - i); j--; }...
ALGO
0.999938
6.414342
275140f3-c82a-4047-9f5f-11d8ab98e0e8
xavierbeast68/Leetcode-DCC
3. March (2023)/Day-12 Merge k Sorted Lists/23-merge-k-sorted-lists.cpp
// https://leetcode.com/problems/merge-k-sorted-lists/description/ // https://leetcode.com/problems/merge-k-sorted-lists/editorial/ // https://www.geeksforgeeks.org/merge-k-sorted-linked-lists-set-2-using-min-heap/ // https://practice.geeksforgeeks.org/problems/merge-k-sorted-linked-lists/1?utm_source=gfg&utm_medium=ar...
ALGO
0.999637
5.966296
d5d64f1d-3895-43e8-98af-564c8a638225
aditya13902/Leetcode
877-stone-game/877-stone-game.cpp
class Solution { public: vector<vector<int>>dp; int helper(vector<int>&piles,int i,int j){ if(i>j){ return 0; } if(dp[i][j]!=-1){ return dp[i][j]; } int a=piles[i]+min(helper(piles,i+2,j),helper(piles,i+1,j-1)); int b=piles[j]+min(helper(pi...
ALGO
0.999983
5.70738
9a47fb7b-d976-4d7e-a506-9174b541ecb9
cra16/Problem-Solving-Study
problems/2581/21500426.cpp
#include <iostream> using namespace std; int main () { int M, N = 0; cout << "enter M, N: "; cin >> M >> N; int i, cnt = 0; int j = 1; for (i = M; i <=N; i++) { if (i == 1) continue; else if (i == 2) { cnt++; continue; } for(j = 2; j < i; j++) { // j will increase from 2 to i // if i can be divided by...
ALGO
0.999787
4.527171
3c2d2232-2ef3-4634-933a-64c583762ae0
dmitriy79/bitcoin-16
src/qt/transactionfilterproxy.cpp
#include <qt/transactionfilterproxy.h> #include <qt/transactiontablemodel.h> #include <qt/transactionrecord.h> #include <cstdlib> // Earliest date that can be represented (far in the past) const QDateTime TransactionFilterProxy::MIN_DATE = QDateTime::fromTime_t(0); // Last date that can be represented (far in the fu...
TOOL
0.926803
6.741245
4a1e669c-0779-434c-9635-ea95381fe157
Shruti12130/Leetcode-Problems
0div-idbig-omega-company-tagsdiv-idbig-omega-topbardiv-classcompanytagscontainer-styleoverflow-x-scroll-flex-wrap-nowrap-div-classcompanytagscontainer-tagno-companies-found-for-this-problem-div-divdiv-classcompanytagscontainer-chevrondivsvg-version11-idicon-xmlnshttp-wwww3org-2000-svg-xmlns-xlinkhttp-wwww3org-1999-xlin...
class Solution { public: int longestStrChain(vector<string>& words) { int n=words.size(); sort(words.begin(), words.end(), [](auto &a, auto &b){ return a.size() < b.size(); }); unordered_map<string, int> dp; int ans=1; for(auto word: words) { d...
ALGO
0.999994
6.13141
924834d8-8896-45e8-9149-c47087b0b8a5
ThunyatepZ/C-
I don't under stand any thing/bisection.cpp
//concept || between //It's the first solution || i have i left #include <iostream> #include <cmath> using namespace std; double find_function(double x){ double fxm = 4.00*x-1.00; return fxm; } int main(){ double XL = -10.00; double XR = 5.00; double XM; double findError; double fnXR, fnXM...
ALGO
0.999975
4.130193
0436e672-2817-434d-ae9a-4f215ff0c72e
DemeulemeesterT/Fair-Integer-Programming
Fair Integer Programming/Run_distribution_all_SWT.cpp
#include"Run_configurations.h" std::vector<ReportDistribution*> run_distribution_all_SWT(std::string s, int nr_instances, double time_limit, int iterations, bool print) { // Prepare to go through all instances std::vector<std::vector<int>> P; //P.push_back({ 3,2 }); P.push_back({ 40,nr_instances }); // The first ...
ALGO
0.869097
4.545865
5a31a51f-4b93-4871-a538-f9d39b90ff76
giongto35/CompetitveProgramming
WA.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cstring> #include <ctime> #include <que...
ALGO
0.999476
3.07038
9edda53c-4fd7-449d-96f8-2e562b55f341
patidartanay/Codeforces
lessthan_1300/1520A.cpp
#include"bits/stdc++.h" using namespace std; void solve(){ vector<char> v; int n; string s; cin >> n >> s; for(int i = 0; i<n; i++) { if(s[i]==s[i+1]){ continue; }else{ for(auto& it : v){ if(it == s[i]){ cout<<"NO"<<endl; ...
ALGO
0.999991
4.212081
d48f4014-42fb-40ce-8bb6-e08ee5cfaee6
Ashok-poudel/discrete-structure
lab1q4.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> struct Person { std::string name; int age; double membershipA; double membershipB; }; double calculateMembershipA(int age) { if (age <= 20) { return 1.0; } else if (age > 20 && age <= 30) { return (30....
ALGO
0.976537
5.811356
c97354ca-3f43-4561-9dbb-831fbb42e427
hassanfv/SPH_3
Numerical_recipes_in_Cpp_source_code_version 3.01/CPP_211/examples/xicrc.cpp
#include <string> #include <iostream> #include <iomanip> #include "nr.h" using namespace std; // Driver for routine icrc inline unsigned char lobyte(const unsigned short x) {return (unsigned char)(x & 0xff);} inline unsigned char hibyte(const unsigned short x) {return (unsigned char) ((x >> 8) & 0xff);} int main(vo...
TOOL
0.956756
4.664065
528386af-edd4-4bdb-814f-bf86ef23273f
alexandraback/datacollection
solutions_1480487_1/C++/Uran/A.cpp
#pragma region predefinition #define _CRT_SECURE_NO_DEPRECATE #include <algorithm> #include <string> #include <vector> #include <queue> #include <iostream> #include <cmath> #include <sstream> #include <map> #include <set> #include <stack> #include <cstring> #include <ctime> #include <cstdio> #include <memory> using nam...
ALGO
0.999443
3.40972
8341dc61-1fa2-4793-96cc-1149b13cb199
Kamrul-Hasan-1971/LightOJ
1089 - Points in Segments (II).cpp
#include<bits/stdc++.h> using namespace std; #define eb emplace_back #define zero(a) memset(a,0,sizeof a) #define MX 100004 vector<int>v1,v2,qury; int sorted[MX*2] , tree[MX*6], lazy[MX*6];; int n , q , indx ; set<int>st; set<int>::iterator it; ...
ALGO
0.999717
4.439587
8e384c1f-06bf-4857-acd1-a1a071d65a20
FANGYuan827/NewcoderOffer
剑指OFFER/demo41_和为S的两个数字.cpp
/* 2018年3月4日17:32:37 输入一个递增排序的数组和一个数字S,在数组中查找两个数, 使得他们的和正好是S,如果有多对数字的和等于S,输出两个数的乘积最小的。 */ #include "iostream" #include <vector> using namespace std; /*自己的思路*/ class Solution_demo41 { public: vector<int> FindNumbersWithSum(vector<int> my_array,int sum) { vector<int> v_res; if(my_array.size()<=0) { return v_r...
ALGO
0.999989
4.040501
8a0270bf-eb1a-462e-8358-ecb91f67f917
Gecko05/cpp_for_c
chap7/examples/stl_int2.cpp
#include <iostream> #include <numeric> #include <algorithm> #include <vector> using namespace std; double integrate(gen g, int n, double& diff) { vector<double> fx(n), smn(n), lg(n); double s, l; generate(fx.begin(), fx.end(), g); for (int i = 0; i < n - 1; ++i) { if (fx[i] > fx[i + 1]) ...
ALGO
0.999961
4.604019
5c330d53-39be-4cca-8db2-4768ef165c57
karthik366/pcc-mp3dg-plane_proj_work
ml/src/permutohedral.cpp
#include <pcl/ml/permutohedral.h> /////////////////////////////////////////////////////////////////////////////////////////// pcl::Permutohedral::Permutohedral () : N_ (0), M_ (0), d_ (0), blur_neighborsOLD_(NULL), offsetOLD_ (NULL), barycentricOLD_ (NULL) {} /////////////////////////////////////////////////////...
ALGO
0.999561
7.322069
c60b2b59-4c24-486e-9744-57f35e5291e5
selnem/CODA_algorithm
coda_coala_algo/week2/2075.cpp
#include<iostream> #include<queue> #include<vector> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); priority_queue<int,vector<int>,greater<int> > pq; int n; int tmp; cin>>n; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>tmp; ...
ALGO
0.999909
3.043963
77a0188d-6ee6-4d99-b8ca-b3941b1a97ba
FlowSight/coding
neetcode 150/word_ladder.cpp
// 26 feb 26 // 15 mins.. // mistake in reading qs..expected ans was misread.. // sev2 // need to optimize with forming graph class Solution { public: int ladderLength(string beginWord, string endWord, vector<string>& wordList) { unordered_set<string> wordDict, seen; int ans = 0; for(auto &...
ALGO
0.999985
5.64933
c41e6c5a-1489-481f-a5a6-bad531226808
mateuszpopiel/AdventOfCode2024
17/src/main.cpp
#include "chronospatial_computer.hpp" #include <iostream> int main() { std::cout << solve(false) << '\n'; // 3,5,0,1,5,1,5,1,0 std::cout << solve(true) << '\n'; // 107413700225434 return 0; }
ALGO
0.999455
3.473312
710d1bf2-1aec-42b8-a46e-d0f656b96593
priyanshsingh/Cpp-learning
Fundamentals/practice5.cpp
#include <iostream> using namespace std; int main() { int A[3]; int B[3]; int add[3]; cout << "Enter three integers for Array A = "; for (int i = 0; i < 3; i++) { cin >> A[i]; } cout << endl; cout << "Enter three integers for Array B = "; for (int i = 0; i < 3; i++) ...
ALGO
0.999097
4.194812
2dd48db7-2db6-4450-81a3-7048031a1215
raincross7/code-similarity
codes/train_code/problem073/problem073_107.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) #define REPR(i, n) for(int i = n; i >= 0; i--) #define FOR(i, m, n) for(int i = m; i < n; i++) #define ALL(obj) (obj).begin(), (obj).end() #define INF 1e9 typedef long long ll; int main() { string S; cin >> S; ll K; cin...
ALGO
0.999957
4.050887
02b56c2d-4bd0-479e-a9cc-cf8fda9c2b9c
Robert-9/JZoffer
Stack/JZ59/JZ59_answer.cpp
/* 对于滑动窗口背景类问题,我们可以通过单调队列这一数据结构高效的求出最值 单调队列是一种高效处理求滑动窗口最值的数据结构,其本身是一个双端队列(deque),其可以通过O(n)的线性时间复杂度求出最值 */ #include <deque> #include <vector> using std::vector; using std::deque; class Solution { public: std::vector<int> maxInWindows(const std::vector<int>& nums, unsigned int windowSize) { std::vec...
ALGO
0.999995
6.827602
1badf298-b5ea-4115-8e36-d18bae9a962f
kyledh1127/codetree-TILs
240228/정수 세 개 입력받아 출력/take-three-integers-and-output.cpp
#include <iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; cout<<a<<" "<<b<<" "<<c; return 0; }
ALGO
0.985645
3.349128
fa846589-6cdf-4df8-b98e-c1bfe1a101ef
alexandraback/datacollection
solutions_5690574640250880_0/C++/segtree/c.cpp
#include <cstdio> #include <cstdlib> #include <cstring> const int o[8][2]={1,0,-1,0,0,1,0,-1,1,1,-1,-1,1,-1,-1,1}; int T,r,c,m,X,Y; bool f,g[7][7],h[7][7],s[7][7]; void dfs(int x,int y) { if(s[x][y]||h[x][y]) return; s[x][y]=1; for(int i=0;i<8;++i) if(x+o[i][0]&&x+o[i][0]<=r&&y+o[i][1]&&y+o[i][1]<=c) ...
ALGO
0.999704
3.463568
daeb4872-03f1-4916-b3e0-08404618aa0c
lindasway/graphics
Raytracer/src/raytracer.cpp
#include <iostream> #include <vector> #include <functional> #include <algorithm> #include <glm/glm.hpp> #include <math.h> #include <SDL.h> #include "limits.h" #include "SDLauxiliary.h" #include "TestModel.h" using namespace std; using namespace glm; using glm::vec3; using glm::mat3; /* -------------------------------...
TOOL
0.921202
5.08748
0602e372-f970-4fc5-a771-0aa670101f48
FrostPrice/CPlusPlus
Vetores/Project_2.cpp
#include <iostream> #include <locale.h> using namespace std; #define TAM 10 int main() { setlocale(LC_ALL, "Portuguese"); float grades[TAM], average = 0; int aboveAverage = 0; for(int i = 0; i < TAM; i++) { cout << "Digite um valor: "; cin >> grades[i]; average = average + grades[i]; } average = aver...
TOOL
0.959331
4.418487
af50fd3e-1017-489b-bebd-c19d2f40d8f5
devrt/gazebo-mirror
deps/fcl/src/geometric_shapes_intersect.cpp
/** \author Jia Pan */ #include "fcl/geometric_shapes_intersect.h" namespace fcl { struct ccd_obj_t { ccd_vec3_t pos; ccd_quat_t rot, rot_inv; }; struct ccd_box_t : public ccd_obj_t { ccd_real_t dim[3]; }; struct ccd_cap_t : public ccd_obj_t { ccd_real_t radius, height; }; struct ccd_cyl_t : public ccd_ob...
ALGO
0.998189
6.823994
32815c94-bb7a-4ce5-b9c6-d9dfbe003692
thucdx/algorithm-solution
CTEST/NWERC2006/C.Pie.cpp
// Created : 12:53:28 AM ; Oct 15, 2012 #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <list> #include <queue> #include <stack> #include <bitset> #include <set> #include <ss...
ALGO
0.999938
3.621889
702490a4-676f-4672-ab8c-94f5852e3daa
mystic-01/LeetCode
206-reverse-linked-list/206-reverse-linked-list.cpp
class Solution { public: ListNode* reverse(ListNode* head, ListNode* prev) { if(!head->next) { prev->next = head; return head; }; ListNode* temp = reverse(head->next, prev); temp->next = head; return head; }; ListNode* reverseList(Lis...
ALGO
0.999497
5.744142
c92c3f9c-c504-4f28-8a5b-f82d38df5561
kapillamba08/Functions
SumOfEvenNumbersUptoN.cpp
#include <iostream> using namespace std; int SumOfEvens(int n){ int sum=0; for(int i=0;i<n;i++){ if(i%2==0){ sum+=i; } else{ continue; } } return sum; } int main(){ int n; cout<<"Enter value of n: "; cin>>n; int result = SumOfEve...
ALGO
0.99945
5.402452
3e6e3404-ea0e-4029-a163-9616ed21349e
avinashsai/codeforces
731A.cpp
#include<iostream> #include<math.h> using namespace std; int min(int c,int d) { if(c<=d) return c; else return d; } int main() { char b[100],pre='a'; int i=0,n,sum=0; cin>>b; while(b[i]!='\0') { if(pre<=b[i]) { sum=sum+min((b[i]-pre),(1+(pre-'a')+('z'-b[i]))); } else { sum=sum+min((pre-b[i]),(1+('z...
ALGO
0.999797
3.011376
229490a7-b906-4478-a184-32a265a50c92
NirajD04/DSA
22-generate-parentheses/generate-parentheses.cpp
class Solution { public: vector<string> ans; void solve(int left, int right, string curr){ if(left==0 && right==0){ ans.push_back(curr); return; } if(left>0){ solve(left-1, right, curr+"("); } if(right>left){ solve(left, right-1, curr+")"); } } vector<string> ...
ALGO
0.999878
6.392424
4da591d3-0641-480f-91ad-39066f932a67
divyanshusharma3031/leetcode
0198-house-robber/0198-house-robber.cpp
class Solution { public: vector<int> dp; int robbing(int i,vector<int> &nums) { if(i<=0) { return 0; } if(dp[i]!=-1) { return dp[i]; } return dp[i]=max(nums[i-1]+robbing(i-2,nums),robbing(i-1,nums)); } int rob(vector<int...
ALGO
0.999957
5.787683
e10bec2d-64c2-466b-9125-fac893e76fb3
VietNguyen2004/CHUYEN_DE_10.3
HOC_SINH.cpp
/*Yêu cầu: Có n học sinh, mỗi học sinh có 3 thông tin: Họ tên, điểm toán, điểm tin. Sắp xếp danh sách học sinh theo tiêu chí: - Họ tên tăng dần. - Nếu họ tên giống nhau thì tổng điểm (= điểm toán + điểm tin) tăng dần. - Nếu họ tên và tổng điểm giống nhau thì điểm toán tăng dần. */ #includ...
ALGO
0.99981
4.666755
3cbfd385-e3bb-49af-825e-3886a97c45a3
Ritax2003/Placement-Code-Practice
SORT/3. Selection sort.cpp
#include <iostream> #include <vector> using namespace std; void selectionSort(vector<int>& arr) { int n = arr.size(); for (int i = 0; i < n - 1; ++i) { int minIndex = i; // Find the minimum element in the unsorted portion for (int j = i + 1; j < n; ++j) { if (arr[j] < arr[m...
ALGO
0.999933
5.99757
d9b21dfc-21ce-4b67-8d40-23ece51535e2
ishandutta2007/codeforces
yuu/normal/853/B.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i, j, k) for(int i=j; i<=k; i++) #define FFOR(i, j, k) for(int i=j; i<k; i++) #define DFOR(i, j, k) for(int i=j; i>=k; i--) #define bug(x) cerr<<#x<<" = "<<x<<'\n' #define pb push_back #define mp make_pair typedef long long ll; typedef long double ld; template <...
ALGO
0.999889
3.406106
441dfa10-e873-4bdb-bbf5-1f333bfbb790
mihaimoga/XMLSitemap
boost/libs/numeric/interval/examples/findroot_demo.cpp
#include <boost/numeric/interval.hpp> // must be first for <limits> workaround #include <boost/numeric/interval/io.hpp> #include <list> #include <deque> #include <vector> #include <fstream> #include <iostream> template<class T> struct test_func2d { T operator()(T x, T y) const { return sin(x)*cos(y) - exp(...
ALGO
0.988248
5.319494
0de5e09e-1e49-4e56-a367-efcd8ab36aa4
okuraofvegetable/AtCoder
atcoder.jp/abc055/abc055_b/Main.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int,int> P; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; // #define int long long #define pb push_back #define mp make_pair #define eps 1e-9 #define INF 1000000000 //1e9 #define LLINF 1000000000000000ll // 1e15 #define fi first #defin...
ALGO
0.999975
5.366899
5a425304-2589-4037-80a3-e5da7b5b43ac
alphonsa-01/Concordance
word.cpp
//Name : Alphonsa George //Assignment :PROG1203 HW8 - Words #include "word.h" /** * \brief The standard nwacc namespace. * * The namespace used for all nwacc application code. */ namespace nwacc { /*! \brief Represents the first English alphabet in capital, which is 'A'. */ const char word::k_first_capital_...
TOOL
0.899355
5.191783
ee17582c-c0af-481f-b520-a2d282589296
vikasrathod2002/Mastering-Bit-Manipulation-Problems
And Or Union.cpp
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define pb push_back #define mp make_pair #define pii pair<int,int> #define vi vector<int> #define mii map<int,int> #define pqb priority_queue<int> #defi...
ALGO
0.999958
5.450508
b2748e88-cad5-44be-8098-2f161c037c04
hasumin71/atc
MultipleArray.cpp
#include <iostream> #include <vector> using namespace std; int main(){ int N; cin >> N; vector<long long> A(N),B(N); for(int i=0; i<N; ++i) cin>>A[i] >>B[i]; long long sum =0; for(int i =N-1; i>=0; --i){ A[i] +=sum; long long amari = A[i]%B[i]; long long D=0; if(amari!=0) D=B[i] - amari; ...
ALGO
0.999958
3.778569
c8fc39e6-da9f-4a45-a1cc-c36c6be1e7a8
GauravKaushik1/projectsmadebyme
Spylife.cpp
#include <iostream> #include <string> using namespace std; string reverse(string a){ string b; int l=a.length()-1; for(int i=l;i>=0;i--){ b.pushback(a[i]); } return b; } string remsymbol(string a){ string b; int l=a.length(); bool isy(char a); for(int i=0;i<=l;i++){ if(!isy(a[i])){ b.pushback(a[i]); ...
ALGO
0.999809
4.290888
f65fead7-26df-46b4-ab18-f83b29095e62
joechung99/Sofware-Testing
Nextday.cpp
#include <iostream> #define INVALID -1 using namespace std; int Nextday(int year,int month,int day){ bool leap =false; bool bigmonth=true; if ((year<1812)||(year>2012)||(month<1)||(month>12||(day<1)||(day>31))){ return INVALID; } else if((year%4)==0&&((year%100)!=0||(year%400)==0)){ leap=true; } if(!leap &...
ALGO
0.996607
3.753293
d3fccf17-0893-4616-b06e-5929bfcaeb12
ishandutta2007/codeforces
mjhun/normal/781/C.cpp
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define fst first #define snd second #define fore(i,a,b) for(int i=a,ThxDem=b;i<ThxDem;++i) using namespace std; typedef long long ll; vector<int> g[200005]; bool vis[200005]; vector<int> r; int n,m,k; void dfs(int x){ r.pb(x); for(auto y:g[x]){ i...
ALGO
0.999984
3.902962
802039ba-2740-4a02-89c1-e06238e09fde
ashutosh-singh83/DSA
STL/stl2.cpp
#include<iostream> #include<list> using namespace std; int main(){ list<int> l1={1,2,3,4}; auto itr=l1.begin(); //cout<<*itr<<endl; advance(itr,3); // cout<<*itr<<endl; // using range based loop for(auto num:l1){ cout<<num<<" "; }cout<<endl; //using iterators for(auto itr=l...
TOOL
0.972792
3.396887
44cc9f86-eccd-4a5a-9ce5-4cda15f92173
Vranjan7077/Var_Plat_Codes
Interviewbit/array/merge-overlapping-intervals.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) {} * }; */ int cmp(Interval a,Interval b){ if(a.start==b.end){ return a.end<b.end; } return a.start<b.start; } vector<I...
ALGO
0.999987
5.616693
f8f1d246-ef29-475e-8e49-95d235ff446d
ByteGeniusBot/Daily-Personal-Practice
59.Spiral Matrix II(2).cpp
class Solution { public: vector<vector<int>> generateMatrix(int n) { int num = 1; vector<vector<int>>matrix(n, vector<int>(n)); int left = 0, right = n - 1, top = 0, bottom = n - 1; while (left <= right && top <= bottom) { for (int column = left; column <= right; ...
ALGO
0.999864
6.289402
cec329a5-80d2-4fcd-bd64-8c14cdec8b7f
lazywaterpig/BOJ_Problems
solved.ac CLASS/CLASS 5/1005.cpp
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int t; cin >> t; while(t--){ // index 1~n 사용 int t_dat[1002]; int b_cnt[1002]; int ans[1002]; vector<int> v[1002]; vector<int> b[1002]; memset(t_dat, 0, si...
ALGO
0.999921
3.833338
1851255e-5683-478d-960e-dcf6ac501ba7
shining-yang/DDZ
DdzServer/Crc.cpp
// // Crc.cpp // // CRCУ֡ǴҵĴ // #include "stdafx.h" #include "Crc.h" // CRC-16 = X16 + X15 + X2 + X0 static unsigned short cnCRC_16 = 0x8005; // CRC-CCITT = X16 + X12 + X5 + X0 static unsigned short cnCRC_CCITT = 0x1021; // CRC16 static unsigned long Table_CRC16[256] = { 0 }; // CRC ǷѾ static BOOL g_bCrc16TableBui...
ALGO
0.980165
4.662897
a7ca6d81-e4d5-4057-b590-6eba293beed7
lorenzo-ferrari/olinfo
src/tecla.cpp
#include <bits/stdc++.h> #define MAX 30 using namespace std; ifstream in ("input.txt"); ofstream out ("output.txt"); vector <int> graph[MAX]; int tramite[MAX]; int stato[MAX]; queue <int> Q; int main() { int n, m; in >> n >> m; int v1, v2; for(int i = 0; i < m; i++) { in >> v1 >> v2; grap...
ALGO
0.999962
4.292641
f7cb520e-0b50-4400-b20d-be785eb6d0fe
MarcelAlpin/Fasum-app
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.998756
6.772262
d84b54e9-4765-47a2-945a-c630aa0880bb
kkmw0/Baekjoon-Online-Judge
Shortest_Path/11265.cpp
#include <iostream> #include <algorithm> using namespace std; int n, m; int graph[501][501]; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> n >> m; for(int i = 1; i <= n; i++){ for(int j = 1; j <= n; j++){ cin >> graph[i][j]; } } for(int k = 1; k...
ALGO
0.999995
4.267598
3d9ae0fd-ea98-4abf-b805-5b9e3c9a07cb
testtest58/Build
Engine/Source/ThirdParty/PhysX3/NvCloth/src/avx/SwSolveConstraints.cpp
#pragma warning(push) #pragma warning(disable : 4668) //'symbol' is not defined as a preprocessor macro, replacing with '0' for 'directives' #pragma warning(disable : 4987) // nonstandard extension used: 'throw (...)' #include <intrin.h> #pragma warning(pop) #pragma warning(disable : 4127) // conditional expression is...
ALGO
0.998874
5.069299
456e4484-b512-4205-bd4e-90b09a0ed4e3
xtarke/vliwCPU
llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp
#include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h" #include "llvm/ADT/StringExtras.h" #include "llvm/IR/BasicBlock.h" #include "llvm/IR/Function.h" #include "llvm/IR/Instructions.h" #include "llvm/IR/Type.h" #include "llvm/Transforms/Scalar.h" using namespace llvm; char UnifyFunctionExitNodes::ID = 0; INITIALIZ...
TOOL
0.868524
7.591396
6d678a90-5db7-41af-91bb-abf9fc403802
rifqimaruf/algorithm-and-data-structure
Day67_LeetCode_309/solution.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: int maxProfit(vector<int>& prices) { int n = prices.size(); if (n <= 1) { return 0; } vector<int> hold(n, 0); vector<int> sold(n, 0); vector<int> rest(n, 0); ...
ALGO
0.999855
6.273187