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
f4684066-b441-416b-932e-fa44986f553c
adityasin39/LOVE-BABBAR-DSA-PROGRAMS
checkcompletenessofabinarytreeleetcodelec75.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.990104
5.812472
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-01-28T11:54: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": "3aa83a14f0...
ca3006dd-b2b4-4b71-83b9-d652b507274e
Rat49/Bomberman
Source/GameModule/OnliStates.cpp
#include "OnliStates.hpp" #include "CollisionModule/PhysicsModule.hpp" #include "Common/Logs.hpp" #include "EnemyBase.hpp" #include "LevelHandlingModule/LevelHandlingModule.hpp" namespace { const int32_t RAYCAST_OFFSET = 30; const int32_t PARENT_OFFSET = 64; const int32_t TILE_SIZE = 64; con...
TOOL
0.910073
5.611548
{ "github_metadata": { "branch": "develop", "commit_count": 440, "repo_created_at": "2025-01-09T08:50:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "26906fd...
f78c08cd-b927-402d-8923-ba1f6d2545bc
ishandutta2007/codeforces-c
cerberus97/normal/1348/B.cpp
/* cerberus97 - <NAME> */ #include <iostream> #include <iomanip> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <cstdlib> #include <map> #include <set> #include <queue> #include <stack> #include <vector> #include <algorithm> #include <numeric> using namespace std; #define pb push_b...
ALGO
0.998943
3.626742
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a29bd575cf7...
5663208c-2587-4462-8d20-92ae93ab7d42
Kostas-Papakostas/IoT-Blockchain
mbed program/include/Keys.h
#pragma once #include <string> class Keys { private: unsigned long p = 0, q = 0, n = 0, phiN = 0; unsigned long e, d, K; bool isPrime(unsigned long a); unsigned long gcd(unsigned long a, unsigned long b); unsigned long lcm(unsigned long a, unsigned long b); unsigned long modInverse(unsigned long a, unsigned long...
ALGO
0.9667
4.252383
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-01-28T22:12:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b69da7e1f4a0...
0694fdd1-0022-45ae-8652-a61e0d5814b3
ArthurXu17/CSES-Problem-Set
Dynamic Programming/EleveatorRides.cc
#ifdef DEBUG #include "debug.h" #else #define dbg(x...) #endif #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pii; int main() { int n, x; cin >> n >> x; vector<ll> w(n, 0); for (auto & t : w) { cin >> t; } sort(w.begin(), w.end()); vecto...
ALGO
0.999974
4.338579
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2024-12-04T22:07: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": "47270b54f87...
fb1b9017-bc75-4c90-a278-13026fbc0ca6
AllexRetu/WorkVSCode
OldCode/matrix_pred.cpp
#include <iostream> using namespace std; void displ_rows_matrix(int * const matrix, int row, int rows, int cols) { int link_last_row = rows*(cols-1)-1; int last_row[cols]; for (int i = 0; i<cols; i++) last_row[i] = matrix[link_last_row+i]; for (int n = link_last_row; n>row; n-=cols) for (int i = 0; i<...
ALGO
0.999691
5.290351
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2023-05-29T15:55:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f14ff535...
00b5c4e4-1939-4164-b314-472cbbef79e9
Abinash-bit/hackfest-tinycodersIITISM
Adruino uno/TRAIL_2.ino
// Define the pins used for the IR sensors const int IR_SENSOR_1 = 7; const int IR_SENSOR_2 = 8; // Define the variables to store the current and previous states of the IR sensors int irSensor1State = LOW; int irSensor2State = LOW; int previousIrSensor1State = LOW; int previousIrSensor2State = LOW; // Define the vari...
ALGO
0.905478
6.395089
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2023-04-07T17:39:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc0e85e002...
1c77b403-fe8b-498e-8ba4-098d926a8850
fmckenna/OpenSeesBORIS
SRC/reliability/analysis/analysis/FORMAnalysis.cpp
/* ****************************************************************** ** ** OpenSees - Open System for Earthquake Engineering Simulation ** ** Pacific Earthquake Engineering Research Center ** ** ** ** ...
ALGO
0.970973
5.140269
{ "github_metadata": { "branch": "main", "commit_count": 4582, "repo_created_at": "2024-10-19T01:14:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7ffb201b...
b3caa054-7c1f-4e5d-86d4-11aca343ec72
Phimos/binary_search_tree
include/aatree.hpp
#ifndef AA_TREE_HPP #define AA_TREE_HPP #include "binary_search_tree.hpp" template <typename T> class AATreeNode { public: T value; std::weak_ptr<AATreeNode<T>> parent; std::shared_ptr<AATreeNode<T>> children[2]; std::shared_ptr<AATreeNode<T>>& left = children[0]; std::shared_ptr<AATreeNode<T>>...
ALGO
0.984141
7.185578
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-02-23T11: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": "a4b1e206ebf...
1e83adeb-a038-435c-bada-3a40f61af3c3
phitronio/Batch-4-Basic-Data-Structures
Module 6/input_linked_list.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node(int val) { this->val = val; this->next = NULL; } }; void insert_at_tail(Node *&head, int v) { Node *newNode = new Node(v); if (head == NULL) { head = newNode; retu...
ALGO
0.999483
4.641556
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-11-27T09:01:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 58, "forks": 30, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4fa35fbb4f...
640c818e-225c-4500-8cfd-d8e84f4ae96c
Ravi-Maurya/Competitive_Programming
LeetCode/Full_List/688.cpp
class Solution { public: int dx[8] = {2, 2, 1, 1, -1, -1, -2, -2}; int dy[8] = {1, -1, 2, -2, 2, -2, 1, -1}; double knightProbability(int n, int K, int r, int c) { vector<vector<double>> dp(n,vector<double>(n,0)); dp[r][c] = 1.0; while(K--){ vector<vector<double>> dp2(n,v...
ALGO
0.999158
4.881263
{ "github_metadata": { "branch": "master", "commit_count": 243, "repo_created_at": "2020-02-28T10:05:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a92d7786...
54d645cd-f3e2-478b-9940-5223bb511243
SirLex/UP
Sem.05/Pract.05/SallyBodeva/Task01.cpp
// Task01.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> using namespace std; double avgOfArray(int arr[], int size, int& closets) { int sum = 0; for (int i = 0; i < size; i++) { sum += arr[i]; } double avg = sum / (double)size; double minDiff ...
ALGO
0.999087
4.495551
{ "github_metadata": { "branch": "main", "commit_count": 460, "repo_created_at": "2024-10-23T06:49:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 26, "issues": 0, "pull_requests": 25 }, "file_meta": { "content_id": "02c102c...
89119e00-2a71-4e04-ac21-03e4a4a3aa9e
Hossain-kobir/C-Programming
Data Structure/week 2 Data Structure/Module 6/insert_node_at_head.cpp
#include<bits/stdc++.h> using namespace std; class node{ public: int val; node* next; node(int val) { this->val=val; this->next=NULL; } }; void insert_at_tail(node * &head ,int v) { node* newNode=new node(v); if(head == NULL) ...
ALGO
0.998685
4.116272
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2023-04-03T16:57: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": "4f9fabf03b7...
883f98ea-6016-4bd7-bd82-ca769a6c91a1
Sergi-0/first-repository-git
calculator(task19).cpp
#include <iostream> #include <string> #include <math.h> using namespace std; string f2(string g) // ^ { int k, l; string numbers = "1234567890."; while (g.find("^") != -1) { string fix = ""; string number = ""; string degree; degree = g[g.rfind("^") + 1]; l = g.rfind("^") + 1; for (int i = g.rfind("^...
ALGO
0.99993
3.789339
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2023-10-06T22:13: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": "31d02774a83...
fe9485fb-942f-4c43-b6e3-ad321bb63543
Laboputer/ProblemSolving
Baekjoon/Codeplus_Advanced_2/4_Tree2/11438.cpp
#include <stdio.h> #define MAXN 100005 struct Node { int next; int head; }; Node Shared[MAXN<<1]; int Cnt; struct List { int head = -1; int sz = 0; void push(int x) { Shared[Cnt] = { x, head }; head = Cnt++; sz++; } }; int N,M; List tree[MAXN]; int in[MAXN], out[MAXN]; int cnt = 0; int v[MAXN]; int p[MAX...
ALGO
0.999996
4.565788
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2017-08-26T16:16: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": "4b0d0b353...
5d4d1d1e-8ddc-4c4b-99cb-a6d1eaea9ccc
simonfuhrmann/mve
libs/sfm/surf.cc
/* * Copyright (C) 2015, <NAME> * TU Darmstadt - Graphics, Capture and Massively Parallel Computing * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD 3-Clause license. See the LICENSE.txt file for details. */ #include <iostream> #include "util/timer.h" #inclu...
ALGO
0.991594
7.122146
{ "github_metadata": { "branch": "master", "commit_count": 1348, "repo_created_at": "2012-04-27T17:42:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1036, "forks": 418, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "ce...
b94fca9d-c430-4ff0-a58e-0daa097c0fbb
Feynman-young/Cplusplus
cpp/library/qsort.cpp
#include <functional> #include <iostream> #include <string> #include <vector> class LessEqual { public: template <typename T> bool operator()(const T& lhs, const T& rhs) const { return std::less<T>()(lhs, rhs) || std::equal_to<T>()(lhs, rhs); } }; template<typename T> void quick_sort(std::vector<T...
ALGO
0.999804
6.075922
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-12-13T09:19: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": "93008a1caec...
050d495f-053f-42b1-9fea-ff82c6c00df3
vincentpc/leetcode
lettercombination.cpp
class Solution { public: vector<string> dict; void init(){ string str= ""; dict.push_back(str); str = ""; dict.push_back(str); str = "abc"; dict.push_back(str); str = "def"; dict.push_back(str); str = "ghi"; dict.push_back(str)...
ALGO
0.999911
6.017293
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2013-07-28T08:29: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": "498f0a47...
0f57ad76-fae5-4dd6-bf0d-55426ed7bb0e
hotrhoth/GuidetoCP
[2]-Sorting&Searching/ArrayDisvision.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, k; cin >> n >> k; vector <int> values(n); int maxVal = 0; for(int i=0; i<n; i++) { cin >> values[i]; maxVal = max(values[i], maxVal); } long long low = maxVal, hi = 1e18, ret = 1e18; while(low <= hi) { ...
ALGO
0.999994
4.589165
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-07T05:02: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": "dcf7ffb3f066...
0f27a8bc-8fed-4b5f-8688-11c4f654f70b
asim-khan2/CPP
STACK/Stack.cpp
#include<iostream> using namespace std; int stack[10]; int size = 5; int top = -1; void push(int ele) { if(top >= size-1) { cout<<"\n\nSTACK is Overflow\n\n"; return; } else{ top++; stack[top] = ele; } } int pop() { if(top == -1) { cout<...
ALGO
0.995239
3.936027
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-12-01T15:32: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": "26a40d907730...
a3f4cc91-f1d3-40aa-b623-874517377554
rajat641/LeetCode-30-Day-Challenge
June-Challenge/Week-2/insert_delete_getRandom.cpp
class RandomizedSet { public: /** Initialize your data structure here. */ deque< int > q; unordered_map< int , int > m; RandomizedSet() { } /** Inserts a value to the set. Returns true if the set did not already contain the specified element. */ bool insert(int val) { ...
ALGO
0.990009
5.841595
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2020-04-08T21:36:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a9bb66d3...
ecaaa24a-07f5-4a67-9d71-99f9d63b7441
choiseungmi/BOJ_study
test(week1)/4963.cpp
#include <vector> #include <iostream> #include <string> #include <algorithm> #include <cmath> #include <set> using namespace std; int n, m; int g[50][50] = { 0, }; bool visit[50][50] = { 0, }; int v1[8] = { -1,-1,-1,0,0,1,1,1 }, v2[8] = { -1,0,1,-1,1,-1,0,1 }; void dfs(int i, int j) { int i2, j2; for (int a = 0; a<...
ALGO
0.999437
4.249321
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-02-28T12:18: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": "ed83c023dea...
7c5c36b0-bcd9-4646-bacf-802fb27f3c0d
yabhist/DSA_AY
graph/Graph2.cpp
//// /*------------------------This code is written by 'yabhist'------------------------*/ // There is a town divided into a grid of cells with H rows and W columns. The cell at the i-th row from the top and // j-th column from the left is a passable space if S i,j is . and a block if S i,j is #. // Takahashi w...
ALGO
0.999946
3.861322
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2022-10-22T08:50: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": "3903cd5ea...
85cfe02e-5e19-4367-9fea-ebd34d7ca3e2
DQSSSSS/Algorithm-Competition-Code
CF/gym102055/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int INF = 1e9 + 10; const int SZ = 1e6 + 10; LL read(){ LL n = 0; char a = getchar(); bool flag = 0; while(a > '9' || a < '0') { if(a == '-') flag = 1; a = getchar(); } while(a <= '9' && a >= '0') { n = n * 10 + a - '0',a = ...
ALGO
0.999983
3.279562
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-11-02T16:48:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01ceff7539...
7a35392a-ec8c-4bf5-bb0f-3628447e43b6
Hg-studios/BOJ
백준/Gold/18513. 샘터/샘터.cc
#include <iostream> #include <unordered_set> #include <queue> using namespace std; #define ll long long int dx[] = {-1,1}; int n,k; unordered_set<int> s; queue<int> q; ll misfortune=1, ans=0; ll bfs() { while(!q.empty()) { int curSize = q.size(); // 현재 후보군에서 왼쪽 오른쪽 한칸씩 간 곳이 샘터의 위치가 됨 ...
ALGO
0.999958
3.998781
{ "github_metadata": { "branch": "main", "commit_count": 624, "repo_created_at": "2022-02-19T15:25:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc8dda2cd0...
d93b25d3-4e4a-4efe-91f0-8aade3d88aa7
FabriDeCastelli/Distributed-Wavefront
src/main/wavefront.hpp
// // Created by <NAME> on 22/08/24. // #ifndef UTILS_HPP #define UTILS_HPP #include <iomanip> #include <iostream> #include <fstream> #include <cmath> #include <vector> #include "config.hpp" class WavefrontMatrix; double dot_product(size_t m, size_t k, WavefrontMatrix& matrix); /** * A class representing a matrix...
TOOL
0.99582
6.077855
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-08-23T18:12: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": "6e690a1be9a...
8a8b68d4-74af-4e7b-b668-8de19a86be51
wstfdxfh/cpp-primer-codes-pub
Ch16/ch16_01_3.cpp
#include "ch16_01_3.h" #include <functional> #include <iostream> #include <string> #include <vector> using namespace std; template <typename T, typename F = std::less<T>> int compare(const T& v1, const T& v2, F f = F()) { if (f(v1, v2)) return -1; if (f(v2, v1)) return 1; return 0; } template <typename T> void ...
TOOL
0.973805
5.425802
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2025-01-03T01:46: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": "be780e2011b...
28c16b4b-0dcc-4c0b-a38e-71ca1cc8a233
ComputerScienceWUST2017/JBosak
DSaA/Lab3/cycledList.cpp
#include<iostream> #include <string> #include <sstream> using namespace std; // Two-way unordered cycled list without sentinel struct Element{ int content; Element *next; Element *prev; }; struct List2W{ Element *head; }; void init(List2W& l){ l.head = new Element; l.head = NULL; } void duplicateEleme...
TOOL
0.967021
4.270727
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2017-11-27T12:12:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7a5824285...
f1fe6340-26ca-488b-9374-bf7d1dc6d09e
doPggy/PAT
4/hash/PAT_B1043.cpp
#include <cstdio> #include <cstring> #include <string> #include <iostream> using namespace std; //? 也可以尝试他们的 ASCII 用除留余数法 // 1 - 6 作为记录 int hash_table[7] = {0}; char i_2_c[7] = {-1, 'P', 'A', 'T', 'e', 's', 't'}; int c_2_i[128] = {0}; void init() { for(int i = 1; i <= 6; i++) { int c = i_2_c[i]; ...
ALGO
0.999101
3.521088
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2021-05-16T10:23: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": "2881ed76a...
b75066b4-fd13-4937-a243-7e1e77fa6020
trilinos/Trilinos
packages/rol/src/oed/factors/ROL_OED_Factors_Def.hpp
// @HEADER // ***************************************************************************** // Rapid Optimization Library (ROL) Package // // Copyright 2014 NTESS and the ROL contributors. // SPDX-License-Identifier: BSD-3-Clause // *************************************************************************...
ALGO
0.960347
7.164611
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
c01837e9-1a72-4e1c-b51a-8092f18d04d1
manwar/perlweeklychallenge-club
challenge-134/ulrich-rieke/cpp/ch-1.cpp
#include <iostream> #include <string> #include <vector> #include <map> bool isPanDigital( long num ) { std::map<std::string , int> digitCount ; std::string numberstring( std::to_string( num ) ) ; for ( int i = 0 ; i < numberstring.length( ) ; i++ ) digitCount[ numberstring.substr( i , 1 )]++ ; return dig...
ALGO
0.996836
4.02601
{ "github_metadata": { "branch": "master", "commit_count": 44412, "repo_created_at": "2019-03-30T01:15:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 194, "forks": 332, "issues": 5, "pull_requests": 4 }, "file_meta": { "content_id": "5f...
2d16e60d-81e6-422b-be64-1444da3a3a5d
yodhasu/Competitive-Programming-Exercise
Codeforces (A) Dalton the Teacher/Dalton the Teacher.cpp
// Problem from Codeforces.com // Title: <NAME> // Level: A // time limit per test1 second // memory limit per test256 megabytes #include <stdio.h> int check(int *student, int len){ int count = 0, temp; for(int i = 1; i <= len; i++){ if(student[i] == i){ if(i == len){ temp = student...
ALGO
0.999642
3.55682
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-09-14T01:49: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": "ce2762d5158b...
99ebb90c-2d2b-46dd-b393-8519825f6e0a
banarun/my_competitive_codes
spoj/dtrap.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <ctime> #include <vector> #include <deque> #include <set> #include <map> #include <queue> #include <stack> #include <bitset> #include <string> #include <algorithm> #include <complex> #include <climits> ...
ALGO
0.999972
4.197709
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-04-01T19:03: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": "ae2dfe60e7...
7d4b1f1e-64f8-4669-8297-5f66c8c081d0
adityasinghhh/coding
topcoder/536/4.cpp
#include<algorithm> #include<assert.h> #include<bitset> #include<climits> #include<cmath> #include<cstdio> #include<cstdlib> #include<cstring> #include<deque> #include<iostream> #include<map> #include<memory.h> #include<queue> #include<set> #include<sstream> #include<stack> #include<string> #include<utility> #include<v...
ALGO
0.999985
4.006659
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2013-05-26T14:49: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": "d7beacd0c5...
a59f00de-dcbe-4670-9e62-4db0b469ac24
Sookmyung-Algos/2021algos
algos_semina/4th_seminar/seminar_3/2nd_grade/정영주_yeongjujeong1021/11582.cpp
#include <iostream> using namespace std; int num[1048577]; int tmp[1048577]; int n, k; void merge(int l, int r) { int m = (l + r) / 2; int i = l, j = m + 1, k = 0; while (i <= m && j <= r) { if (num[i] <= num[j]) tmp[k++] = num[i++]; else tmp[k++] = num[j++]; } while (i <= m) tmp[k++] = num[i++]; while (j...
ALGO
0.999991
3.877422
{ "github_metadata": { "branch": "master", "commit_count": 5558, "repo_created_at": "2021-02-22T06:32:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 38, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69e6c3e...
76b91ea3-39b9-484c-a668-4fc2b2bbb07c
erikliu123/algorithm_problems
leetcode/DP/72_字符串编辑.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; /* 给你两个单词 word1 和 word2,请你计算出将 word1 转换成 word2 所使用的最少操作数 。 你可以对一个单词进行如下三种操作: 插入一个字符 删除一个字符 替换一个字符 示例 1: 输入:word1 = "horse", word2 = "ros" 输出:3 解释: horse -> rorse (将 'h' 替换为 'r') rorse -> rose (删除 'r') rose -> ros (删除 'e') 示例 2: 输入:word...
ALGO
0.999937
5.27363
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2021-04-13T06:55: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": "81207fa5e...
1bd6e9c8-fbdb-4b56-a63d-c89793b7f2be
DiligentPanda/Scalable-Imitation-Learning-for-LMAPF
lmapf_lib/MAPFCompetition2023/src/LNS/LNSSolver.cpp
#include "LNS/LNSSolver.h" #include "util/Dev.h" #include "util/Timer.h" #include "util/Analyzer.h" #include "LNS/Parallel/GlobalManager.h" #include "LNS/Parallel/DataStructure.h" namespace LNS { LNSSolver::LNSSolver( const std::shared_ptr<HeuristicTable> & HT, SharedEnvironment * env, std::shared_ptr<std...
ALGO
0.999715
5.132279
{ "github_metadata": { "branch": "static_guidance", "commit_count": 31, "repo_created_at": "2025-05-18T19:24:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 29, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id":...
c27ca718-a3bf-40b1-9e19-99af8a0eda97
jwpartyka/Algorithms-and-Data-Structures
Range Queries/Segment Trees/Segment Tree Beats.cpp
// Segment tree beats // Queries: // 1) Tree[i] = min(Tree[i], x) for i in range [l, r] // 2) Read a sum over Tree[i] for i in range [l, r] // Amortized complexity of each query: O(log N) using ll = long long; const int MAXN = 3e5 + 5, inf = 1e9; struct Node { int max1, max2, cnt, lazy; ll sum; Node ope...
ALGO
0.999902
4.860329
{ "github_metadata": { "branch": "master", "commit_count": 125, "repo_created_at": "2017-12-06T23:12:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "6a3b551e...
f4d1192d-c9b6-4deb-8a96-8b57c4728e89
hep-ml/hls4ml_c
src/nnet_utils/nnet_dense_large.h
// // rfnoc-hls-neuralnet: Vivado HLS code for neural-net building blocks // // Copyright (C) 2017 <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, either version 3 of...
DATA
0.959584
4.581958
{ "github_metadata": { "branch": "alveo_deepcalo", "commit_count": 54, "repo_created_at": "2021-12-01T16:15: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": "8...
c69c3f1f-a068-4dd3-bf31-b5cd7065e90d
aaalgo/health_outcome_challenge
patch_2009_helper.cpp
#include <fstream> #include <iostream> #include <unordered_map> #include <boost/algorithm/string.hpp> #include <boost/lexical_cast.hpp> #include <glog/logging.h> using namespace std; void split (string const &line, vector<string> *fs) { boost::split(*fs,line, [](char c){return c == ',';}); } void patch (string c...
TOOL
0.909458
4.594696
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-02-06T22:31:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2ebe21a60fc...
22fa042b-04b8-4b37-8f98-7cb646c7be5a
PhaseRush/LeetCube
src/cpp/code_1.cpp
// 1. Two Sum (Easy) #include <algorithm> #include <vector> using namespace std; class Solution { public: /** Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, ...
ALGO
0.999846
6.124176
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-05-28T21:42: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": "74666a78c1d...
ddc9cac4-70fb-473c-8493-3f616ba19348
gmordecki/gpgpu-knn-cuda
knn_cpu.cpp
void swap(float* distances, float* dataset, int* tags, int index1, int index2, int dimension) { float* tmp = (float *)malloc(dimension * sizeof(float)); for(int i = 0; i < dimension; i++) tmp[i] = dataset[index1 * dimension + i]; for(int i = 0; i < dimension; i++) { dataset[index1 * dimensi...
ALGO
0.999978
4.547393
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-06-26T20:35: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": "0870935308...
4957dfb6-184c-4630-ba00-66336d885ae3
nileshrathi/interviewbit
hashing/2_sum.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; typedef long long int ll; ll mod=1000000007; vector<int> twoSum(const vector<int> &A, int B) { unordered_set<int> us; int index1=-1; int index2=-1; vector<int> res; bool find=false; for(int i=0;i<A.size();i++) { int...
ALGO
0.999834
4.730748
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-05-22T10:43:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e23351db36...
0d48871c-82cf-4da7-998c-7bfc7cacc8eb
Checking-pks/CodingTest
백준/Gold/16946. 벽 부수고 이동하기 4/벽 부수고 이동하기 4.cc
#include <iostream> #include <vector> #include <list> using namespace std; vector<vector<bool>> field; vector<vector<int>> area; vector<int> areaList; vector<pair<int, int>> moveList = { {1, 0}, {0, 1}, {-1, 0}, {0, -1}}; void areaCheck(int xPos, int yPos, int &areaCount) { if (field[xPos][yPos]) return; if (are...
ALGO
0.999978
4.092404
{ "github_metadata": { "branch": "main", "commit_count": 2221, "repo_created_at": "2021-12-27T07:06: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": "ce189221d...
42306fe7-506f-41dd-8663-80cfadf6f7df
Hackuarium/esp32-c3
src/pixels/spiral.cpp
#include "config.h" #ifdef MAX_LED #include <Adafruit_NeoPixel.h> #include "./pixels.h" #include "params.h" unsigned int spiralCounter = 0; int16_t getSpiralNextLedIndex(uint8_t row, uint8_t column, uint8_t direction); // We will store in state if it is the head of the spiral void updateSpiral(Adafruit_NeoPixel& pi...
TOOL
0.982203
4.792693
{ "github_metadata": { "branch": "main", "commit_count": 174, "repo_created_at": "2022-05-29T15:19:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "92f13faed3...
002a7494-1b2a-4e44-9091-44904df8a532
Zimse12345/Code
Codeforces_Contest/CF1801/D.cpp
/************************ *FileName: *Author: Zimse *Data: 2023-01- *Description: ************************/ #include <cstdio> #include <algorithm> #include <cstring> #include <vector> #include <cmath> #include <set> #include <map> #include <queue> #include <stack> #include <iostream> #include <cstdlib> #include <ctime...
ALGO
0.999944
4.172271
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2022-10-08T03:09: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": "3b1e71232fb...
17a39d9f-64e5-49d6-88f7-4ed0d8ed67f5
lxgsbqylbk/Qt_Calendar
NextDay/lunarday.cpp
#include "lunarday.h" #include <ctime> #include <cassert> #include <cstring> #include <iostream> using namespace std; using lunar::Date; //使用比特位记录每年的情况 //0~4 共5bit 春节日份 //5~6 共2bit 春节月份 //7~19 共13bit 13个月的大小月情况(如果无闰月,最后位无效),大月为1,小月为0 //20~23 共4bit 记录闰月的月份,如果没有闰月为0 static const int BEGIN_YEAR = 1901; static const int...
TOOL
0.957908
3.710087
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-05-21T15:17:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8eb094930...
839ccfa3-a862-483b-9c5e-16a3dcf8b821
toh-ri/AtCoder
atcoder.jp/arc114/arc114_a/Main.cpp
#include <bits/stdc++.h> using namespace std; struct Eratosthenes { vector<bool> isprime; Eratosthenes(int N) :isprime(N + 1, true) { isprime[0] = isprime[1] = false; for (int i = 2; i <= N; i++) { if (!isprime[i]) continue; for (int j = i + i; j <= N; j += i) { isprime[j] = false; } } } vecto...
ALGO
0.999992
5.266149
{ "github_metadata": { "branch": "master", "commit_count": 327, "repo_created_at": "2021-11-22T12:55: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": "67b3e885...
09d14646-dc2f-437c-92ee-92f76e5772eb
FabricioChavez/Computer_Graphics_PC2
p2.cpp
#include <iostream> #include <climits> #include <vector> #include <gtest/gtest.h> #define ll long long #define ld long double using namespace std; template <typename T> int sgn(T val) { if (val < static_cast<T>(0)) return -1; if (val > static_cast<T>(0)) return 1; return 0; } template <typename T> class Ve...
ALGO
0.999106
5.569822
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2025-05-09T04:08:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2863e7e1...
0246bbd3-4394-4976-a6e1-3ac464a12af8
vuminhducvmd/CP-notebook
graph/arti_pnt.cpp
//UVA 10199 #include <bits/stdc++.h> using namespace std; #define pb push_back #define st first #define nd second #define lb lower_bound #define ub upper_bound #define bit(x, i) ((x>>i)&1) typedef long long ll; typedef long double ld; typedef complex<ll> pt; const ld EPS = 0.00000001; const int INF = 1e9; const ...
ALGO
0.999928
4.165136
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2021-07-26T08:48: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": "2fa4b97cbfc...
3d7fe903-ff1e-4cd6-9767-7484f629613b
VinInn/ctest
stdloop.cc
#include<vector> #include<algorithm> #include<ctime> #include<cmath> #include "RealTime.h" #include<iostream> #include<boost/bind.hpp> inline double radius(double x, double y) { return std::sqrt(std::pow(x,2)+std::pow(y,2)); } class V { public: V():m_x(1.),m_y(2.){} inline double x() const { return m_x;} in...
ALGO
0.994805
5.596907
{ "github_metadata": { "branch": "master", "commit_count": 1135, "repo_created_at": "2014-07-06T04:56:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d8d2d6...
040dec1a-b47b-4fdb-a3a2-98b7495ecd34
yunzhongxicao/code_practice
Linklist/707.cpp
/* @File :707.cpp @Author:dfc @Date :2022/8/26 11:23 @Desc : 设计链表 */ #include "iostream" #include "vector" using namespace std; class MyLinkedList { public: struct ListNode { int val; ListNode *next; ListNode(int val):val(val), next(nullptr){} }; MyLinkedList() { _dummyH...
ALGO
0.999536
4.88729
{ "github_metadata": { "branch": "main", "commit_count": 309, "repo_created_at": "2022-07-31T05:36: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": "11e8d3c937...
e458166a-dea8-4190-9e6f-24350b140d2c
Bakhtiar2000/XPSC-Problem-Solving
Week3/Day6/B_Long_Long.cpp
// https://codeforces.com/problemset/problem/1843/B #include <bits/stdc++.h> using namespace std; #define ll long long int int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int n; ll sum = 0; cin >> n; vector<ll> v(n); ...
ALGO
0.999854
4.252695
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2024-10-26T17:02: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": "3283deed926...
76f07c8b-f0e5-45cf-9fb0-9bae24da80cc
ajmat6/DSA
L_Merge_Sorted_Arrays.cpp
class Solution { public: void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) { // using space: // vector<int> temp; // int left = 0; // int right = 0; // while(left < m && right < n) { // if(nums1[left] <= nums2[right]) { // temp.push...
ALGO
0.999983
5.656041
{ "github_metadata": { "branch": "master", "commit_count": 229, "repo_created_at": "2023-08-25T16:34:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fdca5151...
8e39518d-cdf4-4943-beb2-3ec40baf31be
Spirit599/algorithm
leetcode/cpp/786_1.cpp
// struct cmp // { // bool operator() (const pair<int, int> p1, const pair<int, int> p2) // { // return p1.first * p2.second > p1.second * p2.first; // } // }; //decltype //lambda //多路归并 class Solution { public: vector<int> kthSmallestPrimeFraction(vector<int>& arr, int k) { int n = ar...
ALGO
0.999946
5.420309
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2022-04-25T08:50:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "abe03c888...
74edcf1a-739b-4291-97c0-a7a015fed729
google-ai-edge/mediapipe
mediapipe/calculators/core/matrix_multiply_calculator.cc
// Copyright 2019 The MediaPipe Authors. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or a...
DATA
0.941689
7.000559
{ "github_metadata": { "branch": "master", "commit_count": 4767, "repo_created_at": "2019-06-13T19:16:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 30689, "forks": 5453, "issues": 443, "pull_requests": 149 }, "file_meta": { "content_id"...
c19bf212-ff12-4c49-a556-36dd160bf7a6
iit-DLSLab/muse
muse_ws/src/iit_commons/src/planning.cpp
#include <iit/commons/planning/planning.h> #include <iit/commons/geometry/algebra.h> using namespace iit::planning; using namespace iit; bool iit::planning::shrinkPolygon(const Eigen::MatrixXd vertices, const double shrinkRatio, Eigen::MatrixXd & shrinked_vertices) { if ((shrinkRatio > 1.0) || (shrinkRatio< 0.0)...
ALGO
0.997827
4.905086
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2024-09-24T09:47:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 69, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "518e9d0f667...
24bbe97d-0186-4fdd-b509-235c0f1c002d
Shubham-kpl/Codeforces-Problems
B/1704.cpp
/** * कर्मण्येवाधिकारस्ते मा फलेषु कदाचन, मा कर्मफलहेतुर्भुर्मा ते संगोऽस्त्वकर्मणि ॥ * * The code below is: * Coded on : 15/09/2023 * Coded by: <NAME> */ #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define f(i, n) for (ll i = 0; i < n; i++) #define vi(v) vector<ll> v #de...
ALGO
0.999958
5.622456
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2023-10-04T14:53: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": "8bbe210eeb9...
df8d4b8f-031a-4c97-a626-1ff0d48d6cb2
alexandraback/datacollection
solutions_5708921029263360_0/C++/Butternut/main.cpp
// Author: <NAME> #include <iostream> #include <fstream> #include <math.h> #include <sstream> #include <stdlib.h> #include <vector> #include <Imagine/LinAlg.h> using namespace std; using namespace Imagine; int main(){ int T; cin >> T; for (int compt=1; compt<T+1; ++compt){ int J, S, P, K; ...
ALGO
0.999233
3.145136
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5f3a6e7c...
ca49809a-a463-49d0-b034-772c27d580c1
nobushi95/Boot_camp_for_Beginners
medium100/098.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using ll = long long; #define REP(i, left, right) for (ll i = left; i < right; i++) #define REPEQ(i, left, right) for (ll i = left; i <= right; i++) #define RREP(i, right, left) for (ll i = right; i >= left; i--) #define FORE(elem, container) for (aut...
ALGO
0.999906
4.868611
{ "github_metadata": { "branch": "main", "commit_count": 298, "repo_created_at": "2022-01-04T13:32:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f428c8ec4...
75a996c0-d89a-4b16-9482-566ec43942f6
LAPKT-dev/LAPKT-public
src/model/fwd_search_prob.hxx
/* Lightweight Automated Planning Toolkit Copyright 2022 <NAME> <<EMAIL>><NAME> <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ri...
ALGO
0.998256
6.588213
{ "github_metadata": { "branch": "Devel2.0", "commit_count": 988, "repo_created_at": "2014-09-25T05:10:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 40, "forks": 24, "issues": 17, "pull_requests": 4 }, "file_meta": { "content_id": "d838...
3efc31e2-5a18-4244-9e8f-58abe6ac3250
Sefayet-Alam/New-CP-submissions_vol_1
B_Balanced_Remainders.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define scl(n) scanf("%lld", &n) #define fr(i,n) for (ll i=0;i<n;i++) #define fr1(i,n) for(ll i=1;i<=n;i++) #define pfl(x) printf("%lld\n",x) #define pb push_back #defi...
ALGO
0.999866
3.604513
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2022-12-23T12:59: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": "d116d12fa...
85eaf941-79c8-4693-8d71-d9b7e6cd1f1c
DavidMorano/rightcore
libdam/msort.cc
/* msort */ /* lang=C++11 */ #define CF_DEBUGS 0 /* compile-time debugging */ /* revision history: = 2000-05-14, <NAME>­D­ Morano Originally written for Rightcore Network Services. */ /* Copyright © 2000 <NAME>­D<NAME>. All rights reserved. */ /***************************************************************...
ALGO
0.999972
6.057404
{ "github_metadata": { "branch": "master", "commit_count": 545, "repo_created_at": "2017-05-10T19:44:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7376b1b3...
823daf29-7fa5-45c1-a393-09de829170aa
Phoenix-RK/Leetcode
31. Next Permutation.cpp
//Phoenix_RK //https://leetcode.com/problems/next-permutation/ /* Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order). The replacem...
ALGO
0.999946
5.390872
{ "github_metadata": { "branch": "master", "commit_count": 148, "repo_created_at": "2020-04-30T18:00:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "caef47b1...
6b6bbc82-b517-407f-b02c-8981eae70202
JohnToro-CZAF/CP
CodeForce/Contest/EducationalRound111_div2/D.cpp
#include <algorithm> #include <array> #include <bitset> #include <cassert> #include <chrono> #include <cmath> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <vector> using namespace std; typede...
ALGO
0.999948
4.940477
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-03-25T06:49:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34d970b40ef...
a6931710-3d46-42ba-83c3-e602546ce78a
nikolaszimmermann/WebKitIgalia
Source/WTF/wtf/Int128.h
// Taken from LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See Source/WTF/LICENSE-LLVM.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // Portable 128-bit unsigned integer arithmetic for use in impoverished // C++ implementations lacking __uint128_t. // ...
TOOL
0.919291
7.444729
{ "github_metadata": { "branch": "main", "commit_count": 243183, "repo_created_at": "2021-10-25T11:37:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "965e517...
221d6c66-3482-4ace-bf92-1536d5d7e29e
vfolunin/archives-solutions
UVa Online Judge/10973.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> using namespace std; void solve() { int vertexCount, edgeCount; cin >> vertexCount >> edgeCount; vector<set<int>> graph(vertexCount); set<pair<int, int>> edges; for (int i = 0; i < edgeCount...
ALGO
0.999418
4.515792
{ "github_metadata": { "branch": "master", "commit_count": 2367, "repo_created_at": "2017-11-27T10:19:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 5 }, "file_meta": { "content_id": "01e6d99...
f5cf1cfc-a9f9-4165-b53d-ba5c5206f6e7
ChungKooKang/BinaryTreePractice
quadtree.cpp
#include <cmath> #include "quadtree.h" QuadTree::QuadTree() : topLeft{ Point()}, bottomRight{ Point()}, node { nullptr }, nw{ nullptr }, ne{ nullptr }, sw{ nullptr }, se{ nullptr } { } QuadTree::QuadTree(Point topLeft, Point bottomRight) : QuadTree() { this->topLeft = topLeft; this->bottomRight = bottomRig...
ALGO
0.995437
5.19179
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2022-06-23T08:01: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": "5e273e3d5...
8b7ceb51-f279-4f8a-b30d-194f71c66417
kmr-rohit/CpCodeBase
codeforces/165/A.cpp
#include<bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double lld; const ll mod=1e9+7; #define endl "\n" #define ff first #define ss second #define pb push_back #define lb lower_bound #define ub upper_bound #define print(a) for(auto i:a)cout<<i<<" ";cout<<endl; #define fast ios_base::syn...
ALGO
0.999952
4.103368
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2024-02-12T09:52: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": "a164aaf84...
6a041318-fd3a-4ca3-82f3-42d17eea41ba
micmacIGN/micmac
src/photogram/phgr_intrinseque.cpp
/*Header-MicMac-eLiSe-25/06/2007 MicMac : Multi Image Correspondances par Methodes Automatiques de Correlation eLiSe : ELements of an Image Software Environnement www.micmac.ign.fr Copyright : Institut Geographique National Author : <NAME> Contributors : <NAME>, <NAME>. [1] <NAME>, <NAM...
TOOL
0.977062
4.987004
{ "github_metadata": { "branch": "master", "commit_count": 10879, "repo_created_at": "2016-11-24T22:09:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 785, "forks": 163, "issues": 83, "pull_requests": 30 }, "file_meta": { "content_id": "0...
f723c6c5-ddcd-4c0e-a5d2-6b97553706d2
codechef-learn-competitive-programming/plus-course-content
Pulkit_Chhabra/Data_Structures_II_April_2021/L4_Doubts/kol15c.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define ff first #define ss second #define int long long #define pb push_back #define mp make_pair #define mt make_tuple #define...
ALGO
0.999968
3.505134
{ "github_metadata": { "branch": "main", "commit_count": 348, "repo_created_at": "2020-12-28T10:28:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 91, "forks": 52, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "40f2d3d82...
8c6461e6-1c47-44a4-8f7a-539b19391042
kwoncycle/poro-baek
8000/8109/solve.c++
#include <bits/stdc++.h> using namespace std; #define ll long long #define pii pair<int,int> #define pll pair<ll,ll> #define X first #define Y second #define CNT_LOWER(v,n) (int)(lower_bound((v).begin(),(v).end(),(n))-(v).begin()) #define CNT_UPPER(v,n) (int)(upper_bound((v).begin(),(v).end(),(n))-(v).begin()) // C...
ALGO
0.999994
4.537206
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2025-01-30T14:41:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3012acca882...
d2425173-23e9-4b6c-abee-839b402f5239
ShashiChoudhry/week2-DP4-CipherSchools
RightView.cpp
#include<bits/stdc++.h> using namespace std; class TreeNode { public: int data; TreeNode* left; TreeNode* right; TreeNode(int data) { this -> data = data; this -> left = NULL; this -> right = NULL; } }; void printArr(vector<int>& arr) { for(int i = 0; i < arr.size...
ALGO
0.999941
4.794406
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-01-29T18:09: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": "48d70ec6a0b7...
28643ef0-ae62-4b3f-8fc3-765c84b78677
RubenPin90/Cpp
module09/ex02/fordJohnsonSort_deque.cpp
#include "fordJohnsonSort.hpp" typedef std::deque<unsigned int>::iterator deqIt; void prnt_cont(const std::string& description, const int& lvl, std::deque<unsigned int>& cont, const bool test_mode, const std::size_t& c_size) { if (test_mode) { std::ostringstream ost; ost << "\n" << description << " lvl " << lvl ...
ALGO
0.99988
5.559357
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2023-12-27T22:13: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": "bf93cbb49...
032b55ec-b56d-49d6-9307-9ca785643d62
wyrover/book-code
crack-tutorial/C++反汇编与逆向分析技术揭秘/第一章/1.3 反汇编引擎的工作原理/Disasm_Push/Disasm.cpp
#include "stdafx.h" /* 8888888b. 888 888 d8b 888 Y88b 888 888 Y8P 888 888 888 888 888 d88P 888d888 .d88b. Y88b d88P 888 .d88b. 888 888 888 8888...
TOOL
0.936578
3.362925
{ "github_metadata": { "branch": "master", "commit_count": 192, "repo_created_at": "2016-07-24T07:29:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 388, "forks": 248, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72fc...
578f784d-77b5-4fd2-ac5c-7587ef6e7c2e
HandIeNeeded/ACM
SPOJ/KPGRAPHS.cc
#include <bits/stdc++.h> #define LL long long #define REP(i, a) REPP(i, 0, (a) - 1) #define REPP(i, a, b) for (int i = int(a); i <= int(b); i++) using namespace std; const int N = 1005; const int MO = 1e9 + 7; int f[N], g[N], h[N], a[N], b[N], c[N]; int fac[N], inv[N]; int C(int x, int y) { if (x < 0 || y < 0 |...
ALGO
0.999688
4.152877
{ "github_metadata": { "branch": "master", "commit_count": 382, "repo_created_at": "2014-11-12T09:21:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3533115f...
34981e7e-f83d-4256-8565-f74d6a8dc19c
gatjaipur/Problem_Solving
Data Structures Weekly Practice/Week1/FreqLessThanDigit.cpp
// METHOD 1 Using simple iteration //Implementation is done for frequency strictly less than the value of digit except for 0 //......as 0 if not present will return false always, and 0 can not be less than 0, therefore we make it exception // 1 should occur for atmost 0 times /* #include<iostream> using namespace std...
ALGO
0.999865
4.442737
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-05-20T15:49:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "b8a5ff829...
37e7a7b3-1d46-40b5-82a1-4d33f218d856
eglrp/mapmatrix3d-2.0
CV_Line/cvLine.cpp
#include "cvLine.h" DLL_API void CVLine(std::vector<osg::Vec3d>& data,float& nx,float& ny,float& x,float& y) { std::vector<Point2f> points; for (size_t i = 0;i < data.size();++i) { points.push_back(Point2f(data[i].x(), data[i].y())); } Vec4f line; fitLine(Mat(points), line, CV_DIST_L2, 0, 0.01, 0.01); nx =...
ALGO
0.977031
4.335686
{ "github_metadata": { "branch": "master", "commit_count": 193, "repo_created_at": "2018-10-13T07:12:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 14, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "71a5495...
f7a0216d-61fd-415f-a06f-ca3c0df256ad
Mugdha-Hazra/180-Questions-Striver-SDE-sheet-in-CPP
Partition the Array - GFG/partition-the-array.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: pair<long long ,long long > cal(vector<long long >&ps , int l ,int r ) { long long ls ,rs ,mas, mis=0 ; ...
ALGO
0.999878
5.846591
{ "github_metadata": { "branch": "main", "commit_count": 1760, "repo_created_at": "2020-11-19T06:26:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 243, "forks": 77, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90996a...
4fc3ffbe-0629-4b1d-a401-4b1c47b9d7c6
muwasifk/competitive-programming
DMOJ/anoisyclass.cpp
#include <iostream> #include <queue> #include <vector> #include <climits> #include <cstring> using namespace std; #define f first #define s second #define MAXX 10001 int graph[MAXX][MAXX]; int visited[MAXX]; bool failed = false; int n; void topological(int current){ visited[current] = 1; // first visited state...
ALGO
0.999993
4.22777
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2023-01-10T05:13: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": "9e15b4d2219...
ceb16c9d-f7d7-4816-a28e-407fce837652
201851019-iiitv/CPP-WorkSpace-
Codeforces/A2OJLADDER/llya_Bank_ac.cpp
// Created by <NAME> #include "bits/stdc++.h" //I already compile this file in my computer system to save the time //if get the compiler error then you should change this header to // #include "bits/stdc++.h" ---> #include <bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define fo(i,n) for(i=0;i<n;...
ALGO
0.999862
3.478277
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-03-12T05:18:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db96a72f4...
ac589e2c-cbee-47b5-bb5c-1bd57f025d97
mdco-ld/cpp-template
include/mo/bit-convolution.hpp
#ifndef _MO_BIT_CONVOLUTION_HPP_ #define _MO_BIT_CONVOLUTION_HPP_ #include <mo/zeta.hpp> #include <vector> #include <span> namespace mo { template <typename T> std::vector<T> convolutionAnd(std::vector<T> a, std::vector<T> b) { assert(a.size() == b.size()); supersetFastZeta(a); supersetFastZeta(b); s...
ALGO
0.999124
6.853683
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2024-04-17T17:10: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": "a77f6f52802...
9b62c427-624e-4831-a143-5aaaa3d1d55f
That-Guy977/ocomp
C2/C2P78_.cpp
#include <iostream> #include <vector> #include <map> using namespace std; struct edge { int t; int x; int y; }; int main() { int c; cin >> c; for (int ci = 0; ci < c; ci++) { int n, m; cin >> n >> m; vector<edge> graph; for (int i = 0; i < m; i++) { int x, y, t; cin >> x >> y ...
ALGO
0.999961
4.900889
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2024-05-07T09:41:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff744c3efbd...
de5facdc-1dd3-4247-9c66-ed465ef583aa
suraj-iitb/algorithm-identification
BERT/Data_Dump/Selection/C++/Code/selection4409712.cpp
/** * Selection Sort * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ALDS1_2_B&lang=ja */ #include<bits/stdc++.h> using namespace std; void trace(vector <int>A) { // 現在の並び替え状態を出力する int size = A.size(); for (int i = 0; i < size; i++) { cout << A.at(i); if (i < size - 1) { cout << ' ';...
ALGO
0.999886
4.493103
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2020-05-24T06:21:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 10 }, "file_meta": { "content_id": "c930bd806...
fdc265b6-3805-4d08-bf91-328be2b0ace1
Polikir/Laboratory-works-OOP-3-semestr
sem_3_laba2/MMA.h
#include<iostream> using namespace std; int index1; #include "Board.h" #include "Tree.h" int minimax(bool flag,Tree<Board>* tree) { Tree<Board>* child_tree = new Tree<Board>(); Board board; board = tree->getValue(); int max_val= -1000,min_val=1000; int i,j,value = 1; if(board.cpu_won() == 1) ...
ALGO
0.999561
3.566931
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2022-10-05T12:16: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": "52407730c9...
d3d6c8f6-a41c-4950-b55d-23d0a0b14220
Suresh-vivek/AlgoZenith_DSA
LinkedList/7_InsertDLL.cpp
/* Given a doubly-linked list, a position p, and an integer x. The task is to add a new node with value x at the position just after pth node in the doubly linked list. Example 1: Input: LinkedList: 2<->4<->5 p = 2, x = 6 Output: 2 4 5 6 Explanation: p = 2, and x = 6. So, 6 is inserted after p, i.e, at position 3 (0...
ALGO
0.999842
5.939053
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-07-05T09:40: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": "2c31d9a81b12...
19184ac7-8914-4c13-a596-c67f3709f9ff
adam-lzk/cpp_labs_sem2
computational_practice/finalProjectV2.cpp
#include <iostream> #include <iomanip> #include <ctime> using namespace std; int** CreateMatrix(int rows, int columns) { int** mattrix = new int* [rows]; for (int i = 0; i < rows; i++) { mattrix[i] = new int [columns]; } return mattrix; } void FillMatrix(int** matrix, int rows, int co...
ALGO
0.98316
3.892792
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-08-29T08:46: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": "d82825c23aa1...
a4b0cd49-b2ab-434f-ab96-b80888aa73f5
ermig1979/Simd
src/Simd/SimdGemm.h
/* * Simd Library (http://ermig1979.github.io/Simd). * * Copyright (c) 2011-2024 <NAME>. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation th...
ALGO
0.99719
6.518565
{ "github_metadata": { "branch": "master", "commit_count": 4063, "repo_created_at": "2015-03-25T15:24:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2179, "forks": 437, "issues": 30, "pull_requests": 1 }, "file_meta": { "content_id": "6...
783c5314-2f83-4075-a75b-ea5f84596b57
ateeshkumar/data_struture
inorderTree.cpp
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debu...
ALGO
0.999906
4.52884
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-01-15T06:15:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16c3584cfbaa...
9d1ee4e2-6bed-4d4e-a212-f92832860af1
Saif-000001/XPSC
Week4/Day10/Make_It_Increasing.cpp
#include <bits/stdc++.h> using namespace std; #define Faster \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #define ll long long int t; void doWork() { int n; cin >> n; vector<int> a(n); vector<int> temp(n); for (int i = 0; ...
ALGO
0.999373
4.007232
{ "github_metadata": { "branch": "master", "commit_count": 508, "repo_created_at": "2023-05-30T05:48:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e63b7fe...
7b452c57-f2d1-47fe-8d81-20bf394ea90c
lozephons/Algorithm-Solving
Algorithm-Sources/UVA/Volume2/UVA 274 - Cat and Mouse.cpp
// 알고리즘 1 - Part3 BFS // BFS // Accepted(2) #include<stdio.h> #include<string.h> #include<queue> using namespace std; int main() { // freopen("input.in", "r", stdin); int caseNum; bool first = false; scanf("%d", &caseNum); while(caseNum--) { if(first) printf("\n"); ...
ALGO
0.999655
3.392977
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2014-12-01T14:31: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": "f2e1461d5...
2eac0090-e2bb-4435-b589-25eab2ad10ee
truongcongthanh2000/TrainACM-ICPC-OLP
2023 ICPC Vietnam Southern Provincial Contest/D.cpp
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; #define INP "input" #define OUT "output" /* some template */ template <typename T> std::ostream& operator<<(std::ostream& out, const std::vector<T>& a) { out << (int)a.size() << '\n'; for (const auto& v : a) out << v << ' '; out << e...
ALGO
0.999847
4.702346
{ "github_metadata": { "branch": "master", "commit_count": 261, "repo_created_at": "2020-01-13T11:13:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 94, "forks": 22, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92f354...
45d452d2-9a87-4bed-b105-8274de36ec41
qinhongwei/YAS
iter.cpp
/*//////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2013, <NAME> // // All rights reserved. // // This file is part of the R4R library. // // The R4R library is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License...
ALGO
0.999616
5.876305
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2015-04-09T02:25: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": "2635a58fb...
e99359dd-ca66-4c77-a87e-e2941aba9279
anasteshap/ITMO-Algorithms-1-course
lab2/2B.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; struct num_of_person { int num; string country; string name; }; void merge(struct num_of_person* arr, int first, int pivot, int last); void mergeSort(struct num_of_person* arr, int first, int last); int main() { int n; ...
ALGO
0.999931
4.237295
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-02-17T17:41: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": "e5e3416909...
fb2f2fd7-cd90-42d8-9a2a-3a36032cbe0c
matko-k/advent_of_code_2020
AOC/Day22/day22.cpp
#include "day22.h" void Day22::calculate() { std::ifstream file("/home/incubed/AdventOfCode/advent_of_code_2020/AOC/sources/day_22_input.txt"); std::vector<int> player1_deck; std::vector<int> player2_deck; int current_deck = 1; for(std::string line; std::getline(file, line);) { if(line[0] == 'P') conti...
ALGO
0.999689
4.82033
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2020-12-06T20:31: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": "5554b85c2...
291c16f3-51df-48c4-96d8-d170d5471316
mainaksethi/DSAlgo
Complex_DataStructure/1146.snapshot-array.cpp
/** * A good data-structure to revise multiple concepts. * * 1. Insert map into vector. * 2. use lower-bound in map. * 3. prev(it) as syntax for previous iterator. */ #include <iostream> #include <string> #include <vector> #include <unordered_set> #include <set> #include <unordered_map> #include <map> #includ...
ALGO
0.989819
5.675296
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-08-01T14:14: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": "84fe6977f9f...
8f00a9ae-b000-44f6-9cdb-8bc80b71b91d
wodud1107/Algorithm
C++17/백준/Silver/14889. 스타트와 링크/스타트와 링크.cc
#include <iostream> #include <cmath> #include <climits> using namespace std; int N, min_res = INT_MAX; int R[21]; int C[21]; bool visited[21]; void dfs(int pos, int depth, int val){ if (depth == N / 2){ min_res = min(min_res, abs(val)); return; } for (int i = pos; i < N; i++){ if ...
ALGO
0.999975
4.673048
{ "github_metadata": { "branch": "main", "commit_count": 218, "repo_created_at": "2025-01-15T06:48:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9415640beb...
dbfea49e-0547-4b4e-91fb-6fa831617192
ggalangswt/PraktProgdas
responsi/1.cpp
#include <iostream> #include <array> #include <cmath> using namespace std; const int JUMLAH_TITIK = 10; typedef array<double, 3> Titik; double hitungJarak(Titik titik1, Titik titik2) { double jumlahSelisihKuadrat = 0; for (int dimensi = 0; dimensi < 3; ++dimensi) jumlahSelisihKuadrat += (titik1[dim...
ALGO
0.999598
5.041432
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-05-05T15:23: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": "d0ebe4c0ecda...
6cbac150-eafa-47ef-a8c1-1d772cce7896
VASST/RobartsVTK
Common/vtkRobartsCommon/vtkHierarchicalMaxFlowSegmentation.h
/*========================================================================= Program: Robarts Visualization Toolkit Module: vtkHierarchicalMaxFlowSegmentation.h Copyright (c) <NAME>, Robarts Research Institute This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of...
ALGO
0.99829
4.614764
{ "github_metadata": { "branch": "master", "commit_count": 793, "repo_created_at": "2016-09-27T17:20:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3fd35d476...
f6f8b976-910c-429c-942c-1fbfc2c99d5e
hakimrazalee/ICT1009-Object-Oriented-Programming
C++/Lab 4/Exercise 1/Exercise 1.cpp
#include <iostream> #include <vector> using namespace std; // Pre-declare function class Product; class Box{ private: double volume; public: void setVolume(double); bool checkSize(Box,Product); }; class Product{ private: double length; double width; double depth; public: void setDimensions...
ALGO
0.988041
4.299908
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-01-15T06:45:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "79114ead6f8...