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
e1c71c64-56a7-48e1-8450-c1bcf22d8dc5
CheapFuck/webserv
src/config/config.cpp
#include "config/rules/ruleTemplates/httpRule.hpp" #include "config/rules/objectParser.hpp" #include "config/parserExceptions.hpp" #include "print.hpp" #include "config/config.hpp" #include <fstream> #include <variant> ErrorContext::ErrorContext(const std::string &efilename, const std::string &eline, size_t elineNumb...
CONFIG
0.906224
6.380094
{ "github_metadata": { "branch": "main", "commit_count": 204, "repo_created_at": "2025-05-14T13:31: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": "41d412bcda...
e693c6ba-f513-432f-836a-d8bda8368312
MirazShahin/Problem-Solving-in-Different-Online-Judge
Atcoder/C - Make it Forest.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; void dfs(int node, vector<vector<int>> &adj, vector<int> &vis) { vis[node] = 1; for(auto child : adj[node]) { if(!vis[child]) { dfs(child, adj, vis); } } } void do_or_die() { int n, m; cin >> n >> m; ve...
ALGO
0.999796
4.765678
{ "github_metadata": { "branch": "main", "commit_count": 343, "repo_created_at": "2022-10-08T05:45:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1cc565477...
b2ba3f99-8955-4f6f-a79b-d561fce7740b
Reveroftrillion/BOJ
BOJ/2630/Main.cpp
#include <iostream> using namespace std; int paper[128][128]; int white = 0, blue = 0; void colored_paper(int x, int y, int size) { int color = paper[x][y]; bool is_same = true; for (int i = x; i < x + size; ++i) { for (int j = y; j < y + size; ++j) { if (paper[i][j] != co...
ALGO
0.999818
4.672207
{ "github_metadata": { "branch": "main", "commit_count": 248, "repo_created_at": "2025-04-26T10:15: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": "22c8e2dfd4...
f3fdf613-352a-4585-a722-d9cc88b3cf03
orlovt/OptionsPricingCPP
src/models/FiniteDifferenceModel.cpp
#include "models/FiniteDifferenceModel.hpp" #include <Eigen/Dense> #include <iostream> #include <cmath> #include <algorithm> using namespace Eigen; using std::max; using std::exp; FiniteDifferenceModel::FiniteDifferenceModel(int timeSteps, int assetSteps) : timeSteps_(timeSteps), assetSteps_(assetSteps) {} doub...
ALGO
0.999802
6.221888
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-03-30T23:23:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1ebb9cb01...
a4faa74e-9342-4960-8a76-1f058f9b369d
njnr14/LLD
Booking system/asd.cpp
#include<bits/stdc++.h> using namespace std; const System Movie; class User { private: static int curUserID; int uid; string userName; int bookingId; vector<int> bookedSeat; public: User(string name){ userName = name; uid = curUserID++; } int getUserId(){ ...
ALGO
0.983155
3.721353
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2025-03-31T06:31: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": "6c12fbd2894...
f6ee92b7-dfac-48e7-915d-2d14dd356cd2
Abhishek-Sharma-1999/LeetCode-Solutions
Longest Increasing Subsequence - GFG/longest-increasing-subsequence.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find length of longest increasing subsequence. int solve_recursion(int n, int a[],int index,int prev_index) { if(index==n) { return 0; ...
ALGO
0.999911
6.04967
{ "github_metadata": { "branch": "main", "commit_count": 2006, "repo_created_at": "2022-08-03T14:12:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18b75fc2d...
2351768f-4ccb-45c2-b36a-645c3ba8f3f8
artaka/OAIP2sem10lab
dop3/dop3.cpp
#include <iostream> #include <vector> using namespace std; void generatePermutations(vector<int>& nums, int start = 0) { if (start == nums.size()) { // Выводим готовую перестановку for (int num : nums) { cout << num << " "; } cout << "\n"; return; } for ...
ALGO
0.999938
5.627895
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-04-13T13: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": "58164ed743...
d5b71573-5d9c-4088-9772-c1ba091c1089
VhahahaV/AlgorithmPactice
code/07_July/07-03/luogu_P1332.cpp
// // Created by VhahahaV on 2024/7/3. // #include <iostream> #include <vector> #include <queue> #include <limits> using namespace std; struct people{ pair<int,int> pos; int infectTime = numeric_limits<int>::max(); }; int main(){ int n , m , a , b; cin >> n >> m >> a >> b; vector<vector<people>>...
ALGO
0.999877
4.648033
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2024-04-02T08:17:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b839d7fb46...
c8c88aa5-5f4a-4c14-8cce-e1b6d5263618
IcedBlackNoSugar/CS-300-Portfolio-
Project 2 Andrei Kourouchin Binary Tree.cpp
//============================================================================ // Name : Project 2 // Author : <NAME> // Version : 1.0 //============================================================================ #include <algorithm> #include <string> #include <iostream> #include <vector> #include <fs...
TOOL
0.966357
3.997404
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-02-20T05:32:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0faa1f0c8342...
20104fef-28c1-422d-8f7d-9d84fa7e5d40
alexpizarroj/competitive-programming
src/google/2016-code-jam/qualification-round/a.cpp
#include <iostream> using namespace std; int f(int x) { if (x == 0) return -1; const int target = 1023; int i = 0, cur = 0, y = 0; do { y += x; i += 1; int z = y; do { int d = (z % 10); cur |= (1 << d); z /= 10; } while (z > 0); } while (cur != target); ...
ALGO
0.995757
4.804905
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2014-09-11T05:20:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b61b67e...
bf5e5dc4-6bfc-42ef-82ea-05da79174ea6
PrinceCuet77/Data-Structure
Stack/Stack representation using linked list.cpp
#include <bits/stdc++.h> using namespace std; struct node { int data; node *next; }; bool isEmpty(node *top) { // Alternative solution : return top ? false : true; if ( top == NULL ) return true; return false; } bool isFull() { node *temp = new node();...
ALGO
0.990983
4.030939
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-04-30T12:08:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cbd4b8af18...
3c31fc97-2dd8-4566-be50-9ddd4557d9a8
akiyomov/Object-Oriented-Programming-202302-IGS2130-001
Lab4/Ex1.cpp
#include <iostream> // Function prototypes void sort3(double&, double&, double&, bool(*)(double&, double&)); void print3(const double&, const double&, const double&); void swap2(double&, double&); // Comparison function prototypes bool ascending(double&, double&); bool descending(double&, double&); int main() { ...
ALGO
0.999992
6.168746
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-08-28T03:32: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": "28eaf988d94...
12fc6c8e-f63d-4bab-ac3a-10d95c69a3e4
emakkaa/firstSteps
C++/Point3D/Point3D.cpp
#include <iostream> #include <cmath> using namespace std; class Point3D{ double x; double y; double z; public: Point3D (double _x = 0 , double _y= 0 , double _z= 0){ setX(_x); setY(_y); setZ(_z); } double getX(){ return x; } double getY(){ return y; } double getZ(){ return z; } ...
ALGO
0.914696
5.239931
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2016-03-08T17:45: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": "fb953be18...
45f10b78-90e0-4cf8-a22e-9b0ba89cd357
audreyclark/ChipsGame
Chips.cpp
/* Game of Chips */ //<NAME> #include <iostream> using namespace std; int init_game(); int ask_move(bool, int); bool is_move_legal(int, int); void declare_winner(bool); int main() { bool player1turn = true; bool game_over = false; int chips_in_pile = init_game(); while (game_over == false) { int...
ALGO
0.99747
4.050816
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-10-09T18:47: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": "06d2209271...
8809468a-4ee4-4462-a71f-5874e33ac594
chauhan-09/Leetcode
2706-buy-two-chocolates/2706-buy-two-chocolates.cpp
class Solution { public: int buyChoco(vector<int>& prices, int money) { /*----------O(n) Solution------------*/ int smallest = prices[0]; int ss = INT_MAX; int n = prices.size(); for(int i=1;i<n;i++) { if(prices[i] <= smallest) { ss = smallest;...
ALGO
0.999839
4.915573
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2023-11-25T11:29:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "214238706db...
cd61ffa0-0ba9-4b56-9524-aa2422aa6c23
ElianMelo/urionlinejudge-cpp
problemas/1018 - Cédulas.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int vlr, aux; float nota_cem, nota_cinq, nota_vint, nota_dez; float nota_cinc, nota_dois, nota_um; scanf("%d", &vlr); aux = vlr; nota_cem = trunc(vlr / 100); vlr -= nota_cem * 100; nota_cinq = trunc(vlr / 50); vlr -= nota_ci...
ALGO
0.98608
3.225744
{ "github_metadata": { "branch": "master", "commit_count": 117, "repo_created_at": "2018-10-30T20:50: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": "567da7b9...
d2ec4759-51ae-447d-85ef-b420b602db9f
ishandutta2007/codeforces-r
ruchiose/normal/303/E.cpp
// Author: Ruchiose #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #include<cmath> #define i64 long long #define d64 long double #define fortodo(i, f, t) for (i = f; i <= t; i++) using namespace std; #include<vector> const int MAXN = 85; int N, L[MAXN], R[MAXN]; vector<i...
ALGO
0.999648
3.6572
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd14f0774ee9...
d64d4e16-825d-4c24-9e41-4f676bb6b254
zcae1020/algorithm_problems
baekjoon/CONTEST/APC/2023/g.cpp
#include <bits/stdc++.h> #define FASTIO ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); #define pii pair<int, int> #define ll long long #define llu unsigned long long #define fs first #define sd second using namespace std; const int mod = 1e9 + 7; int n, k, arr[3003][2]; ll dp[3003][3003], ans; ll fillD...
ALGO
0.999923
4.652388
{ "github_metadata": { "branch": "main", "commit_count": 475, "repo_created_at": "2022-01-12T02:36: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": "a6d48d8e96...
efd12eed-123f-47e3-bda2-bc52acd37a6d
Mrxiangquan/Leetcode
21.合并两个有序链表.cpp
/* * @lc app=leetcode.cn id=21 lang=cpp * * [21] 合并两个有序链表 */ // @lc code=start /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) ...
ALGO
0.999827
6.509622
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2020-10-23T09:03: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": "edfeb3444824...
c4650f51-6e8b-4ca3-8117-2cb16d2b9d5d
orangezeit/leetcode
CPP/0701-0800/0726-Number-of-Atoms.cpp
class Solution { public: string countOfAtoms(string formula) { formula += ')'; stack<map<string, int>> s; s.push({}); string e, cnt, ans; for (const char& c: formula) { if (isdigit(c)) { cnt += c; } else { if (e.empty(...
ALGO
0.999955
5.007124
{ "github_metadata": { "branch": "master", "commit_count": 540, "repo_created_at": "2018-06-12T14:07:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d9a5469...
8b9e5a4e-e456-4ba8-b333-c9d7b6cfffb9
Terence1219/nycu-2022-fall-operating-system
HW1/hw1_2.cpp
#include <stdio.h> #include <unistd.h> #include <iostream> #include <sys/wait.h> using namespace std; int main() { pid_t pid; cout << "Main Process ID : " << getpid() << endl; pid = fork(); //fork 1 if(pid == 0) { cout << "Fork 1. I'm the child " << getpid() << ", my parents is " << ...
ALGO
0.99865
4.676252
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-01-13T15:46: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": "02e501df2288...
e79b924a-8ebe-4db0-bbde-de2f0d65bf3e
rmarcelonis/snake-game
main.cpp
#include <SFML/Graphics.hpp> #include <time.h> using namespace sf; int widthTiles = 30, heightTiles = 30; int size = 16; int w = size * widthTiles; int h = size * heightTiles; int moveDir, snakeSize = 6; struct Snake { int x,y; } s[100]; struct Fruit { int x,y; } f; void Tick() { // snake movement for (in...
TOOL
0.965705
5.514927
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-12-19T04:18:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65bffe340b...
0f1032b3-cf32-4fc0-a875-cadaf61eb43f
sekrit-twc/zimg
src/zimg/depth/x86/dither_avx2.cpp
#ifdef ZIMG_X86 #include <cstdint> #include <immintrin.h> #include "common/align.h" #include "dither_x86.h" #include "common/x86/avx2_util.h" namespace zimg::depth { namespace { // Convert the packed unsigned 16-bit integers in [x] to unsigned 8-bit integers using saturation. static inline FORCE_INLINE __m128i mm2...
ALGO
0.965955
6.846966
{ "github_metadata": { "branch": "master", "commit_count": 1498, "repo_created_at": "2014-09-06T00:53:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 435, "forks": 91, "issues": 14, "pull_requests": 2 }, "file_meta": { "content_id": "ad3...
6123de02-63cf-4b23-8a28-a792a11bc69c
ishandutta2007/codeforces-t
tadijasebez/normal/1099/F.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair const int N=100050; int root,tsz,ls[N],rs[N],y[N]; ll sum[N],sz[N],tme[N],one[N]; int MakeNode(int t, int x) { tsz++; y[tsz]=(rand()<<12)+rand(); sz[tsz]=sum[tsz]=x; one[tsz]=t; tme[tsz]=(ll)t*x; return ts...
ALGO
0.999827
3.800465
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "f1a462f75501...
87f3d765-81c7-4010-b234-da8ee0d1b1db
prateeksharma21/Competitive-Programming
Contest/Codeforces/Codeforces Round #736 (Div. 2)/D.cpp
#ifdef Prateek #include "Prateek.h" #else #include <bits/stdc++.h> using namespace std; #define debug(...) 42 #endif #define int ll #define all(c) begin(c),end(c) using ll = long long; const int MOD = 1e9+7, N = 1e5 + 10; template<typename T> class SparseTable { int n, lg; vector<vector<T>> st; public: ...
ALGO
0.999834
4.225173
{ "github_metadata": { "branch": "main", "commit_count": 102, "repo_created_at": "2019-09-30T19:06:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b78608cc...
b8368058-ce2c-4355-9b24-379bf0369c95
arangodb/arangodb
3rdParty/boost/1.78.0/libs/graph/example/kuratowski_subgraph.cpp
//======================================================================= // Copyright 2007 <NAME> // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) //============================================================...
ALGO
0.920394
6.429085
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
f80fc0d2-50ec-46f4-aa55-a7571ad30e14
xiekeyi98/GSoC2018
ProgrammingTest/segment_tree/test.cpp
#include<bits/stdc++.h> #include"segment_tree.hpp" using namespace std ; using namespace st ; int main() { vector<int> a; for( int i = 0 ; i < 10 ; i++) { a.push_back(i); } segment_tree< int , Plus<int> > *st = new segment_tree< int , Plus<int> > ; st->build( a , 0 , 9 ) ; cout << st->query( 1 , 5 ) << endl ;...
ALGO
0.996627
4.330914
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2018-02-09T12:31:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "58c785ca7...
222c90bd-7ad7-48c2-9030-f0194692326f
Yoyuuhi/cpp-atcoder
_result/_AtCoderBeginnerContest321/E-Complete_Binary_Tree/main.cpp
#include <bits/stdc++.h> #include <atcoder/all> #define out(X) cout << (X) << endl; #ifdef __LOCAL #define DBG(X) cout << #X << " = " << (X) << endl; #else #define DBG(X) #endif #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i, s, n) for (int i = (s); i < (int)(n); i++) #define all(v) v.begin(), v.e...
ALGO
0.999919
4.618335
{ "github_metadata": { "branch": "main", "commit_count": 738, "repo_created_at": "2023-03-30T14:22: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": "4e62a285f5...
bf8b14ad-fdb5-42d9-b54f-a9df82e22b62
kamiltalipov/295-a2
vlmazlov@yandex.ru/Task1/QuickSort/QuickSort.cpp
#include <iostream> #include <cstdlib> #include <algorithm> #include <stack> #include <ctime> #include <cassert> using namespace std; int* middle(int* a, int* b, int *c) { if (*a < *b) { if (*b < *c) return b; else if (*a > *c) return a; else return c; } else { if (*a < *c) return a; else if (*b > *c) ret...
ALGO
0.999881
5.025021
{ "github_metadata": { "branch": "master", "commit_count": 443, "repo_created_at": "2015-10-18T15:28:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b89ebd03...
1c6e5155-8673-466d-bcbf-f6846995c2b4
MakinoRuki/Codeforces
R411/805E.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <unordered_map> #include <queue> #include <cmath> #include <map> #include <set> #define N 300005 #define inf 1000000000 using namespace std; typedef long long ll; const ll mod = 1000000007LL; const ll mod2 = 9982443...
ALGO
0.999955
3.823217
{ "github_metadata": { "branch": "master", "commit_count": 3630, "repo_created_at": "2017-11-19T03:14: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": "257076a...
8a214bd9-e0a6-4a53-8e0a-9d697dc300d2
yeokingyang/Basic-Homework
Data Strucures Lab/interLab01-03-201969990051.cpp
// Lab01-03-201969990051.cpp : This file contains the 'main' function. Program execution begins and ends there. //201969990051- <NAME> #include <iostream> using namespace std; int main() { int height, length; int row, column; std::cin >> length >> height; row = 0; while (row < height) { column = 0; while...
ALGO
0.999539
4.189597
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-09-06T01:59: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": "5eed48b11a...
0ffcdda8-25e9-4397-9193-5173dfc8eb44
niranjanv2k4/LeetCode
0015-3sum/0015-3sum.cpp
class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { sort(nums.begin(), nums.end()); int i = 0, j = 0, k = 0; vector<vector<int>> res; int n = nums.size(); while (i < n) { j = i + 1; k = n - 1; int num_1 = nums[i]; ...
ALGO
0.999979
6.116566
{ "github_metadata": { "branch": "main", "commit_count": 334, "repo_created_at": "2025-02-12T19:31: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": "3b5b1ddfe0...
ca8cfd44-5565-432b-8a51-8be9884a3d91
sonapraneeth-a/competitive-programming_submissions
platforms/binarysearch/practice/medium/990__distinct-coin-sums/solutions.cpp
// clang-format off /** * COPYRIGHT NOTICE * * Copyright (c) 2021. <NAME> <<EMAIL>> * * This file is part of binarysearch practice(submit) in competitive programming. * * This file cannot be copied and/or distributed without the express * permission of the copyright owner. * */ /** * FILE DESCRIPTION * * ...
ALGO
0.999896
5.735123
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2021-09-10T05:38:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "736dc1d58b1...
4be78ede-5143-44c2-a232-a65a05f00a36
codebymahmud24/DSA
Graph/DSU/countPairs.cpp
// ? 2316. Count Unreachable Pairs of Nodes in an Undirected Graph // Time Complexity: O(N+E), Space Complexity: O(N) #include <bits/stdc++.h> using namespace std; class Solution { public: vector<int> parent; vector<int> rank; // Find with path compression int find(int x) { if (x != parent[x]...
ALGO
0.999955
6.45774
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-07-05T04:10: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": "5c3b135ed6dd...
64df26ae-5c0f-42cd-a701-56dd944125db
ajbolous/ParallelComputing
.history/parallel_reduce/parallel_reduce_20180130174506.cpp
#include <stdio.h> #include <stdlib.h> #include <CL/cl.h> #include "../ocl/ocl_loader.hpp" #define VECSIZE 1000000 #define WGSIZE 512 #define NUMWORKGROUPS (VECSIZE / WGSIZE + 1) int main() { OpenClLoader ocl; int vecsize = VECSIZE; float vec[VECSIZE]; float result[NUMWORKGROUPS]; for (int i = 0; i < VECSIZE;...
ALGO
0.984446
4.5409
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-01-29T05:45: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": "017ec416f3...
33953315-f05f-4baf-ac9e-3ceed016fcf6
suraj1611/Competitive_Programming
CP-Codes/cf_1144b.cpp
/* Code by : Suraj (@suraj1611) */ #include<bits/stdc++.h> #include <string> using namespace std; #define ll long long int #define rep(i,n) for(int i=0; i<n; i++) #define rep1(i,n) for(int i=1;i<=n;i++) #define mx INT_MAX #define mn INT_MIN #define md 1000000007 #define pb push_back #define mp make_pair #define pf p...
ALGO
0.999998
3.824344
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2019-02-13T16:34:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "004c36170...
d622c61d-09a2-4b4f-9215-ae777e178941
jyotideepjee1803/CSES-problem-solutions
Searching and Sorting/1619 Restaurant Customer.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define ff first #define ss second #define all(v) v.begin(),v.end() #define revall(v) v.rbegin(), v.rend() #define srt(v,l,r) sort(v.begin()+l, v.begin()+r) #define pb push_back #define vi vector<int> #define pii pair<int,int> const int mod = 1e9+7;...
ALGO
0.999803
4.275707
{ "github_metadata": { "branch": "main", "commit_count": 110, "repo_created_at": "2023-06-21T12:45: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": "0718959b17...
44b04545-9325-4bd6-bf06-e9390634331f
Tjempo/LeastSlack
src/JobShop.cpp
#include "JobShop.hpp" #include <numeric> // For std::iota //*** Constructors & Destructor ***// JobShop::JobShop(const Config &conf) : amountOfMachines(conf.getAmountOfMachines()), amountOfJobs(conf.getAmountOfJobs()), currentTime(0) { this->initialize(conf.getConfigVector()); this->machineInUseUntil.resize...
ALGO
0.99643
5.810308
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2024-02-26T10:38: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": "62246a4f843...
9bddf61f-002d-4f13-ade5-3c5d41bf4229
dataelement/bisheng-rt
src/common/include/triton/common/str_utils.h
#pragma once #include <boost/algorithm/string.hpp> #include <boost/format.hpp> #include <boost/lexical_cast.hpp> #include <boost/xpressive/xpressive.hpp> #include <stdarg.h> #include <algorithm> #include <codecvt> #include <fstream> #include <iostream> #include <iterator> #include <locale> #include <string> namespa...
TOOL
0.958296
6.143217
{ "github_metadata": { "branch": "main", "commit_count": 159, "repo_created_at": "2023-08-04T09:40:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 30, "forks": 14, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "55476bbce...
b42f7f9e-0709-4e8e-9beb-7f7d23f62650
rakesh9541/Leet-code-pratice
majority-element-ii/majority-element-ii.cpp
class Solution { public: vector<int> majorityElement(vector<int>& nums) { int n = nums.size(); int nums1 = -1 , nums2 = -1 , count1 = 0 , count2 = 0; for(int i=0;i<n;i++) { if(nums[i] == nums1) count1++; else if(nums[i] == nums2) ...
ALGO
0.999994
5.384519
{ "github_metadata": { "branch": "main", "commit_count": 533, "repo_created_at": "2022-02-23T08:52:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a0eca8abb...
c252f7b8-2320-49a2-99bc-4d8639ef3116
JamesNolan17/Cpp-Coursera-Course
hw3_4.cpp
#include <iostream> #include <sstream> #include <iomanip> using namespace std; int main() { //Part 1: Data fetch + initialization int exp_number; cin >> exp_number; int heart_red[exp_number]; //0 1 2 3 4 int heart_blue[exp_number]; int heart_req[exp_number][5]; //drag...
ALGO
0.997833
3.908877
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2021-06-29T14:02: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": "5d0c5d1ef21...
b69ba5a0-2c07-4d04-91ec-c51c5fe8ec99
kylepjohnson/sigma
Vampire/VampireKernel/weight_formula.hpp
#ifndef WEIGHT_FORMULA_H //=============================================================== #define WEIGHT_FORMULA_H #ifndef NO_DEBUG_VIS # include <iostream> #endif #include "jargon.hpp" #include "Comparison.hpp" #include "VampireKernelDebugFlags.hpp" #include "prefix.hpp" #include "variables.hpp" //==================...
TOOL
0.995847
4.402646
{ "github_metadata": { "branch": "master", "commit_count": 2833, "repo_created_at": "2015-04-13T18:49:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5cbb880...
306257e9-e65d-49ac-b2a8-44faa1ff932f
Ashutosh-IT/Dynamic-Programming
Ways To Tile A Floor.cpp
/* Given a floor of dimensions 2 x n and tiles of dimensions 2 x 1, the task is to find the number of ways the floor can be tiled. A tile can either be placed horizontally i.e as a 1 x 2 tile or vertically i.e as 2 x 1 tile. return the answer with modulo 109+7. n = 3 Output: 3 Explanation: We need 3 tiles to tile th...
ALGO
0.999985
4.880618
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2024-05-21T18:58: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": "d1bc12d64d8...
de6dbd28-e583-49ae-a451-6c57240aaef1
TopHK/LeetCode-Mine
SpiralMatrix.cpp
/************************************************************************* > File Name: SpiralMatrix.cpp > Author: > Mail: > Created Time: 2015年07月04日 星期六 16时10分36秒 ************************************************************************/ #include<iostream> #include<vector> using namespace std; void spiralOrde...
ALGO
0.999986
5.626826
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-08-19T02:45: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": "8a7c86293a...
12bc0b67-0221-4bdb-8429-7425f2fe5554
RajatDM1/competitive
geeksforgeeks/graph_connectedcomponents.cpp
// C++ Implementation of Kosaraju's algorithm to print all SCCs #include <iostream> #include <list> #include <vector> #include <stack> #include <cstring> using namespace std; vector<int> vec[10]; vector<int> vec1[10]; stack<int> s; bool vis[10] = {0}; void dfsu(int v){ //mark the current node as visited and print it ...
ALGO
0.999927
5.419174
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2017-08-12T12:57:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "f9555b04b...
dbd3579b-e88c-459a-8d75-a88428c66d3b
RubyLrving/atcoder
contest/abc/abc129/d/main.cpp
#include <bits/stdc++.h> #define rep(i,n) for(int i=0; i<(n); ++i) #define repx(i,x,n) for(int i=x; i<(n); ++i) #define fixed_setprecision(n) fixed << setprecision((n)) #define execution_time(ti) printf("Execution Time: %.4lf sec\n", 1.0 * (clock() - ti) / CLOCKS_PER_SEC); #define pai 3.1415926535897932384 #define NU...
ALGO
0.999886
4.135842
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-10-26T11:41: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": "7a09a8a8af20...
fd0fcfcf-9557-43f0-ba9e-158b53f24c12
rithikrajkumar4/Competitive_Programming
100factorial.cpp
// RRRRRRRRRRRRkkkkk #include<bits/stdc++.h> using namespace std; #define pi M_PI #define eb(x) emplace_back(x) #define mem(a,b) memset(a,b,sizeof(a)) #define ll long long #define pb(a) push_back(a) #define mk(a,b) make_pair(a,b) #define all(x) x.begin(),x.end() #define rall(x) x.rbeg...
ALGO
0.999964
4.238862
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-08-27T15:05: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": "ba9d36a4a...
87fe3cf5-4165-4bf7-931d-7cdc98fbdbe9
ksaveljev/UVa-online-judge
10490.cpp
#include <iostream> #include <cmath> using namespace std; bool is_prime(int n) { if (n == 2) return true; if (n % 2 == 0) return false; for (int i = 3, sq = sqrt(n); i <= sq; i++) if (n % i == 0) return false; return true; } int main(void) { int n; while (cin >> n) { if (!n) ...
ALGO
0.999822
4.341209
{ "github_metadata": { "branch": "master", "commit_count": 788, "repo_created_at": "2011-04-04T11:43:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 106, "forks": 69, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "7b00d...
aa1d658a-dbc0-4485-ad87-3f90d0358787
KaisHasan/UVa
UVA_481_What_Goes_Up.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int , int> pi; typedef pair<double , int > dpi; typedef pair<long long , long long> pll; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<pi> vpi; typedef unsigned long long ull; #define sc(a) scanf("%d",&a) #define scl(a) sc...
ALGO
0.999996
3.3521
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-07-07T11:19:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aaf24a2671...
c2bd5e34-6b3d-46e3-abf2-ec7637e8b97c
antonxy/line_lmi_calibration
src/calibration.cpp
#include "calibration.h" #include <stdexcept> #include <map> #include <stdint.h> #include <iostream> #include <opencv2/opencv.hpp> int8_t lineNumAtPoint(Lines lines, cv::Point point) { // rotate coords by orientation float x = point.x * std::cos(lines.orientation) - point.y * std::sin(lines.orientation); // now...
ALGO
0.980027
4.277939
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-03-16T19:57: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": "6dc3fd334b0a...
bc9d1830-92fd-4e1f-9ab8-d963ec5a76e6
aegontargaryen15/cggprivate
S CGG CODES/ESE15R&R.CPP
#include <stdio.h> #include <graphics.h> #include <math.h> #include<conio.h> #define PI 3.14159265 // Function to perform 2D rotation of a point void rotatePoint(int *x, int *y, int cx, int cy, float angle) { float radians = angle * PI / 180.0; int newX = cx + (*x - cx) * cos(radians) - (*y - cy) * sin(radian...
ALGO
0.999173
5.661266
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2024-05-27T02: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": "3c41fc6bc46...
4e705b51-d7ee-4511-9362-a23b2a09003e
IshanGrover2004/Cpp-programs
Tic-Tac-Toe/temp.cpp
#include <iostream> #include <vector> #include <climits> #include <cstdlib> #include <time.h> enum State { ONGOING, DRAW, WIN }; const char EMPTY = ' '; const char PLAYER_SYMBOL = 'X'; const char AI_SYMBOL = 'O'; std::vector<char> board(9, EMPTY); State get_state(const std::vector<char>& board) { //...
ALGO
0.99969
6.743286
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-08-27T15:14:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "df482cec40...
2754b98f-71cb-47d3-b429-0cebe5aee5cb
hyeonjun414/Learn-GameDev
CPP/LearnCPP/2-2.실습(별찍기)/main.cpp
#include <iostream> using namespace std; // 별찍기 int main() { int x, y; // x = 3, y = 5 // 값을 두개 입력받아서 하나는 x축, 하나는 y축 크기의 사각형을 만드시오 cout << "x축과 y축의 크기를 입력하시오 : "; cin >> x >> y; //x = 3; y = 5; //1번 for (int i = 0; i < y; i++) { int j; for (j = 0; j < x; j++) { cout << "*"; } cout << endl; } ...
ALGO
0.999579
3.846266
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2021-12-31T03:07: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": "3e289403a1a...
36ced05c-836c-4cb8-9ec9-bd4a1719fd83
DFHack/dfhack
library/MiscUtils.cpp
/* https://github.com/peterix/dfhack Copyright (c) 2009-2012 <NAME> (<EMAIL>) This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purp...
TOOL
0.967587
4.318553
{ "github_metadata": { "branch": "develop", "commit_count": 19594, "repo_created_at": "2010-02-14T21:09:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1936, "forks": 487, "issues": 941, "pull_requests": 28 }, "file_meta": { "content_id":...
b52c85ed-317c-475b-ad02-e3ca340d43ea
G-Cristian/Metodos_Numericos_2c2017-TP1
Include/MatrizEsparsa.h
#ifndef _MATRIZESPARSA_H_ #define _MATRIZESPARSA_H_ #include "AbstractMatrix.h" #include "vector.h" #include "MapVectorImp.h" #include <map> #include <utility> #include <vector> #include <math.h> #include <stdlib.h> #include <stdio.h> namespace MN { template<class T> class SparceMatrix :public AbstractMatrix<T> {...
ALGO
0.962947
4.663226
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2017-08-20T00:46: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": "369c7e6a0...
ec4ce77a-75bb-4d52-8f98-d88204f5dce4
wustl-pctg/futurerd
src/om/blist.tpp
#include <cassert> namespace om { // N / log_2 N = 2^58 static constexpr label_t NODE_INTERVAL = (((label_t)1) << 58); static constexpr label_t SUBLIST_SIZE = ((label_t)64); // log_2 N = 64 template <class TLT> typename blist<TLT>::node* blist<TLT>::insert(blist<TLT>::node *base) { assert(base); if (base->label ...
TOOL
0.942846
5.537691
{ "github_metadata": { "branch": "master", "commit_count": 394, "repo_created_at": "2019-01-03T22:50:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "528ea655e...
65308ff6-150f-46b7-802f-19d645dbebe0
kushuaiming/leetcode
sort_algorithms/347_top_k_frequent_elements.cc
#include <iostream> #include <unordered_map> #include <vector> std::vector<int> TopKFrequent(std::vector<int>& nums, int k) { std::unordered_map<int, int> counts; int max_count = 0; for (int num : nums) { max_count = std::max(max_count, ++counts[num]); } // 桶排序 std::vector<std::vector<int>> buckets(ma...
ALGO
0.999995
6.022031
{ "github_metadata": { "branch": "master", "commit_count": 362, "repo_created_at": "2023-03-23T15:13:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f214805...
690d905f-839b-4fd6-9d98-a126ebee1173
vastevenson/tilt-pid-controller-arduino
tilt_pid_demo.ino
/* Goal: create a simple PID controller using Arduino to manipulate the tilt to keep a ball around a set-point value. Also provide features to control the speed with which the servo changes angles to not damage parts. Date: Aug 14, 2022 Author: <NAME> */ #include <Servo.h> // library for micro servo #include <NewPing....
ALGO
0.932278
6.67138
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-08-09T05:38:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1f40437130...
77197839-dc30-41ed-b4a7-bb9d0cf0e951
Arhan13/CPP
Maths/Maths1(BigIntegers)/BigIntegers.cpp
//Template #include <bits/stdc++.h> #define rep(i, a, n) for (int i = int(a); i < int(n); i++) #define endl "\n" #define vi vector<int> #define se set<char> #define pb push_back #define um unordered_map typedef long long ll; using namespace std; void multiply(int *a, int &n, int no) { //No is basically the number we n...
ALGO
0.999989
4.451745
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2020-09-30T21:21: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": "192869b5e...
05e62cf5-f2ae-419f-ab00-1607ba6dc140
rakib181/CP-STAFF
String/Pattern Matching Using Double Hashing.cpp
#include<bits/stdc++.h> using namespace std; const int N = 1e6, p1 = 137, p2 = 151, mod1 = 1e9 + 7, mod2 = 1e9 + 9; int power(long long a, long long b, int mod){ long long ans = 1; while(b){ if(b & 1) ans = (ans * a) % mod; a = (a * a) % mod; b >>= 1; } return ans; } int ip1, ip2; pair<i...
ALGO
0.999993
5.039691
{ "github_metadata": { "branch": "main", "commit_count": 1320, "repo_created_at": "2022-05-19T19:29:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51da02db1...
aa40cf54-03af-42a1-99a1-4afc2e6765f8
dreyus95/AVSP_SourceQualityPrediction
CodeJamCrawler/dataset/13_5677_80.cpp
//submitted by rs #include<stdio.h> #define XW ("X won") #define OW ("O won") #define DR ("Draw") #define NC ("Game has not completed") char M[4][4]; int main() { int T;scanf("%d",&T); int t_c=0;char *str; while (T-->0){ if(t_c>0) gets(str); ++t_c; //read the matrix for(int i=0;i<4;++i) scanf("%s",M[...
ALGO
0.999275
3.830738
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-06-08T21:00: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": "273edce5d...
1f0ee2d4-19e7-4f73-ab9a-b2531fac5271
nitingit7/SA-Statistical-Analysis-
Codes/LeastSquareFitting.cpp
#include <cstdio> #include <cmath> #define N 6 int main() { // Input data double X[N] = {1, 2, 3, 4, 5, 6}; double Y[N] = {2.1, 3.9, 5.8, 8.2, 10.1, 12.2}; double sum_x = 0, sum_y = 0, sum_xy = 0, sum_x2 = 0; double m, c; // 1. Calculate sums for linear regression for (int i = 0; i < N; ...
ALGO
0.998832
4.492281
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-04-16T14:08:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "32cfbc38401...
8ae6235a-d8ca-4722-8771-a892c92a77d8
Sifathislam/PhitronAllPrograms
C++/FinalExam/Get_Reverse_II.cpp
#include<bits/stdc++.h> using namespace std; // Create class class Student { public: string nm; int cls; char s; int id; }; int main(){ // Take input of n; int n; cin >> n; Student All_student[n]; int id_of_r[n]; // Take input for (int i = 0; i < n; i++) ...
ALGO
0.998121
3.161371
{ "github_metadata": { "branch": "main", "commit_count": 184, "repo_created_at": "2023-03-31T21:19:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7315a2883b...
5d14063e-4a6a-46fa-8761-8cfe3fdb8a55
Alexouis/karadagkanelouis
src/shared/ai/Attack_Strongest.cpp
/* * File Attack_Strongest.cpp * Directory ai * Created Date Sunday, January 16th 2022, 2:33:09 pm * Author <NAME> * Email <EMAIL> * * Copyright (c) 2022 ENSEA(FR) * __________________________________________________________________________ */ #include "Attack_Str...
ALGO
0.998831
4.003037
{ "github_metadata": { "branch": "master", "commit_count": 600, "repo_created_at": "2021-09-20T12:35: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": "672fec4b...
8885506d-07db-4d64-a7e1-62ff60c57607
wscai/CourseWork
COMP6464_ASS2/cloth_vect_omp.cpp
#include "./cloth_code.h" #include <math.h> #include <stdio.h> #include <stdlib.h> void initMatrix(int n, double UNUSED(mass), double UNUSED(fcon), int UNUSED(delta), double UNUSED(grav), double sep, double rball, double offset, double UNUSED(dt), double **x, double **y,...
ALGO
0.999897
4.109206
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2023-04-19T12:00:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33d950e38...
82b75572-6f9d-44c1-bc58-fe7f814f4eb1
sxs-collaboration/spectre
src/Evolution/Systems/GrMhd/GhValenciaDivClean/TimeDerivativeTerms.hpp
// Distributed under the MIT License. // See LICENSE.txt for details. #pragma once #include <cstddef> #include <limits> #include <utility> #include "DataStructures/DataBox/PrefixHelpers.hpp" #include "DataStructures/DataBox/Prefixes.hpp" #include "DataStructures/DataVector.hpp" #include "DataStructures/TaggedContain...
ALGO
0.96424
6.033383
{ "github_metadata": { "branch": "develop", "commit_count": 17103, "repo_created_at": "2017-04-07T17:28:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 168, "forks": 202, "issues": 530, "pull_requests": 57 }, "file_meta": { "content_id": ...
3e32703d-9c70-4884-830a-614186a2c9eb
seeman1978/c__20
thread/condition_variable.cpp
// // Created by 王强 on 2020/11/15. // #include <mutex> #include <queue> #include <thread> #include <iostream> template<typename T> class Sync_queue{ public: void put(const T& val){ { std::lock_guard<std::mutex> lck(mtx); q.push(val); } //通知动作不需要被安排在lock保护区内,这样组织代码,程序效...
TOOL
0.929429
4.693901
{ "github_metadata": { "branch": "master", "commit_count": 388, "repo_created_at": "2020-02-22T04:44:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "619b4a65...
ac511c03-c337-4ad7-8edd-6df55a088ee5
grimripper/grim_opengl_testing
glut_tut/GlutTut02/Test_GL_ExtrinsincsIntrinsics.h
#pragma once #include <GL\glut.h> #include "ProjectionUsingEigen.h" #include "RotationAroundAxes.h" #include <iostream> #include <sstream> using namespace std; using namespace Eigen; const int NUM_CAMERAS = 4; const int WIDTH_VIEWPORT = 320; const int HEIGHT_VIEWPORT = 240; const int WIDTH_WINDOW = WIDTH_VIEWPORT*...
TOOL
0.938366
5.440686
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2013-10-26T00:45: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": "037e1f874...
cef34348-f215-4e81-950c-5f1ad919d8ca
BychkovArthur/algorithms
algorithms/AVL/src/AVL.cpp
#include <iostream> #include "AVL.hpp" namespace avl { AVL::Node::Node(int64_t value) : value(value) {} AVL::AVL(int64_t value) : root(new Node(value)) {} /* OUTPUT */ void AVL::print_tree(std::ostream& os, const Node* node, size_t depth) const { if (node == nullptr) { // Корень return; } ...
ALGO
0.997953
5.397077
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2024-01-31T16:08: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": "516017b50fb...
e4722686-3527-4e0d-8e5c-f5446d89a57c
JinghengChen97/birl_climbot_location
src/BIRL_UWB/main/main_ranging.cpp
// // Created by ch on 20-4-30. // #define DEBUG #define NLS //#define RANGING_LOCATION #include <ros/ros.h> #include <visualization_msgs/Marker.h> #include <geometry_msgs/Point.h> #include <iostream> #include <utility> #include <vector> #include <chrono> #include "BIRL_UWB.h" #include "uwb_msg/UWB.h" //#include "rosi...
TOOL
0.987078
4.152347
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2020-11-23T11:18: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": "9f152b046417...
b21d0ca7-3056-4341-a6a3-f899a5bb08a8
Micuks/code
kb_ans/topic4/t4ps/t4ps.hpp
#if 0 #define DEBUG #ifdef DEBUG #define DEBUG_CMD(cmd) \ do { \ cmd; ...
ALGO
0.999897
3.725914
{ "github_metadata": { "branch": "master", "commit_count": 541, "repo_created_at": "2020-11-12T05:37:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eee530b1...
8f45c017-2e1f-4dc4-86a7-0de77f6b2f49
chetanshivaji/Rummy
source/main.cpp
#include <stdio.h> #include<iostream> using namespace std; #include"rummy.h" //Priorities //conditions //options //creating possibilities /* //INIT : always prioritize pure sequence 1. Get cards 2. put in different suits 3. sort each group 4. look for life sequence, if no sequence look for sets -> sets needs to...
ALGO
0.998816
3.792807
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-03-26T15:00:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b9843cffd...
79361e71-c4ab-40ec-b521-5ed72eff39ff
ssadman887/CSES
CSES/49_A.cpp
#include <iostream> #include <limits.h> using namespace std; const int inf = 99999; void floydWarshall(int adjacencyMatrix[][100], int numVertices) { int shortestDistances[numVertices][numVertices]; for(int row = 0; row < numVertices; row++) { for(int col = 0; col < numVertices; col++) { shortestDi...
ALGO
0.999985
3.912999
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-08-16T06:06:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "daf3173fc1de...
14c66848-889c-4c1f-adf7-a439012c1eaa
shaunharker/DSGRN
src/DSGRN/_dsgrn/include/Graph/Digraph.h
/// Digraph.h /// <NAME> /// 2015-05-24 #pragma once #include "common.h" struct Digraph_; /// class Digraph /// This class handles storage of edges between /// vertices in the form of adjacency lists. /// NOTE: the adjacency lists will be sorted if the Digraph(adjacencies) or parse /// constructor is us...
ALGO
0.984493
6.597248
{ "github_metadata": { "branch": "master", "commit_count": 836, "repo_created_at": "2015-05-15T21:28:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 17, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "d502d...
51e50802-cbdc-471a-9026-c73f71196468
HarshCasper/NeoAlgo
C-Plus-Plus/cp/all_possible_sums_using_fft.cpp
/* We are given two arrays a[] and b[]. We have to find all possible sums a[i]+b[j], and for each sum count how often it appears. Let the size of array a be n and array b be m. Sample Input: 3 2 1 2 3 4 5 Sample Output: 5 1 6 2 7 2 8 1 Large Data file: https://bit.ly/3l8Zo9q Output file: https://bit.ly/3jqnz2C Const...
ALGO
0.999984
4.534584
{ "github_metadata": { "branch": "master", "commit_count": 7521, "repo_created_at": "2020-06-24T16:04:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 887, "forks": 1041, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8...
21a23b14-a640-4c3b-979d-5ec8d3a3d68f
ashishyadav369/dsa-practice-nados
DSA/DSA Level - 1/Basics of Programming/Dynamic Programming And Greedy/Goldmine.cpp
#include <bits/stdc++.h> using namespace std; void maxGold(int n, int m, vector <vector<int> > &arr, vector<vector<int> > &dp ) { for(int j= m - 1; j >= 0; j--){ for(int i = n - 1; i >= 0; i--){ if(j == m - 1) dp[i][j] = arr[i][j]; else if(i == 0...
ALGO
0.999984
3.712455
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2022-01-25T07:22: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": "5641edbd9...
274d18df-cb9a-4f1f-92d8-be18d0c52980
afaji/tcrand
include/tcrand/object/Tree.hpp
#pragma once #include <algorithm> #include <stdexcept> #include <vector> #include <set> #include <string> #include <cstdio> #include <iostream> #include "Graph.hpp" #define DEBUG false using namespace std; namespace tcrand { class Tree: public Graph{ protected: int _root; vector<in...
ALGO
0.983193
4.211752
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2017-02-25T10:24:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe7bedd53...
a205f295-84e0-4436-9728-6e41d8318898
siddik7181/Work
Graph/Topic/Shortest_Path_in_DAG_with_Weights.cpp
/** * @file Shortest_Path_in_DAG_with_Weights.cpp * @date 2021-10-18 */ #include<bits/stdc++.h> const long long inf = 1e9+10; using namespace std; vector <pair<int,int>> adj[1000]; stack <int> s; int vis[1000]; int node,edge; void dfs(int x){ vis[x] = 1; for(auto u : adj[x]){ if(!vis[u.first]){ ...
ALGO
0.999994
4.607637
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2021-10-27T19:20: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": "b43ae78b1...
18f94bd0-7996-4095-8427-216e1cfa5804
shashwat9kumar/OS-Lab
roundRobinWithoutArrivalTime.cpp
#include<iostream> using namespace std; struct node { struct node *next; int value; int time; }*head; int gc=0; void doit(int *cp, int n, int tq) { int done[n]; for(int i=0;i<n;i++) { done[i]=1; } int all=0; while(all!=n) { all=0; for(int i=0;i<n;i++) { if(cp[i]>=...
ALGO
0.999975
3.757751
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-09-10T09:12: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": "17444dec9...
651a1ee5-e253-4adf-90f4-19b6933e5ea7
rxdu/libxmotion
third_party/spatial/include/spatial/bits/spatial_equal.hpp
// -*- C++ -*- // // Copyright <NAME> 2009 - 2013. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file COPYING or copy at // http://www.boost.org/LICENSE_1_0.txt) /** * \file spatial_equal.hpp * Contains the definition of the equal iterators. These iterators * walk through a...
ALGO
0.999547
7.269091
{ "github_metadata": { "branch": "devel", "commit_count": 1531, "repo_created_at": "2020-09-29T14:56:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 8, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "01698e3...
fb0ec583-8177-436d-859a-c7668d8d8c89
VoTuanNhat/CTDLGT_IT2101_Nhom4
CTDL_GT-VoTuanNhat-2151050306/Code_Chuong3/C3_Bai1.cpp
#include<iostream> #include<stdio.h> using namespace std; //10.1 Khai bao cau truc Stack struct Node { int info; Node* link; }; Node* sp; //10.2 Khoi tao Stack rong void init() { sp = NULL; } //10.3 Kiem tra Stack rong int isEmty() { if (sp == NULL) return 1; return 0; } //10.4 Them phan tu vao Stack int Push(i...
ALGO
0.980457
3.529953
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-08-30T06:35: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": "61bb1957a278...
eaa151b1-5da5-4fc5-b970-cddc1b9ccd6e
ArthurBuenoSilva/Algoritmos-e-Estruturas-de-Dados-I
Teorica/Prova 2/A anao e o gigante.cpp
#include <iostream> #include <iomanip> using namespace std; //Função que verifica qual o maior número float maior(float alturas[], int nPessoas) { float maiorA = alturas[0]; //Armazena a maior altura for(int i = 0; i < nPessoas; i++) { if(alturas[i] > maiorA) { maiorA = alturas[i]; } } return maiorA;...
ALGO
0.990581
3.883767
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-06-11T14:03: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": "f0388c924b...
bfac790c-66d4-47c4-9db6-b12dd188c247
tsirleo/SCTM
1_Sequential/main.cpp
#define _USE_MATH_DEFINES #include "equation.h" #include <iostream> #include <fstream> #include <cstring> #include <cstdlib> #include <cmath> #define INACCURACY "INACCURACY" #define NUMERICAL "NUMERICAL" #define ANALITICAL "ANALITICAL" void dump_grid_to_CSV(const Grid& g, const VDOUB& u, const std::string& filename, ...
ALGO
0.997045
4.565364
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-10-31T19:39: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": "ce4e0a0d6a9...
2451732e-a284-496a-b572-e78a16c08290
ishitarakchhit/Data-Structures-Code-Help
18. Graphs/2. Graph_Representation.cpp
#include<iostream> #include<vector> using namespace std; /* //adjacency matrix int main(){ int n, m; cout<<"Enter nodes and edge sizes: "; cin>>n>>m; vector<vector<int>> adj(n+1, vector<int>(n+1, 0)); for(int i=0; i<m; i++){ int u, v; cin>>u>>v; adj[u][v] = 1; adj[v]...
ALGO
0.999864
4.765019
{ "github_metadata": { "branch": "main", "commit_count": 181, "repo_created_at": "2023-02-11T08:51:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f5318b86c...
0e2cf009-43eb-4979-82fb-e7c23f9bc0b9
Mosina916/CBNOIDAOCT21
Lecture30/deleteinbst.cpp
#include<iostream> #include<queue> #include<climits> using namespace std; class node{ public: int data; node*left; node*right; // constructor node(int d){ data=d; left=NULL; right=NULL; } }; // fast diamter o(n) void printlevelwise(node*root){ queue<node*>q; q.push(root); q.push(nullptr); while(!q...
ALGO
0.999888
4.06385
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2021-11-07T15:32:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0da579906...
5319920f-2fec-440a-a2b9-b7d0e139b036
GehuL/simu-ants
src/NEAT/LayerManager.cpp
#include "LayerManager.h" #include <unordered_map> #include <algorithm> std::vector<std::vector<int>> LayerManager::organize_layers( const std::vector<int> &inputs, const std::vector<int> &outputs, const std::vector<neat::LinkGene> &links) { std::unordered_set<int> known_neurons(inputs.begin(), inputs...
ALGO
0.999232
5.236411
{ "github_metadata": { "branch": "master", "commit_count": 302, "repo_created_at": "2024-09-24T17:50:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "82ce2fc8...
ba350ab7-bf75-4006-9e33-13a31c04b2eb
CSU-FYT-Vision/FYT2024_vision
rm_auto_aim/armor_detector/include/armor_detector/graph_optimizer.hpp
// Created by Labor 2023.8.25 // Maintained by Labor, <NAME> // Copyright (C) FYT Vision Group. All rights reserved. // // 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.a...
ALGO
0.985334
6.606117
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-06-01T01:59:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 132, "forks": 19, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "908f75c6f...
5696da24-1be2-4778-b208-2047e8fb62d4
marshl/SpellstormAutoSolve
SpellstormAutoSolve/main.cpp
#include <ctime> #include <cstdlib> #include <iostream> #include <vector> #include <cassert> #include <ctime> #include <fstream> #include "basecard.h" #include "cardgame.h" char* ZoneTypeToString(ZONE_TYPE _zone) { switch (_zone) { case ZONE_TYPE::BATTLEFIELD: return "battlefield"; case ZONE_TYPE::EXILE: ret...
TOOL
0.91157
3.169707
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2022-01-03T11:26: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": "06dee54f8f...
f4d34d89-ef68-4382-9e29-1a9a209621c2
ArziTech/C-
12. kode gabut/src/Main.cpp
#include <iostream> int func(int n); int main(){ int jml = 0, counter = 5; do{ counter++; if(counter%2 == 0){ jml += counter; } else { jml -= counter; } std::cout << "counter : " << counter << std::endl; std::cout << "jml : " << jml...
ALGO
0.999081
3.960035
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-03-07T22:49:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2af2dfce96c0...
fd9db662-986b-45b0-8cc1-4113df6b1a36
VandanRogheliya/Competitive-Programming-Setup
AtCoderDP/K.cpp
#include<bits/stdc++.h> using namespace std; #define fo(i,n) for(int i = 0; i < n; i++) #define parr(a,n) fo(i,n){cout << a[i] << " ";}cout<<"\n" #define sarr(a,n) fo(i,n)cin >> a[i] #define pb push_back #define setbits(x) __builtin_popcountll(x) #define zrobits(x) __builtin_ctzll(x) #define ps(x,y) fixed<<setprecisio...
ALGO
0.999993
3.783992
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2021-08-01T09:57:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1849af406...
6748d79c-b9ca-4c73-9ee6-71b552bb62ad
Sushilbhatta09/C--Tutorials
class.cpp
#include<iostream> #include<cstring> #define size 10 using namespace std; /* class num { int a[size];// array define as data member public: void input() { int i; for(i=0;i<10;i++) { cout<<"\nEnter "<<i<<" th element: "; cin>>a[i]; } } friend float average (num);// num o...
ALGO
0.993829
3.903548
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2022-06-21T15:42: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": "756a1a21c...
664442cb-f313-4e2f-8e35-b1e664e2b87d
liubsp/univ
geometry/emst/EMST/Draw.h
#pragma once #include <SFML\Graphics.hpp> void DrawEdge(Edge* e, sf::RenderWindow& window, const sf::Color& color) { Edge* sym = e->Sym(); Vert* destination = e->destination(); Vert org = *(e->origin()); Vert dest = *(e->destination()); sf::VertexArray v(sf::Lines, 2); v[0].position = sf::Ve...
TOOL
0.973699
5.038922
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-08-26T17:17: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": "78f615643...
02147224-8f58-4c50-8cdc-157ec236c756
Tej-as1/CSES-Problem-Set
Graphs CSES/Game_Routes.cpp
/* Logic - The number of ways to reach the nodes is the number of ways to reach the node directly + number of ways to reach the adjacent nodes of the node. Use dp. //dp[i] -> ways to get from ith to nth node //dp[n] = 1 */ /*<NAME>*/ #include<bits/stdc++.h> using namespace std; #define int long long #define Y ...
ALGO
0.999864
4.53505
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-03-06T17:15: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": "7dd3f7f112b2...
628f09a6-c6a9-43fe-a6f3-4ff9002df9dd
CodelikeC/LeetCode
ValidParentheses.cpp
#include <iostream> #include <stack> #include <string> using namespace std; class Solution { public: bool isValid(string s) { stack<char> st; for (char c : s) { if (c == '(' || c == '{' || c == '[') { // Push opening brackets onto the stack st.pu...
ALGO
0.997633
6.750069
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2025-04-28T14:28:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f17df5414a...
f4eabcbb-57b7-4063-affb-ed8d38e5112d
johntalton/cs120
program4/prog4.cpp
/* Name: <NAME> Class: CS120 This program calculats the aproximit value of "r" for the equation: n A * R^ - P = 0 The user inputs the valuse of A,N and P. Then the user inputs a high (positive) and low (negative) gess of the value for R. Using the midpoint of R1 and R2 the computer ca...
ALGO
0.999953
4.847884
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-08-15T22:02: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": "95b07f1fca...
ec371a8f-4765-45de-b058-b57e92371e43
Kirinosama/code
bzoj3282/bzoj32821.cpp
#include<cstdio> #include<cstring> #include<algorithm> #define ls c[x][0] #define rs c[x][1] using namespace std; const int maxn=300010; int n,m; struct LCT{ int c[maxn][2],fa[maxn],rev[maxn],sum[maxn],val[maxn]; bool isroot(int x){return (c[fa[x]][0]!=x)&&(c[fa[x]][1]!=x);} int wh...
ALGO
0.999915
4.152273
{ "github_metadata": { "branch": "master", "commit_count": 173, "repo_created_at": "2017-12-22T08:52: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": "a2c4e313...
94107d01-b78b-49eb-a30f-bb793d13def3
bolatov/contests
codeforces.ru/cf192/cf192_e.cpp
#include <iostream> #include <cstdio> #include <set> #include <vector> using namespace std; int getDestination(vector<int> &u, vector< set<int> > &g, int source); int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); #endif int N, M; cin >> N >> M; vector< set<int> > g(N,set<int>()); ...
ALGO
0.999979
4.062273
{ "github_metadata": { "branch": "master", "commit_count": 171, "repo_created_at": "2014-07-17T01:06: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": "e632e019...
37728c4c-9efa-4903-a1e4-baf55b6b8572
rafiulgits/ICPC-OJ
HackerRank/dijkstrashortreach/12772406_AC_2659ms_0kB.cpp
#include<bits/stdc++.h> using namespace std; typedef pair<int,int> Pair; int main() { int Case; cin>>Case; while(Case--) { int vertax; int edges; cin>>vertax>>edges; vector<Pair>adj[vertax+1]; for(int i=0,node1,node2,cost; i<edges; i++) { cin>>node1>>node2>>cost...
ALGO
0.999982
3.660108
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-04-17T08:31:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69511e192e...
ab8f46f3-5ba9-44d5-b646-ce104122bb23
ansh-ptel/HackerRank-Algorithms
insersion_sort_advanced_analysis.cpp
#include <bits/stdc++.h> #include <algorithm> using namespace std; vector<string> split_string(string); long long merge(vector<int> &a, int low, int mid, int high){ vector<int> result; long long count=0; int i=low, j=mid; while(i<mid && j<high){ if(a[i]<=a[j]) result.push_back(a[i...
ALGO
0.99994
5.819301
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2018-10-02T17:27:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 16, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8f7bfb5...
b44bcb68-d556-4493-b1e3-eb5fff4590f4
yurikorh/wasm-snake
snake.hh
#include <iostream> #include <vector> #include <queue> enum State { Ground = 0, Wall = 2, Apple = -2, Head = 3 }; // 0: right 1: left 2: down 3: up typedef enum { GS_NONE = -1, GS_RIGHT, GS_LEFT, GS_DOWN, GS_UP, } GS_DIRECTION; typedef int8_t GS_STEP; struct Vec2c { Vec2...
ALGO
0.997776
4.283696
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2021-12-22T06:11: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": "bb601d8bf28...