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
963cd4a4-422c-4a7a-a8ce-3899893618d7
ogas1024/ECJTU-DS-Labs
Lab6/src/BinarySearch.h
/* * @Author: OGAS <EMAIL> * @Date: 2024-12-03 17:06:20 * @LastEditors: OGAS <EMAIL> * @LastEditTime: 2024-12-03 17:12:28 * @FilePath: \Lab6\src\BinarySearch.h * @Description: Coding with UTF-8 * * Copyright (c) 2024 by OGAS, All Rights Reserved. */ #include <iostream> using namespace std; bool check(int ...
ALGO
0.999624
4.79398
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-08T03:56:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a806407c6789...
00b12416-ae40-4828-b36c-2029b2f7f541
dhs347/Dream
Template/李进/我的代码2/数学/Polynomial/网上版本/多项式5_优美版.cpp
#include<cstdio> #include<algorithm> #include<cmath> using namespace std; typedef long long ll; const int N=3e5+10,p=998244353; int inc(int x,int y){x+=y;return x>=p?x-p:x;} int dec(int x,int y){x-=y;return x<0?x+p:x;} int mul(int x,int y){return (ll)x*y%p;} int power(int x,int y){ int ans=1; for (;y;y>>=1,x=mul(x,x)...
ALGO
0.999983
3.510307
{ "github_metadata": { "branch": "master", "commit_count": 1232, "repo_created_at": "2019-09-26T15:21:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e54929...
903dd450-79ca-4b8e-8518-245c078af8f8
Dalphat/twitch-stream-coding
cpp/pong/main.cpp
#include <SFML/Graphics.hpp> #include <random> #include <chrono> #include <iostream> #include <utility>//Pair #include <thread> #include <cmath>//Float modulus #include <array> #include "ball.hpp" #include "paddle.hpp" /* Twitch stream coding. We created two walls, a ball, two boundaries for restart and ...
TOOL
0.972417
5.35995
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2019-05-01T09:49:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3707d90f...
d456e9a0-d431-4a85-a4d0-a42cb76d218a
luqmanarifin/cp
2016-2017 CT S03E09 Codeforces Trainings Season 3 Episode 9/mike.cpp
#include<cstdio> #include<cstring> #include<cmath> #include<vector> #include<iostream> #include<algorithm> #include<memory> #include<map> #include<queue> #include <sstream> #include <set> using namespace std; typedef pair<int,int> PII; void adjust(PII &A){ if (A.first > A.second) swap(A.first, A.second); } map<strin...
ALGO
0.999962
4.078874
{ "github_metadata": { "branch": "master", "commit_count": 772, "repo_created_at": "2016-02-09T04:26:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "656dfe2b...
3cebe9e4-1bee-4660-8ab5-75d59daea7e4
Enigmatisms/LeetcodeRust
622_circular_queue/cir_queue.cc
#include <iostream> #include <vector> #include <algorithm> #include <numeric> #include <unordered_map> #include <unordered_set> using namespace std; /** * 环形队列基于vector以及双指针实现 * runtime: 98.65% * memory: 33.75% */ class MyCircularQueue { public: MyCircularQueue(int k): storage(k, 0), head_ptr(0), tail_ptr(0),...
ALGO
0.997235
5.526017
{ "github_metadata": { "branch": "master", "commit_count": 167, "repo_created_at": "2022-07-11T09:57:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "0c32bd61...
9ff53d11-893a-4d66-9a0d-028de4b571c6
lifajun/algorithm
AlgorithmStudy/Searching/QiQiaoBan/QiQiaoBan_MeiJu.cpp
#include <iostream> #include <windows.h> using namespace std; int map[8][8] = { {0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 1, 0, 1}, {0, 1, 0, 0, 1, 0, 1, 0}, {0, 0, 0, 0, 1, 0, 0, 1}, {0, 0, 1, 1, 0, 0, 1, 1}, {0, 1, 0, 0, 0, 0, 0, 1}, {0, 0, 1, 0, 1, 0, 0, 0}, {0, 1, 0, 1, 1, 1, 0, 0} }; int c[8], total; b...
ALGO
0.998797
3.558402
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2012-10-07T14:20:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c69c67f0e...
4cba6ab8-4807-4f8f-9ee4-a92080559ad1
surya-prakash-susarla/My-Solutions
2025/find_all_possible_recipes_from_given_supplies.cpp
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <limits> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <utility> #include <vector> typedef long long int llint; typedef long long...
ALGO
0.999689
4.857475
{ "github_metadata": { "branch": "main", "commit_count": 1096, "repo_created_at": "2018-11-28T13:59: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": "df5270456...
6b5cb2e4-9219-43a1-b202-cf6588e355cf
liangsheng/ACM
template2/字符串后缀数组等/spoj1181后缀自动及数组版.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #define pause cout << " press any key to continue...", cin >> chh #define file_r(x) freopen(x, "r", stdin) #define file_w(x) freopen(x, "w", stdout) #define lowbit(x) ((x) & (-(x))) using namespace std; int chh; const int N = 250005, ...
ALGO
0.999979
3.413532
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2013-04-10T03:54: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": "3d3ccce42...
3b2daaab-0be5-408f-9164-b131853493f8
leducphuclong/code
Competitive Programming/all/c2.cpp
// Copyright (c) 2023, <NAME> /*If you don't think twice, you have to code twice.*/ // Include #include <bits/stdc++.h> // NOLINT // #include <conio.h> // Namespace using namespace std; // NOLINT // Define #define nln '\n' // Typedef and Struct typedef int64_t lo; // Constant // Declare global variables. // En...
ALGO
0.999649
4.266765
{ "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": "b4bcabf175...
23e38c80-ba0b-4ab9-8e72-a09565efd003
k-kashapov/cpp-practice
01_cache/src/arc_cache.cpp
#include <algorithm> #include <arc_cache.hpp> void ARCCache::replace(size_t p, bool in_b2) { if ((!cached_ref_once.empty()) && ((cached_ref_once.size() > p) || (in_b2 && (cached_ref_once.size() == p)))) { ghost_ref_once.splice(ghost_ref_once.begin(), cached_ref_once, s...
ALGO
0.986878
6.060334
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2024-10-28T01:24: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": "da9a28ad8...
746b431f-d587-4538-9b91-4c2ec06d7e00
MarkPThomas/Jumping-Into-CPlusPlus
Part 2 - Data/Ch 15 - Linked Lists/usingLinkedLists/usingLinkedLists.cpp
#include <cstdlib> #include <ctime> #include <iostream> using namespace std; struct EnemySpaceShip { int xCoordinate; int yCoordinate; int weaponPower; int shipID; EnemySpaceShip* p_nextEnemy; }; void printShips(EnemySpaceShip* p_enemies); EnemySpaceShip* addNewEnemyToList(EnemySpaceShip* p_list, int shipID); ...
TOOL
0.965353
4.010049
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2017-07-09T13:22:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f9b71e9a...
4c88bf27-b49e-4159-86b3-7369754801fb
raincross7/code-similarity
codes/train_code/problem039/problem039_160.cpp
#include <vector> #include <stack> #include <queue> #include <list> #include <bitset> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <algorithm> #include <numeric> #include <iostream> #include <iomanip> #include <string> #include <chrono> #include <random> #include <cmath> #inc...
ALGO
0.999949
4.51593
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07: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": "b3cf3ad70bbc...
60a42116-866a-4076-9f16-f47f6753dcf3
burhanv14/bwise
B_Playing_in_a_Casino.cpp
//Code by <NAME> - <EMAIL> #include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef tree<long long,null_type,less<long long>,rb_tree_tag,tree_order_statistics_node_update> pbds; //st.find_by_order(x) || st.order_of_key(x...
ALGO
0.999966
3.1771
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-11-13T15:31:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3dda35a2f6c...
76dd8aca-d6ff-4761-92ae-dd6aeebc2910
kipr/opencv
samples/cpp/minarea.cpp
#include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> using namespace cv; using namespace std; static void help() { cout << "This program demonstrates finding the minimum enclosing box or circle of a set\n" "of points using functions: minAreaRect() minEnclo...
ALGO
0.997974
5.833407
{ "github_metadata": { "branch": "master", "commit_count": 7094, "repo_created_at": "2013-01-27T01:06:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 152, "forks": 340, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "b7da...
1de80b70-da2f-47ec-b3be-25d490ec5790
johannasmriti/Data-Structures
array/level-1/one.cpp
/*Check if a key is present in every segment of size k in an array*/ /*Given an array arr[] and size of array is n and one another key x, and give you a segment size k. The task is to find that the key x present in every segment of size k in arr[]. Examples: Input : arr[] = { 3, 5, 2, 4, 9, 3, 1, 7, 3, 11, 12, 3} x...
ALGO
0.99997
4.865094
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2021-07-07T05:07:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ae1403270f...
a855c8b9-3b04-4c5f-b523-dc15ab8b15fc
zugebot/Mindbender-Solver
code/perms.cpp
#include "perms.hpp" #include "rotations.hpp" template class Perms<Memory>; template class Perms<Board>; template<typename T> MU C typename Perms<T>::depthMap_t Perms<T>::depthMap = { {1, {{1, 0}, {0, 1}}}, {2, {{1, 1}, {0, 2}, {2, 0}}}, {3, {{1, 2}, {2, 1}, {0, 3}, {3, 0}}}, {4, {{2...
ALGO
0.909248
6.257611
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2024-01-09T04:22: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": "8cf087535...
5d57cd48-b75d-4437-a3d7-e07081040415
piyush1104/AlgoPractice
count_inversion_2.cpp
#include "stdc++.h" using namespace std; // a way better algorith, why because it does the job in O(nlogn) int SortAndMerge(int* A, int i, int k, int mid, int*C) { int p=i, q=mid+1, r=0, count=0; while(p <= mid && q <= k) { if(A[p] <= A[q]) { C[r] = A[p]; r++; p++; ...
ALGO
0.999815
4.31444
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-08-03T06:22: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": "f3def6b33...
e327ad9d-d8a0-4eab-bb8c-5ab2658e5078
ishandutta2007/codeforces-a
antoine/normal/1476/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define DBG(v) cerr << #v << " = " << (v) << endl; ll f() { int n, k; cin >> n >> k; vector<ll> a(n); for(ll &x:a) cin >> x; ll lo = 0, hi = 1e14; while(lo < hi) { const ll mid = (lo + hi) / 2; ll s ...
ALGO
0.999682
4.138213
{ "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": "ff435c19dfc4...
dc68dcb4-0bb7-4b03-911f-779a49c54a7c
ar90n/lab
contest/topcoder/347/CarBuyer.cpp
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; class CarBuyer { public: double lowestCost(ve...
ALGO
0.990353
4.541683
{ "github_metadata": { "branch": "main", "commit_count": 792, "repo_created_at": "2017-01-03T04:15:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 151 }, "file_meta": { "content_id": "b7029753...
510d6d6f-3b3e-4c37-9f17-f57e46dee4ee
redpenguiney/AG3
code/src/non-engine/world.hpp
#pragma once #include <array> #include <vector> #include <list> #include <memory> #include <glm/vec3.hpp> #include "events/event.hpp" #include "tile_chunk.hpp" #include "utility/hash_glm.hpp" #include <unordered_set> #include <optional> class Entity; struct ComputePathParams { int maxIterations = 10000; }; struct T...
TOOL
0.969599
5.622116
{ "github_metadata": { "branch": "main", "commit_count": 488, "repo_created_at": "2023-08-31T00:20:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f2a1f02433...
86334526-aecd-43a8-a9b4-285f3935482b
RunzeZ0710/Competitive-Programming
Codeforces/practice/xxxxx.cpp
#include <cstdio> #include <algorithm> #include <string> #include <cmath> #include <set> #include <map> #include <iostream> #include <tuple> #include <vector> #include <numeric> using namespace std; using ll = long long; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while(t--){ ...
ALGO
0.99984
3.289258
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-07-22T15:30: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": "a8eb7321acdc...
9206acc7-62a8-48db-addd-ea4274a1f5c6
aniketkumargiri/Data-Structures-Algorithms
Binary Search/15_search-sorted-rotated.cpp
// Search Element in a rotated Sorted Array #include <bits/stdc++.h> using namespace std; int search(int *arr, int n, int key) { int low = 0; int high = n - 1; while (low <= high) { int mid = (low + high) >> 1; if (arr[mid] == key) { return mid; } if (arr[low] <= arr[mid]) { // left part is sorted...
ALGO
0.999992
5.017742
{ "github_metadata": { "branch": "main", "commit_count": 100, "repo_created_at": "2022-07-08T12:57:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c6984eb666...
fca7d87e-39c9-4c8d-96e5-1cb45e0fce3b
JORAWAR128/Cpp-_Course
27_Friend_functions2.cpp
#include <iostream> using namespace std; class c2; class c1 { int val; friend void swap(c1 &X, c2 &Y); public: void setdata(int a) { val = a; } void getdata() { cout << "the value of c1 is " << val << endl; } }; class c2 { int val1; friend void swap(c1 &X, c2 &Y)...
ALGO
0.994061
4.931925
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-06-27T02:07: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": "c6f29dd2588...
9cfba9e8-9dba-4a27-b1d9-7a8efd6f75b5
Wan-YunPeng/leetcode
atoi_10_17/atoi_10_17/main.cpp
#include <iostream> using namespace std; int atoi(const char *str); int main() { char *str = "+2147483645"; int re = atoi(str); if (re) cout << re << endl; cout << INT_MAX / 10 << endl; return 0; } int atoi(const char *str) { int num = 0; int sign = 1; const int n = strlen(str); int i = 0; while (str[i...
ALGO
0.996092
3.621505
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-10-17T05:21:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "771e5ca4f7...
e8cef96a-2ab1-4ded-a48e-43ee5b491ecf
costadev00/neps_academy
A_Dia_Especial.cpp
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL) using namespace std; typedef long long ll; typedef long double ld; #define endl "\n" #define debug(args...) cout << (#args) << " = " << (args) << endl #define MOD 1000000007 #define vi vector<in...
ALGO
0.999281
3.316974
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2021-02-22T22:33: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": "500f8c81952...
2e546664-9696-4ed2-9ee7-4f946ce953da
Amolin10/Practicas-Compiladores
Practica 2/src/automata.cpp
#include <iostream> #include <vector> #include <math.h> using namespace std; int vectorToInt (vector<int> vector) { int numero = 0; for (int i = 0; i < vector.size(); ++i) { numero += vector[i] * pow(10, vector.size() - 1 - i); } return numero; } struct numero { int dato[2]; enum tipo ...
ALGO
0.973333
3.559544
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-08-18T23:46:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3438019f3a24...
e29cde24-9936-4d28-924c-dbd9658e5c67
Rahul-Palahwat/LeetCode_Problems
2786-visit-array-positions-to-maximize-score/2786-visit-array-positions-to-maximize-score.cpp
class Solution { public: long long solve(int index , vector<int>& nums , int x , vector<vector<long long>>& dp, int parity){ if(index == nums.size()){ return 0; } if(dp[index][parity] != -1){ return dp[index][parity]; } long long ans = 0; long ...
ALGO
0.999985
5.207292
{ "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": "e7cd1d8c6...
2af863dc-77b3-4b44-bf76-5b5f41e7898b
yunan4nlp/NNDisParser
N3LDG/BiOP.h
#ifndef BIOP_H_ #define BIOP_H_ /* * BiOP.h: * a simple feed forward neural operation, binary input. * * Created on: June 11, 2017 * Author: mszhang */ #include "Param.h" #include "MyLib.h" #include "Node.h" #include "Graph.h" #include "ModelUpdate.h" class BiParams { public: Param W1; Param W2; ...
DATA
0.998393
6.228672
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-06-05T07:19:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 5, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "33da86a74...
478ecbb9-d6fb-4f39-aad3-462d0696d923
bridge2nowhere/pocketDungeon
cave.ino
byte caveTopX[30]; byte caveTopY[30]; byte caveTopCount = 0; byte caveLeftX[30]; byte caveLeftY[30]; byte caveLeftCount = 0; byte caveRightX[30]; byte caveRightY[30]; byte caveRightCount = 0; void findChest(){ chestPosnX = (random(1,13) * 8) + 8; chestPosnY = (random(1,7) * 8) + 8; } void makeCaveTop(){ byt...
TOOL
0.94859
3.649135
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-03-21T19:54: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": "762f8fe4f...
dff3d76a-26a9-430f-9187-3a703f5d5304
J-algorithm/J-algorithm
그리디/체육복/PGS_체육복_김주한.cpp
#include <string> #include <vector> #include <cstring> using namespace std; #define FOR(i,s,e) for(int i=s; i<e; ++i) #define N_MAX (30 + 1) bool lost_flag[N_MAX]; bool reserve_flag[N_MAX]; bool isUniform[N_MAX]; int solution(int n, vector<int> lost, vector<int> reserve) { int answer = 0; FOR(i, 0, lost.si...
ALGO
0.999722
4.08826
{ "github_metadata": { "branch": "main", "commit_count": 268, "repo_created_at": "2024-01-09T13:37:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aee68c19056...
c000d020-c833-41c3-8c55-2f1dbd094681
n0en0o/sem2lab4
main.cpp
#include <iostream> #include "Tests.h" #include "Menu.h" template <typename T> T func1(T item) { item++; return item; } int main() { if(tests<int>() != 0){ std::cout << "Tests crushed." << std::endl; return -1; } BinaryTree<int> tree; while(true) { char input[20]; ...
TEST
0.972407
4.025613
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-10-28T12:22: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": "a1aafb6a61...
103c2fda-09a1-4ebd-84f5-8cd50f3e027c
oktayogutcu/leetcode
hard/84.largest-rectangle-in-histogram.cpp
/* * @lc app=leetcode id=84 lang=cpp * * [84] Largest Rectangle in Histogram */ // @lc code=start class Solution { public: int largestRectangleArea(vector<int>& heights) { stack<pair<int,int>> stk; int max_area = 0; stk.push(make_pair(0,heights[0])); for(int i = 1; i < heights....
ALGO
0.999968
7.133857
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-08-11T21:56: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": "fbc154b8be1...
caa0c710-2b6e-4a16-9548-dfa0523bfcfe
socc-io/algostudy
baekjoon/smilu/1127.cpp
#include <iostream> #include <cstdlib> #include <vector> using namespace std; int main(void) { int N; cin >> N; vector< vector<int> > map(N, vector<int>(N)); for(int i=0;i<N;++i) { string str; cin >> str; for(int j=0;j<N;++j) { map[i][j] = str[j] - '0'; } } int guard_N; cin >> guard_N; vector< vect...
ALGO
0.999346
3.872212
{ "github_metadata": { "branch": "master", "commit_count": 785, "repo_created_at": "2015-01-08T04:25:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 10, "forks": 3, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "63b05096...
a73649b8-b4e2-49c4-a64f-6319adbce003
Akib73/Operating-System-and-System-Programming-Lab
FCFS&PSJF.cpp
#include <iostream> #include <algorithm> // For std::swap #include <climits> using namespace std; int main() { int n; // Input number of processes cout << "Enter the number of processes: "; cin >> n; int bt[n], at[n], wt[n], tat[n], ct[n], p[n], rt[n]; int total_wt = 0, total_tat = 0; //...
ALGO
0.999982
4.652422
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-23T14:17: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": "72a3ceb59fc3...
ef3a0615-041e-4746-8621-bf0e52002ce7
RunaNam/Algorithm_old
프로그래머스 고득점 kit/C++/모의고사.cpp
#include <string> #include <vector> #include <algorithm> using namespace std; int stu1[] = {1, 2, 3, 4, 5}; int stu2[] = {2, 1, 2, 3, 2, 4, 2, 5}; int stu3[] = {3, 3, 1, 1, 2, 2, 4, 4, 5, 5}; vector<int> solution(vector<int> answers) { vector<int> answer; int score[3] = { 0, }; int biggest = ...
ALGO
0.99998
5.081378
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2020-04-18T14:57:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2465eb29...
2c1ad926-ca24-4d7b-9fa3-ddfaa4bd0682
vnitesh123/computer-graphics-raytracing
animation.cpp
#include <cmath> #include<iostream> #include<vector> #include <thread> #include "camera.h" #include "ray_vector.h" #include "image.h" #include "surface.h" using namespace std; double pi = 3.14159265359; double DOUBLE_MAX = numeric_limits<double>::max(); bool hit_surface(vector<Surface*> surfaces, vector<double>e, vec...
ALGO
0.90892
4.279457
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-11-03T19:00:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5dfb60d0238a...
74760701-7a96-4e33-bc83-39281c30f05b
manarimo/ICFPC2022
mkut/ordered.cpp
#include <cstdio> #include <cmath> #include <vector> #include <map> #include <algorithm> #include <set> using namespace std; const int MAX_H = 400; const int MAX_W = 400; struct color { int r; int g; int b; int a; color(int r, int g, int b, int a) : r(r), g(g), b(b), a(a) {} bool op...
ALGO
0.998504
3.723677
{ "github_metadata": { "branch": "master", "commit_count": 490, "repo_created_at": "2022-08-22T02:20:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "491e988d2...
37a60118-c414-4c4e-ae7c-b2d454f0a25c
CULRRY/Algorithm_CPP
백준/Gold/1644. 소수의 연속합/소수의 연속합.cc
#include <bits/stdc++.h> #define FASTIO ios_base::sync_with_stdio(false); cin.tie(0); using namespace std; int n; int cnt = 0; int main() { FASTIO; cin >> n; vector<int> v(n+1); for (int i = 2; i <= n; i++) { v[i] = i; } for (int i = 2; i <= sqrt(n); i++) { if (v[i...
ALGO
0.999922
3.973401
{ "github_metadata": { "branch": "main", "commit_count": 551, "repo_created_at": "2022-10-22T00:01: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": "f1e3c968b4...
66eb3df3-7c03-4eaa-9a12-8c2de6663f81
Gosmann/STA_Robot_Explorateur
arduino/control/calib/control.ino
/* typedef struct control_t { float kp ; float ki ; float integrator ; float set_point ; //float old_set_point ; float feedback ; float error ; float pid ; } control_t ; */ control_t init_control( float kp, float ki){ control_t control = { kp, ki, 0, 0, 0, 0, 0 } ; return c...
ALGO
0.998939
3.736226
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2023-10-12T20:10: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": "d11c2ed6383...
ddb9641d-a108-44f2-835e-26ed8eee84d3
SiskonEmilia/lightweight-web-server
server/src/HttpRequestParser.cpp
#include <string> #include <algorithm> #include <iostream> #include "config/Configs.h" #include "http/HttpRequestParser.h" #include "http/HttpRequest.h" #include "utils/Utils.h" using std::cout; using std::endl; /** * @brief 解析一行,将其(除了 \r\n 外)拷贝到临时缓存中,视情况返回解析状态。解析完成后, * start_index 和 temp_start_index 分别指向两个 buffe...
WEB
0.908275
4.477858
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2021-01-30T04:03:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d425a76ceab...
b1e34566-fca6-4ba4-a2f5-9bccbb76bbfe
nishant-sg/tmp
New folder/q1.cpp
#include <stdio.h> #include <GL/glut.h> #include <math.h> #define pi 3.142857 int width, height; int windowWidth; int windowHeight; // Ellipse Variables int xCenter = -200; int yCenter = -100; // Major and Minor Axis int rx = 200; int ry = 100; // Variables for Circle // Radius int r = 200; // Offset of the centre int ...
ALGO
0.938909
4.62641
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-07-26T03:14: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": "a1f1770b1024...
cf0e164c-1ec8-42cf-9c2a-09ace9a1526a
huangtao00/vampireForAOS
vampire/src/statistics/magnetization.cpp
//----------------------------------------------------------------------------- // // This source file is part of the VAMPIRE open source package under the // GNU GPL (version 2) licence (see licence file for details). // // (c) <NAME> 2014. All rights reserved. // //----------------------------------------------------...
ALGO
0.943798
4.695146
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2017-02-15T01:22:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04991af9a...
4231ee99-1f75-4a2d-823d-082355f3ad3a
Masoudas/educational_material
OpenCV/BuildingComputerVisionProjectswithOpenCV4andCpp/ComputationalPhotography_4_3/Denoising/2_1_my_implementation_of_denoising.cpp
/** * In the following example, I implement a denoising filter that averages the given images. * * The point to remember like always is that the summation must be done in a floating point. If we simply * add all the images together, we saturate many pixels. * * Also for fun, we calculate the PSNR value of a no...
TOOL
0.965202
5.322811
{ "github_metadata": { "branch": "main", "commit_count": 546, "repo_created_at": "2021-02-20T10:59:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "579d24919f...
644866f5-2e60-4ea7-83fb-30f623a7b266
maxeemes/NGTU_TP_Laba1
CoinsSetStruct.cpp
#include "CoinsSetStruct.h" using namespace std; CoinsSet * Create(int M, int N, int L)//функция создания структуры набора монет с основными значениями { CoinsSet *Set = new CoinsSet(); Set->M = M; Set->N = N; Set->L = L; int SumNM = M + N; Set->A = new int[SumNM] {0}; Set->Coins = new int[SumNM] {0}; if (MNL...
ALGO
0.985268
3.958533
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-10-14T14:05: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": "a512a4fc49...
119e8d70-6433-4ec3-9306-9a609666e6f2
Volgarenok/spbspu-labs-2025-aads-a
kizhin.evgeniy/S7/command-processor.cpp
#include "command-processor.hpp" #include <functional> #include <iostream> #include <limits> #include <map> #include <stdexcept> namespace kizhin { void outGraphs(const GraphContainer&, std::ostream&); void outVertexes(const GraphContainer&, std::ostream&, std::istream&); void outOutbound(const GraphContainer&, ...
TOOL
0.934115
5.877169
{ "github_metadata": { "branch": "master", "commit_count": 4793, "repo_created_at": "2025-02-02T12:31:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 44, "issues": 0, "pull_requests": 46 }, "file_meta": { "content_id": "0ac31...
2cfb4d66-9561-435e-b6d8-7e1ac413f465
maminseo/minseo
cpp/7.cpp
#include <iostream> using namespace std; void swapArray(int* p, int* q, int size) { for (int i = 0; i < size; ++i) { int temp = p[i]; p[i] = q[i]; q[i] = temp; } } void printArray(int* p, int size) { for (int i = 0; i < size; ++i) { cout << p[i] << " "; } cout << en...
ALGO
0.999279
5.398023
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2024-03-11T03:48:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "26cc20272d8...
efc57528-0de6-42ed-b3bf-5839d9fee8da
LiamCox94/Dissertation-Repo
Crypto-Experiments/src/main.cpp
/* * Simple program to measure execution time of FRDM-K64F and the * application board * * DK - 28-11-2018 */ #include <mbed.h> #include <aes.h> #define FREESCALE_MMCAU 1 #ifdef __cplusplus extern "C" { #endif #include "cau_api.h" #ifdef __cplusplus } #endif #include <stdbool.h> #include <stdint.h> #include <mb...
TOOL
0.921634
5.275695
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-04-30T02:10: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": "628e1ac79...
44a8dc21-470e-494c-873f-d3c862c1be9b
dl8sd11/online-judge
aizu/1378.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i,n) for(int i=0;i<n;i++) #define REP1(i,n) for(int i=1;i<=n;i++) #define SZ(i) int(i.size()) #ifdef tmd #define IOS() #define debug(...) fprintf(stderr,"%s - %d (%s) = ",__PRETTY_FUNCTION__,__LINE__,#__VA_ARGS__);_do(__VA_ARGS__); template...
ALGO
0.999992
3.841937
{ "github_metadata": { "branch": "master", "commit_count": 332, "repo_created_at": "2017-11-19T05:47:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a43fda4f...
d8adb210-5853-4f68-8d00-64ec9e152228
ibudiselic/contest-problem-solutions
tc 160+/CountPaths.cpp
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> using namespace std; int dp[51][51][51][51]; int F[51][51]; int M, N, S; int mod = 1000007; bool valid(int i, int j) { if (i<1 || j<1 || i>=M || j>=N) { ...
ALGO
0.999875
4.723495
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2011-08-14T11:43:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0bbcc54fc...
39c957a0-ddd8-43c6-913d-52f6f2899658
Bruteforceman/cp-submissions
codeforces/484/E.cpp
#include <bits/stdc++.h> using namespace std; int t[100010 * 4]; int lt[100010 * 4]; int rt[100010 * 4]; int n; #define update wsdfdf void update(int x, int val, int c = 1, int b = 1, int e = n) { if(b == e) { t[c] = lt[c] = rt[c] = val; return ; } int m = (b + e) >> 1; int l = c << 1; ...
ALGO
0.999995
4.130859
{ "github_metadata": { "branch": "master", "commit_count": 488, "repo_created_at": "2021-01-10T09:51: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": "a3f711f8...
74f8123c-083f-464f-ba35-eaf0fdb9ac0e
stingergraph/stinger
src/clients/tools/json_rpc_server/src/bfs_edges.cpp
#include <queue> #include <set> //#define LOG_AT_W /* warning only */ #include "stinger_core/stinger_error.h" #include "stinger_core/xmalloc.h" #include "rapidjson/document.h" #include "json_rpc_server.h" #include "json_rpc.h" using namespace gt::stinger; int64_t JSON_RPC_bfs_edges::operator()(rapidjson::Value *...
ALGO
0.986939
5.596635
{ "github_metadata": { "branch": "master", "commit_count": 973, "repo_created_at": "2013-07-22T20:05:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 213, "forks": 67, "issues": 37, "pull_requests": 7 }, "file_meta": { "content_id": "0e8c2...
9f1dcfb9-6734-41bd-b15f-2604482ba2da
DigvijayNarayanPandey/Data-Structures-Algorithm-in-C-
3 Array/Medium/supremeElement.cpp
#include <bits/stdc++.h> using namespace std; vector<int> superiorElement(vector<int> &a) { vector<int> ans; int maxi = INT_MIN, n = a.size(); for (int i = n - 1; i >= 0; i--) { if (a[i] > maxi) ans.push_back(a[i]); maxi = max(maxi, a[i]); } sort(ans.begin(), ans.en...
ALGO
0.999941
4.470852
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-01-01T17:12: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": "f0d103d3101d...
d0b558ed-c681-4e0b-9a3f-6efc8409292b
antonsubbotin/pali
pali.cc
#include <node.h> #include <stdlib.h> #include <stdio.h> #include <math.h> namespace demo { using v8::Exception; using v8::FunctionCallbackInfo; using v8::Isolate; using v8::Local; using v8::Object; using v8::String; using v8::Value; using v8::Number; // ----------------------- // long long get_pali(int digits); ty...
ALGO
0.998001
5.335999
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-11-30T16:14: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": "180a900fdf...
4c9426de-6562-4f60-b7d9-8ab6b4f5a026
RisshabSingla/LeetCode-C-Solutions
1121-partition-array-for-maximum-sum/partition-array-for-maximum-sum.cpp
class Solution { public: int dp[501]; // int recursion(vector<int>&arr, int index, int&n, int& k){ // if(index >= n){ // return 0; // } // int maxi = 0; // int maxVal = 0; // for(int j = index; j<min(n, index+k); j++){ // maxVal = max(arr[j], maxVa...
ALGO
0.999756
5.606061
{ "github_metadata": { "branch": "main", "commit_count": 2390, "repo_created_at": "2023-06-13T15:11: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": "4f03e9384...
0d461786-17a2-4bba-b85c-520a7486573f
RyanChris7/N-Body-Simulation-
119010507/sequential.cpp
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <chrono> #include <tuple> #ifdef GUI #include <GL/glut.h> #include <GL/gl.h> #include <GL/glu.h> #endif #include "./headers/physics.h" #include "./headers/logger.h" int n_body; int n_iteration; double totalTime; void generate_data(double *m, double *...
ALGO
0.999493
4.798329
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-06-24T15:49: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": "5fb03a2cfd57...
a8ff88e0-5ea6-4221-99e6-700991f2c416
ishandutta2007/codeforces-w
wenhao801/normal/1333/C.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <map> #include <vector> using namespace std; #define int long long inline int read () { int ret = 0, t = 1; char c = getchar(); while ((c < '0' || c > '9') && c != '-') c = getchar(); if (c == '-') t = -1, c = getchar...
ALGO
0.999825
3.672232
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:34: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": "f3ec212914d9...
0688c3e4-8d3e-443f-85bf-2f36f096a590
BelaPlatform/Bela
libraries/Fft/Fft.cpp
#include "Fft.h" unsigned int Fft::roundUpToPowerOfTwo(unsigned int n) { if(n <= 2) return 2; unsigned int highestBit = sizeof(n) * 8 - 1; while((1 << highestBit) >= n) --highestBit; if((1 << highestBit) == n) return n; return (1 << (highestBit + 1)); } bool Fft::isPowerOfTwo(unsigned int n) { if(!n) re...
ALGO
0.982673
5.599487
{ "github_metadata": { "branch": "master", "commit_count": 3376, "repo_created_at": "2016-06-22T14:43:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 511, "forks": 139, "issues": 189, "pull_requests": 37 }, "file_meta": { "content_id": "7...
21279ce7-8ae5-4ffd-a85a-fdad1f9ecdcb
TheDev05/LeetCode
Floyd Warshall - GFG/floyd-warshall.cpp
//{ Driver Code Starts //Initial template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution { public: void shortest_distance(vector<vector<int>>&num){ // Code here int n = num.size(); for (auto &i : num) { for (...
ALGO
0.999869
5.646743
{ "github_metadata": { "branch": "main", "commit_count": 2324, "repo_created_at": "2022-02-09T07:02: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": "ec923b9f3...
25244d87-2eec-43e7-994b-792d7ebcf332
beats2019/Enorme2
MainEnorme.cpp
#include "Enorme.h" #include <iostream> using namespace std; bool esIgualA( const int , const int ); bool noEsIgualA( const int , const int ); bool esMayorQue( const int , const int ); bool esMenorQue( const int , const int ); bool esMayorIgualQue( const int , const int ); bool esMenorIgualQue( const int , const...
TOOL
0.932085
4.041359
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-06-20T12:39: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": "8acb6ad0e2...
0bad321a-f9dd-4f21-93f5-f6f7a1af493d
linhanyu/ACM
DP/1114.cpp
// // Created by Henry on 16/7/21. // #include <algorithm> #include <iostream> #define INF 0x3f3f3f3f #define NUM 10011 using namespace std; int main(){ int t,n,c,w,room_begin,room_end; int dp[NUM]; scanf("%d",&t); while (t--){ cin>>room_begin>>room_end; room_end -= room_begin; ...
ALGO
0.999028
3.493489
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2016-02-20T14:41: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": "dc6845f33...
ebd57ab9-073d-4b0a-8c5b-3af0d6c2dbcf
TosakaUCW/CompetitiveProgramming
Old/Codeforces/Contests/[Codeforces 1603B] Moderate Modular Mode.cpp
#include <bits/stdc++.h> #define int long long #define fi first #define se second #define ins insert #define pb emplace_back #define flu fflush(stdout) #define pii std::pair<int, int> using std::vector; int read(int x = 0, bool f = 0, char ch = getchar()) { while (ch < 48 or ch > 57) f = ch == 45, ch = getc...
ALGO
0.999788
4.305087
{ "github_metadata": { "branch": "master", "commit_count": 506, "repo_created_at": "2018-09-23T04:02:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67c82637...
5013dab7-6d64-4e59-80c5-bff4f68a8840
thirofoo/atcoder-archives
abc365/abc365_b_56240598_AC.cpp
/* * Author: through * Submission URL: https://atcoder.jp/contests/abc365/submissions/56240598 * Submitted at: 2024-08-03 21:02:12 * Problem URL: https://atcoder.jp/contests/abc365/tasks/abc365_b * Result: AC * Execution Time: 1 ms */ #include <bits/stdc++.h> #include <atcoder/all> using namespace std; using na...
ALGO
0.999906
4.164486
{ "github_metadata": { "branch": "main", "commit_count": 5513, "repo_created_at": "2022-12-17T09:45:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "0cc5f5a16...
f5c2a2af-d390-4795-9150-946056afc3bb
nh0znoisung/Online_Judge-Competitive_Programming
CodeChef/Exun 2021-22/c.cpp
#include <bits/stdc++.h> #define for0(i, n) for (int i = 0; i < (int)(n); ++i) #define for1(i, n) for (int i = 1; i <= (int)(n); ++i #define forc(i, l, r) for (int i = (int)(l); i <= (int)(r); ++i) #define forr0(i, n) for (int i = (int)(n) - 1; i >= 0; --i) #define forr1(i, n) for (int i = (int)(n); i >= 1; --i) #defin...
ALGO
0.999942
3.969502
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2021-10-28T13:33: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": "7c044472bcc...
6b079f89-d332-4e76-bf75-3b16d12e88e8
f0r3v3ryung3/MIPT_algo_2024-2025
06_contest/A.cpp
#include <iostream> #include <vector> const int cInf = 1e9; using std::vector; int main() { int t; std::cin >> t; for (int i = 0; i < t; ++i) { int n; int m; std::cin >> n >> m; vector<vector<int>> dp = vector<vector<int>>(n, vector<int>(m, 0)); for (int j = 0; j < n; ++j) { dp[j][0]...
ALGO
0.999981
4.05881
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2025-07-08T11:47:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81cebde6161...
ebed3ba2-c1c6-4659-8638-0bc3c621eca9
wugouzi/cp
leetcode/54-SpirialMatrix.cpp
// // Created by wu on 2022/3/23. // #include "leetcode.h" vector<int> spiralOrder(vector<vector<int>>& matrix) { int m = matrix[0].size(), n = matrix.size(); int l = 0, r = m-1, t = 0, b = n-1; int s = 0; vector<int> ans(m*n); int k = m*n; int i = 0, j = 0; while (k) { if (s == 0 ...
ALGO
0.99999
6.843444
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2022-03-30T06:37: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": "5a51f598248...
32ef455e-193f-475f-9dc9-f805105bd7fe
hRJ06/DSA
Leetcode/3342. Find Minimum Time to Reach Last Room II.cpp
typedef pair<int, pair<bool, pair<int,int>>> p; class Solution { public: int minTimeToReach(vector<vector<int>>& moveTime) { int m = moveTime.size(), n = moveTime[0].size(); priority_queue<p, vector<p>, greater<p>> pq; /* {t, {i, j}} */ pq.push({0, {true, {0, 0}}}); vector<vector<boo...
ALGO
0.999985
5.463017
{ "github_metadata": { "branch": "main", "commit_count": 786, "repo_created_at": "2023-09-26T12:40: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": "d0ec0e0cac...
dd37e112-45b4-4792-9a42-48a8471472c3
MaleehahA02/Cpp_CS330
War.cpp
/* This code simulates a game of War between 2 players. In involves a 10 card deck with values between 2 and 11. Each round, the players play the top card of their hand and whoever has a higher value card wins the round and collects the played cards. The game ends when the losing player has no cards left in their han...
ALGO
0.999944
3.709353
{ "github_metadata": { "branch": "main", "commit_count": 102, "repo_created_at": "2023-09-15T00:08: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": "e38cb884e5...
7c58bb82-040a-4748-b8ec-f1f150a996f4
kma-storage/CTDLGT
05.SapXepNoiBot.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> using namespace std; #defin...
ALGO
0.99999
3.830457
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-07-13T04:19:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15d7802775bc9...
104eec4e-cb4f-4240-9df3-6c05ef1a60b9
bamboohiko/problemSolve
hdoj/c20160918/p7.cpp
#include<iostream> #include<cstdio> #include<map> #include<set> #include<vector> #include<stack> #include<queue> #include<string> #include<cstring> #include<sstream> #include<algorithm> #include<cmath> #define INF 0x3f3f3f3f #define eps 1e-8 #define pi acos(-1.0) using namespace std; typedef unsigned long long LL; LL f...
ALGO
0.998293
3.866969
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2015-12-13T17:03: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": "f83a531ee...
e659a908-8a2c-47fd-b97c-5bd89e2d73cb
ShehrozIrfan/learn-dsa
C++/9-Heaps/Max Heap.cpp
#include<iostream> using namespace std; //Maximum size of Heap. #define MAX 100 void insertHeap(int A[], int n, int key); void insertHeapify(int A[], int n, int i); void deleteRoot(int A[], int n); void deleteHeapify(int A[], int n, int i); void swap(int *a,int *b); int main() { int arr[MAX]={10, 5, 3,...
ALGO
0.999941
4.029613
{ "github_metadata": { "branch": "master", "commit_count": 176, "repo_created_at": "2022-12-07T17:59:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 20, "issues": 4, "pull_requests": 2 }, "file_meta": { "content_id": "efa469...
f30c6758-ffa0-4687-84d6-dc11ebd3c557
finalburnneo/FBNeo
src/burn/devices/epic12pixel.inc
/* This is the inner-most loop code (per-pixel) and thus the most performance sensitive part */ #if FLIPX == 1 #define LOOP_INCREMENTS \ bmp++; \ gfx2--; #else #define LOOP_INCREMENTS \ bmp++; \ gfx2++; #endif /*************** REALLY SIMPLE INNER LOOP, NON-BLENDED, NON-TINTED, SIMPLEST CASE **********...
ALGO
0.984519
3.04811
{ "github_metadata": { "branch": "master", "commit_count": 14802, "repo_created_at": "2019-04-29T12:25:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1135, "forks": 399, "issues": 70, "pull_requests": 0 }, "file_meta": { "content_id": "6...
eefca666-5912-4093-b0e8-71e6bb5cf7e7
Kingcitaldo125/Sorts
sorts/bead_sort/main.cpp
#include <algorithm> #include <iostream> #include <vector> #include "SortUtils.hpp" void bead_sort(std::vector<int>::iterator begin, std::vector<int>::iterator end) { auto m_size = *std::max_element(begin, end); std::vector<int> mints(m_size, 0); for (auto j = begin; j != end; ++j) { auto nu...
ALGO
0.999956
5.935925
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2021-11-24T01:46:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "655fe815d63...
d3425078-fcc0-480b-867a-05c195cb6c4e
Haricharan1212/CP
oldcode/1732D1.cpp
// Haricharan #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; #define fio ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); typedef long long ll; // For ordered Tree #incl...
ALGO
0.999961
5.090646
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2022-10-13T03:47:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27af55ed8...
f3899347-386c-435e-b69e-e6a06960714a
libcy/acoustic1d
forward.h
#pragma once #include "const.h" #include "cg.h" using namespace std; void forward(double *c, fwdpar par) { if (par.type) { for (int i = 0; i < nt; i++) { for (int j = 0; j < nx; j++) { int ij = i*nx + j; double tt = (double)(i + 1)*dt - t0; if (j == par.ns) { par.src[ij] = (1 - 2 * tt*tt*PI*PI...
ALGO
0.999964
4.463442
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-10-20T07:32:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f12cee8788...
af1c0e22-ffcc-4088-8b13-a6ee79737813
psh4204/coding_test
10WCT/2week/2-B.cpp
/* https://www.acmicpc.net/problem/1012 유기농 배추 유기농배추를 위한 배추흰지렁이 마리수를 구해보자. 배추밭에 배추의 컴포넌트 수 구하기. Input - 입력 첫줄엔 TestCase T (T 만큼 좌표를 줄 거임.) - 배추밭 가로M, 세로N, 배추수K (M,N: 1~50, K: 1~2500) - 배추위치 X(0~M-1), Y(0~N-1) (배추의 위치가 같은경우X) Output - 각 테스트케이스에 대한 최소의 배추흰지렁이 수를 출력한다. Try1. - 테스트..케이스? 무슨 테스트인데? 아~ 케이스를 두개준다 이말이구나. -...
ALGO
0.99986
5.26558
{ "github_metadata": { "branch": "master", "commit_count": 117, "repo_created_at": "2024-03-31T09:35:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "374856da...
26328b1d-aace-425d-a12a-265809c77b23
NalinDalal/Leetcode
c++/283.CntColourCell.cpp
/*2579. Count Total Number of Colored Cells Medium Topics Companies Hint There exists an infinitely large two-dimensional grid of uncolored unit cells. You are given a positive integer n, indicating that you must do the following routine for n minutes: At the first minute, color any arbitrary unit cell blue. Every min...
ALGO
0.999925
5.928441
{ "github_metadata": { "branch": "main", "commit_count": 395, "repo_created_at": "2024-03-19T02:48:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa0e5197c8...
c12df8e7-cb0f-4f02-8d74-9283d2f7bc38
Zeyad2003/LeetCode
Hard/502. IPO/Solution.cpp
class Solution { public: int findMaximizedCapital(int k, int w, vector<int>& profits, vector<int>& capital) { int n = (int) profits.size(); vector<pair<int, int> > v(n); // <capital, profit> priority_queue<int> pq; for (int i = 0; i < n; ++i) v[i] = {capital[i], profits...
ALGO
0.999998
5.354565
{ "github_metadata": { "branch": "master", "commit_count": 171, "repo_created_at": "2023-03-01T07:30: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": "500652cd...
b79fcea5-ac8b-4c7b-a581-159e3a112a5c
DiegoBorsoi/advent-of-code
2024/Day16/Day16.cpp
// Day16.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <fstream> #include <string> #include <vector> #include <algorithm> #include <unordered_map> #include <unordered_set> #include <regex> #include <queue> #include <list> #include <stack> using...
ALGO
0.999923
4.773033
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2024-12-09T15:27:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d12a9f1b02...
5ade6647-7e55-4077-89c9-e847183beca8
f4nyc/dalyoj
UVa/UVa814.cpp
#include<iostream> #include <map> #include <set> #include <vector> #include <string> using namespace std; using SendList = vector< map<string, vector<string> > >; void PraseAddress(const string &addr, string & mta){ int index = addr.find("@"); mta = addr.substr(index+1); } int main(){ set<string> address; ...
WEB
0.992587
3.591354
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2018-04-19T14:08: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": "1d12c5d2e...
02e2691c-86dc-47c6-80ab-6fc57bf16375
ishandutta2007/codeforces-b
bmerry/normal/778/A.cpp
#include <bits/stdc++.h> #ifndef ONLINE_JUDGE # include <sys/time.h> # include <sys/resource.h> #endif /*** TEMPLATE CODE STARTS HERE ***/ using namespace std; typedef vector<string> vs; typedef long long ll; typedef complex<double> pnt; typedef vector<ll> vi; typedef pair<ll, ll> pii; #define RA(x) begin(x), end(x...
ALGO
0.99998
4.119519
{ "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": "ea5ec031fa79...
351b9422-2397-4924-8903-ca3fb39603ca
lilelr/LeecodeProblemsSolutionsByC-
sword_to_offer/binary_tree/convert.cpp
// // Created by YuXiao on 4/15/18. // #include <string> #include <iostream> #include <vector> #include <cstdio> #include <queue> #include <map> #include <algorithm> using namespace std; struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), ...
ALGO
0.999888
4.580759
{ "github_metadata": { "branch": "master", "commit_count": 167, "repo_created_at": "2016-03-26T08:36: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": "774c9c8d...
0a11cbfc-0a3b-4294-97ab-3d0a143d39cd
halalboro/fpga-accelerators
kria-vitis-platforms/kv260/overlays/Vitis_Libraries/vision/L3/examples/isp_multistream/xf_isp_tb.cpp
/* * Copyright 2022 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
ALGO
0.939424
5.22528
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2023-11-28T16:06:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebedfeec369...
031b3a2b-d4b9-4317-8d5f-cd66c9343752
meilaaryani1305/124240143-MeilaAryani-SI-H-LatResAlgoSi-
124240143-Meila_Putri_Aryani-SI-H-LatResAlgoSi .cpp
#include <iostream> #include <string> using namespace std; struct Book { string title; string author; int year; }; struct TreeNode { Book data; TreeNode *left; TreeNode *right; }; struct StackNode { Book data; string action; StackNode *next; }; TreeNode *root = nullptr; StackNode...
TOOL
0.991942
5.584178
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2025-05-29T18:15:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09c164cfd24f...
f2258bec-d4b7-4529-ad56-a4a03ccbb035
NursatSakyshev/ADS
c++/INFO/lab2/112510.cpp
#include<bits/stdc++.h> using namespace std; struct Node{ string word; int cnt; Node * next; Node(string word){ this -> word = word; cnt = 1; next = nullptr; } }; class LinkedList{ Node * head; public: LinkedList(){ head = nullptr; } void push(str...
ALGO
0.999966
4.071511
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2022-08-31T08:31: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": "4902eec927a...
de7b2719-029a-482b-9c2d-2e9332832018
ngthanhtrung23/CompetitiveProgramming
codeforces/297/E.cpp
#include <bits/stdc++.h> #define FOR(i,a,b) for(int i=(a),_b=(b); i<=_b; i++) #define FORD(i,a,b) for(int i=(a),_b=(b); i>=_b; i--) #define REP(i,a) for(int i=0,_a=(a); i<_a; i++) #define DEBUG(x) cout << #x << " = "; cout << x << endl; #define PR(a,n) cout << #a << " = "; FOR(_,1,n) cout << a[_] << ' '; cout << endl...
ALGO
0.999805
3.903675
{ "github_metadata": { "branch": "master", "commit_count": 4554, "repo_created_at": "2019-04-04T14:21:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 90, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11ffd...
2b0329e0-555c-45c2-b6fa-5d503896cdd1
raincross7/code-similarity
codes/train_code/problem446/problem446_432.cpp
#include <array> #include <vector> #include <deque> #include <queue> #include <set> #include <unordered_set> #include <map> #include <unordered_map> #include <string> #include <algorithm> #include <numeric> #include <functional> #include <iterator> #include <tuple> #include <utility> #include <limits> #include <iostrea...
ALGO
0.999943
3.877564
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07: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": "de46cff6f912...
e66af3f2-02fb-4005-9e72-9619cbbdc0ff
dklong-csu/mepbm
tests/sunmatrix03.cc
// A = 1,0;2,0. c = 3. // result = // 4, 0 // 6, 1 #include "src/create_sunmatrix.h" #include "eigen3/Eigen/Sparse" #include <iostream> using Matrix = Eigen::SparseMatrix<realtype>; int main () { SUNMatrix A = MEPBM::create_eigen_sunmatrix<Matrix>(2,2); auto A_matrix = static_cast<Matrix*>(A->content); A_matri...
ALGO
0.927562
4.304758
{ "github_metadata": { "branch": "main", "commit_count": 689, "repo_created_at": "2020-07-29T05:35:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb54a15e85...
cdec1735-6cd7-4c21-9e99-423dc80b17cc
shreyansh28801/StriverCpSheet
String/Z-function/q1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long int li; #define int long long int typedef long double ld; #define lb lower_bound #define ub upper_bound #define pub push_back #define pob pop_back typedef long double ld; int M = 1e9 + 7; /* const int N = 1e6+10 ; vector<ll> A(N) ; */...
ALGO
0.999928
4.568151
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2022-06-28T17:38:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0721cc011...
4e1396c4-3975-436a-a7c1-469cf59172e2
INDA23PlusPlus/redkar-greedy
restaurantorders.cpp
#include "bits/stdc++.h" #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; /* typedef tree<int,null_type,less<int>,rb_tree_tag, tree_order_statistics_node_update> indexed_set; */ #define el "\n" #define faster ios_base::sync_with_stdio(0); cin.tie(0); #defi...
ALGO
0.999857
3.413499
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-12-04T21:10:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba88b2a4b868a...
d514fbe9-31d3-4ac8-a26c-d2080635fde2
preetcoder12/DSA-Mastery
ARRAY/2D array/Set_Matrix_Zeros.cpp
#include <bits/stdc++.h> using namespace std; void setZeros(vector<vector<int>> &matrix) { int n = matrix.size(); int m = matrix[0].size(); vector<int> row(n, 0); // contain oly one row in 1d vector<int> col(m, 0); // contain oly one col in 1d for (int i = 0; i < n; i++) { for (int j ...
ALGO
0.999555
5.554327
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-02-05T19:19: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": "de748f12920d...
b9f8b4af-9efe-479b-9afd-5e2fe5cf7d85
Daniel-Sameh/DataStructures
StackBigInt.cpp
//By <NAME> //May 2024 #include <bits/stdc++.h> #include <utility> using namespace std; /* * I made this code just to try * the stack in adding big integers */ class BigInt{ private: string num; stack<char>x,y,s; public: explicit BigInt(string n):num(std::move(n)){ for(auto i:num) x.p...
ALGO
0.999694
5.39255
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-05-30T20:13: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": "c18d1d32b208...
4b21a2f8-b56a-4862-94c4-b36a161261a7
trilinos/Trilinos
packages/rol/src/step/trustregion/ROL_TruncatedCG.hpp
// @HEADER // ***************************************************************************** // Rapid Optimization Library (ROL) Package // // Copyright 2014 NTESS and the ROL contributors. // SPDX-License-Identifier: BSD-3-Clause // *************************************************************************...
ALGO
0.994914
6.972654
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
ad4fce0a-1bfd-4831-ba40-34b372ffde96
sbrus1213/Problem-Solving
BOJ_code/1600/A1672_S.cpp
// BOJ 1672 DNA 해독 // stack #include <iostream> #include <stack> using namespace std; char dec(char a, char b) { if (a == 'A') { if (b == 'A' || b == 'C') return 'A'; if (b == 'G') return 'C'; if (b == 'T') return 'G'; } else if (a == 'G') { if (b == 'A') return 'C'; if (b == 'G') return b; if (b == 'C...
ALGO
0.999969
4.30793
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2019-08-04T07:50: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": "8d6e1e4b8...
2d22e528-78c0-4f65-a713-9223dae46812
Saikat-S/acm-problems-solutions
Codechef/Codechef_AC/Ancient Berland Roads.cpp
/*************************************************** * Problem Name : Ancient Berland Roads.cpp * Problem Link : https://www.codechef.com/problems/ABROADS * OJ : Codechef * Verdict : AC * Date : 2018-05-31 * Problem Type : Data Stucture (DSU) * Author Name : <NAME> * University : CSE, ...
ALGO
0.999955
3.897912
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2018-05-10T18:16:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8a20e64bd...
f3801940-0cdf-4126-8de5-c5dd17a820db
Leezed525/learning-algorithm
test/leetcode/editor/cn/[404]左叶子之和.cpp
//给定二叉树的根节点 root ,返回所有左叶子之和。 // // // // 示例 1: // // // // //输入: root = [3,9,20,null,null,15,7] //输出: 24 //解释: 在这个二叉树中,有两个左叶子,分别是 9 和 15,所以返回 24 // // // 示例 2: // // //输入: root = [1] //输出: 0 // // // // // 提示: // // // 节点数在 [1, 1000] 范围内 // -1000 <= Node.val <= 1000 // // // // // Related Topics 树 深度优...
ALGO
0.999973
6.178041
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2022-04-07T03:12: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": "fc8ad392...
9b5526c3-8621-4a50-82e5-5ffa10ace200
etrisk8967/ILOSS
include/physics/forces/propulsion/ThrustVectorControl.h
#pragma once #include "core/math/Vector3D.h" #include "core/math/Matrix3D.h" #include <string> #include <memory> #include <cmath> namespace iloss { namespace physics { namespace propulsion { /** * @brief Models thrust vector control (TVC) system for engine gimbaling * * This class handles the transformation of t...
ALGO
0.97196
7.664368
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-06-28T03:25:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "bc9e3c8b0504...
64badb39-4860-4215-bcb5-61a30c58f901
rdmpage/mincut-supertree
TreeLib/ntree.h
//$Id: ntree.h,v 1.5 2001/07/23 13:47:55 rdmp1c Exp $ #ifndef NTREEH #define NTREEH #include "TreeLib.h" #include "gtree.h" #include <set> #include <map> /** *@typedef std::set <int, std::less<int> > IntegerSet; */ typedef std::set <int, std::less<int> > IntegerSet; class NTree; /** * @class NNode * A node ...
ALGO
0.975213
6.259779
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2013-01-18T16:53:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "127f9205c0...
eb5b0758-5816-47f4-986a-c4cbd37ae75f
trilinos/Trilinos
packages/ml/src/Utils/ml_MultiLevelPreconditioner_NullSpace.cpp
/* * Methods to set and/or compute the null space. * * \author <NAME>, SNL 9214 * * \date Last updated on 19-Jan-05 */ /* ******************************************************************** */ /* See the file COPYRIGHT for a complete copyright notice, contact */ /* person and disclaimer. ...
ALGO
0.996282
5.07389
{ "github_metadata": { "branch": "master", "commit_count": 104031, "repo_created_at": "2015-11-16T19:39:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1299, "forks": 593, "issues": 263, "pull_requests": 61 }, "file_meta": { "content_id":...
12034d7b-1e91-4476-8d25-789e02a3535f
Onesphore/synchronization-hwk
dining-philosophers/dining-philosophers-extra.cpp
#include <stdio.h> #include <pthread.h> #include <assert.h> #include <unistd.h> #include <stdlib.h> #include <signal.h> #include <iostream> #include <string> #define ERROR(msg) \ do { \ perror(msg); \ exit(EXIT_FAILURE); \ } while(0) \ #define tableState_...
ALGO
0.993338
4.2964
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-06-21T06:34: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": "efae33e678...
963c4c65-5574-487b-a409-1dcbd706fb82
0suddenly0/nullptr-recode
nullptr-recode/helpers/config_sys/config_sys.h
#pragma once #include "../math/math.h" #include "../../utils/utils.h" #include "../input.h" #include "../../settings/settings.h" #include <string> #include <vector> namespace config { enum class var_t { _int = 0, _float = 1, _bool = 2, _string = 3, _color = 4, _bind ...
CONFIG
0.94331
5.019906
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-06-09T17:07:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eb1fffcb9...