uuid
stringlengths
36
36
repo_name
stringlengths
5
133
relative_path
stringlengths
3
3.76k
content
stringlengths
282
4.03M
category
stringclasses
6 values
algo_rel_score
float32
0.9
1
quality_score
float32
3
8.13
source_meta
dict
f03edc12-0200-425b-a24e-cb568d0706fc
Chedser/STL
14_CopyCopyIf.cpp
#include <iostream> #include <algorithm> #include <vector> #include <string> using namespace std; class Person { public: string name; int score; int age; Person(string name, int score, int age) { this->name = name; this->score = score; this->age = age; }; }; void Print(const vector<Person>& v) { for (au...
TOOL
0.971383
3.861675
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2023-08-13T09:00:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13856da94af...
ce506a05-7fee-4160-8ea7-aba94160a25e
google-ai-edge/mediapipe
mediapipe/util/tracking/streaming_buffer.h
// Copyright 2019 The MediaPipe Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or a...
TOOL
0.911373
5.534277
{ "github_metadata": { "branch": "master", "commit_count": 4767, "repo_created_at": "2019-06-13T19:16:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 30689, "forks": 5453, "issues": 443, "pull_requests": 149 }, "file_meta": { "content_id"...
55241caf-92a0-406a-b7fa-1b7febe6deec
Exbilar/Source
CodeForces/cf414b.cpp
#include <bits/stdc++.h> #define DEBUG(...) fprintf(stderr,__VA_ARGS__) using std :: max; using std :: min; using std :: pair; using std :: make_pair; using std :: vector; using std :: queue; using std :: priority_queue; typedef long long LL; typedef pair<int,int> pii; static const int maxm = 2e3 + 10; static const...
ALGO
0.999957
4.070102
{ "github_metadata": { "branch": "master", "commit_count": 219, "repo_created_at": "2017-07-21T00:49:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "14b74ed4...
4012017a-7cc0-4e93-ab20-ab922aa451c7
minD3D/Algorithm_study
5567_marry.cpp
#include <iostream> using namespace std; int n, m, f[501], map[501][501], a, b,cnt=0; int main() { cin >> n >> m; while (m--) { cin >> a >> b; map[a][b] = 1, map[b][a]=1; if (a == 1) { f[b] = 1; } else if (b == 1) { f[a] = 1; } } for (int i = 2; i <= n; i++) { if ...
ALGO
0.999959
3.368812
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2018-12-03T05:05:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34f4bec5...
7e9d41e0-280b-42d3-a890-0654a4419118
mzry1992/workspace
OJ/CDOJ/3863. Area of circles.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; const double pi = acos(-1.0); const double eps = 1e-8; struct Point { double x,y; Point(){} Point(double _x,double _y) { x = _x; y = _y; } Point(Po...
ALGO
0.99792
4.100324
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2012-11-03T05:40:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac65febef...
0ef6e31d-fc36-42f1-b28f-47f08d80fa1f
Ibrahim-Arif/Programs
Data structures/Stack/Minimum average waiting time using STACKS/main.cpp
#include <iostream> // https://www.hackerrank.com/challenges/minimum-average-waiting-time/problem using namespace std; class node{ public: int order_t, required_t; node(){} node(int o, int r){ order_t = o; required_t = r; } }; class Stack{ public: int top, capacity; ...
ALGO
0.999843
4.085465
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2021-07-05T13:33:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "398dbbfca...
7f1c8950-3ff9-4006-a841-e3238f8830f7
destinyson7/All-Codes
Codeforces/1237/D_v2.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; //**************************************************** #define lp(var,start,end) for (ll var = start; var <end ; ++var) #define rlp(var,start,end) for(ll var = start; va...
ALGO
0.999985
3.327906
{ "github_metadata": { "branch": "master", "commit_count": 213, "repo_created_at": "2019-12-02T11:53:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c68d3d7a...
d6560985-81d6-492f-b10e-fc7e14b8091b
fantom787/My_Code_Base
New folder (2)/CodeForces/B/colourTheFence.cpp
#include <bits/stdc++.h> using namespace std; #define pi 3.1415926535; #define endl "\n"; #define ll long long int #define sort(x) sort(x.begin(), x.end()); #define all(x) s.begin(), s.end(); int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int v; cin >> v; ve...
ALGO
0.999982
3.875406
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2021-09-29T20:47:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "005466207...
91dc0a08-6966-4b1c-91b3-54228dcd8fea
brobat6/competitive
Lazy/Codeforces/1650/1650G.cpp
#include <bits/stdc++.h> using namespace std; #define int long long const int MOD = 1000000000 + 7; int32_t main() { ios::sync_with_stdio(false); cin.tie(0); int t; cin >> t; while(t--) { int n, m; cin >> n >> m; int s, t; cin >> s >> t; --s; --t; ...
ALGO
0.999978
4.706473
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2021-08-31T19:59:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "5fd54410b43...
10f9af84-73f8-450c-999e-e111fd50199e
rock3rdiaz/calculo-numerico
codigo/codigo/Tema_7/trapaux.h
// Calculo numerico: Tema 7 / trapaux.h #include <cmath> using namespace std; void trapaux(double (*funcion)(double), double a, double b, double &integral, int iteracion) { if (iteracion == 0) { integral = 0.5 * (b - a) * (funcion(a) + funcion(b)); return; } // Numero de puntos medios nuevos: // Igual al n...
ALGO
0.999856
5.235967
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-05-13T00:42:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d3a6a0c44f...
61d02613-e78a-4542-8962-5ee18cd2231f
naeem4265/Coding
codeforces/7C.cpp
#include<bits/stdc++.h> #define Fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define Freed freopen ("0in.txt","r",stdin); #define Fout freopen ("0out.txt","w",stdout); #define ll long long int #define pb push_back #define mp make_pair #define pi acos(-1.0) #define Mod 1000000007 #define limit 1000008 using name...
ALGO
0.999966
3.561484
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2020-10-05T18:22:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c18617ba...
71943838-4d88-452e-92b5-ed24443db9b8
anaclaraxbj/Iniciante-Codes
Exercícios beecrowd/1061.cpp
#include <iostream> using namespace std; int main(){ int diaInicio, diaFim; int hInicio, mInicio, sInicio; int hFim, mFim, sFim; string lixo; // variável para ler as strings que não usaremos ("Dia" e os dois-pontos) // Leitura da data e hora de início cin >> lixo >> diaInicio; // lê "Dia" e o ...
ALGO
0.999245
4.485553
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-06T01:23:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2e0844a0721...
b8bf4ad4-4540-4ca8-8d8d-75cff4233d77
Moeen35245/dsa
Tcs Hands On/Question3.cpp
/* Selection of MPCS exams include a fitness test which is conducted on ground. There will be a batch of 3 trainees, appearing for running test in track for 3 rounds. You need to record their oxygen level after every round. After trainee are finished with all rounds, calculate for each trainee his average oxygen level ...
ALGO
0.993002
4.487638
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-12-28T03:33:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4dab75f3ffcb...
5ccda7fe-149a-44fc-8c6b-1a9c191d11dc
punchdrunkard/Problem-Solving
백준/Silver/2579. 계단 오르기/계단 오르기.cc
#include <bits/stdc++.h> #define FASTIO ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std; int n; // 계단의 갯수 vector<int> stair; vector<vector<int>> dp; void init() { FASTIO; // 테스트를 위한 파일 입력 코드 (TODO: 제출 전 삭제) // freopen("sample_input.txt", "r", stdin); cin >> n; stair.resize(n +...
ALGO
0.999967
4.124362
{ "github_metadata": { "branch": "main", "commit_count": 1198, "repo_created_at": "2022-06-26T20:20:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "20811883...
ee737df4-47fe-4e1d-b2e9-5f40012b6da5
sloganking/Cpp-Points
RenderOrder.cpp
/* <NAME> */ #include <iostream> //pre processor directive, inputs library commands #include <time.h> //time #include <stdlib.h> //srand, rand #include <iomanip> //setprecision() #include <fstream> //files #include <cmath> #include "Point.h" //functions for this program #include "Points.h" using namespace std; ...
ALGO
0.996609
3.794166
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-01-26T21:30:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14f46f2491...
8225273e-fd37-4797-8daa-5f104347c0a2
jeffsetter/Halide_CoreIR
apps/HelloAppleMetal/HelloAppleMetal/reaction_diffusion_2.cpp
#include "Halide.h" using namespace Halide; Var x("x"), y("y"), c("c"); int main(int argc, char **argv) { // First define the function that gives the initial state. { Param<float> cx, cy; Func initial("initial"); // The initial state is a quantity of three chemicals present /...
ALGO
0.996721
5.291407
{ "github_metadata": { "branch": "master", "commit_count": 10837, "repo_created_at": "2017-03-13T02:50:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "a008a4...
202807b3-404a-4bd1-94f8-16423d337be5
Leooo918/MyBaekjoon
백준/Gold/1194. 달이 차오른다, 가자./달이 차오른다, 가자..cc
#include <iostream> #include <queue> #include<string.h> using namespace std; int n, m; char arrMap[51][51]; int visit[51][51][1 << 6]; int dx[4] = { 0,0,1,-1 }; int dy[4] = { 1,-1,0,0 }; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n >> m; queue<pair<pair<int, int>, int>> moveQ...
ALGO
0.999902
3.913764
{ "github_metadata": { "branch": "main", "commit_count": 213, "repo_created_at": "2023-05-21T14:55:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c90b6744cf...
589b5add-5432-4220-a24c-cf5ef0529d66
Md-Noman-Biswas/Codeforces_problems
C_Similar_Pairs.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define nl "\n" #define YES cout << "YES\n" #define NO cout << "NO\n" #define pb push_back #define llmx LONG_LONG_MAX #define llmn LONG_LONG_MIN #define mod 1000000007 const int N = 1e5 + 7; const int INF = 1e9 + 10; void solve(){ ll n; cin >> n...
ALGO
0.999709
4.219945
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-07-24T09:21:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6baa248b391...
819a30d2-fc84-4667-97ce-308277679448
ishandutta2007/codeforces-l
leaf1415/normal/884/D.cpp
#include <iostream> #include <cstdio> #include <cmath> #include <ctime> #include <cstdlib> #include <cassert> #include <vector> #include <list> #include <stack> #include <queue> #include <deque> #include <map> #include <set> #include <bitset> #include <string> #include <algorithm> #include <utility> #include <complex> ...
ALGO
0.999895
3.952988
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e252bfb58c0...
bb8ea3fd-f60d-4a0b-97a6-ddb8aef1d90c
AClearZhang/AlgorithmSlay
C++/179.LargestNumber.cpp
/* * @FilePath : \AlgorithmInterview\AlgorithmSlay\C++\179.LargestNumber.cpp * @Author : AClearZhang * @Date : 2021-05-14 18:40:55 * @E-mail : <EMAIL> * @Homepage : www.aclear.top * @LastEditors : AClearZhang * @LastEditTime : 2021-05-...
ALGO
0.999921
5.673539
{ "github_metadata": { "branch": "main", "commit_count": 299, "repo_created_at": "2020-11-13T03:29:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "816b2a681c...
854cbba2-c217-4b42-8c09-c203f611f72d
viralbhoi/A2Z-Striver
Binary Search/BS on 1D Array/prob6.cpp
// First and Last occurrence in a sorted array // Given a sorted array of N integers, write a program to find the index of the first and last occurrence of the target key. If the target is not found then return -1. #include <bits/stdc++.h> using namespace std; vector<int> findFirstAndLastOccurencesBrute(vector<int> &...
ALGO
0.999986
6.003926
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-06-17T04:28:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "279b474bcb8...
3e2494a0-7b9c-4584-8bb0-25060a1d4cc5
jeevanvenkataramana/Programming
Sample programs/Merge_Sort/merge_sort.cpp
#include <iostream> using namespace std; void merge(int arr[], int l, int m, int r) { int i, j, k; int n1 = m - l + 1; int n2 = r - m; /* create temp arrays */ int L[n1], R[n2]; /* Copy data to temp arrays L[] and R[] */ for (i = 0; i < n1; i++) L[i] = arr[l + i]; for ...
ALGO
0.999995
5.433557
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-05-29T07:05:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1f0d019a...
d17bac65-29cd-4e2b-bf48-fcac1f27133c
Purvijain1234/Pattern-Printing-in-Cpp
Pattern7.cpp
#include<iostream> using namespace std; int main(){ int n; cout << "Enter the number of rows: "; cin >> n; //1 //1 3 //1 3 5 //1 3 5 7 for(int i=1; i<=n; i++){ int a=1; for(int j=1; j<=i; j++){ cout << a << " "; a += 2; } cout << endl; } //1 //1 3 //1 3 5 //...
ALGO
0.999737
4.135343
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-06-25T07:28:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ef7a850d9c15...
f60dcde6-d0e8-44f4-b399-8048fe89b911
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1248/all/29138023_62978179.cpp
#include <bits/stdc++.h> #define int long long #define pii pair<int, int> #define pb push_back #define ff first #define ss second #define sz(x) (int)(x).size() #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define forn(i, x) for(int i = 0; i < x; i++) #define rforn(i, x) for(int i = x ...
ALGO
0.999882
3.74047
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-11-22T14:40:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd8c47950...
cca0afa0-caed-4325-89aa-64ba2ced5413
syzygy608/CP_Practice
cses/GameRoutes.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; const int mod = 1e9 + 7; const int maxn = 1e5 + 5; vector<int> adj[maxn], dp, in; bool vis[maxn]; void dfs(int r) { vis[r] = true; for(int nx: adj[r]) if(!vis[nx]) dfs(nx); } int main() { int n, m; cin >> ...
ALGO
0.999915
4.684021
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2023-06-16T12:49:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc5d62c32d0...
80531776-d0db-43c2-86c3-684bfc87876e
domz1/SourceFlyFF
Program/boost_1_34_1/boost_1_34_1/tools/inspect/minmax_check.cpp
// minmax_check implementation --------------------------------------------// // Copyright <NAME> 2002. // Copyright <NAME> 2006. // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <algorithm...
TOOL
0.963725
6.806448
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2013-10-15T13:15:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 24, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c6f88af4...
c1225ae0-c19d-4a74-9b9b-b900a0ecb15d
awai54st/Logic-Shrinkage
BINARYCOP/lutnet/src/library/hls/LUTNET_lut4_matrixvector.h
#include <ap_int.h> // popcount implemented as unsigned 1-bit add // HLS automatically balances this into an adder tree template<unsigned int MACS, unsigned int PopCountIntWidth> ap_int<PopCountIntWidth> PrunedPopCount(ap_uint<MACS> & in, ap_uint<PopCountIntWidth> fanin) { ap_int<PopCountIntWidth> pct = 0; for_M...
ALGO
0.999298
4.762505
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2021-11-22T22:36:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "bf260eff...
b293772a-cded-476f-b6fd-3f347e195ac3
CerenAnil/CS300_Data_Structures_Homeworks
CS300HW3/header.h
#include <iostream> #include <string> #include <vector> using namespace std; #ifndef header_h #define header_h struct translation { string mainWord; string definition; }; template <class Comparable> class BinarySearchTree; template <class Comparable> class BinaryNode { Comparable element; BinaryNode *left; Bi...
ALGO
0.998149
3.33581
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-02-03T21:10:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "331f6ca780...
00aec059-b4c9-4825-b2be-57f6d873ad24
kimsooho/algorithm
cpp/baekjoon/baekjoon_2468.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; vector<vector<int>> mapSource; vector<vector<int>> mapCopy; vector<int> islands; queue<pair<int, int>> q; int xAxis[] = {-1, 1, 0, 0}; int yAxis[] = {0, 0, -1, 1}; void bfs(int); int main() { int N, input, maxVal = ...
ALGO
0.999819
4.44418
{ "github_metadata": { "branch": "master", "commit_count": 368, "repo_created_at": "2019-04-04T05:47:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5391ead...
ddd204d3-ea24-4614-af34-6e9c1f71fd45
guestrin-lab/ACORN
faiss/impl/ResultHandler.h
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /* * Structures that collect search results from distance computations */ #pragma once #include <faiss/impl/AuxIndexStructures...
ALGO
0.971268
7.233848
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-04-10T19:29:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 80, "forks": 20, "issues": 9, "pull_requests": 2 }, "file_meta": { "content_id": "8106d226d8...
aa9159f5-eb97-4ca0-ac46-8ba6adc593f1
Rahul-IIT-B/TriSignal-NeuralFusion-Trader
src/cpp/rsi_strategy.cpp
#include "rsi_strategy.h" #include <iostream> #include <fstream> #include <sstream> #include <vector> #include <cmath> #include <numeric> /* Assumptions: - The CSV file has a header. - The 2nd column is the Close price. - RSI is calculated using Wilder’s smoothing method. - Default thresholds: RSI < 30 indicates overs...
ALGO
0.999668
6.133621
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-04-19T18:47:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "36b8207f07c4...
2f01de23-50e8-4ea7-aeb2-f8b0bf944f63
majinaru/Competitive-programming
cses/array_description.cpp
#include <bits/stdc++.h> #include <cstdint> using namespace std; #define endl '\n' using ll = long long; #define int ll const int MOD = 1e9+7; void solve() { int n, m; cin >> n >> m; vector<int> vt(n); vector<vector<int>> dp(m+2, vector<int>(n+1)); for(int i = 0; i < n; i++){ cin >> vt...
ALGO
0.999994
4.348391
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-09-10T12:42:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b562976135...
f2736e71-7a0d-452d-8f0e-a6cce18f1991
viiku/competitive-programming-problems
codeforces/1238A.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int #define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); #define endl "\n" #define REP(i,n) for(int i=0;i<n;i++) #define REPJ(j,n) for(int j=0;j<n;j++) #define PER(i,n) for(int i=n;i>0;i--) #define REP1(i,n) for(int i=1;i<=n;i++) #define REPJ1...
ALGO
0.99999
3.849134
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-01-22T07:16:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa5967f274...
c5b95745-4d4c-44e5-9533-78b5659e1999
pronad1/Problem_Solving_Part2
2123B.cpp
// Author : <NAME> #include <bits/stdc++.h> #define lower(s) transform(s.begin(), s.end(), s.begin(), ::tolower); #define upper(s) transform(s.begin(), s.end(), s.begin(), ::toupper); using namespace std; const int inf = 3e5; using ll = long long; ll mod = 1e9 + 7; //------------------------------------------------...
ALGO
0.999957
3.800844
{ "github_metadata": { "branch": "main", "commit_count": 186, "repo_created_at": "2024-08-03T03:42:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b8b94c9b4...
bb907096-9158-4c73-8ae6-c02ba3588e61
1112zakaria/neetcode
arrays_and_hashing/2848.points-that-intersect-with-cars.cpp
/* * @lc app=leetcode id=2848 lang=cpp * * [2848] Points That Intersect With Cars */ #include <vector> #include <algorithm> using namespace std; // @lc code=start static bool compareCoords(vector<int> i1, vector<int> i2) { return i1[0] < i2[0]; } class Solution { public: /** * Approach (naive, O(nlo...
ALGO
0.999754
6.347026
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2022-09-17T03:35:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7aef8281e9b...
8e452f10-b362-4df3-91b3-65180966e62e
matthiasderez/Control-Theory
Assignment 4/Arduino/CT-EKF-Pendulum/extended_kalman_filter.cpp
#include "extended_kalman_filter.h" void PredictionUpdate(const Matrix<1> &u, Matrix<3> &xhat, Matrix<3,3> &Phat) { // // UNCOMMENT AND COMPLETE LINES BELOW TO IMPLEMENT PredictionUpdate OF THE EXTENDED KALMAN FILTER // // Define useful constant const float L = 0.1259; //Pendulum length [m] const float ...
ALGO
0.981467
6.117415
{ "github_metadata": { "branch": "master", "commit_count": 125, "repo_created_at": "2021-11-11T20:57:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "299a9629...
594dc0fa-f635-4e8d-9a0d-c14db5c3298c
trilinos/Trilinos
packages/shylu/shylu_node/tacho/src/impl/Tacho_LU_Supernodes_Serial.hpp
// clang-format off // @HEADER // ***************************************************************************** // Tacho package // // Copyright 2022 NTESS and the Tacho contributors. // SPDX-License-Identifier: BSD-2-Clause // *****************************************************************...
ALGO
0.961199
7.057683
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
841360c7-bee3-4e1f-903a-c4fe8229f3e9
rubinselenica01/cprogramming
Exercising/Stacks and linked lists.cpp
#include <stdio.h> #include <stdlib.h> struct node{ int data; struct nyja* link; }* top=NULL; int isEmpty(){ if(top==NULL) return 1; else return 0; } void push(int d){ struct node* ptr= (struct node*)malloc(sizeof(struct node)); if(ptr==NULL){ printf("Stack overflow!"); exit(1); }...
ALGO
0.995786
3.565542
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-09-27T11:51:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "927cb0460064...
14345b8a-605f-4c08-b9e7-3d13bf18399b
jannunzi/CS1500
2014/Summer2/Lectures/Sorting/Sorting.cpp
#include <iostream> using namespace std; const int SIZE = 14; void printArray(int a[]) { for (int i = 0; i < SIZE; i++){ cout << "[" << i << "]\t" << a[i] << endl; } } void selectionSort(int a[]) { int cost = 0; for (int start = 0; start < SIZE; start++) { int smallest = start; for (int i = start; i < SIZE...
ALGO
0.999586
4.831164
{ "github_metadata": { "branch": "master", "commit_count": 198, "repo_created_at": "2013-11-16T05:42:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6481704...
1bc2e1d2-59b6-4968-bcbe-124ffc70d21b
Pratiksha-Andhare-PA/6companies30daysChallenge
Adobe/Erect the Fence.cpp
class Solution { public: int CW(vector<int> &p1, vector<int> &p2, vector<int> &p3){ int x1, y1, x2, y2, x3, y3; x1 = p1[0], y1 = p1[1]; x2 = p2[0], y2 = p2[1]; x3 = p3[0], y3 = p3[1]; return ((y3-y2)*(x2-x1) - (y2-y1)*(x3-x2)); //((y3-y2)/(x3-x2) - (y2-y1)*(x2-x1)); } ...
ALGO
0.999997
6.118491
{ "github_metadata": { "branch": "main", "commit_count": 100, "repo_created_at": "2024-01-01T15:17:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f20bfe54c6...
0fd38d02-d309-4e50-b1a3-9fc05167286e
sky107/Repository-2
is-prime.cpp
#include <iostream> using namespace std; typedef long long ll; typedef unsigned long long us; int a[100001]; int p[100001]={0}; void prime(){ //first mark all odd number as prime for(int i=3;i<=10000;i+=2){ p[i]=1; } for(int i=3;i<=10000;i+=2){ //if current number is not marked it mean...
ALGO
0.999851
4.068735
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2022-01-01T12:48:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "024665ccfcf...
7620f0a6-f217-43ac-83fa-5d0a81497db6
sakanaman/kdtree_test
main2d.cpp
#include "kdtree2.hpp" #include <stdio.h> #include <cmath> #include <random> int main() { int n = 500000; int small = 2; kdtree::dim2::Points _points(n + small); int x,y; for(int i = 0; i < small; ++i) { double theta = 2.0 * M_PI / small * i; double r = 1.0; _points[i] =...
ALGO
0.999365
4.781597
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-11-22T17:10:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d46236382a79...
5aab67ca-cfdd-4958-9a06-c13cee907dde
Suyash56/Maze-game
maze.cpp
#include<stdio.h> #include<iostream> #include<graphics.h> #include<conio.h> #include<stdlib.h> using namespace std; class maze { public: int co_mo,point; maze() { co_mo=0; point=0; } void caption(); void countm(); void body1(); void condition1(int*j...
ALGO
0.996818
3.146111
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-04-05T12:36:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab497b54f0...
0325f39f-cd10-4606-922a-9e997a29f95e
adamswiniarskixc/Transfer_interferometer_for_laser_frequency_stabilization
transfer_interferometer_c++/transfer_interferometer_v3.cpp
//g++ -o transfer_interferometer_v3 transfer_interferometer_v3.cpp BCM2835_Driver.o ADS1256_Driver.o -lbcm2835 -lfftw3 -lm #include <cstdio> #include <iostream> #include <fstream> #include <stdlib.h> #include <stdio.h> #include <signal.h> #include <string.h> #include <math.h> #include "bcm2835.h" #include "BCM2835...
ALGO
0.996518
4.167109
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2023-08-31T12:58:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "157abe8d5db...
b764e862-1142-423c-aacd-3d581ac63863
HawChang/archives
fast_sort/fast_sort/stdafx.h
// stdafx.h : 标准系统包含文件的包含文件, // 或是经常使用但不常更改的 // 特定于项目的包含文件 // #pragma once #include "targetver.h" #include <stdio.h> #include <tchar.h> #include <math.h> #include <iostream> #define maxnumber 10000 using namespace std; class fast_sort { int origin[maxnumber]; int temp[maxnumber]; int num; int findpiv...
ALGO
0.999696
4.31382
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-04-11T07:19:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "13b333c5c4...
783b8db3-05b5-4031-8ef4-81926a223fda
amirphl/learning
data-structures/geeks-for-geeks/binary-search-tree/remove-bst-keys-outside-the-given-range.cpp
// https://www.geeksforgeeks.org/remove-bst-keys-outside-the-given-range/ // { Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // Tree Node struct Node { int data; Node* left; Node* right; }; // Utility function to create a new Tree Node Node* newNode(int val...
ALGO
0.999981
6.346698
{ "github_metadata": { "branch": "main", "commit_count": 1441, "repo_created_at": "2022-02-26T18:21:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47b444b57...
05250aa9-aa5a-4d79-aa33-b8e069c0efc1
yucori/Algorithm
Programmers/Level 1/17681.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; vector<string> solution(int n, vector<int> arr1, vector<int> arr2) { vector<string> answer; vector<string> arr1De; vector<string> arr2De; string temp = ""; string anstemp = ""; string temp1 = ""; string temp2 = "...
ALGO
0.999968
4.573767
{ "github_metadata": { "branch": "main", "commit_count": 457, "repo_created_at": "2023-05-19T11:24:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "214b5ca189...
b0c63869-d653-4624-bf5f-944e30b54e58
himu23369/DSA
Algorithms_Sorting/Bubble_Sort.cpp
// Bubble Sort //Time Complexity -> O(n^2) //Space Complexity -> O(1) #include <iostream> using namespace std; int main() { int n; cout << "Enter the number of elements in array" << endl; cin >> n; int arr[n]; for (int i = 0; i < n; i++) { cout << "Enter the element at " << i << endl...
ALGO
0.999487
5.068562
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-27T06:31:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f90c1fe5809...
4c42763d-7094-4293-a7aa-f7f803bd7622
robbelouwet/masterthesis-forkskinny
src/forkskinny128-plus/keyschedule/keyschedule128.h
#ifndef FORKSKINNYPLUS128_KEYSCHEDULE_H #define FORKSKINNYPLUS128_KEYSCHEDULE_H #include "internal128.h" #include "../utils/forkskinny128-datatypes.h" #include "../roundfunction/forkskinny128-addconstant.h" #include "fixsliced-keyschedule128.h" static inline void forkskinny_128_init_tk2_internal(State128Sliced_t *tk1...
ALGO
0.979516
4.25894
{ "github_metadata": { "branch": "main", "commit_count": 191, "repo_created_at": "2024-07-06T08:43:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a87bd0eb5...
ff7a0ea3-6b86-46d2-aeab-7f26910aa0f4
deepakmani2027/DSA
ARRAY/binary search/first_ans_last_position.cpp
#include <iostream> #include <utility> // for std::pair using namespace std; pair<int, int> occurance(int arr[100], int size, int target) { int start = 0, end = size - 1, first = -1, last = -1, mid; // First occurrence while (start <= end) { mid = start + (end - start) / 2; if (arr[...
ALGO
0.99988
5.917997
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2024-06-24T05:29:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "147a65122a...
8bb82f60-3808-4d3d-8595-5eb8a7c0207d
kush8789/CodeNow
cpp/Array/SubarraySumEqualsK.cpp
#include<bits/stdc++.h> using namespace std; class Solution{ public: int subarraySum(vector<int>& nums, int n, int k) { // int count=0; // for(int i=0;i<n;i++) // { // int sum=0; // for(int j=i;j<n;j++) // { ...
ALGO
0.999895
5.136446
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-06-06T09:41:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bb3931aa4d3...
1f87f03c-3a2e-4a9e-84c3-6b19e22b6871
loneknightpy/idba
src/graph/scaffold_graph.cpp
/** * @file scaffold_graph.cpp * @brief * @author <NAME> (<EMAIL>) * @version 1.0.10 * @date 2012-04-16 */ #include "graph/scaffold_graph.h" #include <cmath> #include <deque> #include <iostream> #include <map> #include <set> #include <sstream> #include "basic/math.h" using namespace std; static bool Compare...
ALGO
0.986916
3.513195
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2014-06-20T16:09:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 129, "forks": 53, "issues": 48, "pull_requests": 3 }, "file_meta": { "content_id": "50e4d...
3dff0653-9945-4150-9405-11d63ffefdf8
AndreyBocharnikov/Algorithms-and-Data-structures
dynamic_programming/E.cpp
#include <fstream> #include <vector> #include <string> #define ll long long using namespace std; int main() { ifstream cin("levenshtein.in"); ofstream cout("levenshtein.out"); string s, t; cin >> s >> t; int n = int(s.length()), m = int(t.length()); if (n == 0) return cout << m, 0; ...
ALGO
0.999973
3.902663
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-03-26T14:39:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b3cb3326...
36d7b42d-3bce-4592-83d5-bcbf256ae9c7
davidtoma11/Data-Structures-UNIBUC
Fundamental Alogortihms/Tema 3/senat.cpp
#include <iostream> #include <fstream> #include <vector> #include <string> #include <cctype> #define DN 505 using namespace std; vector<int> fol(DN, 0); // Vector pentru a marca nodurile care au fost folosite în cuplaj vector<int> gr[DN]; // Listă de adiacență pentru graful bipartit int n, m, st[DN], dr[DN]; // Vect...
ALGO
0.99995
3.79162
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-02-18T19:26:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b8a95271b4c...
80c0d5d9-1072-4213-912d-c6dfd22dfb5c
MohanadKh03/data-structures-23
Binary Search Tree/BST.cpp
#include "BST.h" template<class T> BST<T>::BST(){ root = nullptr; } template<class T> void BST<T>::Insert(T val){ if(Contains(val)) return; Node<T>* temp = root; Node<T>* NewNode = new Node<T>(val); if(!root){ root = NewNode; return; } //go right and skip the left s...
ALGO
0.998378
3.49725
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2023-05-19T19:48:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f3cfec1a72...
bba92a65-3319-4888-9eb2-9f0058cfdc97
OOPCG/dsa
8_OBST.cpp
#include <iostream> using namespace std; class obst { int a[10], r[10][10], n; float p[10], q[10], w[10][10], c[10][10]; public: void accept(); void cons_obst(); int find_min(int, int); void tree(int i, int j); }; void obst::accept() { int i; cout << "\n How many elements are there i...
ALGO
0.999928
3.105597
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-05-05T13:47:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f5921744c3c...
7747afc0-c7d6-4058-b60a-a71039605106
alexandraback/datacollection
solutions_1485488_1/C++/bbappyuanyuan/cjb.cpp
#include <cstdio> #include <cstring> const int maxl = 100 + 10; const int dir[4][2] = {{1, 0}, {-1, 0}, {0, -1}, {0, 1}}; int h, n, m; int ceil[maxl][maxl], floor[maxl][maxl]; int f[maxl][maxl]; int head, tail, queue[maxl * maxl * 5][2]; bool inq[maxl][maxl]; int main() { freopen("in.txt", "r", stdin); freopen("ou...
ALGO
0.999233
3.339631
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "817a63362...
3feac751-1267-4e5d-a71f-5122cde38884
hugo-maker/atcoder
abc_b/abc104_accepted.cpp
#include <iostream> #include <string> using namespace std; int main() { string S; cin >> S; bool one = false; bool two = false; bool three = true;; if (S[0] == 'A') { one = true; } int count = 0; for (int i = 1; i <= S.size(); ++i) { if (isupper(S[i])) { if (i >= 2 && i <= S.s...
ALGO
0.999591
3.595013
{ "github_metadata": { "branch": "main", "commit_count": 235, "repo_created_at": "2021-05-20T05:12:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f21597cf1a...
8a876b25-22e8-45be-af52-d1349c967122
GuidoManfredi/essential
ros/vision/reco/reco_color/src/test_color_space.cpp
#include <iostream> #include <opencv2/highgui/highgui.hpp> #include <opencv2/imgproc/imgproc.hpp> using namespace std; using namespace cv; int* compute_spatial_quadrants (Mat II, int i, int j) { int* quad = new int[4]; if (i < II.rows && j < II.cols) { quad[0] = II.at<int>(i, j); quad[1] = II.at<int>(i, II.cols...
ALGO
0.987699
6.536837
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2014-03-19T15:50:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "5d4451a00...
d9f39491-ca14-4f61-bb12-ad6c89ddc3a9
ustcyyw/algorithm
leetcode/hard/string/hash/sumScores2223.cpp
/** * @Time : 2023/3/1-9:53 PM * @Author : <EMAIL> * @E-mail : <EMAIL> * @Github : https://github.com/ustcyyw * @desc : */ #include<bits/stdc++.h> using namespace std; typedef unsigned long long ull; const int p = 13331; class Solution { public: /* * 字符串hash + 二分 确定最长前缀 */ vector<ull> h, x; ...
ALGO
0.999975
4.026224
{ "github_metadata": { "branch": "main", "commit_count": 162, "repo_created_at": "2024-11-11T07:09:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62d4616045...
fe0d9e35-3d8f-4485-b4b6-93829499fb79
nealmatrix/leetcode
src/70_Climbing_Stairs.cpp
/* 70. Climbing Stairs Easy 5595 178 Add to List Share You are climbing a staircase. It takes n steps to reach the top. Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top? Example 1: Input: n = 2 Output: 2 Explanation: There are two ways to climb to the top. 1. 1 s...
ALGO
0.999906
4.906014
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2018-12-15T09:45:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4e4850af4...
5888dd91-ec42-4f7f-993b-022a6661cab1
dinhtuantinh/C-plus-plus
Hoc C++/matrix9.cpp
#include<iostream> #include<queue> #define faster() cin.tie(0); ios_base::sync_with_stdio(false); //<NAME> using namespace std; const int oo = 2*1e3; int A[oo][oo] = {0}, visit[oo][oo] = {0}; int n, m, x, y, z, t; int BFS(){ int ans = 0; if(!A[x+1][y+1]) return -1; queue<pair<int, int> > q; q.push(pair<in...
ALGO
0.999784
4.42524
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-11-03T08:55:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "0ecff648a5...
fabe8be3-90a9-4323-a35f-ee9cbb69276c
Martins3/ACM
leetcode/0/64.cpp
#include <iostream> #include <fstream> #include <vector> #include <cmath> #include <stack> #include <sstream> #include <climits> #include <deque> #include <set> #include <utility> #include <queue> #include <map> #include <cstring> #include <algorithm> #include <iterator> #include <string> #include <cassert> using name...
ALGO
0.999963
4.148184
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2018-03-05T11:57:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30658fa1e...
034a1636-5598-4607-909e-a4422a6820b7
susobhang70/OGLMinecraft
Sample_GL3_2D.cpp
#include <iostream> #include <cmath> #include <fstream> #include <vector> #include <glad/glad.h> #include <GLFW/glfw3.h> #define GLM_FORCE_RADIANS #include <glm/glm.hpp> #include <glm/gtx/transform.hpp> #include <glm/gtc/matrix_transform.hpp> using namespace std; struct VAO { GLuint VertexArrayID; GLuint Ve...
TOOL
0.964168
3.506385
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2016-01-30T07:33:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ecd65877...
413835fc-d684-4751-8da9-66528e6405e9
J-HowHuang/mid-term-project
dijkstra.cpp
//dijkstra #include<iostream> #include<cmath> #include<ctime> using namespace std; double threatofP(double x0, double y0, int* x, int* y, int* r, int* p, int m);//threat of a point double threatof(int** route, int* x, int* y, int* r, int* p, int m, int w, int t);//threat of a route double threatSofar(int** route, int*...
ALGO
0.999971
3.366688
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2018-11-15T02:00:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04985ecd9...
8bd49326-4be8-43f4-8174-4f0c25ff2083
ikk5515/cpp
test/06.cpp
//숫자만_추출 #include <iostream> #include <string> #include <vector> #include <math.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string str; vector<int> sr; int cnt = 0; cin >> str; for (int i = 0; i < str.size(); i++) { if (str[i] ...
ALGO
0.999718
4.252097
{ "github_metadata": { "branch": "master", "commit_count": 269, "repo_created_at": "2022-07-02T15:28:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa4a7202...
5ac0da22-1568-445f-beaf-d808590bebdf
vuehrjer/Quickhull_Marius
Quickhull.cpp
#include "Quickhull.h" #include <iostream> Quickhull::Quickhull(std::vector<Point> p, bool render) { std::vector<Point> extremes; Point extremLeft(640, 0); Point extremRight(0,0); for (Point point : p) { if (point.x < extremLeft.x) { extremLeft.x = point.x; extremLeft.y = point.y; } else if (point.x...
ALGO
0.9948
4.510178
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-12-02T11:01:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0cea024533...
96039643-0d87-420c-8739-fb0166e9387d
stevelonny/labsimnum
exercise_02/library02.cpp
#include <library02.h> /* coseno funciton */ double Coseno::Eval(double x){ return (double)M_PI_2*cos(x*(double)M_PI_2); } /* integrals with montecarlo mean method, with blck avg */ /* base class with uniform distribution */ BlockingMonte::BlockingMonte(){} BlockingMonte::BlockingMonte(Function &fun) : a{0.}, b...
ALGO
0.999147
5.237436
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2024-03-01T10:05:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "60bc594c0ff...
beb531c7-98c1-4b56-9071-ab54f20ba973
ishandutta2007/codeforces-d
danya.smelskiy/normal/342/E.cpp
#include <bits/stdc++.h> using namespace std; int n,m,x,y; map<pair<int,int>,int> depth; int kol[100005]; vector<int> v[100005]; bool used[100005],usedk[100005]; int pred[100005]; int ans[100005]; int qq; void dfs1(int x,int p,int last,int d){ depth[make_pair(last,x)]=d; kol[x]=1; for (int i=0;i<v[x].size...
ALGO
0.999864
4.231733
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "133f84b02a35...
fbfc7b49-4d50-48e5-9ea4-b18a042115a7
pratikhon/DAAL
DAA_A2.cpp
/*Implement a problem of move all zeroes to end of array. Statement: Given an array of random numbers, Push all the zero’s of a given array to the end of the array. For example, if the given arrays is {1, 9, 8, 4, 0, 0, 2, 7, 0, 6, 0}, it should be changed to {1, 9, 8, 4, 2, 7, 6, 0, 0, 0, 0}. The order of all other el...
ALGO
0.999955
6.000653
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-04-26T06:32:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2173667b157a...
b870ca16-f5c9-46de-8f75-628966c4087c
MARSELVARDANYAN/Algorithms-and-Data-Stuructures
Algorithms and Data Structure/LeetCode/leetcode_19.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* removeNthFr...
ALGO
0.999986
5.868544
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2024-07-14T18:33:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a45284b7c6...
c1e1ddc4-dc0c-40c5-a59e-4056e9e0dc48
soybin/idyll
src/renderer.cpp
/* * MIT License * Copyright (c) 2020 <NAME> */ #include "renderer.h" #include "seed.h" #include "config.h" #include <iostream> const double MAX_DIST = 256.0; const double MIN_DIST = 1e-5; const double PI = 3.14159265358979; void renderer::updateRotationMatrix() { // determine camera's rotation so that it alway...
ALGO
0.997683
6.093739
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2020-04-24T23:41:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a63fab4a...
b02af47b-3f0f-4c95-a00e-d6ffaa458dcf
marian3525/HashedBag
HashTable/HashTable.cpp
#include <iostream> #include <hash_fun.h> #include "HashTable.h" #define null -1 HashTable::HashTable(unsigned int cap) { /** * Create a hash table of inital size cap * complexity: O(cap) */ totalLen = cap; hashingLen = static_cast<unsigned int>(0.75 * ...
ALGO
0.998771
5.294367
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-06-06T20:41:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5ef2763d7...
7964aefb-4d4a-41b1-bbd3-d8db94949e48
William-J-Daniels/DanielsAms326
HomeworkThree/examples/problem_two.cpp
#include <prob_two.h> #include <vector> #include <iostream> const unsigned NUM_X = 512; const unsigned RNG_POINTS = std::pow(2, 18); const double MIN_ROT = 0.0; const double MAX_ROT = 0.5*M_PI; const double MIN_X = -1.0; const double MAX_X = 1.0; const double MIN_Y = -2.0; const double MAX_Y = 1.0; const unsigned ...
ALGO
0.999479
5.33004
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2023-02-16T20:49:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f0d3f596f8f...
680aedb4-0d78-4ae0-a671-5f50f212a003
gabrielrussoc/competitive-programming
codeforces/321e.cpp
#include <bits/stdc++.h> #define pb push_back using namespace std; typedef long long ll; const int N = 4003; const int K = 807; const int inf = 1e9+7; int n, m; int cost[N][N], dp[K][N], a[N][N], acc[N][N]; char s[2*N]; void calc(int a, int b, int l, int r, int k){ if(a > b) return; int best = inf, besti; ...
ALGO
0.999973
3.50735
{ "github_metadata": { "branch": "master", "commit_count": 470, "repo_created_at": "2015-10-24T20:27:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb6f993e...
8038d874-da14-4860-9f0a-26727d4f49a6
2019331099-Rabbi/Online-Judges-Problems-Solution
Codeforces/A_Directional_Increase.cpp
#include <bits/stdc++.h> #define endl '\n' #define PI acos(-1) #define sz 100010 #define inf 1000000009 #define mod 100000000 #define RUN_FAST ios::sync_with_stdio(false); using namespace std; bool isPossible(int n, int64_t arr[]) { int tmp = 0; for (int i = 0; i < n; i++) if (arr[i]) tmp =...
ALGO
0.99986
4.888599
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-06-29T17:28:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0343fbe2816...
a7648f18-05f0-4397-93d3-a3ef4b7e4963
WhiZTiM/coliru
Archive2/93/b7e630ef7b9023/main.cpp
#include <iostream> #include <vector> #include <iterator> template <typename Iter> void print_collection(Iter start, Iter end) { std::cout << "collection = { "; for(; start != end; ++start) { std::cout << *start << ", "; } std::cout << "};" << std::endl; } template <typename Iter> void merge(Iter start, ...
ALGO
0.999956
6.114936
{ "github_metadata": { "branch": "master", "commit_count": 42630, "repo_created_at": "2016-04-21T16:34:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b3c41...
ff3d43cf-673f-43ec-b2da-23779d9db44f
tsvetelinastef/CPlusPlus-learning
3. C++ codes for OOP/tasksFromExercise_TU_Drive/Lab1_task1_AndOthers_FromDriveTU_Training/LAB2_task2/lab2_task2/lab2_task2/lab2_task2.cpp
#include <iostream> // #include <iostream.h> /* we create class car and class truck, every of which contains private varible that defines the speed of the vehicle. This program contains the sp_greater() function, which is friendly function of both car and truck. */ class truck; // Предварителна декларация class car...
ALGO
0.983804
5.284374
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2022-08-22T17:16:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7088084bc35...
8c2f6dcc-46a5-4552-bb80-b4344c639fcd
falcaoanderson/CompetitiveProgramming
OBI/obi-2017-taxa.cpp
// 18/09/19 // 6:58 PM // #include <bits/stdc++.h> using namespace std; #define MAXN 210 #define INF 0x3f3f3f3f int n; int area[2*MAXN], prefix[2*MAXN]; int memo[2*MAXN][2*MAXN]; double fator; int multa(int l, int i, int r){ return max(prefix[i]-prefix[l-1], prefix[r]-prefix[i]); } int solve(int l, int r){ ...
ALGO
0.999262
4.145275
{ "github_metadata": { "branch": "main", "commit_count": 337, "repo_created_at": "2023-03-08T11:51:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5272a59c54...
9dc8f4d2-e009-413b-9499-cf7c9b9e761e
lorneez/cpp-practice
Project2/hashmap/HashMapGame.cpp
// // Created by <NAME> on 11/27/20. // #include "HashMapGame.h" #include <iostream> HashMapGame::HashMapGame() { this->isFinished = false; } void HashMapGame::checkContainsAll() { if(map.size() == 10) { std::cout << "Wow, map has all 10 numbers!" << std::endl; auto it_looper = map.begin(); ...
TEST
0.920497
3.557333
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2020-09-13T23:18:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9f07c724...
8ef5179a-c5b9-429d-966a-19e163517ac5
untodesu/voxelius
core/math/angles.hh
#ifndef CORE_MATH_ANGLES_HH #define CORE_MATH_ANGLES_HH 1 #pragma once #include "core/math/constexpr.hh" constexpr float A180 = math::radians(180.0f); constexpr float A360 = math::radians(360.0f); namespace math { float wrap_180(float angle); float wrap_360(float angle); } // namespace math namespace math { glm::fv...
ALGO
0.955374
7.771454
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2025-03-15T11:10:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "8f01557e...
ed594bbe-672f-4534-9228-e1aeb0517b49
114-l-l-255/OI_codes
Bashu(code)/3276.cpp
#include <cstdio> #include <algorithm> using namespace std; const int MAXN = 1001; unsigned long long h[MAXN][MAXN], bs[MAXN][MAXN]; struct edge { int hd; unsigned long long to; int nxt; } edges[MAXN * MAXN]; int head[20090314], tot; void insert(unsigned long long x) { int hed = x % 20090314; for (int i = head[hed...
ALGO
0.999794
3.370128
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2021-01-06T12:04:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9f88328d37...
28f1f62a-9bba-4435-a191-de47e25dae50
caoleiwuhan/LeetCode
String/PalindromeNumber/PalindromeNumber.cpp
//============================================================================ // Palindrome Number // Determine whether an integer is a palindrome. Do this without extra space. // // Some hints: // Could negative integers be palindromes? (ie, -1) // // If you are thinking of converting the integer to string, note the ...
ALGO
0.999942
6.137393
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2013-08-24T14:17:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51630141a3...
8b003fb7-c37f-4354-bb58-988b579f2514
envoyproxy/envoy
source/extensions/load_balancing_policies/override_host/load_balancer.h
#pragma once #include <cstdint> #include <memory> #include <optional> #include <string> #include <utility> #include <vector> #include "envoy/common/optref.h" #include "envoy/common/random_generator.h" #include "envoy/common/time.h" #include "envoy/config/core/v3/base.pb.h" #include "envoy/extensions/load_balancing_po...
TOOL
0.909034
7.703244
{ "github_metadata": { "branch": "main", "commit_count": 24827, "repo_created_at": "2016-08-08T15:07:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26282, "forks": 5012, "issues": 1550, "pull_requests": 138 }, "file_meta": { "content_id"...
4b9a8bf9-c53e-4fb1-abec-1d4c23f40119
google/monster-mash
third_party/libigl/include/igl/straighten_seams.cpp
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2017 <NAME> <<EMAIL>> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2.0/. ...
ALGO
0.949937
5.165604
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-01-28T21:04:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1312, "forks": 182, "issues": 24, "pull_requests": 0 }, "file_meta": { "content_id": "a54034...
bbac95d2-87b1-4579-836a-206bb247e11c
jariasf/CC126-2202
Semana 2/Hoja de ejercicios/ejercicio03.cpp
#include <iostream> using namespace std; int main() { /* NEUMATICOS Hnos, empresa dedicada a vender neumáticos, está realizando la siguiente oferta: Si el cliente decide comprar menos de 3 neumáticos paga por cada uno de ellos S/. 145. Si compra entre 3 y 5 neumáticos paga, por cada uno, S/. 138. S...
ALGO
0.986197
4.231181
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2022-08-16T15:13:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "440d8059f31...
60ffca5e-7424-440b-8c01-1ba84d4e60cd
xenix1337/YajilinSolver
YajilinSolver/src/Strategies/AvoidLoopsStrategy.cpp
#include "AvoidLoopsStrategy.h" #include <stack> #include <iostream> bool AvoidLoopsStrategy::SolveStep(YajilinBoard* board, STiles& tiles) { // 1. Color Colorize(board, tiles); int w = board->GetWidth(); int h = board->GetHeight(); bool stepSuccessful = false; for (int x = 0; x < w; x++) { for (int y = 0;...
ALGO
0.999634
4.000303
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-09-28T20:38:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "199127ed4c7...
e73aee11-e04e-4df4-834d-916b5f65a08b
battleofdie/interview
leetcode/Valid-Number.cpp
// Silly and ugly code, I am not satisfied with this code. class Solution { public: bool isNumber(const char *s) { // Start typing your C/C++ solution below // DO NOT write int main() function if(s == NULL) return false; while(*s != '\0' && *s == ' ') s++; if(*s == ...
ALGO
0.98892
4.312946
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2014-02-10T00:25:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "417f171b4...
cb0baf5d-7545-4d30-92d0-86722d5e2887
johnbenac/kuzo_ios
temp_lipo/include/common/utils.h
#pragma once #include <algorithm> #include <cstdint> #include <limits> #include "common/assert.h" #include "common/numeric_utils.h" #include "common/types/int128_t.h" namespace kuzu { namespace common { class BitmaskUtils { public: template<typename T> requires std::integral<T> static T all1sMaskFor...
ALGO
0.962554
7.376658
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-03-31T02:53:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd605bc73a63...
ddb0c6da-02b8-4e0b-8e93-7612deeaec89
BNext-IQT/GEMstone
phe/seal/SEAL/utilities.cpp
#include "utilities.h" #include "util/uintarith.h" #include "util/uintarithmod.h" #include "util/polyarithmod.h" #include "util/polyextras.h" #include "util/polycore.h" #include "util/polyarith.h" #include "util/uintextras.h" #include "util/modulus.h" #include "util/polymodulus.h" #include "decryptor.h" #include "simul...
TOOL
0.90674
6.977602
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2017-08-24T17:48:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a5c3b8c29...
f066c1e3-0c44-4c8f-b111-86622f067532
oxmrtn/GOOF-IA
srcs/Goof_utility.cpp
#include "../includes/Goof.hpp" int Goof::utility_easy(Game state, size_t nbr_moov) // Utility func for easy mode { int mult = (state.getUp() == this->player) ? -1 : 1; // A variable to use the same function if the bot is player 1 or 2 eitherway { int tmp = state.checker();; if (tmp == 1) ...
ALGO
0.997732
4.22592
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2025-04-06T13:35:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e3b436a4fd5...
99cd6225-6602-47c3-a0d6-bb61e660211f
Rishi-11-2/CP
D_Problem_about_GCD.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; using namespace chrono; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); #define debug(x...) { cout << "(" << #x << ")" << " = ( "; PRINT(x); } tem...
ALGO
0.999851
4.035361
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2023-10-19T06:20:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57ce5cbf78e...
5c2cacc0-8f22-4c7c-9418-11fa66d96b5e
huangmingchuan/Cpp_Primer_Answers
ch12/exercise12_28.cpp
#include <string> using std::string; #include <vector> using std::vector; #include <memory> using std::shared_ptr; #include <iostream> #include <fstream> #include <sstream> #include <map> #include <set> #include <algorithm> int main() { std::ifstream file("H:/code/C++/Cpp_Primer_Answers/data/storyDataFile.txt"); ...
TOOL
0.936592
3.756567
{ "github_metadata": { "branch": "master", "commit_count": 178, "repo_created_at": "2015-12-01T06:27:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2874, "forks": 799, "issues": 47, "pull_requests": 10 }, "file_meta": { "content_id": "4...
e777fd19-2616-4f2e-9d89-6a429b98767c
cyndereN/C-Cpp-Learning
CS106L/Template Classes and Concepts/priority_queue.cpp
#include <iostream> #include <vector> #include <algorithm> using std::cout; using std::endl; using std::vector; template <class T, class Container = std::vector<T>> class Priority_Q { public: Priority_Q() = default; ~Priority_Q() = default; T top() const { if(_heap.empty()) {} // throw error ...
ALGO
0.999243
5.251547
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2020-06-04T13:36:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd922fd0...
fef1c132-6b46-42f2-8ef9-ca17126485d9
raincross7/code-similarity
codes/train_code/problem070/problem070_118.cpp
#include <bits/stdc++.h> #define rep(i, a, n) for (int i = a; i < n; i++) #define repr(i, a, n) for (int i = n - 1; i >= a; i--) using namespace std; using ll = long long; using P = pair<int, int>; template <typename T> void chmin(T &a, T b) { a = min(a, b); } template <typename T> void chmax(T &a, T b) { a = max(a, b)...
ALGO
0.998522
3.897566
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8390323db2e5...
c6467138-7bcd-466a-aa6a-9902990baf70
ashwinreal/dsa_lab
ASSG1A__ASHWIN/ASSG1_B130248CS_ASHWIN_1.cpp
#include<iostream> #include<string> using namespace std; string reverse (string str) { string s=""; for(int i=str.length()-1;i>=0;i--) s+=str[i]; return s; } void call(string str,int pos,int n) { int k=pos+1;int ff=0;int ff2=0;int count=0;int j,i; //cout<<"!!!!!!!"<<pos; for(i=pos, j=pos;;) ...
ALGO
0.999568
3.097406
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-05-22T05:13:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a13d6292e3...
bbba3015-b731-4f43-9677-b18cfed55c4b
2745518585/code
CF1404D.cpp
#include<cstdio> #include<algorithm> #include<vector> using namespace std; const int N=1000001; int n,b[N][2],f[N]; vector<int> a[N]; void dfs(int x,int w) { f[x]=w; for(auto i:a[x]) { if(f[i]!=0) continue; dfs(i,-w); } } int main() { scanf("%d",&n); if(n%2==0) { prin...
ALGO
0.999987
3.498665
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2023-11-16T07:38:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c46d9199d...
a2ca0850-d45b-4546-beaa-4a447dfc2dc5
ittzzzmmm/Lab9
lab9_1.cpp
#include<iostream> #include<iomanip> //For using setw(), setprecision(), ... using namespace std; int main(){ double loan , rate , pay ; cout << "Enter initial loan: "; cin >> loan ; cout << "Enter interest rate per year (%): "; cin >> rate ; cout << "Enter amount you can pay per year: "; cin >> pay ; //use '...
ALGO
0.9974
3.611789
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2024-12-13T07:19:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a113c5a9...
0712fccb-18a4-417b-9027-4067c72da4a7
3abqreno/ProblemSolving
D1/54-Opposite Cites.cpp
#include <bits/stdc++.h> using namespace std; #define all(v) v.begin(),v.end() #define sortv(v) sort(all(v)) typedef long long ll; int a[int(1e5+5)]; void solve(){ int n;cin>>n; for (int i = 0; i < n; ++i) { cin>>a[i]; } if(n&1)return void(cout<<"NO"); for (int i = 0; i < n/2; ++i) { if(...
ALGO
0.999987
3.376949
{ "github_metadata": { "branch": "main", "commit_count": 346, "repo_created_at": "2022-08-05T12:03:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3b9596bfc...
02bf3c73-335c-41f4-bec6-1518795fdb21
leenderthayen/BSG
source/bsg/include/ChargeDistributions.h
#ifndef CHARGEDISTRIBUTIONS #define CHARGEDISTRIBUTIONS #include "Utilities.h" #include "gsl/gsl_sf_laguerre.h" #include "gsl/gsl_sf_gamma.h" #include <complex> #include "TMath.h" #include "TF1.h" #include "TGraph.h" namespace bsg { /** * Namespace containing all kinds of utility functions related to * charge dis...
ALGO
0.997757
5.365469
{ "github_metadata": { "branch": "master", "commit_count": 162, "repo_created_at": "2017-12-15T11:21:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 8, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "ba1753f...