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
2987c412-dcf5-4e28-97cc-992a45894080
Uspud/Weird
BOJ/C++/Dynamic_Programming_2/11066.cpp
#include <iostream> #define INT_MAX 0x7fffffff using namespace std; int dp[501][501], novel[501], sum[501]; int main(void) { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; while(t--) { int k; cin >> k; for(int i = 1; i <= k; i++) { ...
ALGO
0.999681
3.714497
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2021-12-31T09:32: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": "b51eab99a...
4b0beab7-ed06-4263-8182-767b2853096a
AVVKavvk/DSA
gfg/stack/celebrity.cpp
//{ Driver Code Starts //Initial template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution { public: //Function to find if there is a celebrity in the party or not. int celebrity(vector<vector<int> >& M, int n) { stack<int...
ALGO
0.999522
5.466158
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2023-05-26T10:37: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": "eca939a388...
43eaa91e-1869-4054-8bb5-5367118b046c
Rangel-Plachkov/FMI-codes
Data-Structures-Algorithm/test2/task1.cpp
#include<iostream> #include<cstring> template<typename T> struct Node{ T data; Node<T>* left; Node<T>* right; }; const char* removeFirstChar(const char* word){ if( !strlen(word) ){ return nullptr; } return &word[1]; } bool readSubWord(const Node<char>* tree,const char* word,size_t re...
ALGO
0.99954
3.812048
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2024-03-15T20:48: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": "87005567ed4...
c03032b3-fdc9-4752-9977-870a6a49e893
fengbingchun/GDAL_Test
src/gdal/frmts/mrf/libLERC/BitStuffer2.cpp
/* Copyright 2015 Esri 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 in writing, software distributed un...
TOOL
0.920211
6.718844
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2016-10-06T05:22:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73a84af9...
32735076-c3e1-4958-9a60-776e66c4e57f
ShahidAkhtar777/DS-Algo
Recurssion/next_lexicographical_number.cpp
long long int bobsHomework(int n) { vector<int> nums; while (n != 0) { nums.push_back(n % 10); n = n / 10; } reverse(nums.begin(), nums.end()); int i = nums.size() - 2; while (i >= 0) { if (nums[i] < nums[i + 1]) break; i--; } if ...
ALGO
0.999943
4.000797
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2023-01-29T14:36:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e60836c45...
bc147532-bd30-45f1-b0bd-9cd095af5104
vishwajit-tiwari/C-Plus-Plus
OOPS/class_object/volumeofBox/volumeofBox.cpp
/** * @file volumeofBox.cpp * @author vishwajit-tiwari (https://linkedin.com/in/vishwajit-tiwari) * @brief This program will calculate the volume of a Box by using the concept of Class and Object. * @version 0.1 * @date 29-03-2023 * @copyright Copyright (c) 2023 */ #include<iostream> using namespace std; /***...
TOOL
0.963187
4.65946
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2023-03-07T04:03:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69ef5612ba3...
4427694e-3a20-4bb6-a4b6-a5b1e0424f1d
wmrsmile2018/tasks
task4/task4.cpp
#include <fstream> #include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; struct interval { float fIntervalIn; float fIntervalOut; }; struct visitor { vector<visitor> vVisitor; float fVisitorIn; float fVisitorOut; }; size_t maxCount(vector<visitor>vVisitor, float ...
ALGO
0.991313
4.318745
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-03-07T22:01: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": "ab4ab8747...
3d7063e5-c9d9-4b48-95bf-1240edbff286
amxn18/DSA
DP/DP on Palindrome/palindromicSubStringsMemo.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int dp[1001][1001]; // Recursive function to check if s[i..j] is a palindrome bool check(string& s, int i, int j) { if(i > j) return true; // Empty or single char is a palindrome if(dp[i][j] ...
ALGO
0.999916
7.09794
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2025-05-19T06:16:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "806562c44be...
7270ffa2-3706-498f-b611-8993bab3868b
Alegau03/University
Terzo Anno/Primo Semestre/Ing. Software/Esami/2025-02-05-Alessandro-Gautieri-2041850/4/main.cpp
#include "customer.hpp" #include "server.hpp" #include "data.hpp" #include <fstream> #include <iostream> #include <vector> #include <sstream> #define HORIZON 10000 #define SIMULATIONS 1000 int main() { std::random_device r_device; std::default_random_engine r_engine(r_device()); Stopwatch timer(T); s...
ALGO
0.994937
4.90561
{ "github_metadata": { "branch": "main", "commit_count": 139, "repo_created_at": "2024-01-10T09:02: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": "a3d6c35e0e...
208fabad-5c58-4248-8843-43e0a79ebafd
BUAAZYF/POJ
3045/3045.cpp
#include <algorithm> #include <cstdio> using namespace std; typedef long long ll; const int MAX = 50005; ll inline max(ll a, ll b) { return a >= b ? a : b; } int n; ll ans, W; struct cow { ll w, s; bool friend operator<(const cow& c1, const cow& c2) { return c1.w + c1.s > c2.w + c2.s || c1.w + ...
ALGO
0.999957
3.448259
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2020-05-29T13:12:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23fb44395...
22858290-9072-4209-ad71-82a8de7f1541
sprintr/opengl-examples
OpenGL-MouseDrag-Square.cpp
#include <iostream> #include <gl/glut.h> using namespace std; struct Point { int x; int y; }; Point p1, p2; void init() { glClearColor(1.0, 1.0, 1.0, 0.0); glColor3f(0.0f, 0.0f, 0.0f); gluOrtho2D(0.0, 640.0, 0.0, 480.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glPointSize(1.0f); } void draw_dda(Poin...
TOOL
0.971092
6.028376
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2014-01-31T12:45:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 121, "forks": 84, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "978278...
04fedaf3-c0b5-4757-b366-e71225b56ba0
mkrenik/AdventofCode2021
Day07-WhaleTreachery/main.cpp
#include <iostream> #include <vector> #include <sstream> #include <fstream> #include <algorithm> #include <cmath> #define FILE_NAME "input" std::vector<int> readInput() { std::vector<int> vect; std::fstream f(FILE_NAME, std::ios_base::in); if (f) { std::string temp; while (getline(f, temp, ','))...
ALGO
0.999752
5.294039
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2021-12-01T22:00:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bbd99ce70ef...
71848897-0150-40af-8a83-eb9bdfca2194
pks2906/GFG
Medium/Maximum Tip Calculator/maximum-tip-calculator.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; class Array { public: template <class T> static void input(vector<T> &a, int n) { for (int i = 0; i < n; i++) { scanf("%d ", &a[i]); } } template <class T> static void print(vector<T> &a) { f...
ALGO
0.99995
5.91385
{ "github_metadata": { "branch": "main", "commit_count": 233, "repo_created_at": "2024-05-16T18:49: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": "b133197233...
ec6a0765-c1c4-4f2a-893e-9a9287788848
zjin-lcf/HeCBench
src/nn-sycl/nearestNeighbor.cpp
#include <chrono> #include <sycl/sycl.hpp> #include "nearestNeighbor.h" int main(int argc, char *argv[]) { std::vector<Record> records; float *recordDistances; std::vector<LatLong> locations; int i; char filename[100]; int resultsCount=10,quiet=0,timing=0; int repeat=1; float lat=0.0,lng=0.0; if (pa...
ALGO
0.997582
6.472303
{ "github_metadata": { "branch": "master", "commit_count": 4592, "repo_created_at": "2020-08-06T17:44:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 248, "forks": 89, "issues": 1, "pull_requests": 3 }, "file_meta": { "content_id": "221c...
7da93bbc-e12a-4a5b-a97e-5eb5a3563f12
jindal013/Competitive-Programming
CSES/graph/flightroutes.cpp
#include <iostream> #include <vector> #define endl "\n" using namespace std; int n, m; vector<vector<int>> adj; vector<vector<int>> adj2; vector<bool> visited; int dfs(int s){ if (visited[s]) return 0; visited[s] = true; int num = 1; for (int u : adj[s]){ num += dfs(u); } return n...
ALGO
0.999989
3.75705
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2024-02-05T00:06: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": "7f4ab62730d...
c4ab2798-4e0f-4eee-82c5-15a81cab0511
jsreyl/ProyectoInt
multiplicacion.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include "papi.h" int code_to_be_measured(const double * M1, const double * M2, double * M); int main(int argc, char **argv) { int N = atoi(argv[1]); //We run N with a for loop in bash // Matrix declaration : Modeled as 1D array // Declare as pointers ...
ALGO
0.992824
4.18553
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-10-16T00:31:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4dc1d3723e...
1c251ca8-b373-4ca6-a028-82008d33450e
ja-he/aoc
2020/08/part1/cpp/main.cc
#include <algorithm> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <set> #include <sstream> #include <string> #include <unordered_set> #include <vector> #include <cassert> struct Instruction { std::string opcode; int operand; }; std::ostream& operator<<(std::ostream& o...
ALGO
0.998642
5.284458
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2021-12-11T16:04: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": "a87a17849...
2ccf5f78-c93e-47ff-8f13-38ebf37c3f2c
rui314/mold
third-party/tbb/examples/parallel_reduce/primes/primes.hpp
/* Copyright (c) 2005-2021 Intel Corporation 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 la...
ALGO
0.97868
6.769777
{ "github_metadata": { "branch": "main", "commit_count": 7418, "repo_created_at": "2020-09-29T05:12:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15444, "forks": 506, "issues": 167, "pull_requests": 14 }, "file_meta": { "content_id": "...
dcc42366-b9e0-40ee-85af-587b88a54e94
guillaume-thiry/ETH-AlgoLab-2021
Week 09/placing_knights.cpp
// 1. Model the problem with a graph: // - Because knights on white square can only move to black squares, the graph is bipartite // - Link the squares together if a knigh can move from one to the other // 2. Compute the Maximum Independent Set of the graph thanks to the flow (König theorem, see lecture) #include <i...
ALGO
0.999534
4.689329
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-03-13T16:41: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": "d786b016c537...
61642977-fe1e-4b7a-a614-1984d625ac7a
aeshghi0/developer-Portfolio-1
CPP programs/CS1B assignments/lab 10/main.cpp
/****************************************************************************** * AUTHOR : <NAME> & <NAME> * STUDENT ID : 1103126 - 1112261 * LAB #10 : Creating an Ordered List * CLASS : CS 1B * SECTION : MW - 7:30 pm * DUE DATE : 11/05/2019 *************************************************************...
TOOL
0.972056
3.639781
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2022-03-25T15:18:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5d5ce4ec35...
7ab1ee79-fa7b-47f4-adff-3f4f56995066
ishaansiwach/CS-385-Algorithms
shortestpaths.cpp
/******************************************************************************* * Name : shortestpaths.cpp * Author : <NAME> * Version : 1.0 * Date : 12/4/24 * Description : Using Floyd's algorithm to find shortest paths * Pledge : I pledge my honor that I have abided by the Stevens H...
ALGO
0.999911
4.596445
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-24T23:49: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": "145cfd13aec1...
a86c18a8-adde-48ff-89f0-a9f83f90360c
leokang123/Algorithm
2.7.해시/회있사.cpp
#include <bits/stdc++.h> using namespace std; int main (void) { cin.tie(nullptr)->sync_with_stdio(false); vector<string> s; int n; cin >> n; for (int i = 0 ; i < n ; i++) { string a, b; cin >> a >> b; s.push_back(a); } sort(s.rbegin(), s.rend()); for(int i = 0 ; i < n ; i++) { if (i + 1 < n &...
ALGO
0.999978
3.449244
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2023-10-06T18:32:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4495f9f76c...
cf9f868c-1c22-4307-852c-37bd6730975e
harsh13579/CPP-Codeforces-Codes
1100/the_clock.cpp
#include<bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { string s; cin>>s; int n; cin>>n; long long count = 0; string curr_hr=""; curr_hr+=(s[0]); curr_hr+=(s[1]); string curr_min=""; curr_min+=...
ALGO
0.999707
3.574075
{ "github_metadata": { "branch": "Main", "commit_count": 1, "repo_created_at": "2024-08-19T15:20:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dccec0899227...
7bf8765b-38ab-4c77-9fb5-b9df79d292cc
cuonggpham/HUST-Applied-Algorithms
Renshuu/Graph/bfs_vo_huong.cpp
#include <bits/stdc++.h> using namespace std; int n, m, s, t; //n: so dinh, m: so canh vector<int> adj[1001]; int parent[1001]; vector<bool> visited; void input(){ cin >> n >> m >> s; for(int i=0; i<m; i++){ int x, y; cin >> x >> y; adj[x].push_back(y); adj[y].push_back(x); } f...
ALGO
0.999991
3.716829
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-02-13T21:14: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": "254f12cf1e8...
2e70ddda-37f8-4a31-845e-a6730e924a4e
tshu-w/ICPC
training/HDU/4773.cpp
#include <bits/stdc++.h> using namespace std; #define ass(condition) if (!(condition)) { int x = 1, y = 0; cout << x / y << endl; } const double pi = acos(-1.); const double eps = 1e-8; inline int sgn(double x) { return x < -eps ? -1 : x > eps ? 1 : 0;} inline double sqr(double x) { return x * x;} struct Point { d...
ALGO
0.999667
4.618522
{ "github_metadata": { "branch": "master", "commit_count": 269, "repo_created_at": "2016-04-24T03:41:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 154, "forks": 33, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "645f4...
2e4e082d-a48d-4f2d-973f-88b1886993ad
eclipse-oniro-mirrors/customization_enterprise_device_management
services/edm_plugin/include/utils/nearlink_config_utils.h
/* * Copyright (c) 2025 Huawei Device Co., Ltd. * 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 ...
TOOL
0.904215
6.224508
{ "github_metadata": { "branch": "master", "commit_count": 2116, "repo_created_at": "2023-09-26T17:04:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf7b4c29...
106c406b-1248-4d4b-9df3-0f8df5012be4
Tanzimul-Hasib/All-C-Programs-Algorithms
Count Even & odd number.cpp
#include <stdio.h> int main() { int arr[50]; int i, n, even, odd; /* Input size of the array */ printf("Enter size of the array: "); scanf("%d", &n); /* Input array elements */ printf("Enter %d elements in array: ", n); for(i=0; i<n; i++) { scanf("%d", &arr[i]); } ...
ALGO
0.999305
4.665236
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-07-25T18:38: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": "7e53c96538...
1f99a530-7e91-415f-b0b9-05d09cf14b9a
krisdewa/Source-Code-CPP
KTP Circular Link List.cpp
//1900018336_KrisnaDewaPratama_SELASA16.30 #include <iostream> using namespace std; struct node{ string nik; string nama; string ttl; string jenis_kelamin; string alamat; string rt_rw; string agama; string status_perkawinan; string pekerjaan; string kwn; node *next; } *depan...
ALGO
0.934454
3.533554
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2020-12-30T10:58: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": "f5ce3ee39531...
699889c5-3b32-469b-b18f-51e519b59045
wiwitrifai/competitive-programming
codeforces/neerc-southern-2014/h.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; int c[N]; bool cmp(tuple<int, int, int> le, tuple<int, int, int> ri) { int p, q, r, x, y, z; tie(p, q, r) = le; tie(x, y, z) = ri; return make_tuple(c[p], c[q], c[r]) < make_tuple(c[x], c[y], c[z]); } int main() { int n; scanf("%d", &...
ALGO
0.999992
3.283376
{ "github_metadata": { "branch": "master", "commit_count": 628, "repo_created_at": "2016-05-21T12:11:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 37, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "badcef7...
f44ca01c-5bc0-4162-857d-881e17c79c66
dliangzy/DecayTreeFitter
DecayTreeFitterSvc-00-00-05/src/HelixUtils.cxx
#include <TMath.h> #include <TVector3.h> #include <TVectorD.h> #include "DecayTreeFitterSvc/HelixUtils.h" const double Calpha = -0.00299792458; namespace DecayTreeFitter { /* Eight state vector to helix parameters */ HelixUtils::HelixUtils( const double d0, const double phi0, const double omega, ...
ALGO
0.983622
4.534841
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-09-15T16:04: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": "87c0b4d48254...
af6f6e85-ccd3-4d33-9d74-e748d2ab68f1
Mandar2411/-6Companies30days
Goldman Sachs/8_TotalDecodingMessages.cpp
class Solution { public: int CountWays(string str) { // Code here if (!str.size() || str.front() == '0') return 0; // curr = no of ways to decode message of length i starting from index 0 // prev = no of ways to decode message of length i-1 startin...
ALGO
0.999913
4.788085
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2022-01-05T14:52: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": "225c2445e...
1cecba27-79af-4f12-89b3-083eb00fc707
CGJiaxiLiu/MyPortfolio
UE4_Project/Physics_In_UE4/ChronoPhysicsDemo/Plugins/ChronoPhysics/Source/ChronoPhysics/Include/chrono/collision/edgetempest/ChCOBBcollider.h
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of t...
ALGO
0.997588
6.989577
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2019-09-23T19:42:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19eb4840e...
180f3e89-5697-4652-934c-6c424a7bdd90
Trietptm-on-Coding-Algorithms/online-judge
kattis/creditcard.cpp
#include <iostream> using namespace std; long long convert(double d) { return 100.0 * d + 0.5; } long long apply_rate(long long rate, long long balance) { long long big_thing = rate * balance; bool round_up = big_thing % 10000 >= 5000; return big_thing / 10000 + round_up; } int main() { int num...
ALGO
0.999669
4.037652
{ "github_metadata": { "branch": "master", "commit_count": 196, "repo_created_at": "2017-05-25T05:02:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb15e7edf...
9cc57412-d75b-44c7-a7fb-1f5201cba5cb
Sreekara-Madyastha/Park-in-opengl
main.cpp
#include<bits/stdc++.h> #include<stdio.h> #include<math.h> #include <GL/glut.h> // #include<GL/gl.h> // #include "SOIL/SOIL.h" float Angle=0; float Direction=0; float people[2][2]={{0.3,0.2},{-2.3,0.7}}; #include "movement.cpp" #include "objects.cpp" int widthWindow=900, heightWindow=700; static GLfloat viewer[] ...
TOOL
0.942428
3.417093
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2023-03-27T10:15:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2476c9e83...
96c74334-d1ca-4e46-a497-57e57ad70cd5
OpenSourceRisk/Engine
QuantExt/qle/math/deltagammavar.cpp
/* Copyright (C) 2016 Quaternion Risk Management Ltd All rights reserved. This file is part of ORE, a free-software/open-source library for transparent pricing and risk analysis - http://opensourcerisk.org ORE is free software: you can redistribute it and/or modify it under the terms of the Modified BSD License...
ALGO
0.999751
6.037656
{ "github_metadata": { "branch": "master", "commit_count": 24865, "repo_created_at": "2016-10-07T09:15:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 567, "forks": 245, "issues": 58, "pull_requests": 7 }, "file_meta": { "content_id": "39...
598b9a69-a15e-41f5-99a5-1eed6b5a34af
AndreiBourceanu/AdventOfCode
2022/Day1/Part2.cpp
#include <iostream> #include <fstream> #define ll long long using namespace std; ifstream fin("inputf/in.txt"); ll array_to_int(char* arr) { if (arr != NULL) { int i = 0; ll nr = 0; while (arr[i] != '\0') { nr = nr * 10 + (arr[i] - '0'); i++; } return nr; } return -1; } int main() { char s[25...
ALGO
0.998781
3.654707
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-12-04T11:44:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5cf562763264...
fa03c36a-57ed-4d00-9440-9489a726de3c
biswajit-k/DSA
leetcode/problems/minimize_the_total_price_of_the_trips/solution.cpp
class Solution { public: int minimumTotalPrice(int n, vector<vector<int>>& edges, vector<int>& price, vector<vector<int>>& trips) { vector<int> adj[n]; for(auto& edge: edges) adj[edge[0]].push_back(edge[1]), adj[edge[1]].push_back(edge[0]); vector<int> times(n); function<bool(int, int, ve...
ALGO
0.999495
5.697186
{ "github_metadata": { "branch": "main", "commit_count": 501, "repo_created_at": "2023-06-11T15:37: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": "3c981a7dad...
18ee3c78-9515-4b3b-ab4e-db69b2277c73
geegatomar/Algorithms
SegmentTrees/count_of_elements_divisible_by_3_in_range.cpp
#include<bits/stdc++.h> using namespace std; int a[100005]; struct data { int cnt1, cnt2, cnt0; }; data tree[400005]; data make_data(int val) { data res; res.cnt0 = res.cnt1 = res.cnt2 = 0; val = val % 3; if(val == 1) res.cnt1 += 1; else if(val == 2) res.cnt2 += 1; else res.cnt0 += 1; return res; } ...
ALGO
0.99993
3.828266
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2020-08-20T09:06:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0cc0e99f...
ec56a34b-fcb8-48c7-8cb7-710942aa27d6
ishandutta2007/codeforces-i
itst/normal/1140/F.cpp
#include<iostream> #include<cstdio> #include<cstdlib> #include<ctime> #include<cctype> #include<algorithm> #include<cstring> #include<iomanip> #include<queue> #include<map> #include<set> #include<bitset> #include<vector> #include<stack> #include<cmath> #include<random> //This code is written by Itst using namespace std...
ALGO
0.999842
3.50258
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05: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": "73185f65d8b3...
0a4ea8d2-ce68-4117-b0d6-a5ac34af7191
allenanswerzq/byteme
old/codeforces/random/186a/186a.cpp
//============================================================================ // Name : 186a // Date : Fri Apr 26 19:10:36 CST 2019 // Author : landcold7 // Description : Actions speak louder more than words //============================================================================ #include <bit...
ALGO
0.999998
4.307398
{ "github_metadata": { "branch": "master", "commit_count": 810, "repo_created_at": "2017-06-16T09:27:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73cec2a7...
12f594d6-2e04-4aea-b394-65cac2d89e68
melikesna/Data-Structure
Largest to smallest.cpp
#include <stdio.h> #include <stdlib.h> #include <time.h> // Define a struct for a Node in the linked list struct Node { int data; // Data stored in the node struct Node* next; // Pointer to the next node in the list }; // Function to create a new node with given value struct Node* createNode(int va...
ALGO
0.999949
5.142632
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-10-28T17:09:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88ddccaf4786...
e1f114b3-d39a-4292-a562-fd1b1b196b06
AntennaeVY/CP
CodeForces/1700/Palindromic Matrix.cpp
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> a(n*n); for(auto &ai : a) cin >> ai; map<int, int> m; for(auto &ai : a) m[ai]++; priority_queue<pair<int, int>> q; for(auto &[ai, c] : m) q.push({c, ai}); vector<vector<int>> matrix(n, vector<int>(n, 0)); for(int...
ALGO
0.999989
3.974834
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2022-02-13T15:13:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f44a82e94ab...
64eb261a-2d41-4020-ba48-c4335f80888d
nawZeroX239/competitive-programming
UVAOJ/497.cpp
#include <algorithm> #include <array> #include <bitset> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #include <forward_list> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <queue> #includ...
ALGO
0.999947
3.804165
{ "github_metadata": { "branch": "master", "commit_count": 591, "repo_created_at": "2020-03-11T02:10: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": "770e0f55...
ba579648-2867-4b76-a5b8-66fd485b6ce3
DollarAkshay/C-and-CPP-Programs
CodinGame/Triangulation.cpp
/*~~~~~~~~~~~~~~~~~~* * * * $<NAME>$ * * * *~~~~~~~~~~~~~~~~~~*/ // #include <stdio.h> #include <stdlib.h> #include <string> #include <math.h> #include <ctype.h> #include <time.h> #include <assert.h> #include <algorithm> #include <iostream> #include <queue> #include <stack> #inc...
ALGO
0.999884
3.669332
{ "github_metadata": { "branch": "master", "commit_count": 666, "repo_created_at": "2014-02-07T06:31:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 53, "forks": 61, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "ca11c8...
fa5dcacc-7489-478e-b0e8-3ba5e6c50ec9
artificial-intelligence-department/ai_programming_playground_2024
ai_12/anton_mykhalchuk/epic_1/number_system_task_1_anton_mykhalchuk.cpp
#include <iostream> // Підключення бібліотеки для введення та виведення даних #include <string> // Підключення бібліотеки для роботи зі строками (не використовується в коді) using namespace std; // Функція перевіряє, чи можна представити число `n` в системі числення з основою `base` так, // щоб всі цифри цього ...
ALGO
0.999955
5.528103
{ "github_metadata": { "branch": "main", "commit_count": 2638, "repo_created_at": "2024-09-22T19:14:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "654f7c0fd0...
7263f979-2651-4a4a-870b-e26440767307
eggplanty/CPPAlgorithmLearning
vector_matrix/vector_matrix_problem.cpp
// // Created by XBB-PC on 2020/6/24. // #include <iostream> #include <cstring> #include <math.h> #include <vector> #include <queue> #include <deque> #include <map> using namespace std; /** * 283. 移动零 * 给定一个数组 nums,编写一个函数将所有 0 移动到数组的末尾,同时保持非零元素的相对顺序。 * 必须在原数组上操作,不能拷贝额外的数组。 * 尽量减少操作次数。 * * 考虑双指针,慢指针前的所有元素都是非零的...
ALGO
0.999484
5.460217
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-06-15T01:34:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ada9ed1f3...
c2c40b6e-8c46-44c6-b90a-1e1fe8eff78a
AarushJ/competitive-programming
Online judge solutions/Spoj/SPP.cpp
/* <NAME> @vivace TOPIC : Matrix exponentiation, prefix sums LOGIC : Let S(n) = a(1) + a(2) + ... + a(n) Then S(n) = S(n-1) + a(n) => 1st recurrence Further => a(n) = a(n-1) + a(n-2) + ... + a(n-k) => 2nd recurrence Make 1 transition matrix only to handle both => O((k^3)*log(n)) per test case */ #inc...
ALGO
0.99996
4.014955
{ "github_metadata": { "branch": "master", "commit_count": 354, "repo_created_at": "2016-12-21T16:26:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "32b0714...
fc98edd4-f464-4560-be9e-1d1a97f8cc07
vp2312/DSA
Shortest Common Supersequence - GFG/shortest-common-supersequence.cpp
// { Driver Code Starts //Initial template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution { public: //Function to find length of shortest common supersequence of two strings. int shortestCommonSupersequence(string X, string Y,...
ALGO
0.999978
5.870868
{ "github_metadata": { "branch": "main", "commit_count": 1057, "repo_created_at": "2022-01-18T12:49:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a84176735...
5e3c198e-f517-48ad-8844-c98cd0a63240
bmhruthik/cpp-journey
queue#1.cpp
#include<iostream> #include <algorithm> using namespace std; int* del(int *arr,int n,int x) { for(int i=n;i<n-1;i++) { arr[n]=arr[n+1]; } return arr; } int* rem(int *arr,int n,int q) { int res; for(int i=0;i<n;i++) { if(arr[i]%3==1||arr[i]%3==2) { int ch=arr[i]%3; if(q==2&&ch==2) { ar...
ALGO
0.999946
3.551152
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-08-21T07:24: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": "a8528ca626...
c69bb3d9-8a0b-4585-ac0e-0a2e2409ad71
ru-ccmt/eDMFT
src/impurity/ctqmc/bathp.h
// @Copyright 2007 <NAME> // class BathProb{ public: int N_ifl; vector<double> BathP; public: BathProb(const vector<double>& BathProbability, const ClusterData& cluster): N_ifl(cluster.N_ifl), BathP(N_ifl){ for (int ifl=0; ifl<cluster.N_ifl; ifl++){ for (int i1=0; i1<cluster.ifl_dim[ifl]; i1++){ for ...
ALGO
0.988954
4.086876
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2024-03-29T22:52:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 29, "forks": 3, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "943ac523e...
79161d2c-4875-4d3d-ae1b-f34f4677e803
hyunS00/algorithm
백준/Cpp/1238.cpp
#include<iostream> #include<vector> #include<queue> #include<algorithm> #define COST first #define VERTEX second using namespace std; const int INF = 1e9 + 10; int n, m, x; // 비용, 도시 vector<pair<int, int>> adj[1005]; priority_queue<pair<int, int>, vector<pair<int,int>>, greater<pair<int,int>>> pq; int d[1005]; int co...
ALGO
0.999959
4.610349
{ "github_metadata": { "branch": "main", "commit_count": 416, "repo_created_at": "2022-11-20T05:05:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a80d5b6b1...
5167e94c-7081-4dd3-be2e-3652917c2e3f
MariaHajdic/CUDA_Supercomputers_MSU
main.cpp
#include <stdio.h> #include <vector> #include <queue> #include <string> #include <cstdlib> #include <cstdint> #include <ctime> #define N 9 // Max num of terms for polynomial combinations. /* Type alias for representing functions with 64-bit integers. */ using fn_type = uint64_t; /* Struct storing a val and its strin...
ALGO
0.999941
5.095126
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-12T16:10: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": "faf7424407a9...
8de9ef97-1aef-46e5-9655-6832dcf73e25
JiFeiYe/C_Cplusplus
VS/C语言/OJ2021.11.15附加题/找完数.cpp
//注意mn相同的情况 #include<stdio.h> //判断是否为完数 int judge (int a) { int sum = 0; for (int i = 1;i < a; i++) { if (a % i == 0) { sum += i; } } if (sum == a) return 1; return 0; } int main() { int m = 0, n = 0, judge_ = -1, temp = 0; scanf("%d%d", &m, &n); for (int a = m; a <= n; a++) { judge_ = judge(a)...
ALGO
0.999933
3.719649
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-10-14T08:18: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": "72a61d99ad7...
12a589c2-6314-45d0-a701-9d6bf07f72fc
RGTechno/CompetitiveProgramming
kickstart/roundC_2022/Palindromic_Deletions.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define int long long int #define mod 1000000007 bool isPalin(string &s) { string t = s; reverse(t.begin(), t.end()); return s == t; } void solve(string s, int n, int &ans) { if (n == 0) { ans += 1; return; } ...
ALGO
0.999993
4.766542
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2021-04-05T07:51:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c4f578942...
8812699c-ba61-4db8-b41f-541020615909
nucleargezi/acm-icpc
codeforces/gym/103800_The 2022 SDUT Summer Trials/103800C.cpp
#include "MeIoN_Lib/MeIoN_all.hpp" void before() {} // #define tests NAME MeIoN_is_UMP45() { int n, mod; std::cin >> n >> mod; vector<ll> a(n); std::cin >> a; if (n < 18) { bool f{}; vector<int> c(mod); for (int msk{}; msk < (1 << n) and not f; ++msk) { ll s{}; ...
ALGO
0.999721
4.338845
{ "github_metadata": { "branch": "master", "commit_count": 264, "repo_created_at": "2024-10-29T13:52:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "264bd11b...
637b7a2e-559f-4e49-bee8-208bb7069255
singh-shreya27/DSA
BinarySearch.c++
//Binary Search. //Take a unique SORTED array. //[3,4,6,7,9,12,16,17] ..find target=6 in this array. //take two pointers: low=3, high=17..indexes are from 0 to 7 //so mid=0+7/2=3.5 ~3 //iterative code. int binarySearch(vector<int> &nums, int target){ int n=nums.size(); int low=0,high=...
ALGO
0.999992
5.670376
{ "github_metadata": { "branch": "main", "commit_count": 144, "repo_created_at": "2024-10-29T11:16: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": "7637031689...
592effe6-00f9-4b5d-af9b-34d187c13fbb
woohyunjng/Coding-Practice
PS/Baekjoon/33000/33043.cpp
#include <bits/stdc++.h> #define int long long #define MAX 100100 using namespace std; map<string, int> cnt; string arr[MAX]; signed main() { ios_base::sync_with_stdio(false); cin.tie(0), cout.tie(0); int N, st, en, mid, res = -1; bool flag; cin >> N; for (int i = 1; i <= N; i++) ci...
ALGO
0.99995
4.176816
{ "github_metadata": { "branch": "main", "commit_count": 485, "repo_created_at": "2022-06-04T14:40:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7eddeaeedd...
073bfcbf-7b91-40fe-8692-92dea017c2ba
Pavan2100/MSIS
VP/Prgm5.cpp
//Write C++ program to find length of string using pointers. // #include <iostream> // using namespace std; // int main() // { // char *str; // cout << "Enter the string: " << endl; // cin >> str; // int count = 0; // while(*str != '\0') // { // count++; // str++; // } //...
TOOL
0.967587
5.285649
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-01-25T08:45: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": "0216651cbb10...
b22bc26e-9c4d-4c91-a93d-a4d034b20174
tonychen0513/AlgoTest
SwipeNumBackToOrder.cpp
// // SwipeNumBackToOrder.cpp // AlgoTest // // Created by <NAME> on 27/08/2016. // Copyright © 2016 <NAME>. All rights reserved. // #include <iostream> #include <vector> #include <unordered_map> #include <gtest/gtest.h> #include <gmock/gmock.h> using namespace std; void _swapNode(vector<int>& inputOutput, int p...
TEST
0.958132
5.669576
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-07-11T13:47: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": "a11344f222...
9995155f-a9aa-46c3-a6ad-413e2b59c18b
Gaurav9695328446/dsa-treasure
2024/apr/20-04-24.cpp
/* URL: https://leetcode.com/problems/find-all-groups-of-farmland/description/?envType=daily-question&envId=2024-04-20 1992. Find All Groups of Farmland You are given a 0-indexed m x n binary matrix land where a 0 represents a hectare of forested land and a 1 represents a hectare of farmland. To keep the land organi...
ALGO
0.999978
6.997984
{ "github_metadata": { "branch": "master", "commit_count": 199, "repo_created_at": "2023-12-30T12:08: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": "33d8467a...
cb0c52d0-a228-4cfd-b8e0-33a1618bb3a6
BuschMath/QueueSystems
QueueSystems/JacksonNetwork.cpp
#include "JacksonNetwork.h" #include <numeric> #include <random> // ------------------------- // JacksonMM1Queue Implementation // ------------------------- JacksonMM1Queue::JacksonMM1Queue(Simulation& sim, double arrivalRate, double serviceRate, int nodeId, JacksonNetwork* network) : MM1Queue(sim, arrivalRate, se...
ALGO
0.902169
5.852066
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2025-02-20T18:00: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": "4d02693a5...
e6a5c886-c78d-4262-a963-cef992ccb32c
discoversaurabh/LeetCode
SearchInsertPosition.cpp
/* Search Insert Position Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order. You may assume no duplicates in the array. Example 1: Input: [1,3,5,6], 5 Output: 2 Example 2: Input: [1,3,5,6], 2 Output: 1 Example ...
ALGO
0.99999
6.152701
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2020-03-23T10:06:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd788033...
6a3d36e8-4a5a-4d52-82ea-b11b62666c0f
chiangqiqi/another_ray_tracer
src/Cylinder.cpp
#include "Cylinder.h" #include <limits> #include <cmath> using namespace Raytracer148; using namespace Eigen; using namespace std; HitRecord Cylinder::intersect(const Ray &ray) { HitRecord result; result.t = -1; Vector3d delta = ray.origin - p; // //compute the distance between the ray and the line // Vecto...
ALGO
0.909252
4.380511
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2013-11-29T16:09:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e20893b6...
dbe6ada9-15b3-41c1-b515-b01cc76c3ee7
octoplus/algorithms
回文子序列/LPS.cpp
#include <bits/stdc++.h> using namespace std; #define MAXL 200 int dp[MAXL][MAXL]; string recover(string s) { int n = s.size(); // 恢复最长回文子序列 int l = dp[0][n - 1]; char lps[l + 1]; memset(lps, '\0', sizeof(lps)); int i = 0, j = n - 1; while (i <= j) { while (i <= j && dp[i][j]...
ALGO
0.999995
4.38273
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2018-04-08T03:06: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": "c1e74ff8c...
f25eb162-21fc-4613-a035-b352e1f07270
mdwu0526/botlab
mbot/mbot_autonomy/src/planning/obstacle_distance_grid.cpp
#include <planning/obstacle_distance_grid.hpp> #include <slam/occupancy_grid.hpp> ObstacleDistanceGrid::ObstacleDistanceGrid(void) : width_(0), height_(0), metersPerCell_(0.05f), cellsPerMeter_(20.0f) { } void ObstacleDistanceGrid::initializeDistances(const OccupancyGrid &map) { //////////// TODO: initialize ...
ALGO
0.998513
6.070125
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2024-01-25T20:53:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f6bcb9724d...
0e1ebc27-059b-4b80-a0a6-c195b9c5db76
yuhsuanyang/leetcode
C++/find_mode_in_binary_search_tree.cpp
//no. 501 #include <vector> #include <map> #include "tree_node.h" using namespace std; class Solution { public: vector<int> findMode(TreeNode* root) { vector<int> ans; if(!root->left & !root->right){ ans.push_back(root->val); return ans; } vector<TreeNode*> c...
ALGO
0.99999
5.321021
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2019-02-19T03:43: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": "accf3e4d8...
f70e80ef-79c7-4cbc-93b4-165ced415bb8
Yefri97/Competitive-Programming
Contests/CodeChef/May 18/May Cook Off/Difficult Choice.cpp
#include <bits/stdc++.h> #define endl '\n' #define debug(X) cout << #X << " = " << X << endl #define fori(i,b,e) for (int i = (b); i < (e); ++i) using namespace std; typedef long long ll; typedef vector<int> vi; typedef pair<int, int> ii; const int oo = 1e9, MN = 1e5 + 10; ll ans; ll M[5][5]; int b[MN]; vi g[MN]; ...
ALGO
0.999941
4.320057
{ "github_metadata": { "branch": "master", "commit_count": 378, "repo_created_at": "2016-06-01T01:51:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fec30b33...
1cf6880c-69d3-43a6-8a68-ab64eb351638
nicolaprezza/ebwt2InDel
vcf_vs_vcf.cpp
// Copyright (c) 2018, <NAME>. All rights reserved. // Use of this source code is governed // by a MIT license that can be found in the LICENSE file. #include <iostream> #include <fstream> #include <assert.h> #include <vector> #include <unistd.h> #include <sstream> #include <set> #include <cstring> #include "include....
DATA
0.923672
4.096622
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2018-12-21T10:14:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 4, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "24efc0a58...
a2dd0169-e96c-4564-aa47-1cb17e9de1f2
BioscaG/PRO1
ExamensAnticsC2/X16146.cc
#include <iostream> #include <vector> using namespace std; vector<int> create_vector(int n) { vector<int> v(n); for (int i = 0; i < n; ++i) { cin >> v[i]; } return v; } double mitjana_pars(const vector<int>& v) { double count = 0; double mitjana = 0; for (int i = 0; i < v.s...
ALGO
0.999352
4.00355
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-05-25T16:01: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": "c670e15e02c4...
88e7d8ef-d925-4dd3-8d48-0923e8f5f929
all1m-algorithm-study/2024-1-Algorithm-Study
week4/group1/3020_shhy01.cpp
// https://www.acmicpc.net/problem/3020 // 장애물(석순, 종유석)로 가득찬 동굴. // 동굴의 길이는 N미터(짝수, 2~200,000), 높이는 H미터(2~500,000이다. // 첫번째 장애물은 항상 석순, 그다음은 종유석과 석순이 번갈아가며 등장. // 장애물을 피하지 않고, 지나갈 일직선의 높이를 결정하면, 만나는 장애물을 파괴한다. // 이때, 동굴의 크기 N과 높이 H, 모든 장애물의 크기가 주어지면, // 파괴해야 하는 장애물의 최솟값과, 이를 만족하는 구간이 총 몇개인지 구하자. // [!] 주어진 파괴 수 x 내로...
ALGO
0.999944
4.078104
{ "github_metadata": { "branch": "main", "commit_count": 131, "repo_created_at": "2024-05-04T02:58:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 13, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "c9f0fb925e...
6004c65e-9531-4d7c-a600-5941dca54576
mikedasuya/ds
game/engine/hdr/engine.h
#ifndef __ENGINE_H #define __ENGINE_H #include "Common.h" namespace ENGINE { class Engine { private: int column(int ar[3][3], INPUT val); int diagnals(int ar[3][3], INPUT val); int rows(int ar[3][3], INPUT val); bool column0Contains(int ar[3][3], INPUT val); bool column1Contains(int ar[3][3], INPUT val); b...
ALGO
0.974585
3.491491
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2012-12-30T21:13: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": "af7119135...
15e2cf29-56bb-4ec7-8a7b-852d9af07913
tonyu0/compro-library
math/babyStepGiantStep.cpp
#include <algorithm> #include <cmath> #include <iostream> #include <unordered_map> using namespace std; using ll = long long; // 説明: g^x ≡ y (mod p)をO(√p)で解く。 // Baby step: // m = √p // x^0, x^1, x^2, ... (baby step) // それぞれのbaby stepを // n^e (mod p) int64_t mod_pow(int64_t n, int64_t e, int64_t p) { int64_t res = ...
ALGO
0.999971
4.659791
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2019-05-29T12:03: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": "5a7a51756...
4782765d-5078-4c93-9300-cac33f9be8e0
suyinlong/leetcode
288-Unique.Word.Abbreviation.cpp
class ValidWordAbbr { private: unordered_map<string, vector<string>> abbr; public: ValidWordAbbr(vector<string> &dictionary) { for (string s: dictionary) { int n = s.length(); string ab; if (n <= 2) ab = s; else ab = s.subst...
ALGO
0.997874
5.494141
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-01-23T16:51: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": "8354e2f5d...
1454ad4a-aae1-426c-8fc0-08f094b741b8
amanraox/-DSA-
3213-count-subarrays-where-max-element-appears-at-least-k-times/count-subarrays-where-max-element-appears-at-least-k-times.cpp
class Solution { public: long long lessThanK(vector<int>& nums, int k, int& maxv) { long long ans = 0; int valid = 0; for (int i = 0, j = 0; j < nums.size(); j++) { int c = nums[j]; if (c == maxv) valid++; while (i <= j and v...
ALGO
0.999847
5.734509
{ "github_metadata": { "branch": "main", "commit_count": 2913, "repo_created_at": "2023-07-09T18:06: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": "44622dee3...
5a2719c9-c858-4bf0-aee1-ae9cb8a689be
detectivemark7/aprg
AprgAlgorithm/AprgAlgorithm/src/Algorithm/SetAndSymbolTable/Common/BinarySearchTree/BinarySearchTreeNodes.hpp
#pragma once #include <memory> namespace alba { namespace algorithm { enum class RedBlackColor { Red, Black }; template <typename Key> struct BasicTreeNode { Key key; std::unique_ptr<BasicTreeNode> left; std::unique_ptr<BasicTreeNode> right; int sizeOfThisSubTree; }; template <typename Key> struct...
ALGO
0.994789
5.92253
{ "github_metadata": { "branch": "main", "commit_count": 687, "repo_created_at": "2021-08-07T08:34:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c35b54e08f...
d23afcd4-622e-4531-9c5d-db2a7435b36e
aguss-afk/ioi2025
DP PRACTICE/AtCoder Educational DP Contest/E_Knapsack_2.cpp
#include <bits/stdc++.h> #define dbg(x) cerr << #x << ": " << x << '\n'; #define dbgv(v) cerr << #v << ": "; for(auto &el : v) cerr << el << " "; cerr << '\n'; using namespace std; using ll = long long; bool test_cases = 0; void solve(){ int n, m; cin >> n >> m; vector<pair<ll, ll>> arr(n); ll sum =...
ALGO
0.99998
3.968307
{ "github_metadata": { "branch": "main", "commit_count": 113, "repo_created_at": "2024-10-08T01:04:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16e13d6a7f...
ff23ad98-acaa-4266-af38-4b3810d14ca1
ravimanumachu/hclmpifft
hpopt/src/memorization.cpp
/*--------------------------------------------------------*/ /* @file @author <NAME> <<EMAIL>> @version 1.0 */ /*--------------------------------------------------------*/ #include <iostream> #include "memorization.h" /*--------------------------------------------------------*/ using namespace std; /*-----------...
ALGO
0.976489
4.394022
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2018-09-05T08:46: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": "66d375a77...
d2615173-5596-44c1-8c7a-3e77c0474360
Flgodd/pairs_trading
differnt version/idkReally.cpp
#include <benchmark/benchmark.h> #include <vector> #include <fstream> #include <sstream> #include <string> #include <numeric> #include <cmath> //#include <immintrin.h>' #include <iostream> #include <vector> #include <deque> #include <fstream> #include <sstream> #include <string> #include <numeric> #include <cmath> #inc...
ALGO
0.968783
5.684056
{ "github_metadata": { "branch": "main", "commit_count": 810, "repo_created_at": "2024-02-14T14: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": "f20fe3a45b...
667e67c9-b7d3-43d9-935f-01fe76df6cc4
ColorMeBoom/ColorMeBoom
WorkingPrimeCalc.ino
//Arduino project. //Arduino Mega, lcd screen, 10k potentiometer, button. //Prints a prime number on the second line and moves to the next prime number with each press of the button #include <LiquidCrystal.h> const int d4 = 2, d5 = 4, d6 = 6, d7 = 8, rs = 12, en = 10; const int buttonPin = 24; int num = 1, buttonS...
ALGO
0.961788
4.37231
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-05-22T21:53:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6f5c9efbf327...
53a05924-f5ca-42eb-afba-a999113acea5
sameg14/josh
hw/hw2/is_valid_email.cpp
/* Problem 2 (2 points). Suggested time: 15 minutes. Write a function called is_valid_email that takes an array of characters representing an email id, the array's size, and returns true if it is a valid email id, else false. An email id is valid if it contains a sequence of characters followed by ‘@’, followed by anot...
ALGO
0.985268
5.876254
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2015-12-05T19:06: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": "d467ff9f5b...
cd376fea-e9ec-415f-8bcd-0a593e0b6f72
AntonC9018/ASDC
ASDC_LAB_03_LinkedLists/main.cpp
#include <iostream> #include <cassert> template<typename T> struct Node { T data; Node* next; Node(const T& value) : data(value), next(nullptr) {} }; template<typename T> struct LinkedList { Node<T>* first; Node<T>* last; size_t size; LinkedList() : first(nullptr), last(nullptr), size(0)...
ALGO
0.999695
6.710326
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-04-26T22:07: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": "8e57d5410db...
33ec97aa-50a2-4247-bb82-00d179660779
Jacky-He/Competitive-Programming
Competitive Programming/Exam in BerSU (easy version)/Exam in BerSU (easy version)/main.cpp
#include <bits/stdc++.h> using namespace std; int n, m, num; vector <int> students; map <int, int, greater <int>> timespendcnt; int main () { scanf ("%d%d", &n, &m); int sum = 0; for (int x = 0; x < n; x++) { scanf ("%d", &num); sum += num; int extra = sum - m; int res...
ALGO
0.999969
3.107838
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2019-12-16T00:01: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": "04dd38d2c...
304d4bfd-a9f3-4f77-93fe-1abe09ba2b09
Balajiganapathi/code
cc/old/junco/chefland.cpp
/* string coder = "<NAME>"; // Never give up! */ //#define LOCAL #ifdef LOCAL # define TRACE # define TEST #else # define NDEBUG //# define FAST #endif #include<bits/stdc++.h> using namespace std; /* aliases */ using vi = vector<int>; using pi = pair<int, int>; using ll = long long int; /* shortcut mac...
ALGO
0.999826
3.698043
{ "github_metadata": { "branch": "master", "commit_count": 134, "repo_created_at": "2016-05-31T16:18:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5860d23b...
28987cf7-3448-417d-bd66-9680d2362c23
AppStat/MultiBoost
src/StrongLearners/SoftCascadeLearner.h
/* * * MultiBoost - Multi-purpose boosting package * * Copyright (C) AppStat group * Laboratoire de l'Accelerateur Lineaire * Universite Paris-Sud, 11, CNRS * * This file is part of the MultiBoost library * * This library is free software; you...
DATA
0.946133
5.280713
{ "github_metadata": { "branch": "Release", "commit_count": 11, "repo_created_at": "2012-11-06T15:19:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 27, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "768eac9...
a8553457-88d7-4aaf-bf84-e64883fda7a9
alexandrezamberlan/pesquisa_ordenacao
03-ordenacao/CPP/metodosOrdenacao_old.h
#include <iostream> void bolha(int *vetor, long long int n) { bool houveTroca; int tmp; long long int i; long long int qtdComparacoes = 0, qtdTrocas = 0; do { houveTroca = false; for (i = 0; i < n-1; i++) { // qtdComparacoes++; if (vetor[i] > vetor[i+1]) { ...
ALGO
0.999526
3.978918
{ "github_metadata": { "branch": "master", "commit_count": 169, "repo_created_at": "2020-08-13T18:34:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a8c4ab0...
4bbf54c6-e2e1-412c-bb3d-11ac65daa016
KatrinJo/Riichi-Mahjong-judge
mahjong.h
#pragma once #include <algorithm> #include <utility> #include <vector> #include <string> #include <unordered_map> #include <cstring> #include <string.h> #include <iostream> #include <set> #include <functional> #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <math.h> #include <map> #include <numeric> ...
TOOL
0.909438
3.755722
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-10-20T13:39:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d065e91a61...
6be21c8e-5cea-4ea2-923e-f1a2b88054d3
cms-sw/root
math/mathcore/src/BrentMinimizer1D.cxx
// @(#)root/mathcore:$Id$ // Author: <NAME> 2/2008 /********************************************************************** * * * Copyright (c) 2004 Maline, CERN/PH-SFT * * ...
ALGO
0.999792
6.144907
{ "github_metadata": { "branch": "master", "commit_count": 61857, "repo_created_at": "2014-02-14T08:31:51.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "root-project/root", "stars": 4, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "conten...
999053e1-ca61-408f-8f6b-2b69c01e8677
dirizarryher/hw1
hw1.cpp
//Name: <NAME> //cs335 Spring 2015 Lab-1 //This program demonstrates the use of OpenGL and XWindows // //Assignment is to modify this program. //You will follow along with your instructor. // //Elements to be learned in this lab... // //. general animation framework //. animation loop //. object definition and movement...
TOOL
0.972733
4.59632
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-04-10T02:37: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": "9edda9cea...
aebbfc41-da33-4000-b27d-ec9302cbee76
suraj0709/LeetCode_CPP_DSA
0143-reorder-list/0143-reorder-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: void reorderList(List...
ALGO
0.999976
6.162629
{ "github_metadata": { "branch": "main", "commit_count": 249, "repo_created_at": "2024-01-25T18:14: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": "9ff7785ce6...
b15fc30b-f842-49fa-83af-b038e5d13a15
GRTLCollaboration/Chombo
lib/src/EBAMRElliptic/NeumannViscousTensorDomainBC.cpp
#ifdef CH_LANG_CC /* * _______ __ * / ___/ / ___ __ _ / / ___ * / /__/ _ \/ _ \/ V \/ _ \/ _ \ * \___/_//_/\___/_/_/_/_.__/\___/ * Please refer to Copyright.txt, in Chombo's root directory. */ #endif #include "BoxIterator.H" #include "NeumannViscousTensorDomainBC.H" #include ...
ALGO
0.99545
6.178745
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2018-01-30T14:07:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 12, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "30a62784e7...
f519f198-4c7a-4bd5-9fec-958beaebc3db
sbite0138/ac-committer
submissions/rcl-contest-2020-final/rcl_contest_2020_final_b/AC_10582307.cpp
#include <bits/stdc++.h> #define _overload3(_1, _2, _3, name, ...) name #define _rep(i, n) repi(i, 0, n) #define repi(i, a, b) for (ll i = (ll)(a); i < (ll)(b); ++i) #define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__) #define ll long long #define lld long double #define ALL(x) x.begin(), x.end() using n...
ALGO
0.999952
4.429986
{ "github_metadata": { "branch": "master", "commit_count": 3134, "repo_created_at": "2020-05-30T09:45: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": "3d38870...
8040e228-f902-4be3-ad21-e15e9f273def
kilian-gebhardt/panda-parser-backend
Legacy/eigen_test.cpp
// // Created by kilian on 23/01/17. // #include <eigen3/unsupported/Eigen/CXX11/Tensor> #include <iostream> #include <vector> #include <stdio.h> #include "EigenUtil.h" //template<typename Val> //Eigen::Tensor<Val, 1> rule_probs(const Eigen::Tensor<Val, 1> & rule_las, const std::vector<Eigen::Tensor<Val, 1>> & rhs_l...
ALGO
0.947784
4.725058
{ "github_metadata": { "branch": "master", "commit_count": 352, "repo_created_at": "2018-06-08T12:57:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7bff3ddd...
c0ecc944-f0f6-4d61-9443-7b65c0a27cbf
avadapal/Heuristics-Matrix-Factorization
util.h
#include<vector> #include<iostream> using namespace std; vector<double> generate_random_vec(int size){ random_device rnd_device; // Specify the engine and distribution. mt19937 mersenne_engine(rnd_device()); uniform_real_distribution<double> dist(0, 1); auto gen = std::bind(dist, mersenne_engine); ...
ALGO
0.991705
4.175388
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-09-12T19:37: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": "7876071eb...
1ad5f6d5-c2c2-4d60-93af-e640323f1a07
deepakantony/competitive_programming
uva_online_judge/math_problems/adhoc/Easy/NumberingRoads_11723/NumberingRoads_11723.cxx
/* Problem: Template CPP main file. Link: http://uva.onlinejudge.org/external/117/11723.html Author: <NAME> - "deebee" "drunkbeast" "dAbeAst" Solution: if R/N > 26 then impossible else R/N */ #include <cstdio> #include <cstring> #include <cassert> #include <ctime> #include <vector> #include <algorithm> #includ...
ALGO
0.994057
3.50211
{ "github_metadata": { "branch": "master", "commit_count": 785, "repo_created_at": "2011-12-16T19:45:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db87b7ac...
a164decb-a39d-4dae-bed5-2349a40ba173
ishandutta2007/codeforces-g
gediminas/normal/729/E.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; template<typename T> struct seti : public tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update> { seti(): tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update...
ALGO
0.999831
3.605564
{ "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": "8c9354163b1e...
91a22336-c48c-4b93-bce4-6131694bd6f0
scalexm/sat_solver
solver/solver.cpp
// // solver.cpp // solver // // Created by <NAME> on 07/02/2016. // Copyright © 2016 scalexm. All rights reserved. // #include "solver.hpp" #include "detail/solver.hpp" #include <cstdlib> #include <iostream> #include <limits> #include <set> #include <sstream> #include <fstream> solver::solver(cnf clauses, optio...
ALGO
0.999867
6.141265
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2016-02-04T17:47:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7cdcc866...
3eebd951-71b5-435e-9a77-24b99362eebe
PaulTrampert/GenieSys
src/CpuOperations/ORI.cpp
// // Created by paul.trampert on 2/24/2021. // #include <GenieSys/CpuOperations/ORI.h> #include <GenieSys/getPossibleOpcodes.h> #include <sstream> #include <GenieSys/AddressingModes/ImmediateDataMode.h> #include <GenieSys/AddressingModes/ProgramCounterAddressingMode.h> #include <GenieSys/AddressingModes/DataRegisterDi...
TOOL
0.941256
6.465978
{ "github_metadata": { "branch": "main", "commit_count": 319, "repo_created_at": "2020-11-16T04:33:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 25, "pull_requests": 0 }, "file_meta": { "content_id": "1cbc183de...
d994989f-9782-4759-af92-16c624e48881
Xutzu11/Advent-Of-Code
2024/7/silver.cpp
#include <iostream> #include <string> #include <vector> using namespace std; string s; vector<long long> v; long long rez, x; bool first; long long tot = 0; bool bkt(int k, long long sum) { if (k == v.size() && sum == rez) return 1; if (k == v.size() || sum > rez) return 0; return bkt(k+1,...
ALGO
0.995254
3.498708
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2023-12-20T00:00:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97a9d848e02...
60f994fa-13ea-4c02-b459-a56dff72c5b5
surface03/algorithm-library
Graph/SCC/scc.cpp
/** * Strongly Connected Component * * generate_scc(N, g): Generates SCC using graph g, which contains N vertices * generate_scc_graph(): Generates SCC graph using SCC indices * * * Tarjan Algorithm * SCC indices are assigned in **reverse topological order**. * In other words, SCC 1 has no outgoing edges (o...
ALGO
0.999783
5.734434
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2024-10-19T04:06: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": "4461c806921...
0722c2fd-6018-4609-860a-a7a016a7ac50
Yiyanuiuc/cs225
mp5/quadtree.cpp
/** * @file quadtree.cpp * Quadtree class implementation. * @date Spring 2008 */ #include "quadtree.h" #include <math.h> #include <iostream> using namespace std; /* ================================ Constructors & Big Three ================================ */ /* * default constructor for QuadtreeNode */ Quadtre...
ALGO
0.998418
5.079227
{ "github_metadata": { "branch": "master", "commit_count": 47363, "repo_created_at": "2017-02-09T04:05: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": "c09360...