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
d729424c-0bef-4abc-95b5-9ffeb6eb4b5b
TheNoobProgrammeur/CoinCoin_M1_Catho
main.cpp
/** * @author <NAME> * @date 2020 */ #include <iostream> #include <signal.h> #include "coinminer.h" using namespace std; bool arg_z = false; bool arg_t = false; bool arg_m = false; string trigram("ABR"); int min_c_to_found = 1; Coinminer *coinminer; void my_handler(int s); void parse_args(int argc, char **argv); v...
TOOL
0.933117
4.512105
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-06-08T08:21:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2e793f54d...
5c0f75cd-c275-40e8-9d01-390310f3c58a
DmitryIldyukov/oop
lw1/flipbyte/flipbyte/flipbyte.cpp
#include <iostream> #include <string> int FlipByte(int number) { unsigned char result = 0; for (int i = 0; i < CHAR_BIT; i++) { result <<= 1; result |= number & 1; number >>= 1; } return result; } bool CheckRange(int number) { if ((number >= 0) && (number <= 255)) ...
TOOL
0.903554
3.99033
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-05-11T08:26: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": "7255b004c5a...
2f9fb66f-f4db-4c00-901b-96fed411b9bb
rajan7488/DSA-in-c-
Queue/kQueueinArray.cpp
#include<iostream> using namespace std; class Queue{ public: int n; int k; int *front; int *rear; int *arr; int *next; int freespot; public: Queue(int n,int k){ this->n=n; this->k=k; front = new int[k]; rear = new int[k]; ...
ALGO
0.999653
4.307936
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-10-15T16:52: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": "d541b4d7906...
695e39cb-28b3-4078-911e-fde37718ac4d
baid14/MetodyObliczeniowe
Rownania_rozniczkowe_czastkowe/Lab11/1.Przydatne/MO_projekt_C/Projekt C - Visual Studio/main.cpp
#include "stdafx.h" void wykres_porownujacy(Projekt_C proj, double czas, int czestotliwosc, int metoda); void wykres_max_blad(Projekt_C proj, int freq); int main() { Projekt_C proj; proj.informacje(); proj.ustaw_zmienne(600); proj.rozw_anal(); proj.rozw_laasonen(THOMAS); //proj.rozw_laasonen(LU); //wykres_po...
ALGO
0.954901
4.482043
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-04-23T09:20: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": "3cba4e2ebb...
d6930e9b-6449-4457-bd94-09da68e0b5df
stonne-simulator/stonne
pytorch-frontend/caffe2/operators/weighted_sample_op.cc
#include "caffe2/operators/weighted_sample_op.h" namespace caffe2 { template <> bool WeightedSampleOp<float, CPUContext>::RunOnDevice() { CAFFE_ENFORCE_EQ( InputSize(), OutputSize(), "The number of tensors of the input and the output must be the same."); auto& weights = Input(0); int batch_siz...
TOOL
0.96093
7.85716
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2020-12-01T17:24:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 134, "forks": 30, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "845dd2...
b86a46fa-e395-4843-a8ff-e280c82515cc
H1manshu21/Learn-Cpp
Section20/List/main.cpp
// List #include <iostream> #include <list> #include <algorithm> #include <iterator> // for std::advance class Person { friend std::ostream &operator<<(std::ostream &os, const Person &p); std::string name; int age; public: Person() : name {"Unknown"}, age {0} {} ...
TOOL
0.994817
5.74642
{ "github_metadata": { "branch": "main", "commit_count": 136, "repo_created_at": "2021-06-10T11:02:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ccb0b73fc...
41e1cc27-9a89-4a39-8857-b49d8f3a0cc8
Alaxe/noi2-ranking
2018/solutions/A/IGG-Shumen/rot.cpp
# include <cstdio> # include <cstring> # include <algorithm> # include <vector> using namespace std; const int MAX_N = 10010; int b; int n; char s[MAX_N]; int a[MAX_N]; vector <vector <int>> ans; void solve () { ans.clear (); int i, d, fl, cd, ld; scanf ("%s", s); n = strlen (s); for (i = 1; i <= n; i ++) ...
ALGO
0.999816
3.204681
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2017-03-20T21:56:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ae38361b...
a57a5e95-ff59-4881-a1ef-a91f86cce9b7
ishandutta2007/codeforces-e
evilbuggy/normal/1677/A.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 5005; int n, p[maxn], cntp[maxn][maxn], cnts[maxn][maxn]; void solve(){ cin >> n; for(int i = 1; i <= n; i++){ cin >> p[i]; } for(int x = 1; x <= n; x++){ cntp[0][x] = cnts[n + 1][x] = 0; } for(int i = 1; i <= n; i++){ for(int x = 1; x <= n; x...
ALGO
0.999492
3.926844
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34: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": "fb4ebbf0169d...
1164b2ec-6794-4c93-8bcc-387c57d7b688
LutzGross/esys-escript.github.io
trilinos_source15/packages/rol/adapters/sacado/test/HS/HS_Problem_009.hpp
// @HEADER // ************************************************************************ // // Rapid Optimization Library (ROL) Package // Copyright (2014) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by or on be...
ALGO
0.998773
5.645689
{ "github_metadata": { "branch": "master", "commit_count": 5724, "repo_created_at": "2020-08-10T02:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 63, "pull_requests": 0 }, "file_meta": { "content_id": "ec07...
e2c377d1-ca17-4f28-9df1-35796a6072f3
JosepContact/3dEngine
Game/QuadTreeh.h
#ifndef __QUADTREEH_H__ #define __QUADTREEH_H__ #include "GameObject.h" #include "MathGeoLib/MathGeoLib.h" #include <list> #include <map> //#include "Application.h" //#include "ModuleCamera3D.h" //#include <algorithm> #define MAX_ELEMENTS 4 #define SUBDIVISIONS 8 #define MIN_SIZE 10.0f class QuadtreeNode { public...
ALGO
0.986335
4.572572
{ "github_metadata": { "branch": "master", "commit_count": 386, "repo_created_at": "2017-09-14T19:22:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "06c73994...
bf8a2114-e2e6-426b-b14a-c1e725bf83b6
Heroslourenco/TLP
FileName.cpp
#include<iostream> #include<string> using namespace std; void main() { int i, j, c, escolha, lgcg = 0, cglg = 1, tamanho,palavra; string morse[27] = { ".-", "-... ", "-.-.", "-..", ".", "..-.", "--.", "....", "..", ".---", "-.-", "---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--", "..-", "-.--", "--.." ...
ALGO
0.999817
3.227912
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-10-29T16:05:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe236912e76...
7cefe2ab-8fde-4eac-9754-948db573f8bc
trungducc/data-structure-and-algorithm-journey
binary_search/include/binary_search/binary_search.h
#pragma once #include <vector> namespace td { // Returns either the index of the location in the vector, or -1 if the vector // doesn't contain the target. template <typename DataType> std::size_t binary_search(const std::vector<DataType>& vector, const DataType& target); // Binary search ...
ALGO
0.999969
6.733444
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2018-06-17T06:36:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "714d83ce5...
b7d53a48-5242-449d-b7ce-9f08f95d7d6d
akshayrcc/CSE-Programs
OOMP/LB05_string.cpp
/* Problem Statement: Write a C++ program to perform String operations : i. = Equality ii. == String Copy iii. + Concatenation iv. << To display a string v. >> To reverse a string vi. Function to determine whether a string is a palindrome To find occurrence of a sub-string. Use Operator Overloading */ /*str...
TOOL
0.919096
5.197585
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-01-01T17:49: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": "18832d296ed9...
a9c5fce3-9b89-4ca4-acb5-c643b007355e
gvrs9/Problem-Solving
876-middle-of-the-linked-list/876-middle-of-the-linked-list.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* middleNode(...
ALGO
0.998763
5.778799
{ "github_metadata": { "branch": "main", "commit_count": 1209, "repo_created_at": "2022-05-06T08:45:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07d1c012b...
4f3a6093-d4fd-43ee-96ea-41f5d64fafd2
MihneaDarie/OOPLabs2024
Problema_1_lab10.cpp
#include <iostream> #include <exception> class Car { public: int price; public: Car(int val) { price = val; } Car(const Car& a) { price = a.price; } int getprice() { return price; } }; class OOB : public exception { public: virtual const char* what() const throw() { return "Exception...
TOOL
0.964064
4.724664
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-02-28T14:27: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": "ac800d9490d...
1994a336-423b-43cb-9d0a-e726924fc963
Scrubpai/Competitive-Programming
Codeforces/1632D.cpp
#include <bits/stdc++.h> using namespace std; const int MM = 2e5+5, LOG=18; int n, a[MM], ans[MM], st[LOG][MM]; int query(int l, int r) { int k = (int)log2(r-l+1); return __gcd(st[k][l], st[k][r-(1<<k)+1]); } int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); cin >> n; ...
ALGO
0.999931
3.545823
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2021-12-29T02:05:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e0850716a5b...
63c316ac-6759-4128-a652-ed1d23eabe78
liuyubobobo/Play-Leetcode
2001-2500/2466-Count-Ways-To-Build-Good-Strings/cpp-2466/main.cpp
/// Source : https://leetcode.com/problems/count-ways-to-build-good-strings/ /// Author : liuyubobobo /// Time : 2022-11-27 #include <iostream> #include <vector> using namespace std; /// DP /// Time Complexity: O(n) /// Space Complexity: O(n) class Solution { private: const long long MOD = 1e9 + 7; public: ...
ALGO
0.999753
5.50908
{ "github_metadata": { "branch": "master", "commit_count": 2592, "repo_created_at": "2016-12-01T17:08:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2732, "forks": 718, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "11...
3e39f9b1-54f2-4da5-8e76-68f68d511680
shubhanshu02/e-learning
Algorithms on Graphs/week1_decomposition1/1_reachability/reachability.cpp
#include <iostream> #include <vector> using namespace std; using std::pair; int reach(vector<vector<int> > &adj, int x, int y) { int n = adj.size(); bool visited[n]; for (int i=0;i<n;i++) visited[i]=false; vector<int> stack; visited[x-1] = true; stack.push_back(x); while (!stack.empty()) { int b...
ALGO
0.999982
3.923895
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2020-06-30T17:42: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": "7576edebe...
aa5d914b-6cb0-4028-8cbc-fc150d479ea7
ishandutta2007/codeforces-g
gepardo/normal/1045/D.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; const int block = 314; vector<int> ed[N]; vector<int> big[N]; int n, q; double p[N], sum[N]; int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) scanf("%lf", &p[i]); for (int i = 1; i < n; i++) { int u, v; scanf("%d...
ALGO
0.999779
4.22999
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:55:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ccca423e9842...
7f46354c-5679-4835-9200-151d83fdb590
ishandutta2007/codeforces-c
crashed/normal/1290/F.cpp
#include <cmath> #include <cstdio> #define rep( i, a, b ) for( int i = (a) ; i <= (b) ; i ++ ) #define per( i, a, b ) for( int i = (a) ; i >= (b) ; i -- ) const int mod = 998244353; const int MAXN = 10, MAXSU = 45, MAXS = ( 1 << 5 ) + 5; template<typename _T> void read( _T &x ) { x = 0; char s = getchar(); bool ...
ALGO
0.999979
4.262856
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9eccab51e74e...
adb4bb12-c96d-4448-936e-8cf918834049
Benshakalaka/DataStructure
数据结构/279_内部排序/插入排序、折半插入、2路插入/code/折半插入.cpp
#include <stdio.h> #include <malloc.h> //插入排序法 //时间复杂度为O(n^2) void Insert(int *a,int len) { int i,temp; for(i=1;i<len;i++) if(a[i]<a[i-1]) { temp = a[i]; for(int j=i-1;temp < a[j];j--) a[j+1] = a[j]; a[j+1] = temp; } } //折半插入排序 //时间复杂度为O(n^2) void zhe_cha(int *a,int len) { int s...
ALGO
0.999957
3.484936
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-11-17T12:33: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": "ff4e255bde...
4017c252-1f39-4301-8317-1fd2ee786ac9
simbody/simbody
Simbody/tests/adhoc/MovingMusclePointMomentArm.cpp
/* -------------------------------------------------------------------------- * * Simbody(tm) Adhoc test: Moving Muscle Point Moment Arm * * -------------------------------------------------------------------------- * * This is part of the SimTK biosimulation toolkit originating from * ...
ALGO
0.958386
5.185566
{ "github_metadata": { "branch": "master", "commit_count": 5026, "repo_created_at": "2013-08-16T00:21:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2427, "forks": 483, "issues": 136, "pull_requests": 21 }, "file_meta": { "content_id": "...
01b77a0b-5211-41aa-8132-deec67ef200c
ehnryx/acm
samara-2014-cf100488/k.cpp
#include <bits/stdc++.h> using namespace std; #define _USE_MATH_DEFINES typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef complex<ld> pt; typedef vector<pt> pol; const char nl = '\n'; const int INF = 0x3f3f3f3f; const ll INFLL = 0x3f3f3f3f3f3f3f3f; const ll MOD = 1e9+7; const ld EPS = 1...
ALGO
0.999984
4.279979
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2018-05-03T04:18:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "673ba8954...
ace00ad4-8210-4c74-96c9-0ca336726628
ra2003/Plagiarism
dataset/test/modification/1526_all/47/transformation_1.cpp
#include <iomanip> #include <iostream> #include<bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define ll long long #define bs binary_search #define ld long double typedef pair<int, int> pii; #define eb emplace #define ff first #define ss second #define pb push_back #define sz(x) (ll)...
ALGO
0.999889
4.354322
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2022-08-06T10:23:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "433756c3f95...
af4332e8-0ab9-404d-aec0-a4cd39d85c4f
Minipoloalex/comp_prog
spoj/orderset/order_statistics.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; template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; using os = ordered_set<int>; void solve() { ...
ALGO
0.999732
4.582178
{ "github_metadata": { "branch": "main", "commit_count": 529, "repo_created_at": "2023-08-01T10:35: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": "170843b87c...
f700391c-9bf1-4fd3-8b72-78050b44f9ca
Lichthagel/advent-of-code-2015
day13/main.cpp
#include <input.hpp> #include <unordered_map> #include <regex> #include <vector> #include <cassert> #include <iostream> class HolidayFeast { private: std::unordered_map<std::string, std::unordered_map<std::string, int>> happiness_table; std::regex regex; public: HolidayFeast(); ~HolidayFeast(); void parseLi...
ALGO
0.999924
4.617471
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2023-11-03T16:14: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": "1d261747d97...
6b292596-b376-4522-b848-cdf67ed9c126
hari9-9/Problem_Solving
LeetCode/Binary Trees/binary_tree_level_order_traversal_hari.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999946
5.881515
{ "github_metadata": { "branch": "master", "commit_count": 871, "repo_created_at": "2019-12-02T06:59: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": "f923450f...
7c9ec372-c085-4779-8026-c7107be3f29c
SarthakKeshari/CPP-Questions-and-Solutions
Data Structure/Stack/Next_Greater_Element.cpp
// GFG Link to question - https://practice.geeksforgeeks.org/problems/next-larger-element-1587115620/1 // This Code is Contributed by <NAME> (Username-----> Master-Helix) // Function to print the Next Greater Element using Stack vector<long long> nextLargerElement(vector<long long> arr, int n){ ve...
ALGO
0.999969
5.273251
{ "github_metadata": { "branch": "main", "commit_count": 738, "repo_created_at": "2021-08-19T12:41:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 44, "forks": 131, "issues": 38, "pull_requests": 4 }, "file_meta": { "content_id": "f9c040...
4ca4afb0-0405-4f0d-a6d5-ee7200cd2559
BlueberryPie-kyle/Algorithm-Exercise
LuoGu/P2758.cpp
#include <bits/stdc++.h> #define endl "\n" using namespace std; const int N = 2005; int dp[N][N]; char a[N], b[N]; void solve() { cin >> a >> b; int la = strlen(a), lb = strlen(b); for (int i = 0; i <= la; i++) { for (int j = 0; j <= lb; j++) { if (i == 0 || j == 0) { ...
ALGO
0.999951
4.205735
{ "github_metadata": { "branch": "master", "commit_count": 126, "repo_created_at": "2023-05-27T09:08: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": "982aef64...
c0e7da70-cf94-4f86-a974-0a3c95fc0bba
ishandutta2007/codeforces-h
hogloid/normal/543/A.cpp
#include<bits/stdc++.h> #define REP(i,m) for(int i=0;i<(m);++i) #define REPN(i,m,in) for(int i=(in);i<(m);++i) #define ALL(t) (t).begin(),(t).end() #define CLR(a) memset((a),0,sizeof(a)) #define pb push_back #define mp make_pair #define fr first #define sc second using namespace std; #ifndef ONLINE_JUDGE #define dum...
ALGO
0.999931
3.599172
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15f72675a7ae...
713fb0b8-8ab7-4f00-b241-ed5b5b92fae0
ishicode/semistatic-slam
src/SLAM_Headers/Odometry.h
#pragma once #include <math.h> #include <gtsam/geometry/Pose2.h> #include <gtsam/geometry/Point2.h> #include <gtsam/geometry/Point3.h> #include <gtsam/geometry/Rot2.h> #include <gtsam/inference/Symbol.h> #include <Eigen/Geometry> #include <Eigen/Dense> #include <cmath> #include <iostream> #include "Random.h" using na...
ALGO
0.97722
5.30793
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2022-06-10T03:26:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa4205be46d...
11768322-da9f-4b39-99fd-d848d587ad36
mejibyte/competitive_programming
NEERC/2010-2011 Northern Subregional/kitchen/kitchen.cpp
// <NAME> using namespace std; #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <sstream> #include <fstream> #include <cassert> #include <climits> #include <cstdlib> #include <cstring> #include <string> #include <cstdio> #include <vector> #include <cmath> #include <queue> #includ...
ALGO
0.999903
4.026146
{ "github_metadata": { "branch": "master", "commit_count": 355, "repo_created_at": "2011-10-27T01:25:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 196, "forks": 66, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "f661c...
31d5532d-077c-4c19-8ee1-f74413c05cd9
paisuhas/AdventOfCode
2024/02/main.cpp
#include <algorithm> #include <cstddef> #include <fstream> #include <iostream> #include <sstream> #include <string> #include <vector> int main() { std::ifstream input("test.txt"); auto safe_count = 0u; for (std::string line;std::getline(input, line);) { long prev, curr, diff; bool decreasi...
ALGO
0.999156
4.117053
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-12-03T18:38:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bdee303f4...
977f3207-568f-493b-81b3-e1c938037e80
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p04008/s769361076.cpp
// Template #include <bits/stdc++.h> #define rep_override(x, y, z, name, ...) name #define rep2(i, n) for (int i = 0; i < (n); ++i) #define rep3(i, l, r) for (int i = (l); i < (r); ++i) #define rep(...) rep_override(__VA_ARGS__, rep3, rep2)(__VA_ARGS__) #define all(x) (x).begin(), (x).end() #define sz(x) (int)(x).size(...
ALGO
0.999967
4.359869
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-06-06T16:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "0e1175744e...
6dcaddd9-6dbe-4f1a-b32a-0841198fbf8d
LoPA607/Parallel_Programming
standard_dev.cpp
#include <iostream> #include <vector> #include <cmath> #include <omp.h> double computeMean(const std::vector<int>& data, int num_threads) { double sum = 0.0; #pragma omp parallel for reduction(+:sum) num_threads(num_threads) for (size_t i = 0; i < data.size(); i++) { sum += data[i]; ...
ALGO
0.999919
5.893797
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2024-10-11T20:11:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb8089abf55...
8eceb1bf-367a-4882-b63f-39f949f13866
Rookie0208/Learnings
Cpp DSA/find_intersection.cpp
#include<bits/stdc++.h> using namespace std; void intersection(vector<int> &a, vector<int> &b) { set<int> s; for(int i : a) { int f = find(b.begin(), b.end(), i)-b.begin(); if(f != b.size()) s.insert(i); } for(auto i : s) cout << i << " "; // TC : O(n) * log(n) // SC : O(1) } v...
ALGO
0.999974
3.745938
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-09-27T14:31:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f22eba5432...
018e8fc3-5e35-431e-9b64-63d4f11777f8
YangFengCodeCode/algorithm
double_pointer/double_pointer/Test.cpp
#define _CRT_SECURE_NO_WARNINGS 1 #include<iostream> using namespace std; #include<vector> class Solution1 { public: void moveZeroes(vector<int>& nums) { for (int cur = 0, dest = -1; cur < nums.size(); cur++) { if (nums[cur]) { swap(nums[++dest], nums[cur]); ...
ALGO
0.999785
4.571563
{ "github_metadata": { "branch": "main", "commit_count": 98, "repo_created_at": "2023-12-20T11:47: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": "ed4441cb310...
b5d22ad5-13be-4541-a394-0112fea0c869
aomiki/ssau-general-programming
1year/2semester/LR/OTYAP/LR4/Program_lvl2.cpp
#include <fstream> #include <vector> #include <cstring> #include <iostream> using namespace std; const char* INP_FILENAME = "input.txt"; const char* OUTP_FILENAME = "output.txt"; /// @brief Типы лексем const char* CO = "co"; const char* KW = "kw"; const char* ID = "id"; const char* WL = "wl"; const char* VL = "vl"; ...
ALGO
0.965131
3.275552
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2023-10-16T05:08: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": "7188f251b81...
d42e9ed0-2e87-4d9c-bcda-7d760c1785f1
ishandutta2007/codeforces-b
bench0310/normal/1332/G.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n; int get_prv(set<int> &s,int idx) { auto it=s.lower_bound(idx); if(it==s.begin()) return 0; else return (*prev(it)); } int get_nxt(set<int> &s,int idx) { auto it=s.lower_bound(idx); if(it==s.end()) return 0; else retur...
ALGO
0.999844
4.065804
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05: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": "f062ae614445...
fbb178ae-0dc3-42c7-9050-717673e1f927
nguyen-trinhtk/wiedemann-analyzer
linboxbuild/ff-install/include/fflas-ffpack/fflas/fflas_sparse/ell/ell_spmv.inl
/* * Copyright (C) 2014 the FFLAS-FFPACK group * * Written by <NAME> <<EMAIL>> * * * ========LICENCE======== * This file is part of the library FFLAS-FFPACK. * * FFLAS-FFPACK is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public * License as publishe...
ALGO
0.99876
6.178411
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2025-06-20T13:21: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": "da06a04bbad...
09cc7baf-35df-4ee7-b53a-6d76489bcf4b
3zair/algorithm_practice
leetcode/155.cpp
#include <cstdio> #include <vector> using namespace std; // 1.最小绝对差 vector<vector<int> > minimumAbsDifference(vector<int>& arr) { vector<vector<int> > result; sort(arr.begin(), arr.end()); int difference = arr[1] - arr[0]; int r[2] = {arr[0], arr[1]}; vector<int> rVector(r, r + 2); result.push...
ALGO
0.999963
4.228508
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-09-10T10:31: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": "167cca805...
4e8487bd-6b0a-4e31-8a1c-37c9968d9e52
ishandutta2007/codeforces-r
rushcheyo/normal/438/E.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 100005, G = 3, P = 998244353, inv2 = P + 1 >> 1; typedef vector<int> poly; int power(int a, int x) { int ans = 1; for (; x; x >>= 1, a = 1ll * a * a % P) if (x & 1) ans = 1ll * ans * a % P; return ans; } void fft(int *a, int n, int inv) { for (int ...
ALGO
0.999981
4.014274
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58: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": "fd579b5c6c69...
30d696bf-0281-4c6f-8505-0342edffcd9b
lcit/ext3DLBP
examples/convert_3d_texture_cpp/main.cpp
/* ========================================================================================== Author: <NAME> Company: Filename: main.cpp Last modifed: 06.04.2017 by <NAME> Description: Extended three-dimensional rotation invariant local binary patterns (LBP) * Please cite the article:...
ALGO
0.977688
5.913207
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2017-04-06T21:24:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "301e8219...
15da64aa-31c6-4d40-a835-be232d34a1f7
ishandutta2007/codeforces-n
never_giveup/normal/765/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 2e5 + 100; int n; int f[maxn], parent[maxn]; int dsu_get(int x){ return x == parent[x] ? x : parent[x] = dsu_get(parent[x]); } void dsu_unite(int x, int y){ x = dsu_get(x), y = dsu_get(y); if (x > y) swap(x, ...
ALGO
0.999892
3.842472
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35: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": "4dec75d46b82...
a201e3aa-f3ef-45a0-96bd-73fc288b797e
ishandutta2007/codeforces-x
xyf007/normal/1436/E.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <vector> using namespace std; struct node { int ls, rs, minn; } t[8000001]; int n, a[100001], root[100001], tot; vector<int> pos[100002]; void checkmin(int &x, int y) { if (x > y) { x = y; } } void pushup(int ...
ALGO
0.999974
3.396338
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:38:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f067fc9e8d1...
8f48fa54-0ef8-4e3b-ae1a-723aa00c8e5c
zhuyali/algorithm_sets
动态规划-找零问题/main.cpp
#include <iostream> #include <string> #include <fstream.h> #define MAX 100000 int change(int j, int t[], int n); void main() { ifstream fin("input.txt"); ofstream fout("output.txt"); int n = 0; int j = 0; int *t=new int[3]; fin>>n; for(int i = 0; i < n; i++) fin>>t[i]; fin>>j; int result = 0; result...
ALGO
0.999894
3.388137
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-07-11T08:12: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": "71e6983f91...
208f5ce5-ca85-4c54-ae08-2896b1265d7d
MaratKamalovPD/Algorithms_and_data_structures
Module3/Task2/task2.cpp
// Задача 2. Количество различных путей(3 балла) // Обязательная задача // Дан невзвешенный неориентированный граф.В графе может быть несколько кратчайших путей между какими - то вершинами.Найдите количество различных кратчайших путей между заданными вершинами. // Требования: сложность O(V + E). // Формат ввода. // v :...
ALGO
0.999492
5.209287
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-08-02T10:26: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": "1d0688f64bc0...
21e33e87-cdb6-4291-a83b-ff4bc05c07e2
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/05/0525/personal_submission/cf962d_yakultgo.cpp
#include <bits/stdc++.h> #define endl '\n' using namespace std; typedef long long ll; void solve() { int n; cin >> n; vector<ll> a(n); for (auto &x : a) { cin >> x; } priority_queue<pair<ll, int>, vector<pair<ll, int>>, greater<>> pq; for (int i = 0; i < n; i++) { pq.push({a...
ALGO
0.999957
3.830665
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "7bd4...
3ee6983f-6e64-4da9-9213-7684b379f87a
Croquetx/Virtus-Walkthrough
draw/MATRIX.CPP
/*------------------------------------------------------------------------------ * Virtus WalkThrough_ * Version 1.1.1 * * Copyright _ 1990-1992 by Virtus Corporation * All Rights Reserved * Written by * <NAME> * * Virtus Corporation * Suite 204 * 117 Edinburgh South * Cary, North Carolina 2751...
TOOL
0.993114
3.71444
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-08-23T17:41:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5dd50ac9a6e9...
54511f98-9524-4f55-ace5-4463a3b9fbf2
shibainudaifuku/Competitive-Programming
ABC/356/b.cpp
#include <iostream> #include <vector> using namespace std; vector<int> readRequiredIntakes(int nutrientKinds) { vector<int> requiredIntakes(nutrientKinds); for (int i = 0; i < nutrientKinds; ++i) { cin >> requiredIntakes[i]; } return requiredIntakes; } vector<int> readDailyIntakes(int dayCount...
ALGO
0.999967
5.110828
{ "github_metadata": { "branch": "main", "commit_count": 621, "repo_created_at": "2023-01-26T06:28: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": "1f6971b6f7...
4a1694b7-110a-4517-9503-babe6c61c098
abhijite-bd/Codeforces
Justifier_II.cpp
#include <bits/stdc++.h> #define ll long long int #define gcd(a, b) __gcd(a, b) #define lcm(a, b) (a * b) / gcd(a, b) #define ss ' ' #define fast() \ ios_base::sync_with_stdio(0); \ cin.tie(NULL); \ cout.tie(NULL) #define max3(a, b, c) max(max(a, b), c) #define min3(a, b, c...
ALGO
0.999809
3.773087
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-03-05T19:39:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d24ccfc19...
30131839-8db5-46db-9b4e-23a04017b449
anlewy/algorithmTemplate
include/graph.h
// // @author <EMAIL> // @create 2021/2/22 8:25 下午 // #ifndef ALGORITHMTEMPLATE_GRAPH_H #define ALGORITHMTEMPLATE_GRAPH_H #include <vector> #include <string> // 结构定义 struct Edge { int from, to; int weight; Edge():from(-1), to(-1), weight(-1) {} Edge(int from, int to, int weight): from(from), to(to)...
ALGO
0.998553
5.06878
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2021-02-22T07:12:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ba40c59014...
a91f1f3b-9b6e-42bd-ad52-f30f010705bc
sohamdixit/CodeChef
JULY15/MCHEF.cpp
#include <iostream> #include <cmath> #include <cstring> #define INT_MAX 999 const int MAXARR = 262144; using namespace std; //For debugging template <class T> void print(char name[], T *A , int beg , int end) { cout << name << ": "; for (int i = beg; i <= end; i++) cout << A[i] << ","; cout << endl; } //Fast ...
ALGO
0.999914
3.649628
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-09-03T16:33:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9752db7b2e...
4c950432-2220-42b0-9110-8c058be243a6
GoracioNewport/pr
study/tinkoff/elimination2021/A'A6Stress.cpp
//#pragma GCC optimize("Ofast") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") //#pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> // Author: @GoracioNewport using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> p32; typedef pair<ll,ll> p64...
ALGO
0.999558
3.948645
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2021-04-18T14:05:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d90e2d9d...
55a82780-e7d1-43f0-b851-6b75095d367f
elifesciences-publications/bpps-sipris-code
lib/libgsmo/gmb_smpl.cc
/****************************************************************************************** Copyright (C) 1997-2014 <NAME>, Cold Spring Harbor Laboratory and the University of Maryland School of Medicine. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and...
ALGO
0.996083
3.094211
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-01-08T04:44:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db79581bace...
d29fa234-d4f0-474b-bef6-8b6232a51186
akueisara/algo-on-graphs
week 6/dist_with_coords/dist_with_coords.cpp
// Failed case #9/9: unknown signal 11... don't know how to slove it QQ #include <cstdio> #include <cassert> #include <vector> #include <queue> #include <limits> #include <utility> #include <cmath> #include <map> using namespace std; // See the explanations of these typedefs and constants in the starter for friend_s...
ALGO
0.999976
4.689242
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2016-12-14T08:28:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 109, "forks": 57, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6d46fa...
ad5e257a-59f8-4cba-a112-3800de1ed1ad
luismoax/Competitive-Programming---luismo
RPC/Competencia 08 RPC 2022 -- Agosto 20, 2022/Solutions/J.cpp
/* Author: <NAME> (LUISMO) Problem: Link: Online Judge: Idea: */ #include<bits/stdc++.h> // Types #define ll long long #define ull unsigned long long #define ld long double // IO #define sf scanf #define pf printf #define mkp make_pair #define fi first #define se second #define M_PI 2.0 * acos(0) #define endl ...
ALGO
0.999941
3.980495
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2020-03-28T14:52:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94beb46a...
dbdfbbd7-de5a-4448-8dd0-290a9276aecc
SSAHARIA7/DSA
Binary Search/q16.cpp
#include <iostream> #include <vector> #include <algorithm> int aggressiveCows(std::vector<int> &stalls, int k) { std::sort(stalls.begin(),stalls.end()); int low = 1; int high = stalls.at(stalls.size()-1); int maxLeastDist{INT32_MIN}; while(low<=high){ int leastDist{INT32_MAX}; int mi...
ALGO
0.999982
4.856382
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-07T08:38: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": "b84c772c314f...
0343257d-95c2-457f-acb1-d7de37c26e37
igorkurnikov/HAPACK
WOLFGANG/IPACK/f.cpp
/*TEX % % IPACK - QCHEM % Quantum Chemistry Project: Integral Package % Copyright (C) 1994 : <NAME>, University of Dortmund % % This program is proprietary software. Unlicensed use and distribution % of this program or parts thereof are illegal. For details on the % license, see the LICENSE section in the file "ipack....
ALGO
0.993527
3.889596
{ "github_metadata": { "branch": "master", "commit_count": 573, "repo_created_at": "2025-07-07T18:59: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": "2b6b6f49...
36d6b2ba-df92-49f6-a7a2-77fee04069a5
jwakely/CppPerformanceBenchmarks
convolution_box.cpp
/* Copyright 2019-2021 <NAME> Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://stlab.adobe.com/licenses.html ) Goal: Test compiler optimizations related to box filter convolution operations. (common in imaging, audio, simulation, and scientific comput...
TEST
0.974626
5.803439
{ "github_metadata": { "branch": "master", "commit_count": 153, "repo_created_at": "2022-03-27T21:35:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4228ff7...
3465c406-7fe5-4743-b383-238a27514621
anirudhgupta03/InterviewBit
Dynamic Programming/Scramble String.cpp
//Recurive Approach int Solution::isScramble(const string A, const string B) { if(A.size() != B.size()){ return false; } int n = A.size(); if(n == 0){ return 1; } if(A == B){ return true; } if(n < 1){ return false; } for(int i = 1; i...
ALGO
0.999995
5.606207
{ "github_metadata": { "branch": "main", "commit_count": 1012, "repo_created_at": "2020-12-28T12:44:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "84558bbda...
936ca91f-b4d9-44c5-8cfc-2e4cd65ee779
ebi-fly13/Library
tree/rerooting.hpp
#pragma once #include <cassert> #include <utility> #include <vector> #include "../graph/base.hpp" #include "../tree/heavy_light_decomposition.hpp" namespace ebi { template <class T, class V> struct rerooting_dp { template <class MERGE, class PUT_EDGE, class PUT_ROOT> rerooting_dp(const Graph<T> &tree, const...
ALGO
0.999534
5.931065
{ "github_metadata": { "branch": "main", "commit_count": 1223, "repo_created_at": "2021-01-04T14:28:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "f1d831b9f...
a20321f3-3949-4c50-8190-4d040f739850
DarringZhang/GitRepository
Experiments/DS_experiments/upload/2017011760_4_tex/code/4.1/Articulation.h
// // Created by Darring on 2018/11/29. // #ifndef INC_4_1_ARTICULATION_H #define INC_4_1_ARTICULATION_H /* * 关键节点:无向连通图中,去掉顶点v 及其所连接的边后,G不连通,v is articulation points * 不是关键结点:当前结点 的相邻白色节点 与 当前结点的前驱之一 之间 有一条路径, 当前结点不是key * 寻找关键节点:计算结点的low 值 * low值:隐藏最早发现时间 :即最早发现的祖先的d值 * 比较有三,取min:1.该结点v的访问时间d; 2.v的有回边相连的邻接灰色节点...
ALGO
0.999825
4.237308
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2018-10-31T02:01:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6988f33ba...
a5321765-9087-4f40-aef7-1d3c00321a15
andyzhu23/Competitive-Programming
USACO/2016/December/Gold/ Cities and States.cpp
#include <iostream> #include <math.h> using namespace std; const int N = 1e3+10; int n,f[N],fi,fj; long long ans; struct cow{ int x,y; }cows[N]; long long dist(long long a, long long b){ long long x = cows[a].x - cows[b].x; long long y = cows[b].y - cows[a].y; return pow(x,2) + pow(y,2); } int Find(in...
ALGO
0.999963
3.946011
{ "github_metadata": { "branch": "main", "commit_count": 2404, "repo_created_at": "2021-02-13T17:40:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce67ded5...
fd0a5a89-1f6d-4521-a9d3-09cc558a1a2f
odiubankov/AlgorithmicChallenges
cpp/leetcode/Google/Top/801_MinimumSwapsToMakeSequencesIncreasing.h
//https://leetcode.com/problems/minimum-swaps-to-make-sequences-increasing/ #ifndef ALGORITHMICCHALLENGES_801_MINIMUMSWAPSTOMAKESEQUENCESINCREASING_H #define ALGORITHMICCHALLENGES_801_MINIMUMSWAPSTOMAKESEQUENCESINCREASING_H #include <vector> #include <algorithm> #include <limits> using namespace std; // [3,3,8,9,10] ...
ALGO
0.999962
6.363032
{ "github_metadata": { "branch": "master", "commit_count": 254, "repo_created_at": "2017-04-11T19:44:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db1e85a2...
453e2f7e-c13b-4b56-9599-625f6c5b02e9
vieruuuu/bachelor-thesis
pyin_helper/pyin_helper_old.cpp
void write_output(real_t observation_probs[2 * n_pitch_bins], real_t voiced_prob, stream<real_t, 2 * n_pitch_bins> &observation_probs_stream) { for (int i = 0; i < 2 * n_pitch_bins; ++i) { #pragma HLS PIPELINE II = 1 rewind observation_probs_stream.write(observation_probs[i]);...
ALGO
0.995272
6.282818
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-05-01T23:08:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "166b85e5a11...
50f40bbe-c6db-4c91-bc9e-85ea42538365
uzair1355/OOPS-LAB-PROGRAM
datedayscounter.c++
#include <iostream> using namespace std; int daycounterof1styear(int year, int day, int month) { int daycounter = 0, flag = 0; for (int i = month; i <= 12; i++) { switch (i) { // counting days for the first date till that month in that year with respective months as 31 and 30? ...
ALGO
0.99988
3.933285
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-02T08:44:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "320268b27769...
b9ca7715-8b54-4e58-8eab-242612b7d9da
EASINTUHA/Contest-provlem-Solve
week 18/day 2/C_Absolute_Zero.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define ff first #define ss second #define pb push_back #define all(x) x.begin(), x.end() #define sz(x) (int)(x)...
ALGO
0.999831
3.437164
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2024-04-03T17:32: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": "52c9edd525c...
2a08d6b7-56df-4cbb-8eed-9fe58db51198
rakib181/CP-STAFF
Binary Search/Signature Nightmare.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; const int N = 1e5 + 9, MX = 1e9 + 7; int n, k, a[N], b[N]; bool possible(int x) { ll have = k; for (int i = 1; i <= n; i++) { ll need = 1LL * x * a[i] - b[i]; if (need > have) return false; if (need > 0) have -= need; } return true; } signed...
ALGO
0.999998
4.160966
{ "github_metadata": { "branch": "main", "commit_count": 1320, "repo_created_at": "2022-05-19T19:29: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": "27abffaec...
dce4a4d4-71c0-4195-886e-861360437b32
Leon-56/LeetCode
剑指offer/最小的K个数.cpp
class Solution { public: vector<int> GetLeastNumbers_Solution(vector<int> input, int k) { vector<int> ans; if(k > input.size() || k <= 0) return ans; find(input, k - 1); for(int i = 0; i < k; i++) ans.push_back(input[i]); return ans; } void find(vector<int...
ALGO
0.999992
6.513804
{ "github_metadata": { "branch": "master", "commit_count": 106, "repo_created_at": "2019-09-27T09:52:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ded3b013...
69af3d58-f8be-4bbe-9138-de2c2d6eae25
mauriciopoppe/competitive-programming
UVa/10600/10688.the-poor-giant.cpp
#include <bits/stdc++.h> #define INF int(1e9*2) using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; int dp[501][501]; int solve(int k, int n) { if (n == 0) return 0; if (n == 1) return k; int &res = dp[k][n]; if (res != -1) return res; res = INF; for (int i = 1...
ALGO
0.99983
3.394916
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2018-02-05T05:31:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75823a8bc...
753909f2-34c3-465e-bf7d-9e2f5d25b350
g0729/Algorithm
백준/Gold/1565. 수학/수학.cc
#include<iostream> #include<cmath> #include<algorithm> #include<vector> using namespace std; int gcd(int n, int m) { int a, b, c; a = max(n, m); b = min(n, m); c = a % b; while (c != 0) { a = b; b = c; c = a % b; } return b; } int main() { int a, b; cin >> a >> b; int* arrd; int* arrm; arrd = new int...
ALGO
0.999894
3.801641
{ "github_metadata": { "branch": "main", "commit_count": 2327, "repo_created_at": "2024-03-27T07: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": "bb5c98b2d...
b512fb77-35fe-491d-a13f-70bdbc51a913
shashankatgit/EDx-cp-codes-cpp
week1/3.cpp
#ifdef JUDGE #include <fstream> std::ifstream cin("prepare.in"); std::ofstream cout("prepare.out"); #else #include <iostream> using std::cin; using std::cout; #endif #include<limits.h> int main() { bool theory = false; //theory flag bool pract = false; //practice flag unsigned n; unsigned t[100]; ...
ALGO
0.999927
3.553585
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-01-12T05:48: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": "10ec3d5c98...
12b71742-4318-4590-840f-089112e49ea9
JThanat/Algorithm
mcm.cpp
#include <stdio.h> int p[105]; int mcm[105][105]; int min(int a, int b) { // negative value represents infinity if(a < 0) return b; else if (b < 0) return a; else return a < b ? a : b; } int main() { int n; scanf("%d",&n); for(int i = 0 ; i <= n ;i++) { scanf("%d",&p[i]); } ...
ALGO
0.999918
3.195848
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2016-09-24T07:27:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82cf2b5f2...
069fe3fb-3cf7-48d6-93e9-7ab117f7dfc6
AMlhdSan/code
mxt4.cpp
#include <bits/stdc++.h> #define N 5010 #define int long long using namespace std; int T; int n; int a[N]; int lcp[N][N]; int f[N][N]; int g[N][N]; int sum; inline int read() { int x = 0, f = 1; char ch = getchar(); while (ch < '0' || ch > '9') { if (ch == '-') f = -1; ch = getchar(); ...
ALGO
0.999831
4.055468
{ "github_metadata": { "branch": "master", "commit_count": 376, "repo_created_at": "2024-09-11T14:06:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3b96ece...
35e38ced-fa98-4703-81c0-e01e577fe82e
nvhiii/fw23
cpp/notes_code/lec3_ch4TB/something.cpp
#include <iostream> #include <iomanip> using namespace std; // Function to check if the input is a valid 5-digit integer bool isValidNumber(int number) { return number >= 10000 && number <= 99999; } int main() { int number; cout << "Enter a 5-digit integer: "; cin >> number; if (isValidNumber(n...
ALGO
0.999793
6.123344
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-09-15T18:37:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2cba7365f2e...
c6dae4f4-1c4e-41a2-af79-1c1a3dfdc742
Techriss/leetcode
1103.cpp
#include <iostream> #include <vector> using namespace std; // simply simulate vector<int> distributeCandies(int candies, int num_people) { vector<int> v(num_people, 0); for (int l = 0; candies > 0; l++) { for (int i = 0; candies > 0 && i < num_people; i++) { int res = min(l*num_people + i+...
ALGO
0.999984
4.85183
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-07-27T13:22: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": "f8e3fcd5ab5...
22845f6c-82bc-449f-9407-4cdd8e096a3d
randeep01/basics
practice/rainwater2/Source.cpp
#include <iostream> #include<vector> using namespace std; int getTotalSum(vector<int> data, int s){ vector <int> left_max(s); vector <int> right_max(s); int lmax = data[0]; int rmax= data[s-1]; int total = 0; for(int i = 0;i<s;i++){ if(lmax<data[i]) lmax = data[i]; left_max[i] = lmax; ...
ALGO
0.999959
3.701312
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2024-11-23T06:57: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": "98e37ed1a...
e8a31f8f-4364-4c16-8924-ca482ae1ea43
ishandutta2007/codeforces-y
yarek/normal/542/E.cpp
#include <cstdio> #include <vector> #include <queue> using namespace std; vector<int> g[1001]; bool vis[1001]; int col[1001]; vector<int> compound; bool dfs(int v, int color) { if(col[v]) return color == col[v]; col[v] = color; compound.push_back(v); for(auto u: g[v]) if(!dfs(u, 3 - color)) return fa...
ALGO
0.999296
3.666416
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:40:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5305530b7878...
40e5db53-bd59-4dde-b9f3-6ec1554eab12
mt-shihab26/dsa_library
02_basic-algorithms/recursion/cpp/zobayer_20_recursion_problems/03_remove_all_odd_integers_from_an_array.cpp
/* Problem 3: Write a recursive program to remove all odd integers from an array. You must not use any extra array or print anything in the function. Just read input, call the recursive function, then print the array in main(). Input: 6 1 54 88 6 55 7 Output: 54 88 6 */ #include <bits/stdc++.h> using namespace std; #...
ALGO
0.999842
5.155612
{ "github_metadata": { "branch": "main", "commit_count": 158, "repo_created_at": "2022-06-19T11:42: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": "d630d8cdf2...
e6a599cc-9a68-4614-9dc9-00a0abb1dabc
AklankJain/Codes
fibosum.cpp
#include<iostream> #include<stack> #include<vector> using namespace std; int fibo(long int n) { long int a , b , c , j; a =1 ; b =1; j = 3; // cout<<n<<endl; while(j<=n) { // cout<<"I am here"<<endl; c = a+b; a = b; b = c; j++; } //cout << "hell...
ALGO
0.999955
3.785892
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-03-18T05:21: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": "c9995109f...
3b66a14a-db92-4585-bd31-38e8d36b9748
s4055/BOJ
중급7/[1990]소수인펠리드롬.cpp
#include <stdio.h> #include <vector> using namespace std; #define MAX 10000000 + 1 int era[MAX] = { 0, }; int main() { era[1] = 1; for (int i = 2; i * i < MAX; i++) { if (!era[i]) { for (int j = i * 2; j < MAX; j += i) { era[j] = 1; } } } int a, b; scanf("%d %d", &a, &b); for (int i = a; i <= b;...
ALGO
0.999962
3.23438
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-05-10T14:43:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4bf8c8f9e...
de77f8d7-c5cc-4307-a507-adea8c085fb4
tmoux/prog-contests
codeforces/1245/e/e.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int maxn = 15; int h[maxn][maxn]; double dp[maxn][maxn]; pair<int,int> nxt(pair<int,int> curr, int r) { //cout << curr.first << ' ' << curr.second << ' ' << r << endl; if (r == 0) return curr; if (((curr.first%2==1) && curr.second =...
ALGO
0.997935
3.812303
{ "github_metadata": { "branch": "master", "commit_count": 288, "repo_created_at": "2018-10-21T03:33:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dfa1d227...
19ecd339-1f07-4143-b652-ab1be7304674
silmerusse/fudge_pathfinding
include/vertex_matrix.h
#ifndef FUDGE_VERTEX_MATRIX_H_ #define FUDGE_VERTEX_MATRIX_H_ #include <algorithm> #include <string> #include <sstream> #include <limits> namespace fudge { using Coord = std::pair<int,int>; template<typename WeightType> class VertexMatrix { public: VertexMatrix(int width, int height, const std::vector<WeightType>...
TOOL
0.931773
6.429042
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2014-09-22T13:36:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 75, "forks": 20, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "227a564...
daf545b3-84d2-46c0-a28c-be8ce2914471
FrostyPqnda/Coding-Projects
C++/CombinatorialCalculator.cpp
#include <iostream> #include <stdio.h> using namespace std; static unsigned long long Factorial(unsigned long long n); static unsigned long long Combination(unsigned long long a, unsigned long long b); int main() { unsigned long long x; cout << "Enter an integer: "; cin >> x; unsigned long long ...
ALGO
0.997244
5.086689
{ "github_metadata": { "branch": "master", "commit_count": 1033, "repo_created_at": "2020-02-04T15:22:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebd360a...
4800c743-c9fb-44f9-9925-cb89276dfc67
theVCS/websites_solutions
codeforces/cpp/1512G.cpp
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> //using namespace boost::multiprecision; using namespace std; #define ll long long int //#define bint cpp_int #define pii pair<int, int> #define mod 1000000007 #define REP(i, a, b) for (int i = a; i <= b; i++) #define RREP(i, a, b) for (int i = a; i...
ALGO
0.999677
4.38657
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2020-10-14T11:50: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": "a0be9dadc...
bb423ce8-c716-4415-b44b-0fbb456d2258
apache/bookkeeper
circe-checksum/src/main/circe/cpp/gf2.hpp
/******************************************************************************* * Copyright 2014 <NAME> * * 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/lic...
ALGO
0.989445
6.629447
{ "github_metadata": { "branch": "master", "commit_count": 3592, "repo_created_at": "2011-04-06T07:00:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1955, "forks": 960, "issues": 244, "pull_requests": 126 }, "file_meta": { "content_id": ...
7a2dda2a-5b08-4f4b-8290-c4b5bece7e1e
Andree3L/CPE
CPE/Atividade 3/6.cpp
#include <iostream> using namespace std; int main() { float l1, l2, l3; cout << "digite o lado 1 do triangulo: " << endl; cin >> l1; cout << "digite o lado 2 do triangulo: " << endl; cin >> l2; cout << "digite o lado 3 do triangulo: " << endl; cin >> l3; if (l1 == l2 && l2 == l3 &&...
ALGO
0.998473
4.267538
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-03-22T19:06: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": "4b84228aae0...
a7a7a4ba-42ea-41d3-a00a-6efced615189
Mahin493/AUST4Years
CSE 2.2/Algorithms Lab/Matrix_ChainMultiplication.cpp
#include <bits/stdc++.h> using namespace std; #define SIZE 100 int m[SIZE][SIZE], s[SIZE][SIZE]; void MATRIX_CHAIN_ORDER(int p[], int length) { int n = length - 1; for (int i = 1; i <= n; i++) { m[i][i] = 0; } for (int l = 2; l <= n; l++) { for (int i = ...
ALGO
0.999905
4.240038
{ "github_metadata": { "branch": "main", "commit_count": 102, "repo_created_at": "2022-01-10T14:16:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a443870149...
ba657d51-adbe-4f7e-995e-e313f57b8e54
ishandutta2007/codeforces-h
heltion/normal/1017/D.cpp
#include<bits/stdc++.h> #define maxn 12 #define maxk 100 using namespace std; int w[maxn], cnt[1 << maxn]; char s[maxn + 1]; pair<int, int> p[1 << maxn]; int ans[1 << maxn][maxk + 1]; int bit(int n){ int result = 0; for(int i = 0; i < n; i += 1) result = result * 2 + s[i] - '0'; return result; } int main(){ int n, ...
ALGO
0.999665
3.378849
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f861a9f81502...
55aa7874-277c-43ae-8336-dca11a853c4d
aldukeman/metis
src/search/por/expansion_core.cc
#include "expansion_core.h" #include "../globals.h" #include "../operator.h" #include <cassert> #include <iostream> #include <algorithm> #include <vector> using namespace std; namespace POR { static inline int get_op_index(const Operator *op) { int op_index = op - &*g_operators.begin(); assert(op_index >= 0...
ALGO
0.998972
5.212471
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-05-03T19:36:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2a21b0b98...
309ee3e4-1aae-4c10-960e-b00d91eff92b
VYCode-4065/DSA-CPP-Question
BinarySearch/FloorCeil.cpp
/* Problem Statement: You're given an sorted array arr of n integers and an integer x. Find the floor and ceiling of x in arr[0..n-1]. The floor of x is the largest element in the array which is smaller than or equal to x. The ceiling of x is the smallest element in the array greater than or equal to x. ...
ALGO
0.999995
6.052281
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-08-27T02:36:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d666dc3be8...
ab1c060f-29a2-4125-83bc-6764700c6a21
anzaika/guidance
libs/phylogeny/computeMarginalAlg.cpp
// $Id: computeMarginalAlg.cpp 1735 2007-02-26 13:46:37Z itaymay $ #include "definitions.h" #include "treeIt.h" #include "computeMarginalAlg.h" #include <iostream> #include <cassert> using namespace std; void computeMarginalAlg::fillComputeMarginal(const tree& et, const sequenceContainer& sc, const s...
ALGO
0.999692
5.301179
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-08-28T12:48:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 3, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "05084466...
c2baf9e1-9520-4af1-bdc1-31b040d3427a
ManashSwain/C_plus_plus_Basic
loops.cpp
// for loop // printing 1 -10 #include <iostream> using namespace std ; int main(){ int n = 10 ; for(int i = 1 ; i <= n ; i++){ cout << "The value of i is : " << i << endl ; } return 0 ; } // while loop // printing 1 - 10 #include <iostream> using namespace std ; int main(){ int n =...
TOOL
0.998104
3.651533
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-07-24T18:10: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": "bab1bf44cb...
f6d44a89-9e9d-4757-8e3d-b51bd14cc03e
Kidus-19/Mini-projects
maze-escape-game/main.cpp
#include <GL/glut.h> #include <vector> #include <stack> #include <algorithm> #include <ctime> #include <cstdlib> #include <cstdio> // Maze dimensions int mazeWidth = 11; int mazeHeight = 11; std::vector<std::vector<int>> maze; // Player position float playerX = 1.0f, playerY = 1.0f; // Exit position int exitX = maze...
ALGO
0.982754
6.705278
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2025-05-04T20:14: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": "5a58e9a58d2...
654347c4-0b7c-408e-bac0-f9c4a60ce34e
nealeyoung/fastpc
mixedpc/2/approx_sum.cpp
// -*- mode: c++; flycheck-clang-language-standard: "c++11"; -*- #include <cstdint> #include <cmath> #include <assert.h> #include <iostream> #include <limits> #include "approx_sum.h" typedef approx_sum_t::exponent_t exponent_t; typedef approx_sum_t::rounded_t rounded_t; typedef approx_sum_t::scalar_t scalar_t; sta...
ALGO
0.994255
5.515757
{ "github_metadata": { "branch": "master", "commit_count": 318, "repo_created_at": "2015-03-14T01:59:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4145e9a3...
a6ec7e1d-8558-47ab-8fa7-8582ec59526c
NGUYENQUOCANH27/19021146-NguyenQuocAnh-2215-50
Luyentap_4a/Bai3.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; class Complex { public: int a, b; Complex() : a(0), b(0) {} Complex(int real, int imag) : a(real), b(imag) {} void print() { if (a == 0 && b == 0) { cout << "0\n"; return; } ...
ALGO
0.97705
5.396514
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-07-07T23:04:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fbbcda4ab9d...
adfd2820-02d5-4296-a566-b1b237cf1b35
rohitsingh0812/invaders
codemp/reinforcements.cpp
#include"inclusionparts.h" void refresh() { W1Bmp.Draw(); if(map==1) refreshLines(); refresh2(); usleep(1000); } void drawLine(int i,int j) { int x=all[i].ownership; int y=all[j].ownership; if(x!=y) { W1.RenderLine(centers[i],centers[j],Red,0.05); } else {...
ALGO
0.992284
3.605432
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-02-28T21:20:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c352424a78...
75c930a0-bc17-475f-9494-9d9ccbb7f108
emilyju0314/gpt_code_plagiarism
dataset/code_content_classifier/ai_code/train/0_0_9580.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Team { long long balloons; long long weight; }; bool compare(Team a, Team b) { return a.balloons > b.balloons; } int main() { int n; cin >> n; vector<Team> teams(n); long long limakBalloons, limakWeig...
ALGO
0.999995
4.68976
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-04-28T03:59:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a942024a58...
a55d72a6-9912-4191-b9b0-0e34f8274792
t-denisova/white-belt
week-2/Контрейнер vector/temperature.cpp
#include <iostream> #include <string> #include <vector> using namespace std; void PrintVector(const vector<int>& v, const double& m) { for (int i = 0; i < v.size(); ++i) { if (v[i] > m) { cout << i << " "; } } } void FindMean (const vector<int>& v, const int& n) { double m = 0; int count = 0; ...
ALGO
0.999969
4.507556
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-08-08T03:18:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "664dc29ee4...