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
3ce8bb7b-09f3-4a6c-a00e-f0142af5e4b0
TheUnicat/competitive-pwogramming
usaco/platinum/2017/February/1_why_did_the_cow_cross_the_road.cpp
// // Created by TheUnicat on 2024-12-25. // #include <iostream> #include <fstream> #include <vector> using namespace std; using ll = long long; int n; ll num, ans = 0; vector<ll> pos, inversion_arr, segtree, two_pos, inversion_arr_two; void update(ll val) { val += n; segtree[val] = 1; while (val > 0) { ...
ALGO
0.999992
4.300633
{ "github_metadata": { "branch": "main", "commit_count": 290, "repo_created_at": "2024-05-12T07:59: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": "9cab2debb1...
0d0a4abb-6d08-42c7-8ff1-f71e52ea2767
wuyuhang05/My-OI-Code
517/128C.cpp
/* * Time: 2019-11-13 21:19:20 */ #include <algorithm> #include <iostream> #include <cstring> #include <climits> #include <cstdlib> #include <cstdio> #include <bitset> #include <vector> #include <cmath> #include <ctime> #include <queue> #include <stack> #include <map> #include <set> #define fi first #define se secon...
ALGO
0.999929
3.426154
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2018-06-03T12:18:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68f7e093...
5df7ca3a-e09b-4bd5-b0f8-694a1e41a083
LauraBattagliola/ExtrFunReg
src/source.cpp
#include <RcppArmadillo.h> #include <Rinternals.h> using namespace Rcpp; extern "C" { void metrl2_(double *A, double *B, int *M, int *N, int *D, double *METR); void metrl2b_(double *A, double *B, int *M, int *N, int *D, double *METR); } // [[Rcpp::export]] Rcpp::NumericMatrix metrl2_cpp(Rcpp::NumericMatrix ...
ALGO
0.99993
4.812298
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-05-17T14:31: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": "8b74db07a9a...
de0fae73-4718-4477-8ff4-194f73892c44
pfalcon/android-platform-headers
android-4.2_r1/frameworks/base/libs/hwui/PathRenderer.h
/* * Copyright (C) 2012 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
TOOL
0.961669
5.091388
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2013-02-10T11:21:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 59, "forks": 23, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7217a4...
8af19b20-0f31-43b7-b433-819ad06855d9
Mayank-Parasar/leetcode
polish_expression.cpp
/* Given an expression (as a list) in reverse polish notation, evaluate the expression. Reverse polish notation is where the numbers come before the operand. Note that there can be the 4 operands '+', '-', '*', '/'. You can also assume the expression will be well formed. Example Input: [1, 2, 3, '+', 2, '*', '-'] Outp...
ALGO
0.999842
5.836066
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2019-09-14T04:35:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ffd84b55...
b302a2f6-4a32-4143-9267-2c56aacfd61e
richardPZH/leetcode
160.Intersection of Two Linked Lists.cpp
/* Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists: A: a1 ¡ú a2 ¨K c1 ¡ú c2 ¡ú c3 ¨J B: b1 ¡ú b2 ¡ú b3 begin to intersect at node c1. Notes: ...
ALGO
0.99977
5.387943
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2015-10-03T15:01:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0da04dcfdb...
e785d10e-3424-43be-ae53-91865f26f851
xydeng12/softrender
SoftRender/SoftRender/shaders/PhongShader.cpp
#include "../shader.h" vec4 PhongShader::VS(const int iface, const int nthvert) { vec3 vert_model = uniform.model->Vert(iface, nthvert); vec3 norm_model = uniform.model->Normal(iface, nthvert); vec2 uv = uniform.model->UV(iface, nthvert); vec4 vert_clip = uniform.projectionMat * uniform.viewMat * uniform.modelMat...
TOOL
0.925545
5.98232
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-01-05T15:24: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": "c0af74db74b6...
24df6f82-94e9-4863-a4f1-517560ebc72c
Pecmecy/FIB-PRO1
P1/P70955.cc
#include <iostream> using namespace std; int main() { int y, d, h, m, s; cin >> y >> d >> h >> m >> s; d = d + (y * 365); //Coger y transformar todo a la unidad siguiente hasta los segundos. h = h + (d * 24); //Ej.: Si hay 20 años (365 días cada uno) entonces 20 * 35 son los días de los 20 años. Suma...
ALGO
0.997338
4.089922
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-08-22T09:05:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d48e81a9f18...
f224b79b-2eb2-4b2f-ad43-747c54956786
esmf-org/esmf
src/Infrastructure/Mesh/src/Moab/mesquite/QualityMetric/Shape/IdealWeightMeanRatio.hpp
/* ***************************************************************** MESQUITE -- The Mesh Quality Improvement Toolkit Copyright 2004 Sandia Corporation and Argonne National Laboratory. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights...
TOOL
0.962634
6.461312
{ "github_metadata": { "branch": "develop", "commit_count": 28124, "repo_created_at": "2020-02-03T17:42:01.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 184, "forks": 85, "issues": 89, "pull_requests": 10 }, "file_meta": { "content_id": "e...
978a0426-2e87-416a-a9f4-205be761359c
germanohn/competitive-programming
codeforces/815/b.cpp
#include <bits/stdc++.h> #define ff first #define ss second #define pb push_back using namespace std; typedef long long ll; typedef pair<int, int> pii; const int N = 2e5 + 5; int n, k, q; int fl[N], fr[N]; int freq[N]; int sum[N]; int main () { scanf(" %d %d %d", &n, &k, &q); for (int i = 0; i < n; i++) { ...
ALGO
0.999943
3.88168
{ "github_metadata": { "branch": "master", "commit_count": 299, "repo_created_at": "2016-07-29T09:37:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ccd5af2b...
aac25f97-b8aa-410d-8c46-2349e4d5fae3
alexandraback/datacollection
solutions_1482492_1/C++/tfliao/B.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <vector> #include <cmath> #include <map> #include <cstring> #include <string> using namespace std; struct Position { double t, x, y, v, dt; }; double D; int N, A; vector<Position> pos ; vector<double> as ; void input () {...
ALGO
0.999644
4.000283
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e5d7dfe9...
2363dc2e-d7f2-4ee2-8c11-55b97278bf7d
kavya-k243/100-Days-of-Code
Day 50/Solution.cpp
#include<iostream> using namespace std; class node { public: int num; node* next; node(int val) { num = val; next = NULL; } }; //utility function to insert node at the end of the linked list void insertNode(node* &head,int val) { node* newNode = new node(...
ALGO
0.999978
5.333016
{ "github_metadata": { "branch": "main", "commit_count": 120, "repo_created_at": "2024-01-25T18:28:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7e158a1c...
a514bacf-58ba-495d-ae71-4c5b830fbc7f
Parzival1509/LC_DCC
2023/2023-10/LC_DCC_2023-10-20_Flatten_Nested_List_Iterator.cpp
// LC DCC 2023/10/20 // 341. Flatten Nested List Iterator // Medium #include <bits/stdc++.h> using namespace std; #define ll long long /** * // This is the interface that allows for creating nested lists. * // You should not implement it, or speculate about its implementation * class NestedInteger { * public: ...
ALGO
0.999634
6.233469
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2023-05-31T18:54:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3953f3b8a4e...
5d8865f3-8e8c-4f0f-a3b1-3a981455aa7f
Harashiyo/ManualCameraCalibration
src/optical_flow/feature_detection.cpp
#include "feature_detection.hpp" void DetectCorners(cv::Mat &grayImage, std::vector<cv::Point2f> &output) { const int kMaxCorners = 50; const double kQualityLevel = 0.05; const double kMinDistance = 25; const int kBlockSize = 3; const bool kUseHarrisDetector = false; const double kK = 0.04; ...
ALGO
0.952439
5.983422
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-08-14T16:00:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4bdfae2513...
e6703990-b85b-4334-ba92-a3dcca755ac1
Tencent/TencentKona-11
src/hotspot/cpu/sparc/memset_with_concurrent_readers_sparc.cpp
/* * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free ...
TOOL
0.906699
7.101231
{ "github_metadata": { "branch": "master", "commit_count": 58425, "repo_created_at": "2021-03-03T10:36:50.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 337, "forks": 51, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "097e...
737a5911-5414-440b-9081-52c3d4ef2d4d
Py-Contributors/AlgorithmsAndDataStructure
C++/Algorithms/DynamicPrograming/LongestPalindromicSubsequence.cpp
// Title - Longest Palindromic Subsequence // Statement - It will find the length of the Longest Palindromic Subsequence in a string // Time complexity - O(n^2) #include<bits/stdc++.h> using namespace std; // Returns the length of the longest palindromic subsequence in given string int lps(string &str) { int ...
ALGO
0.999981
4.924971
{ "github_metadata": { "branch": "master", "commit_count": 512, "repo_created_at": "2020-05-01T05:46:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 960, "forks": 644, "issues": 8, "pull_requests": 1 }, "file_meta": { "content_id": "1630e...
fcfce0a2-53fe-4050-9228-671d7f434f6a
upesacm/100DaysOfCode-2024
DSA/Mridul-Singh/Question31b.cpp
// LEETCODE PROBLEM 238 // Given an integer array nums, return an array answer such that answer[i] is equal to the product of all the elements of nums except nums[i]. // The product of any prefix or suffix of nums is guaranteed to fit in a 32-bit integer. // You must write an algorithm that runs in O(n) time and withou...
ALGO
0.999945
6.13853
{ "github_metadata": { "branch": "main", "commit_count": 6737, "repo_created_at": "2024-07-12T17:15:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 21, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd671202e...
180f9324-d00c-40bb-8663-da209981a0b6
dlftls38/algorithms
since2018/integrated_algorithm/2086.cpp
#include <stdio.h> #include <iostream> #include <string.h> #include <string> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <map> #include <set> #include <limits.h> #include <functional> #include <math.h> #include <fstream> #define INF 987654321 using namespace std; const int MOD = ...
ALGO
0.999981
4.02226
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-09-07T10:45: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": "6acac56b72...
7f7a4871-6dc6-4212-b349-d61ccfcad93e
NgTienHungg/PTIT-Source
SPOJ PTIT/PTIT123F.cpp
// https://www.spoj.com/PTIT/problems/PTIT123F/ // PTIT123F - Người cai ngục say rượu #include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; vector<bool> v(n + 1, 0); // False = Khóa, True = Mở for (int i = 1; i <= n; i++) for (int j = i; j <= n; j += i) { ...
ALGO
0.999904
4.402941
{ "github_metadata": { "branch": "main", "commit_count": 106, "repo_created_at": "2021-07-04T02:14:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 130, "forks": 36, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93e51eb...
5be7aef1-46c6-4512-86f0-e743d9c58a36
fengwang/larbed-refinement
include/f/optimization/nonlinear_optimization.hpp
#ifndef DJLFMAKXIASEBAWYUCDIOLNLJNHQXALWPVTAAYYLBLIVGGIVTFFQCLPFTOLMYLXVYHUESQQYI #define DJLFMAKXIASEBAWYUCDIOLNLJNHQXALWPVTAAYYLBLIVGGIVTFFQCLPFTOLMYLXVYHUESQQYI #include <f/matrix/matrix.hpp> #include <f/derivative/derivative.hpp> #include <f/derivative/second_derivative.hpp> #include <limits> #include <functional...
ALGO
0.993569
5.605264
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2015-11-02T10:03:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7fcd604d...
2d948533-018e-4fc3-94d5-687876d90e5a
abheet-98/Competitive-Coding
PrintNodesKLevelFar.cpp
#include <bits/stdc++.h> using namespace std; struct Node{ int data; Node* left; Node* right; }; Node *newNode(int data,Node* left,Node* right){ Node *temp = new Node; temp->data = data; temp->left = left; temp->right = right; return temp; } bool find(Node *node, int data,vector<Node*>& vec)...
ALGO
0.999963
3.99893
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-08-27T18:22:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2dd6f97a2...
d8931eeb-ba17-4930-b0f0-7951c2a8f09b
Xerox563/Codeforces
Strings/A_Problemsolving_Log.cpp
#include <bits/stdc++.h> using namespace std; // int solve(string str, int n) // { // /* int ans = 0; // unordered_set<char> st; // for (int i = 0; i < str.length(); i++) // { // if ((str[i] - 'A' + 1) <= dur) // { // if (st.find(str[i])) // ...
ALGO
0.999933
3.962387
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2025-04-27T05:51: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": "b805bc6bd...
d2399bda-eb74-44e5-8d75-04e5fd360a1a
hfarfour/Xcode-practice---project-in-CPlusPlus
Practice beginer/Stack_and_Queue/Stack/Stack/main.cpp
// Stack_and_Queue // // Created by <NAME> on 29/11/2022. // #include <iostream> #include <fstream> #include <list> #include <vector> using namespace std; //==============Stack============: //A stack is a data structure that stores and retrieves items in a last-in-first-out manner. //There are two types of stack...
ALGO
0.979023
4.861405
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-03-05T21:43: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": "fc8539df8736...
709f26b6-ecd1-4556-bf5e-277eb60ad713
DDUC-CS-Sanjeet/polynomial-implementation
Polynomial.cpp
#include<iostream> using namespace std; class Polynomial { private: // Variables to store information about polynomial public: Polynomial() { // Behavior of default constructor } Polynomial(int deg) { // Behavior of constructor with arguments } ~Polynomial() { ...
TOOL
0.980786
4.941595
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-01-24T09:39:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b0c2b5dfaa...
61d93162-75b1-41c9-8438-4cc50f1472eb
lonelywh1te/ukkonen-algorithm
suffix_tree.cpp
#include "suffix_tree.h" int suffix_tree::suffix_length(node *node){ if (node == root) return 0; return *node->right - node->left + 1; } void suffix_tree::build(string data) { if (!root->childs.empty()) del(root); str = data; active_node = root; for(int i = 0; str[i] != '\0'; i++){ up...
ALGO
0.999071
3.501161
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2022-11-24T05:18:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8a3c7ed4d...
6140243c-c2e0-4b31-84db-662378c56124
masterace007/codeforces_harwest
codeforces/814/A.cpp
#include "bits/stdc++.h" #define endl '\n' #define pb push_back #define mod 1000000007 #define int int64_t #define hii cout<<"yes\n"; #define all(x) x.begin(),x.end() #define deb(x) cout<<#x<<" : "<<x<<"\n"; #define FASTIO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0...
ALGO
0.999986
3.947882
{ "github_metadata": { "branch": "master", "commit_count": 827, "repo_created_at": "2021-01-16T12:40:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9564d8ab...
12166cd4-8ec1-4f92-9ffe-339543771613
byungwook-min/Algorithm
BOJ/6118 - 숨바꼭질.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; #define FASTIO ios::sync_with_stdio(0); cin.tie(0); int N, M; vector<int> node[20001]; int dist[20001]; int ans; int cnt; int main() { FASTIO cin >> N >> M; for (int i = 0; i < M; i++) { int A, B; cin >> A >> B; ...
ALGO
0.999918
3.984227
{ "github_metadata": { "branch": "main", "commit_count": 672, "repo_created_at": "2021-08-24T15:05:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d6738fc91...
25d6dcff-2850-4e7b-8282-0606e70fae2f
Tech-Fear/CP_SELF_PRACTICE
CF/1859A.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <complex> #include <queue> #include <set> #include <unordered_set> #include <list> #include <chrono> #include <random> #include <iostream> #incl...
ALGO
0.999567
4.527766
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2024-07-08T08:46: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": "843072695...
061fcd30-d113-4fe2-80c6-a8532c4f50ec
kmjp/procon
srm/771-810/808/IOIWeirdModel1.cpp
#include <bits/stdc++.h> using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<to;x++) #define FORR(x,arr) for(auto& x:arr) #define FORR2(x,y,arr) for(auto& [x,y]:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #defin...
ALGO
0.999744
3.195238
{ "github_metadata": { "branch": "master", "commit_count": 3966, "repo_created_at": "2015-02-15T11:25:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "be4085...
87ac8939-be9b-49b6-81e8-35a0724e1f85
EkanshGupta-02/LeetCode-Solution
24-swap-nodes-in-pairs/24-swap-nodes-in-pairs.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: ListNode* swapPairs(L...
ALGO
0.999982
5.866209
{ "github_metadata": { "branch": "main", "commit_count": 2273, "repo_created_at": "2021-12-28T08:07: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": "eb7e313b3...
6bcba8c5-b1ea-4cea-8f6c-953ad167a212
pt13762104/code-archive
ezknap.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #ifndef yoshi_likes_e4 #define endl '\n' #endif #define problem "" #define multitest 0 #define debug(x) cerr << #x << " = " << x << endl; void init() { } void Yoshi() { int n, w; cin >> n >> w; vector<pair<int, int>> p(n); for (auto &i ...
ALGO
0.999953
4.24844
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-16T08:19: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": "094503d146db...
717b688a-5e01-4c73-ac7b-c68628ca0d67
Shubham-Choudhury/GeeksforGeeks-Problems
2024/10 October/Delete Alternate Nodes/main.cpp
// Link: https://www.geeksforgeeks.org/problems/delete-alternate-nodes/1 #include <iostream> #include <vector> using namespace std; struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; struct Node *createLinkedList(vector<int> &arr) { struct No...
ALGO
0.999892
5.659812
{ "github_metadata": { "branch": "main", "commit_count": 662, "repo_created_at": "2023-10-25T14:23:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "424a71af15...
2391b297-0f60-4ad8-9acd-b0f9db0552b5
Simon310106/Code
作业/洛谷/t584176/t584176.cpp
#include <bits/stdc++.h> using namespace std; int n, V; int v[105], w[105], s[105]; int dp[1005]; int main(){ cin >> n >> V; for (int i = 1; i <= n; i++) { cin >> v[i] >> w[i] >> s[i]; } for (int i = 1; i <= n; i++) { if (s[i] * v[i] >= V) { for (int j = v[i]; j <= V; j++) ...
ALGO
0.999914
4.367077
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-07-07T09:53: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": "7aac83c1a8c...
30eae160-3f2c-4b51-a7e7-3b99fe786091
ihp-lab/OpenSense
Shared/lib/opencv/default/opencv/opencv2/calib3d.hpp
/*M/////////////////////////////////////////////////////////////////////////////////////// // // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. // // By downloading, copying, installing or using the software you agree to this license. // If you do not agree to this license, do not download, instal...
ALGO
0.994891
4.570556
{ "github_metadata": { "branch": "master", "commit_count": 495, "repo_created_at": "2020-10-13T20:41:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 37, "forks": 10, "issues": 12, "pull_requests": 0 }, "file_meta": { "content_id": "e75bef...
d7800d77-7af6-4b01-a283-f96258984b80
yugabyte/yugabyte-db
src/yb/rpc/binary_call_parser.cc
// Copyright (c) YugaByte, Inc. // // 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 writ...
TOOL
0.9269
6.909038
{ "github_metadata": { "branch": "master", "commit_count": 32995, "repo_created_at": "2017-10-05T21:56:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9631, "forks": 1151, "issues": 5000, "pull_requests": 101 }, "file_meta": { "content_id...
c7565638-15dc-4b14-8aae-8aa154e85911
adityaband460/StriverSheet
BinarySearch/4.2_BS_onAnswers/KoKo_eating_banna.cpp
int totalHours(vector<int>&piles,long long banPerHr,long long limit) { int ans = 0; for(int i=0;i<piles.size();i++) { ans += ceil((double) piles[i]/ (double)banPerHr); if(ans > limit) return 0; } return 1; } int Solve(int N, vector<int>& piles,...
ALGO
0.999981
4.021932
{ "github_metadata": { "branch": "main", "commit_count": 276, "repo_created_at": "2023-01-21T18:36: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": "fad46e3336...
68e3b12d-6948-44e6-ab08-ffcd4da77d69
samibadra/Producer-Consumer-Multithread-Synchronization
Producer.cpp
/* <NAME> <NAME> CS 570, Spring 2015 Assignment #3, producer/consumer simulation FILE: Producer.cpp Copyright (c) 2015 <NAME>. All rights reserved. */ #include <stdio.h> #include <cstdlib> #include <time.h> #include <semaphore.h> #include <pthread.h> #include <iostream> #include "Factory.h" #include "Produc...
ALGO
0.98659
5.210958
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2015-05-24T06:21: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": "40d68c3ad...
bcc66ead-da99-4ac7-b926-7c18829787be
jkjan/MysteriousCPPCodes
Baekjoon/7576/main.cpp
#include <iostream> #include <vector> #define SIZE 1000 #define NODE_SIZE SIZE * SIZE #define NONE -1 #define NOT_RIPEN 0 #define RIPEN 1 using namespace std; int M, N; // 가로, 세로 bool visited[NODE_SIZE + 1] = {false, }; void input(vector<int>* tomatoBox, vector<int>* ripenTomatoes, int* tomatoes, int* notRipenToma...
ALGO
0.999995
4.399336
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-09-07T02:38: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": "e32bb7eaec...
bee20325-d0bc-4244-bdfa-e40ab32c7451
Ayusohm432/Coding
ProblemOfTheDay/Leetcode/2025/3. March/29_2818. Apply Operations to Maximize Score.cpp
/* Problem Link: https://leetcode.com/problems/apply-operations-to-maximize-score?envType=daily-question&envId=2025-03-29 */ /*2818. Apply Operations to Maximize Score You are given an array nums of n positive integers and an integer k. Initially, you start with a score of 1. You have to maximize your score by apply...
ALGO
0.999971
6.277696
{ "github_metadata": { "branch": "main", "commit_count": 1002, "repo_created_at": "2024-06-14T10:35:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2818a32c1...
897e697c-6c1c-49a9-bf96-452eb48e047e
disednet/Lalab
source/cuSparse/main.cpp
/* * Copyright 1993-2015 NVIDIA Corporation. All rights reserved. * * Please refer to the NVIDIA end user license agreement (EULA) associated * with this source code for terms and conditions that govern your use of * this software. Any use, reproduction, disclosure, or distribution of * this software and related docum...
ALGO
0.999899
5.136768
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-06-15T06:13: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": "d25676495c...
b27b9ea6-4e1c-48ad-9d44-ff3e7a3ae4c5
arangodb/arangodb
3rdParty/boost/1.78.0/boost/safe_numerics/safe_compare.hpp
#ifndef BOOST_NUMERIC_SAFE_COMPARE_HPP #define BOOST_NUMERIC_SAFE_COMPARE_HPP // Copyright (c) 2012 <NAME> // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include <type_traits> #include <limits> namespace...
TOOL
0.978708
7.377355
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
21233beb-7ca1-4878-995f-f17191f529fa
MLi-dev/CSCI61
DataStructures/graph_hw9/graph2Main.cpp
// FILE: testtab2.cxx // An interactive test program for the second table ADT. #include <bits/stdc++.h> #include "graph2.h" using namespace std; bool compare(string &x1, string &x2); void createGraph(graph& dicG, vector<string>& dicV); void findPath(graph& dicG, vector<string>& dicV); int main() { graph dicG; ...
ALGO
0.997156
4.409391
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-03-31T16:50:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "fb4a60238a26...
17657dff-bf6f-4ed6-9353-4d4d5a7bd0ab
conlacda/algo-practice
cses/Tree Algorithm/Subtree Queries.cpp
// https://cses.fi/problemset/task/1137/ #pragma GCC optimize("O3") // optimize("Ofast,unroll-loops") #include<bits/stdc++.h> typedef long long ll; // double long double const ll mod = 1000000007; // 998244353 1000000009 1000000007 // đừng dùng ull #define int long long // __int128 const int INF = std::numeric_limit...
ALGO
0.999856
4.575896
{ "github_metadata": { "branch": "master", "commit_count": 427, "repo_created_at": "2020-11-22T14:26:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "452ebfbc...
da5f84f9-5275-49f5-a8da-97483b0ff5e8
shoyeb001/DSA
slidingwindow/minwindowsubstr.cpp
class Solution { public: string minWindow(string s, string t) { map<char,int>mp; int n1 = t.length(); for(int i=0;i<n1;i++){ mp[t[i]]++; } int count = mp.size(); int i=0; int j=0; int n= s.size(); int startindex = 0; int len...
ALGO
0.99999
6.354795
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-06-01T03:25: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": "9196fa3b30f2...
a15b1df9-eab0-428c-a108-196558ec341a
rathesh77/2d_physics_engine
CollisionDetector.cpp
#include "CollisionDetector.hpp" CollisionDetector::CollisionDetector() { } bool CollisionDetector::detectCollisionBetweenSquaredShapes(Body *source, Body *target) { Line *axis = CollisionDetector::findAxis(source); Line *targetAxis = CollisionDetector::findAxis(target); Vector2d *sourceCorners = CollisionDet...
ALGO
0.996434
4.902635
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-05-05T18:04: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": "6763bc68679...
2aa6e4c0-22e0-4266-bfa3-e688dd51868b
matthewmcdermott/DataStructures
DOWNLOADED from Canvas/Projects/Project 3/solution and test files/circularLinkedList.h
#ifndef CIRCULAR_LINKED_LIST_H_ #define CIRCULAR_LINKED_LIST_H_ #include <iostream> #include <ctime> #include <cstdlib> #include <climits> template <typename T> class List; template <typename T> std::ostream& operator<<(std::ostream&, const List<T>&); template <class T> class List { private: class Node { ...
TOOL
0.977507
5.39533
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-10-13T00:37: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": "2769b65457...
0f1e675b-f6c9-4f21-9148-1c1c0c9ef3c2
SOUMITRO-SAHA/DSA-Data-Structure-and-Algorithms
02. DSA Theory/002. DSA in CPP/03-Strings/03-Counting_Words-Vowels_in_String.cpp
#include <bits/stdc++.h> using namespace std; // Print void print(string str) { for (int i = 0; i < str.length(); i++) { cout << str[i] << " "; } cout << endl; } // Get Count => Vowel, Consonant, Upper Case, Lower Case : void getCount(string s) { // Counting the Letters for Vowel and Cons...
ALGO
0.999819
4.562383
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2022-08-08T18:17:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b365c47cc96...
43197fea-3c0a-4fff-9923-19ad32df8f02
singhsanam/Codeforces_Contests
Pinely Round 2 (Div. 1 + Div. 2) [A-E]/A_Channel.cpp
/*You don't get to choose if you get hurt in this world...but you do have some say in who hurts you. I like my choices.*/ #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> #define int long long #define all(a) a.begin(),a.end() #define endl "\n" #d...
ALGO
0.99996
3.885556
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-09-02T10:20: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": "32845125573...
031b53d3-dd74-41ab-8bf8-c1d51099d3fe
mahirlabibdihan/Codeforces-Solution
B_Kuriyama_Mirai_s_Stones.cpp
#include <iostream> #include <algorithm> using namespace std; int main() { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } long long u[n + 1] = {}, v[n + 1] = {}; for (int i = 0; i < n; i++) { v[i + 1] = a[i] + v[i]; } sort(a, a + n); ...
ALGO
0.999864
4.691854
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2020-04-03T18:29: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": "dd264b8d2...
fd4fe939-7fb2-422e-a6e5-7d9d39de44a2
ir-rafio/iut-algorithms-lab-1b-summer-23-24
Lab 3/Task B/submission/220041122_lab3_taskB.cpp
#include <bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(0); cin.tie(0) using LL = long long; vector<vector<int>> adj; vector<bool> visited; void dfs(int u, vector<int>& group) { visited[u] = true; group.push_back(u); for (int v : adj[u]) { if (!visited[v]) { ...
ALGO
0.999569
4.509459
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2025-05-03T17:38: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": "397d1f003bb...
2928fd7c-6ed9-4b1a-8a1b-2ce037ad1b54
SyncMeow/programming-skills
ds/tree/binary-tree.cpp
#include <iostream> #include <queue> #include <stack> using namespace std; struct Node { Node *parent; Node *left; Node *right; int data; }; Node *root; void preOrderTravsl(Node *p) { if (!p) return; cout << p->data; preOrderTravsl(p->left); preOrderTravsl(p->right); } void inOrderTr...
ALGO
0.9999
4.542041
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2025-01-16T03:57: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": "e7761d1f4...
96abf663-f281-4f1d-9435-5a2a43ae70ab
cryzzer/FMI-Semester-1-Homeworks
Homework1/fn62518_d1_4_vc.cpp
/** * * Solution to homework assignment 1 * Introduction to programming course * Faculty of Mathematics and Informatics of Sofia University * Winter semester 2020/2021 * * @author <NAME> * @idnumber 62518 * @task 4 * @compiler VC * */ #include <iostream> using namespace std; int main() { int imputNumber = 0; int ...
ALGO
0.999986
3.523723
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-01-03T12:14: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": "9b532516037...
5edb2fa6-2d38-46bc-9d0c-be4fb055a954
trilinos/Trilinos
packages/nox/src-loca/src/LOCA_TurningPoint_MinimallyAugmented_FiniteDifferenceGroup.H
// @HEADER // ***************************************************************************** // LOCA: Library of Continuation Algorithms Package // // Copyright 2001-2005 NTESS and the LOCA contributors. // SPDX-License-Identifier: BSD-3-Clause // **************************************************************...
ALGO
0.998941
7.335285
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
a798d837-f690-4933-9d09-0c73c34918ad
rishabg30/Data-Structures-and-Algorithms
stack_and_queues_problems/n_stacks_in_an_array.cpp
#include <bits/stdc++.h> using namespace std; class ListNode { public: int index; ListNode *next; ListNode(int x) { index = x; next = NULL; } }; class NStack { public: int *arr; // original data /* top element index of particular stack. we created this double pointer beca...
ALGO
0.998716
3.867455
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2024-08-31T07:35:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f602a361ac2...
abc408fa-4e3c-4c8a-9103-6ebbe2d1a38d
swraj28/DSA_Revision
C++/10. DP/Dp_With_Bitmask/kefa_and_dishes.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ff first #define ss second #define pb push_back #define mp make_pair #define pii pair<int,int> #define PI 3.141...
ALGO
0.999912
4.049805
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2022-03-21T03:54:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94d98227f...
53ad7cfc-098a-4956-b2f1-ec09f30b9a03
guiafonso237/Algoritmos
codigos/batalhaNaval.cpp
#include <iostream> #include <random> #include <cstdlib> #include <unistd.h> using namespace std; short nav, k=0; struct Casas{ char cont=' '; bool tem=0, tiro=0; int tipNav, cas; }; void most(int); void gerarNav(short); void atk(); bool endG(int , int); Casas cas[8][8]; int main() { short dif, tent, jog=0...
TOOL
0.931415
3.578325
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-10-19T16:57: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": "8454df146307...
43eb928e-9817-4be1-bc61-286fb887ffe3
richenyunqi/CCF-CSP-and-PAT-solution
PAT/Basic Level/1068. 万绿丛中一点红.cpp
#include <bits/stdc++.h> using namespace std; using gg = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); gg mi, ni, ti, num = 0; // num负责统计满足条件的像素个数 cin >> mi >> ni >> ti; gg p[ni][mi]; unordered_map<gg, gg> um; //记录每个像素出现的次数 for (gg i = 0; i < ni; ++i) { for (gg j...
ALGO
0.999818
4.003317
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2018-12-24T07:45:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 758, "forks": 132, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "517bc...
73fb9656-e5b1-4c9a-8d5f-e091d1fe5877
akshaynikam/hello-world
byte_by_byte/zero_matrix.cpp
#include <iostream> #include <set> using namespace std; void set_row(int arr[][4], int r, int n) { for (int i = 0; i < n; i++) arr[r][i] = 1; } void set_col(int arr[][4], int c, int n) { for (int i = 0; i < n; i++) arr[i][c] = 1; } void print(int arr[][4], int n) { for (int i = 0; i < n; i++) { ...
ALGO
0.999365
4.192117
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2015-03-26T12:01:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "316e021b6...
7198d53d-8436-458d-a4b3-f13137e14af7
detorresramos/CaramelDB
src/construct/Construct.h
#pragma once #include "BucketedHashStore.h" #include "Codec.h" #include "ConstructUtils.h" #include "Csf.h" #include <array> #include <cmath> #include <functional> #include <src/Modulo2System.h> #include <src/construct/filter/FilterFactory.h> #include <src/solve/Solve.h> #include <src/utils/ProgressBar.h> #include <sr...
ALGO
0.998956
6.883144
{ "github_metadata": { "branch": "main", "commit_count": 98, "repo_created_at": "2023-04-13T20:51:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80e52f32116...
6dcd34ad-cb70-4e60-b203-32f95f92efad
Yang-33/competitive-programming
atcoder/ARC/054_ARC_C.cpp
#include <bits/stdc++.h> using namespace std; using VS = vector<string>; using LL = long long; using VI = vector<int>; using VVI = vector<VI>; using PII = pair<int, int>; using PLL = pair<LL, LL>; using VL = vector<LL>; using VVL = vector<VL>; #define ALL(a) begin((a)),end((a)) #define RALL(a) (a)....
ALGO
0.999997
4.775166
{ "github_metadata": { "branch": "master", "commit_count": 2978, "repo_created_at": "2017-01-06T04:52:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "97f441...
7d9aaec9-a9ec-4984-a68d-b264f21516a3
TheAlgorithms/C-Plus-Plus
math/modular_inverse_simple.cpp
/** * @file * @brief Simple implementation of [modular multiplicative * inverse](https://en.wikipedia.org/wiki/Modular_multiplicative_inverse) * * @details * this algorithm calculates the modular inverse x^{-1} \mod y iteratively */ #include <cassert> /// for assert #include <cstdint> #include <iostream> ///...
ALGO
0.999808
6.262616
{ "github_metadata": { "branch": "master", "commit_count": 1738, "repo_created_at": "2016-07-16T10:19:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 32391, "forks": 7439, "issues": 10, "pull_requests": 23 }, "file_meta": { "content_id": ...
d182a479-be74-465e-aab2-e53bd638b10b
Benjamin-taro/Atcoder
abc344/abc344_b/main.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <iostream> #include <vector> #include <string> #include <utility> #include <queue> #include <array> #include <climits> #include <cmath> #include <set> #include <map> #include <bitset> #include <deque> #include <numeric> #include <asse...
ALGO
0.999752
4.246794
{ "github_metadata": { "branch": "main", "commit_count": 126, "repo_created_at": "2024-02-28T17:03: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": "3f8a0ce7d0...
80e60244-40d0-42f9-9cea-e95b39bdad3a
AranavMahalpure/DSA-programs
deque.cpp
#include <iostream> using namespace std; class deque { struct node { int data; node * next; }*f,*r; bool isEmpty() { if(f==NULL) return 1; return 0; } bool isSinglar() { if(f==r) return 1; return 0; } public: deque() { f = NULL; r = NULL; } void insert_front(); void ins...
ALGO
0.992861
4.306784
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-01-02T05:42:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8407ef4ac32f...
f6c4c88b-e0a1-429e-9ded-22af5d612ccd
superj6/CPcode
c++ sol/CEOI/2018/global_warming.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <set> using namespace std; #define endl '\n' #define pi pair<int, int> struct segTree{ int l, r; segTree *left, *right; int val; segTree(int a, int b){ l = a; r = b; if(l != r){ int mid = (l + r) / 2; left = new ...
ALGO
0.999988
4.060111
{ "github_metadata": { "branch": "master", "commit_count": 441, "repo_created_at": "2019-09-09T05:55:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 129, "forks": 37, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d862b...
353e0423-8f08-45cf-9537-caa31654b92b
K0nnyaku/Code
Training/ZROI_21.8/Day18.75/LGP2762.cpp
#include<bits/stdc++.h> using namespace std; #define IOR(i, st, ed) for(int i = st; i < ed; i++) #define LOR(i, st, ed) for(int i = st; i > ed; i--) #define EOR(i, x) for(int i = Head[x]; i; i = E[i].next) #define V(x) E[x].val #define T(x) E[x].to const int MB = 1 << 21; struct FastIO { char Buf[MB+10], *p, *e;...
ALGO
0.99977
3.247633
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-01-16T00:09: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": "7dbb57858b...
a303cecb-a446-4286-9590-a3349f0d5306
reoono/competitive-programming-archive
archive/atcoder.jp/bitflyer2018-final-open/bitflyer2018_final_d/Main.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; const ll INF64 = 1LL << 60; const int INF32 = 1 << 29; const int MOD = 1000000007; void Gauss(vector<long long> &A) { int rank = 0; for (int d = 0; d < 60; ++d) { int pivot = -1; for (int i = rank; i <...
ALGO
0.999993
4.514436
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-04-30T13:44: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": "7b2b0dc5d3...
067c71ad-cdc0-478e-9985-04ea7d704669
tazzledazzle/UW-CSS
342/lab4/lab4test.cpp
/** * @file lab4TestTimeMain.cpp * @brief a second driver file for testing the implementation * of the assigned non-recursive merge sort method * @author <NAME> * @author <NAME> * @version 1.3 */ #include <iostream> #include <stdio.h> #include <time.h> #include <sys/timeb.h> #include <cmath> #...
TEST
0.960981
5.006445
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2014-07-30T20:15:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 11, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "147ec1f4...
2efdbaa5-a17a-4fc9-88bf-5c667ee5f020
michael-lehn/FLENS
flens/lapack/impl/trevc.tcc
/* * Copyright (c) 2011, <NAME> * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1) Redistributions of source code must retain the above copyright * notice, this ...
ALGO
0.999753
5.745821
{ "github_metadata": { "branch": "public", "commit_count": 475, "repo_created_at": "2011-12-14T18:21:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 127, "forks": 32, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": "a8eed...
6f219a90-93a3-47a9-a43a-0f704052fe60
InsightSoftwareConsortium/ITK
Modules/Nonunit/Review/include/itkWarpHarmonicEnergyCalculator.h
/*========================================================================= * * Copyright NumFOCUS * * 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 * * https://www.apache.o...
ALGO
0.994351
7.03934
{ "github_metadata": { "branch": "main", "commit_count": 57165, "repo_created_at": "2010-07-27T15:48:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1517, "forks": 701, "issues": 268, "pull_requests": 49 }, "file_meta": { "content_id": "d...
f7b54f39-1850-45ef-8a02-d89da9c7c3c0
alex8937/Leetcode
188. Best Time to Buy and Sell Stock IV.cpp
int maxProfit(int k, vector<int>& prices) { if (k == 0) return 0; if (k > prices.size() / 2) { int ans = 0; for (int i = 1; i < prices.size(); ++i) { if(prices[i] > prices[i - 1]) ans += prices[i] - prices[i - 1]; } return ans; } vector<int> hold(k, INT_MIN), release(k, 0); for (auto p : prices) { for...
ALGO
0.999868
5.611159
{ "github_metadata": { "branch": "master", "commit_count": 149, "repo_created_at": "2016-09-08T21:43:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "526fd306...
5ec97b49-7b4d-46e9-86bb-8442972e7311
siliviu/uni
sem5/ppd/lab3/MPIHelloWorld/sequential.cpp
#include <bits/stdc++.h> using namespace std; void test(auto&& function) { auto t_start = std::chrono::high_resolution_clock::now(); function(); auto t_end = std::chrono::high_resolution_clock::now(); double elapsed_time_ms = std::chrono::duration<double, std::nano>(t_end - t_start).count(); std::...
ALGO
0.999973
4.560555
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-11-02T14:29: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": "37d4eb8d05...
426d47ce-f6d7-459f-bdf8-4df7fd61d2fb
liufule12/algorithm
leetCode/sort/_147_Insertion_Sort_List.cpp
/** * LeetCode 147 Insertion Sort List. * https://leetcode.com/problems/insertion-sort-list/ */ #include "..\singlyLinkedList.h" class Solution { public: ListNode *insertionSortList(ListNode *head) { if (!head || !head->next) return head; ListNode numpy(0); numpy.next = he...
ALGO
0.999987
5.521774
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2015-01-05T14:42:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7e69208d...
78957dfa-0a12-489d-801c-755f5f2c93ca
PedestrianDynamics/jupedsim
libsimulator/src/AnticipationVelocityModel.hpp
// SPDX-License-Identifier: LGPL-3.0-or-later #pragma once #include "CollisionGeometry.hpp" #include "NeighborhoodSearch.hpp" #include "OperationalModel.hpp" #include <random> struct GenericAgent; class AnticipationVelocityModel : public OperationalModel { public: using NeighborhoodSearchType = NeighborhoodSear...
ALGO
0.996299
7.653527
{ "github_metadata": { "branch": "master", "commit_count": 4611, "repo_created_at": "2015-05-28T13:32:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 53, "forks": 32, "issues": 15, "pull_requests": 3 }, "file_meta": { "content_id": "4ab73...
731e3777-a4f4-41c4-b9ed-e57f117c42ab
cro13/Algorithms
graf/graf.cpp
#include<stdio.h> #include<vector> #include<queue> #include<bitset> #include<algorithm> using namespace std; #define dim 8000 #define pb push_back vector < int > v [ dim*3 ] ; int plm[dim]; queue < int > q; int n,m,n1,n2; int dst [ dim ] ,f[dim],t[dim]; bitset <dim> nr; void read() { int x,y; scanf("%d %d %...
ALGO
0.999979
3.203345
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2014-02-14T20:10:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10cb1124a...
9c221357-2ba6-426a-a878-a5c45b58236c
peteryuanpan/lazyboy
version0.2/hashTable.cpp
#include "hash.h" #include "base.h" #include "search.h" #include "evaluate.h" struct HashTableStruct { int depth; // 深度 ULL zorb1; // zobrist值1 ULL zorb2; // zobrist值2 int bmv; // 最优着法 int bvl; // 最优分值 int type; // 最优着法的节点类型 }; HashTableStruct *HashTable; int HashTableNum; int HashTableMask; void InitHashTable...
ALGO
0.999483
4.596722
{ "github_metadata": { "branch": "master", "commit_count": 152, "repo_created_at": "2016-03-28T05:08:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "22718cb0...
2e4fc984-53b9-4a2f-8218-5d617921210a
ADVRHumanoids/riccardo_giacchino_master_thesis
src/velocity_controller_node.cpp
#include <cartesian_interface/utils/RobotStatePublisher.h> // ROS related #include <cartesian_interface/CartesianInterfaceImpl.h> // For the solver #include <RobotInterfaceROS/ConfigFromParam.h> // Model param config #include <XBotInterface/ModelInterface.h> // Model generation #include <XBotInterface/RobotInterfac...
ALGO
0.949033
5.265975
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2023-12-04T13:37:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9a960381d...
2f285363-13c3-4a40-8966-ef75a1a9bb9a
devpyc/PYC-Baekjoon
백준/Platinum/13512. 트리와 쿼리 3/트리와 쿼리 3.cc
#include <bits/stdc++.h> #define ll long long #define fi first #define se second #define pb push_back #define pob pop_back #define pii pair<int,int> #define mi map<int,int> #define qi queue<int> #define vi vector<int> #define vvi vector<vector<int>> #define tiii tuple<int,int,int> #define endl "\n" #define io ios_base:...
ALGO
0.999982
4.917886
{ "github_metadata": { "branch": "main", "commit_count": 1118, "repo_created_at": "2023-12-28T12:20: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": "b870c4dfd...
76651f1f-0aef-45de-89af-e225e1ca27fc
shiki-tak/CompetitiveProgrammingStorage
cheetah/chapter5/Cryptography.cpp
#include <iostream> #include <cmath> #include <climits> #include <vector> using namespace std; typedef long long ll; // input: 1 2 3 // return: 12 // // input: 1 3 2 1 1 3 // return: 36 // // input: 1000 999 998 997 996 995 // return: 986074810223904000 // numbersをvectorで保存して、sort // minimum numberを+1して積を計算する int m...
ALGO
0.999907
5.091803
{ "github_metadata": { "branch": "master", "commit_count": 987, "repo_created_at": "2020-05-20T07:29: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": "f4a0bd99...
9655f463-bdab-4265-9d3a-939ba7616610
Edgarrrrrr/T2-RELION
src/jaz/tomography/extraction.h
#ifndef TOMO_EXTRACTION_HELPER_H #define TOMO_EXTRACTION_HELPER_H #include <src/jaz/gravis/t3Vector.h> #include <src/jaz/gravis/t4Matrix.h> #include <vector> #include <string> #include <omp.h> #include <src/jaz/math/fft.h> #include <src/jaz/image/raw_image.h> #include <src/jaz/image/interpolation.h> #include <src/jaz...
ALGO
0.932091
5.592664
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-28T08:03:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "099d0f1dd26b...
f64eee28-6bd2-45b8-ad49-a8751538c845
AllanOliveira2022/LLPR_LISTA1_RECUPERACAO
QUESTAO 03/Media.cpp
#include <stdio.h> #include <locale.h> int main() { setlocale(LC_ALL,"Portuguese_brazil"); float N1, N2, N3, N4, MEDIA, EXAME, MF; printf("CALCULADORA DE MÉDIA : \n"); printf("Digite a primeira nota : \n"); scanf ("%f", &N1); printf("Digite a segunda nota : \n"); scanf ("%f", &N2); printf("Dig...
ALGO
0.992247
3.801075
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-11-03T16:19: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": "a05f1161b0d6...
4535a54b-0268-4e76-8df1-e15204ba258b
davies/daviescode
C++/CodeJam/practice/ForceTest.cpp
// BEGIN CUT HERE // PROBLEM STATEMENT // Your company produces components used in construction. // From time to time, it is necessary to run a series of // tests on several of the components, to determine their // breaking force. The goal of the testing is to determine // the point at which the unit breaks, up t...
ALGO
0.992688
4.581168
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2015-03-21T17:13:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc8004b7f...
8485ff39-79d8-4c2a-91f6-7c0a0cfecb74
bmzhong/dev
poj/poj2/1258.cpp
#include <iostream> #include <queue> #include <cstdio> #include <algorithm> using namespace std; int n, use[101], d[101], res, cost[101][101]; const int inf = 2147483647 / 2; typedef pair<int, int> P; void prim(int s); int main() { while (scanf("%d", &n) != EOF) { for (int i = 1; i <= n; ++i) { ...
ALGO
0.999966
3.524318
{ "github_metadata": { "branch": "master", "commit_count": 279, "repo_created_at": "2019-10-20T02:34: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": "85039b5b...
934cd336-031b-428b-a019-ce8a517c8bc5
henhenmao/leetcode
111-120/113_path_sum_II.cpp
// Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), left(left), right(right...
ALGO
0.999974
6.346084
{ "github_metadata": { "branch": "main", "commit_count": 197, "repo_created_at": "2025-05-31T00:37:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ffd7c8a6d3...
53dbf050-d8a3-43b5-99af-aa4676a5782e
yblee1223/turtle_control_cpp
src/draw_pid_circle.cpp
#include "rclcpp/rclcpp.hpp" #include <cmath> #include "turtlesim/msg/pose.hpp" #include "geometry_msgs/msg/twist.hpp" double er_sum = 0; double etheta_sum =0; double er_prev = 0; double etheta_prev =0; float feed_x(0.0); float feed_y(0.0); float feed_th(0.0); double init_x(5.54445); double init_y(5.54445); double i...
ALGO
0.994502
4.890425
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-11-26T09:31: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": "32e78ea9e908...
4dd0b79f-f92f-4f08-b4f0-35def96af42e
santihd00/EEDD-
Tipos.cpp
#include <iostream> #include "Tipos.h" using namespace std; //Métodos de tipos de datos: Lista::~Lista() { pnodo aux; while(cabeza) { aux = cabeza; cabeza = cabeza->siguiente; delete aux; } actual = NULL; } void Lista::insertarNodo(Paquete p) { pnodo aux; if (lista...
ALGO
0.982178
4.543959
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-12-08T13:43:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "639b7deb79b9...
f0b232e0-3503-4544-8a63-af4fe1d937fe
MRita443/TravellingSalesman
src/vertex.h
#ifndef TRAVELLINGSALESMAN_VERTEX_H #define TRAVELLINGSALESMAN_VERTEX_H #include <utility> #include <iostream> #include <queue> #include <unordered_set> #include "constants.h" #include "coordinates.h" #include "MutablePriorityQueue.h" class Vertex { public: explicit Vertex(const unsigned int &id, Coordinates c ...
ALGO
0.98999
5.816873
{ "github_metadata": { "branch": "main", "commit_count": 109, "repo_created_at": "2023-05-05T13:28:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "263ef59ecf...
57a2880e-4eaf-4d6d-b392-af47833046b5
jbutner/trilinos-1
packages/moocho/src/ConstrainedOptPack/src/globalization/ConstrainedOptPack_MeritFuncCalc1DQuadratic.cpp
// @HEADER // *********************************************************************** // // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization // Copyright (2003) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of thi...
TOOL
0.996374
6.987224
{ "github_metadata": { "branch": "master", "commit_count": 48938, "repo_created_at": "2013-06-10T20:24:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab5616...
eef9624a-2b34-427f-bb3c-a93831fb8d77
devanshdalal/facebook-hackercup-17
3days/3.cpp
#include <bits/stdc++.h> #define mp make_pair #define pb push_back #define F first #define S second #define N 100010 #define dbg(x) {cerr << #x << " = " << x << endl;} #define dbg2(x,y) {cerr << #x << "," << #y << " = " << x << " " << y << endl;} #define dbg3(x,y,z) {cerr << #x << "," << #y << "," << #z << " = " << x...
ALGO
0.996288
3.321941
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-01-08T18:59: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": "054341a8d5...
6711b2d0-3aa4-41e9-93cb-345f0017870a
Tazri/Problem-Solving-By-C-and-C-Plus-Plus
codeforce/800/2024-12-dec27/2030.A.AGiftFromOrangutan.cpp
// link : https://codeforces.com/problemset/problem/2030/A #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double dl; #define optimize() \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define fraction() \ cout.un...
ALGO
0.999788
4.812839
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2024-11-25T23:59:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a6d27c43f...
afdf5cad-dc83-4c51-9592-5577168d5412
franzzi70/ProjectEuler
P0145_ReversibleNumbers/P0145_ReversibleNumbers/main.cpp
#include <iostream> #include <chrono> #include <string> #include <thread> #include <mutex> #include <vector> //#define VERBOSE int reverseNum(int n) { int reversedNum = 0; int r = n; while (r > 0) { int digit = r % 10; reversedNum = reversedNum * 10 + digit; r /= 10; } return reversedNum; } int solve_...
ALGO
0.998898
5.190524
{ "github_metadata": { "branch": "main", "commit_count": 136, "repo_created_at": "2023-08-06T08:33:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee166d8b76...
8a01d1bf-ed50-4677-8056-3abc293d6ff4
amberGreat/tinyQ
leetcode/cpp/oddEvenLinkedList.cpp
#include <iostream> #include "list_node.h" using std::cout; using std::endl; /*********************************************************************** * https://leetcode.com/problems/odd-even-linked-list/description/ * * Given a singly linked list, group all odd nodes together followed by the even nodes. * Please ...
ALGO
0.999495
5.011128
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2017-08-01T09:12: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": "3bdcc49ce...
fb92cff8-5e6b-4e11-8a44-25fdd6db3ee6
JJungwoo/algorithm
baekjoon/code_plus/basic2/brute-force/1759.cpp
/* [BOJ] 1759. 암호 만들기 최소 한 개의 모음과 최소 두 개의 자음으로 구성 */ #include <iostream> #include <algorithm> using namespace std; #define io ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); // dfs failed... int l, c; char dict[16]; char output[6]; void dfs(int x, int count, int vcnt, int jcnt) { if(count == l && vc...
ALGO
0.999914
3.166897
{ "github_metadata": { "branch": "master", "commit_count": 527, "repo_created_at": "2019-11-17T16:30: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": "2edcfb7b...
8a188613-bcb7-41f6-a307-ec078c5f7419
duchenlong/Cpp
摆动序列.cpp
//问题描述 //  如果一个序列的奇数项都比前一项大,偶数项都比前一项小,则称为一个摆动序列。即 a[2i]<a[2i-1], a[2i+1]>a[2i]。 //  小明想知道,长度为 m,每个数都是 1 到 n 之间的正整数的摆动序列一共有多少个。 //输入格式 //  输入一行包含两个整数 m,n。 //输出格式 //  输出一个整数,表示答案。答案可能很大,请输出答案除以10000的余数。 //样例输入 //3 4 //样例输出 //14 //样例说明 //  以下是符合要求的摆动序列: //  2 1 2 //  2 1 3 //  2 1 4 //  3 1 2 //  3 1 3 //  3 1 4 //  3 2 3...
ALGO
0.999989
4.301546
{ "github_metadata": { "branch": "master", "commit_count": 1006, "repo_created_at": "2020-03-01T15:16:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 25, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "14c38...
ef7a721f-fd23-4878-a9f9-4db7680988f5
albertusdev/competitive-programming
CF/CF450/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<double, double> pdd; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; #define pb push_back #define mp make_pair #define fi first #d...
ALGO
0.99999
4.160848
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2017-11-16T10:34: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": "70b3c8b81...
214195a3-164c-4769-9860-48413b43efd9
sailor-ux/mycodes
leetcode_vscode/leetcode_23/leetcode_23.cpp
#include <iostream> #include <vector> using namespace std; 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: // 从两个有序链表的合并入手!! // 两个有...
ALGO
0.999855
5.643502
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2019-10-11T08:27: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": "1ad084d4f5e...
ea830158-b77d-4f50-af37-9b95bc4943d3
ishandutta2007/codeforces-n
neoorgano/normal/1141/D.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 27; vector<int> larr[MAXN], rarr[MAXN]; main() { int n; cin >> n; string l, r; cin >> l >> r; for (int i = 0; i < n; ++i) { if (l[i] == '?') { l[i] = 'z' + 1; } if (r[i] == '?') { r[i] = ...
ALGO
0.99999
3.146783
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35: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": "e7f83a9ed19d...
83d1d2c4-1355-4710-9622-ec9873c7f75a
g0ncal0/aed_FlightManagement
graph/graph.h
// // Created by <NAME> on 30/11/2023. // #ifndef AVIOES_GRAPH_H #define AVIOES_GRAPH_H #include <cstddef> #include <vector> #include <queue> #include <string> #include <set> #include <stack> #include <unordered_set> using namespace std; class Edge; class Graph; class Vertex; /****************** Provided structu...
ALGO
0.991961
5.295099
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2024-10-24T19:11: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": "1bf85498687...
f26c7720-ae19-4934-a4e2-35c4de747053
ishandutta2007/codeforces-s
s2speed/normal/1450/H1.cpp
#include<bits/stdc++.h> using namespace std; #pragma GCC optimize ("Ofast") mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); #define all(x) x.begin() , x.end() #define sze(x) (ll)(x.size()) #define mp(x , y) make_pair(x , y) #define wall cerr<<"--------------------------------------"<<endl typed...
ALGO
0.999996
3.924972
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1bdbc533b694...
00696511-ea72-42d6-a2c3-f9a3c4bd4e63
mridul88/Programs
self made - not working/sum_subset.CPP
/* program o implemnt sum of subset (NP -complete) problem, working only in special cases as when 2,3,5,7 and sum =5 ; Fail in 5, 10, 15, 20 sum =20. */ #include<cstdio> using namespace std; void print(int *x,int *a,int n) { for(int i=0;i<n;i++) { if(x[i]==1) printf("%d ",a[i]); } printf("\n"); } int mai...
ALGO
0.999879
3.038975
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2014-01-29T17:16: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": "4e153f14a1...
2d7d7115-1132-4a80-b3d7-61fabd92df26
ishandutta2007/codeforces-e
eecs/normal/1665/E.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 100010; int T, n, q, tot, a[maxn], rt[maxn]; vector<int> V; struct node { int l, r, s; } t[maxn * 35]; #define mid ((l + r) >> 1) void ins(int &k1, int k2, int l, int r, int p) { t[k1 = ++tot] = t[k2], t[k1].s++; if (l == r) return; if (mid >=...
ALGO
0.999923
4.881472
{ "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": "4a156f32e315...