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
3dfc0949-1393-49a4-9fbd-9c0bdce0903c
sjeong12/Algorithm_study
sangguNa/2480_주사위_세개.cpp
#include <iostream> using namespace std; int check_num(int &a, int &b, int &c) { if (a == b && b == c && c == a) return (a); else if ((a == b && b != c && c != a) || (a != b && b == c && c != a) || (a != b && b != c && c == a)) { if (a == b && b != c && c != a) return (10 + a); else if (a != b && b...
ALGO
0.999814
3.559096
{ "github_metadata": { "branch": "main", "commit_count": 357, "repo_created_at": "2020-11-15T05:24:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78d970b33f...
79bd0ffa-f884-45ad-804e-314a56ff0323
withtahmid/Codeforces
div2/707/A.cpp
/** * * Author: withtahmid * Created: 06-08-2022 * * */ #include<bits/stdc++.h> using namespace std; #define boostIO ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL); #define endl "\n"; #define nl cout<<"\n" #define ll long long #define nn int n; cin>>n #define lln long long n; cin >> n #define v...
ALGO
0.999917
4.380381
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-08-30T14:33: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": "cec9826e0fd9...
742c3ac7-dd9a-49db-9c16-7d7a2c0b14de
subramaniam97/Competitive-Programming
Contests/LTIME32/TRIANGCL/TRIANGCL_0.cpp
#include<bits/stdc++.h> #define pb push_back #define mp make_pair #define ll long long int using namespace std; ll MOD = 1000000007; ll raise(ll b, ll exp) { ll r=1; while(exp) { if(exp&1)r=(r*b)%MOD; b=(b*b)%MOD; exp>>=1; } return r; } double sq_dist(int x1,int y1,int x2,...
ALGO
0.999511
4.497467
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-12-16T15:27: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": "eeda172522...
aadeefa0-e4d4-4133-90d2-e7e5049027dd
aoaoluming/six_beauty
poj/poj_3278_BFS/poj_3278_BFS/bfs3278.cpp
#include <cstdio> #include <queue> using namespace std; const int MAXN = 100001; int N, K; int vis[MAXN]; int ret[MAXN]; queue<int> q; int BFS(int s, int d) { if (s == d) return 0; q.push(s); int cur; while (!q.empty()) { cur = q.front(); q.pop(); //if (cur == d) break; // vis[cur] = 1; ...
ALGO
0.999938
3.896218
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2014-10-18T09:20:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a22ece6be...
45ccbc14-a73b-4d67-96dc-ebccb532f186
sunnyisgalaxy/moabs
src/mcomp/lib/stan/math/prim/mat/fun/welford_var_estimator.hpp
#ifndef STAN__MATH__PRIM__MAT__FUN__WELFORD_VAR_ESTIMATOR_HPP #define STAN__MATH__PRIM__MAT__FUN__WELFORD_VAR_ESTIMATOR_HPP #include <vector> #include <stan/math/prim/mat/fun/Eigen.hpp> namespace stan { namespace prob { class welford_var_estimator { public: welford_var_estimator(...
ALGO
0.988949
6.286663
{ "github_metadata": { "branch": "master", "commit_count": 123, "repo_created_at": "2015-04-11T19:07:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 10, "issues": 8, "pull_requests": 1 }, "file_meta": { "content_id": "372d2f...
ef9735cd-c379-4153-a206-7f1385eaf647
5H4N3O/cs2511Project1
BinaryHeap.h
/** @file * * @author <NAME>, ID# 5728510 * * @note BinaryHeap Header File. */ #pragma once #include <cmath> #include <functional> #include <vector> #include <memory> /** * @class BinaryHeap ...
ALGO
0.999284
5.572426
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2025-01-11T02:07: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": "c2ba9bde651...
5934d265-1737-4c84-9346-e54f5cfeb1e8
bbb1293/baekjoon
백준/Gold/11451. 팩맨/팩맨.cc
#include <bits/stdc++.h> using namespace std; struct State { string s; int x1, y1, x2, y2; }; int n, m; char grid[50][51]; int dir_x[] = {1, 0, -1, 0}, dir_y[] = {0, 1, 0, -1}; char dir_c[] = "ESWN"; bool visited[50][50][50][50]; int main() { // freopen("input.txt", "r", stdin); ios_base::sync_with...
ALGO
0.999938
4.513945
{ "github_metadata": { "branch": "main", "commit_count": 498, "repo_created_at": "2022-02-01T14:25:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6ecd20457...
691f67fa-ad73-431c-8a3f-083adc242fa2
thiagopac/diagram-ios
Engine/endgame.cpp
/* Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 <NAME> (Glaurung author) Copyright (C) 2008-2014 <NAME>, <NAME>, <NAME> Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free ...
ALGO
0.997354
5.638196
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2024-02-10T14:29:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7dc6fb06...
a14113ba-4e9a-4971-a178-3b1cb3604c55
Zelenoff4/Algo
maxMatching.cpp
#include <vector> #include <iostream> using namespace std; const int MAXN = 1e5; int n, m, k, ans = 0; vector <int> g[MAXN]; vector<int> mt; bool used[MAXN]; int dfs(int v) { if (used[v]) return 0; used[v] = 1; for (unsigned int i = 0; i < g[v].size(); i++) { int to = g[v][i]; if ...
ALGO
0.999884
3.625975
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-10-28T16:44: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": "80c2d2fc5f...
82d4561c-51bd-4c34-a218-819220e98321
shrishtinigam/codeforces
SerejaAndBottles.cpp
// Codeforces Round #187 (Div. 2) https://codeforces.com/problemset/problem/315/A // SerejaAndBottles.cpp #include <iostream> #include <ios> #include <vector> #include <algorithm> #include <string> #include <cmath> #include <utility> using namespace std; #define rep(i,a,b) for (int i = a; i < b; i++) #define rep2(i,a,b...
ALGO
0.999795
3.888143
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2021-07-20T13:17: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": "b295197bce67...
d2714a66-e2c9-45da-98e7-a5d4061caf02
NVIDIAGameWorks/PhysX-3.4
APEX_1.4/common/include/ApexFind.h
// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in bin...
ALGO
0.993872
6.195351
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2016-10-12T16:34:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2383, "forks": 282, "issues": 49, "pull_requests": 9 }, "file_meta": { "content_id": "d40d...
b1ed7465-adb1-4102-854d-129e10da4c71
xiaoxianliu/drift_diffusion_fem
organic_DD/fixed_bias/test.cpp
#include <iostream> #include <vector> #include <armadillo> #include "../../triangle/mesh.hpp" #include "../../my_fem/my_fem.hpp" #include "../../gnuplot/my_gnuplot.hpp" #include "parameters.hpp" /*******************************************************************************************************************/ //...
ALGO
0.916492
5.516048
{ "github_metadata": { "branch": "master", "commit_count": 169, "repo_created_at": "2013-10-07T00:28:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68555888...
40ba3ac9-db57-48bd-b7b4-0e33d5d18a3f
jessechoe10/USACO
Gold/farmupdates.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using vl = vector<ll>; using pl = pair<ll, ll>; using vpl = vector<pl>; #define forn(i, n) for(ll i = 0; i < n; i++) #define rofn(i, n) for(ll i = n; i >= 0; i--) #define FOR(i, a, b) for(ll i = a; i < b; i++) #define all(x) begin(x), end(x) #define ...
ALGO
0.99936
3.738293
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2022-09-04T16:22:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fcfdeb5a9dd...
3cacbecf-5f5a-4178-83df-961e56f5933a
ishandutta2007/codeforces-b
bigbag/normal/594/C.cpp
#include <map> #include <set> #include <stack> #include <queue> #include <vector> #include <cstdio> #include <string> #include <cstring> #include <cstdlib> #include <iostream> #include <algorithm> using namespace std; const int max_n = 111111; const long long inf = 1111111111111111111LL; int n, k, x[max_n], y[max_n]...
ALGO
0.999778
3.686644
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d888fa9598f...
87338aee-ef13-49e9-b24b-9163afd4b485
blancabgz/Metodologia-de-la-Programacion
practica2/ejercicio6/src/ejercicio6.cpp
/* <NAME> E3 Ejercicio 6: Programe una función que realice el producto de dos matrices. Debe facilitarse a su vez una función que permita visualizar el contenido de una matriz para comprobar el correcto funcionamiento del código realizado. */ #include <iostream> #include "utilidades.h" using namespace std; int mai...
ALGO
0.968094
4.904337
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2020-02-21T17:40:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88e63369e...
306dd18d-191f-44ac-8b78-583a5c34f418
ShimuGuyue/AlgorithmPractice-Codes
NowCoder/题库/NC16884.cpp
// $$$$$$\ $$\ $$\ $$\ $$$$$$\ $$$$$$\ $$$$$$\ // $$ __$$\ $$ | \$$\ $$ |$$ __$$\ \_$$ _|$$ __$$\ // $$ / $$ |$$ | \$$\ $$ / $$ / \__| $$ | $$ / $$ | // $$$$$$$$ |$$ | \$$$$ / \$$$$$$\ $$ | $$$$$$$$ | // $$ __$$ |$$ | \$$ / \____$$\ $$ | $$ __$$ | // $$ | $$ |$$ | ...
ALGO
0.999831
4.143807
{ "github_metadata": { "branch": "main", "commit_count": 399, "repo_created_at": "2024-11-05T08: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": "bc40d5a2cf...
d9c841a6-1d42-4c42-898d-232769e10536
habanero-rice/hclib
test/performance-regression/full-apps/qmcpack/src/QMCHamiltonians/Experimental/NonLocalPPotential.cpp
////////////////////////////////////////////////////////////////// // (c) Copyright 2005- by <NAME> and <NAME> ////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// // National Center for Supercomputing Applications & // Materials Compu...
ALGO
0.975957
5.958121
{ "github_metadata": { "branch": "master", "commit_count": 705, "repo_created_at": "2014-08-11T16:15:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 71, "forks": 36, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "2d90dd...
1e4ce33f-e273-4f19-85e6-f745f488d131
nisan24/XPSC_Batch_04
Problems/Week_09/Day - 01/Increasing_Array.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define yes cout << "YES" << "\n" #define no cout << "NO" << "\n" #define srt(ar) sort(ar.begin(), ar.end()) #define rsrt(ar) sort(ar.rbegin(), ar.rend()) #define allsum(ar) accumulate(ar.begin(), ar.end(), 0ll) #define pi pair<int, int> #define vi ...
ALGO
0.999946
4.232238
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2024-03-16T17:30: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": "10c380e0137...
da23518a-5120-408c-94da-b3ef80167066
pornopatsan/dvm-snapshot-r6603-fork
dvm_sys/tools/predictor/Rater/Src/AMView.cpp
#include <assert.h> #include "AMView.h" #include <iostream> using namespace std; extern ofstream prot; //grig extern long_vect MinSizesOfAM; // для автоматического поиска bool FirstTrace=true; //\grig AMView::AMView(const vector<long>& ASizeArray) : Space(ASizeArray), Repl(0) { VM_Dis = 0; AlignArrays = list<...
ALGO
0.902813
3.738969
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2019-10-05T09:29:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "db89b3463...
dd483234-9c59-42d0-b11f-a41046a94b61
mengxianghan123/leetcode
Binary Search/No.540_Single_Element_in_a_Sorted_Array/540.cpp
// 通过左右区间元素个数奇偶判断所求元素所在区间 #include <iostream> #include <vector> using namespace std; class Solution { public: int singleNonDuplicate(vector<int>& nums) { int l = 0, r = nums.size() - 1; while (l != r) { int mid = l + (r - l) / 2; if (nums[mid] == nums[mid - 1]) { if ((mid - 1 - l) % 2 =...
ALGO
0.999981
5.872994
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2021-01-27T14:02:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "389f8d138...
540aa477-05e0-41f7-9717-3790a97e6fce
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/05/0529/personal_submission/cf1148c_abandon2.cpp
#include<bits/stdc++.h> using namespace std; const int N=3e5+10; int a[N],p[N]; void solve(){ int n;cin>>n; std::vector<pair<int,int>> ans; auto cz=[&](int x,int y){ swap(a[x],a[y]); p[a[x]]=x,p[a[y]]=y; //cout<<x<<" "<<y<<"ccc\n"; //cout<<a[x]<<" "<<a[y]<<" "<<p[a[x]]<<" ...
ALGO
0.999743
3.505319
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "0d1e...
78494c11-a117-4dfa-934e-971cd7265c3a
SPEAROW486/resume
Algorithm/BOJ/BOJ_14627/main.cpp
#include <bits/stdc++.h> #define FASTIO \ std::ios_base::sync_with_stdio(false); \ std::cin.tie(NULL) // BOJ : 14627 // 매개변수 탐색 int s, c; std::vector<int> v; long long divide(int m) { long long sum = 0; for (int i = 0; i < s; ++i) { sum += v[i] / m; } ...
ALGO
0.999963
3.905643
{ "github_metadata": { "branch": "main", "commit_count": 359, "repo_created_at": "2023-07-07T06:31:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b574613179...
8b2157cd-e05a-43d0-bee0-256de3640c87
ChristinaLJC/ZipCompressor
lz77.h
#pragma once #include <iostream> #include <fstream> #include <unordered_map> #include <tuple> #define MAX_DISTANCE 32768 #define MAX_LEN 258 #define BLOCK 327680 typedef std::array<uint8_t, 4> array4; struct arr_hash { std::size_t operator() (const array4 &a) const noexcept { return a[0] * 1ULL + a[1] * ...
ALGO
0.99802
4.28383
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-04-13T09:07: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": "d9ea68f7f4b9...
6c439442-af93-4eec-adc4-15884cda96c1
LCH1238/bevdet-tensorrt-cpp
include/iou3d_nms.h
/* 3D IoU Calculation and Rotated NMS(modified from 2D NMS written by others) Written by <NAME> All Rights Reserved 2019-2022. */ #pragma once #include <stdio.h> #include <thrust/count.h> #include <thrust/device_vector.h> #include <thrust/gather.h> #include <thrust/host_vector.h> #include <thrust/sequence.h> #include ...
ALGO
0.996347
6.086617
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2023-07-11T17:56:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 272, "forks": 51, "issues": 22, "pull_requests": 0 }, "file_meta": { "content_id": "c2dad...
5478bdef-2a40-4680-805e-ac4ae79573f4
anas3a/Online-Judge-Solutions
rectang.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using vll = vector<ll>; using vvi = vector<vi>; using vvl = vector<vll>; using pii = pair<int, int>; using pll = pair<ll, ll>; using vpi = vector<pii>; using vpl = vector<pll>; #define pb push_back #define mp make_pair #define...
ALGO
0.999433
4.612523
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-01-12T12:08: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": "8b99b6935e88...
eccd36da-dc97-4ace-8a92-6d0334922f37
JasonYU1019Root/PROJECT_DUM-E
CODE/AdTempMatch.cpp
// ******************************************* // Advanced Template Matching Algorithm. * // CopyRight @ JasonYU. All Rights Reserved. * // ******************************************* #include<cstdio> #include<iostream> #include"opencv2/opencv.hpp" using namespace std; using namespace cv; Mat processing(Mat); i...
ALGO
0.973595
4.206023
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-09-01T06:44: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": "2cad14e9e6...
82025637-f08c-4a6f-8304-28d66f98954a
varnitsingh/OJ-problems
500 problems pepcoding/Pair of given sum in sorted array.cpp
#include <bits/stdc++.h> #define F first #define S second #define PB push_back #define MP make_pair #define ll long long int #define vi vector<int> #define vii vector<int, int> #define vc vector<char> #define vl vector<ll> #define mod 1000000007 #define INF 1000000009 using namespace std; // In a normal array, we coul...
ALGO
0.999923
3.908502
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-10-03T10:08:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e0273dbe...
91050be5-da99-454e-8aac-3bea31c9476e
muhammadhasan01/cp
Lomba Lomba/FIND_IT2020/Final/D.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; const ll MOD = 1e9 + 7; ll fastexpo(ll a, ll b) { ll ret = 1; while(b) { if(b & 1) {ret = (ret * a) % MOD;} a = (a * a) % MOD; b >>= 1; } if(ret < 0) ret += MOD; return ret; } ll discrete_log(ll a, l...
ALGO
0.999632
4.574628
{ "github_metadata": { "branch": "master", "commit_count": 1187, "repo_created_at": "2019-07-13T15:49:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8301edc...
0f05062a-63dd-4450-a14a-af3a3b54ebcc
shreeramsingh/shri
A_PLUS_B_Remastered.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> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> p32; typedef pair<ll,ll> p64; typedef pair<double,double> ...
ALGO
0.999568
4.312015
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-04-22T06:13:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f02fe5e0dd57...
082425ce-acbc-4a0d-9ab2-6a47b7dbaf82
MattBCM/CS211
a3_MatthewMurillo.cpp
#include <iostream> using namespace std; bool validSolution(int x[], int size); void print(int x[], int &counter); int main(){ int eq[8] = {0}, c = 0, cntr = 1; // initializing the variables for(int i0 = 0; i0 < 8; i0++){ for(int i1 = 0; i1 < 8; i1++){ for(int i2 = 0; i2 < 8; i2++){ for(int i...
ALGO
0.99931
4.609404
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-08-19T23:34: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": "df801a731d9a...
09814286-ccf8-4eca-a9ae-82c7bbe241c7
aucker/leetcode
daily/May1.cpp
#include <bits/stdc++.h> #include <algorithm> using namespace std; class Solution { public: long long totalCost(vector<int>& costs, int k, int candidates) { int len = costs.size(); if (candidates * 2 + k > len) { std::ranges::nth_element(costs, costs.begin() + k); return accumulate(costs.begin(...
ALGO
0.99984
5.999095
{ "github_metadata": { "branch": "main", "commit_count": 364, "repo_created_at": "2022-03-28T08:06: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": "e82ba172bd...
e4a40923-cc5b-4272-a405-9e76c26a4528
smilingpoplar/coding-practice
leetcode/the-maze-iii.cpp
// // the-maze-iii // https://leetcode.com/problems/the-maze-iii/ // // Copyright (c) 2015 YangLe. All rights reserved. // #include <iostream> #include <vector> using namespace std; class Solution { struct Info { int row; int col; int dist; string moves; // pri...
ALGO
0.999964
5.076049
{ "github_metadata": { "branch": "main", "commit_count": 2130, "repo_created_at": "2015-04-29T04:29: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": "3b525dcfe...
34ebb4c0-2737-4a53-8797-50ea947e41cd
namhyeop/AlgorithmProblem
백준알고리즘/그리디알고리즘/1493번(박스채우기).cpp
#include<iostream> #include<vector> #include<algorithm> #include<cmath> #define ll long long using namespace std; ll length; ll width; ll height; ll N; ll ret; int flag = 0; vector<pair<int, int>> v; //2의 0승 개의 개수를 저장한다. int cube[20]; void operate(int length, int width, int height, int curidx) { if (length == 0 || ...
ALGO
0.999977
3.732298
{ "github_metadata": { "branch": "master", "commit_count": 845, "repo_created_at": "2019-08-09T08:10:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e421db71...
1e17f5ee-ca7e-41d3-b40f-2ea6efa9513b
NguyenHoangHaiD21PTIT/INT1306_CAU_TRUC_DU_LIEU_VA_GIAI_THUAT_HK20222
LUYEN TAP NANG CAO/S51. TONG DAY CON LIEN TIEP.cpp
#include <bits/stdc++.h> using namespace std; int canDiv(const vector<int>& a, int k) { int s = 0; for (int x : a) { s += x; if (s > k) return 0; if (s == k) s = 0; } return s == 0; } int main() { int t; cin >> t; while (t--) { int n; cin >> n; ...
ALGO
0.999974
4.95542
{ "github_metadata": { "branch": "main", "commit_count": 971, "repo_created_at": "2024-03-09T15:33:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b4d3ce0b0...
1a35f48a-7ed4-4517-8cf0-7b79934b5dd1
ishandutta2007/codeforces-u
um_nik/normal/1494/A.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cmath> #include <vector> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <queue> #include <ctime> #include <cassert> #include <complex> #include <string> #include <cstring> #include <chrono> ...
ALGO
0.999387
3.787308
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:31: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": "a931daa15e7e...
4956d8a7-f9df-4d59-8e93-930e8b4c583b
michaelcanyon/Labs-
visual/finallab/Проект4/Source.cpp
/***************************************************************************************** **Project Name : lastlab ** **Project Type : Win32 Console Application ** **File Name : lab2.cpp ...
ALGO
0.999588
3.939088
{ "github_metadata": { "branch": "Labs", "commit_count": 9, "repo_created_at": "2018-05-08T13:11:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b89cbe3532a...
32524619-4faf-4120-a365-602993055599
ICPC-Damnhour-Community/Level-1-2024
Week-4/Sheet/A-Magic-Powder-1.cpp
#include <bits/stdc++.h> using namespace std; #define clr(v,d) memset(v, d, sizeof(v)) void fast(){ cin.tie(0); cin.sync_with_stdio(0); } int k, n; vector<int> a, b; bool check (int mid) { int temp = k; for(int i = 0; i < n; i++) { int need = a[i] * mid; if (need > b[i]) { ...
ALGO
0.999976
4.164091
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-10-20T14:59:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5eec24e4e8c...
d321f8cb-71d4-4117-97f4-691711d9ae94
Avi-Dewan/CSE314-Operating-System-Sessional
Offline 4: IPC/IPC.cpp
// 4 printing semaphore locks, 1 binding(2), 1 submission mutex(read-writing problem) // student(N) has thread , stuff(2) has thread //Student: random number as start, leader or not, group, printing Station // Stuff: 2 read in an intereval #include<stdio.h> #include<pthread.h> #include<semaphore.h> #include <rando...
ALGO
0.996921
3.997974
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-06-13T16:55: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": "f86744a1f96...
944bc8e7-f1c1-4c38-af91-371708859ff2
Rasec09/Algorithms_and_Data_Structures
Graph/ReRooting.cpp
// Tested: https://www.hackerrank.com/contests/101hack22/challenges/sum-of-all-distances/problem #include <bits/stdc++.h> using namespace std; #define optimizar_io ios_base::sync_with_stdio(false);cin.tie(0); typedef pair<int,int> ii; typedef vector<ii> vii; vector<vii> ady; vector<int64_t> subTreeSz, dist; void dfs...
ALGO
0.999979
4.740525
{ "github_metadata": { "branch": "master", "commit_count": 106, "repo_created_at": "2017-09-06T04:16:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d21ff192...
83464a99-479c-4737-8884-04a30861600d
swy20190/Leetcode-Cracker
457/P457/P457/main.cpp
#include <vector> using namespace std; class Solution { auto next(int cur, vector<int>& nums, int n) { return ((cur + nums[cur]) % n + n) % n; } public: bool circularArrayLoop(vector<int>& nums) { int n = nums.size(); for (int i = 0; i < n; i++) { if (!nums[i]) { continue; } int slow = i; int...
ALGO
0.999977
5.614254
{ "github_metadata": { "branch": "main", "commit_count": 481, "repo_created_at": "2020-11-09T01:48: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": "0db858e945...
215567aa-045c-4898-9586-8d312d1c6277
anzaika/guidance
programs/semphy/semphyStep.h
// $Id: semphyStep.h 702 2006-05-27 17:16:58Z ninio $ #ifndef ___SEMPHY_STEP #define ___SEMPHY_STEP #include "suffStatComponent.h" #include "semphyDistance.h" #include "rearangeTree.h" #include "minSpanTree.h" #include "tree.h" #include "sequenceContainer.h" #include "computePijComponent.h" #include "stochasticProces...
ALGO
0.99967
5.594862
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-08-28T12:48:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 3, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "c80e7125...
2b81c1d4-c139-4ff8-b751-6ae96a668925
rafaelbaptista13/IC
Assignment1/sndfile-example-src/wav_dct_codec.cpp
#include <iostream> #include <vector> #include <cmath> #include <fftw3.h> #include <sndfile.hh> #include "BitStream.h" #include <bitset> using namespace std; int main(int argc, char *argv[]) { bool verbose { false }; size_t bs { 1024 }; double dctFrac { 0.2 }; if(argc < 3) { cerr << "Usage: wav_dct_codec [ -v...
ALGO
0.967213
5.874223
{ "github_metadata": { "branch": "main", "commit_count": 107, "repo_created_at": "2022-09-26T15:43:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9f8c18340...
475b75e8-b916-4f52-bdfb-a8c19dc50e39
dohyun-cse/mfem-poisson
poisson_par.cpp
/// Poisson equation in MFEM /// with pure Neumann boundary conditions #include "mfem.hpp" #include "src/helper.hpp" #include "src/mass_zero.hpp" using namespace mfem; using namespace std; int main(int argc, char *argv[]) { Mpi::Init(); int num_procs = Mpi::WorldSize(); int myid = Mpi::WorldRank(); Hypre...
ALGO
0.985499
5.513217
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-04-07T17:54:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "280db9c99ba1...
3cd2c8e6-a40c-43b6-8674-01ff10f3dd04
JimmyBao22/Competitive-Programming
CSES/Tree Algorithms/TreeDistancesII.cpp
#include <iostream> #include <vector> #include <map> #include <cmath> #include <algorithm> #include <deque> #include <queue> #include <stack> #include <set> #include <string> #include <string.h> #include <array> #include <unordered_map> #include <unordered_set> #include <iomanip> using namespace std; typedef long long ...
ALGO
0.999911
4.138517
{ "github_metadata": { "branch": "main", "commit_count": 180, "repo_created_at": "2021-03-26T21:46:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94d0511362...
dd0eb573-b780-4836-9bad-4ea37dea1001
manoj24vvr/PP_Lab
PP Lab8/quest5.cpp
#include<stdlib.h> #include<stdio.h> #include<mpi.h> int main(int argc, char* argv[]) { int rank, size, N, i, num; MPI_Init(&argc, &argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &size); MPI_Status status; if (rank == 0) { N = size; int* arr = (int*)malloc(N * sizeof(int)); pr...
ALGO
0.999774
3.290568
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-05-12T02:37: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": "f223eb34b04b...
8a7ca9c0-fde5-419e-b40d-15c0d05fb265
resilient-swarms/ASVLite
c_legacy/dependency/VTK-9.1.0/Filters/Core/vtkPolyDataTangents.cxx
/*========================================================================= Program: Visualization Toolkit Module: vtkPolyDataTangents.cxx Copyright (c) <NAME>, <NAME>, <NAME> All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed ...
TOOL
0.990382
7.224671
{ "github_metadata": { "branch": "master", "commit_count": 807, "repo_created_at": "2018-11-13T16:27:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "061c198...
ae1bac91-e7b3-498c-85e7-8bc2cfe438de
WonJin4631/AlgorithmStudy
dodo/dodo/boj2667.cpp
#include<iostream> #include<vector> #include<algorithm> #include<queue> #include<string> using namespace std; /* 1이 나온 위치부터 bfs 탐색 bfs 탐색하면서 단지의 크기를 확인 오름차순으로 정렬 */ typedef pair<int, int> pii; int N; string map[26]; int visit[26][26]; int dx[] = { 0,0,-1,1 }; int dy[] = { -1,1,0,0 }; int danji_num(int x, int y) { q...
ALGO
0.999974
3.742678
{ "github_metadata": { "branch": "master", "commit_count": 288, "repo_created_at": "2019-01-29T04:48: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": "89ecc7e6...
ae002c79-6f32-44b4-b4ba-cb39ab1a24ee
jvidziunas/Eldritch2
tools/ispc/examples/portable/aobench/ao.cu
// -*- mode: c++ -*- /* Copyright (c) 2010-2014, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, ...
ALGO
0.995073
5.920837
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2015-10-05T20:05:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dff522f06...
87beac12-4cf0-439e-ab63-71599bc27f21
FrancoNegri/tps-algo3-2014
Tp1/Codigo/Ej3/Release Candidates/fuerzaBruta.cpp
#include "Ej3.h" #include <sys/time.h> #include <sys/timeb.h> // de la manera en que esta creado el algoritmo, // busca la solucion de abajo para arriba // esto signigica, al principio intenta meter todos los productos en el camion 1 // si no, mete uno en el camion 2, y asi... // todavía tengo que justificar, que en e...
ALGO
0.999986
3.863078
{ "github_metadata": { "branch": "master", "commit_count": 326, "repo_created_at": "2015-04-27T20:21: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": "555711b4...
1b8afb11-9da8-434e-b91c-d0f605689ce6
Dagt07/logs
src/unused_versions/quicksort_v1.5.cpp
//se define M_SIZE <- tamaño de la memoria principal: valor capturado desde los args //se define B_SIZE <- tamaño del bloque: como tamaño real de bloque en un disco (512B en discos viejos, 4069B en discos modernos) //se define N_SIZE <- tamaño del array que contiene a los elementos a ordenar (input), recibido por quic...
ALGO
0.999112
5.307865
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2025-05-01T22:18: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": "e27a6042a10...
d12bff14-87ff-4c2b-bb27-caf8ae0b94ef
dntjr8989/PrepareCodingTest
백준/Silver/4963. 섬의 개수/섬의 개수.cc
#include <stdio.h> #include <queue> using namespace std; int BFS(int w, int h, int map[50][50]) { bool check[50][50] = {false,}; int cnt = 0; for(int i=0; i<h; i++){ for(int j=0; j<w; j++){ if(map[i][j] == 1 && check[i][j] == false) { cnt++; ...
ALGO
0.999719
4.117989
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2022-05-13T18:03: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": "62d3c79a83e...
eb318f65-0965-4350-9e6b-7a7ef0be2ffd
GatsLee/Baekjoon
gold5/14503.cpp
#include <iostream> #include <vector> using namespace std; int N, M; int cur_x, cur_y, dir; int cnt; int x_mv[4] = {0,1,0,-1}; int y_mv[4] = {-1,0,1,0}; void solve(vector < vector <int> > &map) { int new_y, new_x; int rot_cnt = 0; map[cur_y][cur_x] = 2; cnt++; while (true) { if (dir == 0) dir = 3; el...
ALGO
0.999978
4.497738
{ "github_metadata": { "branch": "main", "commit_count": 92, "repo_created_at": "2023-02-03T13:41: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": "505871f268f...
dfbcfedd-b055-4e06-aa94-6a44dded7646
eranston/C-Cpp_projects
Number_Recognition/Dense.h
#ifndef DENSE_H #define DENSE_H #include "Activation.h" /** * type def for pointer of function that get matrix and return a matrix */ typedef Matrix (*activ_func_ptr)(const Matrix& m); /** * @brief class of a layer in the nuron network */ class Dense { private: Matrix _weights; // weight metrix of the laye...
TOOL
0.961928
5.2892
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-03-14T09:15: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": "198d5dfe1f...
92119fdd-6a55-4456-97a4-54382655fcdd
HekpoMaH/Olimpiads
Shumen AiB/Persistent_tree/persistent_tree2.cpp
//Persistent Lazy Propagation - <NAME> & <NAME> #include<iostream> #include<cmath> #include<algorithm> #include<climits> #include<fstream> using namespace std; struct Tree { long long val,store; Tree *Left, *Right; }; long long N=1,Leaves[200000],p=1,CntRoots=1,Levels=1,n,Type,State,l,r,v,Ans=0; Tree *Roots[20...
ALGO
0.99948
4.484934
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-10-04T16:17:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1638ac677a...
30672d49-db32-4190-8d1a-4367aa243cd6
princeGedeon/competitive_programming
Sereja and Commands/main2.cpp
#include <iostream> #include <stdlib.h> using namespace std; int com[100000][3]; void first(int arr[], int i, int j) { for(int k=i; k<=j; k++) arr[k]=arr[k]%1000000007 + 1; } void second(int arr[], int i, int j) { for(int k=i; k<=j; k++) { ...
ALGO
0.999694
3.405169
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-01-28T18:23: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": "7051acb84a...
76081b8f-6a52-4c90-9edc-a2b467798d40
pawan-nirpal-031/Algorithms-And-ProblemSolving
Active/CodeForces/A_Diverse_Team.cpp
// Problem Link : #include <bits/stdc++.h> using namespace std; typedef unsigned long long int ull; typedef long long int ll; typedef long double ld; #define Mod 1000000007 #define Infinity (ll)1e18 #define Append(a) push_back(a) #define Pair(a,b) make_pair(a,b) #define Clear(a) for(ll &x : a){x=0;} #define Point(x) s...
ALGO
0.999999
3.996957
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2021-03-16T14:30: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": "acf422ef...
fb8dd7f5-51a2-4479-9e27-293662ed5ad5
dalent/gitcode
algorithm/sort/partition_sort.cpp
#include<iostream> using namespace std; #define CNT 100 char tmp[CNT]; void combine(int* array1, int m, int * array2, int n) { int t = 0; int i = 0, j = 0; while(i < m && j < n) { int tmp_1 = 0; if( array1[i] > array2[j]) tmp_1 = array1[i++]; else tmp_1 = array2[j++]; tmp[t++] = tmp_1; } while(i ...
ALGO
0.999984
4.524468
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2013-10-14T14:48:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2aa11d9f...
115728e4-9485-4733-a10b-baefaa3ecb4b
wesley-stone/leetcode
graph/Digraph.h
// // Created by <NAME> on 2018/1/1. // #ifndef GRAPH_GRAPH_H #define GRAPH_GRAPH_H #include <vector> typedef int weight; using namespace std; class MGraph{ public: int vn; weight ** matrix; MGraph(int vn){ this->vn = vn; matrix = new weight*[vn]; for (int i=0; i<vn; i++){ ...
ALGO
0.998846
3.537682
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2017-11-27T11:41:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ade99a9a...
9463714c-b530-41a3-958d-1a0fa29a78c3
anirudhgupta03/450-DSA-Sheet
Backtracking/Largest number in K swaps.cpp
//Ref: https://www.youtube.com/watch?v=ZnfqHvAt9bE //Excellent Question class Solution { public: //Function to find the largest number after k swaps. void solve(int ind, string &str, string &ans, int k){ if(k >= 0){ if(ans < str){ ans = str; } ...
ALGO
0.999981
4.968447
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2021-12-01T14:20:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b66355b82a...
b8ddd6a6-e3f7-4963-a30c-e36cb11126b9
mastree/cp
TLX/TROC18/E.cpp
#include <bits/stdc++.h> #define fi first #define se second #define pb(a) push_back(a) #define mp(a, b) make_pair(a, b) #define el '\n' using namespace std; using ll = long long; using pii = pair<int, int>; const int N = 2e5 + 10; int n; vector<int> adj[N]; int t[8 * N], lazy[8 * N]; int tin[N], tout[N], len; vec...
ALGO
0.99989
5.023959
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-03-13T14:52:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa402dd1a...
aba9d950-3c98-44ea-b65e-60aef8dfbff1
xuau34/competitive-programming
codeforces/777A-ShellGame.cpp
#include <bits/stdc++.h> using namespace std; int T, N, M, Q, arr[3][6]; void ini(void){ scanf("%d", &N); scanf("%d", &M); } void sol(void){ int i, j; arr[0][0] = 0; arr[1][0] = 1; arr[2][0] = 2; for(i = 1; i < 6; i++){ if(i & 1){ arr[0][i] = arr[1][i - 1]; arr[1][i] = arr[0][i - 1]; a...
ALGO
0.999945
3.057959
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-07-22T14:49: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": "4e541d239b...
3fc5458c-882f-45f1-b13d-842eac31f429
pumpkinblade/LearnD3D12
Octree/Octree.cpp
#include "Octree.h" template<typename T> Octree<T>::Octree(uint32_t N_LEVELS) :m_Levels(N_LEVELS), m_RootLevel(N_LEVELS - 1), m_MaxValue((float)(1 << (N_LEVELS - 1))), m_CellSize(1 / m_MaxValue) { m_Cells.resize(OT_8EXPSUM(N_LEVELS)); EnCode(); } template<typename T> uint32_t Octree<T>::LocatePoint(const DirectX...
ALGO
0.990193
5.098401
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-02-28T05:54: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": "c88d4df8e9e...
c76fd600-813f-4347-82ee-4b57036c82ee
seankhl/blockInvPP
severin/blockInvPP.cpp
#include <iostream> #include <omp.h> #include <Eigen/SparseCore> #include <math.h> using namespace Eigen; using namespace std; int main() { const int chunk = 4; // must be >= bandwidth const int bandwidth = 2; // must be = to the actual bandwidth of the input matrix int numLevels = 2; // must be log_2 (nu...
ALGO
0.999998
3.845604
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2013-11-23T21:52: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": "50cd1239a...
7430ef3f-1f30-4209-ba26-f51af66adac1
abtree/LeetCode
1.300/299.BullsAndCows.cpp
#include <iostream> #include <string> #include <array> #include<algorithm> using namespace std; // 299. 猜数字游戏 class BullsAndCows { /* 你在和朋友一起玩 猜数字(Bulls and Cows)游戏,该游戏规则如下: 你写出一个秘密数字,并请朋友猜这个数字是多少。 朋友每猜测一次,你就会给他一个提示,告诉他的猜测数字中有多少位属于数字和确切位置都猜对了(称为“Bulls”, 公牛),有多少位属于数字猜对了但是位置不对(称为“Cows”, 奶牛)。 朋友根据提示继续猜,直到...
ALGO
0.999896
5.391461
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2020-11-05T09:38: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": "11260e861...
e9ee5291-fe29-4f73-80ed-389f6a496e53
Adi-Rana/SnakeGame
snakegame.cpp
#include<iostream> #include<time.h> #include<stdlib.h> #include<conio.h> #include<stdio.h> struct poison { int x; int y; char value; }p; using namespace std; struct fruit { int x; int y; char value; }f; struct snake { int x; int y; char value; struct snake *next; }; struct s...
ALGO
0.994537
3.21579
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-01-14T04:57: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": "91152c4eab...
890d95a8-b279-4200-be8c-034c47890c4f
tusikalanse/acm-icpc
ProjectEuler/068.cpp
/* * @Author: tusikalanse * @Date: 2021-07-14 22:18:26 * @LastEditTime: 2021-07-14 22:48:29 * @LastEditors: tusikalanse * @Description: dfs * @FilePath: /ProjectEuler/68.cpp */ #include <bits/stdc++.h> using namespace std; using LL = long long; LL gcd(LL a, LL b) { return b == 0 ? a : gcd(b, a % b); } const ...
ALGO
0.999101
3.857978
{ "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": "45121852...
ba11cf63-52ef-463f-9c51-3df239f17df3
KoceVLT/oop
proekt.cpp
#include <iostream> #include <cmath> using namespace std; class kompleksi { private: float x,y; public: kompleksi operator+(kompleksi a) { kompleksi z=*this; z.x+=a.x; z.y+=a.y; return z; } kompleksi operator*(kompleksi a) { kompleksi z; ...
ALGO
0.987181
4.267191
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2025-01-28T19:35: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": "6896f9abba...
b194943e-c6f6-4a21-9a79-81220c5edebd
heavenMOJANG/ICPC
.history/AtCoder/abc363/D_20240720202524.cpp
#pragma GCC optimize(1) #pragma GCC optimize(2) #pragma GCC optimize(3,"Ofast","inline") #include<bits/stdc++.h> #define int long long using namespace std; constexpr int inf=0x7fffffff; int n; signed main(){ cin.tie(0)->sync_with_stdio(0); cin>>n; int count = 0,number = 9; int w=0; long half; ...
ALGO
0.999816
4.012035
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2025-01-19T07:27:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76fb904b9a9...
7d9921a2-5533-453c-8759-89f64dbbd092
DevBaweja/Competitive-Coding
GeeksForGeeks/Matrix Search/Search in Row Column wise Sorted Matrix.cpp
#include <iostream> using namespace std; #define R 4 #define C 5 pair<int, int> searchRowColumn(int M[R][C], int k) { int smallest = M[0][0], largest = M[R - 1][C - 1]; if (k < smallest || k > largest) return make_pair(-1, -1); int i = 0, j = C - 1; while (i < R && j >= 0) { if (M[...
ALGO
0.999893
4.71257
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2020-10-25T07:57: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": "e9ad9e459...
977e7cb2-9828-4358-886e-d977048b6686
lbwei1016/Competitive-Programming
ICPC/17-ECNA/g.cpp
#include <bits/stdc++.h> #define io cin.tie(NULL), ios_base::sync_with_stdio(false) using namespace std; using ll = long long; const int N = 105; int n, m; int dp[N][N][2]; // dp[d][eat][pre]: 當下決定要不要吃 d-th 食物、已經連續吃 eat 個食物、上一次有沒有吃 = [pre == 1] int fd[N], app[N]; int mx; int rec(int d, int eat, int pre) { if (d =...
ALGO
0.999936
3.365765
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-03-25T06:23: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": "9bd73060cd4...
ab5376c6-aedc-409b-8302-372cf587caaf
jnkUHaFnir/human-vs-ai
3-1_gpt-4-0314/gpt4-0314_142.cpp
#include <iostream> #include <vector> #include <climits> #include <cstring> using namespace std; const int MAX_N = 1010; int n, arr[MAX_N]; int dp[MAX_N][MAX_N]; // cache for DP int circularSum(int i, int j) { int sum = 0; for (int k = i; k <= j; k++) { sum += arr[k]; sum %= 100; } ret...
ALGO
0.999863
5.157907
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-24T16:57: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": "b665965553cf...
1b6e18d7-049b-4bb7-a4b5-1f41432995d8
patryk-kubiczek/noneq-cthalfhyb
discrete_bath/DiscreteBathWeight.h
#pragma once #include "../model/cthalfhyb/Model.h" #include "../configuration/Configuration.h" #include "../local_weight/LocalWeightBase.h" #include "DiscreteBath.h" class DiscreteBathWeight : public LocalWeightBase{ public: DiscreteBathWeight(const Model &m, const Configuration &conf, local_weight_type type = ...
ALGO
0.970127
6.334831
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-05-11T21:12:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85c74b9b04...
cc0cb783-b4a5-4f91-9536-d7498e27a016
NIKKU-29/Leetcode_stats
0896-smallest-subtree-with-all-the-deepest-nodes/0896-smallest-subtree-with-all-the-deepest-nodes.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), l...
ALGO
0.999631
5.881521
{ "github_metadata": { "branch": "main", "commit_count": 2756, "repo_created_at": "2024-09-02T11:26:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01a2ca006...
f6fc3378-3827-42b2-80af-c5e4ce69ee5b
openharmony/graphic_graphic_2d
rosen/modules/render_service_base/src/common/rs_occlusion_region_helper.cpp
/* * Copyright (c) 2023-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
ALGO
0.961166
6.249472
{ "github_metadata": { "branch": "master", "commit_count": 37467, "repo_created_at": "2024-10-29T13:58:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40c1262...
36effe8e-649b-447d-ab9c-2bd0cb8366ab
Clouder0/AlgorithmPractice
Codeforces/contest/1385/C.cpp
#include <cstdio> #include <algorithm> #include <ctype.h> const int bufSize = 1e6; inline char nc() { #ifdef DEBUG return getchar(); #endif static char buf[bufSize], *p1 = buf, *p2 = buf; return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, bufSize, stdin), p1 == p2) ? EOF : *p1++; } inline void read...
ALGO
0.999939
4.038272
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2022-10-23T12:45: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": "59605085f6d...
5d87fbef-148b-461f-b8db-aadae82920f6
alexfinger21/baldwin-wallace-problems
1999G2.cpp
#include <bits/stdc++.h> using ll=long long; using namespace std; int32_t main() { int t; cin >> t; while (t--) { ll l = 2, r = 999; while (l < r) { int md1 = (l + (r-l)/3); int md2 = (l + 2*(r-l)/3); cout << "? " << md1 << ' ' << md2 << endl; ...
ALGO
0.999872
3.499105
{ "github_metadata": { "branch": "main", "commit_count": 271, "repo_created_at": "2024-04-12T16:29: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": "a389cc8d5d...
db1f7052-c55f-468b-bf01-c2f6757032ec
fhormoz/caviar
CAVIAR-C++/armadillo/include/armadillo_bits/fn_eig_gen.hpp
// Copyright (C) 2015-2016 National ICT Australia (NICTA) // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. // -----------------------------------------------------...
ALGO
0.987502
5.506421
{ "github_metadata": { "branch": "master", "commit_count": 122, "repo_created_at": "2014-12-05T22:46:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 60, "forks": 25, "issues": 17, "pull_requests": 1 }, "file_meta": { "content_id": "07d63...
0ada855d-68db-4ddb-ba82-ee837a23d643
wilmer05/combinatorial
p2/main.cpp
#include <iostream> #include <cstdlib> #include <cstring> #include "graph.hpp" #include "held_karp.hpp" const int max_string_size = 50000; char input[max_string_size]; int n_vertices; const char DIMENSION_STR[] = "DIMENSION"; const char NODE_COORD_STR[] = "NODE_COORD_SECTION"; const char EOF_STR[] = "EOF"; int usage(...
ALGO
0.999146
4.099222
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2017-11-07T18:44: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": "229ef501a...
363d7660-aea8-4227-a808-d44c7edab91c
willowgarage/arm_navigation
joint_normalization_filters/include/joint_normalization_filters/unnormalize_joint_trajectory.h
/********************************************************************* * Software License Agreement (BSD License) * * Copyright (c) 2009, <NAME>, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following condit...
ALGO
0.938563
6.819693
{ "github_metadata": { "branch": "master", "commit_count": 1068, "repo_created_at": "2014-01-28T19:38:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d6ed217...
b0c25eef-d51f-4712-8578-fd7873db3c48
mateusrodrigues/geneticalgorithm
dna.cpp
// // Created by mateu on 3/15/2019. // #include "dna.h" #include <random> dna::dna(std::default_random_engine& generator) { std::uniform_real_distribution<float> distribution(SEARCH_LOWER_BOUND, SEARCH_UPPER_BOUND); this->x1 = distribution(generator); this->x2 = distribution(generator); evaluateFitn...
ALGO
0.999925
5.280285
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-03-15T19:19:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ce106b8ed...
7e6806fd-2f28-4a2f-b107-281efa5e90d0
alexanderrobitzsch/BIFIEsurvey
src/bifiesurvey_rcpp_logistreg.cpp
//// File Name: bifiesurvey_rcpp_logistreg.cpp //// File Version: 0.303 #include <RcppArmadillo.h> // [[Rcpp::depends(RcppArmadillo)]] // [[RcppNOinterfaces(r, cpp)]] #include <Rcpp.h> #include <Rmath.h> using namespace Rcpp; using namespace arma; // [include_header_file] #include "bifiesurvey_rcpp_helper.h" ...
DATA
0.998993
5.331467
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2017-06-24T12:10:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78629c7cb...
2fcecd21-25a8-44f6-8db7-d3f83e409a1a
LordMotas/JobPortfolio
Project Euler Solutions/C++/Problem 40/Euler40.cpp
/* Project Euler #40 Problem Statement: An irrational decimal fraction is created by concatenating the positive integers: 0.12345678910 1 112131415161718192021... It can be seen that the 12th digit of the fractional part is 1. If dn represents the nth digit of the fractional part, find the value of the following ex...
ALGO
0.999728
5.333339
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2016-01-23T06:22: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": "564d5eafc...
5ca5f83b-bad4-4458-bf84-21d1894ee974
ktye/mech
src/puls/puls/aderginac/aderginac.cc
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <fstream> #include <ginac/ginac.h> using namespace std; using namespace GiNaC; //#include "poly.h" ex scale(ex x0, ex x1, ex y0, ex y1, ex scalex) { return scalex*(y0-y1)/(x0-x1) + (x0*y1-x1*y0)/(x0-x1); } void usage(char **argv) { cerr << "usage:...
ALGO
0.998964
3.904499
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-02-15T14:33:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82378913bf...
35fc08e6-d67a-46f8-af39-4256a85a9809
oke-aditya/dsa
Algorithms/Dynamic_Programming/LCS_pattern/edit_dist.cpp
// Given two strings str1 and str2 and below operations that can performed on // str1. Find minimum number of edits (operations) required to convert ‘str1’ // into ‘str2’. #include <bits/stdc++.h> using namespace std; // Input: str1 = "geek", str2 = "gesek" // Output: 1 // We can convert str1 into str2 by insertin...
ALGO
0.999946
5.832722
{ "github_metadata": { "branch": "master", "commit_count": 246, "repo_created_at": "2020-03-20T17:15:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "43a0a29...
f83436dc-24ad-4042-99cc-038d7eb6e51f
dosonleung/DataStruct
SRC/Sort/HeapSort.cpp
// // HeapSort.cpp // DataStruct // // Created by DosonLeung on 2/25/18. // Copyright © 2018 DosonLeung. All rights reserved. // #include "HeapSort.hpp" //if ascending, we should make a min heap else max heap heap void adjustHeap(ElemType E[], int index, int length,bool isAscending){ ElemType curNode = E[inde...
ALGO
0.999363
4.519215
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-02-25T03:23:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "101b6731e...
c0f6518e-ede4-466f-b1d7-da49fd23336b
ssorry123/X_X_UOS
3_2_AI/과제_멀티레이어 신경망 구현.cpp
#pragma warning (disable: 4996) #include <iostream> #include <cstdio> #include <cstdlib> #include <ctime> #include <cmath> #include <cstring> #include <Windows.h> #define AND 0 #define OR 1 #define XOR 2 #define DONUT 3 ////// 컴퓨터과학부 2015920019 박서원 //////- 실험 과제 //////(1) AND, OR, XOR 구분 실험 //////(2) 도우넛 모양 구분 실험(아래 ...
ALGO
0.982606
3.270739
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2020-11-19T11:21: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": "54b15cebfa8c...
33c4c054-5485-44c2-80ef-f78e3b0f1913
GambuzX/LeetCode
algorithms/0017_letter_combinations_of_phone_number/solution.cpp
class Solution { public: map<char, list<char>> digitToLetter = { {'2' , {'a', 'b', 'c'}}, {'3' , {'d', 'e', 'f'}}, {'4' , {'g', 'h', 'i'}}, {'5' , {'j', 'k', 'l'}}, {'6' , {'m', 'n', 'o'}}, {'7' , {'p', 'q', 'r', 's'}}, {'8' , {'t', 'u', 'v'}}, {'...
ALGO
0.999956
6.500178
{ "github_metadata": { "branch": "master", "commit_count": 150, "repo_created_at": "2019-08-30T11:11: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": "4a739af1...
aed12205-125c-4c8f-9625-9a72d68cde26
farmerboy95/CompetitiveProgramming
Kattis/kattis presidentialelections.cpp
/* Author: <NAME> Status: AC Idea: - Basic DP Knapsack */ #include <bits/stdc++.h> #define FI first #define SE second #define ALL(a) a.begin(), a.end() #define SZ(a) int((a).size()) #define MS(s, n) memset(s, n, sizeof(s)) #define FOR(i,a,b) for (int i = (a); i <= (b); i++) #define FORE(i,a,b) for ...
ALGO
0.999949
4.416909
{ "github_metadata": { "branch": "master", "commit_count": 867, "repo_created_at": "2019-09-04T15:35:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbc8444e...
266a23f1-e242-4cf4-a5bc-f514216ddb6b
slo248/CS162_DS_Visualizer
src/SArr/SArr_Insert.cpp
#include "SArr.h" #include "Config.h" using namespace Config::SArr; void SArr::insertFront(int value) { assert(MIN_NODE<=num.value && num.value<MAX_NODE); assert(Config::MIN_VALUE<=value && value<=Config::MAX_VALUE); graph.finishAllSteps(); codeBox.loadFromFile("code/SArr/insertFront.txt"); // r...
ALGO
0.999137
3.909238
{ "github_metadata": { "branch": "main", "commit_count": 1196, "repo_created_at": "2023-03-27T13: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": "26ebf0d07...
8ad15cff-d59d-475a-a0c4-e140e9691b36
AIFM-sys/AIFM
shenango/apps/parsec/pkgs/apps/facesim/src/Public_Library/Geometry/PLANE.h
//##################################################################### // Copyright 2002-2004, <NAME>, <NAME>, <NAME>. // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //##############################################################...
ALGO
0.944971
6.354331
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-10-12T02:03:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 122, "forks": 37, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "cb1602c...
f89ed258-5f98-43ce-8cc9-8928a3d7b73a
serna37/asakatu
20240221/d/main.cpp
#include <bits/stdc++.h> using namespace std; template <class T> constexpr T inf = 0; template <> constexpr int inf<int> = 1001001001; template <> constexpr long long inf<long long> = 1001001001001001001ll; template <typename T> struct Edge { int from, to; T cost; int id; Edge(int from, int to, T cost =...
ALGO
0.99996
4.291996
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-01-02T11:09: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": "561ecd4cdaa...
a2a0cbb0-91a8-4e9a-8595-d1cde409ac52
shari003/Daily-DSA-CodeHelp
Lecture_15_Book_Alloc.cpp
#include<iostream> using namespace std; bool isPossibleSol(int *arr, int n, int m, int sol){ int count = 1; int pageSum = 0; for(int i = 0; i < n; i++){ if(pageSum + arr[i] <= sol){ // trying to get minimized result pageSum += arr[i]; } else { count++; if...
ALGO
0.999927
4.596958
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-11-22T05:42: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": "dd3bfa733631...
1b21e928-c938-421c-9a47-d043ac9881e7
akhikolla/testpackages
fuzzedpackages/FastSF/src/l0tf_c.cpp
#include <RcppArmadillo.h> using namespace Rcpp; // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::export]] List l0tf_c(arma::vec y,int k0,int T0,int max_steps) { arma::vec beta=y; int n = y.n_elem; int m = n-k0-1; arma::vec z = diff(y, k0+1); k0 = k0+1; arma::vec u(m); u.zeros(); double rho = n*n; ...
ALGO
0.999279
5.174924
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-01-15T17:42:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23407cc817...
ea1c36e1-6940-4fae-8483-a212715043de
kunal1632/DSA_with_cpp
06_char_strings_array/02_palindrome.cpp
#include <iostream> using namespace std; char toLowerCase(char ch) { if (ch >= 'A' && ch <= 'Z') { char temp = (ch - 'A') + 'a'; return temp; } return ch; } int lengthStr(char str[]) { int count = 0; for (int i = 0; str[i] != '\0'; i++) { count++; } return c...
ALGO
0.999622
4.737069
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2022-10-31T12:21:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "25a8457792c...
bc1f7096-37dc-4604-b923-1f235c2bd123
jordandong/mylintcodes
LINT_00477_SurroundedRegions.cpp
/* Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O''s into 'X''s in that surrounded region. Have you met this question in a real interview? Yes Example X X X X X O O X X X O X X O X X After capture all regions surrounded by 'X', the board should...
ALGO
0.999785
6.205721
{ "github_metadata": { "branch": "master", "commit_count": 818, "repo_created_at": "2014-12-07T08:10:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a4ab5f19...
f75cdcde-1195-4f02-bb6a-0652f420390b
toddbrentlinger/Cpp-Primer-5th-Edition
Chapter 4/CppPrimer_Sec4.9/CppPrimer_Sec4.9/main.cpp
#include <iostream> #include <string> using std::cout; using std::cin; using std::endl; using std::string; void Section49(); void Exercise428(); void Exercise429(); void Exercise430(); inline void NewSection(const string &text = "") { cout << "\n\t" << text << "\n" << endl; } struct Sales_data { string bookNo; ...
TOOL
0.94539
3.898822
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2017-08-14T01:14: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": "21e6b1f2f...
65dafdd0-f811-4f3d-ace4-12481ceaf1f5
saga-gis/saga-gis
saga-gis/src/saga_core/saga_api/mat_formula.cpp
/////////////////////////////////////////////////////////// // // // SAGA // // // // System for Automated Geoscientific Analyses // // ...
TOOL
0.93302
5.032501
{ "github_metadata": { "branch": "master", "commit_count": 6655, "repo_created_at": "2017-05-17T12:47:14.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 50, "forks": 19, "issues": 4, "pull_requests": 1 }, "file_meta": { "content_id": "e45a03...
2ca1d251-bcb7-4aec-a79e-95ab09cc60ac
zhyDaDa/CPP_Learning
questions/Mr_left/二叉树_中序后继.cpp
/* P8 6.图 1:48:00 * 在有父节点指针的二叉树中找到一个节点的后继节点 */ #include <bits/stdc++.h> using namespace std; struct TreeNode { int value; TreeNode *left = nullptr; TreeNode *right = nullptr; TreeNode *father = nullptr; TreeNode(int v) { this->value = v; this->left = nullptr; this->ri...
ALGO
0.999996
3.602725
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2023-07-24T15:48:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ecae3496169...
6e1e1781-a548-4f04-b2ce-2bc66f2b325e
edwinsun98/Competitive-Programming-Solutions
USA Computing Olympiad/USACO Contests/USACO 2018 Open Contest Gold P3 - Talent Show.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define f first #define s second #define all(vec) begin(vec), end(vec) #define pf push_front #define pb push_back #define lb lower_bound #define ub upper_bound using namespace std; typedef long long ll; typedef unsign...
ALGO
0.999994
4.1332
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2021-06-18T00:59: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": "68237fd5a4...
d84b5084-9182-478a-aa6c-7a9592b74cbb
Khurshida-Meem/UVA-problems-solution
10533 - Digit Primes.cpp
#include <bits/stdc++.h> using namespace std; #define fast ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define ll long long bool prime[1000001]; int tprime[1000001]; void sieve( int n ) { int x = sqrt( n ); prime[0] = prime[1] = 1; for( int i = 4; i <= n; i += 2 ) prime[i] = 1; fo...
ALGO
0.999732
4.312317
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2020-01-22T13:41: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": "3e515b6c4...