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
c90f6162-b7cd-4719-8b9d-6e021bbce3c6
ishandutta2007/codeforces-r
receed/normal/831/D.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; int main(){ int n, k, p; cin >> n >> k >> p; vector<ll> a(n), b(k); for(int i = 0; i < n; i++) cin >> a[i]; for(int i = 0; i < k; i++) cin >> b[i]; sort(a.begin(), a.end()); sort(b.begin(), b.end()); ll...
ALGO
0.99992
3.85418
{ "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": "eba6e536488d...
5520773c-5a3c-4ad7-9270-1b854d56f382
JudyHsiao/codejam
leetcode/732.cpp
#include <memory> #include <algorithm> using namespace std; class MyCalendarThree { public: MyCalendarThree():max_count(0),root( new Node(0, 100000000, 0)) {} int book (int start, int end) { Add(start, end, root); return max_count; } ~MyCalendarThree(){ delete root; } privat...
ALGO
0.999975
5.452563
{ "github_metadata": { "branch": "master", "commit_count": 156, "repo_created_at": "2018-05-07T00:56:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2c4364d...
f197d85e-f4e0-4042-8ff4-457d85ffbbed
Vermillio/Prim-and-Kruskal-algos
task19/MinSpanningTree.cpp
#include "MinSpanningTree.h" #include <iostream> #include <vector> #include <set> #include <algorithm> #include <map> #include <iterator> #include <list> #include <string> #include <ctime> using namespace std; void MinSpanTree::MinSpanningTreeFinder::ErrorMessage(string _error) { cout << "Error: " << _error << end...
ALGO
0.994587
4.230033
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-12-22T01:12: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": "0f57d7e992...
14de2382-89ee-4d8d-aab4-b4a749ef4d93
TusharPandey14/code
LeetCode/Permutations_Approach1.cpp
#include<bits/stdc++.h> /* Approach: We have given the nums array, so we will declare an ans vector of vector that will store all the permutations also declare a data structure. Declare a map and initialize it to zero and call the recursive function Base condition: When the data structure’s size is equal to ...
ALGO
0.999992
6.238939
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-03-02T07:14: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": "c2e222f514e...
09c9c221-2961-4682-b045-10aa91a07b19
yogykwan/acm-challenge-workbook
src/poj3292.cpp
/* * POJ 3292: Semi-prime H-numbers * 题意:所有运算基于4n+1形数,定义其上的素数、合数,定义恰能写成2个素数相乘的合数为半素数。求不大于n的半素数个数。 * 类型:素数 * 算法:艾式筛法得到素有4n+1形素数表,同时将素数与合数的乘积作为非半素数的合数筛去。对每个n用upper_bound求范围内的半素数个数。 */ #include <iostream> #include <algorithm> #include <vector> #include <cstdio> using namespace std; const int MAXN = 250000; int p[...
ALGO
0.999674
4.322232
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2016-11-12T12:14:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1766, "forks": 340, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aae6...
eac01a1d-d89e-4597-9bfc-bca7b3784fd0
BLuBin7/MiniProjectOOP
EquationDraw/EquationDraw/Source.cpp
#include <iostream> #include <string> #include <vector> #include <GL/glut.h> // Base class: Point class Point { protected: double x; double y; double z; public: Point(double xCoord, double yCoord, double zCoord) : x(xCoord), y(yCoord), z(zCoord) {} double getX() const { return x; } ...
ALGO
0.974348
5.462715
{ "github_metadata": { "branch": "master", "commit_count": 154, "repo_created_at": "2023-04-02T11:59:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76ef6fd9...
f867f666-a120-45e5-b173-6a16de946252
PhelHilha/UFRJ---Linguagens-de-Programa-o
Avaliado 1/desempenho.cpp
//Classes //Definição das classes #include <iostream> #include <vector> #include <string> #include <random> #include <cstdlib> #include <ctime> #include "desempenho.h" using namespace std; //Classe que gerencia cada aluno //ALUNO Aluno::Aluno(int x){ periodos = x; inserirMat(); inserirPort(); inserirF...
TOOL
0.962423
4.001457
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-08-01T02:41: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": "12ac6385c8f2...
03274e58-773c-4384-93be-5c2ed386c785
www5sccs/hpvc
src/rotatingheatsource/RotatingHeatSource.cpp
#include <fstream> #include "rotatingheatsource/RotatingHeatSource.h" #include "peano/utils/Loop.h" #include "tarch/la/Vector.h" #include "tarch/parallel/Node.h" #include "rotatingheatsource/SinTrajectory.h" tarch::la::Vector<DIMENSIONS,double> rotatingheatsource::RotatingHeatSource::getDefaultDomainSize() { retur...
ALGO
0.954906
5.996435
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2013-04-23T08:53:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f57ed6c8a0...
6d457d30-512a-47d4-b4ce-9f64666b3be0
tyz-sd/leetcode
test.cpp
#include <vector> #include <iostream> #include <algorithm> #include <set> #include <map> #include <unordered_map> #include <string> using namespace std; int res = 0; int cmp(string a, string b){ int length_a = a.length(); int length_b = b.length(); if(length_a > length_b) return 1; else if(length_a < le...
ALGO
0.999551
3.744298
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-10-11T02:43: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": "3467dde69e0e...
96357bf5-7945-4379-829d-275eb124141b
squaresLab/BatFix
results/transcoder/translations/java/FIND_THE_MAXIMUM_ELEMENT_IN_AN_ARRAY_WHICH_IS_FIRST_INCREASING_AND_THEN_DECREASING_1.cpp
int findMaximum ( int arr [ ] , int low , int high ) { if ( low == high ) return arr [ low ] ; if ( ( high == low + 1 ) && arr [ low ] >= arr [ high ] ) return arr [ low ] ; if ( ( high == low + 1 ) && arr [ low ] < arr [ high ] ) return arr [ high ] ; int mid = ( low + high ) / 2 ; if ( arr [ mid ] > arr [ m...
ALGO
0.999983
5.305879
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-05-21T15:21:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ede34626948...
a394cb0b-1aae-4fcd-a32a-099ad64527f0
bellaabdelouahab/C-Language
longest_consecutive_subsequence.cpp
#include <stdio.h> #define MAX 100 int main() { printf("Start\n"); int list[] = {10, 11, 12, 13, 14, 20, 21, 22, 23, 24, 30, 31, 32, 33, 34, 40, 41, 42, 43, 44}; int size = sizeof(list) / sizeof(list[0]); printf("Your list is: ["); for (int i = 0; i < size; i++) { printf(" %d ", ...
ALGO
0.999573
3.568273
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-06-25T19:52:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2aef4dfb4e1...
3de9db5a-b9e0-481f-a0dc-ea7347d8ac43
kpagacz/software-engineering
metody-numeryczne/cwiczenia-11/test-rownowaznosci.cpp
#include <iostream> #include <vector> #include <numeric> #include "LCG.h" int main() { for (auto i : { 1, 7, 14, 23, 24, 79, 50, 101, 1010, 9 }) { LCG gen(i); std::vector<int> counts(10, 0); for (int i = 0; i < 10000; i++) { int rand = int(1000 * gen.random()); counts[rand / 100]++; } double n = 10...
TEST
0.949017
4.349003
{ "github_metadata": { "branch": "main", "commit_count": 377, "repo_created_at": "2019-10-09T10:30:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 13 }, "file_meta": { "content_id": "21d66b4f4...
fd98fac6-19a1-4756-9e49-82e853b9a734
ishandutta2007/codeforces-a
andreysergunin/normal/908/C.cpp
#include <iostream> #include <stdio.h> #include <cstring> #include <vector> #include <algorithm> #include <cstdlib> #include <cmath> #include <queue> #include <stack> #include <map> #include <set> #include <ctime> #include <cassert> #include <unordered_map> #include <fstream> #include <random> #include <cstring> #inclu...
ALGO
0.999708
3.684436
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bdd1d2eff4bd...
0cd8b253-4a18-486b-b8cb-6f4f94a48a58
prabowo02/toki-regular-open-contest
troc-18/troc-18-mex/spec.cpp
#include <bits/stdc++.h> #include <tcframe/spec.hpp> using namespace std; using namespace tcframe; const int MAXN = 1000; const int MAXA = 1000; mt19937 rng(71717); class ProblemSpec : public BaseProblemSpec { protected: int N; vector<int> A, ans; void InputFormat() { LINE(N); LINE(A % SIZE(N)); }...
ALGO
0.999875
3.92202
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-12-08T03:58:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6efaf9b44...
750f2abf-d0b2-47f5-bfc2-afdeff967c07
vermakriti/Leetcode
Array/ Product of Array Except Self/program.cpp
/* Company - Facebook,Amazon,Apple,Asana,Microsoft,Adobe,Expedia,Intel,Nvidia Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. The product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer. You must wri...
ALGO
0.999901
6.27336
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2021-08-30T13:20:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd16d0eed...
a6907a26-5ce6-44d9-a89b-2ae03cc0473a
Drum4life9/CSC_241
Homeworks/3.1-3.2/main.cpp
#include <iostream> #include <string> using std::string; using std::cin; using std::cout; using std::endl; int main(int, char**) { //3.4 cout << "Enter 2 strings: "; string s1, s2; cin >> s1 >> s2; cout << endl; if (s1 == s2) cout << "The strings are the same" << endl; else if (s1 > ...
TOOL
0.983838
3.393824
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-08-27T14:04:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6039379398d...
abac953b-6f74-4acb-983b-9067a3c61e0e
ishandutta2007/codeforces-nonalphabetic
.tx/normal/870/A.cpp
#include <bits/stdc++.h> #ifdef JLOCAL #include "stress.h" #endif using namespace std; #define rep(i, z, n) for (int i = (z); i < int(n); ++i) #define repr(i, n, z) for (int i = int(n) - 1; i >= (z); --i) #define shl(n) (1 << (n)) #define hbit(n, i) (((n) >> (i)) & 1) #define STRESS 0 using lint = long long; void so...
ALGO
0.999989
3.43118
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:49: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": "3075c3cc39f6...
709486fd-70bc-4053-8117-3ce4510946bd
mirtaba/ACMICPC-INOI_Archive
Camp/Complete search/UVa193.cpp
#include <bits/stdc++.h> #define X first #define Y second using namespace std; typedef long long LL; typedef pair <int, int> PII; const int Maxn = 100*1000 + 250; const int Mod = 1000 * 1000 * 1000 + 7; const int abMax = 1 << 29 ; const double EPS = 1e-9; const double PI = acos(-1.0); //ofstream fout ("greetings.ou...
ALGO
0.999967
4.007909
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-03-16T09:07:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "838a43e982...
56fa9ff4-0e96-492e-8fae-ba6645e90e3a
cueltschey/5G_dynamic_compression
lib/phy/upper/channel_modulation/neon_helpers.h
/* * * Copyright 2021-2024 Software Radio Systems Limited * * This file is part of srsRAN. * * srsRAN is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of * the License, or (at y...
ALGO
0.996243
7.395412
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2024-10-05T22:54:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59230ef9d9c...
a54251c2-94e9-44cb-8d8d-b2c5d19901e7
zwliew/competitive-programming
solutions/online-judge/12658.cc
#include <algorithm> #include <array> #include <bitset> #include <chrono> #include <climits> #include <cmath> #include <cstring> #include <deque> #include <ext/pb_ds/assoc_container.hpp> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include ...
ALGO
0.999801
4.905917
{ "github_metadata": { "branch": "master", "commit_count": 230, "repo_created_at": "2019-01-26T15:14:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "ba756614...
d194ccc3-cbaf-4dee-ad3a-920f2454aa92
ishandutta2007/codeforces-f
for_the_love/normal/353/C.cpp
#include <map> #include <cmath> #include <queue> #include <cstdio> #include <vector> #include <cstring> #include <sstream> #include <iostream> #include <algorithm> using namespace std; const int N = 111111; const int INF = 1e9 + 7; int n, f[N][2], a[N]; string s; int main(){ scanf("%d", &n); for (int i = 0; i <...
ALGO
0.999908
3.666308
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43: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": "48988a18c285...
12fd6b07-7a1a-44ec-9118-a72e629f8c4c
zhenl010/zhenl010
practice/StringSearch/StringSearch/main.cpp
////////////////////////////////////////////////////////////////////////// // Knuth–Morris–Pratt algorithm // BOYER-MOORE ALGORITHM // bitap algorithm (also known as the shift-or, shift-and or Baeza–Yates–Gonnet algorithm) ////////////////////////////////////////////////////////////////////////// #include <iostream> #i...
ALGO
0.999
4.731729
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2012-01-31T20:33:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e2246720...
229875d0-e67f-4d69-9857-ff67b6b52932
a-dev1/CP-Repo
challenges/Long June/Strong_Elements.cpp
#include <bits/stdc++.h> #define code_brains \ ; \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(0); using namespace std; typedef unsigned long long ull; typedef long long ll; typedef long double lld; const int MAX_N = 1e5 + 1...
ALGO
0.999967
4.516068
{ "github_metadata": { "branch": "main", "commit_count": 174, "repo_created_at": "2021-06-14T18:35:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c6c9abe98...
c4be8a02-2c7c-4950-8ad8-12d07c726c9d
sausax/computer_vision
shape_detection/src/shape_detection.cpp
//============================================================================ // Name : shape_detection.cpp //============================================================================ #include <iostream> #include <string> #include <opencv2/opencv.hpp> using namespace std; using namespace cv; void printSha...
TOOL
0.927373
4.582179
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-05-10T06:20: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": "d1c7fb24a7...
db623055-12f8-4dc3-8181-de54af43672f
praat/praat.github.io
dwsys/NUM2.cpp
/* NUM2.cpp * * Copyright (C) 1993-2025 <NAME>, <NAME> 2017,2020 * * This code 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 2 of the License, or (at * your option) any later version. ...
ALGO
0.999028
4.819175
{ "github_metadata": { "branch": "master", "commit_count": 9387, "repo_created_at": "2014-04-11T18:36:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1717, "forks": 256, "issues": 57, "pull_requests": 7 }, "file_meta": { "content_id": "00...
83f036f4-ec41-40b1-af0d-5cf6102ea5f2
jszhujun2010/LeetCode
PascalTri2/main.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: vector<int> getRow(int rowIndex) { if (rowIndex < 0) return {}; else if (rowIndex == 0) return {1}; else if (rowIndex == 1) return {1,1}; else { ...
ALGO
0.999978
5.38993
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-01-29T00:50: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": "e77465a562...
0c9bbace-5ef9-4c4d-810b-65f1fab557fc
alexandraback/datacollection
solutions_5670465267826688_1/C++/kleninz/C.cpp
#include <set> #include <map> #include <cmath> #include <stack> #include <queue> #include <string> #include <cstdio> #include <vector> #include <utility> #include <cstdlib> #include <iostream> #include <algorithm> #define INF 2e9 #define pb push_back #define mp make_pair #define forn(i,n) for (int i = 0; i < n; i++) u...
ALGO
0.999989
3.717
{ "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": "51e83ef2b...
349540b3-615c-4b3f-8bcd-80fe29bff9a7
khyojun/codingtest-java
백준/Gold/1197. 최소 스패닝 트리/최소 스패닝 트리.cc
#include <stdio.h> #pragma warning(disable:4996) #include <queue> #include <algorithm> using namespace std; #include <vector> int par[10101010]; struct Edge { int st; int to; int cost; Edge(int st, int to, int cost) : st(st), to(to), cost(cost) { } bool operator < (const Edge&other) const { return cost > other....
ALGO
0.999933
3.904123
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2024-11-25T13: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": "a53e3a503e0...
70d95831-b59b-4ef4-b98b-e1dff0d4cfe2
Kritika0804/Leetcode-daily-practice
Reverse First K elements of Queue - GFG/reverse-first-k-elements-of-queue.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; queue<int> modifyQueue(queue<int> q, int k); int main() { int t; cin >> t; while (t-- > 0) { int n, k; cin >> n >> k; queue<int> q; while (n-- > 0) { int a; ...
ALGO
0.999756
5.670564
{ "github_metadata": { "branch": "main", "commit_count": 429, "repo_created_at": "2022-07-17T09:11: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": "75ecbfb33a...
e4edfd1a-c800-4454-9e9a-2a9b96558767
raincross7/code-similarity
codes/train_code/problem273/problem273_117.cpp
#include<bits/stdc++.h> using namespace std; #define ms(x,y) memset(x, y, sizeof(x)) #define lowbit(x) ((x)&(-x)) #define sqr(x) ((x)*(x)) typedef long long LL; typedef pair<int,int> pii; typedef pair<LL,LL> pll; void run_case() { int n, d, a; cin >> n >> d >> a; vector<pii> m(n); for(auto &x: m) cin ...
ALGO
0.999637
3.703842
{ "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": "35c391796d06...
c86a8b6f-cbad-40ee-920b-6ac699b7633b
TodorokiKohei/atcoder
2022_09/17/d.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for(int i = n-1; i >= 0; i--) #define all(x) (x).begin(),(x).end() // 昇順ソート #define rall(v) (v).rbegin(), (v).rend() // 降順ソート #define FastIO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0) #d...
ALGO
0.999845
3.992171
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-11-25T17:10: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": "ff06fa2d805...
a1ab25b3-98dc-4e6a-b078-16d52ab028b3
temmie-950807/code
contest/中文賽區/TPR/TPR #28/E_觀光花園_Garden.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") #pragma comment(linker, "/STACK:1024000000,1024000000") #define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) #define ...
ALGO
0.99965
4.614197
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2022-03-14T14:01:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee40dd3322c...
2f842b41-d729-4c4a-8e97-663741f8a5ea
gajjarvatsall/DSA-VG
Linked List/LinkedList Practice/138_copy_list_random.cpp
#include<bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node *random; Node(int val) { this->val = val; this->next = NULL; this->random = NULL; } }; class Solution { public: Node* copyRandomList(Node* head) { if (head == nullptr) ...
ALGO
0.99661
4.513853
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2024-07-27T08:23: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": "02239ddbb80...
9eb3aea7-3ef4-42a5-b87b-7d155c0d250c
atom9006/Competitive_Programming
Google Code Jam/GCJ2022/Qualification Round 2021/Punched_Cards.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef unsigned long long int ull; typedef long double ld; //%Lf #define MOD 1000000007 int main(void) { int t, tt; cin >> t; for (tt = 1; tt <= t; tt++) { int r, c, i, j; cin >> r >> c; char a[105][105]; memset(a, '.', si...
ALGO
0.999541
3.452787
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-04-03T13:09: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": "96e97d1aa5f...
9d765090-9b1f-43b8-8397-c4c46a66a59b
koosaga/olympiad
ICPC/WF/wf2021_c.cpp
#include <bits/stdc++.h> using namespace std; using lint = long long; using pi = array<lint, 2>; #define sz(a) ((int)(a).size()) #define all(a) (a).begin(), (a).end() lint powExceed(lint q, lint n, lint m) { if (q <= 1) n = min(n, 2ll); lint z = 1; for (int i = 0; i < n; i++) { z *= q; if (z > m) return 1;...
ALGO
0.999985
3.620738
{ "github_metadata": { "branch": "master", "commit_count": 361, "repo_created_at": "2015-11-06T16:01:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 285, "forks": 31, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2eed1...
070ce220-2ced-426e-91d0-b3578095573c
jay16213/UVA-practice
Volume_100(10000-10099)/10018.cpp
#include <iostream> #include <cstdlib> #include <sstream> #include <cstring> #include <string> #include <cstdio> using namespace std; long long int reverse(long long int num) { long long int r_num = 0; while(num > 0) { r_num = (r_num * 10) + num % 10; num /= 10; } return r_num;...
ALGO
0.999931
3.762853
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-03-14T12:31:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d103f2a6f...
8aa225a2-b841-4ab3-ad64-e6f4a3645cc4
winnygold/cpluspractise
string_exercise/greetings.cpp
// // main.cpp // cpp_practise // // Created by pravin on 26/06/21. // /* Please enter your first name: Pravin ****************** * * * Hello, pravin! * * * ****************** */ #include <iostream> #include <string> int main() { // Get the name using the standard inpu...
TOOL
0.938298
3.784604
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-06-21T16:58: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": "8eb8824c13b...
53cba546-8ae4-40d3-a5d6-3c8be9898be3
LamSieuNguyen/Processed-Scheduler
Process Scheduler/simulate.cc
#include "Scheduler.h" #include "Process.h" #include <iostream> #include <chrono> using namespace std; double* simulate(Scheduler* sched, int numCPUBound, int numIOBound, int numCycles) { ArrayList<Process*> cpuProcs; // makes a new process for(int i = 0; i < numCPUBound; i++) // loops through the numCPUBound ...
ALGO
0.954789
3.678024
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-02-16T20:37: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": "b2db73e58b...
cec1edb0-9899-4c1c-a7d3-b4919adc4923
johanvdw/saga-debian
src/modules/imagery/imagery_vigra/vigra_smoothing.cpp
/********************************************************** * Version $Id: vigra_smoothing.cpp 1921 2014-01-09 10:24:11Z oconrad $ *********************************************************/ /////////////////////////////////////////////////////////// // // // ...
ALGO
0.995532
6.662757
{ "github_metadata": { "branch": "master", "commit_count": 198, "repo_created_at": "2014-08-13T20:54:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1798c378...
8f58321e-ec0c-4468-8cde-9e5a3478ba0b
hydrogendeuteride/BVH
include/util/MortonCode.h
#ifndef BVH2_MORTONCODE_H #define BVH2_MORTONCODE_H #include <cstdint> #include <algorithm> template<typename MortonCodeType> struct MortonPrimitive { uint32_t primitiveIndex; MortonCodeType mortonCode; bool operator==(const MortonPrimitive &other) const { return primitiveIndex == other.primi...
ALGO
0.996987
7.380104
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2025-03-23T15:28:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5cd802c2c...
e841351c-aa9f-4f82-8848-b340f5c360d5
haoel/leetcode
algorithms/cpp/moveZeroes/moveZeroes.cpp
// Source : https://leetcode.com/problems/move-zeroes/ // Author : <NAME>, <NAME> // Date : 2015-10-21 /*************************************************************************************** * * Given an array nums, write a function to move all 0's to the end of it while * maintaining the relative order of the...
ALGO
0.999975
6.208604
{ "github_metadata": { "branch": "master", "commit_count": 788, "repo_created_at": "2014-10-20T03:22:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17857, "forks": 4931, "issues": 26, "pull_requests": 28 }, "file_meta": { "content_id": ...
2d933f70-4130-43e4-adac-517f9ea61633
lewns2/BOJ
백준/Gold/1208. 부분수열의 합 2/부분수열의 합 2.cc
#include<bits/stdc++.h> using namespace std; #define ll long long #define INFL 1e18 #define INF 1e9 const int mxN = 44; ll n, s, ans=0; vector<int> a, b; void solve() { vector<ll> suba, subb; for(int i=1; i<(1<<a.size()); i++) { ll tmp = 0; for(int j=0; j<a.size(); j++) { ...
ALGO
0.999991
3.880371
{ "github_metadata": { "branch": "master", "commit_count": 210, "repo_created_at": "2022-06-18T17:44: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": "5b1cce7e...
f07e702d-6f22-43bd-b194-d150020b7359
kreuzerkrieg/CPPJunk
adler32/CRC32SIMD.cpp
#include "Crc32.h" #include <eve/algo/for_each.hpp> #include <eve/algo/transform.hpp> #include <eve/eve.hpp> #include <eve/function/scan.hpp> #include <eve/views/convert.hpp> #include <eve/views/zip.hpp> #include <span> /*namespace CRC32::Intrinsic { const __m128i xmm_fold4 = _mm_set_epi32(0x00000001, 0x54442bd4, 0x00...
ALGO
0.999793
6.726676
{ "github_metadata": { "branch": "master", "commit_count": 106, "repo_created_at": "2011-06-04T15:09:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57c03a81...
49193717-7c44-499e-81de-39114a08efb4
wotsushi/competitive-programming
codeforces/641_div2/c.cpp
#pragma region template 2.4 #include <bits/stdc++.h> using namespace std; template <typename T> using pq_asc = priority_queue<T, vector<T>, greater<T>>; typedef long long ll; typedef vector<ll> vi; typedef vector<vi> vvi; typedef pair<ll, ll> ii; typedef vector<ii> vii; typedef vector<string> vs; #define REP(i, n) for ...
ALGO
0.999997
5.370588
{ "github_metadata": { "branch": "master", "commit_count": 1520, "repo_created_at": "2019-03-11T13:08:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec45b88...
dc03fe72-0aed-44ad-a879-8c29d7bb9c99
salomeaufrecht/hydro_src_BA
detect_rivers_example.cc
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- // vi: set et ts=4 sw=2 sts=2: /*************************************/ /* This example solves surface flow in the vicinity of Heidelberg with 30m resolution and constant rainfall. Uses structured mesh and finite volume method. */ /***************...
ALGO
0.932346
4.126362
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2024-12-06T09:14: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": "0b3d41d35...
e13d1463-d794-4d71-ba94-481b54920368
chogahui05/algorithm
heap_sort.cpp
#include <stdio.h> #include <stdlib.h> struct int_Heap { int *heap,heap_sz; const int inf = 2147483647; void init(int n) { if(heap!=NULL) free(heap); heap = (int *)malloc(sizeof(int)*(2*n+10)); for(int i=0;i<(2*n+10);i++) heap[i] = inf; heap_sz = 0...
ALGO
0.999894
3.657025
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-10-13T15:18:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2c58299a5...
f300b0f4-cb9c-4575-b4ae-94c5b3efa9eb
xenron/sandbox-github-clone
baidu/Paddle/paddle/gserver/layers/LstmCompute.cpp
/* Copyright (c) 2016 Baidu, Inc. All Rights Reserve. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to ...
DATA
0.986954
7.094657
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2016-08-18T00:29:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 5, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "aa8e74e91...
166fdb75-f06a-4b94-9a5f-a906b7192e2c
C-Rio/Cryptographie
TP1(S-DES)/main.cpp
#include "permutation.h" bitset<8> fk(bitset<8>, bitset<8>); bitset<8> encryption(bitset<10>, bitset<8>); bitset<8> decryption(bitset<10>, bitset<8>); void key_generation(bitset<10>, bitset<8> &, bitset<8> &); // Permet d'afficher les bits d'un <bitset> #define print_bits(text, bits) \ { ...
ALGO
0.999853
4.285058
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-04-04T21:34:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "af97ec1d5b...
f2327be5-e3ef-4706-9d41-4d06fd0ed136
DevNulPavel/OpenCL_Examples
OpenCL_Books_CodeTest/RavishekharBanger/Code/chapter-9/jpeg_decoder/Framewave.cpp
/* This file is a work derived from the Open Source library, Framewave * http://framewave.sourceforge.net/ * All the function definitions and declarartions are derived from the files located at * http://sourceforge.net/p/framewave/code/HEAD/tree/trunk/Framewave/domain/fwJPEG/ * Below is the licence information.*...
ALGO
0.998433
5.370662
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2018-02-06T11:12:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72f9a32ac...
986a0237-2f92-4577-9e94-6ac492af5a34
benjaminhuanghuang/ben-leetcode
0679_24_Game/solution.cpp
/* 679. 24 Game Level: Hard https://leetcode.com/problems/24-game */ #include <iostream> #include <vector> #include <string> #include <stack> #include <queue> #include <unordered_map> #include <unordered_set> #include <numeric> #include <algorithm> #include "common/ListNode.h" #include "common/TreeNode.h" using nam...
ALGO
0.995173
5.785486
{ "github_metadata": { "branch": "master", "commit_count": 380, "repo_created_at": "2020-01-26T01:12:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc059a51...
46568e35-360e-40db-97da-8fc4f129d3ca
sugimotoyuuki/kyopro
paiza/B054.cpp
#include <bits/stdc++.h> using namespace std; int main() { // input ifstream in("B054.txt"); cin.rdbuf(in.rdbuf()); string A, B; cin >> A >> B; vector<char> s = {'A', 'B', 'C', 'D', 'E'}; vector<long long> tA, tB; for (int i = 0; i < A.length(); ++i) { tA.push_back((int)A[i] - 65); } for (int i =...
ALGO
0.999998
4.229997
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2023-02-25T05:54:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96561066ec2...
1ffb7858-4572-4d03-a0ba-1b584ff6f4b8
DILET1/usacoarchive
USACO training problems/Section 1.2/beads.cpp
/* ID: ethanhp1 TASK: beads LANG: C++14 */ #include <iostream> #include <string> #include <fstream> #include <vector> using namespace std; int main() { ofstream of ("beads.out"); ifstream inf ("beads.in"); int num; inf >> num; string beads; inf >> beads; string twice = beads; bool is_red = false; boo...
ALGO
0.999874
4.059407
{ "github_metadata": { "branch": "main", "commit_count": 250, "repo_created_at": "2022-01-28T18:13: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": "1e6a22ece5...
d84e8259-3b89-4fcb-bef4-ed3540620984
thienpm92/Meshgrid_warping
main.cpp
//#include <QCoreApplication> #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <opencv2/video/tracking.hpp> #include "iostream" #include "meshflow.h" using namespace std; int main() { string link = "/media/eric/DATA/SSU research/Data set/vide...
ALGO
0.99239
4.158768
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-04-25T15:46:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e27174adb445...
a06794e7-987b-45ca-a7e3-cb6cbfccc789
dreyus95/AVSP_SourceQualityPrediction
CodeJamCrawler/dataset/11_23322_52.cpp
#include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <ctime> #include <cassert> #include <cctype> #include <vector> #include <list> #include <set> #include <map> #include <queue> #include <deque> #include <stack> #include <string> #include <algorithm> #include <numeric> #include <functional...
ALGO
0.999916
4.024179
{ "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": "0aaa02f81...
6f01d758-4f0d-45ea-89d6-923b07fbcf3a
Nicolas14142/Particle-Swarm-Optimization-Library
PSO_dll/Space.h
#pragma once #ifndef __Space #define __Space #include "Particle.h" class Space { public: int n_particles; double target; int Pbest = 0; double gbest_value; double gbest_position[2]; double dest[2]; double new_velocity[2]; double velocity_max = 50; double fitness_candidate, best_fitness_candidate; double r...
ALGO
0.999137
4.743241
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-08-07T01:06:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2054830513...
52a8714f-98ed-492b-8beb-8328036699e9
raphaelleveque/usp
TerceiroSemestre/grafos/ex4/main.cpp
#include<bits/stdc++.h> using namespace std; class Graph { int V; // adj[0] -> first = vertex, second = weight vector<vector<pair<int, int>>> adj; int Graph::minDistance(vector<int> dist, vector<bool> sptSet); public: Graph(int V); void addEdge(int v, int w, int weight); vec...
ALGO
0.999963
4.659453
{ "github_metadata": { "branch": "main", "commit_count": 268, "repo_created_at": "2021-05-10T20:01:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd69033261...
cf42292b-933f-489c-a0d5-b2e25f211824
chenhongqiao/USACO20DEC
rpasture/rpasture.cpp
#include <bits/stdc++.h> using namespace std; vector<pair<int, int>> p; int g[2505][2505]; int sum[2505][2505]; bool cmp(pair<int, int> a, pair<int, int> b) { return a.second < b.second; } int main() { int n; cin >> n; for (int i = 0; i < n; i++) { int x, y; cin >> x >> y; p....
ALGO
0.999872
3.982713
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-01-06T19:59: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": "a211049673...
c98fa287-fb49-4ca0-858e-b81f9efafda9
UBCHREST/ablate
src/finiteElement/finiteElementSolver.hpp
#ifndef ABLATELIBRARY_FINITEELEMENTSOLVER_HPP #define ABLATELIBRARY_FINITEELEMENTSOLVER_HPP #include <solver/timeStepper.hpp> #include <string> #include <vector> #include "boundaryConditions/boundaryCondition.hpp" #include "eos/eos.hpp" #include "mathFunctions/fieldFunction.hpp" #include "solver/solver.hpp" namespace...
TOOL
0.933141
5.819485
{ "github_metadata": { "branch": "main", "commit_count": 355, "repo_created_at": "2020-11-30T21:41:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 35, "issues": 28, "pull_requests": 1 }, "file_meta": { "content_id": "fd7c3b4b...
2f78a6d9-53de-4eb1-8c4b-5c8351155b41
tiggerbob/PWSH-Comp.-Club-Problems-24-25
Picky Potatoes/Picky Potatoes.cpp
// prefix & suffix sums (kadane's algorithm) #include <bits/stdc++.h> #define ll long long using namespace std; bool solve() { int N; cin >> N; vector <long long> s; s.resize(N); for (auto &i : s) cin >> i; ll sum = 0; for (int i = 0; i < N; i++){ sum += s[i]; if (sum <= 0) retur...
ALGO
0.973716
4.155942
{ "github_metadata": { "branch": "main", "commit_count": 369, "repo_created_at": "2024-08-08T21:49:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d40509ecc...
a1e04bc0-8082-4d48-9f80-331bd840006c
GeorgiyX/TP-Graph-Realizations
src/SetGraph.cpp
#include <cassert> #include "SetGraph.h" void SetGraph::addEdge(int from, int to) { assert(from < _verticesCount && to < _verticesCount); _graph[from].insert(to); } int SetGraph::verticesCount() const { return _verticesCount; } std::vector<int> SetGraph::getNextVertices(int vertex) const { assert(ver...
ALGO
0.925666
5.482692
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-06-04T17:10: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": "e5305eec5f...
0d4b8b1b-62a8-4cd5-8180-45ee3f04d168
ahay/src
user/fomels/Mpermlr3.cc
// Lowrank decomposition for 2-D prestack exploding reflector in V(x,z) // Copyright (C) 2010 University of Texas at Austin // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; eithe...
ALGO
0.999716
3.483723
{ "github_metadata": { "branch": "master", "commit_count": 15821, "repo_created_at": "2015-07-26T15:48:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 297, "forks": 177, "issues": 70, "pull_requests": 0 }, "file_meta": { "content_id": "01...
5c70428f-bd74-4d5f-8e7f-25d61cc59335
nikhilhore/cpp
GridTraversalDynamicProg.cpp
#include <iostream> using namespace std; // Top-down approach int numofways1(int r, int c){ if (r==0 || c==0) return 0; if (r==1 || c==1) return 1; return numofways1(r-1, c)+numofways1(r, c-1); } // Memoization long long memogrid[31][31]; long numofways2(int r, int c){ if (memogrid[r][c]) return memog...
ALGO
0.999958
5.177441
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2021-07-20T15:39: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": "4bbea802e...
78fa5e20-3447-4d93-a87b-76969f622777
minchurl/PS
kaist-run/24spring/D.cpp
#include<bits/stdc++.h> #define pb push_back #define fi first #define se second #define all(v) (v).begin(), (v).end() using namespace std; typedef long long LL; typedef pair<int, int> pii; typedef pair<LL, LL> pll; const int MAXN = 100005; const int inf = 0x3fffffff; int n, m, k; int ldp[MAXN],rdp[MAXN]; int c[MAXN]; i...
ALGO
0.999999
4.02078
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-01-22T09:02:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb9e52ced...
308a28c8-495a-405b-9308-54416a0de812
build-week/hover-jet
control/jet_vane_mapper.cc
#include "control/jet_vane_mapper.hh" #include "third_party/experiments/numerics/group_diff.hh" namespace jet { namespace control { Wrench JetVaneMapper::wrench_for_status(const QuadraframeStatus& qframe_status, const JetStatus& current_jet_status) const { return total_wrenc...
ALGO
0.998742
6.670324
{ "github_metadata": { "branch": "master", "commit_count": 357, "repo_created_at": "2018-11-10T21:32:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9, "forks": 7, "issues": 0, "pull_requests": 12 }, "file_meta": { "content_id": "7c8bda81...
06eff1bb-c935-40e4-8013-b09664b9cc1b
yliu-cs/ACM
HDU/HDU-2008.cpp
#include <bits/stdc++.h> using namespace std; #define mem(a,b) memset(a,b,sizeof(a)) #define pb push_back #define mp make_pair typedef long long ll; typedef unsigned long long ull; typedef pair<int,int> P; const int INF = 0x3f3f3f3f; const int maxn = 20; const int mod = 1e9+7; const double eps = 1e-8; const double pi =...
ALGO
0.998056
3.229495
{ "github_metadata": { "branch": "master", "commit_count": 442, "repo_created_at": "2018-10-03T10:47:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2bede66...
3b11f64f-0553-4268-b935-109e03b9cf78
ferzik85/kernel_trackers
kcf/kcf/KCFTracker.h
#pragma once #include <fftw3.h> namespace kcf { // correlation tracker namespace class kcf_tracker { public: kcf_tracker(float _padding = 1.5f, float _output_sigma_factor = 0.1f, float _kernel_sigma = 0.5f, //float _kernel_sigma = 0.2f, float _scale_sigma_factor = 0.25f, float _lambda = 0.0001f, floa...
ALGO
0.980621
5.549827
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-06-08T09:21:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a159f299fb...
ab4ee2c9-674d-495e-9b6f-8a9e50134a8d
Mr-Phoebe/ACM-ICPC
OJ/CodeForces/Coder-Strike 2014 - Finals (online edition, Div. 1) C.cpp
#include <algorithm> #include <iostream> #include <iomanip> #include <cstring> #include <climits> #include <complex> #include <fstream> #include <cassert> #include <cstdio> #include <bitset> #include <vector> #include <deque> #include <queue> #include <stack> #include <ctime> #include <set> #include <map> #include <cma...
ALGO
0.999894
3.881696
{ "github_metadata": { "branch": "master", "commit_count": 421, "repo_created_at": "2015-11-16T08:47:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "22d2b1d...
5632dba8-54ff-4d4d-b512-6c27051702da
shaihitdin/CP
Olymp/CF/416/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 110; int n, m; char a[N][N]; int sw[2]; int x, y; int dx[] = {0, 0, -1, +1}; int dy[] = {-1, +1, 0, 0}; int d[N][N]; inline pair <int, int> make_move (char q) { if (q == 'R' || q == 'L') { if (sw[0]) q = (q == 'R') ? 'L' :...
ALGO
0.999991
3.244375
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-01-22T16:38: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": "66a571fc2...
91cd412c-dd83-4f45-bf80-83462e8da4e5
wilsong555/GRUPO-18-PDS2-24-1
src/Lig4.cpp
#include "../include/Lig4.hpp" #include "../include/Jogo.hpp" #include <iostream> using namespace std; bool Lig4::empate() const { for (int i = 0; i < this->get_linhas(); i++) { for (int c = 0; c < this->get_colunas(); c++) { if (this->getvalor_matriz(i, c) == " "){ return fals...
ALGO
0.934038
4.490174
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2024-06-27T17:07:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08819f5bdcc...
f6a05562-c7db-4630-bac8-c46f6cd663b0
RafikFarhad/Code_is_fun
UVA/12114.cpp
/// <NAME> /// fb.com/rafikfarhad /// SUST_CSE_13 #include <cstdio> #include <iostream> #include <string> #include <cstring> #include <cmath> #include <algorithm> #include <new> #include <vector> #include <stack> #include <queue> #include <map> #define PI 2*acos(0) using namespace std; //template <class T> void MyDebu...
ALGO
0.995134
3.159252
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2015-11-19T16:02: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": "354153f47...
2bb67818-6485-4e13-9ce7-fce445723b01
serafimalex/sorting-algorithms
timsort/main.cpp
#include <iostream> #include <algorithm> #include <vector> #include <fstream> #include <chrono> #include <random> using namespace std; ifstream fin("teste.txt"); const int segment = 64; void test_sortare(vector<int> &v, int n){ bool sorted = true; for (int i = 0; i < n-1; ++i){ if (v[i] > v[i+1]){ ...
ALGO
0.999741
4.632189
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-03-14T21:12:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aac0e7a0e4...
f1029362-837d-40ef-965e-f8cf50088030
hiking90/aidl-cpp
io_delegate.h
/* * Copyright (C) 2015, The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
TOOL
0.909959
7.366037
{ "github_metadata": { "branch": "master", "commit_count": 676, "repo_created_at": "2016-08-17T04:40:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 11, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "941426...
98a15a4e-2390-427f-9f80-b228d6726b84
arangodb/arangodb
3rdParty/boost/1.78.0/libs/math/example/binomial_sample_sizes.cpp
// Copyright <NAME> 2006 // Copyright <NAME> 2010 // Use, modification and distribution are subject to 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) #ifdef _MSC_VER # pragma warning(disable: 4512) // assignment operator could...
ALGO
0.986777
5.949648
{ "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": ...
21f31804-aac2-4989-bd68-2aea497b5cb3
HhTtLllL/algorithm
cf/481-3.cpp
#include<stdio.h> #include<algorithm> using namespace std; int a[1005]; int b[1005]; int main( ) { int n,w; int sum = 0; int temp = 0; int as = 0; scanf( "%d%d",&n,&w); for( int i = 1;i <= n;i++) scanf( "%d",&a[i]); for( int i = 1;i <= n;i++) { temp += a[i]; b[i] = temp; } sort(b+1,b+n+1); for(int i = ...
ALGO
0.999996
3.047809
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2019-08-21T10:40:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ed7803a...
bf550757-8940-4f6f-be4a-6700d7a19796
JeffLegendPower/cp-codes
usaco/HILO/Problem_2_HILO.cpp
// https://usaco.org/index.php?page=viewproblem2&cpid=1162&lang=en #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; #define ll long long #define plli pair<ll, int> #define pll pair<ll, ll> #define pii pair<int, int...
ALGO
0.99997
3.852793
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-08T20:27: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": "5d77a834e25c...
b9888a29-1ca0-46e2-8473-e78a4ceb1a4c
Wsh7Ash/LEETCODE
cpp/c0-500/101-150/maxProfit-3.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: int maxProfit(vector<int>& prices) { int n = prices.size(); if (n == 0) return 0; // Arrays to hold maximum profit for 1st and 2nd transactions vector<int> profit1(n, 0); // pr...
ALGO
0.999981
6.759068
{ "github_metadata": { "branch": "master", "commit_count": 365, "repo_created_at": "2025-03-26T15:51: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": "c8d9f8ab...
b46c6def-cb9d-47fc-8b29-b9dc5429b66f
SinghTushar20/CPP_Programs
Binary Search/6_Number_k_rotated_sorted_array.cpp
// The array was sorted and then it is rotated with some value k // Find the value of k by which the array is rotated // LOGIC: for example the array is {3, 3, 5, 6, 78, 98, 103, 548}; //After rotation the array will become {98, 103, 548, 3, 3, 5, 6}; // The first occurrence of the minimum value will give the result...
ALGO
0.999994
5.282905
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-08-03T19:06:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f32fa25c6...
905e3357-b663-4569-acd6-fa4a5c723d3b
saumya81/DSA
graph/numberOfIsland.cpp
// Given an m x n 2D binary grid grid which represents a map of '1's (land) and '0's (water), return the number of islands. // An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. // You may assume all four edges of the grid are all surrounded by water. class Solut...
ALGO
0.999954
5.769113
{ "github_metadata": { "branch": "main", "commit_count": 155, "repo_created_at": "2021-05-27T16:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68046a0f1b...
074ba65d-8f46-4813-9d38-24df273bd3b2
JJ-Dynamite/react-native-dev-cli
.venv_3.12/lib/python3.12/site-packages/mlx/include/mlx/backend/metal/kernels/binary_two.h
// Copyright © 2024 Apple Inc. template <typename T, typename U, typename Op> [[kernel]] void binary_ss( device const T* a, device const T* b, device U* c, device U* d, uint index [[thread_position_in_grid]]) { auto out = Op()(a[0], b[0]); c[index] = out[0]; d[index] = out[1]; } template <ty...
ALGO
0.991499
7.054013
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2024-09-23T09:25: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": "b291fd93e75...
ef9bf44e-014d-4296-bbf1-9893f1076c53
ZYLZhuPP/OI
YYOJ/2672.cpp
#include<bits/stdc++.h> using namespace std; #define pb push_back #define rFor(i, r, l) for (int i = (r); i >= (l); --i) #define For(i, l, r) for (int i = (l); i <= (r); ++i) const int N = 5e4 + 5; struct IO { char c; int f; #define gc() getchar() template<class C> inline IO& operator >> (C &x) { ...
ALGO
0.999973
3.589796
{ "github_metadata": { "branch": "ZYLZPP", "commit_count": 115, "repo_created_at": "2024-09-18T03:26: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": "e3c6a690...
e7642061-860d-4f4e-9fa5-ad7f4012df94
mdschott/Bloom-Filter
Main.cpp
/*************************************************************** <NAME> Main.cpp Program 4 Runs loops that add elements to the BloomFilter, check for elements outside the range of previously added elements being found, and increasing the number of elements to be added. Outputs all of the calculated data. *************...
ALGO
0.960259
5.057905
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-03-13T20:12:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a20b934471...
5a61901f-3543-4c88-b082-b5fe4643d861
sarnapiotr/MetodyProgramowania
L12/L12.cpp
#include <iostream> #include <vector> #include <fstream> std::vector<int> getPrimeFactors(int number) { int temp = 2; std::vector<int> primeFactors; while (number != 1) { if (number % temp == 0) { number /= temp; primeFactors.push_back(temp); } else { ...
ALGO
0.99794
4.533295
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2025-03-01T16:07: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": "ea5d9e130b7...
930fdeb3-5455-4afb-a801-8c1652d94081
lucasxia01/Competitive-Programming-Problems
Codeforces/CF 854/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; #define F0R(i,n) for (int i = 0; i < n; i++) #define FOR(i,a,b) for (int i = ...
ALGO
0.999962
4.455347
{ "github_metadata": { "branch": "master", "commit_count": 227, "repo_created_at": "2018-10-14T07:51:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc9e2754...
c2557685-3f02-4cf2-9473-6cff75333b92
hlgzx/PAT-Basic-Level-Practice
1054求平均值.cpp
// 1054 求平均值 (20 分) // 本题的基本要求非常简单:给定 N 个实数,计算它们的平均值。但复杂的是有些输入数据可能是非法的。一个“合法”的输入是 [−1000,1000] 区间内的实数,并且最多精确到小数点后 2 位。当你计算平均值的时候,不能把那些非法的数据算在内。 // 输入格式: // 输入第一行给出正整数 N(≤100)。随后一行给出 N 个实数,数字间以一个空格分隔。 // 输出格式: // 对每个非法输入,在一行中输出 ERROR: X is not a legal number,其中 X 是输入。最后在一行中输出结果:The average of K numbers is Y,其中 K 是合法输入...
ALGO
0.988319
3.911672
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2018-11-06T03:40: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": "87c9e79d3...
3dae4858-eeeb-431e-8d96-477643077cb9
sangyong-99/algorithm_study
algorithm_study/baekjoon/백트래킹/1182.cpp
// // 1182.cpp // algorithm_study // // Created by 신상용 on 8/24/24. // #include <bits/stdc++.h> using namespace std; int N, M, S, temp, result; vector<int> datas; int arr[25]; void input_data() { cin >> N >> S; for(int i = 0; i < N; i++) { cin >> temp; datas.push_back(temp); } } void f...
ALGO
0.999943
3.984831
{ "github_metadata": { "branch": "main", "commit_count": 217, "repo_created_at": "2023-04-22T01:44:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc49479f1f...
29a736d4-dfb8-4547-8dab-deaaf79ccdce
AyushMaheshwari2002/LeetCode
0141. Linked List Cycle.cpp
/* Given head, the head of a linked list, determine if the linked list has a cycle in it. Return true if there is a cycle in the linked list. Otherwise, return false. Example 1: Input: head = [3,2,0,-4], pos = 1 Output: true Explanation: There is a cycle in the li...
ALGO
0.999958
5.551072
{ "github_metadata": { "branch": "main", "commit_count": 1346, "repo_created_at": "2022-01-15T03:47: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": "193646eac...
d144324a-eed5-42d2-865f-0d4829041953
mahirshahriar1/Competitive_Programming
OJ_Submissions/UVa/C++/10026 - Shoemaker's Problem.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define fastio ios_base::sync_with_stdio(false), cin.tie(nullptr); #define pi acos(-1) #define takeInput(v) for(auto& x:v) cin>>x; #define print(v) for(auto x:v) cout<<x<<' '; cout<<endl; #define range(v) v.begin(),v.end() typedef long long int ll; cons...
ALGO
0.999906
4.11624
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2023-07-30T19:17:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7245fafe436...
13db09a8-c2cf-4f52-8cdd-a14714d618f8
AlexHarn/computational-physics-homework
B01/A2/main.cpp
/* ----------------------------------------------------------------------------- * Computational Physics 2016 Blatt 01 Aufgabe 1: Drehmomente * !!! C++11 Standard !!! * ----------------------------------------------------------------------------- * 3 verschiedene ...
ALGO
0.999975
5.563715
{ "github_metadata": { "branch": "master", "commit_count": 150, "repo_created_at": "2018-04-27T07:09: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": "0333be49...
de7cc0d2-85e3-4cca-84ec-d0b5ed68e516
DominikKwiatkowski/meanDistance
meanDistance/meanDistance.cpp
// meanDistance.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <stdio.h> long long int pot(int x, int y) { for (int i = 1; i < y; i++) { x *= x; } return x; } int main() { int ilosc; int wymiar, l, przeniesienia, pionek; long long int srednia=0; scanf_s("%d", &ilos...
ALGO
0.999872
3.64624
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-01-14T19:12: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": "21011927c0...
941d7e55-bcaa-49e0-a442-43c608ce1b2c
MarisaSchmidt/PushdownAutomata_anbn
Expression.h
/* ----------- EXPRESSION.H for PDA ---------- */ // // Expression.h // // // Created by <NAME> on 12/13/14. // // #ifndef _Expression_h #define _Expression_h #include "Stack.h" #include<iostream> using namespace std; class Expression { public: Expression(); //default constructor //AlgebraicExpres...
ALGO
0.98131
3.962198
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-09-17T03: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": "e4ef7c43a2...
a93e6fd3-7888-4f3a-bbe5-89e6b03c5c74
AlexLee1999/Leetcode-Practice
algorithm/C++/0018-4Sum.cpp
class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { int n = nums.size(); vector<vector<int>> res; if (n < 4) { return res; } std::sort(nums.begin(), nums.end()); for (int i = 0; i < n - 3; ++i) { if (i > 0 && nums[i] =...
ALGO
0.999956
6.126684
{ "github_metadata": { "branch": "main", "commit_count": 147, "repo_created_at": "2021-01-21T02:44:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40f9edd042...
ef7a881a-f1dd-4aa2-8bce-e315feb9d57d
tczz88888/algorithm
others/动态规划/格子上的dp/994div2d.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long const ll maxn = 205; ll f[maxn][maxn][maxn]; ll val[maxn][maxn]; int main() { ll t; cin >> t; while (t--) { ll n, m, x; cin >> n >> m >> x; for (ll i = 1; i <= n; i++) { for (ll j = 1; j <= m; j++) { cin >> val[i][j]; ...
ALGO
0.999942
3.613713
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-09-07T10:13: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": "6c1e7a46053...
3d2dd5c9-00c5-4dd5-be84-41aa7afe6206
JustAG7/Competitive_Programming
ICPC/2024/2023 ICPC HIAST Collegiate Programming Contest/B.cpp
#include<bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false);cout.tie(NULL);cin.tie(NULL); #define ll long long #define pb push_back #define pf push_front #define db double #define X first #define Y second #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() #define...
ALGO
0.999965
3.902732
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2023-05-11T10:56: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": "7d45ce911...
8ad95487-5763-4299-a01f-f039ec557cb7
marmstro4/strawsim
straw.cc
#include <cstdlib> #include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <TApplication.h> #include <TCanvas.h> #include <TH1F.h> #include <TH2D.h> #include <TEllipse.h> #include <TLine.h> #include <tuple> #include <TGraph.h> #include <vector> #include <cmath> #include <Math/Minimizer.h> ...
ALGO
0.990272
4.139314
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-11-19T21:17: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": "97120ebab65a...
72385ad9-b5cc-43c6-a8e9-5b51cb064ae3
kanhaiyasulay/Leetcode
37-sudoku-solver/sudoku-solver.cpp
class Solution { bool isSafe(vector<vector<char>>& board, char ch, int row, int col) { for(int j=0; j<board.size(); j++) { if(board[row][j] == ch || board[j][col] == ch) return false; } int currRow = row - (row%3), currCol = col - (col%3); f...
ALGO
0.999729
6.40546
{ "github_metadata": { "branch": "main", "commit_count": 415, "repo_created_at": "2025-01-15T05:48:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae5db17b73...
fe481324-1c32-4bf9-8ec0-22facb47f060
HotelCalifornia/advent-of-code-2022
src/day02/main.cpp
#include <fstream> #include <iostream> #include <map> #include <stdexcept> #include <string> #include <utility> enum class Outcome { Loss = 0, Tie = 3, Win = 6 }; namespace outcome { std::string to_string(const Outcome& o) { switch (o) { case Outcome::Loss: return "Loss"; case ...
ALGO
0.999456
5.406612
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-12-01T22: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": "447c119b3b6a...
e5fce35a-545d-4607-92d5-3e5541bdb140
alexandraback/datacollection
solutions_1595491_1/C++/Akollias/dancingwithgoogle.cpp
#include <iostream> #include <fstream> #include <string> #define LearnN 0.1 using namespace std; unsigned int NumOfData,NumOftestData; void solve() { ifstream fin("input.txt", ios::in); ofstream fout("output.txt", ios::out); int k = 0, n = 0, sa = 0, p = 0, b = 0; char s[1000], buf[3];//ftiaxt...
ALGO
0.997405
3.262786
{ "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": "44ac63610...
f4bd6e22-7b5d-41f9-ae85-e9801847d27b
anindyasen/DSA
tree/bst_ops.cpp
/* Input: q //num queries i n 8 3 10 1 6 14 4 7 13 // i: insert n: num of nodes followed by nodes s 14 // s: search followed by value to search d 4 // d: delete followed by value to delete p ...
ALGO
0.998772
4.189641
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-10-01T11:17:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7410faa4fa4...
283f6fb9-c051-4f54-8427-4c3e455fda0b
misztal/GRIT
GRIT/SIMULATORS/AREA/include/area_compute_perimeter.h
#ifndef AREA_COMPUTE_PERIMETER_H #define AREA_COMPUTE_PERIMETER_H #include <util_is_finite.h> #include <glue_tuple.h> #include <vector> #include <cassert> #include <cmath> namespace area { inline double compute_perimeter( std::vector<glue::Tuple> const & edges ...
ALGO
0.964202
7.002483
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2017-09-30T16:55:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 16, "pull_requests": 0 }, "file_meta": { "content_id": "6599082c...
a140041d-29d4-42d6-a359-c049d380da55
magland/finufft_devel_old
src/finufft2d.cpp
#include "finufft.h" #include "twopispread.h" #include "common.h" #include <fftw3.h> #include <math.h> #include <stdio.h> #include <iostream> #include <iomanip> int finufft2d1(BIGINT nj,double* xj,double *yj,dcomplex* cj,int iflag, double eps, BIGINT ms, BIGINT mt, dcomplex* fk, nufft_opts opts) /* Type-1 2D...
ALGO
0.999209
4.724593
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2017-02-20T08:25:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8dd9a6875...