uuid
stringlengths
36
36
repo_name
stringlengths
5
123
relative_path
stringlengths
5
4k
content
stringlengths
33
2.85M
category
stringclasses
6 values
algo_rel_score
float64
0.85
1
quality_score
float64
3
8.76
b4de4b2c-993c-42f3-a460-79753a696817
ishandutta2007/codeforces
archuser84/normal/1606/B.cpp
/// /// You fell for it, fool! /// Thunder Cross Split Attack! /// #include <bits/stdc++.h> #define Loop(x,l,r) for(ll x = ll(l); x < ll(r); ++x) typedef long long ll; using namespace std; void solve() { ll n, k; cin >> n >> k; ll ans = 1; ll cnt = 0; while(ans < n && ans <= k) { ++cnt; ans *= 2; } if...
ALGO
0.999877
4.162165
57cee555-ec01-4c8d-b8db-b588ea650bc7
divykantsharma/Leetcode-Solution
0096-unique-binary-search-trees/0096-unique-binary-search-trees.cpp
class Solution { public: //CATALAN NUMBER SERIES - 1,2,5,14,42,132,429,1430,...,1767263190(for 19) - TLE dega as fact(2*n) //expression - (2n)!/(n+1)!*n! // long long int factorial(int n){ // if(n==0 || n==1) return 1; // return n*factorial(n-1); // } // int numTrees(int n){ // ...
ALGO
0.999956
5.760967
7522dcaf-d8e2-4de7-9dd9-186d699db66b
mohit1018102/Programming-Questions
codevita2019kregion/BRACKET.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; string bracketx(string s,int n,int &pairs) { stack<char> stk; stack<int> count; bool flag=false; for(int i=0;i<n;i++) { if(s[i]=='(' || s[i]=='{' || s[i]=='[') { stk.push(s[i]); count.push(0); cout<<"push"<<endl; } els...
ALGO
0.999789
4.408758
a4c51907-874b-4da8-98f6-5357d88337fe
TrellixVulnTeam/ece565finalproject_TTLC
src/systemc/tests/systemc/misc/examples/a2901/a2901_alu.cpp
/***************************************************************************** a2901_alu.cpp -- Original Author: Martin Janssen, Synopsys, Inc., 2002-02-15 *****************************************************************************/ /**************************************************************************...
ALGO
0.984848
3.606826
faf0e732-a310-430a-9e56-f62d432c77c7
manishguptaji/flutter_hellow_world
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.9988
6.76073
4b35ef58-68b6-4a36-a684-dc8f0b43ba1e
blackle/Basilisk-Hunter
src/crypto/SHA256Tester.cpp
#include "SHA256Tester.h" #include "SHA256Impl.h" #include <io/array_ios.h> #include <chrono> #include <sstream> namespace chrono = std::chrono; constexpr int BENCHMARK_ROUNDS = 500000; bool SHA256Tester::verify(const SHA256Impl* impl) { SHA256State state; SHA256Block empty_block("", 0); impl->calc_block(&state,...
TEST
0.907059
6.859473
b7b19323-d1e7-4b7f-b41e-80ae4182a2f3
NXIST-backup/algorithm_trans
atcoder/jsc2021C.cpp
/* Problem Name: Max GCD 2 algorithm tag: math theory */ #include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <unordered_map> #include <vector> using namespace std; typedef long long ll; typedef unsigned long long ull; const int I...
ALGO
0.999936
3.83843
a84ce80b-9d37-4e05-b935-45d0e312cd58
bakoon/supersonic_project
project2/include/project2/rrtTree.cpp
#include "rrtTree.h" #include <unistd.h> #include <ros/ros.h> #define PI 3.14159265358979323846 #define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) #define MAX(X,Y) ((X) > (Y) ? (X) : (Y)) #include <cmath> double max_alpha = 0.3; double L = 0.325; rrtTree::rrtTree() { count = 0; root = NULL; ptrTable[0] = NULL; ...
ALGO
0.999516
4.317583
767c132e-3c2d-4e0a-add0-4bb035025f1b
dirkneuhaeuser/exercise-problems
own_ds/fenwick/fenwick2D.cpp
#include"bits/stdc++.h" // using "" instead of <>, so it will search locally for the precompiled version first using namespace std; // int up to 2*10^9 (2^31-1) typedef long long ll; // ll up to 9*10^18 (2^63 -1) typedef unsigned long long ull; ...
ALGO
0.998387
4.447777
4406a7c4-7512-4b47-b26f-b52d664fcb11
heavenMOJANG/ICPC
.history/AtCoder/abc377/D_20241026202319.cpp
#pragma GCC optimize(1) #pragma GCC optimize(2) #pragma GCC optimize(3,"Ofast","inline") #include <bits/stdc++.h> #define int long long using namespace std; constexpr int INF = 0x7fffffff; void solve() { int n, m; cin >> n >> m; vector<int> diff(m + 2, 0); for (int i = 0; i < n; ++ i) { int l, r; ci...
ALGO
0.999923
4.508101
9d3dfc6f-a408-4106-a616-504f551c142b
NamanAg0502/programming
cpp/1433A.cpp
#include "/Users/na/stdc++.h" using namespace std; #define PI 3.1415926535897932384626 #define MOD 1000000007 // 998244353 #define vi vector<int> #define vb vector<bool> #define vvi vector<vector<int>> #define vll vector<long long> #define pb push_back #define eb emplace_back #define mp(a, b) make_pair(a, b) #define p...
ALGO
0.999942
3.566296
caf5a92b-eef1-4e38-87ab-fbe458303053
abhinav7677/Leetcode-2024
2192-all-ancestors-of-a-node-in-a-directed-acyclic-graph/2192-all-ancestors-of-a-node-in-a-directed-acyclic-graph.cpp
class Solution { public: void dfs(int i,int &curr,vector<vector<int>>&dp,vector<int>&vis,vector<vector<int>> &ans) { vis[i]=1; for(int child:dp[i]){ if(vis[child])continue; ans[child].push_back(curr); dfs(child,curr,dp,vis,ans); } } vector<vector<i...
ALGO
0.999993
6.21458
b5cacb9a-e239-4604-a9d6-f4a9c10354e5
ishandutta2007/codeforces
atreus/normal/1043/A.cpp
#include <bits/stdc++.h> #define F first #define S second #define PB push_back #define PF push_front #define MP make_pair using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; const int maxn = 3e4 + 10; const int block = 320; int a[maxn]; int main() { int n, m = 0; cin >> n; ...
ALGO
0.999987
3.784089
e95e09dd-f801-4c98-8d5c-13c628f77408
Lijah99/competitiveProgramming
2week/army.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { int tests; cin >> tests; int numG, numM; vector<int> God, Mech; int temp; for(int i = 0; i < tests; i++) { God.empty(); Mech.empty(); sG = 0; sM = 0; cin >> numG >> numM; } return 0; }
ALGO
0.995285
3.250518
dc3cd8e2-5cc1-4a8b-841d-e514a8cb479e
unnati109c/GeeksForGeeks
Linked List/7. Remove duplicates from an unsorted linked list.cpp
Node * removeDuplicates( Node *head) { //using set to store already seen values in list. unordered_set<int> seen; //using two pointers one of which stores first node other null. struct Node *curr = head; struct Node *prev = NULL; //traversing ove...
ALGO
0.999843
3.99977
9705a4d3-9369-4c6f-a58f-8649accdb0d3
Hassanahmd210/Daily-Leetcode
2079-delete-duplicate-folders-in-system/2079-delete-duplicate-folders-in-system.cpp
class Solution { public: struct T { map<string, T*> c; string n; bool del = false; T(string nn): n(nn) {} }; T* build(vector<vector<string>>& p) { T* root = new T(""); for (auto& pa : p) { T* cur = root; for (auto& s : pa) { ...
ALGO
0.999519
5.871713
8b56d4a8-f38e-4403-8e76-199a782b3ed4
kaspersoreide/L-system-trees
src/lsystem.cpp
#include "lsystem.h" #include "loadshaders.h" Lsystem::~Lsystem() { glDeleteBuffers(1, &inputBuffer); glDeleteBuffers(1, &outputBuffer); glDeleteBuffers(1, &productionsBuffer); } void Lsystem::addRule(char in, string out, float probability) { rules.push_back({in, out, probability}); } void Lsystem::s...
TOOL
0.994361
3.894328
7fddc758-74d1-44e1-a1ef-362b9400e35f
REMath/implementations
avalanche/driver/src/Entry.cpp
/*---------------------------------------------------------------------------*/ /*------------------------------ AVALANCHE ----------------------------------*/ /*- Driver. Coordinates other processes, traverses conditional jumps tree. --*/ /*------------------------------ Entry.cpp ----------------------------------*/ ...
TOOL
0.942289
4.266751
ab2e5704-2383-4321-92b1-0a93c10575e7
ishandutta2007/codeforces
gabrielpessoa/normal/1254/A.cpp
#include <bits/stdc++.h> using namespace std; #define int long long typedef pair<int, int> ii; const int inf = 0x3f3f3f3f3f3f3f3f; const int ms = 105; char arr[100]; int need[100]; string s[ms]; main() { cin.tie(0); ios::sync_with_stdio(0); for(int i = 0; i < 26; i++) { arr[i] = i + 'a'; arr[i+26] = i ...
ALGO
0.999831
3.965176
2755636c-64ec-458a-b713-cb5a5fb1c680
arundeegutla/Programming-Team
CSES/Tree/diameter.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<vector<int>> tree(n); for (int i = 0; i + 1 < n; i++) { int a, b; cin >> a >> b; a--, b--; tree[a].push_back(b); tree[b].push_back(a); } vector<bool> seen(n); function<...
ALGO
0.998396
4.342997
8dd2b528-d8e2-4d58-8b1e-26e61794509d
NikkittaP/osg_pack
sources/geos/src/linearref/LocationIndexOfPoint.cpp
#include <geos/geom/LineSegment.h> #include <geos/linearref/LinearIterator.h> #include <geos/linearref/LinearLocation.h> #include <geos/linearref/LocationIndexOfPoint.h> #include <geos/util/IllegalArgumentException.h> #include <cassert> #include <limits> using namespace std; using namespace geos::geom; namespace ge...
ALGO
0.999228
6.126769
02b981b2-faa3-4ba2-922d-c660b3ef5d02
Vansh-chaudhary-6395/DSA-Questions
Recursion/ArraySum.cpp
#include<iostream> using namespace std; int solve(int arr[], int n, int index){ if(index == n){ return 0; } int ans=0; ans = arr[index] + solve(arr, n, index+1); return ans; } void findMax(int arr[], int n, int index, int &maxi){ if(index >= n){ return; } if(arr[index] > maxi){ maxi = arr[index]; ...
ALGO
0.999962
4.515186
4aa2bb0e-2f79-49f7-83f0-bfc82815ca1d
maestron/botnets
VirusPack/Rx_Temptation/crypt.cpp
#include "includes.h" #include "functions.h" #include "externs.h" // this is a nice all-in-one solution to encrypt/decrypt and it's fairly secure // recommended even for novice users. void Crypt(unsigned char *inp, DWORD inplen, unsigned char *key, DWORD keylen) { //we will consider size of sbox 256 bytes //(extra b...
TOOL
0.994182
3.564635
2f73e7fb-4828-4593-bd3a-a5461269bbb7
July-jsy/c
day1/stu.cpp
#include <iostream> #include <string> #define N 5 using namespace std; struct Student { string name; string num; }; void inputStudentInfo(Student *s) { for (int i = 0; i < N; i++) { cout << "输入学生姓名和学号 " << i + 1 << ": "; cin >> s[i].name >> s[i].num; } } void findStu(Student *s, ...
TOOL
0.874529
4.165802
fab7299c-2165-4ea5-be60-53a55f639bf1
Stayaccept/LeetCode
829. 连续整数求和.cpp
class Solution { public: int consecutiveNumbersSum(int N) { int i,j,m,ans,tmp; m=(int)sqrt(2*N),N*=2; ans=0; for(i=1;i<=m;i++){ if(N%i!=0) continue; tmp=N/i+1-i; if(tmp%2==0) ans++; } return ans; } };
ALGO
0.999962
5.079937
c49db3ee-4d67-4143-a3fe-7bf5a1610c6e
ishandutta2007/codeforces
he_ren/normal/321/C.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; const int MAXN = 1e5 + 5; struct Edge { int next,to; }e[MAXN<<1]; int head[MAXN],etot=0; inline void add(int u,int v) { e[++etot] = (Edge){ head[u],v}; head[u] = etot; } bool vis[MAXN]; int siz[MAXN], mx_siz[MAXN]; void d...
ALGO
0.999959
4.477915
6df37b05-cbf8-4ba7-b25d-8d0bb22b24e3
ishandutta2007/codeforces
jell/normal/1400/C.cpp
#line 2 "Library\\gcc_option.hpp" #ifdef LOCAL #define _GLIBCXX_DEBUG #else #pragma GCC optimize("O3") #pragma GCC target("avx,avx2") #pragma GCC optimize("unroll-loops") #endif #line 2 "Library\\gcc_builtin.hpp" #include <cstdint> namespace workspace { constexpr int clz32(const uint32_t &n) noexcept { ...
ALGO
0.999932
4.768611
28356276-644d-4213-ade3-e2e15573eeb5
Tarik0011/Number-Theory
কাপঝাপ/MEX with array updates.cpp
//https://cp-algorithms.com/sequences/mex.html#mex-with-array-updates /* * -------------- ?*?*? -------------- * | In The Name of *Allah* | * | Author : Tarik | * | | * -------------- ?*?*? --------------- */ #include<bits/stdc++.h> #include <ext/...
ALGO
0.999965
5.033711
4630e4c0-d28f-4093-b40e-8f44fa9b7da2
alexandraback/datacollection
solutions_2751486_0/C++/Savchenkops/1.cpp
using namespace std; #include<iostream> #include<vector> #include<algorithm> #include<stack> #include<queue> #include<cstring> #include<cstdio> #include<cmath> #include<set> #include<map> #include<utility> #include<climits> #include<sstream> #define S(a) scanf("%d",&(a)) int main(){ int tc,cs=1,ans,n,c; string...
ALGO
0.997734
3.619357
2d191bb5-294f-45d4-b133-9f3697b7842e
kenf1/cryptlib
Example/keyMultiLine.cpp
#include <iostream> #include <string> #include "../src/cryptlib.cpp" #include "../src/importkey.cpp" int main(){ //create instances KeyReader kr; CoreLogic cl; /* import contents of `key.txt` as vector vector[0] = key, use stoi for converting string -> int vector[1] =...
TOOL
0.857562
4.511386
d2933763-246e-4725-bc8a-212434d13eb6
anurag-111/allSubmissions
even-odd-tree/Compile Error/8-9-2023, 7_10_01 PM/Solution.cpp
// https://leetcode.com/problems/even-odd-tree // Store this code // C++ code for Minimize changes to convert into Tree with root 1, even left // children and odd right children #include <bits/stdc++.h> using namespace std; // To store the final changes needed int changes; struct Node { int value; struct Node *le...
ALGO
0.999976
5.606781
2a80b233-3d28-4bc9-a7d3-215727c3f6c5
tarekrahamn/CodeChef-Problem-solve
Starters 101/Work_Smarter_Not_Harder.cpp
/*Starting with the name of almighty ALLAH Author: Tarek Rahman Created: 18.09.2023 United International University */ #include <bits/stdc++.h> #define ll long long int #define ull unsigned long long int #define ld long double #define vi vector<int32_t> #defin...
ALGO
0.999957
4.466951
b1987da0-8828-439f-a498-9e3be7222795
MarianPolicar/Judge-App-final-
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
76d87de0-5a92-4c48-be19-7ea5854d22ec
ishandutta2007/codeforces
square1001/normal/757/B.cpp
#include <cstdio> #include <algorithm> using namespace std; int n, x, cnt[100009], res[100009]; bool prime[100009]; int main() { fill(prime + 2, prime + 100001, true); for (int i = 2; i * i <= 100000; i++) { if (!prime[i]) continue; for (int j = i * i; j <= 100000; j += i) prime[j] = false; } scanf("%d", &n); ...
ALGO
0.99995
3.816765
8f513ed3-1ece-4825-8bd2-56b5ed88aa8b
Pawan-Dev3/Food_delivery_app
user_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.99852
6.785996
20191b30-51f4-4d88-bde1-735edaac4c81
anandsagar00/Data-Structure-and-Algorithm
graph_4.cpp
//print all sorts of possible paths between two nodes #include<iostream> #include<string> using namespace std; void print_path(int **arr,int n,int s,int e,string str,int visited[]) { if(s==e) { cout<<str<<s<<endl; return; } else { if(visited[s]==0) { visit...
ALGO
0.9998
4.385238
b4d119a7-7ceb-446e-89aa-5fe3328a247f
hungg261/baitap-thayHai
solutions/HOMEWORK.cpp
#include<bits/stdc++.h> #define int long long using namespace std; signed main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); freopen("HOMEWORK.INP","r",stdin);freopen("HOMEWORK.OUT","w",stdout); int n,m,s=0,r=0;cin>>n>>m; int A[n]; for(int&k:A){ cin>>k;s+=k; } for(int i=0;...
ALGO
0.999886
3.411365
ac03b653-cd2c-47bc-aa64-21ef9042ec1f
mingliangwsu/VIC-CropSyst-Package
common/residue/residue_decomposition_param.cpp
#include <math.h> #ifndef moremathH # include "corn/math/moremath.h" using namespace std; #endif #include "common/biomatter/decomposition_const.h" #include "common/residue/residue_decomposition_param.h" #include "common/residue/residue_const.h" #include "corn/data_source/datarec.h" #define DEFAULT_DECOMPOSITION_TI...
CONFIG
0.909187
5.084589
e7874b1f-7766-4032-8628-1e9ebf3c83e5
rishisrivastava07/Leetcode-Solving
data-structures/DP/02_climbingStairs.cpp
include<bits/stdc++.h> using namespace std; class Solution { public: int dp[46]; int solve(int idx){ if(idx < 0) return 0; if(idx == 0) return 1; if(dp[idx] != -1) return dp[idx]; return dp[idx] = solve(idx-1) + solve(idx-2); } int climbStairs(int n) { if(n == ...
ALGO
0.999937
4.799972
3707545f-17ed-4de5-9e66-90a571837855
sajalprajapati/Take-you-forward
Sliding Window and Two Pointer/Fruits Into Baskets/better_approach.cpp
#include<bits/stdc++.h> using namespace std; //it is using the sliding window technique. int totalFruits(vector<int> &arr) { int n=arr.size(); if(n==0 or n==1) return n; int maxLength=0; int left=0; int right=0; unordered_map<int,int> mali_ki_tokri; while(right<n) { mali_ki...
ALGO
0.999856
5.311581
e074b7f2-f1f7-4e81-98d3-cb80f7199d9e
WA-King/icpctemplate
banzi/一般图匹配.cpp
int n,m; // match[i], i所对应的匹配点 int match[maxn],pre[maxn],vis[maxn],fa[maxn],tim[maxn],idx,ans; vi g[maxn]; queue<int>Q; int find(int x){return x==fa[x]?x:fa[x]=find(fa[x]);} int lca(int x,int y) { for (++idx;;swap(x,y)) if (x) { x=find(x); if (tim[x]==idx) return x; else tim[x]=idx,x=pre[match[x]]; } } vo...
ALGO
0.999647
3.85105
e5dd204a-f53b-45fa-874e-0bd7cdec3864
hugopoggetti/LeetCode
src/isIsomorphic.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: bool isIsomorphic(string s, string t) { vector<int> indexS(200, 0); vector<int> indexT(200, 0); int len = s.length(); if(len != t.length()) return false; for (int i = ...
ALGO
0.999945
5.791837
69309451-24ad-4420-bea1-2ac722eec5b9
goqadze/UnBlockMe
PuzzleSolution.cpp
#include "stdafx.h" #include <vector> #include <set> #include <queue> using namespace std; const int N = 6; const long long M = 1e9 + 7; struct point{ char x, y; point(){} point(char x, char y) : x(x), y(y) {} }; struct plank{ point first; point last; plank(){} plank(point first, point last) : first(first), ...
ALGO
0.999887
3.786454
f5099618-c5d9-4506-ac2f-f5cc944c0a29
aref-mamdouh/Aref
Source6.cpp
#include <iostream> using namespace std; int main() { int num, sum = 0, max, min, count0 = 0, dummy; cout << "please enter a digit between 999 and 9999999: "; cin >> num; while (num < 999 || num > 9999999) { cout << "invalid number, please reenter a digit between 999 and 9999999: "; cin >> num; } max = num...
ALGO
0.992123
4.305543
acde6e89-ccd3-470d-9ea7-fe6dc958de40
ishandutta2007/codeforces
spacewalker/normal/1725/C.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define rep(i,x,y) for (int i = (x); i < (y); i++) typedef long long ll; typedef vector<int> vi; int MOD = 998244353; int modpow(int b, int p) { if (p == 0) return 1; if (p%2 == 1) return modpow(b, p-1)* b%MOD; int v = modpow(b,p/2); re...
ALGO
0.999978
4.090423
a0e42ba0-cc35-4cea-8ea3-84a3f15d442e
combofish/leetcode-solutions-cpp
src/HOT-100-2/hot_238_product-of-array-except-self_ii.cpp
/** -- question: 除自身以外数组的乘积 -- method: - [ ] count zero - [ ] 左右乘积列表 - [-] 空间复杂度 O(1) 的方法 --result: -- analyse: Time: O(N) Space: O(1) */ #include "../combofish_utils.hpp" #include <algorithm> class Solution { // function start. public: vector<int> productExceptSelf(vector<int> &nums) { int n ...
ALGO
0.999933
5.371591
0092ab7e-ac5a-48f3-a6b1-3717022ff4b8
bqmnhat/CompetitiveProgramming
ChamCode/PtBac2/main.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; typedef long long ll; ll a,b,c; void Solve() { if (a == b) { if (c == b) cout << "VSN"; else cout << "VN"; return; } double delta = (b*b) - 4*(a*c); if (delta < 0) { cout << "VN"; ...
ALGO
0.997199
4.288884
66ffabd8-c2b8-44f7-95b0-761f81a40aab
kpilkk/Leetcode
count-of-smaller-numbers-after-self.cpp
// https://leetcode.com/problems/count-of-smaller-numbers-after-self/ // Brute Force : TLE class Solution { public: vector<int> countSmaller(vector<int>& nums) { int n = nums.size(); vector<int> counts(n, 0); for(int i = 0; i < n; ++i){ int temp = 0; for(int j = i + ...
ALGO
0.999993
5.815716
a9d4ce18-0078-44db-9af1-f409a3599c2b
dieguitoml/DataStructures-Algorithms
SA.cpp
#include <iostream> #include <vector> #include <string> bool esValida(int i, std::vector<int> const& sol, std::vector<std::string>const& j, int k, std::vector<std::vector<int>>const& satis, int satisMin, std::vector<int>const& unidades, std::vector<int> const& marcas) { if (marcas[i] > unidades[i]) { return false; ...
ALGO
0.999931
4.311847
f47cfe81-2a2f-4d85-b5ba-f17446a4302d
koicy-ly/koicy-ly.github.io
assets/code/CF1496A.cpp
#include <iostream> using namespace std; int main() { int t; for (cin >> t; t--;) { int n, k; string s; cin >> n >> k >> s; int cnt = 0; for (int i = 0, j = n - 1; i < j - 1; cnt++) if (s[i++] != s[j--]) break; puts(cnt >= k ? "YeS" : "No"); } return 0; }
ALGO
0.999854
3.418508
6b02bce9-e377-4829-ab11-88cc21841f4d
yajatyadav/vroom
methods/DROID-SLAM/thirdparty/eigen/bench/eig33.cpp
#include <iostream> #include <Eigen/Core> #include <Eigen/Eigenvalues> #include <Eigen/Geometry> #include <bench/BenchTimer.h> using namespace Eigen; using namespace std; template<typename Matrix, typename Roots> inline void computeRoots(const Matrix& m, Roots& roots) { typedef typename Matrix::Scalar Scalar; con...
ALGO
0.999648
5.643614
9f9035ed-8ee3-4bda-9740-7e3cf82c3bb8
kavin23923/Leetcode
problem/401-450/406.cpp
class Solution { public: vector<vector<int>> reconstructQueue(vector<vector<int>>& people) { int size = people.size(); vector<vector<int>> res; auto cmp = [](vector<int> a, vector<int> b) { return a[0] > b[0] || (a[0] == b[0] && a[1] < b[1]); }; sort(people.begin(), people.end(), cmp); ...
ALGO
0.999997
6.286543
84c4f8b0-dad3-4525-ae4d-86669f72931c
ciechowoj/themis
KLM32/klm34.cpp
#include <cstdio> #include <vector> #include <cctype> #include <algorithm> struct pair_t { int first; int second; int index; bool operator<(const pair_t& that) const { return first == that.first ? second < that.second : first < that.first; } bool operator>(const pair_t& that) const { return that.operator<(...
ALGO
0.999803
3.726887
357422aa-53db-4899-b325-4b9d5947a526
9ine6ix/C-ESPRESSO-WORK_SHEET
Week_2/Work_2_2/Problem13/Problem13/Problem13.cpp
#include "stdafx.h" #include <iostream> #include <string> using namespace std; int main() { string str; string findstr; string changestr; cout << "ڿ ԷϽÿ: "; getline(cin, str); cout << "ã ڿ: "; cin >> findstr; cout << "ٲ ڿ: "; cin >> changestr; str.replace(str.find(findstr), findstr.length(), changestr) ; ...
TOOL
0.958484
3.580029
69f388d9-4254-4870-b7fb-fa07ab1baf6b
BeingAnProgrammer/Cpp-Programs
1_Conditional-Statement/01-Basic-if-Q/Max-Min-btw-no.cpp
// This program tells which no is max/min btw to no // #include<iostream> // using namespace std; // int main() // { // int a,b; // cout<<"\nEnter 2 no to find Max btw them = "; // cin>>a>>b; // if(a>b) // cout<<a<<" is the Max no "; // else // cout<<b<<" is the Max no "; // return 0; /...
ALGO
0.998518
3.537881
656ee31b-9832-49ad-8d29-a8dfe8c14e89
nikhilmarada0303/LeetCode-DSA-Solutions
0102-binary-tree-level-order-traversal/0102-binary-tree-level-order-traversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999974
6.147966
6454708b-6de6-4709-8838-af80e22ac331
sdi1400258/System-Programming
SysPro/lista.cpp
#include <iostream> #include "lista.h" lista::~lista() { ListNode * cur, * next; cur = this->first; while (cur) { next = cur->next; delete cur; cur = next; } return; } void lista::Add_lista_Item(Citizen * item, int position) { ListNode * tmp, * tmp2; int i; ...
TOOL
0.918475
3.916816
189be2f2-9126-4e1f-a8d7-f52b9da06e37
Pranaydavath/LeetCode
0080-remove-duplicates-from-sorted-array-ii/0080-remove-duplicates-from-sorted-array-ii.cpp
class Solution { public: int removeDuplicates(vector<int>& v) { int n=v.size(); int ct=0; unordered_map<int,int>mp; for(int i=0;i<n;i++)mp[v[i]]++; for(int i=0;i<n;i++){ if(mp[v[i]]<=2){ v[ct++]=v[i]; mp[v[i]]-=1; ...
ALGO
0.999821
6.016619
4fb08488-9309-4878-98bc-5e1196595f61
wol101/GaitSym2019
ode-0.15/contrib/TerrainAndCone/dTerrainZ.cpp
//Benoit CHAPEROT 2003-2004 www.jstarlab.com //some code inspired by Magic Software #include <ode/common.h> #include <ode/collision.h> #include <ode/matrix.h> #include <ode/rotation.h> #include <ode/odemath.h> #include "collision_kernel.h" #include "collision_std.h" #include "collision_std_internal.h" #include "collisi...
ALGO
0.982163
4.252173
2e051aee-110c-4ea8-85c7-7f2f4fe8ceb6
LumenVestige/EnchenSolutions
leetcode/[1504]-numSubmat.cpp
// // Created by sanenchen on 25-8-20. // #include <bits/stdc++.h> using namespace std; bool check(int x1, int y1, int x2, int y2, int target) { // 计算理论数字 int need = (y2 - y1 + 1) * (x2 - x1 + 1); return need == target; } int numSubmat(vector<vector<int> > &matrix) { if (matrix.empty() || matrix[0].em...
ALGO
0.99993
4.773322
95cf0bc2-74c6-4225-8b68-c439fd899ff2
nayan-dubey-14/Leetcode_Solution
1657-find-the-winner-of-an-array-game/1657-find-the-winner-of-an-array-game.cpp
class Solution { public: int getWinner(vector<int>& arr, int k) { if(k>=arr.size()) return *max_element(arr.begin(),arr.end()); int count=0; int result; int e=0; int i=1; int size=arr.size(); while(1) { if(arr[e%size]>arr[i%size]) ...
ALGO
0.999997
5.288266
b93e47af-faba-4d60-af37-7dcb6ef78c74
mmatrosov/FKN2020
preliminary/E/33920674.cpp
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #define pb push_back #define pi pair<int, int> #define l first #define r second using namespace std; bool is_digit(char c) { return ('0' <= c && c <= '9'); } bool is_letter(char c) { return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z'); } bool is_cor...
ALGO
0.999918
4.273165
5cdcdc39-a4e0-4c82-8a2c-690a79fd61b1
Shrouk2000/Assignment1_Flutter
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998762
6.786404
f7617396-2a5d-48e3-832d-65a82a6a20cb
devnjw/Algorithms
BaekJoon/Silver/LCM-GCM.cpp
#include <iostream> using namespace std; int main(){ int num1, num2; cin >> num1 >> num2; int lcm = num1; int gcm = num1; while(num1%lcm!=0 || num2%lcm!=0) lcm--; while(gcm%num1!=0 || gcm%num2!=0) gcm++; cout << lcm << "\n" << gcm; return 0; } // 신기한 답안 // #include <stdio.h> // // int gc...
ALGO
0.99998
4.079515
2784e913-3094-4aaa-a295-3837eb59a11a
adityasrathore/Codes
LeetCode/771. Jewels and Stones.cpp
class Solution { public: int numJewelsInStones(string jewels, string stones) { unordered_map <char,int> mp; int count=0; for(int i=0;i<stones.length();i++) mp[stones[i]]++; for(int i=0;i<jewels.length();i++) count+=mp[jewels[i]]; return count;...
ALGO
0.999327
5.895409
79b01eef-a554-44dd-bc99-c7da3c1520fd
Cyrus2D/FormationChallengeTeam
agent2d-3.1.1/src/bhv_set_play.cpp
// -*-c++-*- ///////////////////////////////////////////////////////////////////// #ifdef HAVE_CONFIG_H #include <config.h> #endif #include "bhv_set_play.h" #include "strategy.h" #include "bhv_goalie_free_kick.h" #include "bhv_set_play_free_kick.h" #include "bhv_set_play_goal_kick.h" #include "bhv_set_play_kick_of...
ALGO
0.908855
5.970897
5b283bca-2473-4d51-97cf-d8d9903b4538
samyak1409/face-360-capsule-solutions
Stage 6/2. Test your skill/4) Remove character except alphabets.cpp
/* In a blind organization, they were playing the typing a keyword game and they want to correct the form of the word. So help them to by writing a program to remove all special symbols and print the characters of a string. Input & output Format: Input consists of a string. Assume the maximum length of the string is 2...
ALGO
0.995978
4.487598
370f96e9-3db4-44cc-be14-dc81344ae2ec
devCharlieP/PS_Baekjoon
11729/소스.cpp
#include <iostream> #include <algorithm> #include <vector> #define endl "\n" using namespace std; int cnt(int n) { if (n == 1) { return 1; } return 2 * cnt(n - 1) + 1; } void hanoi(int a, int b, int n) { if (n == 1) { cout << a << " " << b << " " << endl; return; } hanoi(a, 6 - a - b, n - 1); cout <...
ALGO
0.999902
4.09806
d584451d-bb91-4e18-bf94-60e6fbc1c1fa
alexandraback/datacollection
solutions_1485490_0/C++/Empty007/box.cpp
#include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> #include <cstring> #include <map> using ...
ALGO
0.999971
3.816901
b90a95bf-7e92-470a-b5d0-dcf24ba4efa1
hemangdtu/leetcode_solutions
Arrays/Single_Number_III.cpp
class Solution { public: vector<int> singleNumber(vector<int>& nums) { unordered_map<int, int> freq; for(auto i : nums) freq[i]++; vector<int> result; for(auto i : freq) if(i.second == 1) result.push_back(i.first); return result; } ...
ALGO
0.999958
5.502461
af6d5c8d-be7d-4c5e-a672-59a8f3ed6db5
Saran-sama/leetcode-solutions
Binary_Tree_Level_Order_Traversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999962
6.260798
8db468f3-9c11-44d3-a11a-ab742b19bb3c
PrachieNaik/DSA
DP/UnboundedKnapSack/CoinChange.cpp
/* Problem statement: Given a value N, find the number of ways to make change for N cents, if we have infinite supply of each of S = { S1, S2, .. , SM } valued coins. Input: m = 4 , n = 3 S[] = {1,2,3} Output: 4 Explanation: Four Possible ways are: {1,1,1,1},{1,1,2},{2,2},{1,3}. Approch: This problem is variation o...
ALGO
0.999996
5.475957
50de8945-cdeb-4ea2-a71e-79dbfebecab5
xian-wen/pat
Basic/PAT_B1012 digital_sort.cpp
/* 1012. 数字分类 (20) 时间限制:100ms 内存限制:64MB 代码长度限制:16KB 题目描述: 给定一系列正整数,请按要求对数字进行分类,并输出以下5个数字: A1 = 能被5整除的数字中所有偶数的和; A2 = 将被5除后余1的数字按给出顺序进行交错求和,即计算n1-n2+n3-n4...; A3 = 被5除后余2的数字的个数; A4 = 被5除后余3的数字的平均数,精确到小数点后1位; A5 = 被5除后余4的数字中最大数字。 输入格式: 每个输入包含1个测试用例。每个测试用例先给出一个不超过1000的正整数N,随后给出N个不超过1000的待分类的正整数。数字间以空格分隔。 输出格式: 对给定的N个...
ALGO
0.998844
3.41419
01510f0b-5043-4b78-9b7d-4a6a210727ed
er-chetan/Complete_DSA
leetcode/22-generateParanthesis.cpp
#include<iostream> using namespace std; void generate(string s,int open,int close,int n){ if(close==n){ cout<<s<<endl; return; } if(open<n){ generate(s+'(',open+1,close,n); } if(close<open){ generate(s+')',open,close+1,n); } } int main(){ int n=3; generate("",0,0,n); return 0; }
ALGO
0.999785
3.975787
ba7c53b4-e94e-4174-bc6c-6047bef2897f
ishandutta2007/codeforces
gepardo/normal/650/D.cpp
#include <cstdio> #include <algorithm> #include <iostream> #include <map> #include <vector> using namespace std; const int inf = 123456789; int getInt() { int n; scanf("%d", &n); return n; } vector<int> getVectorInt(int n) { vector<int> v; for (int i = 0; i < n; i++) v.push_back(getInt()); r...
ALGO
0.999988
4.296568
e8f57170-49ec-47ed-a7d6-2c7f1e8ea81f
RyotaroAbe45123/cpp-sandbox
workspace/3/2/2-3.cpp
#include <iostream> using namespace std; int cnt = 1000; int func1() { return 2020; } int func2(int pos) { cnt += 1; return cnt + pos; } int main() { int a, b; cin >> a >> b; cout << max(a, b) << endl; cout << min(a, b) << endl; cout << func1() << endl; cout << func2(500) << endl;...
ALGO
0.99477
3.736955
a35edb46-927b-49fb-a06b-9110c01a8efa
absolutePi/Competitive_Programming
POSN/AtCoder/knapsack1.cpp
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 1e5+5; int w[N],v[N],dp[N]; signed main(){ int n,k; cin >> n >> k; for(int i=0;i<n;i++){ cin >> w[i] >> v[i]; } for(int i=0;i<n;i++){ for(int j=k;j>=w[i];j--){ dp[j]=max(dp[j],dp[j-w[...
ALGO
0.999971
3.913049
1d115b3c-64e0-4630-9946-8734344798e0
EluvK/planetx_client
windows/runner/utils.cpp
#include "utils.h" #include <flutter_windows.h> #include <io.h> #include <stdio.h> #include <windows.h> #include <iostream> void CreateAndAttachConsole() { if (::AllocConsole()) { FILE *unused; if (freopen_s(&unused, "CONOUT$", "w", stdout)) { _dup2(_fileno(stdout), 1); } if (freopen_s(&unuse...
TOOL
0.998733
6.76775
b21c3969-c877-465d-bc67-a8d9c486089a
778477/LeetCode
00657. Judge Route Circle.cpp
#include <math.h> #include <stdio.h> #include <cstdlib> #include <set> #include <map> #include <list> #include <queue> #include <stack> #include <bitset> #include <vector> #include <string> #include <unordered_map> #include <sstream> #include <iostream> #include <algorithm> #include <functional> using namespace std; ...
ALGO
0.999935
5.482777
373b9ae9-c191-452b-953f-57ab7010cc9c
windhooked/MinutiaCylinderCode
commons/Munkres.cpp
#include "Munkres.h" #include <iostream> #include <cmath> bool Munkres::find_uncovered_in_matrix(double item, int &row, int &col) { for ( row = 0 ; row < matrix.rows() ; row++ ) if ( !row_mask[row] ) for ( col = 0 ; col < matrix.cols() ; col++ ) if ( !col_mask[col] ) if ( matrix(row,col)...
ALGO
0.999873
4.571428
1185af88-c516-432a-8dec-c592256020ae
ishandutta2007/codeforces
maksim1744/normal/1220/A.cpp
/* author: Maksim1744 created: 18.09.2019 19:05:55 */ #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define mp make_pair #define pb push_back #define eb emplace_back #define sum(a) ( accumulate ((a).begin(), (a).end(), 0ll)) #define mine(a) (*mi...
ALGO
0.999897
3.743521
bbfdebeb-a118-4cde-8224-cbb915c7dde3
pacha2880/competitive_programming_codes
Atwin.cpp
#include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // #include <ext/rope> #define mp make_pair #define pb push_back #define all(a) (a).begin(), (a).end() #define sz(a) (int)a.size() #define eq(a, b) (fabs(a - b) < EPS) #define md(a, b) ((a) % b +...
ALGO
0.999988
4.169778
c0f90619-d168-4bee-a521-f1582a3f7f44
QbitQuantum/Basics
Исходники/modelrenderer.cpp
void ShaderModelRenderer::Render(const RenderModifierPtr& modifier, const CShaderDefines& context, int cullGroup, int flags) { if (m->submissions[cullGroup].empty()) return; CMatrix3D worldToCam; g_Renderer.GetViewCamera().m_Orientation.GetInverse(worldToCam); /* * Rendering approach: * * m->submissions ...
TOOL
0.885773
7.043771
f48a4e42-671d-4129-9c8b-7058bbbdd02f
nogizakapython/dotnet
paiza_cplussample1.cpp
#include <iostream> using namespace std; int main(void){ // 自分の得意な言語で // Let's チャレンジ!! string str1,str2; cin >> str1; cin >> str2; if(str1 == str2){ cout << "OK" << endl; } else { cout << "NG" << endl; } return 0; }
ALGO
0.999699
3.669251
63e01deb-3613-4665-930f-72172fc6d7e6
gitlijian/backend
C++PrimerSrc/Chapter 7/calling.cpp
// calling.cpp -- defining, prototyping, and calling a function #include <iostream> void simple(); // function prototype int main() { using namespace std; cout << "main() will call the simple() function:\n"; simple(); // function call cout << "main() is finished with the simple() function.\n"; ...
TOOL
0.856061
5.606388
ae684ea3-3743-477c-8094-71e6d6aa7c21
acidentally/cplusplus
ntucoder/ntucoder_MAXXOR.cpp
/* Good luck for those who are trying your best May the most glorious victory come Code by : acident / lckintrovert Literally the worst cp-er ever */ #include <bits/stdc++.h> using namespace std; #define int long long #define uint unsigned long long #define dub double #define fi first #define se secon...
ALGO
0.999994
4.56322
6cd9d940-8af6-44fb-8d60-eec7f113115b
alexanderhelbok/Clock
src/Calc.cpp
#include <iostream> #include "Calc.h" int TimeCorrection(double time, double speed){ // offset = steps/1sec, time in secs, speed in clock secs/real sec int i; double sum = 0; if (time <= 21276){ for (i = 0; i < 11; ++i){ sum += time/pow(speed,i); // printf("%.5...
ALGO
0.970851
3.603331
6ac647b3-e284-4c50-b1c9-bf71dd069267
Kim-Ziho/codetree-TILs
240413/코드트리 메신저/codetree-messenger.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; int p[100001]; int a[100001]; int val[100001]; bool is_off[100001]; int num[100001][21]; int n; int q; void print_all() { cout << "p : "; for (int i = 1; i <= n; i++) cout << p[i] << ' '; cout << endl; cout << "a :...
ALGO
0.996979
4.111588
effb1d91-72e0-40e8-9513-90562fc5f448
WangSimiao2000/GAMES101-Assignments
opencv/sources/modules/gapi/src/compiler/passes/helpers.cpp
#include "precomp.hpp" #include <algorithm> // copy #include <unordered_map> #include <unordered_set> #include <ade/util/filter_range.hpp> #include <opencv2/gapi/own/assert.hpp> // GAPI_Assert #include "compiler/passes/helpers.hpp" namespace { namespace Cycles { // FIXME: This code is taken directly from AD...
ALGO
0.982711
7.659398
fa4e49f3-3aab-4b1f-9903-c8e659898d9a
gkulkarn82/datastructure
STL/multiset.cpp
/* 1. multiset can have duplicate objects 2. it is implemented using red black tree 3. insertion , deletion and searching have logn complexity 4. for user defined data types we need to implement comparator function 5. we can pass order of sorting whule constructing set objects 6. contains sorted...
ALGO
0.986755
4.860352
76456840-e8e8-4f0a-9eb4-272f996dd641
ianloic/unladen-swallow
Util/llvm/lib/Transforms/Scalar/ConstantProp.cpp
#define DEBUG_TYPE "constprop" #include "llvm/Transforms/Scalar.h" #include "llvm/Analysis/ConstantFolding.h" #include "llvm/Constant.h" #include "llvm/Instruction.h" #include "llvm/Pass.h" #include "llvm/Support/InstIterator.h" #include "llvm/ADT/Statistic.h" #include <set> using namespace llvm; STATISTIC(NumInstKill...
TOOL
0.89891
7.791518
a08634c4-1a35-484f-8a16-74cff16ccf94
Ravi-kumar178/C--
fancyPattern.cpp
#include<iostream> using namespace std; int main(){ cout<<"Print Fancy Pattern"<<endl; int rowCount; cout<<"Enter the number of rows: "; cin>>rowCount; for(int row = 0; row < rowCount; row = row+1){ for(int col = 0; col < row; col = col+1){ cout<<(row+1)<<"*"; } cout<<row+1; cout<<endl...
ALGO
0.996297
3.637336
2fae95fd-2e5f-489c-ae80-bc3eb895548c
HBat11233/hbat_code
cpp/acm/cqu_2018_summer_seven_day/poj_3276.cpp
#include <iostream> #include <cstdio> #include <cstring> #define INF 100005 using namespace std; bool pk[5005]; int main() { #ifdef DEBUG freopen("out.txt","w",stdout); #endif // DEBUG int n; while(~scanf("%d",&n)) { for(int i=0;i<n;++i) { char ch; getchar(); ...
ALGO
0.999508
3.016976
a71da87e-3959-4072-9d47-46e5042923ce
Raphalsk050/ProEngine
ProEngine/ThirdParty/boost/libs/graph/example/quick_tour.cpp
#include <boost/config.hpp> #include <iostream> // for std::cout #include <utility> // for std::pair #include <algorithm> // for std::for_each #include <boost/utility.hpp> // for boost::tie #include <boost/graph/adjacency_list.hpp> #include <boost/graph/graphviz.hpp> using namespace boost; template < class Graph > st...
ALGO
0.998107
6.725
cf112036-95c3-41d8-b8fc-ba90d54d8245
leeguandong/sd_webui_powerpaint
mmcv/ops/csrc/parrots/convex_iou.cpp
void convex_iou_impl(const Tensor pointsets, const Tensor polygons, Tensor ious) { DISPATCH_DEVICE_IMPL(convex_iou_impl, pointsets, polygons, ious); } void convex_iou(const Tensor pointsets, const Tensor polygons, Tensor ious) { convex_iou_impl(pointsets, polygons, ious); } void convex_giou_i...
ALGO
0.982253
5.429506
26b2e432-80fa-4909-a839-d3f369b7ff8c
lylalala/leetcode
H_126_Word_Ladder_II_DFS_Time_Limit.cpp
inline int abs(char num1,char num2){return (num1==num2)?0:1;} struct node{ string word; int posOld; int posNew; vector<int> posFather; int depth; node(string w,int pO,int pN,int d):word(w),posOld(pO),posNew(pN),depth(d){}; }; class Solution { typedef unordered_set<string>::iterator ite; publ...
ALGO
0.999993
5.183364
c0c4d933-027a-4f92-a3a2-44ae5b56f0b4
llvm-git-prototype/llvm
llvm/lib/Transforms/Scalar/BDCE.cpp
#include "llvm/Transforms/Scalar/BDCE.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/DemandedBits.h" #include "llvm/Analysis/GlobalsModRef.h" #include "llvm/Transforms/Utils/Local.h" #include "llvm/IR/InstIterator.h" #include "llvm/IR/Instr...
ALGO
0.955077
7.960694
01eec993-53ba-4c1a-92ea-ce592f3397ce
igoingdown/leetcode
interviews/002-internet/hulu/shortest_substring_with_all_character.cpp
#include <iostream> #include <string> using namespace std; string shortestSubstringWithAllCharacters(string &s); int main() { return 0; } // 给定一个字符串,找到包含该字符串所有字符的最短子串 // leetcode 76的简化版 string shortestSubstringWithAllCharacters(string &s) { vector<int> freq(256), aMap(256); int min_start = 0, min_len = s.size(),...
ALGO
0.999972
5.225131
ec2ff9d9-0bdd-4a22-aae9-c8c01e393d41
CodeJeet2005LIKHITH/CP31-900
A_Design_Tutorial_Learn_from_Math.cpp
#include<bits/stdc++.h> using namespace std; void solve(){ int n; cin>>n; if(n%2 == 0){ cout<<4<<" "<<n-4; } else{ cout<<9<<" "<<n-9; } } int main(){ solve(); }
ALGO
0.999796
3.89936
60c1e087-dd04-4666-ab01-f2877417be12
rimo02/Leetcode
Binary Saerch/find_median_in_a_row_wise_sorted_matrix.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int median(vector<vector<int>> &matrix, int R, int C) { // code here int low = INT_MAX, high = INT_MIN; for (int i = 0; i < R; i++) { low = min(low, matrix[i][0]); high = max(high, matr...
ALGO
0.999978
5.416778