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
5eea0f63-a09b-4c80-be99-7c5d806e9056
AnishMahto/Competitive-Programming-Code-and-Solutions
CCO/cco07p6.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cstdio> #include <deque> #include <math.h> using namespace std; vector < vector <int> > graph (1001), tree(1001); int inEcc[1001] = {0}, eccs = 0, esc[1001] = {0}, depth[1001] = {0}; bool v[1001] = {0}; vector < pair <int, int> > bridges; deque <int>...
ALGO
0.99884
4.208492
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-03-13T02:25: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": "daaefeeda5...
2a1cc50b-b1fe-4397-892e-edfa94f6fc65
LeFlamish/CodingTestA
강의/6_C++ 정렬.cpp
#include <iostream> #include <vector> #include <algorithm> // sort, reverse 사용을 위한 라이브러리 using namespace std; // 구조체 정렬은 추후 업데이트 const int SIZE = 10; // 또는 #define SIZE 10 int arr[SIZE] = { 5, 2, 9, 1, 5, 6, 3, 8, 4, 7 }; // 배열 초기화 vector<int> V = { 5, 2, 9, 1, 5, 6, 3, 8, 4, 7 }; // 벡터 초기화 int main() { cin.tie...
ALGO
0.999802
5.094854
{ "github_metadata": { "branch": "main", "commit_count": 121, "repo_created_at": "2025-03-09T12:14:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6f7bae777...
ba9a76f8-fae1-424e-b73b-9dda62ee37c1
Dishant402955/DSA
Practice-Questions/Leetcode/2040.Kth-Smallest-Product-of-Two-Sorted-Arrays.cpp
class Solution { public: bool check(const vector<int>& nums1, const vector<int>& nums2, long long mid, long long k) { long long count = 0; for (int i : nums1) { if(i == 0){ if(mid >= 0) {count += nums2.size();} }else if(i > 0){ int ans = -1; int l = 0, r =...
ALGO
0.999992
5.757058
{ "github_metadata": { "branch": "main", "commit_count": 412, "repo_created_at": "2024-06-24T05:10:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd75eab1e1...
e5ef76e5-337e-41cd-9025-ebdc34c40a8e
mhw-mathcode/acm-algorithm
dp/悬线法.cpp
#include <bits/stdc++.h> using namespace std; #define pii pair<int, int> const int N = 2e3 + 5; int A[N][N], l[N][N], r[N][N], u[N][N]; void solve() { int n, m; cin >> n >> m; for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) cin >> A[i][j]; int ans = 0; for ...
ALGO
0.999977
3.458771
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-05-14T01:18: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": "cf3cdd742d0...
0c51f27e-f41c-46a4-a6fe-294771280d41
abhiXsliet/Solved-DSA-Problems
Leetcode Daily Challenge/020-Februrary-2025/017-letter-tile-possibilities.cpp
// https://leetcode.com/problems/letter-tile-possibilities/ #include <bits/stdc++.h> using namespace std; class Solution { private: // TC : O(N!) // SC : O(N) space used by recursive call stack void solve_3(vector<int>& freq, int& count) { for (int i = 0; i < 26; i ++) { if (freq[i]...
ALGO
0.999988
6.639538
{ "github_metadata": { "branch": "main", "commit_count": 2156, "repo_created_at": "2023-07-29T13:17:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff9668183...
76405732-79f9-4c45-a3d3-760766f27415
ishandutta2007/codeforces-c
cz_xuyixuan/normal/1054/D.cpp
#include<bits/stdc++.h> using namespace std; const int MAXN = 2e5 + 5; typedef long long ll; typedef long double ld; typedef unsigned long long ull; template <typename T> void chkmax(T &x, T y) {x = max(x, y); } template <typename T> void chkmin(T &x, T y) {x = min(x, y); } template <typename T> void read(T &x) { x =...
ALGO
0.999976
3.896158
{ "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": "ceacda112d9c...
b51a7a5c-6133-44b1-b3ca-d724f2cc18c2
hieubuigit/CITD
DataStructure and Algorithm/Lecture 4 - Stack and Queue/stack.cpp
/** * Create by: <NAME> * Student ID: 23410014 * Description: Stack */ #include <iostream> #include <string> using namespace std; struct Node { int data; Node *pNext; }; Node *initNode(int data) { Node *p = new Node; p->data = data; p->pNext = NULL; return p; } struct Stack { Node *pT...
ALGO
0.999377
4.805697
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-12-20T14:11: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": "baf1ceb4639...
98a395e8-491c-4b74-b462-f74dcfabe49a
karolidis/Undergraduate-Projects
AVL Trees/main.cpp
#include <iostream> #include<cctype> #include <stdio.h> #include <stdlib.h> #include <conio.h> #include <fstream> #include <string.h> #include "ClassInvertedIndex.h" using namespace std; int main() { int a,b,temp,j,i=0,n,meg=0,tempmeg=0; string A; char B[11]; ifstream f1,f2,f3,f4; int size=0; FILE *fp; ClassI...
ALGO
0.99739
3.251862
{ "github_metadata": { "branch": "master", "commit_count": 119, "repo_created_at": "2017-10-19T17:31: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": "d9c6d759...
c1513d56-f683-4f0a-a286-4eb46eb33f23
alexandraback/datacollection
solutions_5690574640250880_1/C++/STEP5/C.cpp
#include <cstdlib> #include <cstdio> #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; const int MAXN = 64; bool white[MAXN][MAXN]; int R, C, M, N; bool swapped = false; int main() { ios_base::sync_with_stdio(0); int T; cin>>T; for(int t=1; t<=T; t++)...
ALGO
0.999634
3.412487
{ "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": "f8b6c6e5d...
a467fd48-723c-457e-8d67-035b203b9b8c
dxx-git/DataStruct
hash/hash.cpp
#include <iostream> #include <string> #include <vector> #include <cassert> #include "hash_bucket.h" #include "bit_map.h" #include "BloomFilter.h" using namespace std; // //enum Status //{ // EMPTY, // DELETE, // EXIST, //}; // // ////仿函数 //template <class K> //struct __HashFunc //{ // size_t operator()(const K& key) //...
TOOL
0.901804
4.289513
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2017-01-04T13:09:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df95bb700...
65d831d4-bb7c-4ee0-800e-3c885673b060
srinagesh/gr-cpm
gr-digital/lib/digital_costas_loop_cc.cc
/* -*- c++ -*- */ /* * Copyright 2006,2010,2011 Free Software Foundation, Inc. * * This file is part of GNU Radio * * GNU Radio 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, or (at...
ALGO
0.999345
6.470047
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2012-03-26T19:15:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d5fc7f50...
97b71063-c924-4240-b0c7-b4d56bc0774a
vivi2004/DSA-ALL-IN-ONE
oops/linkelist/deletionby.cpp
// deletion by the value .. #include <bits/stdc++.h> using namespace std; struct Node { public: int data; Node* next; Node(int data1, Node* next1) { data = data1; next = next1; } Node(int data1) { data = data1; next = nullptr; } }; Node * convertArr2ll(...
ALGO
0.999919
4.83409
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-07-03T18:35:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3de47acd3919...
96aabee2-e09f-4c3b-8777-586374c807ea
wangqinghe95/PAT-Code
mooc-2019-code/07-图5 Saving James Bond - Hard Version (30 分).cpp
// https://www.cnblogs.com/wanghao-boke/p/11802088.html #include<cstdio> #include<queue> #include<stack> #include<cmath> #include<iostream> #include<algorithm> using namespace std; const int maxn = 110; const int minLen = 50 - 15.0/2; struct Point { int x,y; }point[maxn]; int path[maxn] = {0}; bool vis[maxn] = {0};...
ALGO
0.999999
3.886157
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2021-05-23T02:12: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": "489069608...
9f1b3574-5615-4f2a-a56f-7020e3d1b7cb
slava-sh/code-plagiarism-detector
data/russia-team-c/sources/g06-c-1.cpp
#include<math.h> #include<algorithm> #include<cstdlib> #include<iostream> #include<stdio.h> #include<map> #include<ext/hash_map> #include<ext/hash_set> #include<set> #include<string> #include<assert.h> #include<vector> #include<time.h> #include<queue> #include...
ALGO
0.999817
3.244408
{ "github_metadata": { "branch": "master", "commit_count": 135, "repo_created_at": "2015-04-26T21:39:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b75c16dc...
a0c78520-d6d3-44af-b87e-ce9727f2a9ff
OlesiaKniazeva/CPP_Modules
Day08/ex01/main.cpp
#include "Span.hpp" #include <cstdlib> void PrintVector(std::vector<int> v) { unsigned int size = v.size(); std::cout << "{ "; for (unsigned int i = 0; i < size; ++i) { std::cout << v[i] << " "; if (i % 20 == 0) { std::cout << std::endl; } } std::cout << "}" << std::endl; } std::vector<in...
TEST
0.978013
4.564093
{ "github_metadata": { "branch": "master", "commit_count": 126, "repo_created_at": "2021-12-07T21:33:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57dcf647...
6e06a77c-0ad4-442c-bb73-c5bd7aaa53d7
CGAL/cgal
Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_support_set_impl.h
// Copyright (c) 1997 ETH Zurich (Switzerland). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // // $URL$ // $Id$ // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial // // // Author(s) : <NAME> #ifndef CGAL_MINIBALL_SUPPORTSET_C #define CGAL_MINIBALL_SUPPORTSET_C #inc...
ALGO
0.998719
6.528532
{ "github_metadata": { "branch": "master", "commit_count": 113659, "repo_created_at": "2014-10-01T12:22:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5443, "forks": 1475, "issues": 511, "pull_requests": 136 }, "file_meta": { "content_id...
f93b8001-8791-430b-be2c-a6255fb98b23
Muhammad-Mubashir786/DSA
sortingAlgorithm.cpp
#include <iostream> #include <chrono> #include <algorithm> using namespace std; using namespace std::chrono; // Utility to display array void display(int arr[], int size) { for (int i = 0; i < size; i++) cout << arr[i] << " "; cout << endl; } // Bubble Sort void bubbleSort(int arr[], int size) { f...
ALGO
0.999788
5.845572
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-06-17T17:56: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": "a365afaf0b34...
8439b32b-43bf-41b9-9d77-3de8bb7b8d65
Bfalconer/Bfalconer
Quadratic Calculator/Quadratic Calculator/Quadratic Calculator.cpp
#include <iostream> #include <cmath> using namespace std; int main() { double a = 0; double b = 0; double c = 0; double radical = 0; char userChoice = 'n'; double root = 0; double answer = 0; double x = 0; double y = 0; cout << "+--------------------------------------+" << en...
ALGO
0.902323
3.997304
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-04-10T05:31:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c31e0166031...
75106ab5-d4d7-4b82-acb9-a09ece479dc6
kunalPisolkar24/CP_Algorithms
Miscellaneous/Matrix_Exponentiation/nthFib.cpp
#include "bits/stdc++.h" using namespace std; const int MOD = 1e9 + 7; typedef long long ll; typedef vector<long long> vl; typedef vector<vl> vll; vll multiply(vll &A, vll &B) { vll C(2, vl(2)); for (int i = 0; i < 2; i++) for (int j = 0; j < 2; j++) for (int k = 0; k < 2; k++) ...
ALGO
0.999795
4.361661
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2024-06-06T15:45: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": "5a1d2b445...
f0ee4c4a-7a51-46be-8fcf-2abff533b2dd
ishandutta2007/codeforces-h
heart_blue/normal/182/C.cpp
#include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <queue> #include <stack> #include <fstream> #include <numeric> #include <iomanip> #include <bi...
ALGO
0.999413
3.612459
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab536ca586f7...
35934de5-7dae-41c4-b94d-b7c13c840ca0
naeem4265/Coding
codeforces/1609D.cpp
#include<bits/stdc++.h> #define Fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define Freed freopen ("0in.txt","r",stdin); #define Fout freopen ("0out.txt","w",stdout); #define ll int #define pb push_back #define mp make_pair #define pi acos(-1.0) #define inf 1e18 #define Mod 1000000007 #define limit 1000008 usi...
ALGO
0.999822
3.369223
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2020-10-05T18:22:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6021a40c...
35fa082d-a318-4184-944d-c01e950f8f39
jmusserHelix/Garfield
Heed/heed++/code/PairProd.cpp
#include <fstream> #include <cmath> #include <cfloat> #include <climits> #include "wcpplib/util/FunNameStack.h" #include "wcpplib/random/ranluxint.h" #include "heed++/code/PairProd.h" // 2003, <NAME> //#define USE_GET_ELOSS_CUT namespace Heed { PairProd::PairProd(const std::string& file_name, double fw, double ffa...
ALGO
0.922404
4.474767
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-03-22T15:44:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11d103f11da1...
b8c98883-eebd-4fbe-bc4d-1377ad5817f3
BSBandme/coding-competition
图论/强连通/tarjan/tarjan_main.cpp
/*==================================================*\ | Tarjan强连通分量 | INIT: vec[]为邻接表; stop, cnt, scnt置0; pre[]置-1; | CALL: for(i=0; i<n; ++i) if(-1==pre[i]) tarjan(i, n); \*==================================================*/ const int V = 200000; const int maxm = 400000; struct edge { int to, nxt; } e[maxm]; int he...
ALGO
0.999674
4.629179
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-12-31T09:04: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": "460deee6d6...
9f3f2648-9a96-46ca-bc72-b2a118beefa8
b1060t/datastructure-algorithm
leetcode/18.4sum.cpp
class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { vector<vector<int>> rst; int len = nums.size(); if(len<4) return rst; quicksort(nums,0,len-1); int i = 0; int j = 1; while(i<len-3) { j=i+1; while(j<l...
ALGO
0.99996
5.969832
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2019-10-29T14:03: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": "7bcc33afd...
96fb969a-6550-46ae-a5d7-d6c79946dd53
skanti/Scan2CAD
Routines/AlignmentHeatmap/MatrixLib/matrix_structures/Mat4.h
#pragma once #include "Vec3.h" #include "Vec4.h" #include "Mat3.h" #include <string> namespace matrix_lib { /** * 4x4 matrix. * The arrangement of the matrix is row-like. * The index of a specific position is: * 0 1 2 3 * 4 5 6 7 * 8 9 10 11 * 12 13 14 15 */ template <class T> class Mat...
TOOL
0.978627
5.364033
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2018-12-04T14:39:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 463, "forks": 67, "issues": 13, "pull_requests": 0 }, "file_meta": { "content_id": "ffd13...
adb16170-559f-42c4-84f2-d36cd4b051ca
PabloYamamoto/Algoritmos-Avanzados
Homework - Ford-Fulkerson/main.cpp
/* <NAME> - A0129109 <NAME> - A01022382 Ford-Fulkerson for Maximum Flow in Networks Find the shortest path of every pair of vertex. The steps to implement the algorithm are: 1. Find a path from the start to the finish. 2. Find the augment flow in the path. 3. Sum to the max flow variable. 4. Reapea...
ALGO
0.999905
4.883049
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2021-08-24T17:49:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eae362ceeaf...
9b852a8a-2cad-489a-b146-e823b3c52dde
Vvvviper/UnderwaterLight
Integrate.h
typedef double Doub; // 64 - bit floating point typedef int Int; // 32 - bit signed integer #define PI (float) 3.14159265358979323846 #define ASYMMETRYPARAM (float) 0.1 // FOUND HERE: https://stackoverflow.com/questions/16512817/numerical-integration-in-c class LightFunctor { private: double u; double...
ALGO
0.999311
5.079468
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2021-04-17T14:11:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "838a3e4d3fe...
d113cdb8-6aa6-4449-9ed0-314da89f431b
AbdullahSharaawy/DataStructure_Algorithm
Queue/LinkedList.h
#pragma once #include<iostream> using namespace std; template<typename T> class Node { private: T _Data; public: Node* _Next; Node* _Prev; Node(T Data) { this->_Data = Data; this->_Next = nullptr; this->_Prev = nullptr; } Node() { this->_Next = nullptr; this->_Prev = nullptr; } T getData() { ...
ALGO
0.998896
4.275944
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2025-03-11T12:22: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": "ec68b70bc55...
1d5f2f86-7cba-4b1f-9046-5cf066bb58f1
OpenMD/OpenMD
src/math/SquareMatrix3.hpp
/* * Copyright (c) 2004-present, The University of Notre Dame. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, ...
TOOL
0.964601
7.301778
{ "github_metadata": { "branch": "main", "commit_count": 3424, "repo_created_at": "2015-03-23T18:22:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 82, "forks": 33, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d225b6d...
424dbf4c-b721-49da-814f-f222554848e7
ishandutta2007/codeforces-c
cerberus97/normal/913/B.cpp
/* Cerberus97 <NAME> */ #include <iostream> #include <iomanip> #include <cmath> #include <cstdio> #include <cstring> #include <cstdlib> #include <map> #include <set> #include <queue> #include <stack> #include <vector> #include <algorithm> using namespace std; #define pb push_back #define fast_cin() ios_base::sync_wi...
ALGO
0.99993
4.014842
{ "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": "92fd7aef2107...
ea2d3a00-8149-43f7-b902-0067811a4c75
skeeto/pixelcity
Random.cpp
/*----------------------------------------------------------------------------- r a n d o m -----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------- The Mersenne Twister by Matsumoto and Nis...
ALGO
0.998331
5.419421
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2009-05-05T17:12:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 360, "forks": 55, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f9a8e...
fc88296a-fa97-4b17-875a-48e1f48c6cb6
Gaurav237/DSA
_11_LinkedList/32_CloneLL/main.cpp
#include <bits/stdc++.h> using namespace std; struct Node{ int data; Node *next; Node* random; Node(int d){ data = d; next = nullptr; random = nullptr; } }; void printList(Node* head){ while(head != NULL){ cout << head->data << " "; if(head->random != NU...
ALGO
0.999705
4.506787
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-06-12T11:54: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": "2365537d43...
84dad504-efda-442f-848b-6f1cbd6fd109
rakibul23n28/c-cpp
c_c++/DSA problem/easy_problem/linked list/Delete_N_nodes_after_M_nodes_of_a_linked_list.cpp
//{ Driver Code Starts #include<stdio.h> #include<stdlib.h> #include<iostream> using namespace std; /* A linked list node */ struct Node { int data; struct Node *next; Node(int x){ data = x; next = NULL; } }; struct Node *start = NULL; /* Function to print nodes in a given ...
ALGO
0.999794
4.689139
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2023-07-27T21:02: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": "521c923a1...
ffe12826-3b22-4af6-b196-24d5af1a2f7c
SAURABH200301/MyCppCodes
singly_linked_list.cpp
#include<iostream> //LINKED LIST using namespace std; class Node { public: int key,data; Node *next; Node() { key=0;data=0;next=NULL; } Node(int k,int d) { key=k;data =d; } }; class singlylinkedlist { public: Node*head; singlylinkedlist() { head=NULL; } singlylinke...
ALGO
0.999581
5.143715
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-07-09T13:58: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": "c9b089a5d5...
39969c7e-ba38-494b-8503-d3e9d77f49a4
simonusher/p3-ag-challenge
AGChallenge/Evaluator.h
#pragma once #include "Evaluation.h" #include <string> #include <vector> using namespace std; #define dWRONG_VALUE -1 #define iINIT_NUMBER_OF_BITS 0 #define dINIT_MAX_VALUE 0 #define iSEED_NO_MASK -1 #define iBIT_FALSE 0 #define iBIT_TRUE 1 #define iP3_EVALUATOR_RUN_NUMBER 0 #define dP3_EVALUATOR_MAX_VALUE 1.0 ...
ALGO
0.940859
6.453699
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-05-07T18:50: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": "48531d4440e0...
e0bc9810-d1d4-4d21-9c70-bbcd0398d369
suryathejareddy/CPrograms
getLastWord.cpp
/* Problem : Return the Last word in a string Input : I will do this without using String Library Output : Library Note:Dont modify original string Neglect Spaces at the right end and at left end if required . ->Create a new string and return it , Use dynamic memory allocation . */ #include <stdlib.h> #include<stdio...
ALGO
0.974763
3.628082
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-03-11T04:11: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": "a5a924c667...
871ae8cb-7f5f-4ad6-a431-1399e440d101
benston3/semmod
win/semmod/spsvd/win_dll/spsvd.cpp
// spsvd.cpp : Defines the entry point for the DLL application. // #include "svdlib.h" #include "svdutil.h" #include <stdio.h> #include <stdlib.h> #include "stdafx.h" long RandomSeed; extern "C" __declspec(dllexport) int _spsvd( long dimensions, long iterations, long n_types, long n_docs, long nnz, long RSeed, in...
ALGO
0.978188
4.434086
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-08-20T08:32: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": "66f37dea0b...
e4d2236a-8790-4852-b9d5-0c1349989e68
HanChao1992/LeetCode_Algorithms_Solutions
Remove_Nth_Node_From_End_of_List.cc
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* removeNthFromEnd(ListNode* head, int n) { int count = 0; ListNode * cur = head; while(cur != NULL)...
ALGO
0.99998
5.45067
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2016-11-30T22:45: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": "f98681b5a...
678c6035-b709-420f-9b33-d1e55fc90e8a
fuzzwaz/Fuzzy2D-Game-Engine
Fuzzy2D/Physics/Polygon.h
// // Polygon.h // Fuzzy2D // // Created by <NAME> in 2021 // Copyright (c) 2021 <NAME>. All rights reserved. // #pragma once #include "Vector2.h" #include <vector> #include <memory> //Polygon class represented by a list of points corresponding to each vertex class Polygon { public: Polygon(); const Ve...
TOOL
0.969895
7.596143
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-09-09T04:40:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "56331b7baeac...
8d2da3b3-78f5-4df2-b4b3-93105009d41c
JBlakd/self-study
topo-sort-course-schedule/course_schedule_2.cpp
#include <iostream> #include <queue> #include <vector> using namespace std; class Solution { public: vector<int> findOrder(int numCourses, vector<vector<int>>& prerequisites) { calculate(numCourses, prerequisites); return topological_order; } private: vector<int> topological_order; ...
ALGO
0.999975
6.545014
{ "github_metadata": { "branch": "main", "commit_count": 430, "repo_created_at": "2022-01-02T04:54:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80ad925b1a...
1e567b1e-03bb-48bf-a1c6-2810dbfd8c9f
ishandutta2007/codeforces-s
stepanov.aa/normal/1415/D.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int n; vector<long long> a; vector<long long> pref_xors; void count_pref_xors() { pref_xors.resize(n + 1); pref_xors[0] = 0; for (int i = 1; i <= n; ++i) { pref_xors[i] = (pref_xors[i - 1] ^ a[i - 1]); } } int get_res(int tl, ...
ALGO
0.999948
3.929298
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1104a8a946e1...
8abaef5e-4bf0-486f-b8e6-46067941d7a6
B-ThaiBao/cp_book
graph/eulerian.hpp
template <typename G> static inline std::pair<int, std::vector<int>> find_eulerian_path(const G& g) { std::vector<std::array<int, 2>> deg(g.V); int num_edges = int(g.edges.size()); for (int i = 0; i < num_edges; i++) { const auto& e = g.edges[i]; deg[e.from][0]++, deg[e.to][1]++; } int rt = -1, o = 0; for (i...
ALGO
0.999824
5.1212
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2024-04-21T07:32: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": "cc31f2a69...
3bcedae1-1e47-42b8-9f4f-990d3cd3e8d0
UsoltsevI/TimSort
timsort.hpp
#ifndef TIMSORT_H_INCLUDED #define TIMSORT_H_INCLUDED #include <iostream> #include <stack> #include <cstring> // #include <cassert> template <typename T, typename Compare> class timsortcls { struct subarray { size_t beg; size_t size; }; static const size_t MIN_LEN_TO_MERGESORT = 64; ...
ALGO
0.999621
5.948453
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-11-09T17:05: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": "3efef94a1d9...
5876cdf6-2eeb-4a30-9058-cc8319d8d1d4
MariamAmy/CP_Solutions
CodeForces/GNU C++17/69A | Young Physicist/154891703.cpp
# include<bits/stdc++.h> using namespace std; #define ll long long #define ln "\n" #define lp(i, n) for (int i = 0; i < n; i++) const int mod = (int)(1e9 + 7), mxN = 105, mxM = 1e5 + 5; int dx[4] = {1, 0, -1, 0}; int dy[4]= {0, 1, 0, -1}; char dir[4] = {'D', 'R', 'U', 'L'}; //vector <vector<int>> v; //vector <b...
ALGO
0.999506
4.441994
{ "github_metadata": { "branch": "main", "commit_count": 400, "repo_created_at": "2022-09-20T10:13:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "58aab026e9...
5113ac0d-f38e-419c-ba0c-eb018b0f61a6
Quaker762/Mazer
source/mazeroute.cpp
/** * Copyright (c) 2018 <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 the rights * to use, copy, modify, merge, publis...
ALGO
0.999129
5.015052
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2018-07-26T14:02:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bb423212...
ee5ee3fe-5bd6-49a4-a907-6627b4610d44
ehnryx/acm
codeforces/1110/b.cpp
#include <bits/stdc++.h> using namespace std; #define _USE_MATH_DEFINES typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef complex<ld> pt; typedef vector<pt> pol; const char nl = '\n'; const int INF = 0x3f3f3f3f; const ll INFLL = 0x3f3f3f3f3f3f3f3f; const ll MOD = 1e9+7; const ld EPS = 1...
ALGO
0.999985
3.677041
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2018-05-03T04:18:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d58ab8f6b...
14f19b41-7431-48cd-8e52-acb6804fd7f7
shubham241-svg/Data-Structures
queue/queue_problems.cpp
#include <iostream> #include <queue> #include <stack> #include <vector> #include <string> #include <deque> using namespace std; // Non repeating letter : find the first non- repeating letter in the stream of characters void nonRepeating(string word){ queue<char> Q; int freq[26] = {0}; for(int i=0; i<word.s...
ALGO
0.999909
3.564445
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2025-01-22T17:25: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": "adfdd481726...
544aa782-9474-487e-bd7d-d0ad60610a4d
y-kitamu/ProgrammingContest
AtCoder/YahooProcon2019/odd_subrectangles.cpp
#include <iostream> #include <cmath> int main() { int NUMBER = 998244353; int N, M, val; std::cin >> N >> M; int row_vec[N], col_vec[M]; for (int i = 0; i < N; i++) { for (int j = 0; j < M; j++) { std::cin >> val; row_vec[i] += val % 2; col_vec[j]...
ALGO
0.999996
5.226451
{ "github_metadata": { "branch": "master", "commit_count": 434, "repo_created_at": "2018-01-24T14:30:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 13, "pull_requests": 0 }, "file_meta": { "content_id": "902e825...
37f11fd1-fa43-49d7-87d0-8d8b2d0af8b0
alexandraback/datacollection
solutions_1595491_0/C++/Acev/main.cpp
#define _CRT_SECURE_NO_DEPRECATE #include <cstdlib> #include <algorithm> #include <vector> #include <string> #include <cstring> #include <cstdio> #include <set> #include <map> #include <cmath> #include <queue> #include <sstream> #include <iostream> using namespace std; //////////////////// Defines ////////////////////...
ALGO
0.999389
3.307564
{ "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": "936f935b7...
d2b76dbf-f8a6-47bb-a0f6-db99947a3e8a
Cardosaum/competitive-programming
codeforces/contest/1/problem/A/main.cpp
#include <bits/stdc++.h> using namespace std; #define all(v) v.begin(), v.end() #define SPEED \ ios_base::sync_with_stdio(false); \ cin.tie(nullptr) #define endl '\n' #define YES cout << "YES" << endl; #defi...
ALGO
0.999918
3.432675
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2021-05-25T19:16: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": "de9cd3ad8...
8c4db9aa-27f5-4a70-8101-9e0a0d8a2511
ishandutta2007/codeforces-h
heart_blue/normal/183/B.cpp
#include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <map> #include <set> #include <queue> #include <stack> #include <fstream> #include <numeric> #include <iomanip> #include <bi...
ALGO
0.999869
3.431286
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd85906dfc3b...
e8c6a520-8b75-42a7-ac59-5d912feb3659
raincross7/code-similarity
codes/train_code/problem181/problem181_494.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <vector> #include <list> #include <set> #include <map> #include <queue> #include <stack> #include <cctype> #include <cassert> #include <climits> #include <string> #include <bitset> #include <cfloat> #include <unordered_set> #include <...
ALGO
0.999871
3.245344
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07: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": "059fe2df01cd...
1403eda5-2f4d-476e-b754-5b5b4c697553
ziyeshanwai/METAHUMAN51
Source/RLibV/Private/include/rlibv/savitzky_golay.h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include <type_traits> #include <iostream> #include <vector> #include <algorithm> #include <cassert> #include <iterator> #include "disable_dlib_warnings.h" RLIBV_DISABLE_DLIB_WARNINGS #include <dlib/matrix.h> RLIBV_RENABLE_WARNINGS namespace rlibv...
ALGO
0.986243
7.314187
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-06-20T06:18:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 6, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c6ed18fcb273...
53ee0f0d-2e69-4119-aabf-d2cc4406a5bc
opencog/moses
moses/moses/scoring/precision_bscore.cc
/* * moses/moses/moses/precision_bscore.cc * * Copyright (C) 2002-2008 Novamente LLC * Copyright (C) 2012,2013 Poulin Holdings LLC * All Rights Reserved * * Written by <NAME>, <NAME>, <NAME> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General...
ALGO
0.99574
5.541007
{ "github_metadata": { "branch": "master", "commit_count": 16698, "repo_created_at": "2015-04-26T19:15:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 131, "forks": 85, "issues": 13, "pull_requests": 0 }, "file_meta": { "content_id": "e08...
ccd323a2-d2f2-4a10-9462-3a7911c390f8
ishandutta2007/codeforces-b
brobat/normal/1465/A.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define endl "\n" #define forn(i, a, n) for (int i = a; i < n; i++) const int MAXN = 200100; const int MOD = 1000000007; void solve() { int n; cin >> n; string s; cin >> s; int c = 0; for(int i = n - 1; i >=0; i--) { ...
ALGO
0.999438
3.930392
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35ebd317950d...
b429983d-f704-444f-a42d-8921c1c8b430
renzov/Red_Crown
Timus/graph/bfs/1208.cpp
#include<cstdio> #include<vector> #include<map> #include<string> #include<queue> using namespace std; vector<int> G[ 25 ]; map<string,int> h; int n; int m; int res; int used[ 25 ] = { 0 }; void backtrack(int pos,int count,int left){ if (left == 0 || pos >= n){ if (count > res) res = count; return; } if...
ALGO
0.999818
3.690738
{ "github_metadata": { "branch": "master", "commit_count": 166, "repo_created_at": "2012-06-03T15:15:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0081fbbf...
83ee9b86-e345-42b3-9300-d4fac3126b89
Dobnerke1669/jpeg-compression
OpenCVApplication.cpp
#include "stdafx.h" #include "common.h" #include <opencv2/imgproc.hpp> #include <queue> #include <random> #include <fstream> #include <opencv2/opencv.hpp> #include <vector> #define BLOCK_SIZE 8 using namespace std; double dataLuminance[8][8] = { {16, 11, 10, 16, 24, 40, 51, 61}, {12, 12, 14, 19, 26, 58, 60, 55}, ...
ALGO
0.999026
4.969099
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2023-07-05T11:42:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd9d9c3715...
088a290a-99d9-4d6d-bd7d-a420e777d699
Eng-Gamal-megahed/Problem_Solving
Cut Ribbon Rec.cpp
// "ولا تقولن لشيء إني فاعل ذلك غدا" // "إلا أن يشاء الله واذكر ربك إذا نسيت وقل عسى أن يهديني ربي لأقرب من هذا رشدا" // LINK : https://codeforces.com/problemset/problem/189/A #include <bits/stdc++.h> #define ll long long #define nl '\n' #define sp ' ' #define all(a) a.begin(),a.end() #define allr(a) a.rbegin(),a.re...
ALGO
0.999953
4.165442
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2024-02-24T00:07: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": "575660025e9...
bf7a5d23-7eb8-48b9-8a6d-8383182eeab8
durgesh-agrhari/Placement-Preparation-Module
1 2 3 4 Array/Day 1/4.1 Kadanes algoritnm basic.cpp
#include <algorithm> long long maxSubarraySum(int arr[], int n) { long long maxSum = 0; for(int i=0; i<n; i++) { for(int j=i; j<n; j++) { long long curSum = 0; for(int k=i; k<=j; k++) { curSum += arr[k]; } ...
ALGO
0.999947
5.138128
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2022-06-30T07:50:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "088dcf22712...
7356077e-02fd-4f68-8bbe-cc76c074d1aa
ClementChouteau/Ultimate-Tic-Tac-Toe
src/common/ttt_utils.h
#pragma once #include <cmath> #include <iostream> #include "ttt.h" #include "precomputed_win.h" const PrecomputedWin precomputedWin; inline bool win(ttt_t ttt, player_t player) { return precomputedWin.isWon(ttt, player); } inline ttt_t transform_adversary_to_owner(ttt_t ttt, Owner player) { if (player == Owner::...
ALGO
0.995332
5.219017
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2018-05-03T15:00: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": "61df76d6d...
85d735b0-af67-4d6d-a4c6-9709b3cbfe84
sumondebnath/Algorithms
Graph/Dijkstra Algorithm/shortest_path_print.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 5; int dis[N]; bool vis[N]; int par[N]; vector<int> arr[N]; void shortest_path_BFS(int source) { queue<int> q; q.push(source); dis[source] = 0; vis[source] = true; par[source] = -1; while (!q.empty()) { int parent =...
ALGO
0.999993
4.56403
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-07-10T08:58: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": "cec5e34776a...
1659c037-6bcc-4e78-ba94-d223290c2623
Minglee2018/prime_algorithm
main.cpp
#include <bits/stdc++.h> using namespace std; void snt1() { int N = 1000; bool check[N + 1]; // Kh?i t?o t?t c? các s? [2...N] d?u là s? nguyên t? for (int i = 2; i <= N; i++) { check[i] = true; } // Thu?t toán sàng nguyên t? // N?u m?t s? là s? nguyên t?, thì t?t c? các b?i c?a nó không ph?i s? ng...
ALGO
0.999732
4.389694
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-02-13T14:33: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": "eaf5468b31...
e851f87b-d785-4e38-8b6d-5dbc21ad8ff4
CyroPCJr/OmegaEngine
Framework/AI/Src/PathFollowingBehaviour.cpp
#include "Precompiled.h" #include <Agent.h> #include <PathFollowingBehaviour.h> using namespace Omega::AI; using namespace Omega::Math; using namespace Omega::Graphics; Vector2 PathFollowingBehaviour::Calculate(AI::Agent& agent) { if (mPaths.empty()) { return Vector2::Zero; } FollowPath(agent); return ArriveBe...
ALGO
0.995952
5.33558
{ "github_metadata": { "branch": "main", "commit_count": 227, "repo_created_at": "2021-03-23T00:56:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf217d820a...
c94ca6c9-fba8-4926-9032-a2a081546ccc
hungp2812/AtCoder
arc103_d.cpp
/* /+==================================================+\ //+--------------------------------------------------+\\ |.|\\...>>>>>>> Hollwo_Pelw(ass) 's code <<<<<<<...//|.| \\+--------------------------------------------------+// \+==================================================+/ */ #include <bits/stdc++.h> using ...
ALGO
0.999888
3.870397
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-07-08T15:50: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": "6a7f09f1d...
d1b1a12f-01ca-45ae-9a18-e92699af3d23
EuiJaeKim/Programming
SWEA_D2_1954/SWEA_D2_1954/SWEA_D2_1954.cpp
#include <cstdio> int Map[10][10]; int N; void Init(); void Solve(); void print(); int main() { int TC; scanf("%d", &TC); for (int i = 1; i <= TC; i++) { Init(); scanf("%d", &N); Solve(); printf("#%d\n", i); print(); } return 0; } void Init() { for (int i = 0; i < 10; i++) for (int j = 0; j < 10;...
ALGO
0.998102
3.558216
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2018-05-02T02:48:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f594a3d...
d2ebc6ee-d8d6-4fcf-a7a1-5af61891ba50
abdelaleem024/competitive-programming
templates/Strings/Z.cpp
/* the max number of characters starting from the position   i that coincide with the first characters of s  */ vector<int> z_function(string s) { int n = s.size(); vector<int> z(n); int l = 0, r = 0; for(int i = 1; i < n; i++) { if(i < r) { z[i] = min(r - i, z[i - l]); } ...
ALGO
0.999964
5.230535
{ "github_metadata": { "branch": "main", "commit_count": 531, "repo_created_at": "2021-11-17T18:36:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 53, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35a7e2953...
eea9aac9-bd50-4457-8586-75f8edcf7260
vivek-chourey/CPP-Core-DSA
DP/maxSumOfNonAdjElem.cpp
// https://www.codingninjas.com/codestudio/problems/maximum-sum-of-non-adjacent-elements_843261?leftPanelTab=0&utm_source=youtube&utm_medium=affiliate&utm_campaign=Lovebabbar // //recursion + memoization On On // #include <bits/stdc++.h> // int solve(vector<int> &nums, int n, vector<int> &dp){ // if(n<0){ // ...
ALGO
0.999975
5.524302
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-03-16T10:52: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": "a6c048a986...
b0b90bb3-68a5-487d-9f5f-cfc59477739a
nerdola-de-cartola/RSA
main.cpp
#include <iostream> #include <cstdlib> #include <ctime> #include <bitset> #include <stack> #include <boost/multiprecision/cpp_int.hpp> #define MAX_PRIMES 100000 typedef boost::multiprecision::int1024_t i_1024; typedef long long ll; ll PRIMES[MAX_PRIMES]; ll PRIMES_QTD; std::bitset<MAX_PRIMES> isPrime; ll randomPr...
ALGO
0.999862
3.878301
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-02-02T13:14: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": "2ab6f390bbf8...
26c39a9e-36fd-4b48-8036-070a52096ccf
sonicyang/CFG
syscall_list/src/main.cpp
#include <deque> #include <iostream> #include <filesystem> #include <memory> #include <set> #include <string> #include <unordered_set> #include <tuple> #include <regex> #include <vector> #include <optional> #include <fmt/format.h> #include <fmt/os.h> #include <spdlog/spdlog.h> #include <absl/flags/flag.h> #include <a...
TOOL
0.943371
6.603198
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2022-05-31T16:19: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": "f9c17ec6a...
07ff588c-bf45-4326-81a9-38a27883b2cf
aajjbb/contest-files
Codeforces/ABChess.cpp
#include <bits/stdc++.h> template<typename T> T gcd(T a, T b) { if(!b) return a; return gcd(b, a % b); } template<typename T> T lcm(T a, T b) { return a * b / gcd(a, b); } template<typename T> void chmin(T& a, T b) { a = (a > b) ? b : a; } template<typename T> void chmax(T& a, T b) { a = (a < b) ? b : a; ...
ALGO
0.99984
4.115866
{ "github_metadata": { "branch": "master", "commit_count": 892, "repo_created_at": "2016-03-02T13:05:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f28afa1...
cadb3049-51be-4d2b-bd0d-4b28dbda6250
ojha-ashutosh/DSA-cpp
dynamicPrograming/problem54.cpp
#include <bits/stdc++.h> using namespace std; vector<int> largestDivisibleSubset(vector<int>& v) { int n = v.size(); sort(v.begin(), v.end()); vector<int> dp(n, 1), parant(n); int maxi = 0, last_index = 0; for (int curr = 0; curr <n; curr++) { parant[curr] = curr; for(int prev=0;prev...
ALGO
0.999968
5.229759
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-05-05T19:18: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": "f7b81722cda8...
a942d731-fcc7-4ce8-b41c-641ae19376a0
hello-lx/CodingTest
3/228.cpp
#include <iostream> #include <list> #include <vector> #include <math.h> #include <algorithm> #include <map> #include <unordered_map> #include <unordered_set> #include <set> #include <list> #include <queue> #include <stack> using namespace std; #define INT_MIN -99999999999 #define INT_MAX 99999999999 // Definition of ...
ALGO
0.999687
5.817392
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2020-03-04T13:46: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": "fea612ab...
88cb005e-a0d7-48b7-974a-b9056623c200
sclc/campk
src/MatGenerator.cpp
#include "MatGenerator.h" #define DB_MAT_GEN_1 void TridiagonalCSR_val(csrType_local * mat, long rowDim, long colDim, double val) { mat->num_rows = rowDim; mat->num_cols = colDim; mat->nnz = 3 * rowDim - 2; mat->start = 0; mat->row_start = (long *)calloc( rowDim+1, sizeof(long) ); mat->col_idx = (l...
ALGO
0.991031
3.87223
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-06-08T14:33:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9606e15fcb...
9c685592-062d-462d-ab16-38c3d1597351
MeDA-Lab/scsc17summer0
src/main.cpp
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /// @file main.cpp /// @brief The main function. /// /// @author <NAME> <<<EMAIL>>> /// #include <cmath> #include <climits> #include <iostream> #include <harmonic.hpp> #include <timer....
ALGO
0.974964
4.893594
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2017-06-25T06:31:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "84ef8f04f...
62c8d06e-7e1c-457c-bc32-f44d6055bf63
sangdo913/Algorithms
StudyAlone/StudyAlone/BOJ5639.h
//https://www.acmicpc.net/problem/5639 //BOJ 5639 이진 검색 트리 #pragma once #include<iostream> using namespace std; struct NODE { int v; NODE *l, *r; NODE() :v(0), l(0), r(0) {} }nodes[10000]; struct MYAL { int idx; MYAL() :idx(0) {} NODE* alloc() { return &nodes[idx++]; } void init() { idx = 0; } }al; struct B...
ALGO
0.999819
5.428276
{ "github_metadata": { "branch": "master", "commit_count": 850, "repo_created_at": "2018-01-06T13:25:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "292c4aa3...
2c09cbd6-5025-4fbc-b38c-69feddc22af3
mustafaemirtezcan/BBM203
A3-DRONE ALPHA/src/Queue.cpp
#include "Queue.h" #include <iostream> // Constructor to initialize an empty queue Queue::Queue() { front = -1; rear = -1; } // Adds a province to the end of the queue void Queue::enqueue(int province) { if(province < 0 || province >= MAX_QUEUE_SIZE){ std::cout << "Invalid province" << std::endl; ...
ALGO
0.998803
5.499737
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-03-02T20:33: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": "270aadb2e62b...
3e5f8dd0-a4eb-4854-ac33-666090ec60d6
lazydev01/365DayCPChallenge
lazydev01/day_453.cpp
#include <bits/stdc++.h> using namespace std; #ifdef ONLINE_JUDGE #define cerr if(0) cerr #endif #define int long long int #define endl "\n" #define YES cout<<"YES\n" #define NO cout<<"NO\n" void fakeCertificate(){ int t; cin >> t; while(t--){ int n; cin >> n; string s; ...
ALGO
0.999871
4.238427
{ "github_metadata": { "branch": "main", "commit_count": 1059, "repo_created_at": "2022-12-18T09:37:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2cc15d5f5...
4fa1d86b-f46b-416b-94b7-c30f3af79865
liarchgh/MyCode
C++/hdu4023Game.cc
#include <cstdio> #include <fstream> #include <iostream> using namespace std; const int mx = 15; int main(){ #ifndef ONLINE_JUDGE freopen("d:/in.ls", "r", stdin); freopen("d:/out.ls", "w", stdout); #endif //直接通过数组来存储 减少代码量 int order[2][14] = {{15, 5, 6, 3, 4, 11, 12, 13, 14, 7, 8, 9, 10, 1}, ...
ALGO
0.999945
3.252115
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2016-11-11T05:12: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": "6e1dc5737...
8ce2ba90-ca43-4215-b0f8-f7f086226e9a
Chiki1601/Leetcode-Solution-in-Cpp
3001-3500/3463.cpp
class Solution { public: int binmod10(int n, int k) { int mod2 = binmod2(n, k); int mod5 = binmod5(n, k); for (int i = 0; i < 10; i++) { if (i % 2 == mod2 && i % 5 == mod5) return i; } return 0; } int binmod2(int n, int k) { while ...
ALGO
0.999966
5.758224
{ "github_metadata": { "branch": "main", "commit_count": 1476, "repo_created_at": "2022-07-22T05:42:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "735d489c1...
80560ea0-4dfb-441d-98ca-78057959d131
yyt12345/Leetcode
054.cpp
/* * @Descripttion: 54. 螺旋矩阵 给定一个包含 m x n 个元素的矩阵(m 行, n 列),请按照顺时针螺旋顺序,返回矩阵中的所有元素。 * @version: * @Author: <NAME> * @Date: 2020-07-28 10:09:13 * @LastEditors: <NAME> * @LastEditTime: 2020-07-28 11:18:29 */ #include <vector> #include <iostream> using namespace std; // 执行用时:0 ms, 在所有 C++ 提交中击败了100.00% 的用户 ...
ALGO
0.999997
5.831881
{ "github_metadata": { "branch": "master", "commit_count": 148, "repo_created_at": "2020-07-26T14:13: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": "fba9cc29...
40ba7dd4-b69b-44b9-b6c9-690eed29d38c
chalijutt/DSA-Practice-Current-Competition
test-prep/Pattern_matching/Trie/CSES_Word_Combinations.cpp
#include<bits/stdc++.h> const int MOD = 1000000007; using namespace std; struct node{ node* nxt[26]; bool is_end; node(){ for(int i=0;i<26;i++) nxt[i]=NULL; is_end=false; } }; class Trie { public: node* root; Trie() { root=new node(); } void insert(string word) { ...
ALGO
0.99998
5.163527
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-08-19T06:26: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": "f3ec352e96af...
eac99715-922b-4e76-9719-a5f6b3af9838
andy-lee-cat/catsDaily
250503.cpp
// 1622C 1600 #include <iostream> #include <algorithm> #include <vector> #include <numeric> using namespace std; long long mdiv(long long a, long long b) { long long res = a / b; if (a % b != 0) { res++; } return res; } void solve() { int n; long long k; cin >> n >> k; vector<l...
ALGO
0.999967
4.145933
{ "github_metadata": { "branch": "master", "commit_count": 258, "repo_created_at": "2024-11-27T12:26: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": "c6c49b0d...
b8b69e29-a55f-4a7f-b967-a4e20b5a7374
pedroevaristo/beeCPP
Questão1158.cpp
#include <iostream> #include <cstdlib> using namespace std; int main() { int quantid, array[2], loop; cin >> quantid; loop = 0; while (loop < quantid) { int input = 0, total = 0; do { cin >> array[input]; input += 1; } while (input < 2)...
ALGO
0.999925
3.419755
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2021-11-01T13:26: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": "0188330a2b4...
0e23d8b2-b556-4270-98e3-ef9f4ecba8b8
kfdykme/cProgram
Chapter8/Pro_8.cpp
#include <stdio.h> int main(void){ float scores[5][5]; float stuAvrS[5],stuSumS[5] = {0}; float exaAvrS[5] = {0},exaMaxS[5] = {0},exaMinS[5]; for ( int r = 0 ; r < 5;r++){ printf("Enter student1's scores: "); for ( int c = 0;c< 5 ; c++){ scanf(" %f",&scores[r][c]); stuSumS[r] += scores[r][c]; stuAvr...
ALGO
0.994338
3.039766
{ "github_metadata": { "branch": "master", "commit_count": 337, "repo_created_at": "2016-10-13T10:39: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": "70afc3be...
ca012c22-3c33-4e3a-94f8-be410f7267aa
J9214/Baekjoon
c++/영단어_암기는_괴로워.cpp
#include <bits/stdc++.h> using namespace std; #define FASTIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); typedef long long ll; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<vector<int>> vvi; typedef vector<vector<ll>> vvll; typede...
ALGO
0.999972
3.510983
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2025-04-22T18:15: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": "bf270c68c40...
bf1b5b81-6b99-458e-b830-0c9d18830d99
duchnv-vn/data-structure-demo
ptit/class2-next-permutation-and-traversal-and-recursion-algorithm/2-generate-k-combinations-of-set-1-to-n.h
// Bai toan 2: Duyet to hop chap k cua 1,2...,n #include <iostream> using namespace std; #define K 3 #define N 5 void print_arr(const int arr[], const int size) { for (int i = 0; i < size; i++) { cout << arr[i] << " "; } cout << endl; } void next_combination(int arr[], const int k, const int n, b...
ALGO
0.999771
4.831175
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2024-10-12T12:38: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": "7a96ab434...
f852269a-3d4a-46d8-97fd-f61dc3caf1cd
srikanth762/DSA-course
Singly operatons.cpp
#include <iostream> using namespace std; class Node{ public: int data; Node* next; Node() { data=0; next=NULL; } }; class Linkedlist { private: Node* head; Node* rear; public: Linkedlist() { head=NULL; rear=NULL; } void inser...
ALGO
0.98965
3.965313
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-05-28T15:20:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e572376ba00f...
cd06d3a4-9db0-4062-af21-0bdada4b2aaf
jmsgrogan/MicrovesselChaste
src/simulation/flow/calculators/haematocrit/AlarconHaematocritSolver.hpp
/* Copyright (c) 2005-2017, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
ALGO
0.99329
6.849815
{ "github_metadata": { "branch": "master", "commit_count": 298, "repo_created_at": "2016-09-28T13:30:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 2, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "205ecea...
617fecda-e776-42d7-9c56-65deb6b82daf
KeiKeiZuihaoYa/Git-repository
vsc-c++/oj/luogu/P10426.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long typedef pair<int, int> P; const int inf = 0x3f3f3f3f << 1; const int N = 1e5 + 10; signed main() { ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); int n; cin >> n; vector<int> v(n); vector<vector<int>> c(N); for (auto &i : v)...
ALGO
0.999982
4.139139
{ "github_metadata": { "branch": "Second", "commit_count": 95, "repo_created_at": "2024-05-04T13:28:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12e0e3939...
eea5664f-19a7-48b7-931f-38fca1135163
tktj12/cpp-problem-solving
algospot-LAN/solution1.cpp
#include <iostream> #include <vector> #include <cstring> #include <cmath> #include <algorithm> using namespace std; class UnionFind { public: vector<int> parent, size; UnionFind(int n) : parent(n), size(n,1) { for (int i = 0; i < n; i++) parent[i] = i; } int Find(int u) { if (parent[u] == u) return u; el...
ALGO
0.999986
4.920599
{ "github_metadata": { "branch": "main", "commit_count": 446, "repo_created_at": "2023-06-15T09:54: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": "f28775f110...
ad9d322a-c0d0-49a8-93d7-fcc7bce6c716
yanjie1017/Kattis
closestsums.cpp
#include <iostream> #include <iomanip> #include <sstream> #include <cmath> #include <climits> #include <vector> #include <list> #include <queue> #include <stack> #include <unordered_set> #include <unordered_map> #include <set> #include <map> #include <algorithm> using namespace std; typedef long long ll; typedef long ...
ALGO
0.999893
3.652023
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2021-12-23T09:23: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": "d21cc6c1944...
51fcea38-351a-4285-bf53-5658adfe6359
Glastr1er/atharvd-CPTutoring
May-30-2023/1374D.cpp
/* Author: atharvd Date: May/30/2023 Problem: 1374D.cpp */ #include<iostream> #include<string> #include<map> #include<queue> #include<set> #include<stack> #include<vector> #include<algorithm> #include<functional> #include<numeric> #include<cmath> using namespace std; #define ain(a) for(int i=0;i<a.size();i++) cin >>...
ALGO
0.999917
3.629671
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2023-05-18T03:14: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": "b1c1105b901...
b47499de-fc7d-43b6-9bb0-1ccd1d189716
safal45/Adventofcode
Day1/part1/Day1.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; int main() { ifstream inputFile("input_1.txt"); int ans = 0; if (!inputFile.is_open()) { cerr << "Error opening the file!" << endl; return 1; } // Read inputs until the end of the file is reached ...
ALGO
0.999741
5.377283
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-12-09T21:24:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b7ae12ef80d...
9b03040e-2d5f-4c95-87ae-432e2882e1e6
ProteoWizard/pwiz
pwiz_tools/Bumbershoot/idpicker/Qonverter/waffles/GReinforcement.h
/* Copyright (C) 2006, <NAME> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. see http://www.gnu.org/copyleft/l...
ALGO
0.91993
7.287477
{ "github_metadata": { "branch": "master", "commit_count": 12477, "repo_created_at": "2018-03-12T21:16:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 277, "forks": 106, "issues": 87, "pull_requests": 34 }, "file_meta": { "content_id": "7...
be7d459a-f33f-4184-b52b-e294ca256372
hakank/hakank
gecode/set_covering4.cpp
/* Set partition, set covering in Gecode. Example from Lundgren, Rönnqvist, Värbrand "Optimeringslära", page 408. We want to minimize the cost of the alternatives which covers all the objects, i.e. all objects must be choosen. The requirement is than an object may be selected _exactly_ once. Altern...
ALGO
0.999844
6.703892
{ "github_metadata": { "branch": "master", "commit_count": 616, "repo_created_at": "2013-08-06T20:12:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 381, "forks": 78, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "82b51...
8663ca00-5203-459b-9a18-5934543b16d1
nasa/EMTG
src/Mission/Journey/Phase/ParallelShootingPhase/ParallelShootingConstraints/ParallelShootingStep_maneuver_constraint_factory.cpp
// EMTG: Evolutionary Mission Trajectory Generator // An open-source global optimization tool for preliminary mission design // Provided by NASA Goddard Space Flight Center // // Copyright (c) 2013 - 2024 United States Government as represented by the // Administrator of the National Aeronautics and Space Administratio...
ALGO
0.97681
5.234274
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2020-06-16T22:56:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 74, "forks": 17, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "edbb99b2...
2542eef9-db21-4adc-8e28-a2ec2ba42a11
jsouliss/DSA
NeetCode/03-LinkedLists/C++/SinglyLinkedList.cpp
#include <vector> #include <iostream> // // Created by Jerry on 6/10/2025. // class Node { public: int value; Node* next; Node(int val) : value(val), next(nullptr) {} }; class LinkedList { private: Node* head; Node* tail; public: // Initialize an empty list LinkedList() : head(nullptr),...
ALGO
0.999542
5.607996
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-04-10T18:03: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": "f1ed98f134d...
926aa188-6e80-4f4c-87c9-9d4d49905f67
c1uc/leetcode
daily/2698.find-the-punishment-number-of-an-integer.cpp
/* * @lc app=leetcode id=2698 lang=cpp * * [2698] Find the Punishment Number of an Integer */ // @lc code=start #include <bits/stdc++.h> using namespace std; class Solution { public: int punishmentNumber(int n) { int l[] = {1, 9, 10, 36, 45, 55, 82, 91, 99, 100, 235, 297, 369, 370, 379, 414, 657, 675,...
ALGO
0.999418
5.887427
{ "github_metadata": { "branch": "main", "commit_count": 216, "repo_created_at": "2025-01-20T12:32: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": "0cf0f0292a...
79b99436-2d39-4845-9a84-ff0be589a4cd
mmd18cury/timus_problems
1142 Отношения.cpp
#include <iostream> #include <vector> using namespace std; int fact(int a) { if (a == 0) return 0; int res = 1; for (int i = 1; i <= a; i++) { res *= i; } return res; } int main() { cin.sync_with_stdio(false); cin.tie(0); vector <vector <int>> StN(11, vector <int> (11)); vector <int> list; int ans, vv; S...
ALGO
0.999857
3.8611
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2022-03-12T19:54:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6907672c2...
ec907064-191e-4fa0-baa8-eaffddf1141c
SunXP/Risk-Game
A4/part 2/Project1/Project1/ConcreteStrategy3.cpp
#include <iostream> #include <time.h> #include <algorithm> #include "ConcreteStrategy3.h" using namespace std; ConcreteStrategy3::ConcreteStrategy3() { } ConcreteStrategy3::~ConcreteStrategy3() { } void ConcreteStrategy3::reinforce(Map* map, Player* player) { int x = map->getNumberOfCountries(*player); if (x <...
ALGO
0.980135
3.623268
{ "github_metadata": { "branch": "master", "commit_count": 242, "repo_created_at": "2018-09-12T02:48:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f4415a3...