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
f22ed62c-8ca6-44ed-9fd6-342d4467f95b
jjpulidos/Competitive-Programming
UVa/Competitive Programming 3/Introduction/Getting Started The Easy Problems/Medium/119 - Greedy Gift Givers/main.cpp
/** * 119 - Greedy Gift Givers * Created by <NAME> on 6/07/2018 */ #include <bits/stdc++.h> using namespace std; typedef long long ll; const int INF = (int)1e9; int main() { int people_num; if(scanf("%d",&people_num)==EOF)return 0; while(true) { cin.ignore(); map<string,int> gifti; ...
ALGO
0.997661
3.495252
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-07-03T04:46: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": "a4fa026cfd...
80f6fadb-8fa1-4463-82ac-bba2d3289713
coderaviverma/Interview-Preparation-Package
src/codingsites/leetcode/0329.Longest Increasing Path in a Matrix/Solution.cpp
class Solution { private: int Dfs(vector<vector<int>> &m, vector<vector<int>> &v, int i, int j, bool first, int lastNum) { if (i < 0 || i >= m.size() || j < 0 || j >= m[0].size()) return 0 ; if (!first && lastNum >= m[i][j]) ...
ALGO
0.999997
5.940316
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-01-13T18:05:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "551d373c17c...
261818cd-f6b7-44f0-bb43-bed1a785f24f
Debraj-Das/DSA
Topic/math/Good Number.cpp
/* "You cannot believe in God until you believe in yourself." by <NAME> */ #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <bits/stdc++.h> using namespace std; using ...
ALGO
0.999946
4.641617
{ "github_metadata": { "branch": "master", "commit_count": 246, "repo_created_at": "2022-12-27T18:27:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "245cbb4...
9120c963-5d1f-4ffd-acad-54a4ca435dba
realAYAYA/UnrealEngine-ToonLit
UnrealEngine/Engine/Plugins/Experimental/GPULightmass/Source/GPULightmass/Private/LightmapDenoising.h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "LightmapEncoding.h" #ifndef WITH_INTELOIDN #define WITH_INTELOIDN 0 #endif #if WITH_INTELOIDN #include "OpenImageDenoise/oidn.hpp" #endif // TBB suffers from extreme fragmentation problem in editor #include "Runtime/Core/Private/HAL/Allocat...
TOOL
0.933292
6.720982
{ "github_metadata": { "branch": "5.4", "commit_count": 164, "repo_created_at": "2023-03-14T06:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 66, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f5e5c5bb22...
09d988d0-c531-4949-8d1f-78755fb02abf
Bosh-Kuo/LeetCode
solutions/678. Valid Parenthesis String/678.cpp
/* time complexity: O(n) tags: String, Dynamic Programming, Stack, Greedy note: * 的為萬能符號的作用,可以用於抵銷 ( or ) 也可以代表無意義的 "" 1. 使用兩個 stack 儲存 ( 與 * 以及他們所在的 index。首先遍歷 s,優先以 ( 抵銷 ),若最終尚有未抵銷的 ) 直接回傳 false 2. 抵銷完 ) 後剩下 ( 或 *,若 ( 總數大於 * 直接回傳 false 3. 遍歷 * stack,並且確保 * 在 ( 後面才能抵銷 4. 若 * ( 抵銷完後還剩餘 ( 則回傳 false */ class Solution { ...
ALGO
0.999068
5.326257
{ "github_metadata": { "branch": "master", "commit_count": 272, "repo_created_at": "2022-03-18T01:43: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": "9e7f4d46...
06bc038e-3e22-412d-83f9-fc6f6d885c48
HK9750/DSA-Problems
Matrix/String_To_Integer(Atoi).cpp
// Leetcode 8. String to Integer (atoi) // It has the most annoying test cases I have ever seen and the person who wrote these test cases should be fired. class Solution { public: int myAtoi(string s) { int n = s.size(); int i = 0; int sign = 1; while (i < n && s[i] == ' ') ...
ALGO
0.998958
5.302081
{ "github_metadata": { "branch": "main", "commit_count": 246, "repo_created_at": "2024-09-08T16:23: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": "670fabe6ed...
96c19af3-6236-48fe-b310-7fb6decb02aa
XIONG-ZHIPeng/cpp
code/cppprimeplus/ch15/error1/error1.cpp
//error1.cpp -- using the abort() function #include <iostream> #include <cstdlib> // for abort() double hmean(double a, double b); int main() { using namespace std; double x, y, z; cout << "Enter two numbers: "; while (cin >> x >> y) { z = hmean(x, y); cout << "Harmonic mean of " <<...
ALGO
0.920456
3.882251
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2025-03-07T12:48: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": "296c2a9445c...
cc9a06d8-a7c2-4a37-8399-62e3395f6ebe
saraycanarteg/Estructura-de-Datos
TrabajosGrupales/hashString/main.cpp
#include "OpenHashing.h" #include <iostream> #include <vector> #include <algorithm> #include <graphics.h> #include <string> using namespace std; int main() { closegraph(); initwindow(1200, 800, "Open Hashing with Strings"); OpenHashing hashTable(13); vector<string> data; string input; ...
ALGO
0.99619
4.870071
{ "github_metadata": { "branch": "main", "commit_count": 153, "repo_created_at": "2024-11-08T15:16:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23efae7b2e...
aff4d2b6-1a45-4a5b-bf55-b40b2fa3ca80
aig-upf/fs
src/asp/models/simple_model.cxx
#include <asp/models/simple_model.hxx> #include <asp/models/helper.hxx> #include <asp/lp_handler.hxx> #include <problem.hxx> #include <state.hxx> #include <actions/actions.hxx> #include <utils/printers/helper.hxx> #include <utils/printers/actions.hxx> #include <languages/fstrips/formulae.hxx> namespace fs0 { namespac...
ALGO
0.982674
6.606853
{ "github_metadata": { "branch": "master", "commit_count": 607, "repo_created_at": "2016-04-25T06:54:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3e2297e71...
32194e8b-4882-4cb7-9346-10d4e3c10434
LuoHou99/ACM_Solution
kuangbin专题7_线段树/HDU1255_覆盖的面积.cpp
#include <cstdio> #include <algorithm> using namespace std; const int maxn = 2000+5; struct Line{ double x,y1,y2; int f; bool operator <(const Line &rhs) const { return x<rhs.x; } }line[maxn]; double y[maxn]; int tot,n; inline void add_Line(double x,double y1,double y2,int f){ tot++; line[t...
ALGO
0.999252
3.525124
{ "github_metadata": { "branch": "master", "commit_count": 270, "repo_created_at": "2018-01-28T02:38:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b90d89bb...
4d66d1b4-5158-4634-9dcc-ef445f90c673
moaiweishui/pat
1053. Path of Equal Weight/src.cpp
#define _CRT_SECURE_NO_DEPRECATE #include <stdio.h> #include <iostream> #include <algorithm> #include <functional> #include <math.h> #include <limits.h> #include <float.h> #include <sstream> #include <string> #include <vector> #include <map> #include <set> #include <queue> #include <stack> #include <unordered_set> #in...
ALGO
0.999992
3.449326
{ "github_metadata": { "branch": "master", "commit_count": 198, "repo_created_at": "2017-08-22T02:26: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": "2838c3b3...
3b2ef053-7bb5-4230-bcf2-28ca3aebf529
plenilune3/problem_solving_cpp
beakjoon/BaaaaaaaarkingDog/Sweeping/15922_아우으 우아으이야!!.cpp
#include <iostream> using namespace std; struct line { int left, right; line() : left(0), right(0) {}; line(int _left, int _right) : left(_left), right(_right) {}; }; const int MAX = 1e5 + 1; int N; line L[MAX]; int main(int argc, char const *argv[]) { ios_base::sync_with_stdio(false); cin.tie...
ALGO
0.999909
4.203486
{ "github_metadata": { "branch": "master", "commit_count": 710, "repo_created_at": "2020-04-06T05:39: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": "8fae3d79...
be27a959-30b6-4959-9258-86bbb9d17fc0
ShariqNaeem/Solved-Debugging-Questions
Error Free Programs/main16.cpp
#include <iostream> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ using namespace std; int main() { double number = 0, answer = 1; int power = 0, count = 0; cout << "Please enter a number: "; cin >> number; cout << "To wha...
ALGO
0.998344
4.956498
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-04-15T22:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9803619a89...
cdad2dd1-1623-4e52-a158-3ff7d2b4f630
Ninj4M4ster/Wroclaw-University-of-Science
Coding_and_data_compression/list1/main.cpp
#include <iostream> #include <fstream> #include <unordered_map> #include <math.h> long long int sumAllValues(std::unordered_map<char, long long int> & map) { long long int result = 0; auto iter = map.begin(); while(iter != map.end()) { result += iter->second; iter++; } return result; } int main(int ...
ALGO
0.998684
4.150985
{ "github_metadata": { "branch": "main", "commit_count": 285, "repo_created_at": "2021-10-06T10:47: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": "24cd21ab77...
8b2f6b36-9e10-4497-8558-2af7f5b01121
Ammar-jamil/Election-System
my_code.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; int MAX_CANDIDATES =100; class Candidate { private: string name; string party; int votes; public: Candidate() : name(""), party(""), votes(0) {} Candidate(string n, string p) : name(n), party(p), votes(0) {} string ...
TOOL
0.914765
6.043222
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2025-04-27T17:25: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": "fc39dbdc05...
7d62c85c-fd04-4b1f-ab2b-a3131a2a3711
ishandutta2007/codeforces-b
bluediamond/normal/1407/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int N = 500000 + 7; const int INF = (int) 1e9 + 7; int n; int m; int dist[N]; int tp[N]; vector<pair<int, int>> g[N]; vector<pair<int, int>> g_inv[N]; int main() { ios::sync_with_stdio(0); cin.tie(0); cin ...
ALGO
0.999984
4.112571
{ "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": "d8075b8b5f11...
83c6d395-c8d7-4f8a-a588-6597d55e0d74
Nashitaz13/learn-uit-code
Baihoc/To hop chap k cua n.cpp
#include<bits/stdc++.h> using namespace std; #define ms(s, n) memset(s,n,sizeof(s)) #define all(a) a.begin(), a.end() #define present(t, x) (t.find(x) != t.end()) #define sz(a) int((a).size()) #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FORd(i, a, b) for (int i = (a) - 1, i >= (b); --i) #define pb pus...
ALGO
0.999979
4.761559
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-04-21T07:29:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3a1718a21af...
818b9f76-4563-4fe0-a525-1241e9380061
steven-chg/Competitive-Programming
week1/IO/end-markers.cpp
#include <bits/stdc++.h> using namespace std; /* End Markers Today we are going to add up a bunch of numbers and then subtract a bunch of numbers from it. All you have to do is read them all in! Input: Each test case starts with a line containing two numbers 0≤𝑇𝑎≤100 and 0≤𝑇𝑠≤100, the number of items to add and ...
ALGO
0.99964
4.272588
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2024-01-29T08: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": "44b4d62f6a7...
c9215c7c-1c79-4e67-8bb8-f5fe9f231dab
Another-Ghost/AlgoTest
Graph/GraphMain.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; typedef pair<int, int> Edge; int findCheapestPrice(int n, vector<vector<int>>& flights, int src, int dst, int K) { vector<vector<Edge>> g(n); for (const auto& f : flights) g[f[0]].emplace_back(f[2], f[1]); vector<int> dist(n, INT_MAX /...
ALGO
0.999827
4.554047
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2021-03-27T22:54: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": "08a40cef1...
413c139b-8d29-4dcc-ab62-37e155848937
JiaweiHH/Algorithm
链表/加法/445 两数相加II.cc
#include <stack> using namespace std; // Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; /// @brief 给你两个非空链表表示两个非负整数,数字的最高位位于链表开始的位置, /// ...
ALGO
0.999914
6.06499
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2021-12-13T05:47:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ec466c9a...
e76e8b18-a161-443a-85a4-92db32436e42
fredwhite/Backup
10987.cpp
#include<stdio.h> #include<stdlib.h> #include<vector> #include<algorithm> using namespace std; struct edge{ int ia; int ib; int l; }; struct node{ int idx; int cost; }; int n; vector<edge> e; vector<int> gra[105]; vector<int> cgra[105]; vector<edge> o; char lmap[105]; int cmap[105]; bool cmp(ed...
ALGO
0.997873
3.276682
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2011-09-13T15:15:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea5702897e...
dfbcee80-e24e-4112-96e7-7c35bcd7c8f9
wol101/useful_tools
bipedalism/Simulation_180401/trajectory_directed/Util.h
#ifndef __UTIL_H__ #define __UTIL_H__ #include <math.h> #define square(a) ((a) * (a)) class Util { public: // INVERSION OF A MATRIX WITH GAUSS-JORDAN'S METHOD // modified from Numerical Recipes and fixed at 3 by 3 // returns 0 if successful static int Gaussj3x3(double a[3][3]); // calculate cross produ...
TOOL
0.985217
4.561089
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-06-15T09:49:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48c066cf8d3a...
b776896a-b954-42e3-875a-5872eaf87772
AliakseiSuvorau/Algotithm-and-data-structures
MST/main.cpp
#include <iostream> #include <vector> #include <algorithm> //////////////////////////////////////////////////////////////////////////////// /// Minimum span tree /// //////////////////////////////////////////////////////////////////////////////// template <typena...
ALGO
0.999985
5.100946
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2022-12-31T18:21: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": "a8d1f3c54...
c8b3d07d-4e62-484c-acc8-19cca410b64c
Ouadio/Parallel-Lattice-Boltzmann-SYCL
src/lbm/LBMSolver.h
#ifndef LBM_SOLVER_H #define LBM_SOLVER_H #include "real_type.h" #include "LBMParams.h" #include "lbmFlowUtils.h" #include <CL/sycl.hpp> using namespace cl; // PROFILING UTILITIES #ifdef PROFILE #define COMPUTE_ELAPSED_TIME(name, increment, elapsedTimeMap) \ computeElapsedTime(name##_ev, elapsedTimeMap[std::string...
ALGO
0.996967
5.81373
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-08-22T15:14:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "596e86c643...
c8a01d5b-85c9-46c0-9ec4-766d4a47758a
adityabelgaonkar05/CompProgLog
C_Remove_the_Ends.cpp
#include <bits/stdc++.h> #define int long long #define endl '\n' #define ab adityabelgaonkar using namespace std; int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--) { int n; cin >> n; vector<int> a(n); for (auto &i : a...
ALGO
0.999974
5.169154
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2024-02-09T03:51: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": "e4b1a2ec9b7...
7e0090d3-6562-432d-aa93-277f6a1ccced
mbamarante/itsumo
itsumo/src/trafficAgents/opportune/rewardRecord.h
/************************************************************************ rewardRecord.h.h - Copyright denise Here you can write a license for your code, some comments or any other information you want to have in your generated code. To to this simply configure the "headings" directory in uml t...
TOOL
0.947733
5.674178
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2011-10-12T18:37:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dcd0b2924e...
1b086483-7abc-4dfb-abfe-4872f4354903
k8440009/Algorithm
SWEA/5653_1_1.cpp
// 5653. [모의 SW 역량테스트] 줄기세포배양 (시간초과) #include <iostream> #include <vector> using namespace std; const int MAX_SIZE = 352; const int dr[] = {1,-1,0,0}; const int dc[] = {0,0,1,-1}; // state : 0 (없음), state : 1 (비활성화), state : 2 (활성화), state: 3 (사망) struct CELL { int state, life, time; }; int N,M,K, answer; CELL ...
ALGO
0.999889
4.368815
{ "github_metadata": { "branch": "master", "commit_count": 762, "repo_created_at": "2019-08-04T15:03:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 12, "pull_requests": 0 }, "file_meta": { "content_id": "06d69ed...
046f72ec-39b8-4d47-8982-98cda7511cbf
RoxanaGhenea/arhiva-educationala-ia
dynamic-programming/rucsac.cpp
//https://www.infoarena.ro/problema/rucsac #include <fstream> using namespace std; int weight[10005]; int profit[10005]; long long tableValues[5][10005]; int main() { ifstream fin("rucsac.in"); ofstream fout("rucsac.out"); int object, maxWeight; long long ans = -100000; fin >> object >> maxWeig...
ALGO
0.999993
4.204584
{ "github_metadata": { "branch": "master", "commit_count": 150, "repo_created_at": "2022-12-03T20:27:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "4f4944e0...
dc029fda-793f-4a9c-9d24-cee3f7445849
MGhimiray/Monte-Carlo
code/integration2d.cc
#include <iostream> #include <cmath> #include <random> using namespace std; int n=10000; double x[10000],y[10000]; int a=3456; int b=2899; int r=678935; double f(double x, double y){ return x*y; } double random(double iseed){ iseed = fmod(a + b * iseed, r); ...
ALGO
0.99335
3.541483
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-06-26T05:35: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": "cce7b68ca4cb...
0eef682f-f206-49b9-8c1c-01e4fa41817b
A5hi5hKujur/Competitive-Programming-MNNIT
Dynamic_Programming/largest_common_subsequence/3_scs.cpp
/* ----------------------------- Problem Statement ------------------------------ Given 2 strings, find the shortest common supersequece containing, charecters from both string in the same subsequence. Example : string 1 : geeksforgeek Largest common supersequece : geeksforgeekforgot : 18. string 2 : ...
ALGO
0.999743
4.857778
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2020-02-22T17:03:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9eaec65f3...
5a7b0953-d451-486c-8d89-77044d37cc1a
ishandutta2007/codeforces-y
yz6205/normal/932/D.cpp
/* oooo$$$$$$$$$$$$oooo oo$$$$$$$$$$$$$$$$$$$$$$$$o oo$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$o o$ $$ o$ o $ oo o$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$o $$ $$ $$o$ oo $ $ "$ o$$$$$$$$$ $$$$$$$$$$$$$ $$$$$$$...
ALGO
0.999411
4.481625
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:40: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": "15da5f83e8b7...
afbb9eea-9956-43bd-860e-2a16430c6db4
npnkhoi/Competitive-programming
Kickstart/Building Palindromes/sol.cpp
#include <bits/stdc++.h> using namespace std; #define X first #define Y second #define mp make_pair #define REP(i,n) for (int i = 0; i < (n); ++ i) #define FOR(i,a,b) for (int i = (a); i <= (b); ++ i) #define FORD(i,b,a) for (int i = (b); i >= (a); -- i) #define debug(x) cerr << #x << ": " << x << "\n" #define all(x) x...
ALGO
0.999495
3.424156
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-04-01T03:31:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b84a6413e...
b3990212-4b4c-4b20-93e2-0cd13abad0d8
kabuto64425/Atcoder
ABC/ABC201_300/ABC207/C.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; typedef long long ll; #define REP(i,n) for(ll i=0;i<ll(n);i++) #define REPD(i,n) for(ll i=n-1;i>=0;i--) #define FOR(i,a,b) for(ll i=a;i<=ll(b);i++) #define FORD(i,a,b) for(ll i=a;i>=ll(b);i--) const long long INF = 1LL << 60...
ALGO
0.999883
4.514544
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-08-15T12:50: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": "6ea1fa0e7e75...
2b4ea653-a06f-4271-9816-c63cb08d5195
NishantSinghal19/Nishant-CPPlus
450DSA/minimizetheheights.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: int getMinDiff(int a[], int n, int k) { int i=0;sort(a,a+n); int ans=a[n-1]-a[0]; int maxH,minH; for(...
ALGO
0.999884
5.872727
{ "github_metadata": { "branch": "main", "commit_count": 107, "repo_created_at": "2021-09-13T17:28:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c21a973479...
7ee0a98b-21ec-40d0-b754-eadd6e16ad40
andrewpak582/Data-Structures-CPP
library/binaryHeap-private-inl.h
/* expandCapacity - expands capacity when capacity of Binary Heap has been * filled. */ template <typename P, typename V> void BinaryHeap<P,V>::expandCapacity() { int newCapacity = 2*capacity; Pair <P, V> *newItems = new Pair<P, V> [newCapacity]; for (int i=0; i<size; i++) { newItems[i] = items[i]; } de...
ALGO
0.999658
5.90141
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-02-27T18:06: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": "11042fd13f...
dd46483b-46ea-4f61-98eb-c0fb70a1c1e1
ShujiaHuang/Cpp-Primer-Plus-6th
bookcodes/chapter05/nestedcl.cpp
// nested.cpp -- nested loops and 2-D array #include <iostream> #include <string> #include <array> const int Cities = 5; const int Years = 4; int main() { using namespace std; const string cities[Cities] = // array of pointers { // to 5 strings "Gribble City", ...
TOOL
0.994574
4.041679
{ "github_metadata": { "branch": "main", "commit_count": 83, "repo_created_at": "2021-07-15T08:44:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2796, "forks": 576, "issues": 9, "pull_requests": 2 }, "file_meta": { "content_id": "31c47a...
25395e56-36c7-4cd1-a256-01ea6d4adbd9
Bungmint/competitiveprogramming
contest/spoj/LCASQ.cpp
//#pragma GCC optimize("O3") //#pragma GCC target("sse4") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_...
ALGO
0.99999
5.194988
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2021-02-28T11:36: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": "2c03c676c...
1197c3ba-1ca6-4de6-86e4-5ff08dd4257a
cms-externals/blackhat
src/Interface/BH_Ampl_2q4g2l.cpp
/* * matrix elements for lm lbp -> 2q2g * * Created on: Oct 21, 2008 * */ #include "scheme.h" #include "assembly.h" #include "BH_Ampl_processes.h" #include "BH_interface_impl.h" #include "cached_OLHA.h" #define _VERBOSE 0 // various switches: photonZW: 0 for photon // 1 for photon+Z // 2 for Z->n...
ALGO
0.994354
3.261357
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2014-07-24T12:51:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc7050d3752...
41fdfbf4-6025-486e-af68-2d6812900248
evga7/Algorithm-practice
백준/Gold/1516. 게임 개발/게임 개발.cc
#include <bits/stdc++.h> #define MAX 2147483647 #define MIN -2147483648 using namespace std; typedef long long int ll; typedef pair<int, int> pi; typedef pair<int, string> pi3; typedef pair<int, pair<int, int>>pi2; typedef vector<vector<int>> vpi; typedef vector<int> vec; typedef vector<pi> vec2; typedef queue<pi> que;...
ALGO
0.999947
3.899044
{ "github_metadata": { "branch": "main", "commit_count": 2134, "repo_created_at": "2023-03-18T00:42: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": "2c87334a4...
0a969e62-a32e-4216-b795-cbfd4ee64751
rambabu-patidar/CPP-Programs
C++ Programs/Vectors/vector-in-function.cpp
#include<iostream> #include<vector> using namespace std; // in first one the copy of the vector is gets sotred and no changes can be // reflect in the main function , indirectly i mean it is only local to that //function only // void increaseElement(vector<int> v){ // v.push_back(100); // } // by using this wh...
ALGO
0.980194
4.391146
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-04-02T12:51: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": "7b3c57f252e...
36c1f51f-2829-4a8a-bce4-4bd8218e53cf
hccz12/datastructure
第10周/冒泡、希尔.cpp
#include <iostream> using namespace std; template<class T> void swap(T data[], int i, int j) { T temp = data[i]; data[i] = data[j]; data[j] = temp; } template<class T> class MPsort { public: void sort(T data[],int n) { for (int i = 0; i <= n - 1;i++) { int t = 1; for (int j = i; j<n-i-1; j++) if (data[j...
ALGO
0.999966
4.39255
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2022-08-14T05:04: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": "3cf7ba9d948...
3550b710-91d3-487f-9f2d-907364264c9d
imAditya06/local-Repo
Floyds_Triangle.cpp
// Floyd's Triangle // Enter the number of rows you want // 9 // 1 // 2 3 // 4 5 6 // 7 8 9 10 // 11 12 13 14 15 // 16 17 18 19 20 21 // 22 23 24 25 26 27 28 // 29 30 31 32 33 34 35 36 // 37 38 39 40 41 42 43 44 45 #include<iostream> using namespace std; int main() { int n,k=1; cout << "Enter the num...
ALGO
0.999366
5.209058
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-05-11T14:49: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": "99577fb7c19c...
e62f53fd-4f9e-4938-b002-0824b1d3f86a
Pushpak478/DSA
ConsoleApplication2/UtilArrays.cpp
#include <iostream> #include <mutex> #include <unordered_map> #include <algorithm> #include <unordered_set> #include "UtilArrays.h" using namespace std; std::vector<int> UtilArrays::TwoSum(std::vector<int>& nums, int target) { unordered_map<int, int> mp; vector<int> result; for (int index = 0; index < nums.size();...
ALGO
0.999514
4.983603
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-16T06:36: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": "0fad073e7d1b...
c6464d89-c6d5-46ed-9b79-bad7abd2f6d5
StarkPrince/ONLINE_JUDGES
codeforces/A_Duff_and_Weight_Lifting.cpp
// ?Problem : https://codeforces.com/contest/587/problem/A // *Solution : make a cnt array annd add the previous number by taking mod 2 and add the carry to the next number and count the number of 1's in the array #include <bits/stdc++.h> using namespace std; /////////////////////////////////////////////////// /* ███...
ALGO
0.999997
4.089099
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2022-02-11T00:02:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83583b81b...
d7029197-00cf-4dfc-9587-781082652e09
aannnssss/OS_labs
lab2/main.cpp
#include "lab2.hpp" int main() { int n1, m1, n2, m2, threadCount; std::cout << "Input values rows and columns for matrix 1: "; std::cin >> m1 >> n1; TMatrix lhs(m1, std::vector<std::complex<int> >(n1)); std::cout << "Input matrix 1:\nexample: if you want to input 2+3i => input 2 3\n"; ReadMatr...
ALGO
0.992746
4.897924
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-11-08T04:09: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": "2710794663a...
4f7f6b95-3bf3-4016-ab79-8ee2d4f13b7e
skygragon/Q.solution
leetcode/084.largest-rectangle-in-histogram.cpp
/* * [84] Largest Rectangle in Histogram * * https://leetcode.com/problems/largest-rectangle-in-histogram * * Hard (25.89%) * Total Accepted: 82818 * Total Submissions: 319865 * Testcase Example: '[2,1,5,6,2,3]' * * * Given n non-negative integers representing the histogram's bar height where * the wid...
ALGO
0.999868
6.667994
{ "github_metadata": { "branch": "master", "commit_count": 522, "repo_created_at": "2017-03-02T02:05:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e207750...
d6337b88-79b6-437c-9deb-9e105935dab1
cedric-sun/toys
src/uva/448.cc
#include <iostream> #include <string> #include <algorithm> #include <cstdio> #include <cmath> using namespace std; const string operator_list[] = { "ADD", "SUB", "MUL", "DIV", "MOV", "BREQ", "BRLE", "BRLS", "BRGE", "BRGR", "BRNE", "BR", "AND", "OR", "XOR", "NOT" }; string& hex2bin(string &hexstr, string &binst...
ALGO
0.956191
3.735701
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-09-08T04:57: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": "31d441c72...
cd8a9fa4-05af-4598-9eac-a24480d5c7b0
jicanta/Competitive-Programming
USACO/2018/January/Silver/Lifeguards.cpp
#include <bits/stdc++.h> using namespace std; using tint = long long; using ld = long double; #define forsn(i, s, n) for(int i = s; i < int(n); i++) #define forn(i, n) forsn(i, 0, n) using vi = vector<tint>; #define pb push_back #define rsz resize #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() ...
ALGO
0.999943
3.965083
{ "github_metadata": { "branch": "master", "commit_count": 642, "repo_created_at": "2020-01-27T20:27:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a855449...
e1dd25d3-5e92-44d8-8346-f064490e4550
josephjaspers/OldProjects
cpp/UNMAINTAINED-FeedForward-NeuralNetwork-CPP/NeuralNetwork/Main.cpp
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: main.cpp * Author: joeyj * * Created on December 26, 2016, 2:22 PM */ #include "stdafx.h" #include <cstdlib> #include "Neural...
ALGO
0.985704
4.570487
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-07-11T18:11:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "542f601823...
d7328880-01c8-46cb-9295-c1c1a935e281
colour-y/algorithm-2025_with_coloury
2025/D_Cubes.cpp
#include<bits/stdc++.h> using namespace std; const char nl = '\n'; typedef long long ll; typedef long double ld; using i64 = unsigned long long; using i32 = unsigned; using i128 = unsigned __int128; #define all(x) (x).begin(), (x).end() void solve(){ ll N; std::cin >> N; for (ll d = 1; d * d * d ...
ALGO
0.999948
4.220068
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2025-02-22T13:55: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": "1c53fc839e9...
85bb9b82-95a8-478c-be48-e1f62446baa7
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p02599/s652531539.cpp
#ifndef _TEMPLATE_ROOT #define _TEMPLATE_ROOT #include "bits/stdc++.h" using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define repl(i, a, b) for(ll i = a; i < (b); ++i) #define repd(i, a, b) for(int i = a; i >= (b); --i) #define repdl(i, a, b) for(ll i = a; i >= (b); --i) #define all(x) begin(x),...
ALGO
0.999925
4.813417
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-06-06T16:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "3afddac32d...
3cde5df9-d37b-403c-bc54-5f590282eac1
SkatoriDev/Algorithm_OOP_DIHT
SEM_2/MODULE_3/B/source.cpp
/*Задан ориентированный граф, каждое ребро которого обладает целочисленной пропускной способностью. Найдите максимальный поток из вершины с номером 1 в вершину с номером n. Формат ввода Первая строка входного файла содержит n и m - количество вершин и количество ребер графа (2 <= n <= 100, 1 <= m <= 1000) Следующи...
ALGO
0.999969
4.396056
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-05-20T17:21: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": "6c554362c4...
258d0198-e976-467f-a2f8-6733a25a4150
LutzGross/esys-escript.github.io
trilinos_source16/packages/rol/src/zoo/testproblems/ROL_HS42.hpp
// @HEADER // ************************************************************************ // // Rapid Optimization Library (ROL) Package // Copyright (2042) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by or on be...
ALGO
0.98287
4.762981
{ "github_metadata": { "branch": "master", "commit_count": 5724, "repo_created_at": "2020-08-10T02:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 63, "pull_requests": 0 }, "file_meta": { "content_id": "5abd...
9bfe19de-0ff4-4d08-83f1-d567e74e4547
horizon-blue/playground
Solutions-to-OJs/POJ/1000-1999/1985_cow_marathon.cpp
// <NAME> 09/28/2018 #include <iostream> #include <queue> #include <vector> using namespace std; struct Farm { int id; // number of the farm int dist; // distance to the farm Farm(int id, int dist) : id(id), dist(dist) {} }; int max_dist = 0; int bfs(int root, const vector<vector<Farm>> &farm_map); ...
ALGO
0.999943
4.266892
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2016-04-24T03:42: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": "f43f4a538...
ff0e60da-6e3d-43ec-9735-cdbb776368f1
nishant111/leetCode
1506-find-root-of-n-ary-tree/1506-find-root-of-n-ary-tree.cpp
/* // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val, vector<Node*> _children) { val = _val; children = _children; } }; */ class Solution { public: int dfs(Node *root, un...
ALGO
0.999708
5.281686
{ "github_metadata": { "branch": "main", "commit_count": 1991, "repo_created_at": "2022-01-31T08:48: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": "b8d8cbaf2...
a6c3e750-dc10-4e06-9779-f350ba05bb31
RohitKumar2511/DSA-Practice-
pattern/printing_z.cpp
#include <iostream> using namespace std; // Function to print the desired // Alphabet Z Pattern void alphabetPattern(int N) { int i, j, size; // Declaring the values of Right, // Left and Diagonal values int Top = 1, Bottom = 1, Diagonal = N - 1; // Loop for printing the first row for (i...
ALGO
0.999679
4.884134
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-06-11T19:19: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": "dffd8c33599e...
5490157c-dc6f-4f68-a60e-84872635f697
giaphu39/practiceCplusplus
INClassDSA/buoi7QueuevaStack/BT4XoaHSduoi18Tuoi.cpp
#include <iostream> using namespace std; #define MAX 100 struct User{ int birth; char name[100]; }; struct NODE { // int info; // chỗ này có vẻ sai User info; NODE* pNext; }; struct LIST { NODE* pHead; NODE* pTail; }; //###INSERT CODE HERE - Áp dụng câu 1-2-3 // nhớ còn có test case trù...
ALGO
0.998845
3.883528
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2025-03-30T16:35: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": "4d9c9107a9...
db9d709d-8d41-4787-bc8e-b33c0d013a41
mockingbirdnest/Principia
physics/discrete_trajectory_types.hpp
#pragma once #include <list> #include "absl/container/btree_set.h" #include "base/macros.hpp" // 🧙 For forward declarations. #include "geometry/instant.hpp" #include "physics/degrees_of_freedom.hpp" #include "quantities/quantities.hpp" // An internal header to avoid replicating data structures in multiple places. ...
ALGO
0.906819
7.559302
{ "github_metadata": { "branch": "master", "commit_count": 22774, "repo_created_at": "2014-02-08T02:55:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 817, "forks": 71, "issues": 104, "pull_requests": 3 }, "file_meta": { "content_id": "f7...
0c9ab22f-47a3-4d0a-ae9b-808859fb64be
bursaar/Algorithms
Pathfinder.h
#pragma once #include "Cell.h" #include "nodes.h" #include "Maze.h" class cPathfinder { public: /* === Member Variables === */ cCell cell_currentNodeMap[25][25]; /* === Member Functions === */ //========================================================================================================== // C...
ALGO
0.999195
4.403596
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2014-02-10T14:50: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": "c98ee4f15...
1c4df6be-f7d2-472f-bfff-6409c76c0750
beyanger/leetcode
algorithm/cpp/65.cpp
class Solution { public: bool isNumber(string s) { vector<vector<int>> dp(9, vector<int>(128, -1)); for (int i = '0'; i <= '9'; i++) { dp[0][i] = dp[1][i] = dp[2][i] = 2; dp[3][i] = dp[4][i] = 4; dp[5][i] = dp[6][i] = dp[7][i] = 6; } dp[0][' '] = ...
ALGO
0.993432
4.961062
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2017-10-11T07:29: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": "01d2926c0...
813c19c5-5f81-4e77-a3c4-0551c70b5420
yf291115925/CPP-Nanodegree
5_Concurrency/02_Passing_Data_Between_Threads/02_Promises_and_Future/example_3.cpp
#include <iostream> #include <thread> #include <future> #include <cmath> void computeSqrt(std::promise<double> &&prms, double input) { std::this_thread::sleep_for(std::chrono::milliseconds(2000)); // simulate work double output = sqrt(input); prms.set_value(output); } int main() { // define input data...
TOOL
0.933904
6.456551
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-07-22T14:31:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 46, "forks": 38, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2390fa11...
44a1b3af-2874-4fd2-92b5-f17e0288c400
nopnewbie/OJExercise
forOffer/剑指Offer-数组中的逆序对.cpp
class Solution { static const int mod = 1000000007; int mergeSort(vector<int> &vi, int l, int r, int *tmp) { if (l >= r) return 0; int mid = l + (r - l) / 2; int cnt = (mergeSort(vi, l, mid, tmp) % mod + mergeSort(vi, mid + 1, r, tmp) % mod) % mod; ...
ALGO
0.999992
5.131714
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-02-11T12:17: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": "3763f1a89...
a702ab2e-f5f6-4a70-b3e6-280b9afd92f0
web3Aiden/leetcode2
Array/Construct Binary Tree from Inorder and Postorder Traversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: TreeNode* buildTree(vector<int>& inorder, vector<int>& postorder) { return buildTreeHel...
ALGO
0.999936
5.976009
{ "github_metadata": { "branch": "master", "commit_count": 219, "repo_created_at": "2017-02-09T09:55: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": "1f39c5e9...
e649a73b-7ecf-4d38-aaa6-46c93d8269bc
edkochak/MonteCarloCircleIntersection
main_i.cpp
#include <iostream> #include <cmath> #include <algorithm> bool isInsideCircle(double x, double y, double centerX, double centerY, double radius) { double dx = x - centerX; double dy = y - centerY; return dx * dx + dy * dy <= radius * radius; } int main() { double x1, y1, r1; double x2, y2, r2...
ALGO
0.999845
5.363914
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-11-16T16:19: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": "892282ac792d...
2ce37f95-3230-4693-b067-fdd9938daad2
Acka1357/ProblemSolving
Codeforces/RegularRound/R558_D2/C.cpp
#include <cstdio> #include <algorithm> #include <vector> #include <cstring> #include <queue> #include <utility> #include <functional> #include <cstdlib> #include <cmath> #include <string> #include <set> #include <map> using namespace std; typedef long long ll; const int BASE = 20000; ll gcd(ll a, ll b){ ll c; whil...
ALGO
0.999923
4.090504
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2019-04-07T09:56:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf554c77a...
173a88bd-403b-4311-ad75-32ab2746a67f
GCAIO/caustic_wave_filter
src/CausticWaveFilter/CausticWaveDenseFilter.cpp
#include "CausticWaveDenseFilter.h" inline float truncateFloatIntoBounds(float number, float lowerBound, float higherBound) { if(number > higherBound) { number = higherBound; } else { if(number < lowerBound) { number = lowerBound; } } return numbe...
ALGO
0.943779
4.853813
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-06-14T18:07: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": "340401f3b7d...
94f13600-b598-4776-aea0-e0269c8e636b
jijinlong/shaobohou-cppcodes
libs/maths/ExponentialMap.cpp
#include "ExponentialMap.h" #include "Constants.h" using MathConstants::PI; using MathConstants::TWO_PI; using MathConstants::HALF_PI; const double minAngle = 1.0e-7; const double cutoffAngle = PI; Quaternion exp(const Vector3D &v) { double theta = sqrt(v * v); double cosp = cos(0.5 * theta); double si...
ALGO
0.997606
4.809965
{ "github_metadata": { "branch": "master", "commit_count": 164, "repo_created_at": "2015-12-17T12:33:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "71d5e437...
ec4e0342-9382-4287-ae4c-d685c9efb880
Marcos30004347/gauss
gauss/Polynomial/Polynomial.cpp
#include "Polynomial.hpp" #include "gauss/Algebra/Sorting.hpp" #include "gauss/Algebra/Reduction.hpp" #include "gauss/Algebra/Expression.hpp" #include "gauss/Error/error.hpp" #include "gauss/Factorization/Wang.hpp" #include "gauss/GaloisField/GaloisField.hpp" #include "Resultant.hpp" #include <climits> #include <cstd...
ALGO
0.999801
5.422079
{ "github_metadata": { "branch": "main", "commit_count": 373, "repo_created_at": "2021-04-17T11:38:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e3f259c34...
4eab21c9-37ee-49ad-84ed-bd8370bb8fa3
daepoid/algorithm-study
baekjoon/14000/148888_2.cpp
#include <algorithm> #include <cctype> #include <cmath> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; vector<int> v; int op[4], max_val = -2100000000, min_val = 2100000000; int n, temp; ...
ALGO
0.999936
3.993912
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2021-04-14T08:40: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": "f19f8f92a7...
26395237-3e50-4d65-9dbe-8141a65c63a2
sayak22/Leetcode-Problems
150-evaluate-reverse-polish-notation/evaluate-reverse-polish-notation.cpp
class Solution { public: // TC:O(N) int evalRPN(vector<string>& tokens) { stack<int> stk; // Stack to store intermediate results for (string str : tokens) { if (str == "+" || str == "-" || str == "*" || str == "/") { // As soon as a operand is encountered, remove the las...
ALGO
0.999789
6.05268
{ "github_metadata": { "branch": "master", "commit_count": 538, "repo_created_at": "2024-04-16T09:28: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": "2951115a...
d4906330-c3c0-44d4-a253-8951d5348996
bhaumikmaan/Competitve-Programming-Solutions
Codeforces/1698 - Round #803 (Div. 2)/B. Rising Sand.cpp
/*** KNOWLEDGE IS POWER ***/ #include<bits/stdc++.h> typedef long long ll ; #define int ll #define pb push_back #define all(v) v.begin(),v.end() #define mod 1000000007 #define inf LLONG_MAX #define N 200010 using namespace std ; typedef vector<int> vi ; typedef vector<string> vs ; typedef vector<vector<int>> vvi ;...
ALGO
0.999874
4.14753
{ "github_metadata": { "branch": "main", "commit_count": 744, "repo_created_at": "2021-10-06T06:21:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b2c55422a...
32636f35-d900-48e1-a1bd-f43653abe8e8
Vignesh1399/Programming-Contests
GUVI Problems/PlanetX/output.cpp
#include<bits/stdc++.h> #define ll long long #define int long long #define ld long double #define cout out #define cin in #define pb push_back #define x first #define y second #define fastread ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define PI (atan(1)*4) #define mp make_pair #define sz(a) signed...
ALGO
0.999982
3.644514
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-07-02T07:22: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": "a64da78de382...
9de28dfb-dca0-4741-9197-6d118fe24932
AlvaroRubioGomez/vehicle_3
Clothoids-develop/src/AABBtree.hh
/*--------------------------------------------------------------------------*\ | | | Copyright (C) 2018 | | | | ...
ALGO
0.998625
6.071325
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-02-03T15:23:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "477aa6661b...
554d1dfe-c214-408b-9199-ec0a7681834a
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/07/0729/personal_submission/cf1105d_yakultgo.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1000 + 10; typedef pair<int, int> pi; int n, m, p; char mp[N][N]; struct node { int x, y, t; }; queue<node> q[10]; int s[N], ans[N]; int dx[4] = {1, -1, 0, 0}, dy[4] = {0, 0, 1, -1}; signed main() { ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); ...
ALGO
0.999882
4.208611
{ "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": "136b...
194f3256-b8cd-4f92-a450-55676e401fca
petosegan/naiad
cpp/main.cpp
#include <SFML/Graphics.hpp> #include <cmath> #define WIDTH 800 #define HEIGHT 600 #define N 10001 #define ARCLENGTH 10000 float *linspace(float start, float end, int num) { float *result = (float *)malloc(num * sizeof(float)); float step = (end - start) / (num - 1); for (int i = 0; i < num; i++) { ...
ALGO
0.998392
4.964196
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-06-25T19:45:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "0d3c00158a8...
3893ce48-e4d6-4b9d-9730-8207b849bce0
wjdwithyou/BOJ
11637/11637.cc
#include <iostream> int main() { int arr[16]; int t, n, sum, idx, temp, oidx; scanf("%d", &t); for (int i = 0; i < t; ++i) { sum = 0; scanf("%d", &n); for (int j = 1; j <= n; ++j) { scanf("%d", &arr[j]); sum += arr[j]; ...
ALGO
0.999993
4.000457
{ "github_metadata": { "branch": "master", "commit_count": 703, "repo_created_at": "2017-02-10T06:40: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": "141c5488...
e036cffc-0d84-469c-a158-74d3912e6738
zxyDEDIRE/ACM_CODE
作业/编译原理/2.A.cpp
#include <stdio.h> #include <ctype.h> #include <iostream> void E(); void G(); void T(); void S(); void F(); char lookahead; // ??ǰ?????ַ? void match(char c) { if (lookahead == c) { lookahead = getchar(); // ????һ????? } else { printf("Error: invalid syntax\n"); exit(0); } } void...
ALGO
0.998571
3.111073
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2023-12-11T12:46:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b32db3aa...
bfc02789-dfff-4d47-85cd-65844f506e59
rafaelcsva/CompetitiveProgramming
code/codejam2019/Round1C/PowerArrangers.cpp
#include <bits/stdc++.h> using namespace std; int ques = 0; int cnt[30]; string resp = ""; const int N = 1000; int ask[N]; char answer[N]; const int M = 595; const int inc = 5; int f; bool choosed[30]; void solve(int pos, int sz){ for(int i = 0 ; i < sz ; i++){ ques++; assert(ques <= f); cout << ask[i] + pos...
ALGO
0.999652
3.408065
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-08-30T23:18: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": "43cc9e7c6...
0eea23ca-58ad-4ab4-8dcf-0ed625c1dda7
yhshu/Data-Structures-Algorithms-and-Applications-in-cpp
exercise solutions/codes/compare.h
// function to compare two binary trees included #ifndef BinaryTree_ #define BinaryTree_ int _count; #include<iostream.h> #include "lqueue.h" #include "btnode2.h" #include "xcept.h" template<class E, class K> class BSTree; template<class E, class K> class DBSTree; template<class T> class BinaryTree { friend BST...
ALGO
0.999655
4.621313
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-10-02T12:05:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 76, "forks": 26, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f213edf...
d7230756-4c14-4cdf-b5b5-76cc35447da8
apache/impala
be/src/thirdparty/datasketches/HarmonicNumbers.hpp
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
ALGO
0.926194
6.214927
{ "github_metadata": { "branch": "master", "commit_count": 12124, "repo_created_at": "2016-04-13T07:00:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1226, "forks": 533, "issues": 0, "pull_requests": 26 }, "file_meta": { "content_id": "d...
9b7bc3ee-c6d1-4e52-8aa9-8f8dca19e379
salonigupta1/Codeforces
codeforces/1466/C.cpp
#include <iostream> using namespace std; #define OJ \ freopen("input.txt", "r", stdin); \ freopen("output.txt", "w", stdout); #define FIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); int main() { ...
ALGO
0.999919
3.691749
{ "github_metadata": { "branch": "master", "commit_count": 235, "repo_created_at": "2021-01-18T11:07:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23b32788...
dec91e68-6d0b-48ff-991a-017b7be2f37c
cmu15418f23/asst4
src/mpi-simulator-v2.cpp
#include "common.h" #include "mpi.h" #include "quad-tree.h" #include "timing.h" void simulateStep(const QuadTree &quadTree, const std::vector<Particle> &particles, std::vector<Particle> &newParticles, StepParameters params) { // TODO: paste your sequential implementation in Assign...
ALGO
0.999666
6.097456
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-10-11T02:33:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "8d23dae63d2f7...
bf8e1ebc-3a02-44b1-8e7b-2f2237fe68d3
TheMonsterHawk/dsa_library_cpp
count_inversions.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int counting_sort_naive(vector < int > &a){ int counter = 0; int n = (int)a.size(); for(int i = 0; i < n; i++){ for(int j = i+1; j < n; j++){ if(a[j] < a[i]) counter += 1; } } return counter; } void me...
ALGO
0.999903
4.377379
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-06-07T05:24: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": "b929327589...
16c0590c-38d5-4ac6-aa3c-a8b8b7ce075a
rahulhalderAERO/nusSU2_Aeroelasticity-Code-Base
SU2_CFD/src/solver_adjoint_mean.cpp
/*! * \file solution_adjoint_mean.cpp * \brief Main subroutines for solving adjoint problems (Euler, Navier-Stokes, etc.). * \author <NAME>, <NAME>, <NAME> * \version 5.0.0 "Raven" * * SU2 Lead Developers: Dr. <NAME> (<EMAIL>). * Dr. <NAME> (<EMAIL>). * * SU2 Developers: Prof. <NAME>'s gro...
ALGO
0.996037
3.509998
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2020-02-27T08:29:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9bfc13783...
b8f0ab09-2768-42bb-a493-bbbe68d61273
arifur30/Codeforces-Submissions
A_Entertainment_in_MAC.cpp
#include<bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; #define YES cout << "YES\n" #define NO cout << "NO\n" #define nl "\n" #define arrin(arr, n) for(ll i = 0; i < n; i++) cin>>arr[i] #define arrout(arr, n) for(ll i = 0; i < n; i++) cout<<arr[i]<<" ";cout<<nl int main() ...
ALGO
0.999998
4.005074
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-12-18T12:13: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": "d8513761aa0...
bbf7d8d9-d671-4fa9-ad9f-76a3c13c5b77
manoflearning/cp-codes
Baekjoon OJ/06000-06999/6850.cpp
#include <iostream> #include <vector> #include <cmath> #include <algorithm> #define ll long long using namespace std; struct point { ll x, y, px, py; point() : point(0, 0, 0, 0) {} point(int sx, int sy) : point(sx, sy, 0, 0) {} point(int sx, int sy, int spx, int spy) : x(sx), y(sy), px(spx), py(spy) {} bool opera...
ALGO
0.999794
4.737774
{ "github_metadata": { "branch": "main", "commit_count": 1899, "repo_created_at": "2020-08-06T14:38:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5e7fdb96...
05da80e2-933a-42fd-b6e0-f3df3366a904
skygupta07/DSA
25_stack2/16_minimumStringLengthAfterRemovingSubstring.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: // Function to return the minimum length of the string after erasing certain pairs int minLength(string s) { // Initialize a stack to help process the string and remove valid pairs stack<char> stack; // Loop through...
ALGO
0.999934
5.577757
{ "github_metadata": { "branch": "main", "commit_count": 141, "repo_created_at": "2024-12-22T10:16:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47ecc91656...
219eda89-a92c-4fab-bbdb-1127af67f1b6
jauhararifin/arkavidia-cp-2018
qual/arkav-2018-qual_c-and/solution.cpp
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 5; int rmq[N][20]; int solve(int l, int r) { int g = __builtin_clz(r - l + 1) ^ 31; return rmq[l][g] & rmq[r-(1<<g)+1][g]; } int main() { int t; scanf("%d", &t); while (t--) { int n; scanf("%d", &n); for (int i = 0; i < n; i++)...
ALGO
0.999949
5.140622
{ "github_metadata": { "branch": "master", "commit_count": 271, "repo_created_at": "2017-07-19T13:44:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2adef1d...
bcb7c867-e492-46c1-8bc0-a96155e2adc5
Antitimofey/ynd
shar/online_test/5.cpp
#include <algorithm> #include <cmath> #include <random> #include <iostream> int odd_experiment(int n, int path = 1) { int cnt = 0; // Random number generator setup std::random_device rd; // Obtain a random seed from hardware std::mt19937 gen(rd()); // Standard Mersenne Twister engine std::...
ALGO
0.998645
3.501714
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2025-04-23T09:57:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d4c08508a...
f6938905-eaa9-4299-9e39-484adfc14541
NicholasColonna6/CS-385
Assignment 4/waterjugpuzzle.cpp
/******************************************************************************* * Name : waterjugpuzzle.cpp * Author : <NAME> * Date : 10/19/2018 * Description : Solves the water jug problem * Pledge : "I pledge my honor that I have abided by the Stevens Honor System." -<NAME> ***********...
ALGO
0.999246
4.183345
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-01-05T00:36: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": "8bdf1ebf1a...
631b6610-d272-4aa7-b282-87623a120f18
WhiZTiM/coliru
Archive2/92/41b1132a909a50/main.cpp
#include <boost/mpl/placeholders.hpp> #include <boost/mpl/apply.hpp> #include <iostream> #include <array> #include <utility> #include <cstddef> #include <functional> #include <type_traits> namespace mpl = boost::mpl; template <std::size_t...> struct index_sequence {}; template <std::size_t N, std::size_t... Is> struc...
ALGO
0.957978
6.546311
{ "github_metadata": { "branch": "master", "commit_count": 42630, "repo_created_at": "2016-04-21T16:34: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": "2d0c78...
e13e8ed7-0253-4a3d-9120-e63fa0fc47b9
wmamunhossain/competitive-programming
Graph/BFS-DFS/Codeforces Round #357 (Div. 2) D. Gifts by the List.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define mems(a,b) memset(a,b,sizeof(a)) #define mp make_pair #define pii pair<int,int> #define pdd ...
ALGO
0.999974
3.427572
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-01-04T19:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce4ee6d4a...
5c2686de-5203-4eae-9808-b6b5aaab80fa
chocopie69/CP-Training
Training/VNOI/Bedao/MINI20_HARDESTPROBLEM.cpp
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define pii pair<int,int> #define pll pair<long long, long long> #define fi first #define se second #define all(a) (a).begin(), (a).end() #define TASKNAME "NAME" using namespace std; const int SZ = 1e6+5; const ll INF = INT_MAX / 2, MOD = 1...
ALGO
0.999716
4.907828
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-16T15:18: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": "8e3b4bb3f366...
67c61fdc-0b4e-4eee-9a1d-276139aadc5c
donaldmunro/Gravity2Gravity
src/common.cc
#include <iostream> #include <iomanip> #include <fstream> #include <vector> #include <random> #include <cmath> #include <opencv2/imgproc.hpp> #include <opencv2/highgui.hpp> #include "common.h" #include "poseocv.h" inline std::string trim(const std::string &str, std::string chars) //---------------------------------...
ALGO
0.945254
4.432921
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-09-02T22:13: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": "64aef65047...
5d76dfe0-3189-4841-ba8e-7766a23d21be
gamer-project/gamer
src/TestProblem/Hydro/Plummer/FB_Plummer.cpp
#include "GAMER.h" #if ( MODEL == HYDRO && defined FEEDBACK ) extern bool Plummer_FB_Exp; extern double Plummer_FB_ExpEMin; extern double Plummer_FB_ExpEMax; extern double Plummer_FB_ExpMMin; extern double Plummer_FB_ExpMMax; extern bool Plummer_FB_Acc; extern double Plummer_FB_AccMMin; extern double Plummer_FB...
ALGO
0.999029
4.882011
{ "github_metadata": { "branch": "main", "commit_count": 7047, "repo_created_at": "2017-12-13T20:44:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 86, "forks": 70, "issues": 99, "pull_requests": 32 }, "file_meta": { "content_id": "d9ee42...
feb39260-dc5f-41f4-9bb0-e580d2d6b8e5
ahmedkamal77/N-Step-Scan-Algorithm-
N-Step Scan/N-Step Scan.cpp
// N-Step Scan.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <vector> #include <set> #include <queue> #include <algorithm> using namespace std; struct difference { int dif; int index; }; bool r_comp(difference& a, difference& b) { r...
ALGO
0.999977
4.708827
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-08-08T03:51:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d63f2cec06a9...
c7f20fb2-b224-4671-aa1b-37a1ceb9401f
ayoubraji/highway-realtime-simulator
graphic-highway/vehicle.cpp
/* <NAME> Project of Real Time Embedded Systems course */ #include "vehicle.h" #include <iostream> //#define ROAD_LENGHT 5000 #define ROAD_LENGHT 2500 struct vehicle_t createVehicle(int type, int max_speed) { struct vehicle_t vehicle; vehicle.type = type; vehicle.actual_speed = 0; vehicle.speed_limited = 0; v...
TOOL
0.960916
3.795912
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2018-07-18T10:26:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c10561c5...
49e119d6-4715-4bb5-bf3b-f51e334aa72a
pingsoli/cpp
algorithm/linked_list/remove_duplicates_from_sorted_list_II.cpp
//////////////////////////////////////////////////////////////////////////////// // // Remove duplicates from sorted list II // from https://leetcode.com/problems/remove-duplicates-from-sorted-list-ii/description/ // // Description // Given a sorted linked list, delete all nodes that have duplicate numbers, // leaving ...
ALGO
0.999886
5.81333
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2018-01-23T02:38: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": "9ff17ab0a...
e68428c3-14b7-4d3a-86de-0b7dbeb56fa8
kashyapravichandran/branch-prediction
sim.cpp
/* Project 2. Branch Predictor 1. Bimodal 2. Gshare 3. Hybrid Implementation : with and without Branch target buffer ECE 563: Microarchitecture <NAME> */ // Taken - 1 // Not Taken - 0 #include<iostream> #include<math.h> #include<fstream> #include<cstring> #include<stdlib.h> #include<iomanip> #include<stdio.h> usi...
ALGO
0.998722
3.116451
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-12-21T02:27:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a33aa5f3b...
4bde5f17-ed75-4ae2-8641-017aad279d85
logiclord/CompetitiveProgramming
uva/481.cpp
#include<cstdio> #include<vector> #include<climits> #include<algorithm> #include<cstring> #include<cmath> #include<cctype> #include<iostream> using namespace std; using namespace std; /* Finds longest strictly increasing subsequence. O(n log k) algorithm. */ void find_lis(vector<int> &a, vector<int> &b) { vector...
ALGO
0.999973
3.93424
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2013-04-21T10:27:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cbb273da1...