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
34911e4f-8b05-466d-b08d-a6b47974b27f
sabawatara/ProblemSet
integer calc.cpp
#include <iostream> using namespace std; int main() { int num1, num2, sum, difference, quotient, product, remainder; cout<< "Please enter your first number: "<<endl; cout<< ""<<endl; cin>> num1; cout<< "Please enter your second number: "<<endl; cout<< ""<<endl; cin>> num2; sum = num1...
ALGO
0.968356
3.801381
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-03-15T16:22: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": "80e9d54cd8...
4c99180e-1fbc-4592-aadf-71072d9041f5
lipan6461188/icSHAPE-pipe
PsBL/RNA_Structure_Class/src/phmm/utils/rng/rng.cpp
#include <stdio.h> #include <stdlib.h> #include "rng.h" #include <math.h> #define MBIG 1000000000 #define MSEED 161803398 #define MZ 0 #define FAC (1.0/MBIG) t_rng::t_rng(int _prn_gen_seed) { this->iff = 0; // not be modifed; see Knuth. this->prn_gen_seed = _prn_gen_seed; } t_rng::~t_rng() {}; double t_rng::rando...
ALGO
0.998765
4.173164
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-07-13T07:22:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 7, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "27e5c6432...
867316ee-b7d3-4cba-a3df-331e46c04d28
Aaditatgithub/Cant-Cpp
1.1-Arrays/2-TargetSumProblem.cpp
#include <iostream> using namespace std; int main() { // Initialize the array. int arr[] = {1, 5, 7, -1, 5}; int n = sizeof(arr) / sizeof(arr[0]); // Initialize the target sum. int target = 6; // Initialize a flag to indicate if the pair is found. bool found = false; // Iterate through the array. ...
ALGO
0.999906
5.761929
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-07-18T12:29:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "290f7ab27c36...
c157641c-5c33-4236-aca6-65a635d9d3fc
dottantgal/hacker_rank
cplusplus/box_it!/main.cpp
#include<bits/stdc++.h> using namespace std; void Constrain(int &val) { if(val<0) val = 0; if(val>100000) val = 100000; } class Box { private: int l, b, h; public: Box() { l=0; b=0; h=0; } Box(int length, int breadth , int height) { Constrain(length); l = length; Cons...
ALGO
0.994283
3.718529
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-03-28T12:14: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": "90dbd3a6312...
431efc28-e374-434b-a1c3-20495ede06fd
tRowans/clifford-errors
src/cubic.cpp
#include "cubic.h" namespace cubic { int coordToIndex(coord c, int L) { if (0 <= c.xi[0] && c.xi[0] < L && 0 <= c.xi[1] && c.xi[1] < L && 0 <= c.xi[2] && c.xi[2] < L) { return (c.xi[0] + c.xi[1] * L + c.xi[2] * L * L); } else { throw std::invalid_argument("Coord ...
ALGO
0.99788
5.700972
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2021-10-18T09:12:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "edf1d6d0988...
f65b9422-4281-40a1-9380-6c58d1089d61
steventreibly/Data-Structures-and-Algorithms-in-C--C--
Matrices in C/Source.cpp
#include <iostream> #include <stdio.h> #include <stdlib.h> using namespace std; struct Matrix { int *A; int n; }; void Set(struct Matrix *m, int i, int j, int x) { if(i >= j) { m->A[m->n*(j-1) + (j-2)*(j-1)/2 + i-j] = x; } } int Get(struct Matrix m, int i, int j) { if(i>=j) return m.A[m.n*(j-1) + (j-2)*(j...
ALGO
0.999795
3.70908
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-03-15T13:45: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": "738a7c434da...
d1e551bf-08a7-4960-aa63-3580553d4c47
Kataglyphis/VulkanComputeAdventure
Assignment2/src/A2Task2Solution/Naive.cpp
#include "Naive.h" #include "host_timer.h" A2Task2SolutioNaive::A2Task2SolutioNaive( AppResources &app, uint workGroupSize): app(app), workGroupSize(workGroupSize) {} void A2Task2SolutioNaive::prepare(const std::vector<uint> &input) { workSize = input.size(); // Descriptor & Pipeline Layout Cmn:...
ALGO
0.968718
4.389737
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-11-08T15:46:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88ab724a75fa...
68f2dea6-726e-40b3-a8a8-c7855907229c
imulan/procon
aoj/vol15/1585.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout<<#x" = "<<((x))<<endl template<class T,class U> ostream& operator<<(ostream& o, const pa...
ALGO
0.999969
4.103341
{ "github_metadata": { "branch": "master", "commit_count": 2571, "repo_created_at": "2015-11-25T03:18:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 27, "pull_requests": 0 }, "file_meta": { "content_id": "27adbe...
bf5f12b2-8a14-42a2-b1d5-8c28a265b13e
rjenez/W266-final-project
data/programming-homework-dataset-plagiarism-detection/src/B2016/Z3/Z6/student6008.cpp
/B2016/2017: Zadaća 3, Zadatak 6 #include <iostream> #include <vector> #include <string> #include <set> #include <stdexcept> #include <memory> struct Dijete { std::string ime; std::shared_ptr<Dijete> sljedeci; }; int BrojSlova(std::string s){ int i(0), brojac(0); while(i!=s.length()){ if((s[i]...
ALGO
0.999627
4.606898
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2022-02-09T00:45:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "187c9350d1...
f229ba26-17b4-4667-8428-be8f75f8664f
shrey-royal/EveGen
Recursion/one.cpp
#include<iostream> using namespace std; // void hello(int n) { // if(n == 1) { // cout << n << endl; // } else { // cout << n << endl; // hello(n-1); //recursion // } // } //factorial(n) // int factorial(int n) { // if(n == 1) { // return 1; // } else { // r...
ALGO
0.998911
6.01328
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2024-02-27T03:55: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": "22d050efb...
6fd93dac-0804-41a9-94ed-dce50c14c9b8
Lambda-Numworks/Lambda
poincare/include/poincare/least_common_multiple.h
#ifndef POINCARE_LEAST_COMMON_MULTIPLE_H #define POINCARE_LEAST_COMMON_MULTIPLE_H #include <poincare/n_ary_expression.h> namespace Poincare { class LeastCommonMultipleNode final : public NAryExpressionNode { public: // TreeNode size_t size() const override { return sizeof(LeastCommonMultipleNode); } #if POINCA...
TOOL
0.927513
7.781402
{ "github_metadata": { "branch": "lambda-dev", "commit_count": 12279, "repo_created_at": "2022-03-16T00:03:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 2, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "a1...
a054e842-6274-4e4c-986b-c1c0e2bbfa39
Avhad-Shashwat/Standard-Problems
Linked_List/Reverse DLL.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int data; Node *prev; Node *next; Node(int d) { data = d; next = nullptr; prev = nullptr; } }; void print(Node *head) { Node *curr = head; while (curr != nullptr) { cout << curr->data << " "; ...
ALGO
0.999956
5.518795
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-07-22T13:01:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "037e77f3d0...
b4415666-4d08-4dd0-bb5b-671539188da3
vantaa89/data-structures
cpp/sorting/sorting.hpp
#ifndef SORTING_H #define SORTING_H #include <vector> #include <queue> namespace sort{ template<typename T> void selection(T * arr, int size){ for(int i = size-1; i > 0; --i){ int max_idx = 0; int max_val = arr[0]; for(int j = 1; j <= i; ++j){ if(arr[...
ALGO
0.999639
4.910751
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-12-31T12:39:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1e45715c21...
ed6a85b4-b99d-42c1-8b17-e177792e5bd7
ArvinCS/competitive-programming
Contest/CF624-E.cpp
#include <bits/stdc++.h> using namespace std; #define ull unsigned long long #define ll long long #define ui unsigned int #define us unsigned short #define inf_int 1e9 #define inf_ll 1e18 #define mod 1000000007 #define smod 998244353 int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); // freo...
ALGO
0.999985
4.53373
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-07-22T02:02: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": "b12ecbb51644...
88771aaa-6c0c-4865-bf5e-1f8b7a51fb17
ssk4988/Coding
UCFPT/learn/dpcounting/fixedpoint copy.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using pi = pair<int, int>; using pl = pair<ll, ll>; using pd = pair<ld, ld>; using vi = vector<int>; using vl = vector<ll>; using vd = vector<ld>; using vpi = vector<pi>; using vpl = vector<pl>; using vpd = vector<pd>; using vv...
ALGO
0.999974
3.511926
{ "github_metadata": { "branch": "main", "commit_count": 189, "repo_created_at": "2021-11-02T23:44:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e2d478a48...
d90f0d76-0e60-4aef-bfdf-8d9c6bbb4a36
robert2653/CSES
Tree Algorithms/Distance_Queries.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define all(x) (x).begin(), (x).end() #define pii pair<int, int> #define endl "\n" #define int long long using namespace std; using namespace __gnu_pbds; template<typename T> using pbds_set = tree<T, null_type, less<...
ALGO
0.999937
4.503002
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-01-23T00:52:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f38a5433ba4...
71c49c7a-3bdd-45bf-a3d9-084e5ee07575
imo1-nu/atcoder
abc/abc231/f/main.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using ll = long long; void compression(vector<int> &v) { map<int, int> mp; vector<int> tmp = v; sort(tmp.begin(), tmp.end()); tmp.erase(unique(tmp.begin(), tmp.end()), tmp.end()); for(int i = 0; i < (int)tmp.size(); i++) mp[tmp[i]...
ALGO
0.999981
4.344468
{ "github_metadata": { "branch": "main", "commit_count": 168, "repo_created_at": "2024-07-19T15:53: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": "fb796893fc...
c6b47221-ebd1-40ab-b51b-e9ec28b2199b
Melesar/raytracing
Fotorealystic_1/objParser.cpp
#include "mtlParser.h" #include "objParser.h" #include <fstream> #include <iostream> #include <sstream> void ObjParser::parse(const std::string & fileName, std::vector<Triangle>& triangles) { std::ifstream file(fileName.c_str()); std::string s; std::vector<Vector3> verticies, uvs, normals; while (std::getline(fi...
TOOL
0.912811
4.963131
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2018-03-14T12:34:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db168b609...
eaaf98b1-5a43-4efa-9e06-b4e5ce328e87
ishandutta2007/codeforces-v
vkgainz/normal/931/B.cpp
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <queue> #include <map> #include <math.h> #include <array> using namespace std; int main() { int n, a, b; cin >> n >> a >> b; int ans = -1; for (int i = 1; i <= 8 && ans == -1; i++) { for (int j = 1; j <= n / (1 <<...
ALGO
0.999801
3.768802
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:31: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": "66ce0dda2e30...
16489b29-e5e7-4d34-90cc-be06aa0517e4
nitesh-147/Leetcode-Questions
Walls Coloring II - GFG/walls-coloring-ii.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: int minCost(vector<vector<int>> &costs) { // write your code here int n=costs.size(),k=costs[0].size(); if(n==1 &...
ALGO
0.999974
5.891233
{ "github_metadata": { "branch": "main", "commit_count": 2444, "repo_created_at": "2022-04-16T08:58: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": "366da41d7...
f6a8ce12-9ce4-40f8-96c7-747a8aab527b
CarlosAlberto1x9/Competitive-Programming
Codeforces/1334A.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int t; cin >> t; int n, p=0, c=0; while(t--) { cin >> n; bool ok = true; int a[n], b[n]; for(int i=0; i<n; ++i) { cin >> a[i] >> b[i]; } ...
ALGO
0.999974
3.748276
{ "github_metadata": { "branch": "master", "commit_count": 225, "repo_created_at": "2019-02-20T02:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "600372c7...
8ec2e5c9-f53a-40ca-803f-9466adcae1f5
AhVir/CP-Handbook
chapter03/3_sorting.cpp
#include<bits/stdc++.h> using namespace std; void printArray(int *arr, int n){ for(int i=0; i<n; i++){ cout << arr[i] << " "; } cout << endl; } void printVector(vector<int> &v){ for(int x: v) cout << x << " "; cout << endl; } int main(){ cout << "it's working" << endl; int arr[] = {1, 3, 8, 2, 9...
ALGO
0.999185
4.875567
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-07-27T00:29: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": "0dd84bc3fa2a...
ecb9256c-0d6e-4305-b163-189c5fb3460f
ishandutta2007/codeforces-y
yuukakazami/normal/128/C.cpp
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <climits> #include <numeric> #include <vector> #include <map> #include <set> #include <utility> #include <cmath> #include <cctype> #include <sstream> using namespace std; typedef long long int64; typedef long long int64; const int ...
ALGO
0.999968
3.809517
{ "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": "6be544313c19...
daf5957b-ecfd-4d3f-94de-623dd380f93a
JeffFessler/mirt
contrib/sse_proj/irt/mex/src/tomo_mex.cpp
/**********************************************************/ /* $Id: tomo_mex.cpp,v 1.55 2007/08/07 21:43:29 jmh Exp $ */ /* Copyright 2007-7-02, <NAME>, NRU */ /**********************************************************/ #include "tomo_lut.h" #include "tomo_strip.h" #include "tomo_mex.h" #ifdef __ICC #p...
ALGO
0.999296
5.162363
{ "github_metadata": { "branch": "main", "commit_count": 113, "repo_created_at": "2019-06-03T20:42:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 187, "forks": 70, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "d354855...
12b39e73-bee6-44b0-b331-39574d480d3d
insubkim/Problem_Solving
Programmers/Lv2/표현가능한이진트리.cpp
#include <cmath> #include <string> #include <vector> using namespace std; long long next_dummy_tree(int height) { long long dummy_tree = 1; // 왼쪽 자식 노드 수 만큼 왼쪽 시프트 // 1 층이면 자식 2^0 -1 // 2 층이면 자식 2^1 -1 // 3 층이면 자식 2^2 -1 dummy_tree = dummy_tree << (int)pow(2, height - 1) - 1; return dummy_tree; } long ...
ALGO
0.999826
4.413844
{ "github_metadata": { "branch": "master", "commit_count": 405, "repo_created_at": "2023-04-26T12:44: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": "62762801...
ef23b87d-3232-4952-910f-96566f8b4e65
gdg-hongik-univ/Hong-gol
05ovo2e/Week9/입국심사.cpp
#include <string> #include <vector> #include <algorithm> #include <iostream> using namespace std; long long solution(int n, vector<int> times) { long long left = 1; // 가장 큰 심사 시간을 찾고, 최대 범위 설정 long long right = *max_element(times.begin(), times.end()) * (long long)n; long long answer = rig...
ALGO
0.999984
5.476617
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2024-07-28T12:01: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": "528d54927f48...
9092c83e-cab5-47ca-bcaa-2b3a136ecc53
CadQuery/OCP
opencascade/Approx_SweepFunction.hxx
// Created on: 1997-06-25 // Created by: <NAME> // Copyright (c) 1997-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser ...
TOOL
0.936771
6.443764
{ "github_metadata": { "branch": "master", "commit_count": 222, "repo_created_at": "2019-12-17T20:02:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 122, "forks": 36, "issues": 28, "pull_requests": 2 }, "file_meta": { "content_id": "875e7...
a2fb7336-47e3-4755-9d2e-9676dc6a04bd
ddddddea/BaaaarkingDog-Algorithm
BaaaarkingDog/0x15_Hash/13414.cpp
#include <bits/stdc++.h> using namespace std; unordered_map<string, int> um; list<string> std_l; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int K, L; cin >> K >> L; for(int i = 0; i < L; i++) { string std_id; cin >> std_id; std_l.push_back(std_id); // Ad...
ALGO
0.999903
3.620065
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2023-02-04T11:17: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": "18b8bc30612...
202d5ddf-2b24-4a88-8f4e-62d6b3b8399f
CGAL/cgal
Mesh_3/doc/Mesh_3/Concepts/MeshFacetCriteria_3.h
/*! \ingroup PkgMesh3Concepts \cgalConcept The Delaunay refinement process involved in the template functions `CGAL::make_mesh_3()` and `CGAL::refine_mesh_3()` is guided by a set of elementary refinement criteria that concern either mesh tetrahedra or surface facets. The concept `MeshFacetCriteria_3` describes the typ...
TOOL
0.921359
6.022546
{ "github_metadata": { "branch": "master", "commit_count": 113659, "repo_created_at": "2014-10-01T12:22:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5443, "forks": 1475, "issues": 511, "pull_requests": 136 }, "file_meta": { "content_id...
c6253c56-ec27-42ad-b862-8b09ff88463b
lazydev01/365DayCPChallenge
lazydev01/day_783.cpp
#include <bits/stdc++.h> using namespace std; class LRUCache { public: class ListNode{ public: int key; int value; ListNode* next; ListNode* prev; ListNode(){ key = -1; value ...
ALGO
0.999681
5.388757
{ "github_metadata": { "branch": "main", "commit_count": 1059, "repo_created_at": "2022-12-18T09:37:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a68de46be...
fdd3a60b-c1ac-4944-a08f-0fbffb6e09c1
l1351868270/LD_mma
csrc/mma/src/cute_matmul_v1.h
#include <mma.h> #include <torch/python.h> #include <ATen/native/TensorIterator.h> #include <ATen/native/cuda/Loops.cuh> #include "cute_traits_v1.h" #include "cute/algorithm/copy.hpp" #include "cutlass/cutlass.h" #include "cutlass/layout/layout.h" #include <cutlass/numeric_types.h> #define DEBUG_WARP_MATMUL_DEVICE ...
ALGO
0.939985
4.99793
{ "github_metadata": { "branch": "main", "commit_count": 113, "repo_created_at": "2023-12-25T03:22: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": "2c54894f22...
b90ec302-fb15-4630-ace2-a33a27838436
devashishtyagi/Code
Hackerrank/Coder Trophy/randomsum.cpp
/* CPP Tempelate * @author <NAME> */ #include <algorithm> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <fstream> #include <stack> #include <string> #include <vector> #include <list> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstd...
ALGO
0.999732
4.129374
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2012-04-17T16:41:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c30157bfe...
4892a9ae-c37d-4ebb-b77a-2eef6d4fdeee
DanielRamirezGe/Examples-Segment-tree
piratas.cpp
#include <bits/stdc++.h> using namespace std; #define tama 1024000 int arbol[tama<<2]; int cambios[tama<<2]; bitset<tama> piratas; void construir(int p,int i,int j) { //cout<<p<<" "<<i<<" "<<j<<"\n"; if(i==j) { arbol[p]=piratas[i]; return; } construir(p<<1,i,(i+j)/2); construir((p<<1)+1,((i+j)/2)+1,j); arb...
ALGO
0.999529
4.121902
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-09-12T15:42: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": "106b011bde...
531e35cc-e58c-44a8-96c8-e5f4b1082b84
NestZ/competitive-programming
CSES/2165.cpp
#include<bits/stdc++.h> using namespace std; #define endl '\n' typedef long long int ll; #define sim template < class c #define ris return * this #define dor > debug & operator << #define eni(x) sim > typename \ enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) { sim > struct rge { c b, e; }; sim > rge<c...
ALGO
0.999907
3.802612
{ "github_metadata": { "branch": "master", "commit_count": 439, "repo_created_at": "2019-01-23T05:34: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": "caea6a51...
6a0c1cb4-6252-4f09-82fa-4724935d1627
abhishek09091/competitive-programming
DSA-3/Linked List/merge-two-sorted-linked-lists.cpp
/******** https://www.geeksforgeeks.org/merge-two-sorted-linked-lists/ *********/ /*This is a function problem.You only need to complete the function given below*/ /* Link list Node struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; */ // Function to merge the ...
ALGO
0.999974
5.19944
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-03-31T05:43:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2fd708e0a...
353aa8e6-ca44-4dbb-96d3-751ac21e6253
hwuerz/pet
mcl/mcl/include/mcl/util.hpp
#pragma once /** @file @brief functions for T[] @author <NAME>(@herumi) @license modified new BSD license http://opensource.org/licenses/BSD-3-Clause */ #include <mcl/gmp_util.hpp> #include <cybozu/bit_operation.hpp> #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable : 4456) #pragma warning(disable ...
ALGO
0.960902
5.438298
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2017-03-03T12:03:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b61db7da...
1db1ddf5-fe49-4948-bd63-82980c996d72
Sri-Hasini/cpp_problems
123.Bob_at_the_bank.cpp
//Bob at the bank - codechef(481) //https://www.codechef.com/practice/course/basic-programming-concepts/DIFF500/problems/BOBBANK /* Bob has an account in the Bobby Bank. His current account balance is W rupees. Each month, the office in which Bob works deposits a fixed amount of X rupees to his account. Y rupees is de...
ALGO
0.999566
4.043396
{ "github_metadata": { "branch": "main", "commit_count": 601, "repo_created_at": "2024-11-20T17:09:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "331fd0752b...
af3f91d0-62c0-4468-bdde-b6f4a0bf6165
iamtasir/Competitive-programming
2021/june/B_Chris_and_Magic_Square.cpp
///* ***<NAME>*** */ /* Algorithm Used: */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double dl; typedef unsigned long long ull; #define pb push_back #define PB pop_back #define nn "\n" #define O_O \ ios_base::sync_with_stdio(false); \ cin....
ALGO
0.999978
3.795364
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2022-01-09T20:26:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b4c14a2769d...
e1fd8c7e-b093-48bd-a9a3-6946516f3071
yisea123/MNN
demo/exec/segment.cpp
// // segment.cpp // MNN // // Created by MNN on 2019/07/01. // Copyright © 2018, Alibaba Group Holding Limited // #include <stdio.h> #include "ImageProcess.hpp" #include "Interpreter.hpp" #define MNN_OPEN_TIME_TRACE #include <algorithm> #include <fstream> #include <functional> #include <memory> #include <sstream>...
DATA
0.963495
4.331949
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2019-09-10T07:55:46.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "alibaba/MNN", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6...
09137426-86ab-48ac-bed2-5f5b2275a79b
JimmyLiu0530/Refatored-VLC-Simulation
thesis.cc
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ /* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation; * * This program is distributed in the hope that it will be us...
ALGO
0.966652
3.554524
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2021-12-22T13:08: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": "3c90d2cd1...
392aa99b-67d7-4ff9-83c1-45c46d36515d
23014673/My_Projects
COP2535.0T1/M4 Lab Assignment/prefix_expressions.cpp
// <NAME> // COP2535.0T1 // M4 Lab Assignment (10/13/2024) // This program evaluates writing and evaluating recursive functions with infix and prefix expressions #include <iostream> #include <string> #include <stdlib.h> #include <sstream> using namespace std; int prefixExpr(istream &exprStream); // Prototype int mai...
ALGO
0.998124
6.394916
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-11-12T22:19: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": "bfa577c3c2a3...
0d285e68-202a-46e6-8ea3-4f069d603dc3
muliawatiputri/Tugas-AlPro
pertemuan13/latihan1/main.cpp
#include<iostream> using namespace std; const float PI = 3.14159; struct PersegiPanjang { float panjang; float lebar; }; struct Lingkaran { float radius; }; struct Kerucut { float radius; float tinggi; }; struct Bola { float radius; }; float hitungLuasPersegiPanjang(PersegiPanjang pp) { ...
ALGO
0.998736
4.430668
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-03-16T08:33:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b1e27e8d83...
5d5e1016-482a-4973-ace3-b9c35ebae0db
fThAbhishek-Pandey/Data-Structure-And-Algorithm
tree/BST/removeAllLeafNode.cpp
#include<iostream> using namespace std; class node{ public: int val; node* left; node* right; node (int data) { val= data; left= NULL; right = NULL; } }; class BST { public: node* root; BST (){ root= NULL; } void insert (int data){ ...
ALGO
0.999535
3.645157
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2024-05-28T17:13: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": "7c5365ea87e...
28b1277e-cb6b-4252-9cc7-a084bc8eee31
ismailbagga/algorithms-with-cpp
src/data-structures/StaticArray.cpp
// // Created by ismail-swe on 12/29/24. // #include "StaticArray.h" #include <iostream> #include <stdexcept> using namespace datastructures; StaticArray::StaticArray() : StaticArray(16) { } StaticArray::StaticArray(const int size) { this->size = size; this->array = new int[size]; for (int i = 0; i < si...
TOOL
0.952033
5.745417
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-01-12T14:38: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": "77152a8dd2fb...
7fe0ad1b-4296-425a-8e84-dbf716cbfc5f
cueltschey/5G_dynamic_compression
lib/phy/lower/modulation/ofdm_prach_demodulator_impl.cpp
/* * * Copyright 2021-2024 Software Radio Systems Limited * * This file is part of srsRAN. * * srsRAN is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of * the License, or (at y...
ALGO
0.956882
7.344079
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2024-10-05T22:54: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": "c2ca19b12ff...
ce9d240d-6305-497d-a1b1-37806365d98f
yiyidaishui7/NEU-OJ
STL/Topic7-8/setRangeSearch.cpp
#include <iostream> #include <set> #include <algorithm> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; int q, x; set<int> S; for (int i = 0; i < n; i++) { cin >> q >> x; switch (q) { case 0: { ...
ALGO
0.999518
4.169215
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-02T08:29: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": "f1d98a85073b...
08010fa9-daeb-4bf1-b7e3-bab9bb47bc93
Yukariko/acm
problem/11443/test.cpp
#include <bits/stdc++.h> using namespace std; struct matrix { long long a,b,c,d; static const long long MOD = 1000000007LL; matrix() : a(0), b(0), c(0), d(0) {} matrix(long long a, long long b, long long c, long long d) : a(a), b(b), c(c), d(d) {} matrix(const matrix &mat) : a(mat.a), b(mat.b), c(mat.c), d(mat....
ALGO
0.999926
3.953386
{ "github_metadata": { "branch": "master", "commit_count": 1588, "repo_created_at": "2014-07-06T11:37:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2052ce...
d50dbfd5-30a6-4e30-b601-2a985f864541
siddhart18/cs204lab
lab_06.cpp
#include <bits/stdc++.h> typedef long long int lli; typedef unsigned long long int ulli; typedef long double ldb; using namespace std; class Node { public: lli user_id; lli value; Node *left; Node *right; int height; }; Node* newNode(lli user_id,lli value) { Node* node = new Node(); ...
ALGO
0.999957
4.421165
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2019-08-02T09:52: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": "633f9c2b9...
760dbf12-1d94-4eb2-9581-bb770d6cbe33
magdyhasan/competitive-programming
uva-/uva 10511 - Councilling.cpp
/* let mxsz = sz(clubs-1)/2 then make a flow network 1 1 1 mxsz souces ----> club -----> per ----> party -----> sink and this means we only taking one person from each club ( first edge from source to club == 1 ) and from each party we only take <= mxsz, this restri...
ALGO
0.999875
4.151989
{ "github_metadata": { "branch": "master", "commit_count": 222, "repo_created_at": "2017-01-29T00:35:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8ce1317d...
cf617020-26b9-4c61-a900-62d3e0d8520e
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1245/all/29597679_64007385.cpp
#include <bits/stdc++.h> #define rep(a,b,c) for(int a=(b);a<=(c);a++) #define max(a,b) ((a)>(b)?(a):(b)) #define min(a,b) ((a)<(b)?(a):(b)) #define ep(a) ((a)*10/9) #define pb push_back #define mp make_pair #define inf (0x3f3f3f3f) using namespace std; typedef long long ll; #ifdef DEBUG #define do(x) x #define dont(x) ...
ALGO
0.999672
3.780973
{ "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": "343f6e8d9...
f2d75be8-d1d1-488d-b180-176ccf320ff0
derekszen/ElementsofProgramming
reverseLinkedList.cpp
// Given pointer to the head node of a linked list, the task is to reverse the linked list. We need to reverse the list by changing links between nodes. // // Examples: // // Input : Head of following linked list // 1->2->3->4->NULL // Output : Linked list should be changed to, // 4->3->2->1->NULL // ...
ALGO
0.999277
5.302504
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-01-01T05:33: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": "7aab2c37c0...
6e66e330-d85c-470a-8ad3-8c8482abdca5
jamiefy/leetcode
competition.cpp
// // Created by anranzhai on 2020/3/1. // #include <vector> #include <algorithm> #include <stack> std::vector<int> smallerNumbersThanCurrent(std::vector<int>& nums) { if(nums.empty()) return nums; std::vector<int> ret(nums); std::sort(nums.begin(),nums.end()); for(auto it=ret.begin();it!=ret.en...
ALGO
0.999956
4.901408
{ "github_metadata": { "branch": "master", "commit_count": 263, "repo_created_at": "2019-10-07T02:57: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": "8a31d2b6...
c75c77eb-c794-461d-9aa1-526489ab676e
NurShuv0/problem-solved
Time_minus.cpp
#include<iostream> #include<vector> #include<algorithm> #include<iomanip> #include<cmath> #define ll long long #define sp " " #define nl "\n" #define pb push_back using namespace std; int main() { vector<ll>start,end; for(int i = 0; i < 4; i++) { ll input; cin >> input; start.pb(inpu...
ALGO
0.99981
3.551866
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2025-04-19T00:46: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": "cbb768d7ad6...
75263493-99f2-4d0f-8ffb-7419c4e57338
Alenlov/AoC
2015/25/code.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> std::vector<std::string> splitTask(std::string line){ std::vector<std::string> split; int lastIndex = 0, newIndex = 0; std::string sep = " "; newIndex = line.find(sep, lastIndex); while ( newIndex != std::string::npos) { ...
ALGO
0.99968
4.789166
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2021-11-16T17:19: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": "5eee518f904...
bb7eb00f-6964-4db0-b7a1-cbc6a6a6a99e
imlishant/Data-Structures
Trees/levelorder.cpp
#include <bits/stdc++.h> using namespace std; class Node{ public: int data; Node* left; Node* right; Node(int value){ this->data = value; this->left = nullptr; this->right = nullptr; } }; void LevelOrderTraversal(Node* root){ if(root ...
ALGO
0.99996
5.014435
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2019-01-23T17:35:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bab8bc487...
37fe874f-0ca8-49d8-a15f-0a9d815972c2
lemonadesaltbagel/algorithms
leetcode/542.01-matrix.cpp
#include <queue> #include <vector> using namespace std; /* * [542] 01 Matrix * * https://leetcode.com/problems/01-matrix/description/ * * algorithms * Medium (33.09%) * Total Accepted: 22.2K * Total Submissions: 67.2K * Testcase Example: '[[0,0,0],[0,1,0],[0,0,0]]' * * * Given a matrix consists of 0 and...
ALGO
0.999893
6.380502
{ "github_metadata": { "branch": "master", "commit_count": 149, "repo_created_at": "2014-05-01T08:54: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": "1bc482fe...
2482f394-8d92-4ae9-97e6-383cd19118c8
BRL-CAD/brlcad
src/librt/tests/ssi.cpp
/* T E S T _ S S I . C P P * BRL-CAD * * Copyright (c) 2013-2025 United States Government as represented by * the U.S. Army Research Laboratory. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 ...
TOOL
0.936804
4.923907
{ "github_metadata": { "branch": "main", "commit_count": 82301, "repo_created_at": "2021-03-18T15:23:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 849, "forks": 177, "issues": 52, "pull_requests": 14 }, "file_meta": { "content_id": "a34...
e60541fb-6366-4dde-9fc4-5eb1be34b578
BurningFalls/algorithm-study
Programmers/2021 KAKAO BLIND RECRUITMENT/1. 신규 아이디 추천.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define FASTIO cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0); #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define ROF(i,a,b) for(int i=(a);i>=(b);i--) #define pii pair<int, int> string solution(string new_id) { string answer = ""; stri...
ALGO
0.99694
4.392839
{ "github_metadata": { "branch": "main", "commit_count": 3832, "repo_created_at": "2020-08-04T06:46:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b07832a2...
f4e1a1b6-7565-48cc-a09d-fde6ccf03b50
sleepturtle2/Algorithms
Graph/detect_cycle_in_undirected_graph.cpp
//https://www.geeksforgeeks.org/detect-cycle-in-a-graph/ #include <bits/stdc++.h> #include "./graph headers/unweighted_undirected.h" using namespace std; bool isCyclicUtil(vector<vector<int>> &adj, int v, vector<bool> &visited, int parent) { visited[v] = true; for (int i : adj[v]) { //recur if adjacent is ...
ALGO
0.999637
5.483996
{ "github_metadata": { "branch": "main", "commit_count": 128, "repo_created_at": "2021-01-12T15:45:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "783924ffe4...
9e5fba8c-b002-4506-a2b0-041fc6f15332
Rafe19999/Symmatric_keys_codes
PlayFairCipher.cpp
#include <iostream> #include <vector> #include <algorithm> #define ll long long #define nl "\n" using namespace std; int main() { char arr[5][5] = { {'L', 'G', 'D', 'B', 'A'}, {'Q', 'M', 'H', 'E', 'C'}, {'U', 'R', 'N', 'I', 'F'}, {'X', 'V', 'S', 'O', 'K'}, {'Z', 'Y', 'W...
ALGO
0.999938
4.255726
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-05-22T14:37: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": "d05b8d81f3b6...
f01865b9-0d93-4d27-94cb-60b8bafd9026
dhruv-yadav-nitj/striver-a2z-dsa-cpp
Step 12 ~ Greedy Algorithms/08-N-MEETINGS-IN-ONE-ROOM.CPP
#include <bits/stdc++.h> using namespace std; // Note: Start time of one chosen meeting can't be equal to the end time of the other chosen meeting. // Intuition // Say if you have two meetings, one which gets over early and another which gets over late. Which one should we choose? -> obviously the former one class S...
ALGO
0.999982
5.494429
{ "github_metadata": { "branch": "main", "commit_count": 173, "repo_created_at": "2023-06-07T19:26:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 52, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d4b8a1c...
817ef653-06bd-4b57-83b6-3027cfe3b98f
PranitRohokale/6Companies30Days
Amazon/8 Count ways to N'th Stair(Order does not matter).cpp
class Solution { public: //Function to count number of ways to reach the nth stair //when order does not matter. long long countWays(int m) { /* one possible way is to use all 1's in path. second possible ways is to use only one 2 in path ...
ALGO
0.999983
4.578409
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-01-01T17:20:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9415cf08cfc...
6471c571-f28e-477a-84e1-131bd4b1e3f5
kei1107/algorithm
problems/Atcoder/DDCC_2017_final_A.cpp
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; /* <url:https://ddcc2017-final.contest.atcoder.jp/tasks/ddcc2017_final_a> 問題文============================================================ 直径 200 mmのウェーハ(...
ALGO
0.999582
4.37402
{ "github_metadata": { "branch": "master", "commit_count": 488, "repo_created_at": "2017-10-06T09:12: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": "3ae4dcc9...
15b36a90-0270-437c-ad08-1f81a537e0da
Dimpal-Kalita/My-cp-codes
Atcoder/abc 355/F_MST_Query.cpp
#include<bits/stdc++.h> using namespace std; #define md 1000000007 #define pb push_back #define endl " \n" #define F first #define S second #define sz(x) (int)(x).size() #define inp(v) for(auto &x: v) cin...
ALGO
0.999952
3.725434
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2022-07-23T04:55: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": "e0808a1a7...
6d77e612-3ad4-4204-9f8a-ba70e5af6a5e
memset0/vjudge-code
洛谷/P4751/36273255_TLE_4885ms_157960kB.cpp
// luogu-judger-enable-o2 // ================================= // author: memset0 // date: 2019.04.12 11:23:40 // website: https://memset0.cn/ // ================================= #include <bits/stdc++.h> #define ll long long #define int long long #define debug(...) ((void)0) #ifndef debug #define debug(...) fpri...
ALGO
0.999974
4.14486
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2020-11-05T04:40:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ad2bffe2...
1ee7e848-44ca-4502-9ab1-fc9e902c009c
swwind/code
atcoder/agc001/F.cpp
#include <bits/stdc++.h> #define N 500020 #define ll long long using namespace std; inline int read(){ int x=0,f=1;char ch=getchar(); while(ch>'9'||ch<'0')ch=='-'&&(f=0)||(ch=getchar()); while(ch<='9'&&ch>='0')x=(x<<3)+(x<<1)+ch-'0',ch=getchar(); return f?x:-x; } int ins[N]; int p[N], q[N]; int to[N<<1], nxt[N<...
ALGO
0.999993
3.358636
{ "github_metadata": { "branch": "master", "commit_count": 255, "repo_created_at": "2017-06-08T08:20:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7da561a6...
d0a19bea-e260-4a7d-9b1a-b0f6c4550049
bernhardfritz/Bachelorarbeit
Backup/ParticleSystem/PARTICLE_SYSTEM.cpp
#include "PARTICLE_SYSTEM.h" unsigned int iteration = 0; int scenario; /////////////////////////////////////////////////////////////////////////////// // Constructor /////////////////////////////////////////////////////////////////////////////// PARTICLE_SYSTEM::PARTICLE_SYSTEM() : _isGridVisible(false), surfaceThre...
ALGO
0.967051
3.806517
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2015-11-07T20:24: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": "73113f945...
f7033f1a-71c7-46db-9047-d4845526bdf9
gangajayadev/CSA0333
192472248 - 23th.cpp
#include <stdio.h> #define INF 9999 #define SIZE 100 void dijkstra(int graph[SIZE][SIZE], int n, int start) { int distance[SIZE], visited[SIZE]; for (int i = 0; i < n; i++) { distance[i] = INF; visited[i] = 0; } distance[start] = 0; for (int count = 0; count < n - 1; count++) { ...
ALGO
0.999985
4.703485
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-07-02T09:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c20567eb18f...
14f5029d-481c-4a3e-b20b-3bf024b7137d
HnpawsPham/CP-PROBLEMS
IT_Squad_Journey/THPT/School/B4/EXLIST.cpp
#include <bits/stdc++.h> using namespace std; #define el "\n" #define pii pair<int, int> int n; int main(){ freopen(".\\txt\\EXLIST.INP","r", stdin); freopen(".\\txt\\EXLIST.OUT", "w", stdout); ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin>>n; int a[n + 1], p[n + 1]; queue<pii...
ALGO
0.999979
3.713615
{ "github_metadata": { "branch": "main", "commit_count": 128, "repo_created_at": "2024-07-14T14:00: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": "f48cf1391f...
47c69921-760b-400e-baf4-9969e2189e51
sshiwangi/DSA-problems
Tree/Insert a node in a BST.cpp
/* Given a BST and a key K. If K is not present in the BST, Insert a new Node with a value equal to K into the BST. Note: If K is already present in the BST, don't modify the BST. Example 1: Input: 2 / \ 1 3 K = 4 Output: 1 2 3 4 Explanation: After inserting the node 4 Inorder traversal will be 1 2 ...
ALGO
0.999995
5.447402
{ "github_metadata": { "branch": "main", "commit_count": 220, "repo_created_at": "2022-06-01T14:30:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a61fddc59d...
a76be46a-0f93-4675-8e6f-36f188919881
Nayeem-Ahammed/Problems-Solved
Codeforces/C_Sakurako_s_Field_Trip.cpp
#include <bits/stdc++.h> using namespace std; int find_minimal_disturbance(vector<int>& a) { int n = a.size(); int disturbance = 0; // Step 1: Calculate initial disturbances for (int i = 0; i < n - 1; ++i) { if (a[i] == a[i + 1]) { disturbance++; } } // If no d...
ALGO
0.999913
5.620537
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2025-01-01T06:13:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a9ec480bf1...
d29f0947-a1f7-4866-9616-328fba6c10ab
iamard/Online-Judgement
HackerRank/Merging Communities.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; typedef pair<int, int> ii; int find(vector<ii> &V, int C) { if (V[C].first != C) { V[C].first = find(V, V[C].first); } return V[C].first; } void merge(vector<ii> &V, int I, int J) { ...
ALGO
0.999871
3.801887
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-04-15T12: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": "72063c82fb...
8764b2f2-1f4d-4cee-8674-2d088db8b7af
sahanics06/POTD_GFG
Graphs/Santa Banta.cpp
/* Santa is still not married. He approaches a marriage bureau and asks them to hurry the process. The bureau checks the list of eligible girls of size N and hands it over to Santa. Santa being conscious about his marriage is determined to find a girl with maximum connections so that he can gather more information abo...
ALGO
0.999683
4.328578
{ "github_metadata": { "branch": "main", "commit_count": 141, "repo_created_at": "2023-04-07T19:05: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": "ea8022e494...
6c076018-72ad-45ba-8be4-591822b39e36
megumin9/Lapsac
real-project/Qgis/test-lambda/classification_results/filtered_files/test_3.cpp
#include <bits/stdc++.h> struct Point { int x() const; }; struct TextCharacter { Point position; }; void NewTest(); void ConsistencyChecker(); void TransiveChecker(); void SymmetryChecker(); void ReflexivityChecker(); bool lambda2(const TextCharacter& l, const TextCharacter& r) { return l.position.x() <...
TEST
0.921863
3.909328
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2025-05-19T05:35: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": "c78aff387d...
29881b27-b20e-4125-a51f-63a152c55efc
Manyizi101/OJ
HOJ/1996.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <ctime> #include <iostream> #include <algorithm> #include <string> #include <vector> #include <deque> #include <list> #include <set> #include <map> #include <stack> #include <queue> #include <numeric> #include <iomanip> #include <bitset> ...
ALGO
0.999894
3.859548
{ "github_metadata": { "branch": "master", "commit_count": 648, "repo_created_at": "2017-07-28T06:53:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "118b327d...
9092d063-ff35-4879-bd90-321f71bccc4b
greatzero728/acade.studio
codeforces/(1032 B Personalized Cup)/Trivial.cpp
#include <bits/stdc++.h> using namespace std; int main() { string input; getline(cin, input); vector<char> s(input.begin(), input.end()); int r = s.size() / 20 + (s.size() % 20 != 0); int c = s.size() / r + (s.size() % r != 0); for (int i = 0; i < (r - s.size() % r) % r; ++i) { ...
ALGO
0.999854
3.157118
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-09-19T07:41: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": "fe06c0924126...
7975471d-ca1c-4bb1-82ed-a48b78c6d09f
c437yuyang/EffectiveSTL
41_ptr_func和mem_fun/41_ptr_func和mem_fun.cpp
// 41_ptr_func和mem_fun.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <vector> #include <algorithm> #include <iostream> #include <functional> using namespace std; class Widget { public: Widget() { m_wId++; m_Id = m_wId; } void printInfo() { cout << m_Id << endl; } void printInfo1(int ii) { cout << m_Id << ...
TOOL
0.934317
4.801492
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2017-06-22T11:31:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "186aa0bbb...
4a74c985-4ae1-4a3d-abc5-9fc0cc0bc0b2
isaac-mason/recast-navigation-js
packages/recast-navigation-wasm/src/NavMeshQuery.cpp
#include "./NavMeshQuery.h" NavMeshQuery::NavMeshQuery() { m_navQuery = dtAllocNavMeshQuery(); } NavMeshQuery::NavMeshQuery(dtNavMeshQuery *navMeshQuery) { m_navQuery = navMeshQuery; } dtStatus NavMeshQuery::init(NavMesh *navMesh, const int maxNodes) { const dtNavMesh *nav = navMesh->getNavMesh(); re...
TOOL
0.95014
6.097105
{ "github_metadata": { "branch": "main", "commit_count": 612, "repo_created_at": "2022-08-17T14:27:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 343, "forks": 32, "issues": 25, "pull_requests": 6 }, "file_meta": { "content_id": "15e3d4...
6ae865d5-c864-445b-8e96-c5811d0906e4
souparna21/dsa-questions
10-linked-list/10-create-a-doubly-linked-list.cpp
// Create a doubly linked list #include <iostream> using namespace std; struct Node { int data; Node *prev; Node *next; Node(int x) { data = x; prev = NULL; next = NULL; } }; void printList(Node *head) { Node *current = head; while(current != 0) { ...
ALGO
0.99888
4.869446
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2021-07-02T06:34: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": "303db4c8b...
5422a6c7-d79e-45e0-8375-e3c66100f65a
mhaoli/ACM-Source-Code
Problems/UVa/math-UVa-11916(copy_LiuRuJia).cpp
/* * Author: Plumrain * Created Time: 2013-09-05 00:18 * File Name: math-UVa-119162.cpp */ #include<iostream> #include<cstdio> #include<cmath> #include<map> #include<set> using namespace std; #define out(x) cout<<#x<<":"<<(x)<<endl #define tst(a) cout<<#a<<endl typedef long long int64; const int mod = 1000000...
ALGO
0.999904
3.69519
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2015-04-15T04:55: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": "0072d6b1...
18eab3d1-8673-4595-9194-1b212f65b326
Chari69/ctrl-c--
ayed/practicas/caballo_backtracking.cpp
#include <iostream> using namespace std; // VARIABLES bool debug = false; int pos_caballo_x = 0; int pos_caballo_y = 0; const int tam_tablero = 8; const int tam_alternativas = 8; int alternativas_x[tam_alternativas] = {2, 1, -1, -2, -2, -1, 1, 2}; int alternativas_y[tam_alternativas] = {1, 2, 2, 1, -1, -2, -2, -1}; ...
ALGO
0.999443
4.741985
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-02-01T00:06: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": "d2025193834...
16e88b88-27aa-4525-a824-2bdd112bf532
zhanglidada/code
cpp/473makesquare.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <queue> class Solution { public: // 深度优先搜索,尝试将火柴棍分配到四条边上 bool dfs(int index, vector<int> &matchsticks, vector<int> &edges, int len) { // index已经到最后一个位置,说明当前已经访问过所有的火柴信息 if (index == matchsticks.size()) { return ...
ALGO
0.999606
4.852399
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2021-08-06T01:12: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": "4192f37fc...
ce3166c5-5c65-4c68-9433-a2620525e07b
cr0nuss/kursach
main.cpp
#include <iostream> using namespace std; int counterD = 0; bool checkOnDraw() { counterD++; if (counterD == 8) return false; return true; } void ai(int map[4][4]) { int x,y; do { x = rand() % 4; y = rand() % 4; }while(map[x][y] != 0); map[x][y] = 2; } void map_show(int ...
ALGO
0.999354
3.547777
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-05-05T14:56: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": "0b0df2707c09...
dc8aad59-759c-43f5-82db-629cec100094
Dragonfire3900/Multi_Dim_Analysis
OGDF_Mods/src/ogdf/energybased/fmmm/numexcept.cpp
/** \file * \brief Implementation of class numexcept (handling of numeric problems). * * \author <NAME> * * \par License: * This file is part of the Open Graph Drawing Framework (OGDF). * * \par * Copyright (C)<br> * See README.md in the OGDF root directory for details. * * \par * This program is free soft...
ALGO
0.975592
5.740285
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2020-11-08T01:47: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": "b71f07117a9...
b67ee20f-ed9e-4e44-b83a-f4ff6ea865ff
helfo2/UFMG-CP-training
rot902.cpp
/* Nome: <NAME> * Matricula: 2015068990 * Problema resolvido: Pontos * Roteiro 9 - Problema 02 * Estrategias: ao armazenarmos todos os pontos, calculamos as distancias respectivas e * comparamo-las umas com as outras, em complexidade O(n2). */ #include <algorithm> #include <bitset> #include <cmath> #include <cstdi...
ALGO
0.999855
3.777605
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-01-17T20:02: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": "615486fc0c...
4e056d1a-fd53-4485-8cbc-42be405508f2
s1023030/UVa
C++/10801_LiftHopping.cpp
#include<cstdio> #include<map> #include<vector> #include<queue> using namespace std; struct floor{ int L,F,time; }; vector< map<int,floor> >lift; priority_queue<floor>myQueue; int liftSpeed[5]; bool operator<(const floor&a,const floor&b){ return a.time>b.time; } int main(){ map<int,floor>tempLift; map<i...
ALGO
0.998895
3.544046
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2018-08-31T15:17: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": "57996996b...
4d7aaa30-30be-413f-a312-b72eff61ec44
ldmnyblzs/libpebble-public
include/pebble/vertex_dividing.hpp
/*! \file vertex_dividing.hpp \brief Determine which vertices are dividing. Let us consider a face \f$F\f$, a halfedge \f$H\f$ in its boundary and the vertex \f$V\f$ which is the target of \f$H\f$. \f$V\f$ is <em>dividing with respect to \f$F\f$</em> if the line through \f$V\f$ and through the point we get...
ALGO
0.977031
6.374731
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-01-12T11: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": "f4f492942c9...
dc155f7b-df5c-48a1-911c-c48489f13df6
AnasImloul/Leetcode-Solutions
scripts/algorithms/R/Reverse Subarray To Maximize Array Value/Reverse Subarray To Maximize Array Value.cpp
class Solution { public: int maxValueAfterReverse(vector<int>& nums) { int original = 0; for(int i = 0 ; i < nums.size() - 1 ; ++i) { original += abs(nums[i] - nums[i+1]); } int ans = original; int a1 = INT_MAX; int a2 = INT_MAX; int a3 = INT_MIN; ...
ALGO
0.999986
5.156497
{ "github_metadata": { "branch": "main", "commit_count": 5405, "repo_created_at": "2022-08-07T11:14:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 382, "forks": 120, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26bb4...
6aef8ec2-47a2-4ca5-a449-a861cfe8a60b
khanhvu207/competitiveprogramming
old_files/Olympiad/CST 2019/Thầy Minh/28-12-2018/cedar.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <map> #include <vector> #define pp pair<int,int> using namespace std; const int maxn = 101; const int maxp = 30001; int n,m,w[maxn],e[maxn],p[maxn],f[maxn][maxn]; pp trace[maxn][maxn]; map<int,int> mp; vector<pp> lis; void dfs(int...
ALGO
0.999992
3.548192
{ "github_metadata": { "branch": "master", "commit_count": 147, "repo_created_at": "2018-11-20T08:25:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2836bef...
4c514f51-fc3d-4fb7-b8ee-44de07cbe108
vinamrajain19/Leetcode_Submissions
99-recover-binary-search-tree/99-recover-binary-search-tree.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.999998
6.253767
{ "github_metadata": { "branch": "main", "commit_count": 3437, "repo_created_at": "2022-04-12T06:43:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a14da39c...
a005cfd0-4be5-4d70-84d7-4238b7fa035c
anak1st/Contests
src/Nowcoder/2023-Winter/5/I.cpp
/** * @author: XiaFan * @date: 2023-02-01 14:43 **/ #include <bits/stdc++.h> using i64 = long long; int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); std::vector<i64> f; f.push_back(0); f.push_back(1); while (f.back() < 1e15) { f.push_back(f.back() * 2); } ...
ALGO
0.999851
3.568651
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2022-08-13T01:53:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b8ac623...
f57895f7-313d-4edd-8e43-e572e64e500a
ishandutta2007/codeforces-h
heltion/normal/1647/C.cpp
#include<bits/stdc++.h> using namespace std; using LL = long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; for (cin >> t; t; t -= 1) { int n, m; cin >> n >> m; vector<string> s(n); for (auto& si : s) cin >> si; if (s[0][0] == '1') { ...
ALGO
0.999471
3.170817
{ "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": "25d36d91e533...
31a22564-b1ed-404b-8821-cf4c8c6bd2ef
krishukr/cpp-code
src/LG/lg-P4015.cpp
#include <climits> #include <cstdio> #include <cstring> #include <iostream> #include <queue> class MCMF { private: static const int MAX_N = 100050; protected: struct Node { int v; int nxt; int w; int c; } node[MAX_N]; int head[MAX_N]; int cnt = 1; int di...
ALGO
0.999973
3.697511
{ "github_metadata": { "branch": "master", "commit_count": 193, "repo_created_at": "2021-01-19T08:15:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a287b3f...
b1847c24-7b93-4712-9535-f61ff8b2e703
alaneos777/club
project euler/66.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int lli; vector<lli> ContinuedFraction(lli n){ lli a0 = sqrt(n); vector<lli> coef = {a0}; if(a0 * a0 != n){ lli a = a0, p = 0, q = 1; do{ p = a * q - p; q = (n - p * p) / q; a = (a0 + p) / q; coef.push_back(a); }while(q != 1); } ret...
ALGO
0.999856
4.133201
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2018-08-06T04:13: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": "73641c924...
5ba7ffdf-5d28-4936-b5b1-a508276c8fcb
shawnpsh0326/20211110
intro.cc
#include <iostream> #include <chrono> #include <cmath> using namespace std; using namespace chrono; int A[1000000]; int Q[1000000]; int intro_sort(int* A, int* Q, int n, int ifqu); void insertion_sort(int* A, int n, int c) { if(c <= n) { for(int i = c; i > 0; i--) { if(A[i] < A[i-1]) { ...
ALGO
0.990559
4.216251
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-15T08:16: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": "df92ae88fbfc...
a0130419-ca58-411a-885e-c93ef1798fcd
google/llvm-propeller
propeller/code_layout_scorer.cc
// Copyright 2025 The Propeller 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 ag...
ALGO
0.976786
7.186951
{ "github_metadata": { "branch": "main", "commit_count": 259, "repo_created_at": "2019-09-09T17:16:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 432, "forks": 41, "issues": 12, "pull_requests": 15 }, "file_meta": { "content_id": "297b9c...
bcab4a46-43a8-4c51-84af-34f24342cfd2
sadrultoaha/Competitive-Programming
Online Judge Solves/UVA/UVa 11137 - Ingenuous Cubrency.cpp
/** SunWalker **/ #include<bits/stdc++.h> using namespace std; #define IN freopen("IN.txt","r",stdin) #define OUT freopen("OT.txt","w",stdout) #define fastread() {ios_base::sync_with_stdio(false);cin.tie(0);} #define MEM(a,b) memset(a,b,sizeof(a)) #define ll long long #define dbg(args...) {cerr<<"-->";deb...
ALGO
0.999891
3.647369
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-01-14T20:42:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14d846119837...
d2147651-b624-4f22-83eb-5e876ee9da31
OpenFOAM/OpenFOAM-10
src/finiteVolume/fvMesh/wallDist/FvWallInfo/FvWallInfoYPlusI.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\...
ALGO
0.991564
6.529773
{ "github_metadata": { "branch": "master", "commit_count": 6067, "repo_created_at": "2022-07-12T08:44:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 79, "forks": 44, "issues": 15, "pull_requests": 0 }, "file_meta": { "content_id": "e3f0...
f20e1247-fabd-4734-8e4c-74fee8053dc0
fishy15/competitive_programming
online/cses/math/prime_multiples.cpp
#include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <array> #include <algorithm> #include <utility> #include <map> #include <queue> #include <set> #include <cmath> #include <cstdio> #include <cstring> #include <functional> #include <numeric> #define ll long long #define ld long double ...
ALGO
0.999974
4.194713
{ "github_metadata": { "branch": "master", "commit_count": 1058, "repo_created_at": "2019-02-21T11:46:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ae20d...
c166b245-df76-42bc-bcac-097fbbbb686f
Taheershaik123/data-structures
stack/reverse_array_using_stack.cpp
#include<iostream> using namespace std; class node{ public: int data; node* next ; node(int val){ data = val; next = NULL; } }; class stack{ node* top; public: stack(){ top = NULL; } void push(int val){ node* n = new node(val); if(!n){...
ALGO
0.999927
4.433091
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2024-06-14T07:44:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe9cebbebc7...