uuid
string
repo_name
string
relative_path
string
content
string
category
string
algo_rel_score
float64
quality_score
float64
dde2a556-f4c1-441b-bda1-5ad8b007ccc4
ishandutta2007/codeforces
hualian/normal/10/E.cpp
#include<bits/stdc++.h> #define int long long #define For(i,a,b) for(int i=a,i##end=b;i<=i##end;i++) #define Rof(i,a,b) for(int i=a,i##end=b;i>=i##end;i--) #define rep(i, b) for(int i=1,i##end=b;i<=i##end;i++) using namespace std; const int inf=1e18; const int N=1e3+9; //char buf[(1<<21)+5],*p1,*p2; //#define getchar(...
ALGO
0.999971
3.005863
9261e937-987e-4c2c-9d02-666d4b1606d5
progof/pocketchain
src/qt/transactionfilterproxy.cpp
#include "transactionfilterproxy.h" #include "transactiontablemodel.h" #include "transactionrecord.h" #include <cstdlib> #include <QDateTime> // 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 (...
TOOL
0.907077
6.699477
920a0760-96b4-431e-aabd-dffdd44743f5
hkathome/CP_solutions
At368A.cpp
#include <iostream> #include <algorithm> #include <cassert> #include <queue> #include <stack> #include <set> #include <map> #define ull unsigned long long #define lld long double #define ll long long #define pb push_back #define pii pair<int,int> #define pll pair<ll,ll> #define ff first #define ss second #define all(...
ALGO
0.999955
4.302266
9e0268c5-6fc4-4491-b112-e37252bd0018
ou3slati/competitive-programming
Implementations/Codeforces/Training/642/E.cpp
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #define boost ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0) typedef string str; typedef long long ll; #define int ll typedef double db; typedef long double ld; typedef pair<int,int> pi; #define fi first #define se second typedef vec...
ALGO
0.999946
4.361399
da4aa3da-1c1a-4861-b90c-7766b2bc7404
Tianzhengshuyuan/llamacpp_with_annotation
pocs/vdot/q8dot.cpp
#include <cstdio> #include <type_traits> #include <vector> #include <random> #include <chrono> #include <cstdlib> #include <cmath> #include <cassert> #include <cstring> #include <array> #include <type_traits> #include <ggml.h> constexpr int kVecSize = 1 << 16; // Copy-pasted from ggml.c #define QK4_0 32 typedef stru...
TEST
0.943301
6.087335
4eb89173-7c11-4c59-af48-fe1cbdb7768a
LeoJY/Leetcode
441_Arranging_Coins.cpp
//441. Arranging Coins //You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins. //Given n, find the total number of full staircase rows that can be formed. //n is a non-negative integer and fits within the range of a 32-bit signed integer. #include <iostr...
ALGO
0.999762
5.444641
a640e037-728d-4116-8784-efb84c01edf8
Hong-kee/Problem-Solving
AlgorithmProject/BaekJoon2504.cpp
#include <iostream> #include <string> #include <stack> using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); string bracket; cin >> bracket; stack<char> s; int answer = 0, standardAnswer = 1; bool flag = false; for (int i = 0; i < bracket.length(); i++) { if (bracket[i] == '('...
ALGO
0.999469
4.400095
9c8c20d7-e42e-4906-9adb-98900142566b
adityasrathore/Codes
LeetCode/2551. Put Marbles in Bags.cpp
We need to find the maximum and minimum weights [Acc. to the criteria] and return the difference. Point to observe, the element left and right to the partition would always be included. Example: 1 2 3 4 5 6 7 8 9 , k =3 1 2 3 | 4 5 6 7 | 8 9 , (1+3) + (4+7) + (8+9). Notice that start and end would always be the part of...
ALGO
0.999974
5.262097
b95eb930-2122-4768-b5af-49369b22cd06
ishandutta2007/codeforces
wild_hamster/normal/716/C.cpp
#include <iostream> #include <cmath> #include <algorithm> #include <vector> #include <cstring> #include <deque> #include <stack> #include <stdio.h> #include <map> #include <set> #include <time.h> #include <string> #include <fstream> #include <queue> #include <bitset> #include <cstdlib> #define X first #define Y second ...
ALGO
0.999419
3.452442
eb775414-e4ba-41fc-9d88-a844c5121970
u-wyh/luogu-code
P1640.cpp
#include<bits/stdc++.h> using namespace std; const int MAXN = 1e6+5; const int MAXM = 1e4+5; int n; int fa[MAXM]; int edge[MAXM]; inline int read(){ int x=0,f=1; char ch=getchar(); while(ch<'0'||ch>'9'){ if(ch=='-') f=-1; ch=getchar(); } while(ch>='0' && ch<='9') ...
ALGO
0.99986
4.093029
a6b8388d-2eac-4bd9-ad47-20f715295002
DangerousCactus/cses
apple_division.cpp
#include <bits/stdc++.h> #define rep(i, a, b) for(int i = a; i < (b); ++i) #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; int main() { cin.tie(0)->sync_with_stdio(0); int n; cin >> n; vector<ll> a...
ALGO
0.999885
4.235626
78663fd9-38e2-46b0-8e72-6e8aaefc01e5
intellistream/CANDOR-Benchmark
thirdparty/faiss/faiss/impl/NSW.cpp
// -*- c++ -*- #include <algorithm> #include <faiss/impl/NSW.h> #include <omp.h> #include <string> #include <unordered_map> #include <faiss/impl/AuxIndexStructures.h> #include <faiss/impl/DistanceComputer.h> #include <faiss/impl/IDSelector.h> #include <faiss/utils/prefetch.h> #include <faiss/impl/platform_macros.h> ...
ALGO
0.999815
7.233687
0811a9db-4e2a-43f1-b766-7e12a16ba874
ishandutta2007/codeforces
marckess/normal/1427/E.cpp
#include <bits/stdc++.h> #define endl '\n' #define fi first #define se second #define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k)) #define forn(i,n) for (int i = 0; i < (n); i++) #define forr(i,a,b) for (int i = a; i <= b; i++) #define all(v) v.begin(), v.end() #define pb push_back using namespace std; typedef long long ...
ALGO
0.999976
3.503934
95b0e161-45cc-4199-bff7-9a9985038d26
zqchen90/leetcode
merge-intervals/merge-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) {} * }; */ class Solution { public: vector<Interval> merge(vector<Interval> &intervals) { if (intervals.size() <= 1) { return i...
ALGO
0.999997
5.963368
2833ddf6-23c3-43e0-ae91-05211731f974
andrewqt/Competitive-Programming
CodeForces/_1136_E_NastyaHasntWrittenALegend/_1136_E_NastyaHasntWrittenALegend.cpp
#include <bits/stdc++.h> using namespace std; struct Node{ int l, r; long long b, t, mx, lzy; bool haslzy; }; int N, Q; Node seg[400005]; long long pre[400005]; long long arr[400005]; void pu(int idx){ seg[idx].b = seg[2*idx].b + seg[2*idx+1].b; seg[idx].t = seg[2*idx].t + seg[2*idx+1].t; se...
ALGO
0.999981
4.103511
c9eecb68-3bc6-4cbc-8b5a-1353b9ae14eb
KartavyaKothari/hawkeye_batch_cpp
arrow11/coin_change.cpp
#include<bits/stdc++.h> using namespace std; #define DP unordered_map<int, unordered_map<int,int>> bool find_keys(DP &dp, int key1, int key2){ return dp.find(key1) != dp.end() && dp[key1].find(key2) != dp[key1].end(); } int coin_change(vector<int> &coins, int idx, int sum, DP &dp){ if(sum == 0) return 1; ...
ALGO
0.999871
5.264899
3a13e028-8e05-4ce1-88b2-fb723b7fe308
makaimann/prophic3
mathsat/examples/extsat/main.cpp
#include "mathsat.h" #include "msatminisat.h" #include "msatcleaneling.h" #include <stdio.h> #include <string.h> typedef enum { DPLL_MINISAT, DPLL_CLEANELING, DPLL_ERROR } dpll_engine; dpll_engine get_engine(int argc, const char **argv) { if (argc != 2) { return DPLL_ERROR; } if (strcm...
ALGO
0.998909
6.085302
c348572f-a49b-4c74-ab2e-c0b46219539d
HuangStomach/leetcode
301-400/382.cpp
/** * 382. 链表随机节点 * 给你一个单链表,随机选择链表的一个节点,并返回相应的节点值。每个节点 被选中的概率一样 。 * 实现 Solution 类: * Solution(ListNode head) 使用整数数组初始化对象。 * int getRandom() 从链表中随机选择一个节点并返回该节点的值。链表中所有节点被选中的概率相等。 */ #include <random> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {}...
ALGO
0.999595
5.176438
83f1ad32-2c61-4b91-a407-57634123705f
AIABHISHEK/DataStructureAndAlgo_Problems
recursion/subset_sum.cpp
#include <bits/stdc++.h> #define ll long long int #define int_ unsigned int using namespace std; // find the sum of all subsets of given array void subsetSum(int i, vector<int> arr, vector<int> &v, int sum) { if (i >= arr.size()) { v.push_back(sum); return; } subsetSum(i + 1, arr, v,...
ALGO
0.99981
4.442599
3ef27d53-a326-4659-a3a7-1dfc484d7009
2k0ri/atcoder-workspace
abc164/E/main.cpp
// clang-format off #include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; #define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i) #define rep1(i,n) for(ll i=1, i##_len=(n); i<=i##_len; ++i) #define rrep(i,n) for(ll i=n-1; i>=0; --i) #define rrep1(i,n) for(ll i=n; i>0; --i) #defin...
ALGO
0.997546
3.811783
fc9ac4ee-4d65-4966-b2c3-fcc4610ce2c9
Rishi-11-2/CP
C_Contrast_Value.cpp
#include <bits/stdc++.h> using namespace std; #define all(v) (v).begin(), (v).end() void solve(); int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; cin >> t; while (t--) { solve(); } } void solve() { int n; cin >> n; int arr[n + 1]; ...
ALGO
0.999938
4.456057
20363055-bf16-4061-9519-4f4c371cfb2a
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Gemma/top0-100/find-number-of-ways-to-reach-the-k-th-stair-Solution.waysToReachStair/177827_nan.cpp
static struct posix_acl *jffs2_get_acl(struct inode *inode, int type) { struct jffs2_inode_info *f = JFFS2_INODE_INFO(inode); struct posix_acl *acl; char *value = NULL; int rc, xprefix; switch (type) { case ACL_TYPE_ACCESS: acl = jffs2_iget_acl(inode, &f->i_acl_access); if (acl != JFFS2_ACL_NO...
ALGO
0.905225
3.200946
7c0feb5b-bed0-4f9e-b7a2-77cd68ae82a2
gtkn/atcoder
ABC_292_E_2.cpp
//title #include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; #define rep(i,n) for (ll i = 0; i < (n); ++i) #define rep1(i,n) for (ll i = 1; i <= (n); ++i) #define repr(i,n) for (ll i = (n)-1; i >= 0; --i) #define rep1r(i,n) for (ll i = (n); i > 0; --i) #define bit(n,k) ((n>>k)&1...
ALGO
0.999891
4.479226
20df0ce7-ca48-4cc0-9f83-4a6373a47648
wishescsnow/Competitive-Programming
Chapter 4 Graph/Minimum Spanning Tree/Standard/11733.cpp
/*input 3 4 4 100 1 2 10 4 3 12 4 1 41 2 3 23 5 3 1000 1 2 20 4 5 40 3 2 30 5 5 10 1 2 3 2 3 5 3 4 13 3 5 2 5 4 13 */ #include <iostream> #include <algorithm> #include <vector> using namespace std; typedef vector<int> vi; typedef pair<int, int> ii; vector<pair<int, ii> > EdgeList; class UnionFind{ private: vi p, rank...
ALGO
0.999661
4.173144
926892bf-f454-4cbb-8599-d7c1f088c0ce
hjiang13/LLMs-in-IR
POJ-104/2/542.cpp
#include <iostream> using namespace std; struct a { int number; char author[26]; } b[100]; int main() { int L[26]={ 0} ; int n=0; int max=0; int p=0; cin>>n; for(int i=0; i<n; i++) { cin>>b[i].number; cin>>b[i].author; for(int j=0; b[i].author[j]!='\0'; j++) L[b[i].author[j]-'A']++; } for(int i=0; i<26; i++) if(max<L[i...
ALGO
0.99989
3.249153
bbe771a2-e0ed-4b8d-8157-499a3dd2d858
Joaquim-Moreau/GameOfLife
src/evolution.cpp
#include "Engine.h" int Engine::getNumberNeighbour(Vector2i tileID) { /* * @return int * * Returns the number of neighbours of the given tile * If the tile is on the edge of the window, we consider the non-existing neighbours as dead */ int numberNeighbour = 0; // top left if...
ALGO
0.959423
5.234297
64cb4067-0c65-4fdc-8d3d-3439ec3ba23b
giovannyortegon/LinuxSystemProgramming
CPP/CPP-OOP/Chap-04/Chp4-Ex7.cpp
#include<iostream> using namespace std; int main() { int * ptr = new int; *ptr = 20; int *&refPtr = ptr; // establish a reference to a pointer cout <<*ptr <<" " <<*refPtr <<endl; return (0); }
TOOL
0.886922
3.141416
f3bca598-9444-4a20-a5f2-9d54bddc0439
manikanta2901/ubuntu
.history/codingChallenges/cpp/Codechef/longChallenges/Year2021/January/EncodedString_20210101213106.cpp
#include<bits/stdc++.h> #include<vector> #include<iostream> #include<cmath> #include<algorithm> #include<iterator> #include<string> #include<map> #define vv vector #define F first #define S second #define MP make_pair #define EXECUTE_FASTER ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #define printM...
ALGO
0.99992
3.260777
c25626a9-23c0-4b2d-bb3d-6b696a9b2f43
sonalibante/ORE
QuantLib/ql/pricingengines/barrier/fdblackscholesrebateengine.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ #include <ql/exercise.hpp> #include <ql/pricingengines/barrier/fdblackscholesrebateengine.hpp> #include <ql/methods/finitedifferences/solvers/fdmblackscholessolver.hpp> #include <ql/methods/finitedifferences/utilities/fdminnervaluecalculat...
ALGO
0.998477
7.437186
41cb02e2-7c67-4a77-a2c6-773403d25d21
JeongGoEun/algorithm_study
Programmers/NQueen.cpp
#include <string> #include <vector> #include <iostream> using namespace std; int N, ans; int map[13]; void printf() { for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { cout << map[i][j] << " "; } cout << endl; } } bool isPossible(int y, int x) { //0~y for (...
ALGO
0.999906
4.328127
5adb7caf-bb1c-4fae-842a-54f53794238e
Hadi-susant0/Algo22
laporan 12 (fungsi_nilai_balik)/latihanKelas1.cpp
#include<iostream> using namespace std; int tambah (int bil1, int bil2){ return bil1 + bil2; } int main(){ int a,b,c; cout<<"Masukkan a: ";cin>>a; cout<<"Masukkan b: ";cin>>b; cout<<"Hasilnya: "<<tambah(a,b)<<endl; c = tambah(a,b) + 5; cout<<"Nilai c: "<<c<<endl; return 0; }
TOOL
0.989017
3.946905
90aee838-bc2d-4e9c-aa9e-8fe289d9fda9
thanh4235/c
14DHTH10-51-TranQuangThanh/14DHTH10-2001230891-TranQuangThanh/test2.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> // Cấu trúc dữ liệu bệnh nhân typedef struct { int maBenhNhan; char hoTen[100]; int namSinh; } BenhNhan; // Cấu trúc node trong hàng đợi typedef struct Node { BenhNhan data; struct Node* next; } Node; // Cấu trúc hàng đợ...
ALGO
0.992425
5.345085
9cae1ee5-88cd-4f5b-9feb-e2dfe9146bae
asheeshkumar12/Hackerrank_Practice
maximum_element on stack.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); /* * Complete the 'getMax' function below. * * The function is expected to return an INTEGER_ARRAY. * The function accepts STRING_ARRAY operations as parameter. */ // int findMax(stack<int> st){ // prio...
ALGO
0.999644
5.54616
616701d4-6694-4cc6-9f75-64a1a9b61273
JustJie2002/Leetcode
Contest/W399/B.cpp
/******************************************** * author : Jie Chen (3rd Year CS) * school : Rochester Institute of Technology * created: 05.25.2024 23:02:57 *********************************************/ using i64 = long long; class Solution { public: string compressedString(string s) { s += '0'; ...
ALGO
0.999997
6.333458
66343b00-a52e-4ceb-81db-32405cbeba6c
gauravrana05/ProblemsDaily
gaurav/Coding/2024/Codeforces/Round 894/B_Sequence Game.cpp
#include<iostream> #include<vector> #include<cmath> #include<algorithm> #include<stack> #include<map> #include<set> #define bint long long int #define pb push_back #define mp make_pair #define ff first #define ss second #define mod 1000000007 #define inf 1000000000 #define pi 3.141592653589793 #define br cout<<endl; #d...
ALGO
0.999924
4.081159
54ea8de8-9ecb-4fb5-95d7-08dfd629c658
goverclock/algorithm
Algorithm/ProblemSet/Problem_A.cpp
#include <cmath> #include <cstdlib> #include <cstring> #include <iostream> using namespace std; #define ESP 1e-10 struct list { double num; char c; int ded; list* next; }; typedef struct list* Stack; double fuction(char a[]); int Tranfer(char a[], int i); double top(Stack s); void push(double x, Stack...
ALGO
0.999899
3.570882
57d58c64-817a-4945-87ce-6654f0bbb668
I-RoshanKumar/Beginner_Hactoberfest2022
Data Structure/recursion/printallper.cpp
#include<iostream> using namespace std; void permutation(string s, string ans){ if (s.length()==0) { cout<<ans<<endl; return ; } for (int i = 0; i < s.length(); i++) { char ch = s[i]; string ros = s.substr(0,i)+ s.substr(i+1); permutation(ros, ans+ch); ...
ALGO
0.999965
4.491096
a815ae94-707a-4d24-963b-0f35fedb61ef
MisterBi20/DSCodeC
顺序表/1.5.1&&1.5.2寻找第k小的数.cpp
#include "stdio.h" #define MaxSize 50 typedef struct { int data[MaxSize]; int length; }SqList; void InitList(SqList &L){ L.length=0; } bool ListInsert(SqList &L,int i,int e){ if(i<1||i>L.length+1) return false; if(L.length>=MaxSize) return false; for (int j = L.length; j >=i ;...
ALGO
0.999995
3.651302
0d5de0f1-93e2-46c2-ac6f-8fad2ced780a
Snektron/Oxybelis
3rdparty/noise/module/terrace.cpp
#include "../interp.h" #include "../misc.h" #include "terrace.h" using namespace noise::module; using namespace noise; Terrace::Terrace (): Module (GetSourceModuleCount ()), m_controlPointCount (0), m_invertTerraces (false), m_pControlPoints (NULL) { } Terrace::~Terrace () { delete[] m_pControlPoints; } ...
ALGO
0.99176
6.656769
77578ba2-c9ee-4d03-88f8-41f448166637
Georoge14/HienBao
modules/misc/medialibrary/fs/directory.cpp
#ifdef HAVE_CONFIG_H # include "config.h" #endif #include "directory.h" #include "file.h" #include "util.h" #include <vlc_common.h> #include <vlc_url.h> #include <vlc_input_item.h> #include <vlc_fs.h> #include <vlc_input.h> #include <vlc_threads.h> #include <vlc_cxx_helpers.hpp> #include <algorithm> #include <assert...
TOOL
0.862585
6.866177
70a32193-b1f5-4add-9797-b538043b8698
johanvdw/saga-debian
src/modules/grid/grid_analysis/fragmentation_standard.cpp
/********************************************************** * Version $Id: fragmentation_standard.cpp 1921 2014-01-09 10:24:11Z oconrad $ *********************************************************/ //--------------------------------------------------------- ///////////////////////////////////////////////////////////...
ALGO
0.989314
5.532226
d0aa7e43-14bb-49e6-85c6-73839f5ce749
Subhanshu1/C-
dynamic pogramming/mio.cpp
#include<bits/stdc++.h> using namespace std; int Mincost(vector<vector<int> >&mat,int i,int j){ int n=mat.size(); int m=mat[0].size(); if(i==(n-1)&&j==(m-1)){ return mat[i][j]; } if(i>=n || j>=m){ return INT_MAX; } return min(Mincost(mat,i,j+1),Mincost(m...
ALGO
0.999916
3.923765
0edb9459-5eb9-4916-b78f-9dda7758d546
Altu-Bitu-6/Altu-Bitu-KimSeongeun
03_정수론/2981.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int gcd(int a, int b) { if (b == 0) { return a; } return gcd(b, a % b); } int main(void) { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, i, g; vector<int> input; cin >> n; for (i = 0; i < n; i++) { ...
ALGO
0.999973
3.722104
d642b3d1-f67f-4f48-be90-7b0aec4db3be
HypertextAssassin0273/Data_Structures_in_Cpp
DS_Course_Spring_21_&_Fall_22/LAB/Ms. Aqsa Zahid/LAB#8/Q.3 (L8,Stack).cpp
#include"SLL.hpp" template<typename T> bool SLL<T>::operator==(const SLL& other)const{ if(_size!=other._size) return false; for(node *l1=head,*l2=other.head;l1;l1=l1->next,l2=l2->next) if (l1->data!=l2->data) return false; return true; } template<typename T>//i.e. extra bool SLL<T>::operator!=(con...
ALGO
0.903469
4.111546
640a6ad6-168f-4935-a57a-904000931491
fantasydreams/findwork
bazelProject/leetcode/cache/460.LFUCache.cpp
#include "460.LFUCache.h" void LFUCache::insert(int key, int value, int freq) { m_freq[freq].push_back({key, value}); m_cache[key] = {freq, --m_freq[freq].end()}; } int LFUCache::get(int key) { auto iter = m_cache.find(key); if(iter == m_cache.end()) { return -1; } auto node = iter ->...
ALGO
0.998898
5.620504
2ba534a1-12ce-4d7d-b0d3-a0ad16c2c0ed
keijak/comp-pub
atcoder/tdpc/K/main.cpp
#include <bits/stdc++.h> #define REP_(i, a_, b_, a, b, ...) \ for (int i = (a), END_##i = (b); i < END_##i; ++i) #define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__) #define ALL(x) std::begin(x), std::end(x) using i64 = long long; template <typename T, typename U> inline bool chmax(T &a, U b) { re...
ALGO
0.999852
4.710836
5573a68a-7e05-4714-baa2-e4827f47ec08
mandy-1/DSA-Practice-2022
208-implement-trie-prefix-tree/208-implement-trie-prefix-tree.cpp
struct Node { Node *links[26]; bool flag = false; //checks if the reference trie is present or not bool containKey(char ch) { return (links[ch - 'a'] != NULL); } //creating reference trie void put(char ch, Node *node) { links[ch - 'a'] = node; } //to get the next node for traversal Node *get(char ch) { ...
ALGO
0.99982
5.855603
388bf99e-104a-4a21-b976-6dae97ba3e95
pratyushpriyadarshanmallik/C-plus-plus-programming-
array/kadane's-algorithm.cpp
#include<iostream> #include<climits> using namespace std; int main(){ int n; cout<<"Enter size of array: "; cin>>n; int arr[n]; cout<<"Enter elements of array: "; for(int i=0;i<n;i++){ cin>>arr[i]; } int currentSum=0; int maxSum=INT_MIN; for(int i=0;i<n;i++){ curr...
ALGO
0.999705
4.163656
93bd7a7e-bb42-4db4-8c62-6e69ba05d05b
ishandutta2007/codeforces-o
omer223/normal/1598/D.cpp
#define _CRT_SECURE_NO_WARNINGS #define fast ios::sync_with_stdio(false); cin.tie(0); #define foru(i, k, n) for (int i = k; i < n; i++) #define ford(i, k, n) for (int i = k; i >= n; i--) #define ff first #define ss second #include <iostream> #include <algorithm> #include <vector> #include <bitset> #include <set> #incl...
ALGO
0.999867
4.432305
63b30d0a-b3f6-492b-8e27-adb6af5e9a73
shubhamthakur24/data-structure
c++program/recursion_question/bubblesortpratice.cpp
#include<iostream> using namespace std; void bubblesort(int n,int *a,int i) { if(n==1) { return; } } int main() { int n=5; int a[100]={5,7,0,8,4}; bubblesort(n,a,0); return 0; }
ALGO
0.999976
3.529185
aa3874dc-2a91-4c5f-ae02-d570beb1f1af
Mohamed-Khalifa12/HackerRank
Bill Division/Algo.cpp
void bonAppetit(vector<int> bill, int k, int b) { int sum = 0; for(int i = 0; i < bill.size(); i++) { if(i != k) sum += bill[i]; } sum /= 2; if(sum >= b) cout<< "Bon Appetit" << endl; else cout<< (b - sum) << endl; }
ALGO
0.999558
3.199922
c91c46f5-2e63-4dac-b267-5e8f49067b52
danielhO9/PS
BOJ/10168.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; struct Line { ll slope, y_value; double meet; }; double meetPoint(Line& line1, const Line& line2) { return (line2.y_value - line1.y_value) / static_cast<double>(line1.slope - line2.slope); } int main() { ios::sync_with_stdio(false);...
ALGO
0.999946
3.722833
f8ccce7b-05e7-4b19-88bc-1df384098e6b
HanYouyang/Computer
数据结构与算法/PKU-CS/PastClasses/@1/6/6.1-1.cpp
#include <iostream> #include <math.h> using namespace std; int main(int argc, char const *argv[]) { int n, x, y, ans; cin >> n >> x >> y; ans = n - ceil(double(y) / x); if (ans < 0) { ans = 0; } cout << ans << endl; return 0; }
ALGO
0.999772
3.420528
9f679324-5bab-46f7-b257-bc661abe1c51
Winterleaf/DNT-Torque3D-V1.1-MIT-3.0
Engine/source/gfx/gfxStringEnumTranslate.cpp
#include "core/strings/stringFunctions.h" #include "gfx/gfxStringEnumTranslate.h" #include "gfx/gfxAPI.h" #include "console/console.h" //------------------------------------------------------------------------------ const char *GFXStringIndexFormat[GFXIndexFormat_COUNT]; const char *GFXStringSamplerState[GFXSAMP_COU...
TOOL
0.854082
7.333127
014740da-a318-4b33-ae90-5fa55cbe24ac
adupayra/GFC
NBitsLFSR/NBitsLFSR.cpp
#include "NBitsLFSR.h" NBitsLFSR::NBitsLFSR(uint64_t N) { m_nbBits = 0; uint64_t temp = 1; // Find power of 2 above N while (temp < N) { temp *= 2; m_nbBits++; } tapsArray = &taps[m_nbBits - 2]; // Initializing first state on which linear transformations will occur. Sh...
ALGO
0.999603
5.801561
5ffd550e-c18c-4945-a4fb-be6a6dd1909b
aestesis/elektronika
src/Alib/flashSDK/Source/JPEG/example.cpp
/* * example.c * * This file illustrates how to use the IJG code as a subroutine library * to read or write JPEG image files. You should look at this code in * conjunction with the documentation file libjpeg.doc. * * This code will not do anything useful as-is, but it may be helpful as a * skeleton for constru...
TOOL
0.880615
6.37008
23a4c396-da10-4281-9c04-5ccb4d36c689
applebuddy/BJAlgorithmStudy
BaekJoonPS/BaekjoonAlgorithmPS/Basic/피시방알바_1453.cpp
/// MARK: - 피시방알바_1453 #include <iostream> #include <map> using namespace std; void thePersonalComputerRoomArbeit() { map<int,int> MP; int Ans=0; int T; cin>>T; while(T--) { int N; cin>>N; MP[N]++; } for(auto m : MP) if(m.second>1) Ans+=m.second-1; printf("%d\n",Ans); r...
ALGO
0.99924
5.086535
dff93741-cf5e-460c-acc3-fd461d19eef4
SnowySparks/Algorithm_Solve
BackJoon_solved/구현/1193_분수찾기.cpp
#include <iostream> using namespace std; int main(void) { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int N; cin >> N; int cnt = 1; while (true) { if (N - cnt <=0) break; N-= cnt; cnt++;} if (cnt % 2 == 0) cout << (N) << '/' << (cnt - N + 1); else cout << (cn...
ALGO
0.999842
4.866264
a8708c90-4016-4e90-990c-898010854cd3
theahmedhany/LeetCode
1922. Count Good Numbers.cpp
// 1922. Count Good Numbers : https://leetcode.com/problems/count-good-numbers/ class Solution { public: const int mod = 1e9 + 7; long long fast_power(int base, long long p) { if (!p) { return 1; } long long half = fast_power(base, p / 2); ...
ALGO
0.999978
6.049049
41a995ac-5edd-4491-80b3-f0d3f52380c8
EvAn-HuAngBiu/Leetcode
LeetCode-CPP/53.cpp
#include <iostream> #include <algorithm> #include <string> #include <vector> using namespace std; class Solution { public: inline int max(int a, int b) { return a > b ? a : b; } int maxSubArray(vector<int>& nums) { int size = nums.size(); if (size == 0) { return 0; ...
ALGO
0.999952
5.28229
2e36ebb2-89a4-445b-bb49-33c4e3a8dda1
tejasbahurupi/codeforces
A_Creating_Words.cpp
#include <bits/stdc++.h> #include <iostream> #define pb push_back #define ll long long using namespace std; void solve() { string a, b; cin >> a >> b; swap(a[0], b[0]); cout << a << " " << b << endl; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; ...
ALGO
0.999869
5.138124
dabf0e2b-538a-4085-8499-56fb3bcfac8a
DeagleGross/C-Algo-Structures
Algorithms/KDZ/main.cpp
// ---------------------------------------------------------------- /* КДЗ по дисциплине Алгоритмы и структуры данных, 2018-2019 уч.год Королев Дмитрий Павлович, группа БПИ-173(1), дата (30.03.2019) IDE CLion, состав проекта (файлы *.cpp и *.h) Структура: ---------- main.cpp - основной файл про...
ALGO
0.998189
4.100306
89d680cc-de92-43ba-a06b-69557588bb0c
cmagana28/CIS17A
Class/NoMVCSavingsFunction/main.cpp
/* * File: main.cpp * Author: Dr. Mark E. Lehr * Date: February 24th, 2020 * Purpose:No MVC with Savings Function */ //System Libraries #include <iostream> #include <iomanip> using namespace std; //User Libraries //Global Constants //Function Prototypes float savings(float,float,int); //Execution Begins ...
ALGO
0.915833
3.66832
fedbdc40-fc32-4f59-88e6-640b4816095d
ishandutta2007/codeforces
zeroonee/normal/1623/A.cpp
#include <bits/stdc++.h> using namespace std; typedef unsigned int ui; typedef long long ll; #define all(x) (x).begin(),(x).end() int main() { ios::sync_with_stdio(0);cin.tie(0); int T; cin>>T; while (T--) { int n,m,x,y,dx=1,dy=1,xx,yy,r=0; cin>>n>>m>>x>>y>>xx>>yy; if (x<=xx) r=xx-x; else r=(n-x)+(n-xx); i...
ALGO
0.999707
4.373466
fde40fcb-a4e9-46a7-a5b3-5f0d1e0990c4
alexandraback/datacollection
solutions_5658571765186560_1/C++/prabowo/solution.cpp
#include<bits/stdc++.h> using namespace std; int t; int x, r, c; int main(){ ifstream in; ofstream out; in.open("D-large.in"); out.open("Ominous Omino.txt"); in >> t; for (int tc=1; tc<=t; tc++){ in >> x >> r >> c; bool bisa = true; if (x >= 7) bisa = false; ...
ALGO
0.999947
4.073971
6502b43a-e4bc-4f1b-9377-6aba47fe84ec
SneakerMa/CppLearning
CppPrimer/ch11/ex11_20.cpp
//! @Alan @pezy //! //! Exercise 11.20: //! Rewrite the word-counting program from § 11.1 (p. 421) to use insert instead //! of subscripting. Which program do you think is easier to write and read? //! Explain your reasoning. //! #include <iostream> #include <map> #include <string> using std::string; int main() { ...
ALGO
0.993621
6.123788
7f439881-8e3e-43ce-91b5-020d99a8378e
intelingzhi/lesson
testcpp/start.cpp
#include <iostream> using namespace std; int fun(int n) { if (n == 1) { return 1; } else { return (fun(n - 1) * n); } } int main() { int a; scanf("%d", &a); int b = fun(a); cout << b << endl; return 0; }
ALGO
0.999925
4.288686
99527294-63a9-4915-ad68-8c9b5e487731
Longnewbie/DSA
10.CayNhiPhan/bt8_levelOrder/main.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; inline ll gcd(ll a,ll b) {ll r; while(b){r = a%b; a=b; b=r;}return a;} inline ll lcm(ll a,ll b) {return a/gcd(a,b)*b;} #define pb push_back #define pii pair<int,int> #define pip pair<int,pair<int,int>> int mod = 1e9+7; /* - Cho cây nhị phân, nhiệm vụ...
ALGO
0.999961
3.605438
eda37b0e-aad1-4932-b419-947d50299bc0
parasguglani1/competitive_coding
Codechef/long challenge/jul22_1/Slow_Solution.cpp
#include <bits/stdc++.h> using namespace std; using namespace chrono; #define ff first #define ss second #define int long long using ll = long long; #define setbits(x) __builtin_popcountll(x) #define zrobits(x) __builtin_ctzll(x) #define mod 1000000007 #define inf 1e18 #define PI 3.1415926535897932384626 #define ps(x,...
ALGO
0.999958
4.223404
5d5493e7-557a-4632-8a6b-ad2a1e61d799
ishandutta2007/codeforces
abc864197532/normal/1721/F.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define mp make_pair #define pb push_back #define eb emplace_back #define pii pair <int, int> #define X first #define Y second #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() void abc() {cout << endl;} template <typename T, ty...
ALGO
0.999916
4.089786
dc619ce5-719f-4261-b8b2-b6d2d75f9ad1
jin60641/acm
boj/6593.cpp
#include<stdio.h> #include<queue> const int INF = 10000001; struct pos { int z,y,x; }; int L = 30,R = 30,C = 30; pos S,E; struct pair { pos p; int w; }; struct cmp { bool operator()(pair a, pair b){ return a.w > b.w; } }; std::priority_queue<pair,std::vector<pair>,cmp> pq; int arr[32][32][32]; int visit[32][3...
ALGO
0.99983
3.607263
08a22ada-edcf-40d3-bf1a-aff74fe9e6a9
enzoyoshio/maratona
codeforces/0514/c.cpp
#include <bits/stdc++.h> using namespace std; // Template (v1.4.2 - 2023-04-22) (codeforces:cebolinha, atcoder:edu) {{{ #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; template<class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag,tree_order_sta...
ALGO
0.999971
5.806842
cf621fe6-3042-4319-9aa3-bf79bc0e7005
shelltdf/osgall
prebuild/eigen-3.4-rc1/doc/examples/function_taking_ref.cpp
#include <iostream> #include <Eigen/SVD> using namespace Eigen; using namespace std; float inv_cond(const Ref<const MatrixXf>& a) { const VectorXf sing_vals = a.jacobiSvd().singularValues(); return sing_vals(sing_vals.size()-1) / sing_vals(0); } int main() { Matrix4f m = Matrix4f::Random(); cout << "matrix m:...
ALGO
0.999845
5.283265
06d0aac5-e65b-4295-a6ed-fc6ab2aaa606
aFishboy/ECS36C-Data_Structures_and_Algos_Projects
p4AVL3-23/Autograder/BST.cpp
#include "BST.h" #include <cassert> #include <iostream> #include <string> #include <queue> #include "json.hpp" BSTNode::BSTNode(int key) : key_(key), parent_(std::weak_ptr<BSTNode>()), left_(nullptr), right_(nullptr) {} BSTNode::BSTNode(int key, std::weak_ptr<BSTNode> parent) : key_(key), parent_(parent), le...
ALGO
0.990892
4.879643
760a05c0-6fd0-43e9-a921-d7ac6f0427f2
S-1729/Linked-List
IntersectionElementsOfTwoSortedLinkedLists.cpp
#include<bits/stdc++.h> using namespace std; Node* findIntersection(Node* head1, Node* head2) { Node* dummy=new Node(-1); Node* temp=dummy; while(head1&&head2){ if(head1->data==head2->data){ temp->next=head1; temp=temp->next; head1=head1->next; head2=...
ALGO
0.99995
4.155079
afe1b135-4725-4518-89fb-ca9b51b4f33d
amanbansal1506/Codeforces
Little_Nikita.cpp
#include<iostream> using namespace std; int main(){ int t,n,m; cin>>t; while(t--){ cin>>n>>m; if(n>=m){ int s=n-m; if(n==m || (s%2==0)){ cout<<"Yes"<<endl; } else{ cout<<"No"<<endl; } } else{ cout<<"No"<<...
ALGO
0.999987
3.93207
f6af99b0-c2b3-4d18-b477-5a56d58b85a1
vivaan1304/Competitive-Programming
POI/POI_05 Banknote.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <limits> #include <list> #in...
ALGO
0.999993
3.248928
fd724f69-1b47-4a37-aa28-34112fe06704
mambelli/osg-bosco-marco
src/condor_io/condor_crypt_blowfish.cpp
#include "condor_common.h" #include "condor_crypt_blowfish.h" //#include <string.h> //#include <malloc.h> #ifdef HAVE_EXT_OPENSSL Condor_Crypt_Blowfish :: Condor_Crypt_Blowfish(const KeyInfo& key) #if !defined(SKIP_AUTHENTICATION) : Condor_Crypt_Base(CONDOR_BLOWFISH, key) { // initialize resetState(); ...
TOOL
0.936138
6.15124
c8502f94-ce9a-4240-9ae3-3302352d7c0a
lzqsd/TransparentShapeDatasetCreation
OptixRenderer/src/optixRenderer/src/sampler/sampler.cpp
#include "sampler/sampler.h" void getOutputBuffer(Context& context, float* imgData, int width, int height, unsigned sizeScale) { Buffer imgBuffer = context[ "output_buffer" ]->getBuffer(); float* imgDataBuffer = reinterpret_cast<float*>(imgBuffer -> map() ); for(int r = 0; r < height; r++){ for(int...
ALGO
0.986914
4.197115
ab03841d-908b-4bff-ba67-c768dd0a59e0
skmonir/Online-Judge-Solutions
UVa/10928 - My Dear Neighbours.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define LL long long #define ULL unsigned long long #define all(x) x.begin(), x.end() #define fill(a, b) memset(a, b, sizeof a) const LL Mod = 1000000007; const int N = 1e3 + 5; vector <int> sz[N]; int main()...
ALGO
0.999516
4.225026
fb27a648-1089-4103-8635-f5b0b182cb8f
113bommy/deepmind_codecontests_refine
cpp_source_filter_file/cpp_train_11922_3.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, k, l, r, ans = 0, manys = 0; bool flag = false; map<int, int> object, temp; scanf("%d %d", &n, &k); for (int i = 1; i <= n; i++) { scanf("%d %d", &l, &r); object[l * 2]++; object[r * 2 + 1]--; } for (map<int, int>::iterator obje...
ALGO
0.999933
3.224288
3692c372-aaf6-42a9-96d8-4bef09b9d887
ShivamHasurkar/LeetCode_solutions
1013-fibonacci-number/fibonacci-number.cpp
class Solution { public: // bottom-up appraoch int fib(int n) { if(n<=1) return n; vector<int> dp(n+1); dp[0] = 0; dp[1] = 1; for(int i=2;i<=n;i++){ dp[i] = dp[i-1] + dp[i-2]; } return dp[n]; } };
ALGO
0.999997
6.088779
0cd93864-a8b3-4d0b-8d23-a7d180efe31e
xrayFan/xray_history
xr_3da/xrGame/level_graph_vertex.cpp
//////////////////////////////////////////////////////////////////////////// // Module : level_graph_vertex.cpp // Created : 02.10.2001 // Modified : 11.11.2003 // Author : Oles Shihkovtsov, Dmitriy Iassenev // Description : Level graph vertex functions ////////////////////////////////////////////////////////////...
ALGO
0.999496
3.696694
d6268e42-7499-438a-823c-995c1db75b0d
readex-eu/readex-apps
benchmark_apps/elmerfem/ElmerGUI/netgen/libsrc/meshing/smoothing3.cpp
#include <mystdlib.h> #include "meshing.hpp" #ifdef SOLIDGEOM #include <csg.hpp> #endif #include <opti.hpp> namespace netgen { double MinFunctionSum :: Func (const Vector & x) const { double retval = 0; for(int i=0; i<functions.Size(); i++) retval += functions[i]->Func(x); return retval;...
ALGO
0.995116
5.053038
d025623e-5587-480b-9532-b2b64853f844
KASHISH-JAIN17/Pattern-InCPP
PATTERNS/pattern02.cpp
/* 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5 */ #include <iostream> using namespace std; int main(){ int n,i; cout<<"ENTER THE VALUE OF n:"; cin>>n; i=1; while(i<=n){ int j=1; while(j<=n){ cout<<i<<' '; j++; } cout<<endl; i++;...
ALGO
0.999967
3.846916
b8f0ea74-73c6-4d4e-a433-f5dd5be857b1
ishandutta2007/codeforces
bench0310/normal/1389/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while(t--) { int n,k,z; cin >> n >> k >> z; vector<int> a(n+1,0); for(int i=1;i<=n;i++) cin >> a[i]; vector<int> m(n+1,...
ALGO
0.999638
3.297011
d48c8f84-cf27-4e74-adc1-9a863714d8c4
generalized-intelligence/GAAS
deprecated/software/SLAM/ygz_slam_ros/Thirdparty/DBow3/src/BRIEF.cpp
#include "BRIEF.h" #include "../src/DUtils.h" #include <boost/dynamic_bitset.hpp> #include <vector> using namespace std; using namespace DVision; // ---------------------------------------------------------------------------- BRIEF::BRIEF(int nbits, int patch_size, Type type): m_bit_length(nbits), m_patch_size(pat...
ALGO
0.989801
5.908144
4a726627-82a2-404c-9152-1f35ed7e4f32
georgi571/Software-University-CPP
_2ProgrammingFundamentalsWithCPP/_3Arrays/_1Lab/_02PrintNumbersInReverseOrder.cpp
#include <iostream> using namespace std; void fillArray(int array[], int size); void printNumbersInReverseOrder(int array[], int size); int main() { constexpr int size = 100; int array[size] = {}; int n; cin >> n; fillArray(array, n); printNumbersInReverseOrder(array, n); return 0; } v...
ALGO
0.9992
5.305289
9876ed48-37c1-493c-98c8-aa5307d79115
kerinb/CS3421---Computer-Architecture-II
Tutorial 3/AckermannFunction/ComputerArchitectureTutorial3.cpp
#include "stdafx.h" #include "targetver.h" #include "time.h" #include <assert.h> #include <conio.h> #include <iomanip> #include <string> #include <iostream> using namespace std; #define NUMBER_OF_RUNS 10000 int procedureCalls = 0; int registerDepth = 0; int maxRegisterDepth = 0; int numberOfRegisterWindowsUsed = 1; ...
ALGO
0.98027
5.45761
59281573-731f-400a-b615-5590ea3f2cfa
alexandraback/datacollection
solutions_2449486_0/C++/Agentchuck/main.cpp
#include <string.h> #include <stdint.h> #include <cstdio> #include <cstdlib> #include <ctype.h> #include <cmath> #include <string> #include <vector> #include <list> #include <iostream> #include <map> #include <set> #include <algorithm> #include <queue> #include <sstream> #include <fstream> using namespace std; typedef ...
ALGO
0.99872
3.517516
832051d2-dc28-4b4e-a856-684e5be5c549
ishandutta2007/codeforces
ichyo/normal/37/A.cpp
#include <cstdio> #include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <fstream> #include <complex> #inclu...
ALGO
0.998574
3.821822
6c3823a0-4767-44ad-adf0-723e5ec5e0bb
EndlessLethe/ACM
ScuACM_2015_第二次讲座练习赛_A一只小蜜蜂.cpp
#include <bits/stdc++.h> #define MAX 50 long long int f(int a, long long int* val); int main() { int n, i; scanf("%d", &n);// Ҫֶ long long int res[n] = {0}, val[MAX] = {0};// ʼ result ̵ value for (i = 0; i < n; i++){ int a = 0, b = 0; scanf("%d %d", &a, &b); a = b - a + 1; res[i] = f(a, val);//÷װĺ res...
ALGO
0.999788
3.516315
3772a5d8-aac4-4b74-90ba-bb707278044d
artisdom/cpp_recipes_code
8-2_vector_iterator_non_const.cpp
#include <cinttypes> #include <iostream> #include <vector> using namespace std; int main(int argc, char const *argv[]) { using IntVector = vector<int32_t>; using IntVectorIterator = IntVector::iterator; IntVector myVector(5, 0); int32_t value{ 0 }; for (IntVectorIterator iter = myVector.begin(); ...
TOOL
0.909257
3.80017
b9a811e8-d1f9-4b42-b5bd-1551406d7a7f
longde123/SwiftShader
third_party/LLVM/lib/Support/StringRef.cpp
#include "llvm/ADT/StringRef.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/OwningPtr.h" #include <bitset> using namespace llvm; // MSVC emits references to this into the translation units which reference it. #ifndef _MSC_VER const size_t StringRef::npos; #endif static char ascii_tolower(char x) { if (x >= 'A' ...
TOOL
0.919727
7.542785
c939a8f0-464a-4eff-8cab-ed2177dd2440
AkshatSharma1/DSA
Seaching-Algos/linearSearch.cpp
#include<iostream> #include<vector> using namespace std; void linearSearch(vector<int> arr,int key) { int left = 0; int length = arr.size(); int right = length - 1; int pos = -1;//position where key is found for (left = 0;left<=right;left++) { //Now check if key at left position ...
ALGO
0.999904
5.151628
3a4db09e-96a9-4132-afa1-8bbded4aa3c5
twisthl/AlgoIII
TP1/Ej3/ej3_parser.cpp
#include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <stdio.h> #include "ej3_parser.h" using namespace std; Ej3Parser::Ej3Parser(Opciones opt){ this->archivo_entrada = opt.archivo_entrada; this->archivo_salida = opt.archivo_salida; this->poda_habilitada = opt.poda_habilitada; thi...
ALGO
0.999172
3.449252
623cd443-18c8-443a-9f65-2bd4bf496a44
Zero-Vec/cppACM
lanqiao/lanqiao_problem/4Search/lanqiao4360.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; const int N = 15; struct Node{ int op = 0, x = 0, y = 0; }a[N]; int n, k; bool vis[N]; string pos(int op,int x,int y,string s){ if(op==1){ s[x] = (s[x]-'0'+y) % 10 + '0'; } else{ swap(s[x], s[y]); } return s; } bo...
ALGO
0.999995
3.703115
5161bd11-3baf-48e2-b988-643749cae781
mirceadino/parallel-and-distributed-programming
lab6/main.cpp
#include <bits/stdc++.h> #include "polynomial.h" using namespace std; template<class T> Polynomial<T> ReadPolynomial() { vector<T> coeffs; int size; cin >> size; for (int i = 0; i < size; ++i) { T x; cin >> x; coeffs.push_back(x); } return Polynomial<T>(coeffs); } int main(int argc, char** ar...
ALGO
0.999721
3.69322
690d9358-5997-4802-84ec-9dca0e50abd1
Sifathislam/PhitronAllPrograms
DSA/DATA STRUCTURE/MAIN CONCEPTS SERIAL/Stack/StackImpliment_with_List.cpp
#include<bits/stdc++.h> using namespace std; // Create the list class myList { public: // create the list list <int> myL; // Oparation void push (int val){ myL.push_back(val); } void pop (){ myL.pop_back(); } int top(){ return myL.back(); } ...
ALGO
0.999762
4.825393
d2ba5164-0050-4354-ac19-67a1f5117e61
anujak1802/C-
p3.cpp
#include <iostream> using namespace std; int main() { int n; cout << "Enter Number of Rows: "; cin >> n; for(int i=1; i<=n;i++) { for(int j=1;j<=n;j++) { if((i==1) || (i==n) || (j==1) || (j==n)) { cout<<"*"; } else ...
ALGO
0.996939
3.772176