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
e1ff036e-0de6-4907-895f-d480b7bcfc4f
sunrize0714/AtCoder
ABC/301-400/ABC359/e.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long int; typedef vector<ll> vll; typedef vector<vll> vvll; typedef vector<vvll> vvvll; typedef vector<bool> vb; typedef vector<string> vs; typedef pair<ll,ll> pll; typedef vector<pair<ll,ll>> vp; #define rep(i,a,n) for(ll i=a;i<n;i++) #define revrep(i,a,n) f...
ALGO
0.999947
4.626771
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2024-07-02T14:58: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": "f800469454...
424ffd96-28a7-48fe-b83d-aeb503d9c02a
AnaRaquelcv/examen-
raejercicio5.cpp
#include <iostream> #include <limits> using namespace std; int main() { int numero; int suma = 0; int i = 1; cout << "Ingrese un número entero positivo: "; cin >> numero; if (cin.fail()) { cout << "Entrada inválida. Debe ingresar un número entero." << endl; cin.clear(); ...
ALGO
0.945261
4.200206
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-03-27T16:15: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": "df8952924cd5...
7ea02fdd-b397-40e2-8e0f-414ffa356211
piotrcurious/bldc_encoder
tested/4compact.ino
#include <Arduino.h> #include <BasicLinearAlgebra.h> namespace Config { constexpr int PHASE_A_PIN = A0, PHASE_B_PIN = A1, PHASE_C_PIN = A2, COMMON_PIN = 9; constexpr float ELECTRICAL_STEPS_PER_REV = 6.0f, TWO_PI_F = 2.0f * PI, SQRT_3 = 1.7320508f; constexpr int NUM_SAMPLES = 16; constexpr float ANGLE_U...
ALGO
0.996636
6.203006
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2025-06-10T17:50: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": "2cfbb93d2ee...
1b1d6658-a564-4b9a-a3f0-62cf48ccbc6d
emilyju0314/gpt_code_plagiarism
dataset/code_content_classifier/allpro_train/1_4323_90.cpp
#include <iostream> #include <algorithm> #include <iomanip> #include <map> #include <set> #include <queue> #include <stack> #include <numeric> #include <bitset> #include <cmath> static const int MOD = 1000000007; using ll = long long; using u32 = uint32_t; using namespace std; template<class T> constexpr T INF = ::nu...
ALGO
0.999893
4.081425
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-04-28T03:59: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": "e724289a76a...
d5a21389-cdd6-43ae-a2f7-b2d6e7a2bf42
old-bear/The-C-Programming-Language
ch1/1-23.cpp
// Author: <EMAIL> // Date: Thu Oct 3 17:56:03 2013 // // File: 1-23.cpp // Description: Remove C comments #include <stdio.h> enum CodeState { CODE = 0, LINE_COMMENT = 1, MULTI_COMMENT = 2, }; int main(int argc, char* argv[]) { int c = -1; CodeState state = CODE; while ((c = getchar()) != E...
ALGO
0.977226
3.050804
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2012-03-24T07:38:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c0e8321a...
34706642-7915-47ec-816f-f6eb1738bd20
shauryas1ngh/codes
ELOMAX.cp
#include<bits/stdc++.h> #define pi 3.14159265359 #define ll long long #define wh(t) int t;cin>>t; while(t--) #define speed ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define f(i,a,b) for(int i=a;i<b;i++) using namespace std; #include<string.h> //<NAME>- phoenix_aditya bool comp(pair<int,int...
ALGO
0.999752
3.147188
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2020-09-30T18:24:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7c483de...
53c1ab58-87bd-4a55-8379-85ad17494144
ZYBO-o/Skill-Accumulation
秋招经历/重难手撕/多线程同步问题/5 设计按序打印的类.cpp
#include <mutex> #include <iostream> #include <condition_variable> #include <queue> #include <thread> #include <assert.h> #include <functional> using namespace std; //============================条件边量 ======================= class Foo2 { condition_variable cond; mutex mtx; int k = 0; public: void first(...
TOOL
0.957758
4.014561
{ "github_metadata": { "branch": "main", "commit_count": 184, "repo_created_at": "2021-03-03T11:01:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f89a8143f5...
3342567b-df7d-4b7d-9080-7ea4e9509b74
ishandutta2007/codeforces-l
leaf1415/normal/1165/D.cpp
#include <iostream> #include <string> #include <algorithm> #include <queue> #include <set> #include <vector> #define llint long long using namespace std; int T; int n; vector<llint> d; vector<llint> vec; llint gcd(llint a, llint b) { if(b == 0) return a; return gcd(b, a%b); } llint lcm(llint a, llint b) { return ...
ALGO
0.999466
4.157676
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17: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": "7f94c22ed5b9...
046549a0-86df-48bd-bffb-7f07e7047af1
JoonheeJeong/problem_solving
backjoon/c++/1956.cc
#include <iostream> // #include <fstream> // for test #include <vector> const int INF = 2'000'000'000; struct Min_Cycle { int V, E; std::vector<std::vector<int>> edges; Min_Cycle(int V, int E, std::istream &is); int solve(); }; Min_Cycle::Min_Cycle(int V, int E, std::istream &is) : V(V), E(E), ed...
ALGO
0.999823
4.270042
{ "github_metadata": { "branch": "main", "commit_count": 394, "repo_created_at": "2020-09-17T09:15:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6cd1d62a0b...
78576877-b6e1-49e1-96bf-e1caa87dbe7b
pachonunderscore1992/src
topcoder/Single Round Match 640/ChristmasTreeDecoration.cpp
#include <cstdio> #include <cmath> #include <cstring> #include <ctime> #include <iostream> #include <algorithm> #include <set> #include <vector> #include <sstream> #include <typeinfo> #include <fstream> using namespace std; typedef pair<int,int> edge; struct UF { vector<int> p; int comp; UF(int n){ ...
ALGO
0.999909
5.296371
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2014-11-18T14:48: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": "791fdd5b8...
7e4fac7c-999b-401a-9c75-621a3f6f65e2
thang44hdai/DSA-PTIT
hello/tinh_toan_gia_tri_bieu_thuc.cpp
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") using namespace std; #define ll long long ll hau_to(vector<string> vt) { stack<ll> st; for (auto i : vt) if (i != "+" and i != "-" and i != "*" and i != "/") st.push(stoll(i)); else { ll fi = st.top(); ...
ALGO
0.999895
4.393626
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2022-10-29T01:37:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "846e7cc7f32...
7ae891de-b400-4ff6-8c03-0d9c07644cb8
NikolayNikolaev1/Softuni_CPP
CPP_Fundamentals/03_AssociativeContainers_Classes_Objects/AssociativeContainersClassesObjects/03_BankAccount.cpp
/* * Write a program, make a Class Bank Account. The class should have: * Members: * User Name * Account Num (array of chars) * Balance (the balance should be floating number) * Methods: * Print - Print all Info of the account (Name, Account Num, Balance) * Add Balance - Add balance method (you can not add ZERO or Nega...
TOOL
0.93977
4.538291
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-08-07T11:45:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db91d99b9ba4...
54baa400-09f4-4faf-8d33-2ca204432d54
tusikalanse/acm-icpc
2019/hdu/0731/1007.cpp
#include <bits/stdc++.h> using namespace std; int T, d[5][5], ex, ey, tot, vis[20]; int main() { scanf("%d", &T); while(T--) { tot = 0; memset(vis, 0, sizeof(vis)); for(int i = 1; i <= 4; ++i) { for(int j = 1; j <= 4; ++j) { scanf("%d", &d[i][j]); if(d[i][j] == 0) ex = i, ey = j; } } w...
ALGO
0.999792
4.211615
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2021-06-09T11:48:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d65013e...
8d906fd7-4114-4189-8639-b1bd54b6a8f5
MrHrh/sort
radix_sort.cpp
/************************************************************************* > File Name: main.cpp > Created Time: Mon 21 Jan 2019 09:47:03 AM CST ************************************************************************/ #include<iostream> #include<stack> using namespace std; //基数排序(桶排序) //平均时间O(d(n+rd)) => O(...
ALGO
0.999862
4.624656
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-07-04T07:58: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": "e1f14516fb...
c65914ba-c88d-4804-8f7d-4fe5fdd5298a
zamax110813/kyopuro
kyopuro/atcoder/ABC/abc173/c/main.cpp
#include<bits/stdc++.h> #include<atcoder/all> using namespace atcoder; using namespace std; typedef long long ll; #define REP(i,n) for(ll i=0;i<(ll)n;i++) #define REPD(i,n) for(ll i=n-1;i>=0;i--) #define FOR(i,a,b) for(ll i=a;i<=(ll)b;i++) #define FORD(i,a,b) for(ll i=a;i>=(ll)b;i--) #define FORA(i,I) for(const auto& i...
ALGO
0.999815
4.460504
{ "github_metadata": { "branch": "master", "commit_count": 138, "repo_created_at": "2021-11-18T01:59:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29186436...
cf4ce91e-6fce-45c7-a584-9c70510cccea
jimjin73/compro
AGC/041/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; vector<ll> A; ll N,M,V,P; bool check(int p){ if(N-p <= P) return true; vector<ll> v; for(int i=0;i<N;i++){ if(v.size() >= N-P) break; if(i==p) continue; v.push_back(A[i]); } ll ap = A[p] + M; if(ap < v...
ALGO
0.999994
4.566431
{ "github_metadata": { "branch": "master", "commit_count": 159, "repo_created_at": "2020-03-29T13:24: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": "865159ed...
bf2d312b-d300-4afa-8e97-04d70a866635
igor-reisg/BCC-UNESP
3º Semestre (2025.1)/Laboratório de Programação Competitiva/Contest 8/Labyrinth.cpp
#include <bits/stdc++.h> using namespace std; #define MAX 1001 int m, n; string labirinto[MAX]; bool visitado[MAX][MAX]; pair<int, int> pai[MAX][MAX]; pair<int, int> inicio, fim; int dx[4] = {0, 0, -1, 1}; int dy[4] = {-1, 1, 0, 0}; char direcao[4] = {'U', 'D', 'L', 'R'}; void initLabirinto() { for (int i = 0; ...
ALGO
0.99999
4.441622
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-04-02T01:45: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": "bc31d47250cb...
b83d7f02-deb3-4d17-a152-02fcdaddef56
ishandutta2007/codeforces-m
meijer/normal/1687/C.cpp
#include <bits/stdc++.h> #define int long long using namespace std; #define fi first #define se second #define pb push_back #define all(a) a.begin(), a.end() const int N = (1<<20); const int mod = 1e9+7; int t, n, m, a[N], b[N], l[N], r[N]; int sma[N]; vector<int> ati[N]; signed main() { ios_base::sync_with_std...
ALGO
0.999879
4.089777
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03: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": "76e6c001b3d9...
e8b5a972-7207-4801-a26a-1e9c546a2789
obrienadam/CAFFE_old
src/Solvers/MultiphasePiso.cpp
#include <iomanip> #include "MultiphasePiso.h" #include "InitialConditions.h" MultiphasePiso::MultiphasePiso(const Input &input, const HexaFvmMesh &mesh) : Piso::Piso(input, mesh), alphaField_(mesh, Field<double>::CONSERVED, "alpha"), gradAlphaField_(mesh, Field<Vector3D>::CONSERVED, "gradAlpha"...
ALGO
0.998072
5.362615
{ "github_metadata": { "branch": "master", "commit_count": 170, "repo_created_at": "2014-10-06T06:30:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "380016e...
716b338f-c626-4f96-bdca-391349cef84e
ankitmohapatra966/LeetCode_Daily_solution
407. Trapping Rain Water II.cpp
class Solution { const int dx[4] = {-1, 0, 1, 0}; const int dy[4] = {0, 1, 0, -1}; public: int trapRainWater(vector<vector<int>>& heightMap) { if (heightMap.empty() || heightMap[0].empty()) return 0; const int m = heightMap.size(); const int n = heightMap[0].size(); ...
ALGO
0.999993
6.837176
{ "github_metadata": { "branch": "main", "commit_count": 518, "repo_created_at": "2024-02-13T14:12:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d98fc42ae...
3c5e095d-4d86-4f88-ad1d-457f13e5121a
yamins81/cgkit
supportlib/include/sor_triangulator.h
/* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (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.mozilla.org/MPL/ * ...
ALGO
0.944042
6.149373
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2011-02-27T15:19:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2da3b854a...
9de02a5a-9ec3-464b-ab5f-a955a550d840
Geant4/geant4
source/processes/hadronic/models/fission/src/G4SmpNuDistDataPu239_241.cc
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
ALGO
0.995164
4.866746
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2016-06-21T08:25:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 705, "forks": 340, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "521b1b...
8ee5084c-df07-4d28-99f0-8872ea9515d5
Rohde-Schwarz/botan
src/lib/pbkdf/argon2/argon2_avx2/argon2_avx2.cpp
/** * (C) 2023 <NAME> * * Botan is released under the Simplified BSD License (see license.txt) */ #include <botan/argon2.h> #include <botan/compiler.h> #include <immintrin.h> namespace Botan { namespace { class SIMD_4x64 final { public: SIMD_4x64& operator=(const SIMD_4x64& other) = default; SIMD_4x...
ALGO
0.932
4.720972
{ "github_metadata": { "branch": "master", "commit_count": 17496, "repo_created_at": "2016-02-29T19:22:51.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "randombit/botan", "stars": 34, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_...
dbe139da-17cb-4efc-9b36-96f3537194e7
tangyao0792/ACM_Solutions
UvaOj/uvaoj10651.cpp
#include<iostream> #include<cstring> #ifndef ONLINE_JUDGE #include<cstdio> #endif using namespace std; int vis[5000]; int d[5000]; int dp(int x); int main() { #ifndef ONLINE_JUDGE freopen("in.txt", "r", stdin); #endif int i; for(i = 0; i < 1<<12; i++) { d[i+1] = dp(i+1); } int n...
ALGO
0.999345
3.645405
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2013-01-15T04:27: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": "891b55e28c...
bcaa1200-367d-4978-92bc-dc8f5d358edc
TechxGenus/LightBinPack
lightbinpack/cpp/radix_sort.cpp
#include <pybind11/pybind11.h> #include <pybind11/stl.h> #include <algorithm> #include <vector> namespace py = pybind11; inline int get_value(const std::vector<std::vector<int>> &row, int pos) { const auto &primary_list = row[0]; if (pos < (int)primary_list.size()) { return primary_list[pos]; } ...
ALGO
0.999595
6.76866
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-11-10T14:54:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1bd5ad136d...
fcd24fbb-84f6-4b42-8e61-f64b51aec53f
fahaghverd/Dynamic-Compensated-WAM-Haptic-Teleop
leader/include/sin_jp_trajectory.hpp
#pragma once #include <barrett/units.h> #include <barrett/systems.h> #include <cmath> template<size_t DOF> class sinJpRefTrajectory: public systems::System { BARRETT_UNITS_TEMPLATE_TYPEDEFS(DOF); // IO public: Input<double> timef; Output<jp_type> referencePTrack; Output<jv_type> referenceVTrack; Output<ja_type>...
ALGO
0.971834
6.579476
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2024-09-18T23:24: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": "2fa0c57e0...
4710cbd3-9cc8-4a43-bff6-3cfb4d5d5d2e
HannoFlohr/hackerrank
algorithms/strings/SeparateTheNumbers.cpp
#include <bits/stdc++.h> using namespace std; void separateNumbers(string s) { unsigned long long int cur, size, j; string next, check; for(int d=1; d<=s.size()/2; d++) { cur = stoull( s.substr(0,d) ); j = d; while(j<s.size()) { next = to_string( ++cur ); ...
ALGO
0.999896
4.239351
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2019-03-05T16:33: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": "e8b135f58...
25073ff0-a55b-4c61-af86-b34d7a56c887
AryanSai/DSA
Lab Manual/Week5/P142.cc
#include <iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; //after the first loop, we have to check if indeed there is a cycle //this question does not quarantee the presence of a cycle, hence we need to //check if a cycle exists class S...
ALGO
0.999754
4.565499
{ "github_metadata": { "branch": "master", "commit_count": 159, "repo_created_at": "2023-08-19T09:47:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aef28665...
96dfdcd1-09f3-449f-95a5-1d8c31545b65
terabyte25/CrabNet-Android
src/DS_HuffmanEncodingTree.cpp
/* * Copyright (c) 2014, Oculus VR, Inc. * Copyright (c) 2016-2018, TES3MP Team * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file...
ALGO
0.996874
5.547156
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-02-03T02:19:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f4f5280ccc...
7370b3df-d77e-4857-8360-f33f11439760
tatsumack/atcoder
abc082/arc087_b.cpp
#include <iostream> #include <vector> using namespace std; typedef long long ll; #define BASE 8001 bool dpx[BASE][BASE*2]; bool dpy[BASE][BASE*2]; int main() { string s; int x, y; cin >> s >> x >> y; bool isX = true; int cnt = 0; vector<int> vx, vy; for (int i = 0; i < s.size(); ++i) ...
ALGO
0.999987
4.213991
{ "github_metadata": { "branch": "master", "commit_count": 527, "repo_created_at": "2018-03-12T23:22: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": "8a10eed8...
4e57da83-4d61-486c-aac6-0aca0298345b
ishandutta2007/codeforces-a
ainta/normal/830/C.cpp
#include<cstdio> #include<algorithm> #include<queue> using namespace std; #define pii pair<int,int> int n, w[110], N[110]; long long C, K, V[110], R, res; priority_queue<pii>PQ; int main(){ int i; scanf("%d%lld",&n,&K); for(i=1;i<=n;i++){ scanf("%d",&w[i]); PQ.push(pii(-1,i)); } int ...
ALGO
0.999783
3.29331
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b0b6656f791...
ddcf6a98-a77b-404b-9b3c-436dfe2fd667
CHS-USACO-Club/CSES-Solutions
Intro/TwoSets/TwoSets.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll n; cin >> n; ll sum = ((n*(n + 1))/2); ll msum = ((n*(n + 1))/4); set<int> a, b; if (sum & 1) { cout << "NO"; } else { for (int i = 1; i <= n; ++i) { a.insert(i); } ...
ALGO
0.999836
3.221769
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-11-29T00:33:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bfa72bef6b767...
3bfcc998-d12c-4aa8-a418-8b797947cc58
arangodb/arangodb
3rdParty/boost/1.78.0/boost/hana/adjust_if.hpp
/*! @file Defines `boost::hana::adjust_if`. @copyright <NAME> 2013-2017 Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_HANA_ADJUST_IF_HPP #define BOOST_HANA_ADJUST_IF_HPP #include <boost/hana/fwd/adjust_if.hp...
TOOL
0.931084
6.950458
{ "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": ...
923a6f6d-8bf4-436a-8dc3-c8c7ae9c39d2
Rahul-Palahwat/LeetCode_Problems
Implementing Dijkstra Algorithm - GFG/implementing-dijkstra-algorithm.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to find the shortest distance of all the vertices //from the source vertex S. vector <int> dijkstra(int V, vector<vector<int>> adj[], int S) { // Code here vector<...
ALGO
0.999967
5.955008
{ "github_metadata": { "branch": "main", "commit_count": 2689, "repo_created_at": "2022-11-05T04:33: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": "7a536314b...
5078bf4d-70a6-458c-bd04-3529dc7495d2
ishandutta2007/codeforces-i
internetperson10/normal/1548/B.cpp
#include <bits/stdc++.h> typedef long long ll; using namespace std; vector<ll> nums; ll lift[20][200001]; int main() { ios::sync_with_stdio(false); cin.tie(0); int t; cin >> t; while(t--) { int n; cin >> n; vector<ll>().swap(nums); nums.resize(n-1); ll x, y, g; cin >> y; for(int i = 0; i < n-1; i+...
ALGO
0.999817
3.509457
{ "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": "e3b2fe58bc56...
d2d808f4-e7e7-41c0-b625-63b092d1059a
Haduckientechnology17092005/ADA
thamlam/laplich.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct Job { int gi; // Lợi ích của công việc int di; // Thời gian hoàn thành công việc (deadline) }; // Hàm sắp xếp các công việc theo lợi ích gi giảm dần bool compareJobs(Job a, Job b) { return a.gi > b.gi; } void schedule...
ALGO
0.999997
5.760086
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-12-12T16:13: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": "bf1f63615e25...
6dbaf4d1-3614-4611-aadf-11956090e353
Nimish-Jain/DSA-Practice
Strings/85. SwapsToBracketBalancing.cpp
//Code :: <NAME> #include<bits/stdc++.h> #define endl "\n" using namespace std; int32_t main() { #ifndef ONLINE_JUDGE freopen("in.txt", "r", stdin); freopen("out.txt", "w", stdout); #endif int t; cin >> t; while (t--) { int n; cin >> n; string s; cin >> s; //Time -> O(n), space -> O(1) int ans = 0; in...
ALGO
0.996401
4.257899
{ "github_metadata": { "branch": "master", "commit_count": 206, "repo_created_at": "2020-12-28T14:54: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": "fb93931f...
bc862957-52d1-43bc-a4cb-680810dbf37a
Paulfx/mesh_modelisation_m2
utils.cpp
#include "utils.h" void HSVToRGB(double hue, double s, double v, double& r, double& g, double& b) { r=0, g=0, b=0; if (s == 0) { r = v; g = v; b = v; } else { int i; double f, p, q, t; if (hue == 360) hue = 0; else ...
ALGO
0.974809
4.807869
{ "github_metadata": { "branch": "master", "commit_count": 110, "repo_created_at": "2019-11-25T20: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": "23a4cc91...
a0634ba2-8274-4db7-981d-14d74265cb00
sokolovea/cpp-sym-2023-2025
1_sem/12_exceptions_set_map/3_set/main.cpp
#include <iostream> #include <set> #include <algorithm> using namespace std; int main() { set<int> numbers = {5, 3, 8, 1, 4}; numbers.insert(10); //вставка элементов numbers.insert(2); numbers.insert(2); numbers.insert(2); numbers.insert(2); numbers.insert(2); numbers.erase(3); //уда...
TOOL
0.982742
5.009983
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2025-04-05T19:13: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": "8cd329c5008...
61633d24-10b6-48d3-a957-393beb217d27
ishandutta2007/codeforces-r
romawhite/normal/1616/D.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for (int i = (a); i < (b); i++) #define RFOR(i,b,a) for (int i = (b) - 1; i >= (a); i--) #define ITER(it,a) for (__typeof(a.begin()) it = a.begin(); it != a.end(); it++) #define FILL(a,value) memset(a, value, sizeof(a)) #define SZ(a) (int)a.size() #def...
ALGO
0.999867
4.125941
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8ad5852d591...
a794b038-0d05-4c57-b099-5ce148c9ac45
giriteja94495/leetcodesolutions
0073-set-matrix-zeroes/0073-set-matrix-zeroes.cpp
class Solution { public: void setZeroes(vector<vector<int>>& matrix) { // create boolean variables to keep track wheter first row or col contains zero value bool isFirstRowZero = false; bool isFirstColZero = false; // declare matrix row and col sizes int rows = matr...
ALGO
0.999029
6.373324
{ "github_metadata": { "branch": "master", "commit_count": 650, "repo_created_at": "2020-02-11T16:10:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9dc5297...
375cde4a-c860-4519-860c-effd736550d0
aicedeno1/Estructuras
Deberes/Parcial 1/MatricesLambda/main.cpp
#include <iostream> #include "Matriz.h" #include "Validaciones.h" using namespace std; int main() { Matriz m(3); Validaciones val; int** matriz1 = m.getMatriz1(); int** matriz2 = m.getMatriz2(); cout << "Ingrese los elementos para la Matriz 1 (3x3): " << endl; for (int i = 0; i < m.ge...
ALGO
0.985953
5.101072
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2024-11-06T22:58:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "6be5177cdf5...
3fe14324-b302-4be0-ac2b-b696d3fce755
TsXor/graph_algo_assignment
src/4 - max match in bigraph and normal graph/max_match_blossom.cpp
#include <iostream> #include "../utils/max_match.hpp" int main(void) { network net; net.insert_conn_bidi(1, 11, 0); net.insert_conn_bidi(2, 11, 0); net.insert_conn_bidi(2, 12, 0); net.insert_conn_bidi(3, 11, 0); net.insert_conn_bidi(3, 12, 0); net.insert_conn_bidi(3, 13, 0); net.insert_...
ALGO
0.993886
5.046188
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-10-22T15:15: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": "69069265bb9...
5c007bf0-a841-4f19-a0cc-3c8fdf064209
ermolaevv/ppc-2024-autumn
tasks/seq/borisov_s_sum_of_rows/src/ops_seq.cpp
#include "seq/borisov_s_sum_of_rows/include/ops_seq.hpp" using namespace std::chrono_literals; bool borisov_s_sum_of_rows::SumOfRowsTaskSequential::pre_processing() { internal_order_test(); size_t rows = taskData->inputs_count[0]; size_t cols = taskData->inputs_count[1]; if (rows <= 0 || cols <= 0) { re...
ALGO
0.912756
6.235332
{ "github_metadata": { "branch": "master", "commit_count": 440, "repo_created_at": "2024-10-04T18:18:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 157, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d5473...
327f3cf9-b81f-4063-80a1-52bd18caf5f2
SahilKuchlous/CP
CodeForces/p1295_B.cpp
#include <iostream> #include <string> #include <map> #include <cmath> using namespace std; int main () { int t; cin >> t; while (t--) { int n, x; cin >> n >> x; string s; cin >> s; int bal[n]; if (s.at(0) == '0') { bal[0] = 1; } else { bal[0] = -1; } int maxb, minb; maxb = bal[0]; minb = ...
ALGO
0.999907
3.884969
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2021-01-14T07:06:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e55e65e1b61...
f5da9467-44ee-4128-9ba9-33e9b7c69b99
ishandutta2007/codeforces-p
primenumber/normal/1254/B1.cpp
#include <bits/stdc++.h> #define FOR(i,k,n) for(int i = (k);i < (n);++i) #define REP(i,n) FOR(i,0,n) #define ALL(x) begin(x),end(x) using namespace std; using ll = int64_t; using vecint = vector<int>; using vecll = vector<ll>; int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin>>n; vecll a(...
ALGO
0.999959
3.422981
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:49: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": "158058492369...
85cc2ac4-f1f3-4f03-858d-988e20f7ca12
langningchen/Coding
Etiger/2210.cpp
#include <bits/stdc++.h> using namespace std; const int N = 10; int n, m, k, ans, ma[N][N]; void dfs(int x, int y) { if (y == m + 1) { y = 1; x++; } if (x == n + 1) { ans++; return; } dfs(x, y + 1); for (int i = -1; i <= 1; i++) for (int j = -1; j ...
ALGO
0.999833
3.609274
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-05-25T03:10:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e0c8ac48afb2...
49a86be5-13fd-4d3a-9105-8f18d999f99f
leducphuclong/code
Competitive Programming/all/devide_conquer.cpp
#include <iostream> #include <vector> #include <algorithm> class Point { public: int x, y; Point(int _x, int _y) : x(_x), y(_y) {} int quadrant() const { if (x >= 0 && y >= 0) return 1; if (x <= 0 && y >= 0) return 2; if (x <= 0 && y <= 0) retur...
ALGO
0.999994
5.338373
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2024-02-22T10:27:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "007e71134e...
9c650efe-f781-4490-ae83-bf3a115413b8
wfgu-git/problemset
Codeforces/cf981B.cpp
#include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> #include<string> #include<iostream> #include<sstream> #include<set> #include<map> #include<queue> #include<bitset> #include<vector> #include<limits.h> #include<assert.h> using namespace std; typedef long long ll; const ll mod = 100...
ALGO
0.999536
3.381425
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2018-01-03T10:21: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": "56235ac25...
5b1ce586-ea49-4bba-91bc-8381a95c521a
neKoui1/AcWing
BasicAlgorithm/Sort/HeapSort/HeapSort.cpp
#include<iostream> #include<vector> #include<algorithm> #include<cstdio> using namespace std; void Heapify(vector<int>& tree, int n, int i) { int c1 = 2*i + 1; int c2 = 2*i + 2; int max = i; if ( c1 < n && tree[c1] > tree[max] ) { max = c1; } if ( c2 < n && tree[c2] > tree[max] ) { ...
ALGO
0.999969
4.434572
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-04-03T12:54:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3558bc2bec0...
6d192b0f-af48-424d-8f6b-737a804fe2ae
tl0x/Usaco-Solutions
2016/feb2016b1.cpp
// code by taylor #include <iostream> #include <set> #include <vector> #include <iostream> #include <iomanip> #include <algorithm> #include <unordered_map> using namespace std; #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") using ll = long long; using vi = std::vector<int>; #define optimize() ios...
ALGO
0.999916
3.67718
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-02-27T15:49: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": "52e3a156768f...
652a6265-e5c0-44c4-94c6-355896c74af8
its-mahi/striver_sde_sheet
Day 2 : Arrays Part II/Find Duplicate in Array.cpp
/** * @author : its_mahi * * Code : https://www.codingninjas.com/studio/problems/1112602?topList=striver-sde-sheet-problems&utm_source=striver&utm_medium=website * Article : https://takeuforward.org/data-structure/find-the-duplicate-in-an-array-of-n1-integers/ * * Desc : * You are given an array of integ...
ALGO
0.999936
4.944376
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2023-09-30T17:49:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "184124a2fe1...
3674f9d1-4616-49fb-9935-0e766ad4c113
saurabhmaurya1309/GeekForGeeks_Problems
Merge Sort - GFG/merge-sort.cpp
//{ Driver Code Starts #include <stdio.h> #include <bits/stdc++.h> using namespace std; /* Function to print an array */ void printArray(int arr[], int size) { int i; for (i=0; i < size; i++) printf("%d ", arr[i]); printf("\n"); } // } Driver Code Ends class Solution { public: void merg...
ALGO
0.999907
6.065426
{ "github_metadata": { "branch": "main", "commit_count": 974, "repo_created_at": "2023-05-07T05:48: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": "d73eb64974...
529ca234-b907-45bc-a7c5-7b871c9b48c2
ishandutta2007/codeforces-a
alexluchianov/normal/956/D.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cassert> #include <cmath> #include <map> using ll = long long; using ld = long double; class FenwickTree{ private: std::vector<int> aib; int n; public: FenwickTree(int n_) { n = n_; aib.resize(1 + n); } void update(int pos, int val...
ALGO
0.999755
4.021926
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae18f7501e5b...
d870a800-991d-4415-85af-30954c06a1c6
ballaneypranav/ucsd-dsa
1-algo-toolbox/4-divide-and-conquer/3_improving_quicksort/sorting.cpp
#include <iostream> #include <vector> #include <cstdlib> using std::vector; using std::swap; void randomized_quick_sort(vector<int> &a, int l, int r); void partition2(vector<int> &a, int l, int r); void partition2(vector<int> &a, int l, int r) { int x = a[l]; int j = l; for (int i = l + 1; i <= r; i++) { if (a...
ALGO
0.999965
5.418238
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-05-18T08:06:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78e37b281...
714d704f-6958-48a8-a90c-b6bd7b651a7e
pancholipratham7/DSA
Dynamic Programming/13.Subset Sum with K/sol.cpp
#include<iostream> #include<vector> using namespace std; // Memoization code bool findSubset(vector<int> &arr,int n,int target,vector<vector<int>> &dp){ if(target==0) return true; if(n==0) return target==arr[n]; if(dp[n][target]!=-1) return dp[n][target]; bool notPick=findSub...
ALGO
0.999985
5.859178
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2022-07-09T17:00:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1298bae633...
37e382c2-c678-4088-8bd8-8ddebfc1d4f1
dayalmadan/MTH773P
06-EuropeanOptions/EurCall.cpp
// // EurCall.cpp // 04-01 BS European Options // // Created by Dayal on 15/02/2021. // Copyright © 2021 MTH773P. All rights reserved. // #include "EurCall.hpp" EurCall::EurCall(double S0, double K, double T, double Sigma, double r) // constructor to set private variables { StockPrice = S0; StrikePrice = ...
ALGO
0.989918
5.277357
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2021-02-04T19:55:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "915155b826f...
80a6e523-ad8c-4c01-8660-1aa6a2007853
lemonisprolol/TUYENQUAN
De On TP/TPHCM/2016-2017/TOP.cpp
#include <bits/stdc++.h> #define long ong int using namespace std; void inoutput() { iostream::sync_with_stdio(0); cin.tie(0); cout.tie(0); freopen("TOP.INP", "r", stdin); freopen("TOP.OUT", "w", stdout); } struct doi { int h; //height of each part int gid; //id in g possesion; int v, z;...
ALGO
0.999964
3.475059
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2023-12-23T10:42: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": "ffa222a273...
ba3d5ac1-8c68-42bb-8c9b-905dd54ebee8
Kyle549/MEng_Project
UserStoryElicitation/Code_Snippets/81-90/s046352028.cpp
#include<iostream> #include<stdio.h> #include<string> #include<math.h> #include<iomanip> #include<algorithm> #include<string.h> #include<cctype> #include<map> #include<set> #include<vector> #include<sstream> #include<stack> using namespace std; double abs(double x) { if(x<0) return -x; else ...
ALGO
0.99746
3.110439
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-05-22T06:40: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": "0c6886e0a469...
523d1dd9-094b-4973-a5bc-76778a0b71cb
reahly/scavengers-external
vitasnella-scavengers/config/config.cpp
#include "config.hh" #include <filesystem> #include <fstream> #include <iomanip> #include <xorstr.hh> #include "../utils/utils.hh" nlohmann::json json; c_config config; void assign_item( item& item ) { if ( json[item.name.c_str( )].empty( ) ) return; if ( item.type == _( "float" ) ) *static_cast<float*>( item....
CONFIG
0.93422
5.044783
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-07-15T11:54:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1b4dcb5696f...
bab78a8d-a521-481f-aacb-a8b1c29e859e
RosettaCommons/rosetta
source/src/protocols/constraint_generator/TerminiConstraintGenerator.cc
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
CONFIG
0.948005
7.186833
{ "github_metadata": { "branch": "main", "commit_count": 11737, "repo_created_at": "2023-11-17T16:42:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 296, "forks": 100, "issues": 27, "pull_requests": 9 }, "file_meta": { "content_id": "46e1...
08f3d624-a300-4ce3-83a0-579eada5e280
Sumit1608/CodingNinjas_CompetitiveProgramming_Solutions
Lecture 3 Language Tools/17 Warm Reception.cpp
#include<bits/stdc++.h> using namespace std; //First Approach // As the order of arrival and departure of guest is randomly given, so we check one by one // for every guest. For exapmle, a guest arrived at 900 and leave at 1800, so we check the // no of rest of the guest that are present in between that 900 and 1800 ...
ALGO
0.999975
4.133429
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-03-05T15:24: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": "81871f678af...
52343f3d-4965-46da-a805-6e35fb9d39cd
Ansi007/Programming-Fundamentals-Hacktoberfest
Programs/C++/Find_a_node_in_linkedList.cpp
/* Submitted by: <NAME> GitHub Link: https://github.com/Sneha-jais problem statement: You have been given a singly linked list of integers. Write a function that returns the index/position of an integer data denoted by 'N' (if it exists). Return -1 otherwise. Note : Assume that the Indexing for the singly linked list ...
ALGO
0.999915
5.444074
{ "github_metadata": { "branch": "main", "commit_count": 483, "repo_created_at": "2022-05-28T08:34:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 95, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f88fe40af...
80ccb1b9-8f42-4b8d-8745-74f37cfe868f
AndresFForeroP/Fundamentos-programaci-n
parcial2.cpp
#include <stdio.h> #include <stdlib.h> int main() { //iniciamos poniendo las variables, numero es el numero que entra,conteo lo use para contar cuantos numeros me quedaban,y Y la use para almacenar el valor de conteo int numero,conteo = 0,y = 0; printf(" inserte un numero mayor o igual que 2 y menor que 100.000...
ALGO
0.999845
3.291546
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-11-02T15:38:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "622c08d1697d...
6333aa25-3e74-407c-9a21-51354d169227
ospinalucas15/practica-1
ejercicio16.cpp
#include <iostream> using namespace std; int ejercicio16() { int k; cout << "Ingrese un número: "; cin >> k; int maxLongitud = 0; int semillaMaxLongitud = 0; for (int j = 1; j < k; j++) { int longitud = 1; long long n = j; while (n != 1) { ...
ALGO
0.999981
4.521171
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2024-02-20T17:15: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": "29aa61017...
df8bc98e-6477-4c9f-ab5f-bc6403706f8f
SarthakD15/Project
vscode/Association Rule/main.cpp
#include <bits/stdc++.h> using namespace std; double minsup; vector<set<string>> datatable; set<string> products; map<string, int> freq; double confidence; // Splliting the words into single characters inorder to get their count. vector<string> split(string input) { vector<string> wordList; string word = ""; ...
DATA
0.99253
5.667511
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-12-11T03:15: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": "0e008f6fcf0b...
2b73335b-6a1b-4dbb-a32d-a69a7d4cba2b
vibiu/SwordOfOffer
EntryNodeInListLoop.cpp
#include "EntryNodeInListLoop.h" #include <cstdio> ListNode *MeetingNode(ListNode *pHead) { if (pHead == nullptr) return nullptr; ListNode *pSlow = pHead->m_pNext; if (pSlow == nullptr) return nullptr; ListNode *pFast = pSlow->m_pNext; while (pFast != nullptr && pSlow != nullptr)...
ALGO
0.987367
5.462485
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-05-14T13:54:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb49a8d3f6...
d26b7951-9625-4f78-959f-c0cbcc35a2e8
gupta-manas6268/learning-C
TLE Eliminators/CP-31 Sheet/800/012_pr.cpp
// Correct. // B. Sequence Game // https://codeforces.com/problemset/problem/1862/B #include<bits/stdc++.h> using namespace std; #define endl '\n' #define int long long const int MOD = 1e9 + 7; const int INF = LLONG_MAX >> 1; signed main(){ #ifndef ONLINE_JUDGE freopen("input...
ALGO
0.999886
4.561279
{ "github_metadata": { "branch": "main", "commit_count": 569, "repo_created_at": "2023-05-18T17:22:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "fb46e67dcd...
a83aabab-803c-499a-8e12-e8d2e3c4d7d7
mfctanzim00/Number_Theory
power_of_power_under_mod_of_a_prime.cpp
#include<bits/stdc++.h> #include<cstring> //#define Mfc_Tanzim #define ll long long #define ull unsigned long long #define pb push_back #define ff first #define ss second #define all(v) (v.begin(), v.end()) #define pi acos(-1.0) #define FastRead ios_base::sync_with_stdio(0);cin.tie(0); cout.tie(0); #define bug(a) cerr ...
ALGO
0.99991
4.267132
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-08-12T11:01: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": "6ab757474...
f1aa6b2c-3961-4b35-88dc-e4a224dc6cf8
xtalopt/XtalOpt
external/randSpg/include/utilityFunctions.h
/********************************************************************** utilityFunctions.h - Various utility functions for randSpg Copyright (C) 2015 - 2016 by <NAME> This source code is released under the New BSD License, (the "License"). Unless required by applicable law or agreed to in writing, software ...
TOOL
0.932037
6.277699
{ "github_metadata": { "branch": "master", "commit_count": 1556, "repo_created_at": "2015-04-30T13:23:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 41, "forks": 23, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "00bd96...
bc6181af-4380-46d8-95be-c3aafc85a80b
yucongxing/leetcode
1044_Longest_Duplicate_Substring.cpp
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <unordered_set> using namespace std; typedef long long ll; class Solution { public: static constexpr int primer = 31; int check(vector<int> &arr, int len) { unsigned long long hash = 0; unsigned long long powe...
ALGO
0.999951
5.356301
{ "github_metadata": { "branch": "main", "commit_count": 235, "repo_created_at": "2021-03-03T03:01: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": "7363b59bc2...
1e18a0f2-6f6d-4355-88d0-76f07bcf5bbe
churrocode/metodos
TP3/src/quadraticExtrapolation.cpp
#include "quadraticExtrapolation.h" #include "MatrizEsparsa.h" #include "utils.h" #include "factorizacionQR.h" void armarMatriz(MatrizEsparsa& mt, const list< vector<num> >& datos) { int j = 0; for(list< vector<num> >::const_iterator it = datos.begin(); it != datos.end(); ++it) { vector<num> v = *it; for(int i ...
ALGO
0.999338
4.11618
{ "github_metadata": { "branch": "master", "commit_count": 169, "repo_created_at": "2013-08-17T20:20: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": "0c5fd951...
04cbded5-129b-46d6-bdcb-e71e05c39b15
khush028/DSA
arraybinarybookallocation.cpp
// input = 10 20 30 40 // output = 60 #include<iostream> using namespace std ; bool isPossible(int arr[] , int n ,int m , int mid ) { int student = 1 ; int pagesum = 0; for (int i = 0; i <n; i++) { if (pagesum + arr[i] <= mid) { pagesum += arr[i]; } else ...
ALGO
0.999969
4.396425
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-08-16T19:08:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12600b8d2a57...
a3ff5545-a905-4f8f-a1ef-83dd3c82d563
minseo6753/PS
백준/Silver/10816. 숫자 카드 2/숫자 카드 2.cc
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; int* arr = new int[n]; vector<pair<int, int>>v; for (int i = 0; i < n; i++) { cin >> arr[i]; } sort(arr, arr + n); int p = 0; whi...
ALGO
0.999981
3.817689
{ "github_metadata": { "branch": "master", "commit_count": 188, "repo_created_at": "2025-03-17T08:02: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": "d69dcad7...
e0990fd1-33c9-48b1-a859-cf25407b321b
niloy-001/XPSC_problem-solving
week 8/Day 1/Day 4/B.Journey.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int t; cin >> t; do { int n, m, k; cin >> n >> m >> k; vector<int> a(m); for (auto& x : a) cin >> x; vector<int> q(k); for (auto& x : q) cin >> x; ...
ALGO
0.999945
3.872298
{ "github_metadata": { "branch": "main", "commit_count": 109, "repo_created_at": "2024-10-27T12:53: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": "2d8de4c17f...
3da2af97-17e6-492f-ad23-31c537616839
Posa5A6/data-structures-cpp
Tree Traversals.cpp
//Tree Traversals #include <iostream> using namespace std; class Node{ public: int data; Node* left; Node* right; Node(int data){ this->data=data; this->left=NULL; this->right=NULL; } }; class Tree{ public: Node* root=NULL; ...
ALGO
0.999936
5.495088
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-07-11T04:40: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": "e51317e33a1...
77c314be-2188-438c-a84a-c9690c9288d0
shree-png/CS303-assignment3_2
main.h
#pragma once using namespace std; #include <iostream> #include <vector> #include <list> template <typename T> struct Node { T data; Node* next; }; template <typename T> class Queue { /*did not define member functions in a.cpp file since that does not work for template classes/has requirements not available to use...
ALGO
0.999166
3.766234
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-11-08T06:22: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": "4a5f2fb249...
070894e6-5b89-49cf-b1f2-9f23b7223c95
poleioleiq/algorithm-icpc
Virtual_Tree/BZOJ_3572.cpp
#include <bits/stdc++.h> #define NS (300005) #define LGS (19) #define FIR first #define SEC second using namespace std; typedef pair<int, int> PII; template <typename _Tp> inline void IN(_Tp& dig) { char c; bool flag = 0; dig = 0; while (c = getchar(), !isdigit(c)) if (c == '-') flag = 1; while (isdig...
ALGO
0.999894
3.770261
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-06-03T05:55:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba7d35afb4...
e1c8ea39-738c-418a-bf16-e0eaa2932e12
ketanthakurr/Cpp-Learning
Function_parameters.cpp
#include<iostream> using namespace std; // We need to write the function before calling it into the main function..!! /* int sum(int a, int b);{ int c = a + b; return c; } */ // But if we want to write it after the main function we can your the function prototype // Which give the assuration to the compiler th...
TOOL
0.943063
3.46866
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-01-07T08:55:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 96, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b21284caa...
04bcff81-500e-42f4-8e99-763bd5cd8552
clach04/tombo
Src/SearchTree.cpp
#include <windows.h> #include <tchar.h> #include "Tombo.h" #include "resource.h" #include "UniConv.h" #include "SearchEngine.h" #include "SearchTree.h" #include "TString.h" #include "TomboURI.h" #include "DialogTemplate.h" #include "Message.h" #include "Property.h" #include "Repository.h" #include "VarBuffer.h" #includ...
TOOL
0.950515
3.779926
{ "github_metadata": { "branch": "my_changes", "commit_count": 69, "repo_created_at": "2019-12-13T06:07:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "aeafa...
5a9546a2-4707-4b65-a831-a8843144e2de
g12mcgov/CSC221
Lab5_HeapInsertion/Driver.cpp
//Driver.cpp /* <NAME> Dr. Burg CSC 221 8 April 2014 <For description and how-to-run, please see the ReadMe.txt file/> */ #include <iostream> #include "Sort.h" #include <vector> #include <string> #include <ctime> #include <time.h> #include <unistd.h> using namespace std; void displayMenu(); //function to si...
ALGO
0.995564
4.374972
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2014-04-07T22:06: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": "0b517e1ea9...
13ae8ba5-d92d-4bd9-8d2b-3f13eb4783c2
shivtikoo/DSA
LinkedList.cpp/Merge.cpp
/* Following is the class structure of the Node class: class Node { public: int data; Node *next; Node() { this->data = 0; next = NULL; } Node(int data) { this->data = data; this->next = NULL; } Node(int data, Node* next) { this->data = d...
ALGO
0.999992
4.991067
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-05-01T15:24: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": "dada1a7fd88...
5319c871-f0e2-4251-adc6-2d69b515468a
mangelroman/CarND-Path-Planning-Project
src/planner.cpp
#include "planner.h" #include <cmath> #include <iostream> #include "spline.h" using namespace std; Planner::Planner(const std::string &map_file): map_(map_file), tick_(0) { } Planner::~Planner() { } void Planner::Reset() { prediction_.Reset(); behavior_.Reset(); trajectory_.Reset(); tick_ = 0; } Traject...
ALGO
0.995359
4.86783
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-08-03T18:52: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": "ed7a22f03...
ce77710c-0ece-4bcd-858c-783444220e45
i-e-b/piLibs
src/libMath/piNoise.cpp
#include <math.h> #include "piVecTypes.h" //========================================================================================================= namespace piLibs { #define makeIndex(a,b,c,d) ((a) +(b)*57 +(c)*113+(d)*263) #define makeIndex2(a,b,c,d) ((a)*3+(b)*137+(c)*61 +(d)*113) #define makeIndex3(a,b,c,d) ...
ALGO
0.994561
5.581484
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-02-14T08:11:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1bd7a65513...
1c1f63b9-f993-49d6-b0c7-fc629f322ffe
dustin-biser/EntityComponent
Physics/PhysicsSystem.cpp
// // PhysicsSystem.cpp // #pragma once #if false #include <algorithm> using std::min; #include "Physics/PhysicsSystem.hpp" #include "Physics/Physics.hpp" #include "GameObject/ComponentPool.hpp" #include "GameObject/GameObject.hpp" #include "Assets/Mesh2d.hpp" #include "Graphics/Rendering.hpp" #include <list> u...
ALGO
0.946572
6.82183
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2016-07-24T04:15: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": "d392f9968...
7a7227cb-5fd9-40ec-835f-800c0cd655da
savagecarol/c-
feb/codechef3.cpp
/* code by savagecarol */ #include <bits/stdc++.h> using namespace std; /* predefined value */ #define yes() cout << "YES" #define no() cout << "NO" #define one() cout << "1" #define two() cout << "0" #define ll long long int #define mp make_pair #define fi first #define se second #define pb push_back /* loops */ #d...
ALGO
0.999859
3.549695
{ "github_metadata": { "branch": "master", "commit_count": 213, "repo_created_at": "2020-07-18T02:19: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": "309754c0...
519af454-bc05-40e9-9293-ea8dc7ad8510
BiaMouraa/squirrel-game
sources/facedetect_extra.cpp
#include <opencv2/opencv.hpp> #include "opencv2/objdetect.hpp" #include "opencv2/highgui.hpp" #include "opencv2/imgproc.hpp" #include "opencv2/videoio.hpp" #include <iostream> #include <vector> #include <string> #include <chrono> #include <fstream> #include <thread> #include "frutinha.h" //#include "frutinha.cpp" us...
ALGO
0.953259
4.084857
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-06-08T16:31:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "382a1dc1339...
ce7a37fb-b271-4612-948c-6812d61f6925
horbyn/Roadmap
OJ/PAT/PAT B/BAT B1023.cpp
/* access: * https://pintia.cn/problem-sets/994805260223102976/problems/994805298269634560 * result: AC * duration: 37 mins */ /* * 1. sort * 2. change the first number if it's zero */ #include <cstdio> #define MAXSIZE 50 int main() { int arr[MAXSIZE] = { 0 }; int i, j, sum = 0, inp, tmp; boo...
ALGO
0.999954
3.593903
{ "github_metadata": { "branch": "master", "commit_count": 196, "repo_created_at": "2020-04-26T15:49: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": "7228047d...
56e861c2-c4e2-4bb8-ae04-3e83125cc6f7
tmittal98/CPP-codes
HashTable-Hashing/hashtable.h
#include <iostream> #include <cstring> using namespace std; //create a Node class for HashTable template<typename T> class Node { public: string key; T value; Node<T> * next; Node(string key, T val) { this->key = key; value = val; next = NULL; } //Recursive destructor call to avoid Memory Leak ~Node()...
ALGO
0.993483
4.586349
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-10-29T18:51:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c130bdcb953...
647fced0-6b32-462c-a0ac-acecacfa2fef
SojebSikder/dsa-practice
codeforces/cpp/A. Thorns and Coins.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n; string s; cin >> n; cin >> s; int coins = 0; int thorns = 0; int found = 0; for (int i = 0; i < n; i++) { if (thorns > 1) { cout << coins << endl; found = 1; b...
ALGO
0.999825
3.894212
{ "github_metadata": { "branch": "main", "commit_count": 159, "repo_created_at": "2023-02-26T05:06: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": "24940412d0...
a0f5f920-af21-47e2-83ad-28f439675348
Borschik1/YATP_29.04
74.cpp
#include <vector> #include <iostream> #include <string> #include <fstream> #include <map> #include <cstdlib> #include <algorithm> using namespace std; int main() { ifstream fin("D:/Desktop/INPUT.txt"); ofstream fout("D:/Desktop/OUTPUT.txt"); int n, m, ans = 1; bool bFlag; fin >> n >> m; vect...
ALGO
0.999986
3.053952
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-04-29T12:56: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": "9cb3701aadc...
a877a7e0-3590-4c6c-b824-571d3b6ff6dc
DIAG-Robotics-Lab/joint_level_ismpc
labrob_qpsolvers/include/labrob_qpsolvers/QPOASESQPSolver.hpp
#pragma once #include "QPSolver.hpp" // STL #include <cstring> // memcpy // qpOASES #include <qpOASES.hpp> namespace labrob { namespace qpsolvers { template <> class QPOASESQPSolver : public QPSolver<double>{ public: QPOASESQPSolver(int numVariables, int numEqualityConstraints, int numInequalityConstraints, qp...
ALGO
0.994774
5.975767
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-07-22T07:52:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb14db6c884cd...
365bd659-5fd3-43f1-b4f9-bbf1228ba96f
VuNguyen1994/Basic-Data-Structures
linked_list_struct.cpp
#include <stdio.h> #include <iostream> #include <map> #include <bits/stdc++.h> using namespace std; struct Node { /* data */ int data; struct Node * next; }; struct linked_list_struct { struct Node * head; }; void print_linked_list(linked_list_struct * a){ struct Node * current = a->head; whi...
ALGO
0.999885
4.843955
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-03-28T02:19: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": "aa312f5d5...
d5a0bb3b-5917-4d60-9ed8-06c39d05a72e
cryptobiu/PaXoS_PSI
libOTe/cryptoTools/cryptoTools/Common/CLP.h
#pragma once #include <unordered_map> #include <set> #include <list> #include <vector> #include <string> #include <sstream> #include <iostream> #include "cryptoTools/Common/Defines.h" namespace osuCrypto { // An error that is thrown when the input isn't of the correct form. class CommandLineParserError : public ...
TOOL
0.944621
6.589451
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2019-09-25T12:14:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 35, "forks": 13, "issues": 4, "pull_requests": 1 }, "file_meta": { "content_id": "827ca25a...
0b9ba242-92da-4348-ad16-505634ad7adc
taitruong256/Competitive-programming
IUH_Olympic_ICPC/CodeThieuNhi/S.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; vector<bool> isprime(1000005, true); void khoitao() { isprime[1]=false; for(ll i=2;i<=1000005;i++) if(isprime[i]==true) for(ll j=2*i;j<=1000005;j+=i) isprime[j]=false; //for (ll i=1; i<=1000; i++) if (isprime[i]==true) cout<<i<<" "; } void solv...
ALGO
0.999922
3.41848
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-04-14T06:59:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e8923b3dfb1...
12fa81e5-ceee-4e3f-8da1-fb8d22d5f066
firewood/topcoder
srm_6xx/srm_636/SortishDiv2.cpp
// BEGIN CUT HERE /* SRM 636 Div2 Medium (500) 問題 -配列が与えられる -いくつかの値は未知である -任意の2つの値について昇順なものがsortedness個あるとき、配列の組み合わせの総数を求める */ // END CUT HERE #include <algorithm> #include <numeric> #include <string> #include <set> #include <vector> #include <iostream> #include <sstream> using namespace std; typedef set<int> IntSe...
ALGO
0.99993
4.528993
{ "github_metadata": { "branch": "master", "commit_count": 4451, "repo_created_at": "2011-04-18T02:33:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "487e7c...
01dd4c12-4e5a-466a-8113-6d35aa270205
avik-samanta99/Coding-Problems
assign-direction.cpp
vector<vector<int>> dir = {{0, 1}, {0, -1}, {-1, 0}, {1, 0}}; unordered_map<int,string> dirMapper = {{0, "Right"}, {1, "Left"}, {2, "Up"}, {3, "Down"}, {-1, "-"}}; vector<vector<bool>> visited; vector<int> colors; int n, m; bool isPossible(int x, int y, vector<vector<int>> &grid) { if(x<0 || x>=n || y<0 || y>=m ||...
ALGO
0.999923
4.547486
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2025-03-16T01:28: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": "485cdcc175...
e6acc73e-8b99-47c1-9a74-9d2e57ba33c3
alisw/AliRoot
STEER/STEERBase/AliMagFast.h
#ifndef ALIMAGFAST_H #define ALIMAGFAST_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ // // Fast polynomial parametrization of Alice magnetic field, to be used for reconstruction. // Solenoid part fitted by <NA...
ALGO
0.941638
4.847504
{ "github_metadata": { "branch": "master", "commit_count": 74535, "repo_created_at": "2016-03-07T09:20:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 57, "forks": 256, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "b6a3...
2b54089f-b32b-4fe3-9082-e5aec7e2b86f
ishandutta2007/codeforces-l
ljc1301/normal/575/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> pii; const int maxn=50005; const int maxm=50005; int n,m; pii p[maxm]; ll kcz,k,s[maxn]; struct matrix_ { ll a[2][2]; inline matrix_() { } inline matrix_(ll x,ll y,ll z,ll w) { a[0][0]=x,a[0][1]=y,a[1][0]=z,a[1][1]=w; } ...
ALGO
0.999957
3.629682
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17: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": "3c838aed4812...
5fdd0c26-cdce-4de1-82e3-d1f0b8ba18dc
task4233/contest
AtCoder/ABC/009/re_d.cpp
#include <bits/stdc++.h> // statics using namespace std; using int64 = int_fast64_t; using PAIR = pair<int64, int64>; constexpr int INF = 1 << 30; constexpr int64 LINF = 1LL << 60; constexpr int MOD = 1e9 + 7; constexpr int MAX_N = 3e5 + 1; // init/input #define int int64 #define INIT ios::sync_with_stdio(false);cin.t...
ALGO
0.999992
4.343364
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2018-03-08T13:28:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "c0fe3b5a...