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
0f5ed4e9-0361-498a-a7bb-76edc03a3634
pushkarguptaaa/Cpp-DSA
advancedFunctions.cpp
#include <iostream> #include <math.h> #include <string.h> using namespace std; int sumupton(int n){ int sum=0; for(int i=1; i<=n; i++){ sum+=i; } return sum; } bool checkpyth(int a, int b, int c ){ int x=(max(a,max(b,c))); int y,z; if(a==x){ y=b; z=c; } else if(...
ALGO
0.998291
3.072947
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2023-06-27T16:10: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": "3f1b309d055...
9aaa2813-a90b-4a24-b0bd-1b6a599153be
RolandTeodorowitsch/ProgramacaoOrientadaAObjetosECo
15-templates/src/exemplo1.cpp
#include <iostream> using namespace std; // Definicao da template de funcao printArray template <typename T> void printArray(const T *array, int count) { for (int i=0; i<count; i++) { if ( i > 0 ) cout << " "; cout << array[i]; } cout << endl; } // fim do template de funcao printArray /* O temp...
ALGO
0.922544
5.561814
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-07-31T17:01:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1cf1088fa735...
c186c848-8d40-4b58-9756-a1e6a20ec887
akhikolla/testpackages
fuzzedpackages/ManifoldOptim/src/Solvers/MRankAdaptive.cpp
#include "MRankAdaptive.h" /*Define the namespace*/ namespace ROPTLIB{ MRankAdaptive::MRankAdaptive(const Problem *prob, const Variable *initialx, Solvers *inSolver) { Initialization(prob, initialx); innerSolver = inSolver; }; void MRankAdaptive::SetProbX(const Problem *prob, const Variable *initialx) { ...
ALGO
0.999998
5.792332
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-01-15T17:42:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "471cd4cf2a...
49bcadcd-a2d9-47d9-98db-0f29e0ef37ab
qinmaogeng/Job-scheduler
main.cpp
#include <fstream> #include <string> #include <iostream> #include "test.h" #include <stdlib.h> #include <ostream> using namespace std; struct input{ string time; string command; /*the name of the command*/ string para; string v1; string v2; int Time; /*time stamp*/ int p1; int p2; /*values of the com...
ALGO
0.994441
3.350661
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-05-06T02:46:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eab63c32ef...
0af7a5a0-f41c-493b-9ca0-ae1c7fc8aa84
Harishankeryadav/Coddign-Practice-Questions
TREE/checkBalancedBST.cpp
#include <iostream> #include <queue> #include <stdlib.h> using namespace std; // tree class class Node { public: Node *left; Node *right; int data = 0; Node(int data) { this->data = data; left = NULL; right = NULL; } }; // level wise printing. void takeinput(Node *&roo...
ALGO
0.999922
4.136981
{ "github_metadata": { "branch": "main", "commit_count": 114, "repo_created_at": "2022-10-07T13:12:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e0cad69d58...
4360974d-c2af-4bc9-8cfa-5be35046f0bc
ww4u/megarobostudio
source/arith/arith_igus/arith/functions.cpp
#include "params.h" #include "math.h" #include <vector> // 常量及变量定义 #define error 5e-4 #define PI 3.1415926 #define E 2.7182818 double* armLengthArray; double vMax; double sca; double thetaS; double deltArm[2]; double* posLim; struct ResInfo { double P1; double P2; double P3; double V1; double V2; double V3; dou...
ALGO
0.991489
3.388982
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2020-09-17T07:32:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e11d91a0...
60c1be02-169f-43f8-9755-44cb396d29fb
hanii-gerges/Leetcode-Training
700-search-in-a-binary-search-tree/700-search-in-a-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.999993
5.759835
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2022-06-07T17:16:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d24f5211bb8...
c48e73dc-37e6-4548-bf1f-bf849b2012f9
AntonBankevich/LJA
src/projects/repeat_resolution/mdbg_topology.cpp
// // Created by <NAME> on 11/10/21. // #include "mdbg_topology.hpp" using namespace repeat_resolution; // ---------- RRVertexProperty ---------- [[nodiscard]] bool RRVertexProperty::IsCanonical() const { return seq.IsCanonical(); } void RRVertexProperty::IncLeft(MDBGSeq prefix) { seq.Prepend(std::move(pref...
ALGO
0.933225
6.649782
{ "github_metadata": { "branch": "main", "commit_count": 137, "repo_created_at": "2021-01-22T20:09:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 116, "forks": 18, "issues": 25, "pull_requests": 4 }, "file_meta": { "content_id": "25f67e...
d58a2f4f-d26f-4472-8093-ab70a12b6517
zoyanhui/leetcode
2013/Binary Tree Maximum Path Sum.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int maxPathSum(TreeNode *root) { // Start typing your C/C++ solution below // DO NOT wr...
ALGO
0.999979
5.47387
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2015-09-15T05:39:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6efa0a33e...
da8b64cf-bb79-4e9c-b5f8-cb06b2a75f37
theodore/olympiads
SPOJ/PRIME1/PRIME1.cpp
#include <cstdio> #include <cstring> #include <cmath> #define max(a, b) ((a) > (b) ? (a) : (b)) int a, b; int prime[31250001]; int list[3410]; bool rest[100003]; int main() { freopen("ans", "w", stdout); memset(prime, 0xff, sizeof prime); prime[0] ^= 2; for (int i=3; i<=31625; i+=2) { if (!(prime[i/32] & (1...
ALGO
0.999818
3.320895
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-06-11T08:19:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e15381fa9f...
a212a66a-e045-4926-8929-7359e2797c9f
Xarma123/cp-practice
A_Fight_the_Monster.cpp
#include <bits/stdc++.h> #define lol long long using namespace std; int main() { std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); lol hy, aty, dy; cin >> hy >> aty >> dy; lol hm, atm, dm; cin >> hm >> atm >> dm; lol h, at, d; cin >> h >> at >> d; lol ans = LONG_L...
ALGO
0.999816
3.50851
{ "github_metadata": { "branch": "master", "commit_count": 176, "repo_created_at": "2022-09-18T23:21: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": "87abbc67...
8c64e838-4f7a-48f5-8d6a-19e9fc4b22e6
GKirwan43/C-Plus-Pus-Course
Chapter 2/2.5.cpp
#include <iostream> using namespace std; int main() { int roomCapacity, people; cout << "Enter the maximum room capacity: \n"; cin >> roomCapacity; cout << "Enter the number of people: \n"; cin >> people; if (roomCapacity>=people) { cout << "It is legal to hold the meeting and a ...
TOOL
0.995518
4.24456
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-05-19T18:43: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": "626d4541ebdb...
222bc7cc-42d1-45c0-aec4-4cbebb715fdc
Dushyant-K/Data-Structures-and-Algorithms
0714-best-time-to-buy-and-sell-stock-with-transaction-fee/0714-best-time-to-buy-and-sell-stock-with-transaction-fee.cpp
class Solution { private: int solve(int idx, int buy, vector<int>& prices, vector<vector<int>>& dp, int fee){ if(idx==prices.size()){ return 0; } if(dp[idx][buy]!=-1)return dp[idx][buy]; if(buy){ int profit = max(-prices[idx]+solve(idx+1,0,prices,dp,fee),...
ALGO
0.999981
5.558247
{ "github_metadata": { "branch": "main", "commit_count": 1812, "repo_created_at": "2024-04-18T08:13:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61f107d3e...
8bb383cc-cf68-4ef8-94bb-95be85f5a40f
ishandutta2007/codeforces-d
dreamoon_love_aa/normal/582/B.cpp
#include <bits/stdc++.h> #define SZ(X) ((int)(X).size()) #define ALL(X) (X).begin(), (X).end() #define REP(I, N) for (int I = 0; I < (N); ++I) #define REPP(I, A, B) for (int I = (A); I < (B); ++I) #define RI(X) scanf("%d", &(X)) #define RII(X, Y) scanf("%d%d", &(X), &(Y)) #define RIII(X, Y, Z) scanf("%d%d%d", &(X), &(Y...
ALGO
0.999818
3.154146
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "673bde4f435c...
8b9d3a8c-87a7-42b2-8902-8186c0af9b56
docbrown/blaxxun-cc3d
src/core/gnurbsutil.h
/*============================================================================= This code is licensed under the Web3D-blaxxun Community Source License, provided in distribution file LICENSE.TXT and available online at http://www.web3D.org/TaskGroups/x3d/blaxxun/Web3D-blaxxunCommunitySourceAgreement.html and may only b...
ALGO
0.997774
5.280634
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2014-07-14T04:51:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4f63dc43b6...
3cb430cd-3d57-44f8-ad80-93b1f62394d7
kuhaku-space/atcoder-submissions
code/abc/abc102/arc100_b.cpp
#include <bits/stdc++.h> using namespace std; using ll = int64_t; using ld = long double; using P = pair<ll, ll>; using Pld = pair<ld, ld>; using Vec = vector<ll>; using VecP = vector<P>; using VecB = vector<bool>; using VecC = vector<char>; using VecD = vector<ld>; using VecS = vector<string>; template <class T> using...
ALGO
0.99995
4.183873
{ "github_metadata": { "branch": "main", "commit_count": 446, "repo_created_at": "2022-05-21T07:48: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": "ad78c7b284...
bae661c4-8256-4cd2-98a6-dd1c67a7d7a0
adrian-budau/work
Codeforces/180 (Div. 1)/E/main.cpp
#include <iostream> #include <vector> using namespace std; const int maxn = 400505; int N; vector<int> Start[maxn], End[maxn]; int aibstart[maxn], aibend[maxn]; void update(int *aib, int poz, int value) { for (; poz <= 2 * N; poz += (poz & -poz)) aib[poz] += value; } int query(int *aib, int to) { i...
ALGO
0.999695
3.748416
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2013-04-27T22:47:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc6013baa...
b5be25b8-915b-41ef-8b65-c23f46ff9552
lorenzo-ferrari/kattis
src/goatrope.cpp
#include <bits/stdc++.h> using namespace std; using LL = long long; struct pt { LL x, y; pt(): x(0), y(0) {} pt(LL x, LL y): x(x), y(y) {} double norm() { return sqrt(x*x + y*y); } }; istream& operator >>(istream &in, pt &A) { return in >> A.x >> A.y; } ostream& operator <<(ostream &out, const pt &A) { return out ...
ALGO
0.999552
4.091837
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2021-02-06T11:23: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": "42fc6a5373d...
d70d013c-b3e9-4ea2-920b-6009baeedcdb
tangjz/acm-icpc
codeforces/complete/1342E.cpp
#include <bits/stdc++.h> using namespace std; typedef unsigned int UL; typedef long long LL; typedef unsigned long long ULL; typedef double DB; typedef long double LDB; const int maxn = (int)2e5 + 1, maxd = 26, mod = 998244353, INF = 0x3f3f3f3f; const LL INFLL = 0x3f3f3f3f3f3f3f3fLL; const DB pi = acos((DB)-1); int ma...
ALGO
0.999994
4.571169
{ "github_metadata": { "branch": "master", "commit_count": 293, "repo_created_at": "2013-10-06T18:57:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 45, "forks": 13, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "ab8d1f...
2029b4b5-48af-489e-8a46-e40fb9df41c5
ascyrax/cp_dsa
codeforces/rated/div2/700s/766/a/a1.cpp
// @author: ascyrax #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define endl "\n" #define ioss \ ios::sync_with_stdio(false); \ cin.tie(0); #define pb push_back double startTime; double gct() // get_current_time { retur...
ALGO
0.999711
4.323351
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2022-06-07T16:49:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ef6c3584e04...
fc548775-9e08-401b-8e1e-c9f70f337892
Xander23333/CUGB-Data_Structure
6search/hash.cpp
#include<iostream> using namespace std; int a[]{16,74,60,43,54,90,46,31,29,88,77}; int A[13]{}; void insert(int key){ int pos = key%13; while (A[pos] != 0) { pos = (pos+1)%13; if (pos == key%13) { printf("hash table has full!\n"); break; } } A[pos] = key; } int find(int key){ int pos...
ALGO
0.999584
4.055458
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2018-05-14T08:51:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "667dfb852...
b3237dc4-67be-4c29-9eca-f6084d900cd4
festvox/festival
src/modules/MultiSyn/TargetCostRescoring.h
/*************************************************************************/ /* */ /* Centre for Speech Technology Research */ /* (University of Edinburgh, UK) and */ /* ...
ALGO
0.910149
6.335789
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2017-09-04T15:49:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 432, "forks": 63, "issues": 38, "pull_requests": 1 }, "file_meta": { "content_id": "8f1aa...
e524f989-0a04-42dd-8180-6b254333d684
Kettris/prog1
250301_Cmake/projects/long_number/src/long_number.hpp
#pragma once #include <iostream> #include <stdexcept> //для ошибок #include <cstring> //для памти и с namespace biv { class LongNumber { private: int* numbers; // хранит цифры int length; // длина числа int sign; // знак числа: 1 для положительного, -1 для отрицательного public: LongNumber()...
TOOL
0.946917
3.236144
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2024-11-18T23:04: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": "87bf31f87...
03c8b2ef-0169-4e57-ae18-e3466c9150ef
ethanqtle/Comp_Sci_75_Labs
CS076/CS076ProgrammingLab/EthanLeLab05/EthanLeLab05.cpp
#include <iostream> using namespace std; class Node { public: int data; Node* next; }; class LinkedList { private: Node* head; public: LinkedList() { head = nullptr; } ~LinkedList() { Node* current = head; while (current != nullptr) { Node* next = current...
ALGO
0.990703
5.646819
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2023-03-31T03:19: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": "c08599ba6...
0385d074-cf2b-446f-85fd-b3779f9183d2
zzm99/Mesh-based-Applications
项目代码/code/main.cpp
#include "mesh.h" #include <cstdio> int myKernelFun(Vertex *v) { double sum = *(double*)v->info; for (auto u : v->adj) { sum += *(double*)u->info; } *(double*)(v->info) = sum / (v->adj.size() + 1); return 0; } int main() { /* TEST 1 */ /* Example 1: Kernel Function */ MeshHelper *mh = new MeshHelper(); mh-...
ALGO
0.994145
4.362418
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-05-19T08:13:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "414564481...
87817932-03c3-45f3-95ea-3cd7a5cbd84e
SelvakumarS123/C-with-classes
pass by address/main.cpp
#include <iostream> using namespace std; // here formal parameters can indirectly(using pointers) modify the actual parameters void swapping(int *a,int *b) // pointer variables are used for storing addresses(of actual parameters) // i.e a--->x(address of x is stored in 'a' and so 'a' w...
ALGO
0.999249
4.819812
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-08-31T06:30: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": "dd2e46bf26d9...
a091e507-9f13-4109-9c18-211a3fde91ff
P-Pix/MyDefender
src/Game/Execution.cpp
/** * @file Execution.cpp * @author <NAME> * * @copyright Copyright (c) 2021 * */ #include "../../include/Game.hpp" void Game::execution(void) { for (int i = 0; i < this->m_ListMonster.size(); i++) { for (int j = 0; j < this->m_ListDefender.size(); j++) { this->m_ListDefender[j]->setDama...
TOOL
0.956243
4.234788
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2021-11-01T14:03:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0de145649ab...
7fc48d19-fa13-4336-8545-fd384270792c
dstl/sarcastic
src/sarcastic/shadowRays.cpp
/*************************************************************************** * * Module : shadowRays.cpp * Program : sarcastic * Created by : <NAME> on 15/03/2017 * CLASSIFICATION : Official * Date of CLASSN : 05-Nov-2018 * Description : * routine to generate an arra...
ALGO
0.911985
4.279558
{ "github_metadata": { "branch": "master", "commit_count": 320, "repo_created_at": "2019-09-17T08:47:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11, "forks": 4, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "2f68eda8...
693dba1c-9982-4dee-af00-5d73678252c9
Jelchi/datastructure
doubleLinkedList.cpp
#include <stdio.h> #include <string.h> #include <stdlib.h> struct Node{ char name[101]; char nim[101]; int age; Node * next; Node *prev; }; Node * head = NULL; Node * tail = NULL; Node *createNode (const char * name , const char *nim, int age){ Node * newNode = (Node*)malloc(sizeof(...
ALGO
0.999426
4.070931
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-24T11:09: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": "a5724d710ee4...
0d8d98a8-3a3b-46e7-9f04-a5101a28f5f5
nightfury1204/Competetive-Programming
LightOJ/1300.cpp
//<NAME> #include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> #include<queue> #include<stack> #include<map> #include<string> #include<vector> #include<algorithm> #define N 1000000 #define sn scanf #define pf printf typedef long long int ll; using namespace std; struct T{ int a; }; vector<int>ar[200...
ALGO
0.999806
3.278693
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-11-08T10:02: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": "6a22866f7a...
a1dacfbe-31f6-4d87-b09f-d430daa5aa60
osean-me/Algorithm
cpp_algorithm/basic/algorithm/dfs_2.cpp
// // Created by <NAME> on 2023/05/07. // #include <bits/stdc++.h> using namespace std; int const V = 104; int n = 0, m = 0, ret = 0; int adj[V][V] = {}, visited[V][V] = {}; int dy[] = {-1, 0, 1, 0}; int dx[] = {0, 1, 0, -1}; void dfs(int y, int x) { visited[y][x] = 1; for (int i = 0; i < 4; i++) { i...
ALGO
0.999866
4.87249
{ "github_metadata": { "branch": "main", "commit_count": 188, "repo_created_at": "2023-03-14T11:30: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": "2db48cf768...
7b66f718-1fa0-46ce-b3b7-e7873b0f7118
seunghyun3309/Solved_Algorithm
backjoon/2020-02/[백준]1759_.암호만들기.cpp
#include <iostream> #include <queue> #include <vector> #include <algorithm> using namespace std; vector<char>v; queue<char>q; int L, C; char alpa[15]; int m_cnt = 0, j_cnt = 0; bool alphabet[26] = { false, }; bool visited[26] = { false, }; void dfs(int k) { if (k >= 2) { if (v[k - 1] < v[k - 2]) return; } ...
ALGO
0.999952
3.268654
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2020-02-27T06:19:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f74ea774b...
34f03ac7-7962-4f64-913b-a5294c47b010
jungyoonoh/AlgorithmPractice
C++/ALGOSPOT/BruteForce/Picnic.cpp
#include <iostream> #include <string> #include <cstring> using namespace std; int relationship[77][77]; int checkMatching[77]; int C,n,m,sol; void Matching() { int iterator = -1; for (int i = 0; i < n; i++) { if (checkMatching[i] == 0) { iterator = i; break; } } if (iterator == -1) { // 친구 매칭 다됨 == c...
ALGO
0.999876
3.761421
{ "github_metadata": { "branch": "main", "commit_count": 348, "repo_created_at": "2021-01-26T04:45: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": "a995d18716...
82bc3233-1876-4ec4-bf96-ecaf67bd5eaf
joana-mendonca/IST-LEIC
2nd_year/ASA/LowestCommonAncestor/p2.cpp
/*********************************************************************************************************** * ASA Projeto 2 - Grupo tp037 * <NAME>, 83597 ***********************************************************************************************************/ ...
ALGO
0.999992
4.543628
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2021-05-30T00:08: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": "07605504ca2...
c31f9ff7-356c-485b-9e83-2994460e0b83
FilmKilns/FilmKilns
src/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp
/* * Copyright 2017 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include "src/gpu/ccpr/GrVSCoverageProcessor.h" #include "src/gpu/GrOpsRenderPass.h" #include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h" #include "src/gpu/glsl/GrGLSLVertex...
TOOL
0.901653
3.352995
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-06-02T07:30:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 203, "forks": 67, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "2b1e004...
0969f336-dead-4181-b85a-67eb9a6574f3
arin2002/leetcode
0208-implement-trie-prefix-tree/0208-implement-trie-prefix-tree.cpp
class Node{ Node* links[26]; bool flag = false; public: bool containsKey(char ch){ return links[ch-'a'] != NULL; } void put(Node *root,char ch){ links[ch-'a'] = root; } Node* next(char ch){ return links[ch-'a']; } void setEnd(){ ...
ALGO
0.999874
5.372888
{ "github_metadata": { "branch": "main", "commit_count": 4845, "repo_created_at": "2022-05-19T14:50: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": "f08338e5e...
30fdcfd7-e780-4b65-abcf-77c1b44d7be8
ttbarMET-at-IPHC/NTupleAnalysis
EventReco/src/Mt2Com_bisect.cc
#include "EventReco/interface/Mt2Com_bisect.h" Mt2Com_bisect::Mt2Com_bisect(){} Mt2Com_bisect::~Mt2Com_bisect(){} //########################################### // Global Functions //########################################### double Mt2Com_bisect::calculateMT2w(const std::vector<IPHCTree::NTJet>& jets, ...
ALGO
0.996966
5.188607
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2013-06-13T13:11:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f759fff61b...
b24e1aa5-12be-4430-9f23-d04746934055
vipinmishra0852/DecodeAssignment
Queue/QueueFromLL.cpp
#include <bits/stdc++.h> using namespace std; class Node // User defined data type { public: int val; Node *next; Node(int val) { this->val = val; this->next = NULL; } }; class Queue // User defined data structure { public: Node *head; Node *tail; int size; Queue() { head = tail = NUL...
ALGO
0.99387
3.886873
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-03-22T14:06:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "46a411b304a...
eb4cdbec-0434-4adb-ae36-fd10ed9d8daf
Scoots1215/GDEV42-Homework2-TamanoOlivares
Main.cpp
#include <raylib.h> #include <raymath.h> #include <math.h> #include <string> #include <iostream> #include <fstream> #include <vector> const int WINDOW_WIDTH = 800; const int WINDOW_HEIGHT = 600; const int FPS = 60; const int TIMESTEP = 1/FPS; std::vector<std::vector<int>> GeneratePascalLookUpTable(int r, int s, int...
ALGO
0.999752
4.313858
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-02-26T12:12: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": "f1d151e1b3fb...
3179ad15-851b-4818-b8f9-c937986221a8
peterpei666/leetcode_cpp
417. Pacific Atlantic Water Flow.cpp
#include <iostream> #include <algorithm> #include <bitset> using namespace std; class Solution { public: vector<vector<int>> pacificAtlantic(vector<vector<int>>& heights) { int m,n; m=(int)heights.size(); n=(int)heights[0].size(); int dir[4][2]={-1,0,0,-1,1,0,0,1}; bitse...
ALGO
0.999894
5.749899
{ "github_metadata": { "branch": "main", "commit_count": 231, "repo_created_at": "2025-03-31T15:10:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "644274536c...
8110690c-af3d-4665-9b4c-ec4ae804b5d1
mapsme/omim
geometry/oblate_spheroid.cpp
#include "geometry/oblate_spheroid.hpp" #include "geometry/distance_on_sphere.hpp" #include "geometry/point2d.hpp" #include "base/math.hpp" #include <cmath> #include <cstdint> #include <limits> using namespace std; namespace { // Length of semi-major axis of the spheroid WGS-84. double constexpr kA = 6378137.0; //...
ALGO
0.999818
7.240278
{ "github_metadata": { "branch": "master", "commit_count": 34890, "repo_created_at": "2015-09-20T02:57:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4603, "forks": 1146, "issues": 933, "pull_requests": 71 }, "file_meta": { "content_id":...
f3bb8bbb-c091-4cb5-94ff-4e7378928235
alvinahsu/Competitive-Programming
Practice/CodeForces/CF878/E.cpp
/* * File: CF878E * Author: <NAME> * Date: 06/11/2023 10:24:26 */ #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "../../Templates/debug.h" #else #define dbg(...) #endif int main(){ ios::sync_with_stdio(false); cin.tie(0); int T; cin >> T; while(T--){ string s1,s2; cin >> s1 >> s2; ...
ALGO
0.99991
5.735369
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2023-04-04T09:52: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": "51a22f28080...
09e782e9-8af8-43a4-b28b-dc175ff30491
ishandutta2007/codeforces-k
kirill22/normal/1585/C.cpp
#include<bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; while (t--) { int n, k; cin >> n >> k; vector<int> a, b; for (int i = 0; i < n; i++) { int x; cin >> x; ...
ALGO
0.99986
4.137885
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06: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": "03a2b1414111...
bdc8ebf2-88ca-4e92-b019-e08848858425
ishandutta2007/codeforces-a
atreus/normal/480/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int maxn = 5000 + 10; const int mod = 1e9 + 7; int dp[2][maxn], par[2][maxn]; int main(){ ios_base::sync_with_stdio(false); int n, a, b, k; cin >> n >> a >> b >> k; for (int i = 1; i <= n; i++){ dp[0][i] = 1; pa...
ALGO
0.999934
3.843577
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51: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": "2aa20c26273e...
b3ddc1f0-1080-44a6-b010-122ec3d3c2d3
syedhammadahmed/UCFQuSim
generator/QuMappingInitializerZulehner.h
// // Created by SHA on 7/24/2020. // #ifndef UCFQUSIM_QuMappingInitializerZulehner_ZULEHNER_H #define UCFQUSIM_QuMappingInitializerZulehner_ZULEHNER_H #include <core/QuMapping.h> #include "PriorityGraph.h" class QuMappingInitializerZulehner { private: int n; // # of qubits int l; // logical qubits int ...
ALGO
0.984312
5.279286
{ "github_metadata": { "branch": "master", "commit_count": 217, "repo_created_at": "2019-10-21T19:08:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4145aa07...
ef65105c-38e4-460f-a950-e50981dd625c
Kozphy/cpp_learn
cpp_20_class/FunctionTemplate/main.cpp
#include <iostream> #include <string> template <typename T> T maximum(T a, T b); template <typename T> T multiply(T a, T b); int main() { int a {10}; int b {23}; int *p_a {&a}; int *p_b {&b}; double c{34.7}; double d{23.4}; std::string e{"hello"}; std::string f{"world"}; std:...
ALGO
0.996744
4.474792
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-06-13T07:26: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": "f486fcad58a...
845ab518-e592-4f4c-a30f-97e6be947d82
greengangsta/Coding
Algorithms on Graphs/week2_decomposition2/1_acyclicity/soln.cpp
#include<bits/stdc++.h> using namespace std; int flag = 0; vector<int> reachable(vector <vector<int>> adj,int u,vector <int> visited,int init) { visited[u] = 1; for(int i = 0;i<adj[u].size();i++) { if(adj[u][i] == init) { // cout<<"check inner condition"<<endl; flag =...
ALGO
0.999945
3.854843
{ "github_metadata": { "branch": "master", "commit_count": 414, "repo_created_at": "2018-11-10T12:50: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": "557b98ed...
67a972eb-bfed-4447-841f-277e07aa15f3
dillongoostudios/goo-engine
intern/cycles/bvh/build.cpp
/* SPDX-FileCopyrightText: 2009-2010 NVIDIA Corporation * SPDX-FileCopyrightText: 2011-2022 Blender Foundation * * SPDX-License-Identifier: Apache-2.0 * * Adapted code from NVIDIA Corporation. */ #include "bvh/build.h" #include "bvh/binning.h" #include "bvh/node.h" #include "bvh/params.h" #include "bvh/split.h" ...
ALGO
0.94398
5.921525
{ "github_metadata": { "branch": "goo-engine-main", "commit_count": 132039, "repo_created_at": "2021-05-08T09:53:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1109, "forks": 148, "issues": 44, "pull_requests": 6 }, "file_meta": { "conte...
5a756ea6-882f-4bd4-b1eb-6672f4ee180a
prabhjotschugh/DSA-Solutions
0450-delete-node-in-a-bst/0450-delete-node-in-a-bst.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.999983
5.511771
{ "github_metadata": { "branch": "main", "commit_count": 2956, "repo_created_at": "2022-11-28T11:40:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f3e1cee...
e9fd096c-9b2b-4eba-b87d-27a06f8fdaad
ptk5758/PTK-BOJ
백준/Gold/5427. 불/불.cc
#include <iostream> #include "queue" #include "vector" #define FAILED "IMPOSSIBLE" typedef std::queue<std::pair<int, int>> Queue; typedef std::vector<std::vector<bool>> Visited; int dx[] = {0,0,-1,1}; int dy[] = {1,-1,0,0}; bool HumanBFS(char **board, Queue &human, Visited &visited, int h, int w) { Queue next; ...
ALGO
0.999927
3.692541
{ "github_metadata": { "branch": "main", "commit_count": 506, "repo_created_at": "2023-03-28T17:03:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30ecf5caa1...
fa53994d-960c-49a0-8950-efbb81923000
sashodada/UP_KN_2019
labs/week11/solutions/ex1.cpp
#include<iostream> using namespace std; const int MAX_N = 100; long long findSumOf3x3Platform(int matrix[MAX_N][MAX_N], int row, int col){ int rowLimit = row + 3; int colLimit = col + 3; long long sum = 0; for(int i = row; i < rowLimit; ++i){ for(int j = col; j < colLimit; ++j){ sum += matrix[i][j]...
ALGO
0.999718
4.292868
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2019-10-02T13:46:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7cb63d5af...
264267d7-9315-4e2b-96e7-c9db66c87ff6
phracker/MacOSX-SDKs
MacOSX10.10.sdk/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/scipy/weave/blitz/blitz/array/stencilops.h
// -*- C++ -*- /*************************************************************************** * blitz/array/stencilops.h Stencil operators * * Copyright (C) 1997-2001 <NAME> <<EMAIL>> * * This code was relicensed under the modified BSD license for use in SciPy * by <NAME> (see LICENSE.txt in the weave directory). ...
ALGO
0.904421
6.335351
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2013-10-15T17:41:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2635, "forks": 653, "issues": 16, "pull_requests": 3 }, "file_meta": { "content_id": "8d0...
f85642d8-99f2-4591-a342-664b8a7d02b8
debajit13/DSA-Basics
Arrays/insert_element.cpp
// program to insert element in an array #include<iostream> using namespace std; //function to insert elements in any position of an array. Time complexity of this function is O(n) int insert(int arr[], int n, int pos, int cap, int x) { if(n == cap) return n; int idx = pos - 1; for(int i = n-1; i >= idx; i--) { ...
ALGO
0.998977
4.855868
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2020-11-01T06:57:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab5d56fb504...
cfaafb9c-4daf-412c-8c07-b3993cec54df
asad5059/CP
D - Querying Multiset .cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define ll long long int #define ull unsigned long long int #define pb push_back #define ff first #define ss second using namespace std; using namespace __gnu_pbds; template <typename PB> using ordered_set = tree<PB, ...
ALGO
0.999887
4.439074
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-03-14T06:41:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "251652f7d7cf...
198813a4-879b-4c00-984f-231ccde86497
shenghaodong/fall-2022-135-lab-04-shenghaodong
main.cpp
#include <iostream> #include "box.h" #include "checkerboard.h" #include "cross.h" #include "lower.h" #include "upper.h" #include "trapezoid.h" #include "checkerboard3x3.h" int main(){ std::cout << "Task A: \n" << std::endl; std::cout << "makeBox(7, 4): \n"; makeBox(7, 4); std::cout << "\n"; std::co...
TOOL
0.952963
4.183082
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-05-28T17:04:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "17839f43b22...
7d9213ab-7a25-4f65-8f45-10ab8b71849a
eatingfood142434/USACO-Guide
Gold/Dynamic Programming/MoneySums.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(0); int n, s = 0, ret = 0; cin >> n; int coins[n]; for (int& i: coins) { cin >> i; s += i; } bool dp[s+1] = {}; dp[0] = true; for (int i = 0; i ...
ALGO
0.999973
3.327241
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-12-28T17:54: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": "2b76b52235f8...
6515d62b-fedf-458b-908b-32c055605ee8
splucs/Competitive-Programming
Codeforces/Gym/100405 2013-2014 Northwestern European Regional Contest (NWERC 2013)/F.cpp
#include <bits/stdc++.h> using namespace std; int len[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; int countJulian(int day, int month, int year) { int curday = 4; int curmonth = 10; int curyear = 1582; int ans = 0; while(curyear < year || curmonth < month || curday < day) { ans++; curday++...
ALGO
0.999784
3.924508
{ "github_metadata": { "branch": "master", "commit_count": 406, "repo_created_at": "2017-03-16T20:42:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 136, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dcd77...
ed832646-32f8-4efc-943d-151508755f94
MdAkdas/My_Codes
CodeForces/Practice/sail.cpp
#include<bits/stdc++.h> using namespace std; #define fo(i,n) for(i=0;i<n;i++) #define ll long long #define si(x) scanf("%d",&x) #define sl(x) scanf("%lld",&x) #define ss(s) scanf("%s",s) #define pi(x) printf("%d\n",x) #define pl(x) printf("%lld\n",x) #define ps(s) printf("%s\n",s) #define line cout<<"\n...
ALGO
0.999971
3.291384
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2020-04-12T21:09: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": "403d9d365...
c4e4865e-14e0-4e66-8aad-633243d18a14
MBalszun/mart-common
include/mart-common/experimental/lin_alg/matrix.h
#ifndef LIB_MART_COMMON_GUARD_LIN_ALG_MATRIX_H #define LIB_MART_COMMON_GUARD_LIN_ALG_MATRIX_H /** * matrix.h (mart-common) * * Copyright (C) 2015-2018: <NAME> <<EMAIL>> * * This software may be modified and distributed under the terms * of the MIT license. See either the LICENSE file in the library's root * dire...
ALGO
0.999823
6.776512
{ "github_metadata": { "branch": "master", "commit_count": 813, "repo_created_at": "2017-06-20T10:35: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": "534b7687...
c9d27a0d-1908-4f84-a7fe-a685995e2ae1
MariaKobryn/Lab-6.4
Lab 6.4/Lab6.4.cpp
#include <iostream> #include <iomanip> #include <conio.h> #include <cstdlib> #include <ctime> using namespace std; void Create(int* a, const int n, int Low, int High) { for (int i = 0; i < n; i++) a[i] = Low + rand() % (High - Low + 1); } void Print(int* a, const int n) { for (int i = 0; i < n; i++) cout << set...
ALGO
0.97821
3.799834
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-12-06T17:00: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": "fe79f378c5...
5ac5ac96-0aeb-4184-be97-0e66d96cc79f
cam-simard/C275.Winter.2022.Share.Class
Lecture.11/digraph_builder.cpp
#include <iostream> #include "digraph.h" using namespace std; // FORMAT // n m - number of nodes and edges // list of all n node labels (integers) // m lines, each giving an edge (u,v) int main() { Digraph graph; int vcount, ecount, v, s, t; cin >> vcount >> ecount; for (int i=0; i<vcount; i++) { cin >...
ALGO
0.99616
5.072952
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2022-03-14T22:43:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9fd6e5e7c1...
4c5ef65a-41fc-401e-a905-d307ae9ee2cf
aryan2574/CPP-repo
CPP Programs/Recursion/ladderProblem.cpp
#include <bits/stdc++.h> using namespace std; #define mod 1000000007 #define mod1 998244353 #define INF 1e18 #define PI 3.141592653589793238462 #define nline "\n" #define sz(x) ((int)(x).size()) #define set_bits __builtin_popcount #define set_bitsll __builtin_popcountll #define setp(x, y) fixed << setprecision(y) << ...
ALGO
0.999979
4.626025
{ "github_metadata": { "branch": "main", "commit_count": 133, "repo_created_at": "2023-08-02T14:59: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": "bf5167bb4a...
1be702a7-a4be-41c4-ba2b-2336faf9ccc5
ajinjink/RecordingBOJ
백준/Silver/10866. 덱/덱.cc
#include <iostream> #include <deque> using namespace std; int main() { int N, temp; cin >> N; deque<int> d; string command; for (int i = 0; i < N; i++) { cin >> command; if (command == "push_front") { cin >> temp; d.push_front(temp); } if (c...
ALGO
0.999725
4.778246
{ "github_metadata": { "branch": "main", "commit_count": 1303, "repo_created_at": "2023-04-28T11:11: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": "f0b61b004...
4153d401-54af-43a0-a877-77b07edc5c94
jasondu7297/coderepair.ai
tests/code_force_tests/code0_265.cc
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; while (t--) { int n, m, k; cin >> n >> m >> k; int l; if (n >= 3) { l = n + n * (n - 3) / 2; } else { if (n == 1) { l = 0; } else {...
ALGO
0.999839
3.978473
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2024-02-17T09:56:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3bcc51d73b3...
ef4667bd-ea79-4780-bdce-1f2b083f29fe
sdyoon94/Problem-Solving
백준/10866/10866.cc
#include <bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); deque<int> dq; int N; cin >> N; while(N--){ string tmp; cin >> tmp; if(tmp.compare("push_front")==0){ int x; cin >> x; dq.push_front(x)...
ALGO
0.999076
4.58501
{ "github_metadata": { "branch": "main", "commit_count": 269, "repo_created_at": "2021-09-22T13:29:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cdefa19053...
75647a10-ed20-4492-a24e-e31b137097b2
aoggg/Linear-Algebra-final-project
appendices/fibonacci_bignum_2.cpp
#include <bits/stdc++.h> #include <sys/time.h> #include <chrono> #include <ctime> #include <iostream> using std::cout; using std::endl; using std::chrono::duration_cast; using std::chrono::milliseconds; using std::chrono::seconds; using std::chrono::system_clock; using namespace std; #define prime 1000000007 struct N...
ALGO
0.999721
3.697751
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2024-12-04T10:03: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": "cb9019203de...
c78f5164-d448-45c8-85fd-5d56a08fa78c
powergee/CompetitiveProgramming
2022/로봇 프로젝트.cpp
#include <iostream> #include <map> #include <vector> int main() { std::cin.tie(nullptr)->sync_with_stdio(false); while (true) { int x; std::cin >> x; x *= 10000000; if (std::cin.eof()) { break; } int n; std::cin >> n; std::m...
ALGO
0.999366
3.612995
{ "github_metadata": { "branch": "master", "commit_count": 834, "repo_created_at": "2020-05-24T17:14:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c20888a...
bc8b01ea-40ba-4eb4-a045-b9ecc3eac5d4
HuynhNhan0330/Support_Code
Doubly_Linked_List.cpp
#include "bits/stdc++.h" using namespace std; class Node { public: int data; Node* prev; Node* next; Node(int value) { data = value; prev = nullptr; next = nullptr; } }; class DoublyLinkedList { private: Node* head; Node* tail; public: DoublyLinkedList() { ...
ALGO
0.999525
5.099762
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-03-02T14:27: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": "0c562fd7af4...
8aa588c9-475a-4125-869c-a826d7434e74
ffbh123456/code
hdu/hdu/code/1341.cpp
#include <iostream> #include <string> #include <fstream> using namespace std; int data[32]; int getNum(string& s){ int num = 0; for (int i = 0; i < 8; ++i) num = num * 2 + s[i] - '0'; return num; } int main(){ ifstream in("C:\\temp.txt"); string s; int pc ; int accu; while (cin >> s){ data[0] = getNum(s); ...
ALGO
0.999229
3.356631
{ "github_metadata": { "branch": "master", "commit_count": 186, "repo_created_at": "2018-02-04T01:42:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a78c1bc...
57466165-25b3-4986-99f1-1d3eff6b331d
mlpack/mlpack
src/mlpack/core/metrics/iou_metric_impl.hpp
/** * @file core/metrics/iou_metric_impl.hpp * @author <NAME> * * Implementation of Intersection Over Union metric. * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the 3-clause BSD license. You should have received a copy of the * 3-clause BSD license along with mlpac...
ALGO
0.975738
6.780685
{ "github_metadata": { "branch": "master", "commit_count": 30653, "repo_created_at": "2014-12-17T18:16:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5396, "forks": 1663, "issues": 16, "pull_requests": 9 }, "file_meta": { "content_id": "...
6ad4c99e-9eb2-427c-b8d0-3fff9ba426a4
hoppss/project_stack
nav_goal_lh/src/fusion.cpp
#include <iostream> #include "fusion.hpp" using namespace std; using namespace Eigen; Fusion::Fusion(double max_acceleration, double max_turn_rate, double max_yaw_accel, double varGPS, double varSpeed, double varYaw, double varAcc, double xOffset, double yOffset, bool verbose) : _initialized(false), _max_turn_rate...
ALGO
0.989531
5.443696
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-02-27T09:41: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": "3ddf6c7f5c...
be4b158d-8c77-46ea-a88c-9fe3fcbda02f
WChengGitHub/Code1
dataStructure/singlyLinkedListWithHeadNode/main.cpp
#include <iostream> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ struct LinkNode{ int data; LinkNode*link; }; class List{ public: bool insert(int loaction,int data); bool Delete(int loaction); void inputFront(); void inputAfter(); ...
ALGO
0.999234
3.445243
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-05-29T07:57: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": "430421d1ff...
40647ed7-9d76-439e-b2d8-e94413d1846e
Chrinkus/stroustrup-ppp
chapter23/ex01-4_more_mail.cpp
// // Stroustrup - Programming Principles & Practice // // Chapter 23 Exercise 1 - More Mail File Fun // // Get the email file example to run and test it with a larger file of emails. // Try to break the program with extra addresses, several messages with same // address and/or subjects etc. // // Exercise 2 - Input Su...
TOOL
0.955112
4.885299
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2017-04-27T04:55:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 170, "forks": 56, "issues": 3, "pull_requests": 2 }, "file_meta": { "content_id": "7a2e00...
e668f793-724e-47f5-a118-e7b86aea6773
pTapendra/DSA
4SinglyLinkedLists/polyn.cpp
#include<iostream> struct Node { int coeff; int expo; struct Node *link; }; typedef struct Node *node; node create(node start,float coef, int exp) { node p,temp; temp=new Node(); temp->coeff=coef; temp->expo=exp; if(start == NULL||exp>start->expo) { temp...
ALGO
0.998495
4.289817
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-09-11T07:16:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67fc43b3e...
bef3d41f-c35a-4d56-b74b-052dc65e4538
ParadoxHole/Iut-Info
travaux-pratique/tp-r1-01-init-au-dev1/tp7/compterValeurNegative/compterValeurNegative.cpp
/* Programme : compterValeurNegative But : compter le nombre de valeur negative Date de dernière modification : 20/10/2022 Auteur : maxou Remarques : Code conforme aux spécification internes données en cours */ #include <iostream> using namespace std; int main(void) { // VARIABLES const short int NB_CASE...
ALGO
0.999246
4.566235
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2022-10-01T13:34: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": "a2d35608d20...
8dce51ec-9940-476b-857e-e7eaad859cd7
Octanne/HackatonAlterNaN
Viridien/BSM.cxx
/* Monte Carlo Hackathon created by <NAME> and <NAME> @ Viridien 2024 The code compute a Call Option with a Monte Carlo method and compare the result with the analytical equation of Black-Scholes Merton : more details in the documentation Compilation : g++ -O BSM.cxx -o BSM Exemple of run: ./BSM #simulation...
ALGO
0.999429
5.598105
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2025-01-20T08:56: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": "946b03aff99...
9327b5c0-9897-4030-ad7c-8b6d67b148e6
AKQuaternion/AdventOfCode2019
day22.cpp
#include <fstream> #include <gmp.h> #include <gmpxx.h> #include <iomanip> #include <iostream> #include <iterator> #include <memory> #include <sstream> #include <string> #include <utility> #include <vector> using Number = mpz_class; Number numCards = 119'315'717'514'047; long numTimes = 101'741'582'076'661; enum clas...
ALGO
0.999093
4.749244
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2019-12-01T19:53:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f0d6cb11...
ad18e830-b270-4bee-9f3a-958d8b28ba3c
outman119/leetcode
uniquebinarysearchtrees2.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: vector<TreeNode *> generateTrees(int n) { return genTree(1, n); } private: vector<T...
ALGO
0.999964
5.501705
{ "github_metadata": { "branch": "master", "commit_count": 205, "repo_created_at": "2015-01-08T02:03: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": "ca10a40b...
1b4873a5-d0d6-4029-87ac-2e2a3941713c
green-fox-academy/dezur
week-01/day-3/one_two_a_lot/main.cpp
#include <iostream> int main(int argc, char *args[]) { // Write a program that reads a number form the standard input, // If the number is zero or smaller it should print: Not enough // If the number is one it should print: One // If the number is two it should print: Two // If the number is more ...
TOOL
0.909391
3.938037
{ "github_metadata": { "branch": "master", "commit_count": 213, "repo_created_at": "2019-04-02T12:36:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89154ef03...
e771e07c-d780-429f-978e-0282f55d77f8
emilyju0314/gpt_code_plagiarism
dataset/code_content_classifier/allpro_train/0_0_3069.cpp
#include <iostream> #include <vector> #include <cmath> using namespace std; const int MAXN = 100000; const int MAXLOG = 20; vector<int> adj[MAXN]; int tin[MAXN], tout[MAXN], timer = 0; int parent[MAXN][MAXLOG]; int depth[MAXN]; vector<int> euler; vector<int> values; void dfs(int v, int p, int d) { tin[v] = time...
ALGO
0.99991
5.300837
{ "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": "949abf6c672...
93a8b82a-514d-4701-b492-2bcac9b89915
pedrohfsd/tsplib_solver
tsplib_solver/main.cpp
#include "CuttingPlaneCrossing.h" #include "CuttingPlaneSubtour.h" #include "CuttingPlaneFlow.h" #include "Data.h" #include "FileParser.h" #include "MTZ.h" #include <iostream> using namespace std; int main(int argc, const char* argv[]) { #ifndef _DEBUG try { #endif if (argc != 4) { cout << "There are one or...
ALGO
0.913345
5.023346
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2017-10-07T16:42:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5bd2be9e1...
6b8513b4-4fcb-4052-8ecb-7aea79ad98b6
papyrussolution/OpenPapyrus
Src/OSF/xapian/xapian-core/src/ineb2weight.cc
/** @file * @brief Xapian::IneB2Weight class - the IneB2 weighting scheme of the DFR framework. */ /* Copyright (C) 2013,2014 <NAME> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; eithe...
CONFIG
0.925949
6.388135
{ "github_metadata": { "branch": "master", "commit_count": 979, "repo_created_at": "2017-01-05T07:15:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 259, "forks": 67, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "2a6f...
5fa7677c-7561-4b4b-918a-a1df51adb7c8
SgAkErRu/labs-se
1 course/lab_12_string/main.cpp
#include <iostream> #include <fstream> #include <string> #include <windows.h> #include <vector> #include <conio.h> using namespace std; void SetColor(int color) { HANDLE hStdOut = GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleTextAttribute(hStdOut, (WORD)((0 << 4) | color)); } void creation_text (vector<string> &...
TOOL
0.995053
3.058646
{ "github_metadata": { "branch": "master", "commit_count": 427, "repo_created_at": "2021-11-24T21:13: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": "47b5bde2...
9fa6e081-a6fc-436d-9d71-628cea414f25
Divide-et-impera-11/AlgorithmWord
Algorithms/dynamic_programming/longest_increasing_subsequence.cpp
using namespace std; #include <iostream> #include <string> #define SIZ 5 //----------Longest Increasing Subsequence---------- //Bottom-Up void LIS(int num[SIZ]) { unsigned int opt_str[SIZ]; for (int offset = SIZ - 1; offset >= 0; --offset) { opt_str[offset] = 1; for (unsi...
ALGO
0.99979
3.989656
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-12-19T14:21: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": "633afae7f8...
44c91cc5-ef03-4950-bf8f-8dd4b0e38c80
Cai-Guang/TianNiYiKou-2024-Training-Records
Training/WuhanTraining/2024 CCPC Liaoning Provincial Contest/K.cpp
#include <bits/stdc++.h> using namespace std; #define int long long const int M = 500005; void solve() { int n; std::cin >> n; std::vector<std::array<int, 3>> query; std::vector<std::vector<int>> vec(500005); for (int i = 1; i <= n; i++) { int o; std::cin >> o; if (o == 1...
ALGO
0.999893
4.275745
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-10-31T04:36:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cef1abb851d...
48ddb250-5835-41a2-abdf-53596c93ed8a
ericbrandwein/competencias
Codeforces/1194/E.cpp
//#pragma GCC optimize("Ofast") //#pragma GCC optimize("unroll-loops,no-stack-protector") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <bits/stdc++.h> #define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0) #define endl '\n' #define elif else if #define ll long long i...
ALGO
0.999703
4.337059
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-05-28T02:53: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": "5071d545ba...
f4337c06-6468-43f5-84f0-884785d88c63
ishandutta2007/codeforces-s
sunset/normal/772/B.cpp
#include <bits/stdc++.h> #define xx first #define yy second #define mp make_pair #define pb push_back #define fill( x, y ) memset( x, y, sizeof x ) #define copy( x, y ) memcpy( x, y, sizeof x ) using namespace std; typedef long long LL; typedef pair < int, int > pa; const int MAXN = 1005; struct Point { LL x, y; P...
ALGO
0.998809
3.645883
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "c8113b1daa34...
bc53c4ab-a682-49e4-a7a3-4e8db48c2605
htong01/Machine-Centric-Approach-Prog
15_btree_libs/btree.h
/* BTree - Implements a binary search tree of integers */ class BTree { public: // Default constructor BTree(); // Copy constructor, which makes a deep copy of the tree BTree(const BTree &other); // Destructor, which cleans up all memory ~BTree(); // Adds an element to the tree // If the element al...
ALGO
0.985936
5.183018
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-02-19T16:39: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": "de25d67e3f...
ed0ca4fa-86a4-4cd5-931c-a9d8213ff200
Aakanksha13-cloud/dsa
1285-balance-a-binary-search-tree/1285-balance-a-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.999982
6.210493
{ "github_metadata": { "branch": "main", "commit_count": 613, "repo_created_at": "2025-05-30T10:13: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": "9694e027de...
725f7f88-079e-4177-a5d9-b163d2600f22
akwatz/365DaysOfCode
compe/march challenge/minEat.cpp
#include <bits/stdc++.h> using namespace std; int ans(int l , int r , int arr[] , int n , int H){ if( l > r ) return -1; int k = ceil( (double)(l + r)/2 ); if(k == 0) return -1; int comp = 0; for(int i = 0 ; i < n ; i++){ comp += ceil( (double)arr[i] / k ); } ...
ALGO
0.999943
3.757496
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2018-01-16T18:04:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3166a062b...
61c9e34c-899d-4a06-8a68-fbd01aef2179
ishandutta2007/codeforces-l
lucina/normal/1249/F.cpp
#include<bits/stdc++.h> using namespace std; int dp[205][205], n , w[205], k; vector<int> a[205]; ///dp[x][y] maximum weight subset from subtree x ///with nearest node to it has distance at least y void dfs(int nod,int pa){ dp[nod][0] = w[nod]; for(int i :a[nod]){ if(i == pa) continue; dfs(i , ...
ALGO
0.999941
3.709419
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c86731ba0966...
18c73fb9-5211-44e7-aeb8-abf8db1611ba
Hengle/misc_microsoft_gamedev_source_code
misc_microsoft_gamedev_source_code/misc_microsoft_gamedev_source_code/tools/LRPtreeGen/LRPtreeGen/lrptree.h
//============================================================================== // lrptree.h // // Copyright (c) 2001-2007, Ensemble Studios //============================================================================== #pragma once // ******************************************************************* // THIS IS A...
ALGO
0.997575
4.705983
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-09-30T07:02:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "36c89a9606...
e12c1af0-85d8-4126-9c2f-11d0fd1ca3cb
BHuber55/Program05
PQAVL.h
#if !defined (PQAVL_H) #define PQAVL_H #include "AVLTree.h" /* PQAVL Overview: This classes is a priority queue. This will allow duplicates, and will pull the greatest and least values from the tree depending on location. Function is O(logn) for insert and remove function. */ template < class T > class...
ALGO
0.970191
5.997636
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2015-04-26T16:50: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": "652ef9352...
8d6b46b9-6147-406b-9dac-2980b93ef714
CrimsonTheLegoBuilder/MyBaekjoonSolve
Cpp/boj_solve/boj6035_hpi.cpp
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <algorithm> #include <cmath> #include <cstring> #include <vector> #include <deque> typedef long long ll; //typedef long double ld; typedef double ld; const ld INF = 1e17; const ld TOL = 1e-8; const ld PI = acos(-1); const ld limit = 100; const int LEN = 1e3; ...
ALGO
0.999648
3.670525
{ "github_metadata": { "branch": "main", "commit_count": 2586, "repo_created_at": "2023-06-01T12:38:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "139203e8a...
c0757904-9e5b-4092-810b-0218fe9064d5
BRINL/PRICE
PRICER/Option.h
#ifndef Option_H #define Option_H #include <iostream> #include "PayOff.h" #include <ctime> #include <cmath> #include <QVector> /* CLASSE MERE : Option Les différentes méthodes de cette classe sont les différentes méthodes d'arrêt du Option */ class Option { public : Option(); virtual QVector <double> ope...
ALGO
0.967069
4.425337
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2014-02-11T14:32:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb8063c70...
a6394c20-3511-45a3-b48e-4da7f2b172a7
Eveneko/LeetCode
2.两数相加.cpp
/* * @lc app=leetcode.cn id=2 lang=cpp * * [2] 两数相加 * * https://leetcode-cn.com/problems/add-two-numbers/description/ * * algorithms * Medium (34.42%) * Likes: 2541 * Dislikes: 0 * Total Accepted: 143.4K * Total Submissions: 415.9K * Testcase Example: '[2,4,3]\n[5,6,4]' * * 给出两个 非空 * 的链表用来表示两个非负的...
ALGO
0.999978
6.216772
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-09-30T09:14: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": "ef6dce34c...
1df51aa9-1abb-4155-8ba4-a2406df15795
quxiaofeng/ACM-ICPC
HDU/2369. Broken Keyboard.cpp
/* Problem Description Bruce Force's keyboard is broken, only a few keys are still working. Bruce has figured out he can still type texts by switching the keyboard layout whenever he needs to type a letter which is currently not mapped to any of the m working keys of the keyboard. You are given a text that Bruce wish...
ALGO
0.999964
3.451996
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2017-01-02T03:55:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea50dda25...
08c24dc1-ae32-4999-8069-d1c5d2f2e046
naimulhaider/acm
contest/NSU_PRACTICE/Geometry_Marathon_3/A.cpp
#include<bits/stdc++.h> using namespace std; typedef pair<int,int> pii; #define MAX 100005 pii v[MAX]; int memo[MAX], n; bool cmp ( pii a, pii b ) { return a.first < b.first; if( a.first == b.first ) { return a.second < b.second; } return 0; } int rec ( int ind ) { if( ind >= n ) return ...
ALGO
0.999688
3.836186
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2014-04-05T07:44:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e5900a42...
e6172488-ef94-4853-815b-aa749a1b2f97
kumarnitinsingh/CP
Trie/SearchSuggestionSystem.cpp
// Created by <NAME> // problem link -> https://leetcode.com/problems/search-suggestions-system/description/ #include <bits/stdc++.h> //#include<ext/pb_ds/assoc_container.hpp> //#include<ext/pb_ds/tree_policy.hpp> //#include<ext/pb_ds/trie_policy.hpp> using namespace std; //using namespace __gnu_pbds; //typedef tre...
ALGO
0.999868
6.072809
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2021-08-05T13:38:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee8f7fe54cd...
ebcf0ca6-8ee1-4592-8c36-a92a5e435c05
sadrultoaha/Competitive-Programming
Online Judge Solves/UVA/UVa 558 - Wormholes.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 dbg(args...) {cerr<<"-->";debugger::call(#args,ar...
ALGO
0.999957
4.297701
{ "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": "54117e132523...