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
20909e5d-7d36-4847-beb8-3787f164c744
sjcbulldog/xeropathgen
PathGenCommon/RobotPath.cpp
#include "RobotPath.h" #include "Rotation2d.h" #include "SplinePair.h" #include "TrajectoryNames.h" #include <numeric> #include <cmath> namespace xero { namespace paths { std::shared_ptr<SplinePair> RobotPath::getSplineAtTime(double time) { if (times_.size() == 0) return nullptr; if (times_.size() != ...
ALGO
0.996391
5.002515
{ "github_metadata": { "branch": "master", "commit_count": 241, "repo_created_at": "2019-08-17T22:18:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "bddb0fd5...
049bddb9-eead-4d4e-8f84-f5ba7cabe31f
LogicJake/DB_curriculum-design
Queue/main.cpp
#include <iostream> #include <stdlib.h> #include <fstream> #include <time.h> #include <windows.h> #include <queue> #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLE -1 #define OVERFLOW -2 #define M 3 //营业窗口数 #define N 100 //产生顾客数 #define VIPNum 10 //vip比率 1/VIPNum #define VIPHighDeg...
ALGO
0.996007
3.193796
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2016-11-04T08:19:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "2b34abb35...
da22a846-0047-46de-a95c-f5ff41847747
benjaminhuanghuang/ben-leetcode
1530_Number_of_Good_Leaf_Nodes_Pairs/solution.cpp
/* 1530. Number of Good Leaf Nodes Pairs Level: Medium https://leetcode.com/problems/number-of-good-leaf-nodes-pairs */ #include <iostream> #include <vector> #include <string> #include <stack> #include <queue> #include <unordered_map> #include <unordered_set> #include <numeric> #include <algorithm> #include "common/...
ALGO
0.999953
6.163783
{ "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": "3410f471...
49985d46-49e4-47e7-8b57-accf65dcf33b
Mourad-NOUAILI/leet-code
Daily_challenges/2024/9-September-2024/30-September-2024/1381.design-a-stack-with-increment-operation-Array_based-Lazy_propagation.cpp
/* * @lc app=leetcode id=1381 lang=cpp * * [1381] Design a Stack With Increment Operation */ // @lc code=start #include<bits/stdc++.h> /* Array based approach + Lazy propagation Time complexity: O(1) , overall Time complexity: O(m) Space complexity: O(2n) n: size of the array m: number of call...
ALGO
0.999738
6.308704
{ "github_metadata": { "branch": "main", "commit_count": 118, "repo_created_at": "2021-05-10T17:35: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": "45732dd792...
c6b6f2f5-810b-401e-84ae-850e451f09e4
maZymaZe/acm-remote
2021-8-14/Fudan_U3/src/a.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 998244353LL #define N 110 ll quick(ll a, ll b) { ll res = 1; while (b) { if (b & 1) res = res * a % mod; a = a * a % mod; b >>= 1; } return res; } ll C[N][N]; ll inv[N]; ll B[N]; ll A[N...
ALGO
0.999844
4.891424
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2021-01-17T03:32: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": "c2139051a...
f4cbc96d-4425-4db8-8219-cb83dfbb0f96
ra2003/Plagiarism
dataset/test/modification/1541_all/7/transformation_1.cpp
#include <iomanip> #include <iostream> #include<bits/stdc++.h> using namespace std; int main(); int main() { int jz; cin >> jz; if (5 > 3) cout << "new code";for ( ; jz--; ) /* 'for' inside */ { int ukf; cin >> ukf; /* 'if' begin */ if (!(ukf % 2 == 0)) /* ...
ALGO
0.999584
3.254373
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2022-08-06T10:23:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "742345fd061...
43f41881-afe8-450c-b077-908700c30f8e
shaihitdin/CP
Olymp/IOI/2008/Garden.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1000001; int d[N][6]; int n, m; string s; int main () { freopen ("in", "r", stdin); freopen ("out", "w", stdout); d[0][3] = 1; ios_base :: sync_with_stdio (0); cin >> n; cin >> m; cin >> s; for (int i = 1; i <= n; ++i) { for (int j = 1; j <...
ALGO
0.999987
3.711449
{ "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": "dbcc7c16e...
161e261e-be9b-4277-bd22-449c63fa3edf
gkdidms/Algorithm_Test
.ccls-cache/@home@runner@CodeTest/C++@DP@피보나치.cpp
#include <iostream> #include <stdio.h> #include <string> #include <vector> #include <algorithm> using namespace std; int main() { int iCnt = 0; cin >> iCnt; for (int i = 0; i < iCnt; ++i) { int iInput = 0; cin >> iInput; if (iInput == 0) { cout << 1 << " "...
ALGO
0.999955
3.642926
{ "github_metadata": { "branch": "main", "commit_count": 306, "repo_created_at": "2024-03-11T03:52: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": "71cc90fad6...
4342e566-68e6-4f3d-bacc-1b9a22d6485c
noah-ftnx/rpl
sde/12/02_.cpp
int findKthLargestSTL(vector<int>& nums, int k) { if(k>nums.size() || k <=0) return INT_MIN; // sort: descending nlogn // return k-1 element sort(nums.begin(), nums.end(), [](int a, int b) { return a>b; }); return nums[k-1]; } int findKthLargestBETTER(vector<int>& nums, int k) { if(k>nums.size() || k <=...
ALGO
0.999987
5.525665
{ "github_metadata": { "branch": "main", "commit_count": 459, "repo_created_at": "2021-12-12T21:22:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e214bdd696...
5c838150-3c9e-4832-bdcf-d38bf862a596
BrentTB/gulag_sort
gulag.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define uint unsigned int #define ull unsigned long long #define endl "\n" #define elif else if #define fo(i, a, b) for (int i = a; i < (int)b; i++) #define rfo(i, a, b) for (int i = a - 1; i >= b; i--) #define v(i) vector<i> #define vll vector<long lon...
ALGO
0.999908
3.675168
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-07-10T15:28:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be82d78490...
4c59087f-f8ce-492c-9211-ede312e0752f
a21oscgu/Kortspel
kortspel.cpp
#include <iostream> #include <ctime> int confirmation() { std::cout << "\nAre you sure?" << "\nType \"1\" (yes) or \"0\" (no).\nType here: "; std::string userConfirmation; std::cin >> userConfirmation; int positiveConfirmation = 1, negativeConfirmation = 0; if (userConfirmation == "1") { ...
TOOL
0.9883
3.528907
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-02-26T21:44: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": "df866118e407...
a2d8a2d7-c022-4bb1-a9f5-268009f89e58
l3vi-7/codeforcesLadder
4 - Codeforces Div. 2, A/16 - 20/puzzles.cpp
#include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define ll long long int #define REP(i, a, b) for(int i = a; i < b; i++) int main() { IOS; int n, m; cin >> n >> m; vector <int> v (m); for (int i = 0; i < m; i++) { ...
ALGO
0.999987
3.360953
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-05-05T09:30:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "eefbf2315...
3cc58711-39ec-430f-ac27-38b54df7ddb4
burakbayramli/books
Introduction_to_numerical_programming_using_Python_and_CPP_Beu/Ch07/C/P07-Wavelet.cpp
// Solves linear system for Daubechies D4 wavelet by Gauss-Seidel iteration #include <stdio.h> #include <math.h> #include "memalloc.h" #include "linsys.h" #include "matutil.h" int main() { double **a, *b, *x; double c0, c1, c2, c3, det, err, erri, f, sqrt3; int i, j, n; n = 8; a = Matrix(1,n,1,n); ...
ALGO
0.999925
3.68841
{ "github_metadata": { "branch": "master", "commit_count": 652, "repo_created_at": "2016-10-31T17:24:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 325, "forks": 201, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9cb6...
52b80b30-1a2b-4c1f-a2dd-e99a52e3aa2b
kwsjd/Lab2C
task855/main.cpp
#include <iostream> #include <vector> #include <string> #include <cctype> using namespace std; int main() { int n, l, cnt = 1, af; cin >> n; vector <int> a(n), st1, st2, act; for (int i = 0; i < n; i++) cin >> a[i]; st1.push_back(a[0]); for (int i = 1; i < n; i++) { if (st1.back(...
ALGO
0.999947
3.28139
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-03-12T19:50: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": "64042c75aa89...
223e92b7-990e-4f42-87e5-f714343e0822
BlerimShabani/CplusplusLC
longestPalindromicSubstring.cpp
/*5. Longest Palindromic Substring Medium 27.1K 1.6K Companies Given a string s, return the longest palindromic substring in s. Example 1: Input: s = "babad" Output: "bab" Explanation: "aba" is also a valid answer. Example 2: Input: s = "cbbd" Output: "bb" Constraints: 1 <= s.length <= 1000 s consist of only ...
ALGO
0.999844
6.463959
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-09-10T17:28: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": "efe9a479bef9...
fe63e549-2ade-4a2a-9205-6d7f6feaa2d0
udacity/self-driving-car
image-localization/community-code/roboauto/ros/src/slam/src/paramSolver.cpp
/* * Copyright 2016 RoboAuto team, Artin * All rights reserved. * * This file is part of RoboAuto HorizonSlam. * * RoboAuto HorizonSlam 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 vers...
ALGO
0.995326
4.59205
{ "github_metadata": { "branch": "master", "commit_count": 251, "repo_created_at": "2016-10-02T02:47:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6272, "forks": 2112, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90e...
58aee077-b087-45f7-88de-307970b6ac57
hdh06/CP-code
anhthuan1th8nam2022/chieu/B.cpp
#include <bits/stdc++.h> using namespace std; typedef array<int, 2> ii; int cross(ii A, ii B){ return A[0] * B[1] - A[1] * B[0]; } ii vtc(ii A, ii B){return {B[0] - A[0], B[1] - A[1]};} bool ccw(ii A, ii B, ii C){ ii AB = vtc(A, B); ii BC = vtc(B, C); int ans = cross(AB, BC); if (ans > 0) return true; return...
ALGO
0.999936
4.201091
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-12-23T02:31: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": "5893ee0745ee...
130466d7-04bc-43d6-9d63-26a550a2723d
pavel-zeman/CodeChef
CodeChef/src/y2013/m12/challenge/CubeCakes.cpp
// O(n^4) algorithm, which simply checks all the possible sub-cubes with a lot of memoization // http://www.codechef.com/DEC13/problems/CUBE #include <stdio.h> #include <string.h> #include <limits.h> #include <math.h> #include <stdlib.h> #include <ctype.h> #include <assert.h> #define FOR(c, m) for(int c=0;c<(m);c++) #...
ALGO
0.999885
3.550352
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2013-04-21T19:40: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": "beb290b8...
39f7a3f0-a892-4fc7-82ba-6feb5d2fa7d0
siLenT7171/DC_Task_4
main.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <mpi.h> #define ARRAY_SIZE 1000000 int main(int argc, char** argv) { double start_time = MPI_Wtime(); int num = atoi(argv[1]); static int list_of_numbers[ARRAY_SIZE]; int i; time_t t; srand((unsigned)time(&t)); for (i = 0; i < ARRAY_SIZE; ++i)...
ALGO
0.999899
4.205397
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2022-11-05T17:27:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "06e644cad7...
23b79dd1-19a5-47f1-bc2e-8bf6b7430b39
hsinanchen2007/MyStudy
C++/Misc3/C++程式設計(第三版)/Chap23/23-4/TestVM.cpp
// TestVM.cpp #include "Vector.h" #include "Matrix.h" #include <iostream> using namespace std; int main () { double W1[]={2.1, 0.5, 3.2, 6.4, 8.2, 4.9}; double W2[]={4.6, 6.5, 3.6, 4.2, 5.8, 9.4}; double W3[]={2.1, 3.2, 9.8, 6.9, 2.4, 1.6}; double w1[]={2, 0.5}; double w2[]={4, 6.5}; Matrix<double> M1(2,3, W1); ...
ALGO
0.979369
3.362776
{ "github_metadata": { "branch": "main", "commit_count": 188, "repo_created_at": "2022-12-19T05:16:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35b984d5d3...
7a86799c-627c-4999-be45-99403fdf5017
victmar13/FAL
E22/E22/Source.cpp
//<NAME> //A43 #include<iostream> #include<iomanip> #include<fstream> #include<vector> using namespace std; vector<int> resolver(vector<int> const& v, int tam) { // int vueltas = v.size(); int max = 0; vector<int> sol; vector<int> cont(tam + 1, 0); for (int i = 0; i < vueltas; i++) { cont[v[i]] ++; if (co...
ALGO
0.999985
3.382234
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-10-06T18:17: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": "f6414c1c946f...
7b166544-9b46-4dee-b35b-a5d6092203fd
gabrielrcp/Treino-Maratona
acampamento08/domingo/mapas.cpp
#include <cstdio> #include <vector> #include <algorithm> #include <set> using namespace std; struct mapa{ int i; int x1, x2, y1, y2; int a; int cx, cy; bool operator < (const mapa &outro) const{ if(outro.a == a) return i < outro.i; return a < outro.a; } }; vector<mapa> mapas; vector<int> al...
ALGO
0.999611
3.724416
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2010-05-22T19:49:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33f8163...
a6bbeb20-c044-49e0-9ead-20ae9efe9cad
Innomi/ITMO-HW
Labs/Discr2.2/problem3/problem3.cpp
#include <fstream> #include <vector> #define MOD 1000000007 using namespace std; ifstream cin("problem3.in"); ofstream cout("problem3.out"); short int nodes[100000], reachable[100000]; vector< vector<unsigned int> > edges; vector< vector<unsigned int> > edges1; unsigned int amount[100000]; bool visited[100000]; boo...
ALGO
0.999896
3.862159
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-12-22T19:47: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": "05af5e5541...
60b20539-b717-4d02-a86e-771113f0b5ee
xtactis/competitiveprogramming
atcoder/agc006/B.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define debug(var) cerr << (#var) << " = " << (var) << endl; #else #define debug(var) #endif void init() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); } void solve() { int n, x; scanf("%d%d", &n, &x); if (x == 1 || x == n*2-1) { puts("...
ALGO
0.999915
3.365617
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-07-20T12:25: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": "40af3a6856e3...
0d55ddcb-b634-4fe1-9f64-fd444711a537
diegoximenes/icpc
judges/codeforces/done/1690e.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define fast_io ios::sync_with_stdio(false) #define pb push_back #define mp make_pair #define fi first #define se second const int INF = 0x3f3f3f3f; const ll INFLL = 0x3f3f3f3f3f3f3f3fLL; const double PI = acos(-1); const double EPS = 1e-9; inline in...
ALGO
0.999907
3.495668
{ "github_metadata": { "branch": "master", "commit_count": 119, "repo_created_at": "2019-03-30T15:08: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": "7fea1ee7...
bcff47be-e8b2-4501-b0b0-5dbd52bb5baa
MRwangmaomao/tagslam_robot
apriltag/apriltag_mit/include/apriltag_mit/AprilTags/Quad.h
#ifndef APRILTAGS_QUAD_H_ #define APRILTAGS_QUAD_H_ #include <opencv2/core/core.hpp> #include "apriltag_mit/AprilTags/GrayModel.h" #include "apriltag_mit/AprilTags/FloatImage.h" #include "apriltag_mit/AprilTags/TagCodes.h" namespace AprilTags { class FloatImage; class Segment; //! Represents four segments that form...
ALGO
0.994127
7.101303
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-05-18T01:54:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 3, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "fdd60d31...
4d75ef0e-3856-4d61-8cc9-e30aa9fe1e51
ShahriarAlomShakil/AlgoExam
06_ShortestPath/20_warshall_algorithm.cpp
#include <iostream> #include <vector> using namespace std; int main() { int V = 4; // Adjacency list using array of vectors vector<int> adj[4]; // Add edges adj[0].push_back(1); // 0 -> 1 adj[1].push_back(2); // 1 -> 2 adj[2].push_back(3); // 2 -> 3 adj[3].push_back(0); ...
ALGO
0.99999
6.484385
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2025-07-13T17:22:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "304e61be7e...
dd5b1a9a-4467-4952-a203-4901d5bc79f7
jikongabc/test-jikong
WIT_L.cpp
#include <iostream> #include <algorithm> #include <cstring> #include <string> #include <vector> #include <queue> #include <deque> #include <map> #include <set> #include <unordered_map> #include <bitset> #include <numeric> #include <cmath> #define inf 0x3f3f3f3f #define endl '\n' using namespace std; using LL = long lon...
ALGO
0.999665
4.832785
{ "github_metadata": { "branch": "main", "commit_count": 329, "repo_created_at": "2024-01-31T07:12: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": "01ef0b6de0...
2daa9fa5-5e76-4786-9cfc-8ec588494eb6
ttyang/sandbox
sandbox/mp_math/boost/mp_math/integer/detail/base/multiplier.hpp
// Copyright <NAME> 2008 - 2009. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MP_MATH_INTEGER_DETAIL_BASE_MULTIPLIER_HPP #define BOOST_MP_MATH_INTEGER_DETAIL_BASE_MULTIPLIER_HPP namespace boost...
ALGO
0.985084
6.663135
{ "github_metadata": { "branch": "trunk", "commit_count": 20907, "repo_created_at": "2013-10-11T03:08:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19c3424...
b0f00c7b-10c1-435b-86aa-1d65d5fe733c
kLiHz/data-structure
tree/binary-tree-demo.cpp
#include "binary-tree.hpp" template<typename T> void preOrder(BinaryTree<T> & t) { std::cout << "preorder traversal: "; auto q = t.pre_traverse(); for (auto i : q) std::cout << i->data << ' '; std::cout << std::endl; } template<typename T> void midOrder(BinaryTree<T> & t) { std::cout << "midorder ...
ALGO
0.999212
5.630883
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2020-09-20T13:18:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce091c4fc...
51774f34-9d82-45f2-a919-6d2b63ec5f7a
carterrath/CS-111
C++Labs/Lab-19/main.cpp
#include <iostream> using namespace std; void calculate(double & score, double & total, double & lowest, double & highest); int main() { int counter, num_scores, quit, num_students; double test_score, sum_scores, high_score, low_score, average_score; num_students = 1; while (num_students < 4){ num_scor...
TOOL
0.931541
3.812123
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-06-01T00:56: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": "2846f20ffba...
17405961-973b-4359-a265-d48953c9edc6
logicallaw/lecture_oop1
C++_실습/8-2실습/8-2실습/8-8.cpp
/* */ #include <iostream> using namespace std; class Problem { private: int wrong; //틀린 횟수 bool correct; //정답 여부 int time; //푼 시간 public: Problem(); void setWrong(); void setCorrect(int t); int getPenalty(); bool isCorrect(); }; Problem::Problem() : wrong{ 0 }, correct{ 0 }, time{ 0 } {} void Problem::setWr...
ALGO
0.998336
4.004545
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-01-06T15:52: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": "a1d9211f0e8...
4a69b6fc-600d-4776-966d-5babe8f3683b
2694048168/LeetCodeAlgorithm
C++/find_content_children.cpp
/** * @File : find_content_children.cpp * @Brief : 分发饼干 贪心策略(每个局部之间要求独立,不相关) * @Link : https://leetcode-cn.com/problems/assign-cookies/ * @Author : <NAME> * @Date : 2021-07-04 */ //![include] #include <iostream> #include <vector> #include <algorithm> #include <memory> //![include] //![solution] /** ...
ALGO
0.999984
5.849132
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2020-09-16T14:39:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ab829f...
418df2df-3544-41e6-8245-d38018007def
nvdmike/CPP-Primer-Plus-Stephen-Prata
home_work/chapter_07/task01/task01.cpp
/* * task01.cpp * "Язык программирования C++ (6 издание), <NAME> * Глава 7: Функции как программные модули C++, Упражнения по программированию (Задача 1): * Напишите программу, которая многократно запрашивает у пользователя пару чисел до тех пор, пока хотя бы одно из этой * пары не будет равно 0. С каждой парой програм...
ALGO
0.947273
4.554078
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2025-02-14T19:31: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": "b9932bc2f5a...
db10b982-a36f-4c28-905b-d770635b2f8f
nekkomoe/code
codeforces/46F.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1010; int n, m, k, x[N], y[N]; struct DSU { int fa[N * 2], key[N], room[N]; DSU() { for(int i = 1 ; i <= 2000 ; ++ i) fa[i] = i; } int get(int x) { return x == fa[x] ? x : fa[x] = get(fa[x]); } void merge(int x, int y) { fa[...
ALGO
0.999988
4.101501
{ "github_metadata": { "branch": "master", "commit_count": 226, "repo_created_at": "2018-02-27T02:33:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e78b6ee...
33f78332-cdaa-4d25-a53c-a7002b9eb306
kuhyx/TRAK
code/photonmapping/cpp/main.cpp
#include <iostream> #include <vector> #include <cmath> #include <limits> #include <random> #include <fstream> #include <fstream> #include <chrono> #include "Vector3.h" #include "Sphere.h" #include "Plane.h" // Define the photon struct Photon { Vector3 position; Vector3 direction; Vector3 power; P...
ALGO
0.996987
6.200857
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-11-13T05:35:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "80075c1828a...
ab63dd6d-de35-43f7-84b8-c0e3be83ff79
microsoft/qsharp-runtime
src/Simulation/Native/src/external/nointrin/kernel5.hpp
// (C) 2018 ETH Zurich, ITP, <NAME> and <NAME> template <class V, class M> inline void kernel_core(V& psi, std::size_t I, std::size_t d0, std::size_t d1, std::size_t d2, std::size_t d3, std::size_t d4, M const& m) { std::complex<double> v[2]; v[0] = psi[I]; v[1] = psi[I + d0]; std::complex<double> tmp[32] = {0.,...
ALGO
0.999909
4.011472
{ "github_metadata": { "branch": "main", "commit_count": 604, "repo_created_at": "2019-06-06T17:20:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 289, "forks": 91, "issues": 153, "pull_requests": 13 }, "file_meta": { "content_id": "89700...
940afc34-d98b-491c-8717-7ad15f1bcccc
Fhelvensteijn/MinesweeperLibAF
source/MinesweeperLibAF.cpp
#include <vector> #include <time.h> #include <stack> #include "MinesweeperLibAF.h" //Made by <NAME> for the personal project: 4x4 handheld w/ <NAME> //This class and its methods can be used to create an implementation of the puzzle game Minesweeper //For an example of how to implement check out the in console impleme...
ALGO
0.947133
4.123204
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-06-01T13:51: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": "3c246cef1f99...
26b00552-fef0-4ff9-8f8c-29f25af31310
parikhkrish02/CP-cheatSheet
DP ❤/strings/longest_common_subseq.cpp
// Time Complexity: O(N*M) #include <bits/stdc++.h> using namespace std; int lcs(string s1, string s2) { int n = s1.size(); int m = s2.size(); vector<int> prev(m + 1, 0), cur(m + 1, 0); for (int i = 1; i <= n; i++) { for (int j = 1; j <= m; j++) { if (s1[i - 1] == s2[j...
ALGO
0.999946
5.294078
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2023-03-27T07: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": "d3238e5fec...
cc3a7700-ab26-4851-9118-b2040a1dac73
andras-szoldatics/advent-of-code
2021/day-21/main.cpp
#include <array> #include <cstdint> #include <fstream> #include <iostream> #include <unordered_map> #include <vector> using namespace std; const int64_t TABLE_SIZE = 10; class FixedDie { public: int64_t delta(int64_t numberOfGoes) { int64_t total = (numberOfGoes * 9) - 3; return total % TABLE_SI...
ALGO
0.999794
4.230191
{ "github_metadata": { "branch": "main", "commit_count": 176, "repo_created_at": "2022-12-17T13:06:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3017e7d38a...
99e7b9dc-85a9-4b69-9d0b-1629e0caaa2c
HieronyM/Competitive-Programming-Code
UVa OJ/4. Graph/InternetBandwidth.cpp
// <NAME> // Template by Hierony #include <cstdio> #include <cmath> #include <cstring> #include <cstdlib> #include <iostream> #include <string> #include <algorithm> #include <vector> #include <map> #include <stack> #include <queue> #include <set> #include <bitset> using namespace std; typedef long long LL; typedef ...
ALGO
0.999202
3.081143
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2014-07-21T08:19:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b2c48b80d...
fb911330-68a0-46b6-b0dc-c8b691f44afb
davidolima/EulerCPP
5.cpp
/* 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? */ #include <bits/stdc++.h> #define LIMIT 1000000000 #define DIVISION_LIMIT 20 int main(){ std::array<boo...
ALGO
0.999858
5.377038
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-11-12T03:04: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": "c7de8be0edee...
5aeecec6-fe10-49fb-a17a-5db94673570e
cyber-robot1/Algorithmic-Problem-Solving
Codeforces/A/157A.cpp
/* Author: <NAME> Problem name: Game Outcome Problem link: https://codeforces.com/problemset/problem/157/A Date: 24/4/2023 */ #include <iostream> using namespace std; int arr[31][31]; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) cin >> ar...
ALGO
0.999965
5.014302
{ "github_metadata": { "branch": "main", "commit_count": 1001, "repo_created_at": "2021-01-09T14:56:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fef82f913...
74954119-aca2-4e86-91a6-6ae08535c499
JohnVlBetter/LeetCode
2861. 最大合金数.cpp
/* * @lc app=leetcode.cn id=2861 lang=cpp * * [2861] 最大合金数 */ // @lc code=start class Solution { public: int maxNumberOfAlloys(int n, int k, int budget, vector<vector<int>>& composition, vector<int>& stock, vector<int>& cost) { int res = 0; for(auto com : composition){ int l = 0, r ...
ALGO
0.99924
5.724399
{ "github_metadata": { "branch": "master", "commit_count": 552, "repo_created_at": "2023-03-18T02:54: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": "27fc1ff9...
ebf2f00a-639c-4f9e-960f-8c5971c2adc7
SalmaAlassal/Data-Structures
Queue/main.cpp
#include <iostream> #include "Queue.cpp" using namespace std; int main() { Queue<int> q; q.push(10); // queue: 10 q.push(20); // queue: 10 , 20 cout << q.front() << ' ' << q.back() << endl; // output: 10 20 cout << q.size() << endl; // print the size of queue -> 2 at this mom...
TOOL
0.975331
3.950496
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2022-03-10T14:18:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7932cbf2f6f...
e93a9b6f-46e3-45d4-92f3-334f10dfbd08
thomasmazza/fmt-simulator
components/src/mirrorElliptical.cpp
#include "../include/mirrorElliptical.hpp" #include "../../utils/include/utils.hpp" #include <cmath> /** * @brief Main function of every component, calculates the position and direction after the photon passes * @param photon, Photon who should be calculated * @return true, if photon passes the mirror */ bool Mir...
ALGO
0.999409
5.529883
{ "github_metadata": { "branch": "main", "commit_count": 351, "repo_created_at": "2023-04-12T16:46: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": "fd0a3061c3...
799d5420-93c0-4052-a219-4c9170e31677
NAgrawal1798/Competitive-coding
324-wiggle-sort-ii/wiggle-sort-ii.cpp
class Solution { public: void wiggleSort(vector<int>& nums) { vector<int> count(5001, 0); // count all elements for(int i = 0; i < nums.size(); i++) { count[nums[i]]++; } // put the larger half of elements on even positions // notice that we start from t...
ALGO
0.999999
5.619491
{ "github_metadata": { "branch": "main", "commit_count": 1376, "repo_created_at": "2023-09-02T11:08: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": "b8dd193a2...
068d90f9-fa74-4d89-bae7-67442fa57cfb
AugF/code_rep
meituan_8_29/fun_4_1.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int n, m, nums[N]; int main() { freopen("meituan_8_29/in_4.txt", "r", stdin); freopen("meituan_8_29/out_4.txt", "w", stdout); cin >> m >> n; int min_v = INT_MAX, max_v = INT_MIN; for (int i = 0; i < n; i ++) cin >> nums[i], ...
ALGO
0.999909
3.09865
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-09-14T10:51:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc6b1a9e1d...
6b9f99ef-4b69-4f9e-82f9-5dfb5c719d17
ishandutta2007/codeforces-g
geothermal/normal/1375/G.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef pair<ld,ld> pd; typedef vector<int> vi; typedef vector<ld> vd; typedef vector<l...
ALGO
0.999179
4.139412
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:55: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": "03f9c2f8e6ba...
c7152dc6-5967-4305-958b-4f44e54c6444
dreyus95/AVSP_SourceQualityPrediction
CodeJamCrawler/dataset/11_22593_55.cpp
#include <cstdio> #include <algorithm> #include <map> #include <iostream> #include <string> #include <set> #include <vector> #include <fstream> #include <cmath> #include <math.h> using namespace std; int main() { int T; ifstream fin("C.txt"); fin >> T; ofstream fout("C.out"); for(int i = 1; i <= T; i++) { int...
ALGO
0.999906
3.812512
{ "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": "e7989c856...
b87adbd2-fcda-439c-9ddd-3354457d30ce
CoderXtush/DSA-with-C-and-Java-for-Hactoberfest-22
Array Questions/first_repeating_element.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) { cin >> arr[i]; } const int N = 100000; int idx[N]; for (int i = 0; i < N; i++) { idx[i] = -1; } int minindex = INT_MAX; for (int ...
ALGO
0.99998
4.060866
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-10-11T16:03:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 12, "issues": 1, "pull_requests": 7 }, "file_meta": { "content_id": "b2d57d63e49...
6d532a03-506b-49d3-9cea-415fb0ad5873
demiantetteh/cpp_projects
C++_Projects_from_txt/Chapter4(functions)/11-calories.cpp
#include <iostream> #include <cmath> double basalmetabolicrate(double weight); //returns: calories needed for basal metabolism double physicalactivity(double intensity, double weight, double minutes); //returns: calories required for physical activities int main() { double weight, mins, intensity; double bas...
ALGO
0.964511
3.83866
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-11-27T05:14: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": "1ebee1a8323...
50aaa228-5657-442e-8c2d-74a890de28fc
SimonNitzsche/OpCrux-Server
libs/reactphysics3d/src/collision/narrowphase/SphereVsSphereAlgorithm.cpp
/******************************************************************************** * ReactPhysics3D physics library, http://www.reactphysics3d.com * * Copyright (c) 2010-2020 <NAME> * ********************************************************************************* *...
ALGO
0.995695
7.491098
{ "github_metadata": { "branch": "master", "commit_count": 663, "repo_created_at": "2018-04-29T19:39:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 2, "issues": 12, "pull_requests": 0 }, "file_meta": { "content_id": "c0b05d...
5da89f32-8279-4e62-8a18-4f54ac8b3a97
nyitraig/advent-of-code
2015/day02/part1/main.cpp
/* --- Day 2: I Was Told There Would Be No Math --- * The elves are running low on wrapping paper, and so they need to submit an * order for more. They have a list of the dimensions (length l, width w, and * height h) of each present, and only want to order exactly as much as they * need. * Fortunately, every pres...
ALGO
0.996066
5.604517
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2017-07-29T18:25: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": "b3297dd52...
85a2a930-ca0f-4fe9-a3cd-0991f868732d
codulluiandrei/pbinfo
pbinfo-3734/main.cpp
#include <iostream> #include <fstream> #include <math.h> using namespace std; ifstream in ("formula1.in"); ofstream out ("formula1.out"); int main() { long long int n, k, C; in >> C >> k >> n; if (C == 1) { out << (2 * k - 1) * (2 * k - 1); return 0; } long long S = ((2 * n - 1) * (2 * ...
ALGO
0.999874
3.55029
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2022-04-17T15:34:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9, "forks": 3, "issues": 48, "pull_requests": 0 }, "file_meta": { "content_id": "adf0e5c3671...
118603b4-131a-4c78-aa66-6107c22cbb6b
STRIDES-Codes/MicrobeTaxaSARS2
src/metaspades/src/projects/hammer/kmer_cluster.hpp
//*************************************************************************** //* Copyright (c) 2015 Saint Petersburg State University //* Copyright (c) 2011-2014 Saint Petersburg Academic University //* All Rights Reserved //* See file LICENSE for details. //************************************************************...
ALGO
0.994106
6.488654
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2021-05-28T16:52:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "88f122328c01...
f6ca1e6d-9f71-4bba-b8f8-f72bb47fe7ab
Nere0s/quadratic_map
main.cpp
#include <iostream> #include <ctype.h> #include <string.h> #include <bits/stdc++.h> //#include <math.h> // function to get parameter from character long double char_to_parameter(char c, long double a_min = -1.2, long double a_max = 1.2) { long double l = a_max - a_min; long double d = l / 24.; ...
ALGO
0.993218
3.867864
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-03-04T19:00: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": "da3a3a6f44...
db2fae43-58d4-4490-bb72-5c980e60b1a3
rozentill/Front2Back
src/main.cpp
// my headers #include "render.h" #include "reconstruct.h" #include "symmetry.h" #include "eval.h" #include "register.h" #include "io.h" #include "headers.h" #include "mesh.h" #include "render_xml.h" #include "kdtree.h" //3rd party #include "xml_writer.hh" #include "KDTreeVectorOfVectorsAdaptor.h" #include <sstream> ...
DATA
0.970392
4.497353
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-03-30T18:07:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "66032f178...
259df087-3c61-4e6d-a298-088c866486f7
arthurherbout/crypto_code_detection
data/crypto-competitions/files/Keccak512.cpp
/////////////////////////////////////////////// // // ************************** // ** ENGLISH - 10/Jul/2017 ** // // Project: libObfuscate v2.00 // // This software is released under: // * LGPL 3.0: "www.gnu.org/licenses/lgpl.html" // // You're free to copy, distribute and make commercial use // of this software under...
ALGO
0.99077
5.1426
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2019-09-20T18:35:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "39e83379...
e8a9a276-aa60-4d9a-a147-41489fcf3c44
dlxj/RedisAll
RediSearch/deps/VectorSimilarity/src/VecSim/algorithms/hnsw/hnsw_serializer.h
#pragma once template <typename DataType, typename DistType> HNSWIndex<DataType, DistType>::HNSWIndex(std::ifstream &input, const HNSWParams *params, std::shared_ptr<VecSimAllocator> allocator, EncodingVersion version) : VecSimIndexA...
TOOL
0.9374
6.600375
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-05-17T02:49: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": "8e0ffd8da87...
1a53fad1-2587-451f-ad38-c4710c48f2b9
SBNSoftware/sbndcode
sbndcode/CosmicId/Algs/CosmicIdAlg.h
#ifndef COSMICIDALG_H_SEEN #define COSMICIDALG_H_SEEN /////////////////////////////////////////////// // CosmicIdAlg.h // // Functions for fiducial volume cosmic tagger // <NAME> (<EMAIL>), November 2018 /////////////////////////////////////////////// #include "sbndcode/CosmicId/Algs/FiducialVolumeCosmicIdAlg.h" #in...
TOOL
0.932467
6.414521
{ "github_metadata": { "branch": "develop", "commit_count": 6014, "repo_created_at": "2020-05-14T14:45:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 12, "forks": 51, "issues": 25, "pull_requests": 13 }, "file_meta": { "content_id": "16d...
328b7f89-7a3a-4253-99f9-5f54c108ee80
sendoru/problem_solving
source/boj/11758.cpp
#include <iostream> #include <cmath> using namespace std; double dots[3][2]; int main(void) { for (int i = 0; i < 3; i++) { cin >> dots[i][0] >> dots[i][1]; } double initialDots[3][2] = { {dots[0][0], dots[0][1] }, {dots[1][0], dots[1][1] }, {dots[2][0], dots[2][1] }, }; // 점 0이 원점에 오도록 전부 평행이동 f...
ALGO
0.999954
4.099739
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-05-01T19:31: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": "226546df7d7...
722d2b2e-b8c3-4e0e-8703-358fea0c8ba1
RusakovRodion/Testing2
app/process_backward.cpp
/** * process_backward.c -- реализует обобщенную функцию обработки текста * в обратном порядке следования строк * * Copyright (c) 2017, <NAME> <<EMAIL>> * * This code is licensed under a MIT-style license. */ #include "_text.h" /** * Обрабатывает список, применяя заданную функцию к каждой строке * * @param ...
ALGO
0.940641
4.314727
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-06-05T13:37:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a14746ac5c...
af787a35-179a-4256-a34e-350d7b5fef70
ppdog0/poj
POJ/DS/2010.cpp
#include<cstdio> #include<algorithm> #include<queue> //priority_queue using namespace std; int N, C; long long F; struct cow { int score; int cost; } cows[100001]; priority_queue<int> pq1, pq2; int f1[100001], f2[100001]; bool cmp(cow a, cow b) { if(a.score == b.score) return a.cost < b.cost; re...
ALGO
0.99998
3.619296
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2020-08-29T02:58: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": "ffc21313c...
4b0e0d37-9e86-458a-a1dd-ad5f417dd23c
FuzzySmurf/GSPCAGE
GSPCAGE-BACKUP/_misc/fooPhysics/PhysicsEngine/physicsengine/pcontacts.h
/*************************************************************************************** * Program Name: pcontacts.h * * Name: <NAME> * * Date: February 08, 2013 ...
ALGO
0.980989
7.056526
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2013-02-14T03:11:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50ba224c...
78b011af-314c-4fc1-9212-d9a58e2192dd
irff/cp-codes
TOKI/transport.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define R(i,_a,_b) for(int i=int(_a);i<int(_b);i++) char x[1002],y[1002]; int c[1002][1002],b[1002][1002]; void print(int i,int j){ if(i==0 or j==0) return ; if(b[i][j]==2){ print(i-1,j-1); printf("%c", x[i]); } ...
ALGO
0.999978
3.028406
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2014-10-19T18:22:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de7961365e...
dfe3c37b-bc29-48a7-9b56-c45f271fcb6d
Vap0ur3x/Projects
depth.cpp
#include<iostream> using namespace std; struct node { int data; node* left; node* right; }; struct node* getNode(int data) { node* newNode=new node(); newNode->data=data; newNode->left=NULL; newNode->right=NULL; return newNode; } /* Given a binary tree, print its nodes according to the "bottom-up" postorder ...
ALGO
0.999973
4.772842
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-10-31T17:04:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2df9facf1b...
bc93c81f-0e61-48d5-94e3-d1b40ce5c226
akash4-sys/DSA
Codeforces/1200/1872D.cpp
#ifdef __INTELLISENSE__ #include "../../headers.h" #else #include <bits/stdc++.h> using namespace std; #endif #define ll long long #define vec vector<int> #define vv vector<vec> #define vvv vector<vv> #define all(v) v.begin(), v.end() #define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #defin...
ALGO
0.999878
5.045083
{ "github_metadata": { "branch": "main", "commit_count": 272, "repo_created_at": "2022-07-17T09:39:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b81df7713...
921a4bfa-7a7e-446a-a11a-94be2c31e295
feixiangxiaoshu/Leetcode
topk.cpp
class QuickSort { public: void quicksort(vector<int> &arr, int left, int right, int k) { if (k - 1 >= left) { int pivot = 0; if (left < right) { pivot = partition(arr, left, right); cout << pivot << endl; if (pivot == k - 1) { ...
ALGO
0.999997
5.334421
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-08-26T11:41:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bbd4f7dd56...
b0a479e0-e1f8-41f8-8baf-a73a4fd8df77
kamyu104/LeetCode-Solutions
C++/k-similar-strings.cpp
// Time: O(n * n!/(c_a!*...*c_z!), n is the length of A, B, // c_a...c_z is the count of each alphabet, // n = sum(c_a...c_z) // Space: O(n * n!/(c_a!*...*c_z!) class Solution { public: int kSimilarity(string A, string B) { queue<string> q;...
ALGO
0.999992
5.282108
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
6d0a279f-0628-4fcf-9c39-9b5a559d0ad7
akashiitj/dsaprogram
dp/hearth/anta dup k1.cpp
#define _CRT_SECURE_NO_WARNINGS #include <string> #include <vector> #include <algorithm> #include <numeric> #include <set> #include <map> #include <queue> #include <iostream> #include <sstream> #include <cstdio> #include <cmath> #include <ctime> #include <cstring> #include <cctype> #include <cassert> #include <limits> ...
ALGO
0.99993
3.845892
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2017-05-08T18:29: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": "f1429c42a...
53cadcb9-334b-482c-82c4-b7e77bc70936
google/monster-mash
third_party/libigl/include/igl/arap_dof.cpp
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2013 <NAME> <<EMAIL>> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2....
ALGO
0.999245
6.58912
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-01-28T21:04:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1312, "forks": 182, "issues": 24, "pull_requests": 0 }, "file_meta": { "content_id": "13e7ac...
de787dad-bcdc-4643-a7fa-d6cc4d051168
andrix10/program
numberGuess/numberGuess.cpp
/* Created by <NAME> No Rights Reserved Simple text based number guessing game. */ #include <iostream> #include <iomanip> #include <cmath> #include <cstdlib> #include <ctime> using namespace std; int getValue(); bool askToPlayAgain(); int generateNumber(); int getBiggestNumber(); void congratulate(int, int); cons...
ALGO
0.946553
3.810287
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2013-04-03T23:46:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ccfc809d4b...
6bbdc6e7-38a4-4245-8d4d-d06e3df01681
xb-hub/PAT-Advanced-Level-Practice
1018 Public Bike Management/main.cpp
#include <iostream> #include <vector> using namespace std; const int INF = 1000000000, MaxSize = 501; int cmax, n, sp, m, min_send = INF, min_back = INF; vector<int> w(MaxSize), d(MaxSize, INF), pre[MaxSize], tmp_path, ans; vector<vector<int>> path(MaxSize, vector<int>(MaxSize, INF)); vector<bool> visit(MaxSize); voi...
ALGO
0.999997
3.836911
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-06-01T13:36: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": "0abb0baee...
355f13ac-5a73-4f6b-8eae-aebf9b7a4909
esbmc/esbmc
regression/esbmc-cpp/cpp/ch2_14/main.cpp
// Fig. 2.21: fig02_21.cpp // Calculating compound interest. #include <iostream> using std::cout; using std::endl; using std::ios; using std::fixed; #include <iomanip> using std::setw; using std::setprecision; #include <cmath> // enables program to use function pow // function main begins program execution int ma...
ALGO
0.996979
5.272255
{ "github_metadata": { "branch": "master", "commit_count": 24772, "repo_created_at": "2015-06-20T19:35:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 360, "forks": 115, "issues": 452, "pull_requests": 82 }, "file_meta": { "content_id": "...
20675529-2e99-456e-9294-87fdc8128115
NREL/EnergyPlus
third_party/Windows-CalcEngine/src/Viewer/src/Geometry2DBeam.hpp
#ifndef GEOMETRY2DBEAM_H #define GEOMETRY2DBEAM_H #include <memory> #include <vector> namespace FenestrationCommon { enum class Side; } namespace Viewer { class CViewSegment2D; class CGeometry2D; class CSegment2D; class CPoint2D; //////////////////////////////////////////////////////////////...
ALGO
0.917298
6.454392
{ "github_metadata": { "branch": "develop", "commit_count": 40658, "repo_created_at": "2013-11-22T14:47:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1278, "forks": 441, "issues": 908, "pull_requests": 48 }, "file_meta": { "content_id":...
bdc0c860-a166-4e0c-98f8-106d4b880b8c
Soberjan/Study
spbgu/2020/lvl1/D/simple.cpp
#include <iostream> #include <bitset> using namespace std; const int LIM = 100000; int n, *a; bitset<LIM> f(int n){ bitset<LIM> bs; bs[2] = !(n % 2); while (n % 2 == 0) n /= 2; for (int i = 3; i < n / 2; i+=2){ bs[i] = n % i; while ( (n % i) == 0) n /= i; } ...
ALGO
0.999996
3.544985
{ "github_metadata": { "branch": "master", "commit_count": 209, "repo_created_at": "2018-09-14T14:33: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": "a2b13938...
a954da45-c711-4b73-9575-636b074f25dc
1998factorial/Codeforces
contests/contest469Div1/A.cpp
#include <bits/stdc++.h> using namespace std; set<int> pos[2]; vector<vector<int>> seqs; string s; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> s; for (int i = 0; i < s.length(); i++) { pos[s[i]-'0'].insert(i); } vector<int> seq; while (pos[0].size()) { ...
ALGO
0.999741
3.684649
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2019-12-15T09:20:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e0812e7c7...
7b5cb637-76f6-46bf-b4be-7e9d357eda3e
Aicry/Algotithms
LUO_GU/P1216.cpp
#include <iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int Input(int n) { if (n == 1) { int res; cin >> res; return res; } vector<vector<int> > towel(n, vector<int>(n)); int k = 1; for (int i = 0; i < n; ++i) { for (int j = 0; j < k; ++j) { cin >> towel[i][j]; }...
ALGO
0.999955
3.65342
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2022-06-05T04:34: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": "969f207b14...
ef0610a8-cdbc-4ba6-bcb5-d6b0ef7cb286
ishandutta2007/codeforces-e
enumerativecombinatorics/normal/698/D.cpp
#include<stdio.h> #include<math.h> #include<algorithm> #include<queue> #include<string.h> #include<vector> #include<set> #include<map> #include<stdlib.h> using namespace std; const long long mod=1000000007; const long long inf=mod*mod; const long double EPS = 1e-20; const long double INF = 1e+20; const long double PI =...
ALGO
0.999465
3.627761
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34: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": "343d32fe3e56...
0386c756-7068-497b-b07d-815ca99430c8
urshail/ds
treeCountNodesandLeaf.cpp
#include<iostream> #include<queue> using namespace std; struct Node { int data; struct Node *left; struct Node *right; }; Node* insertNode(Node *root,int data) { if(!root) { root = new Node(); root->data = data; root->left = root->right =...
ALGO
0.999921
4.030676
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-04-30T04:02: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": "9fa17fb8c0...
192c1ec8-a060-4e04-a7e0-50d73f32c08e
JudeHe2020/mega
desktop/src/MEGASync/mega/src/android/androidFileSystem.cpp
#include <mega/android/androidFileSystem.h> #include <mega/filesystem.h> #include <mega/logging.h> jclass fileWrapper = nullptr; jclass integerClass = nullptr; JavaVM* MEGAjvm = nullptr; namespace mega { AndroidPlatformURIHelper AndroidPlatformURIHelper::mPlatformHelper; LRUCache<std::string, std::shared_ptr<Android...
TOOL
0.935706
7.268884
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2025-05-08T09:21: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": "287ca91e1b1...
221a06be-96a5-413b-afe0-dbcdf95e2abd
chamingyeong00/2grade
Data-structure-practice/lab5/postfix.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX_STACK_SIZE 100 #define MAX_EXPR_SIZE 100 int top = -1; char stack[MAX_STACK_SIZE]; char expr[MAX_EXPR_SIZE]; char new_expr[MAX_EXPR_SIZE]; int isp[] = {0, 19, 12, 12, 13, 13, 13, 0}; int icp[] = {20, 19, 12, 12, 13, 13, 13, 0}; typedef enum{ lpa...
ALGO
0.999534
3.732232
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-12-21T16:05: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": "33ed6b146d05...
37222ec9-06a9-45f7-81a2-9496baf17514
bqi343/cp-notebook
Contests/USACO Solutions/2017-18/Jan 2018/Plat/sprinklers.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pi; template <class T> using Tree = tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistic...
ALGO
0.999918
3.943447
{ "github_metadata": { "branch": "master", "commit_count": 1350, "repo_created_at": "2017-07-11T03:52:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2642, "forks": 429, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "a7...
0fdf1f9e-fb5e-47b8-a20d-5d16504226c0
Bocity/ACM
vjudge/little_kawayi/Gym/100753C/14526250_WA_15ms_192kB.cpp
#include <bits/stdc++.h> #define REP(i,x,n) for(int i = (x); i < (n); ++i) #define PER(i,x,n) for(int i = (n)-1; i >= (x); --i) #define inf 0x3f3f3f #define eps 1e-9 #define PI acos(-1.0) using namespace std; typedef long long ll; typedef unsigned long long ull; const ll MOD = 1e9+7; const int maxn = 1000 + 10; struct ...
ALGO
0.999656
3.901624
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2016-12-10T13:53: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": "012912d5c...
7ce74e74-721d-428a-a8f3-d459a68fe5f6
Daddy2054/ttt
ttt/ttt.cpp
#include <iostream> #include <string> using namespace std; // here is it void display_board(string board); string place_marker(string board, char marker, int position); bool win_check(string board, char marker); bool space_check(string board, int position); bool full_board_check(string board); int player_choice(str...
ALGO
0.997788
4.455805
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-08-04T16:48: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": "b0f8173031...
1ac84a0c-401b-4590-803e-0d472b8019b7
babrooks/BCESolve
examples/cpp/resale.cpp
// Computes minimum revenue for the resale mechanism #include "bce.hpp" class ResaleMech : public BCEAbstractGame { private: double r; public: ResaleMech(int na,int ns,double _r): BCEAbstractGame(ns,na,1,3), r(_r) { } double prior(int state, const vector<int> & types) const { return 1.0/stati...
ALGO
0.99978
5.507629
{ "github_metadata": { "branch": "master", "commit_count": 201, "repo_created_at": "2015-03-17T13:46:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c415140...
74b232b1-cfa6-4edb-9c4e-f1c572ade68c
thegamer1907/Code_Analysis
contest/1542501829.cpp
#include <bits/stdc++.h> #define int long long #define vi vector<int> #define pii pair<int,int> #define pll pair<int,int> #define mod 1000000007 #define all(x) x.begin(),x.end() #define mp(x,y) make_pair(x,y) #define mem(a,val) memset(a,val,sizeof(a)) #define eb push_back #define ff firs...
ALGO
0.999933
3.78024
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2019-05-24T10:35:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "256be2693...
ed3849b9-821b-4d3a-a95b-cc81c9e5271b
MarekPelowski/Polish-Junior-IT-Olympiad
_problems/OIJ_18/Reforma drogowa/ref.cpp
#include <algorithm> #include <iostream> #include <vector> #include <unordered_map> using namespace std; void dfs(vector<bool> &visited, vector<pair<int, int>> &cycles, vector<vector<int>> A, int x, int last_x) { visited[x] = true; for(int x2 : A[x]) { if(!visited[x2]) { dfs(visited, cycles, A, x2, x); ...
ALGO
0.999792
4.562775
{ "github_metadata": { "branch": "main", "commit_count": 311, "repo_created_at": "2023-11-20T16:03: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": "23b72a0412...
a1dd3910-39e8-4119-b6ae-d5d9d3685a4e
Xushi8/Code
2023/2023_November/PTA/advanced/1005.cpp
// 2023/11/07 18:18:08 #include <iostream> #include <algorithm> #include <cstring> #include <cstdint> #include <vector> #include <string> #include <set> #include <map> #include <unordered_map> #include <unordered_set> #include <queue> #include <functional> #include <iomanip> #include <cmath> #include <stack> #include <...
ALGO
0.999943
4.627281
{ "github_metadata": { "branch": "main", "commit_count": 690, "repo_created_at": "2022-12-29T08:34:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ec7799361...
94cc092d-64f5-4632-bed1-23415e78755e
georgepaw/ARM_DUE_CORRECT
crc32c.cc
#include "crc32c.hh" // process a byte at once uint32_t CRC32C::crc32c_software_simple(uint32_t crc, const uint8_t * data, size_t num_bytes) { while (num_bytes--) { crc = (crc >> 8) ^ crc32c_table[0][(crc & 0xFF) ^ *data++]; } return crc; } uint32_t CRC32C::generate_crc() { uint32_t crc = 0xFFFFFFFF;...
ALGO
0.980178
5.926349
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2017-03-07T16:39: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": "6e62ca766...
e8264459-8de8-441d-b1da-08f5cd997c1f
TimeDA/TimeDA
dataset/cpp_12_18/gcj2013/Milanin/2270488_2463486_Milanin_j.cpp
#include <stdio.h> long long rev(long long n) { long long r; for(r=0; n; r=r*10+n%10, n/=10); return r; } long long len(long long n) { long long r; for(r=1; n; r=r*10, n/=10); return r; } long long get(long long A, long long B) { long long t, a, l, r, s; for(s=0, t=1; ; t++) { l=len(t); ...
ALGO
0.998831
4.159043
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2022-10-24T06:47: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": "363145e8c95...
8b5a564f-0f39-453b-b14f-734ab02e10fb
alisw/AliPhysics
PWGJE/UserTasks/AliAnalysisTaskJetProtonCorr.cxx
// ROOT #include "TFile.h" #include "TList.h" #include "TH1.h" #include "TH2.h" #include "TH3.h" #include "TF1.h" #include "TFormula.h" #include "TRandom.h" #include "TSpline.h" // analysis framework #include "AliAnalysisManager.h" #include "AliInputEventHandler.h" #include "AliVEvent.h" #include "AliVTrack.h" #includ...
DATA
0.900111
5.129145
{ "github_metadata": { "branch": "master", "commit_count": 89208, "repo_created_at": "2016-06-21T19:31:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 104, "forks": 792, "issues": 0, "pull_requests": 9 }, "file_meta": { "content_id": "509...
0e9e23fc-8475-4830-a1f2-6241598fd5a5
yclizhe/acm
POJ/1644/1644.cpp
#include <iostream> #include <cstring> #include <iomanip> using namespace std; #define INF 1<<31 int getNext(int* m, int M, int x) { int r; if(m[x]!=INF) r = x + m[x]; else r = x; if(r>M+1) r = M+1; return r; } int main() { int N; double ** dp; int * m; cin >> N; while(N--) { int M,T; cin >> M >> T...
ALGO
0.999573
3.594739
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2013-09-08T11:38:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2887926e70...
042682ab-6689-440a-b7ed-62bed5fee2fb
npole0103/coding-test-cpp
coding-test-cpp/11444-Matrix.cpp
//#include <iostream> //#include <algorithm> //#include <string> //#include <vector> //#include <set> //#include <map> //#include <queue> //#include <stack> //#include <math.h> //using namespace std; // ////https://codecollector.tistory.com/1058 Âü°í // //vector<vector<long long>> mul(vector<vector<long long>>& a, vect...
ALGO
0.99999
4.047679
{ "github_metadata": { "branch": "master", "commit_count": 229, "repo_created_at": "2022-07-31T17:15: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": "c237d1fc...
4ed3c1d8-a63d-4efa-a730-b1bda38675d6
Atalia404/TareasUniv
Ejercicios_Basicos_C++/ejercicio6/ejercicio6.cpp
// En un supermercado se hace una promoción, mediante la cual el cliente obtiene un descuento dependiendo de un numero que se escoge al azar. Si el numero escogido es menor a 80, el descuento es de 15% sobre el total de la compra, si es mayor o igual a 80 el descuento es de 20%. Obtener cuanto dinero se descuenta. #inc...
ALGO
0.934783
3.827089
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-08-16T00:50: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": "24322e91c9bf...
18483e50-ddde-4db3-8e94-7d31977908de
Ding-Feng/PAT
Advanced_Level/1101.cpp
#include <bits/stdc++.h> using namespace std; int n, cnt; int main() { freopen("in.txt", "r", stdin); cin >> n; vector<int> v(n), ans; int back[n], forward[n]; // back[i] means the biggest in [0,i) // forward[i] means the smallest in (i,n] for (int i = 0; i < n; i++) cin >> v[i]; back[0...
ALGO
0.999998
3.491596
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2018-07-23T05:18: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": "fd46bbe1c...
fdd1882b-d214-4203-bdb9-e5c1557c32c3
dbrisbin/CudaProjects
chapter_15/main.cpp
/// @file main.cpp /// @brief Main function to call the kernel driver to call the appropriate kernel, as determined by /// input argument, on an input file. #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <algorithm> #include <chrono> #include <cmath> #include <utility> #include <vector> #include ...
ALGO
0.996478
5.454878
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-01-29T18:40: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": "ca705ba967f...
3becef0b-f9e8-495c-ba0c-5effb5e7f2de
GIBIS-UNIFESP/BIAL
bial/src/EdgeLazyWalk.cpp
/* Biomedical Image Analysis Library * See README file in the root instalation directory for more information. */ /** * @date 2015/Apr/07 * @brief Edge detection with LazyWalk algorithm. */ #ifndef BIALEDGELAZYWALK_C #define BIALEDGELAZYWALK_C #include "EdgeLazyWalk.hpp" #if defined ( BIAL_EXPLICIT_LIB ) &...
ALGO
0.997224
6.231245
{ "github_metadata": { "branch": "master", "commit_count": 186, "repo_created_at": "2016-10-03T02:55:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10, "forks": 4, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "14287a81...
7f827b3e-57d7-4982-b720-75c279583613
adarsh1928/Problem_Solving_Practice
comp_fund_3/bracket_color.c++
// <NAME> #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vl; typedef vector<vl> vvl; typedef vector<pair<ll, ll>> vp; bool fun1(string s){ stack<char>st; for(ll i=0;i<s.length();i++){ if(st.empty() && s[i]==')'){ return false; } ...
ALGO
0.998768
3.737736
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-08-05T05:29: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": "f39067a5a1...