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
899e435b-75cb-43c7-b6bc-35220dd0248f
shen7563/CodeTree
250504/색종이의 총 넓이/the-total-area-of-colored-paper.cpp
#include <iostream> #define MAX_N 201 #define OFFSET 100 // 좌표 양수 using namespace std; int n; int x, y; bool area[MAX_N][MAX_N]; // 직사각형 면적 int main() { ios::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); cin >> n; for(int i = 0; i < n; i++) { cin >> x >> y; for(int j = x + OF...
ALGO
0.999017
4.137948
{ "github_metadata": { "branch": "main", "commit_count": 1604, "repo_created_at": "2025-03-08T13:48: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": "b11bdb5a7...
28d7bca0-9900-449a-b821-97140cf6a2a3
catboost/catboost
contrib/libs/cxxsupp/libcxxmsvc/include/__algorithm/partial_sort_copy.h
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
ALGO
0.999939
7.106789
{ "github_metadata": { "branch": "master", "commit_count": 49562, "repo_created_at": "2017-07-18T05:29:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8472, "forks": 1231, "issues": 604, "pull_requests": 23 }, "file_meta": { "content_id":...
5b45ad73-0a4d-47cb-ae67-01bdc2919985
Anton94/modal_logic_formula_prover
parser/main.cpp
#include <iostream> #include "parser_API.h" #include "visitor.h" int main(int, char**) { const char* input_formula = "F"; input_formula = "~((C(a, b) & F) & <=m((a * b), (c + d)))"; input_formula = "C(a,b) | C(e * x * -y + z,f * g + -e) & C(a,b)"; input_formula = "C(a,b) | C(e * x * -(y + z) + t, f *...
ALGO
0.998833
4.135332
{ "github_metadata": { "branch": "master", "commit_count": 888, "repo_created_at": "2019-06-04T05:47:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 18 }, "file_meta": { "content_id": "fab5dfc...
1744ab2f-bb7a-41e6-abe2-d0be9cc255ce
vilya/AdventOfCode-2018
day07/day07a.cpp
#include <algorithm> #include <cstdio> #include <vector> int main(int argc, char** argv) { bool has[26] = {}; bool done[26] = {}; bool requires[26][26] = {}; // printf("digraph {\n"); FILE* f = fopen(argv[1], "r"); char src, dst; while (fscanf(f, "Step %c must be finished before step %c can begin.\n", &s...
ALGO
0.99987
3.161212
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-01-14T11:04: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": "271273ab2a...
e76d1fdf-f03d-4084-adee-59434cb6fdc0
rajkubp020/helloword
lammps-master/src/MANYBODY/pair_airebo.cpp
/* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories <NAME>, <EMAIL> Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with San...
ALGO
0.990423
6.053624
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2018-05-23T05:12: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": "9f93edfea...
798d51a2-6f8d-4b63-a7ab-3e19c39e0723
annsvettsova/lil_projects
struct.cpp
#include <iostream> struct Computer { int id; int ram; int storage; int processorSpeed; int screenSize; Computer* next; Computer* prev; }; void AddFirst(Computer*& head, int id, int ram, int storage, int processorSpeed, int screenSize) { Computer* newComputer = new Computer; newCom...
ALGO
0.998788
6.042593
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-04-04T14:52: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": "a8311fd6a79c...
4fcace72-cbd2-49e1-8e28-76cac814ab46
abhiXsliet/Solved-DSA-Problems
Leetcode Daily Challenge/014-August-2024/026-n-ary-tree-postorder-traversal.cpp
// https://leetcode.com/problems/n-ary-tree-postorder-traversal/ #include <bits/stdc++.h> using namespace std; // Definition for a Node. class Node { public: int val; vector<Node*> children; Node() {} Node(int _val) { val = _val; } Node(int _val, vector<Node*> _children) { ...
ALGO
0.999985
6.240964
{ "github_metadata": { "branch": "main", "commit_count": 2156, "repo_created_at": "2023-07-29T13:17:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff3b37045...
ffe0d2b7-0950-4217-a58f-9778847f693e
Userrnam/Hackaton
src/main.cpp
#include <iostream> #include <stdio.h> #include <time.h> #include "Graph.hpp" #include "Layout.hpp" /* Для размерности 20 размеры контейнеров: 3,4,5,7 Для размерности 50 размеры контейнеров: 10,13,15,17 Для размерности 250 размеры контейнеров: 30,45,55,70,80 Для размерности 1000 размеры контейнеров: 100,125,175,225 Д...
ALGO
0.936905
3.987528
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-04-22T13: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": "e30b5a1dae2...
619ab5b5-e2d9-4597-8b73-22ce8bb0ef0a
BekaKavlelashvili/Algorithms
Graphs/Neighbor matrix/NeighborMatrix.cpp
#include <bits/stdc++.h> using namespace std; /*არაორიენტირებული გრაფი მოცემულია მეზობელთა წყვილების სახით. გარდაქმენით იგი წვეროთა მეზობლობის მატრიცად. *გარანტირებულია, რომ გრაფი არ შეიცავს ორმაგ წიბოებს.*/ int main() { int N, M; cin >> N >> M; int G[N + 1][N + 1]; for(int i = 1; i <= N; i++){ ...
ALGO
0.999905
3.51425
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2023-04-30T07:29: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": "450e54f0b7...
2dca6403-4c1c-422e-8013-a22ebeeb44f3
Keycatowo/NTHU-OJ
1690 -DS_Hon_hw3/12295/TAsol.cpp
#include <iostream> #include <string> #define SIGMA 26 using namespace std; class Node { public: bool isEnd; int next[SIGMA]; Node *ch[SIGMA]; Node() { for(int i=0; i<SIGMA; ++i) { next[i] = SIGMA; ch[i] = NULL; } isEnd = false; } ~Node() { ...
ALGO
0.999829
4.316109
{ "github_metadata": { "branch": "master", "commit_count": 144, "repo_created_at": "2019-04-20T07:46:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76a3623c...
df4b6b5b-8a97-4215-8a94-ffea1c816220
AlwaysUnwilling/Linux-
6_27_NewCode/newcode.cc
#include<iostream> #include<vector> #include<string> #include<algorithm> using namespace std; //[编程题]合唱团 /* *有 n 个学生站成一排,每个学生有一个能力值,牛牛想从这 n 个学生中按照顺序选取 k 名学生,要求相邻两个学生的位置编号的差不超过 d,使得这 k 个学生的能力值的乘积最大,你能返回最大的乘积吗? * */ //动态规划 //数据类型必须是long long类型,不然会溢出 long long getMax(vector<int>& v, int n, int k, int d) { //状态F(i,j)...
ALGO
0.999945
3.347377
{ "github_metadata": { "branch": "main", "commit_count": 334, "repo_created_at": "2021-09-02T01:40: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": "2528c9e625...
24c57ea5-f6cb-4da5-b304-302667f22e7b
avadheshgithub/DSA_Learning
13. Special Algorithms/2. Sliding Window/2. Leetcode/1. Leetcode 1052/GrumpyBookstoreOwner.cpp
/* ## Grumpy Bookstore owner [Leetcode 1052] Hint - find that window that has most lost of satisfaction or most disatisfaction 1-> grumpy 0-> not grumpy minutes = 3 (min window 3 size can change 1--> 0) now where grumpy 1 then count number of satisfied...
ALGO
0.999687
5.623439
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2024-06-18T13:29: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": "7a405a15ff9...
59fc9e80-20b8-4bcc-b3b8-743d54aeabc5
decentninja/AutoWikiInfoBox
anotherhmmthing/Matrix.hpp
#ifndef Matrix_H #define Matrix_H #include <vector> #include <sstream> #include <iostream> #include <assert.h> using namespace std; template <typename T = double> class Matrix { vector<vector<T>> data; public: Matrix() {} Matrix(int n, int m, T initial = 0) { for(int i = 0; i < n; i++) { vector<T> row; ...
ALGO
0.962457
3.807292
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2014-10-16T13:16:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "66d97b0d2...
01355eed-a710-4f9c-9ba4-c230587de8e6
rmEleven/Algorithm
level1/SearchAndGraphTheory/Dijkstra2.cpp
#include <iostream> #include <cstring> #include <queue> using namespace std; typedef pair<int, int> pii; const int N = 150010; const int INF = 0x3f3f3f3f; int n, m; int h[N], val[N], nex[N], w[N], idx; int d[N]; bool st[N]; void addEdge(int a, int b, int c) { w[idx] = c; val[idx] = b; nex[idx] = h[a]; ...
ALGO
0.999973
3.821812
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2023-07-01T07:49: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": "ccda38f28...
a67ce49b-381c-4ec4-8a70-b2934a85d0a4
Gurdel/University-projects-and-labs
OOP/Calc 2 latest version/SpellBook.hpp
#include "mana.hpp" bool numb(char a) //чи є символ цифрою {if ((a=='0')||(a=='1')||(a=='2')||(a=='3')||(a=='4')||(a=='5')||(a=='6')||(a=='7')||(a=='8')||(a=='9')) return true; return false;} bool oper(char a) {if ((a=='*')||(a=='/')||(a=='^')||(a=='%')||(a=='+')||(a=='-')||(a=='&')||(a=='|')||(a=='"')) return true; ...
ALGO
0.986899
3.490711
{ "github_metadata": { "branch": "main", "commit_count": 83, "repo_created_at": "2020-11-02T15:49:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b96795b52b...
f7e9247f-18b3-42ea-b085-1f5f1540ddbd
gkswns3708/BOJ_CPP
PS/BaekJoon 14713번 앵무새.cpp
#include <bits/stdc++.h> #define int int64_t #define pii pair<int, int> #define tiii tuple<int, int, int> using namespace std; queue<string> que[100 + 1]; int32_t main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int N; cin >> N; cin.ignore(); for (int i = 0; i <= N; i++) { st...
ALGO
0.999004
4.031111
{ "github_metadata": { "branch": "main", "commit_count": 505, "repo_created_at": "2020-10-27T17:18: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": "390c0c8a2c...
8b3a4cc8-57ea-43ac-abc0-e0bd5a2b130b
hanzjk/Magic-Trick
Q1/Assistant.h
enum Suit{CLUBS,HEARTS,SPADES,DIAMONDS}; //enum of card suits enum Value{TWO=2,THREE,FOUR,FIVE,SIX,SEVEN,EIGHT,NINE,TEN,JACK,QUEEN,KING,ACE=1}; //enum of face values of cards class Card{ private: Value value; Suit suit; public: Card(); Card(Value v,Suit s); void getCard() ; //function which is used to t...
ALGO
0.969609
3.464478
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-11-21T21:06: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": "fad90f68cad2...
07da6275-aaff-46f8-88c5-aea0c379e083
SagarThalkiya/Leetcode
1508-range-sum-of-sorted-subarray-sums/1508-range-sum-of-sorted-subarray-sums.cpp
#include <vector> #include <algorithm> using namespace std; class Solution { public: int rangeSum(vector<int>& nums, int n, int left, int right) { const int MOD = 1000000007; vector<int> subarraySums; // Generate all subarray sums for (int i = 0; i < n; ++i) { l...
ALGO
0.999989
6.529242
{ "github_metadata": { "branch": "main", "commit_count": 126, "repo_created_at": "2024-07-15T07:24: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": "4aa5d07ada...
a67eb36e-a46c-4f05-9002-56d6471a0f5d
kost/drcrack
ChainWalkContext.cpp
/* RainbowCrack - a general propose implementation of <NAME>'s faster time-memory trade-off technique. Copyright (C) <NAME> <<EMAIL>> Modifications made by <NAME> <<EMAIL>> */ #ifdef _WIN32 #pragma warning(disable : 4786) #endif #include "ChainWalkContext.h" #include <ctype.h> #include <openssl/rand.h> #...
TOOL
0.950338
3.809277
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2013-07-18T11:22: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": "f51631c682...
8967e65a-0aa6-4eff-b75c-a4b01a1c8ef9
hsharsh/comp-prog
spoj/aba12c.cpp
/***************************************************************************************** You should enjoy the little detours... Because that's where you'll find the things more important than what you want... Version : 1.64 Author : <NAME> *****************************************************************************...
ALGO
0.999861
3.456945
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2017-02-16T08:23: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": "090c0a650...
6d8b172b-f294-4a9c-a6b7-7da477e963b4
samarth-bhargav/Competitive_Programming
USACO/Gold/balance2.cpp
#include <bits/stdc++.h> using namespace std; #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define int long long #define oset tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> int count_inv(vector<int> a){ int ret = 0, b = 0...
ALGO
0.999997
3.892738
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2022-04-07T15:40: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": "425f153f1ac...
73518139-fd26-4bb7-8c77-8ae3c6a19475
Elpis-ES/neungji
prob/2342.cpp
#include <bits/stdc++.h> #define INF 100000000 using namespace std; vector<int> v; vector<vector<vector<int>>> dp_arr; int move(int f, int t){ if (f == t){ return 1; } else if(f == 0){ return 2; } else if(abs(f - t) == 2){ return 4; } else{ return 3; } ...
ALGO
0.999957
4.171896
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2022-01-10T16:29: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": "1528b7c3d38...
b9da0fbb-9d0e-49a0-a529-b6c4c9ef30de
DuyLongg/DataStructure_Algorithms_PTIT
Algorithm/Queue/Di_chuyen_trong_khong_gian/Di_chuyen_trong_khong_gian.cpp
#include <bits/stdc++.h> using namespace std; int T,A,B,C; char D[35][35][35]; int daxet[35][35][35]; struct node { int i,j,k; int dodai; }; node S,E,tmp; void Input(){ cin >> A >> B >> C; for (int i = 1 ; i <= A ; i++){ for (int j = 1 ; j <= B ; j++){ for (int k = 1 ; k <= C ; k++){ cin >> D[i][j][k];...
ALGO
0.999714
3.800201
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-06-27T03:19:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "466b7d815...
1cdc3e6a-e0fe-4699-88b1-1406383e3e39
ctare/ant_book
ctare/2-2/greedy/sarumans_army/main.cpp
#include <iostream> #include <string> #include <cstring> #include <cstdio> #include <algorithm> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <numeric> #include <regex> #define FOR(i, f, n) for(int (i) = (f); (i) < (n); (i)++) #define RFOR(i, f, n) for(int (i) = (f); (i) >=...
ALGO
0.999786
3.08042
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2018-02-08T07:12: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": "c64924ce6...
cd3a8860-8dc8-42d4-987d-628bc3049d38
HVHung149/codeC-C-
Danh_sach_vong/main.cpp
#include <iostream> using namespace std; struct node{ int index; int counter; struct node* next; }; typedef struct node* NODE; struct List{ NODE pHead; NODE pTail; }; typedef struct List LIST; void createList(LIST &l ) { l.pHead=NULL; l.pTail=NULL; } NODE CreateNewNODE(int index, int counter) { NODE NewNode=new str...
ALGO
0.999844
3.270383
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-09-04T15:42: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": "e5bf4656bb...
d76c1f02-4bd5-4d57-9c5e-e4ec59c274a8
prabowo02/CP
icpcsg18/conveyorbelt.cpp
#include <bits/stdc++.h> using namespace std; const int N = 90005; const int INF = 1000000000; int n, k, m; int getNode(int u, int t) { return (u-1)*k + t + 1; } struct Dinic { int s, t; vector<int> edges[N], cap[N], rev[N]; int dist[N], it[N]; void addEdge(int u, int v, int c) { if (u == v) return...
ALGO
0.999959
3.375527
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2018-03-26T11:16:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e341bb21d...
e70168d1-b7cc-42b8-b131-180f817bb0b9
anandj123/gcpdemo
codeforces/virtualcontestpractice/C_Binary_Search.cpp
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<cmath> using namespace std; #define debug(x) cerr << #x << " : " << x << "\n" #define REP(i,a,b) for(int i=a; i<b;++i) typedef vector<int> vi; typedef vector< vector<int> > vvi; void doMod(long long *x){ } int main() { ...
ALGO
0.999985
4.131935
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2020-02-10T14:51:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3dd4609...
2893a771-ddde-4150-afd3-81276d62fa13
aladenisun/LeetCode
LeetCode/validPalindrome.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <ctype.h> #include <algorithm> using namespace std; class Solution { public: bool isPalindrome(string s) { /* Conditions: - spaces not counted - empty string returns true - if size % 2 != 0 return false...
ALGO
0.999504
5.303138
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2020-07-31T19:12: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": "e41de97c6...
32405b40-c8aa-4139-900e-3175a03eedaf
caoleiwuhan/USACO
section 1/1_4_1_TheClocks_2.cpp
#include <iostream> #include <cstdlib> #include <vector> #include <set> #include <string> #include <fstream> #include <sstream> #include <algorithm> #include <list> #include <cstring> #include <cctype> #include <queue> using namespace std; #define _MY_DEBUG_ // 九个表 const int CLOCKNUM = 9; // 每一表的输入时间 int clocks[CL...
ALGO
0.999905
3.903659
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2013-08-24T13:48:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea7df39134...
dac72a5b-83bf-4375-ba35-fd4ca8a9f715
acv5255/BioRT-HBV-Surface
src/main.cpp
#include "biort.hpp" int verbose_mode; int main(int argc, char *argv[]) { // char timestr[MAXSTRING]; // time stamp string timestr; timestr.reserve(MAXSTRING); vector<int> steps; // Model time steps size_t nsteps_num...
ALGO
0.994799
5.244662
{ "github_metadata": { "branch": "main", "commit_count": 143, "repo_created_at": "2023-08-02T19:31:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a1480ef92...
e7884104-1e07-414f-af79-f497c8e0f2db
zhanglei1949/LeetCodeSolution
115-Distinct Subsequences/115-Distinct Subsequences-2.cpp
//time limit exceed #include<iostream> using namespace std; int numDistinct(string s, string t) { //dp //result is dp[s.size()][t.size()] //dp[0][1~t.size()] = 0 //dp[1~s.size()][0] = 1 //if s[i]==t[j], dp[i][j] = dp[i-1][j-1](using this character) + dp[i-1][j](do not use) //if s[i]!=t[j], dp[...
ALGO
0.999981
4.422397
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-06-25T08:29: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": "2519102852...
9d398f04-91ac-4bb9-8eed-c612d7275762
Kytlin/Algorithms
C++/Graphs/Implementations/AdjacencyList.cpp
// Date: 08/30/20 /* Program: Implement an adjancency list for weighted graph with nodes from 1 to num. If there are 7 nodes, nodes should be labeled from 1 to 7. */ #include <iostream> #include <utility> #include <vector> using namespace std; int main() { /* n: start node value k: end node value w: edge weigh...
ALGO
0.999286
4.511317
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-08-30T17:11: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": "607c8a067e...
6ff198ee-8281-4d80-8b94-726af70ab89a
dcpiturlea/Arduino-PulseSensorWithoutLibrary
PulseSensorSketch/PulseSensorSketch.ino
// Variables int PulseSensorPurplePin = A0; // Senzorul de puls este conectat la pinul o int LED13 = 13; // Ledul care va licari este legat la punul 13 int Signal; // retine datele trimise de senzor(in mod analog). Valorile sunt intre 0 si 1024 int Threshold = 550; // aceasta variabi...
TOOL
0.927624
3.799808
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-07-22T09:59: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": "1be21357f4...
e69694a0-4a57-4098-946f-4d5277733afb
juny1905/2018_algorithm
기말고사 대비/FQP/FQP/main.cpp
#include <stdio.h> #include <stdlib.h> #define SZ 5 int BOARD[SZ][SZ]; int abs(int v) { if (v < 0) return -v; return v; } int checkUpside(int x, int y) { // 놓을수 있으면 1, 놓을수 없으면 0 for (int i = x-1; i >= 0; i--) { if (BOARD[i][y] != 0) return 0; } return 1; } int checkDiagonal(int x, int y) { // 놓을수 있으면 1, 놓을...
ALGO
0.99997
4.833265
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-12-12T01:12: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": "d62c21dc69...
33802000-afa3-461c-951c-d9eb1e2093ed
shamimjucse/Algorithms
Vector.cpp
#include<bits/stdc++.h> #define ll long long #define pi 3.141592653589793 #define eps 0.000001 using namespace std; int dcmp(double x){if(fabs(x)<eps) return 0;else return x<0 ? -1 : 1;} struct Point { double x,y; bool operator < (const Point &a)const {return dcmp(x-a.x)<0 || (dcmp(x-a.x)==0 && dcmp(y-a.y)...
ALGO
0.999977
3.840523
{ "github_metadata": { "branch": "master", "commit_count": 182, "repo_created_at": "2019-01-27T17:11: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": "e364b529...
36ca7fd7-97d1-48a0-8ffb-e049a5c9604b
annie12321/USACO-Gold-Basic
picnic.cpp
#include <iostream> #include <algorithm> #include <set> #include <vector> #include <queue> #include <stack> using namespace std; int debug = 0; #define N_MAX 1001 #define K_MAX 101 #define INF -1 struct component { long int x; long int y; }; vector<int> C(K_MAX); vector<vector<int>> G(N_MAX); bool cmp (com...
ALGO
0.999943
3.575977
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2020-02-03T00:19: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": "00c652a3f...
c8cf80f4-e0e2-465e-bdfd-6bf18df4b250
a858438680/data_structure_homework
header/MyTree.h
#ifndef TREE_BASE_H #define TREE_BASE_H #include "MyStack.h" #include "MyQueue.h" #include <iostream> namespace alan { template <class T> struct node { T value; node<T>* left; node<T>* right; }; template <class T> class tree_base { public: tree_base(): tree(nullptr) {} tree_base(const tree_base& x): t...
ALGO
0.963648
4.065307
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2018-10-16T01:20: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": "36e52df96...
96156419-c2cc-4c4b-a1d0-5cfa21237445
rjsrnr/Algorithm
백준/Silver/2805. 나무 자르기/나무 자르기.cc
#include <iostream> #include <vector> #include <algorithm> using namespace std; int arr[1000001]; int main() { ios::sync_with_stdio(0); cin.tie(0); int N, M; cin >> N >> M; int maxval = 0, minval = 21e8; for (int i = 0; i < N; i++) { cin >> arr[i]; maxval = max(maxval, arr[i]...
ALGO
0.999999
4.223154
{ "github_metadata": { "branch": "main", "commit_count": 156, "repo_created_at": "2023-11-25T12:05: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": "c7bce741c3...
26b3c704-510f-4b97-8a02-c7ad21a5796c
paulot/interview
Graph/Dijkstra/graph.cpp
#include <iostream> #include <string> #include <vector> #include <map> #include <queue> #include <limits.h> #include "Helpers.cpp" using namespace std; template <class T> class Graph { public: Graph () { }; Graph (T item) { }; void Insert (T item); void ...
ALGO
0.999546
3.908524
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2014-07-27T02:10: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": "b725427e37...
299af722-d72f-4715-a990-a54ecb93a2ae
VastoLorde95/Competitive-Programming
Hackerrank/Company Contests/Zalando Codesprint 2016/Problem F/F.cc
#include <bits/stdc++.h> #define sd(x) scanf("%d",&x) #define sd2(x,y) scanf("%d%d",&x,&y) #define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z) #define fi first #define se second #define pb push_back #define mp make_pair #define foreach(it, v) for(__typeof((v).begin()) it=(v).begin(); it != (v).end(); ++it) #define meta __FUN...
ALGO
0.999737
3.879362
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2017-07-25T11:08:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 171, "forks": 41, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e58ce1...
957fc688-8a2c-43e4-a03a-013c99dfc6b7
pskliff/21-weeks-of-algos
Xetd71/week5/list_helpers.h
#ifndef WEEK5_LIST_HELPERS_H #define WEEK5_LIST_HELPERS_H #include <iostream> struct Node { int val; Node *next; Node(int x) : val(x), next(nullptr) {} ~Node() { delete next; } }; Node* readList() { int n, v; std::cin >> n >> v; Node* root = new Node(v); Node* cNode = root; for(int...
ALGO
0.999317
4.058403
{ "github_metadata": { "branch": "master", "commit_count": 264, "repo_created_at": "2018-03-05T09:14:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7631d2ed...
457c585c-689a-44b8-ac04-75f7f4738e13
vldmalov/SamplesCPP
SapLessons/2019_Coursework/st_syst.cpp
/*************************************************************************/ /* st_syst */ /* ======= */ /* Расчёт простой стержневой системы по МКЭ */ /***************...
ALGO
0.999739
3.539681
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2016-09-11T10:34: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": "5f4c92265...
d5f8ebbe-4eba-4499-84bd-91d7f3579172
Nagisa12321/CPP-Primer
code/ch16/compare.cpp
#include "primer.h" #include <cstring> using namespace std; template <typename T> int compare(const T &lhs, const T &rhs) { cout << "template <typename T> \n" << "int compare(const T &lhs, const T &rhs)" << endl; if (lhs < rhs) return -1; else if (rhs < lhs) return 1; return 0; } /...
TOOL
0.932273
4.039018
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2021-09-11T04:25:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a6374724c...
29706ee9-c761-490f-a57a-7aba63b4a06a
avnermosh/avnerV1
meshlabjs/sources/Transform.cpp
#include "mesh_def.h" #include <vcg/complex/algorithms/smooth.h> #include <vcg/complex/algorithms/update/position.h> #include <vcg/complex/algorithms/local_optimization/tri_edge_flip.h> using namespace vcg; using namespace std; void LaplacianSmooth(uintptr_t _meshPtr, int step, bool useLaplacianWeights) { MyMesh &m...
ALGO
0.981806
3.087225
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-02-22T14:24: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": "c278939b7a...
607cc277-2f2a-4478-abf7-132601975603
Julio-Maldonado/Kattis
489/set13/primeReduction.cpp
#include <math.h> #include <iostream> using namespace std; bool arr[1000000000]; bool isPrime(long long n) { if (n < 2) return false; else if (n < 4) return true; else if (n % 2 == 0 || n % 3 == 0) return false; else if (arr[n]) return true; long long x = (long lon...
ALGO
0.999901
4.017706
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-05-07T02:22:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80ad0c433c...
ebacd88f-cb2d-4962-8deb-0e70c3011fa8
Ro-hit16/graph-Code
BellmanFor algo.cpp
#include <iostream> #include <vector> using namespace std; vector<int> bellmanFord(int V, vector<vector<int>>& edges, int src) { // Initialize distances: 10^8 for unreachable nodes, 0 for source int INF = 1e8; vector<int> distance(V, INF); distance[src] = 0; // Relax edges up to V-1 times for ...
ALGO
0.999993
6.03581
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-11-06T12: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": "198dd19248a8...
3da78622-642c-4809-8cb1-a50099fca28f
tickelton/playground
challenges/lc/strings/apply_operations_to_make_string_empty.cpp
/* # Apply Operations to Make String Empty You are given a string s. Consider performing the following operation until s becomes empty: * For every alphabet character from 'a' to 'z', remove the first occurrence of that character in s (if it exists). Return the value of the string s right before applying the last ...
ALGO
0.999848
5.674126
{ "github_metadata": { "branch": "master", "commit_count": 171, "repo_created_at": "2021-02-26T18:01: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": "dfd393a9...
ec0f4c47-3c78-4f47-9307-e99a12ee39d2
kliment-olechnovic/voronota
expansion_js/src/dependencies/gemmi/symmetry.hpp
// Copyright 2017-2019 Global Phasing Ltd. // // Crystallographic Symmetry. Space Groups. Coordinate Triplets. // // If this is all that you need from Gemmi you can just copy this file, // fail.hpp and LICENSE.txt to your project. #ifndef GEMMI_SYMMETRY_HPP_ #define GEMMI_SYMMETRY_HPP_ #include <cstdint> #include <cs...
ALGO
0.995142
6.832213
{ "github_metadata": { "branch": "master", "commit_count": 4420, "repo_created_at": "2019-08-22T12:20:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 35, "forks": 6, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "f0601f...
bf77c09a-d18a-4981-a451-b9c49c6b78f9
hsinanchen2007/MyClass
educative/Grokking The Coding Interviews Patterns For Coding Questions/Cyclic Sort/Find the Corrupt Pair (easy) v2.cpp
/* https://www.educative.io/courses/grokking-the-coding-interview/N7Vw2GBQr6D Solution This problem follows the Cyclic Sort pattern and shares similarities with Find all Duplicate Numbers. Following a similar approach, we will place each number at its correct index. Once we are done with the cyclic sort, we will it...
ALGO
0.999921
5.958362
{ "github_metadata": { "branch": "main", "commit_count": 309, "repo_created_at": "2022-12-19T05:40:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4864ca582...
0485e083-a0e6-448d-bb5b-9ece403bbae2
Clai101/Mat_belle
fit.cc
#include<test.h> int n_bins; double min_val; double max_val; double logLikelihood; std::string sig = "g"; std::string back = "che(1)"; const int n_par = 22; std::vector<double> result; std::vector<double> result1; std::vector<double> data1; std::vector<std::string> split(const std::string &s) { std::stringst...
DATA
0.985889
4.108728
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2023-07-11T14:47: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": "58b1bf9baa6...
711fccd5-6d8a-4d5c-96f4-04ae1f566826
EoinDavey/Competitive
ProjectEuler/p82.cpp
#include<iostream> #include<cstdio> #include<vector> #include<queue> using namespace std; const int N = 80; const int INF = 1000000; int board[N][N]; int dist[N][N]; struct path{ int x,y,d; path(int _x, int _y, int _d) : x(_x),y(_y),d(_d){} bool operator < (path p) const { if(d!=p.d) ...
ALGO
0.999309
3.515595
{ "github_metadata": { "branch": "master", "commit_count": 561, "repo_created_at": "2016-09-02T22:46:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d8c8c49...
9777eee6-afe1-4768-b849-8ee7c4ec5091
melonead/SphFluidSimulation
include/Hashtable.h
#ifndef HASHTABLE_H #define HASHTABLE_H #include <cstdint> #include <vector> #include <iostream> #include <glm/vec2.hpp> #include "Settings.h" /* Query for the neighbors of a point */ struct NeighborQuery { std::vector<unsigned int> neighborBucket; unsigned int size{0}; }; class HashTable { public: HashTa...
ALGO
0.95886
5.349228
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2025-05-17T12:01:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f9e7a4b0fe9...
d165f3ac-b728-4f59-bd1f-fafc27f9f658
MDmessi/DAA
Selection Sort.cpp
#include <stdio.h> void printArray(int arr[], int size) { int i; for (i = 0; i < size; i++) printf("%d ", arr[i]); printf("\n"); } void swap(int *xp, int *yp) { int temp = *xp; *xp = *yp; *yp = temp; } void selectionSort(int arr[], int n) { int i, j, min_idx; for (i = 0; i < n ...
ALGO
0.999965
5.12753
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-09T01:34: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": "5139d2d4d603...
940afa3e-2d47-4868-b12d-e4ff9835dc0b
MartynaKohutek/oop-put-course
project/src/Operations/VectorsAddition.cpp
#include <iostream> #include <cmath> #include "VectorsAddition.h" #include "Operation.h" using namespace std; Vector Vector::operator+(const Vector& other) const { return Vector(x + other.x, y + other.y); } void VectorsAddition::Equation() { cout << "You chose vectors addition!" << endl; cout << "Write in...
ALGO
0.971269
3.61827
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-03-06T15:37: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": "0603d9835eb...
b2742ffd-aead-4493-9171-00b164822b73
liweiyap/LeetCode_Solutions
Tree/0094_BinaryTreeInorderTraversal/Solution.cpp
// Runtime: 0 ms, faster than 100.00% of C++ online submissions for Binary Tree Inorder Traversal. // Memory Usage: 9.2 MB, less than 89.00% of C++ online submissions for Binary Tree Inorder Traversal. #include <vector> #include <stack> #include <algorithm> /** * Definition for a binary tree node. * struct TreeNode...
ALGO
0.999999
6.929276
{ "github_metadata": { "branch": "master", "commit_count": 116, "repo_created_at": "2020-01-23T17:17:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "10db11d8...
55eb671e-02d1-48ad-ab78-6ccfcaccf332
zhuangzi105/cpplearning
chapter10/chapter10/main.cpp
// // main.cpp // chapter10 // // Created by 张蓉蓉 on 2018/11/16. // Copyright © 2018 gaoss. All rights reserved. // #include <iostream> #include <vector> #include <deque> #include <list> #include <functional> #include <algorithm> using namespace std; void ch10_3() { vector<int> ivector; cout<<ivector.capacit...
TOOL
0.998238
4.04428
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2018-11-02T03:43: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": "347d03f97...
89a0b6ab-1af8-4ec2-835e-6b57b133afce
cheerayhuang/leetcode
count-and-say/count-and-say.cc
/************************************************************************** * * Copyright (c) 2014 Nibirutech, Inc. All Rights Reserved * www.Nibirutech.com * * @file: count-and-say.cc * @author: <NAME> * @email: <EMAIL> * @date: 11-05-2014 11:41:11 * @version $Revision$ * **********************************...
ALGO
0.999835
6.089942
{ "github_metadata": { "branch": "master", "commit_count": 146, "repo_created_at": "2014-10-25T15:02:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d3aa2be...
28600010-0a94-4a91-9d43-4d89cbb69deb
Wild-Donkey/Code
ZROJ/C1-C999/C935/B_Faq.cpp
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <vector> #define Wild_Donkey 0 using namespace std; inline unsigned RD() { unsigned intmp(0); char rdch(getchar()); while (rdch < '0' || rdch ...
ALGO
0.999988
3.146481
{ "github_metadata": { "branch": "main", "commit_count": 182, "repo_created_at": "2021-02-23T08:38:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "204d2dfdee...
7d6265ac-0f7d-4413-8848-ce8ba197e6d7
Sekakou/OIsrc
data_structure/seg_tree/5608whk.cpp
#include <bits/stdc++.h> #define int long long using namespace std; const int MOD = 1e9 + 7; int from = -1, cache = -1, now; int qpow(int a, int k) { a %= MOD; int res = 1; while (k) { if (k & 1) res = res * a % MOD; a = a * a % MOD; k >>= 1; } return res; } ...
ALGO
0.999924
5.073977
{ "github_metadata": { "branch": "master", "commit_count": 146, "repo_created_at": "2023-01-17T01:23: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": "be67b988...
a98b7414-fcaf-48e5-806c-4ccf5b5bb96f
Tora416/MultiCodeEmbed
dataset/dataset_raw/gcj_cpp/csegura/5304486_5760761888505856_csegura.cpp
#include <algorithm> #include <float.h> #include <iostream> #include <limits.h> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdlib.h> #include <string.h> #include <strings.h> #include <vector> using namespace std; int main() { int te...
ALGO
0.999863
4.192079
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2025-07-10T08:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2eaa8c84c...
6f049502-349b-4c79-a8d7-dbb5b40a310c
BertrandLira/APA
main.cpp
#include <bits/stdc++.h> using namespace std; #define QTD_VIZINHANCAS 3 struct Lines{ vector<int> products; //vetor com os índices dos produtos int time; //tempo total de cada linha }; int nLines; int nProducts; int *productTime; int **matrix; void readFile(int* nLines, int* nProducts, int** productTime, int***...
ALGO
0.999956
3.020862
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-12-13T00:38: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": "637f79d8031d...
277375f0-d793-4055-a012-351958855731
bxyang/helloworld
others/gc.cc
#include<cstdlib> #include<cstdio> #include<string.h> #include<list> #include<iterator> #include<vector> #include<algorithm> #include<iostream> using namespace std; bool cmp(int i, int j) { return i > j; } int main() { FILE* fin = fopen("C-large.in", "r"); FILE* fout = fopen("C-large.out", "w"); int c...
ALGO
0.999663
3.488913
{ "github_metadata": { "branch": "master", "commit_count": 173, "repo_created_at": "2013-05-17T06:18:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98d75cbf...
dcfe7525-ba80-4a9a-a233-0c330d1a6ff2
SAAD2129/DSA-JULY
CondingNinjas/Trees/BinarySearchTrees/Treex.cpp
#include<bits/stdc++.h> #define ll long long #define lli ll int #define vi vector<int> #define vs vector<string> #define vss vector<vs> #define vc vector<char> #define vii vector<vi> #define pii pair<int,int> #define vip vector<pii> #define ff first #define ss second #define rep(i,a,b) for(int i=a;i<n;i++) const int N...
ALGO
0.999985
4.329711
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-08-01T11:07: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": "65ff3655d28b...
7a197413-922f-4c14-924d-e9dbd5274ed0
matheusmso/code
codcad/techniques/mergesort/mergesort.cpp
#include<bits/stdc++.h> using namespace std; const int N = (int)1e5+7; int n, v[N], t[N]; void mergesort(int l, int r) { if (r-l <= 1) return; mergesort(l, (l+r)/2); mergesort((l+r)/2, r); int i = l; int j = (l+r)/2; int k = 0; while (i < (l+r)/2 && j < r) { if (v[i] >= v[j]) ...
ALGO
0.999997
4.574794
{ "github_metadata": { "branch": "master", "commit_count": 388, "repo_created_at": "2016-04-21T01:48: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": "c2e623bc...
74735f7f-d692-4aed-802b-3c65fb08a6b9
erf-model/ERF
Source/ERF_ProbCommon.H
#ifndef ERF_PROBCOMMON_H_ #define ERF_PROBCOMMON_H_ #include <AMReX_ParmParse.H> #include <AMReX_Geometry.H> #include <AMReX_FArrayBox.H> #include <AMReX_MultiFab.H> #include "ERF_DataStruct.H" #include "ERF_EOS.H" #include "ERF_HSEUtils.H" #include "ERF_TileNoZ.H" struct ProbParmDefaults { amrex::Real rho_0 = 1...
ALGO
0.967932
5.519699
{ "github_metadata": { "branch": "development", "commit_count": 4057, "repo_created_at": "2020-10-21T21:05:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 40, "forks": 52, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "5...
53fbada7-792f-4123-a6d4-ee8ba999c6ac
arshbhatia8/Leetcode-Problems
0074-search-a-2d-matrix/0074-search-a-2d-matrix.cpp
class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { int r = matrix.size(); if (r == 0) return false; int c = matrix[0].size(); int r1 = 0, r2 = r - 1, mid; // Declare r2 separately while (r1 < r2) { mid = r1 + (r2 - r1) /...
ALGO
0.999827
5.974897
{ "github_metadata": { "branch": "master", "commit_count": 1075, "repo_created_at": "2022-10-15T17:00:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c8106ad...
4f90d4be-9871-4252-b753-67143e52dd27
itsamrit/DSA
Graph/🟠Kruskal min spanning tree.cpp
//Tc=o(eloge) [note: tc=O(eloge)+O(e*4*alpha), Since o(e*4*alpha) is too small it is considered constant. Hence tc=o(eloge) // We can also use kruskal for cycle detection in graph. vi par; vi rankk; bool compare(vi x,vi y){ return x[2]<y[2]; } // if {1,2,3,4} is a disjoint set par[1]=par[2]=par[3]=par[4]=1 or ...
ALGO
0.999863
4.250262
{ "github_metadata": { "branch": "main", "commit_count": 660, "repo_created_at": "2022-09-17T17:43:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9df16fee76...
779cedd8-8018-489d-a387-eefaf579fbfd
qze841/modcpp
SegmentTree/maxValue_freq_4n.cpp
// Type your code here, or load an example. // Get the max element and the number of times it occurs in the range #include <bits/stdc++.h> using vi = std::vector<int>; using pair = std::pair<int,int>; using vpair = std::vector<pair>; //Combine function auto combine(pair a, pair b){ if(a.first > b.first) return a;...
ALGO
0.999332
4.819354
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-03-25T19:05: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": "15ac6610dad6...
b5116115-ea18-4897-bd5f-4a6b6b39884b
VinhTungg/PTIT_TRR2
CT006 - CHU TRINH HAMILTON 03.cpp
#include <bits/stdc++.h> #define ll long long #define boost ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define MOD 1000000007 using namespace std; int t = 1, n, u, MinVal = INT_MAX, ans = INT_MAX; vector<vector<int>> edge(105, vector<int>(105, 0)); vector<int> path, res; vector<bool> visited(1...
ALGO
0.999965
3.964693
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-05-08T06:00:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f205f3206aac...
fbf1bdcc-efe1-49f0-b218-2e6c8c893117
SHL0915/BOJ_Problem_Solving
백준/Gold/2655. 가장높은탑쌓기/가장높은탑쌓기.cc
#include <bits/stdc++.h> using namespace std; typedef pair<pair<int, int>, pair<int, int>> piiii; int N, ans; piiii arr[101]; int table[101][2]; vector <int> v; bool cmp(piiii A, piiii B) { return A.first.first > B.first.first; } int main(void) { ios::sync_with_stdio(false); cin.tie(0); cin >> N; for (int i = 1...
ALGO
0.999995
4.186984
{ "github_metadata": { "branch": "main", "commit_count": 2813, "repo_created_at": "2022-08-29T05:15: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": "f419f482e...
3ef272bf-9fd1-45a2-9fde-13e2657fe9dd
goltian/MathModelOfCrossroad
mathModelOfCrossroad.cpp
#include <iostream> #include <iomanip> #include <omp.h> #include <sstream> #include <fstream> #include "ServiceDevice.h" #include "DataManager.h" #include "mathModelOfCrossroad.h" constexpr auto CONST_REPEATS_OF_ONE_EXPERIMENT = 4; constexpr auto CONST_ORIENTATION_MODE = 3.0; constexpr auto CONST_COUNT_OF_EXPERIMENT...
ALGO
0.994445
4.520854
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2020-04-26T11:14:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "534caafba...
2f15dd92-9045-48f9-9ec3-c0a2cc64b36e
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/08/0817/personal_submission/cf993a_md.cpp
// 0817 #include <bits/stdc++.h> int main() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); std::array<int, 4> xs, ys; auto cin_sort = [&]() { for (int i = 0; i < 4; ++i) { std::cin >> xs[i] >> ys[i]; xs[i] += 100; ys[i] += 100; } ...
ALGO
0.999886
4.400239
{ "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": "13d9...
54153abd-b2fc-4ad2-aebe-f9acec69518f
nebHailemariam/UVa
CHAPTER 4/UVa 10986/starter.cpp
#include <bits/stdc++.h> using namespace std; #define inf 1000000000 #define ii pair<int, int> vector<vector<ii>> ADJ_LST; int dist[20010]; int n, m, S, T; void dijkistra(int source) { for (int i = 0; i < n; i++) dist[i] = inf; dist[source] = 0; priority_queue<ii, vector<ii>, greater<ii>> pq; ...
ALGO
0.999968
4.723521
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2020-05-23T13:57: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": "ee341e1ac...
c5323d19-19c1-4701-96d3-0279170e67f6
ishandutta2007/codeforces-c
cheissmart/normal/1284/D.cpp
#include <bits/stdc++.h> #define IO_OP std::ios::sync_with_stdio(0); std::cin.tie(0); #define F first #define S second #define V vector #define PB push_back #define MP make_pair #define EB emplace_back #define ALL(v) (v).begin(), (v).end() #define debug(x) cerr << #x << " is " << x << endl #define int ll using namespa...
ALGO
0.999722
3.756431
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17: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": "5aebab89367b...
fa2be1b6-761a-4067-b103-aa6c3d5e9193
abhishekdagar/Code_Practice
find_peak_element.cpp
#include<bits/stdc++.h> using namespace std; //https://leetcode.com/problems/find-peak-element/description/ //draw input graph on paper to understand better and why it's solved using BS //since till peak it's inc and sorted and after peak it's dec and sorted int peak(vector<int> &arr, int n) { if (n == 1) //if only 1 ...
ALGO
0.999875
4.709103
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2023-07-31T14:59: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": "0012dac56ea...
fe500db1-2371-41d3-975f-9432d0df337f
j316chuck/Competitive-Programming
C++_Solutions/Problems/USACO/2014-2016 USACO Training/USACO Training/Section 2.3/zerosum.cpp
/*ID: j316chuck PROG: zerosum LANG: C++ */ #include <iostream> #include <cstdio> #include <algorithm> #include <string.h> #include <stdio.h> #define Set(a, s) memset(a, s, sizeof (a)) #define Rd(r) freopen(r, "r", stdin) #define Wt(w) freopen(w, "w", stdout) #define MAX 1001 using namespace std; int N; int result; ...
ALGO
0.999823
3.504821
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2017-01-30T20:34:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ceb932d1...
81bf8b62-6a46-4c94-b1b6-62bc53a815a1
caiofreitaso/universal-algebra
algebra.h
#ifndef ALGEBRA_H #define ALGEBRA_H #include "monomial.h" #include "matrix.h" #include <time.h> #include <omp.h> template<class K, class T> class Algebra; template<class K, class T> struct Relation { Polynomial<K,T> monomials; }; template<class K> struct Identity : public Relation<K,unsigned> { template<class T> ...
ALGO
0.994997
4.59706
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-04-17T16:44: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": "dcba7b7dff...
9743c6ea-c289-4218-bd96-f027c483d507
Guminsung/Algorithm
BOJ/11054.cpp
#include <iostream> using namespace std; int Bitonic(int n); int v[1000]; int DP_L[1000]; int DP_R[1000]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, num; cin >> n; for (int i = 0; i < n; i++) { cin >> num; v[i] = num; } cout ...
ALGO
0.999985
4.323618
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-10-20T18:02: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": "e4bd5c2b6187...
c06a2a27-e134-4b27-a046-706c66d28eb9
ABelekar2101/semVIII
bfs.cpp
#include <bits/stdc++.h> #include <omp.h> using namespace std; class Graph { public: vector<vector<int>> graph; vector<bool> visited; int vertices = 0; int edges = 0; Graph() { cout << "\nEnter number of nodes: "; cin >> vertices; cout << "\nEnter number of edges: "; ...
ALGO
0.99987
5.950819
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-05-18T02:25: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": "eeda871393a...
d14ca9d8-19bf-4178-842e-0085b0be624d
Ping-Group-UCSC/denmat_dynm_development
src_FeynWann_forDMD/lindbladInit_for-DMD-4.5.6/electron_ana.cpp
#include "electron.h" std::vector<std::vector<vector3<>>> electron::compute_bsq(){ std::vector<std::vector<vector3<>>> bsq(k.size(), std::vector<vector3<>>(nBandsSel)); for (size_t ik = 0; ik < k.size(); ik++){ //diagMatrix Ek = state_elec[ik].E(bStart, bStop), dfde(nBandsSel); diagMatrix Ek = state_elec[ik].E(b...
ALGO
0.99584
3.695622
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2020-07-22T02:49:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6e4e74b3d8...
80a614a8-fb01-4819-a69d-754938285fc0
sejung-hong/Study_Recode
코딩테스트/카카오 인턴/kakao2.cpp
//카카오 2번 #include <iostream> #include <vector> #include <queue> #include <utility> #include <algorithm> #include <string> using namespace std; bool visited[6][6] = { false, }; vector<string> place1; int nx[4] = { -1, 0, 1, 0 }, ny[4] = { 0, 1, 0, -1 }; int check = 0; //BFS 넓이 우선탐색 void BFS(int i, int j) { check = 0; ...
ALGO
0.999743
4.780202
{ "github_metadata": { "branch": "main", "commit_count": 283, "repo_created_at": "2021-01-21T09:39: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": "221e1ac6ed...
108edecb-58ec-487b-ac1d-e64ad10f6afb
jolleboi96/hands-on-reinforcement-learning-icsc-2025
blond/cpp_routines/histogram.cpp
/* Copyright 2016 CERN. This software is distributed under the terms of the GNU General Public Licence version 3 (GPL Version 3), copied verbatim in the file LICENCE.md. In applying this licence, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organiz...
ALGO
0.996295
5.229344
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2025-03-14T09:02: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": "ee160d5f3...
504385af-c707-4fa0-84b8-2e1b77b80b60
MariamAmrE/mips-ode-solver
solveUsingHighLevelLanguage.cpp
#include <iostream> #include <math.h> using namespace std; /*void solve_ODE_numerically_using_Euler (long long y0 , long long h , long long n ){ long long y = y0 , yDash; long long i ; for( i=0; i<n ; i++){ yDash = 1 - i*h + 4*y; y = y + h*(yDash);...
ALGO
0.999965
3.506839
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-07-13T07:20: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": "f497efea4cc6...
70fe8a9c-cbbc-4133-9a67-a066ce9cbbb4
rafgitdz/bimodal-scheduler-rstm
bench/LFUCache.cpp
/////////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2005, 2006 // University of Rochester // Department of Computer Science // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the fo...
TEST
0.927071
6.210581
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2015-09-11T10:11: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": "268b2b8a7...
0bdf2434-5416-4248-be0c-ca30ace63ed3
nirmalsinhp/AlPrac
treelist.cpp
#include <bits/stdc++.h> using namespace std; // Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *left, TreeNod...
ALGO
0.999993
4.961866
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-09-24T06:42: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": "f93323ab2ed...
64cbdfa2-b329-4eac-a80b-f76e1e1c60b1
mqjinwon/autochargersystem
main.cpp
#include "Comm.h" #include <iostream> #include <vector> #include <queue> #include <time.h> #include <Windows.h> #include <cstdlib> #include <ctime> #include <chrono> #include "tracemap.h" #include "Linetracer.h" using namespace std; #define PORTNUM "COM15" ///////////////////////////////////////////////////충전알고리즘에서...
TOOL
0.94379
3.353499
{ "github_metadata": { "branch": "updating", "commit_count": 36, "repo_created_at": "2019-08-07T09:03: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": "755b69f...
b8e0216a-2c5e-4bc0-8122-64ecc14e9168
Tianyi-Tang/Poj_Algorithm_Practice
Mixed/Test_file/1401/fileReadyTest.cpp
#include <iostream> #include <cstdlib> #include <cstring> #include <cstdio> #include <fstream> using namespace std; struct Line{ bool yValue; double slope; double constance; }; int lineX1,lineY1,lineX2,lineY2,maxX,maxY,minX,minY,resultX,resultY; void findLine(Line & a,int x1,int y1,int x2,int y2){ if(x1 - x2 ==...
ALGO
0.998002
3.698587
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-05-26T23:17: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": "91c12b02afcb...
0888b7c2-97e8-48cf-8cde-e42e9f30a01a
bvquoc/CP-Trainning-2021
0 - Contest 2020/Ninh Binh PreVNOI 2017/PREVNOIA/Contestants/Ti066/TREE.cpp
#include <bits/stdc++.h> #define MAXN 5005 #define pb push_back using namespace std; int n,g[MAXN],d[MAXN],pa[MAXN],c[MAXN]; vector<int> a[MAXN],e,t,chil,q; long long mi=1e15,f[MAXN]; void xuly(){ long long s=0; for(int i=1; i<=n; i++) f[i]=0; for(int i=0; i<chil.size(); i++){ f[chil[i]]=q[i]; ...
ALGO
0.999702
3.611222
{ "github_metadata": { "branch": "master", "commit_count": 611, "repo_created_at": "2020-06-03T07:47: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": "ef53f3fc...
d9003390-1ea8-492c-b36e-b2ee1fa0f8a9
NREL/EnergyPlus
src/EnergyPlus/HeatBalanceIntRadExchange.cc
// EnergyPlus, Copyright (c) 1996-2025, The Board of Trustees of the University of Illinois, // The Regents of the University of California, through Lawrence Berkeley National Laboratory // (subject to receipt of any required approvals from the U.S. Dept. of Energy), Oak Ridge // National Laboratory, managed by UT-Batt...
ALGO
0.99686
4.696086
{ "github_metadata": { "branch": "develop", "commit_count": 40658, "repo_created_at": "2013-11-22T14:47:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1278, "forks": 441, "issues": 908, "pull_requests": 48 }, "file_meta": { "content_id":...
55960a0b-79cc-4646-b03c-37407f803035
xuelei7/AOJ
Volume0(PCK)/aoj0089_TheShortestPathOnARhombicPath.cpp
// 最短経路 // 図1に例示するように整数(0 以上 99 以下)をひしがたに並べます。このような、ひしがたを表すデータを読み込んで、一番上からスタートして一番下まで次のルールに従って進むとき、通過する整数の和の最大値を出力するプログラムを作成してください。 // 各ステップで、対角線上の左下か対角線上の右下に進むことができます。 // 例えば図1の例では、図2に示すように、7,3,8,7,5,7,8,3,7を選んで通ったとき、その和は最大の 55 (7+3+8+7+5+7+8+3+7=55) となります。 // Input // 入力例に示すように、カンマで区切られた整数の並びが、ひし形状に与えられます。各行に空白文字...
ALGO
0.999974
4.372117
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-11-10T14:11:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8924cc6b5446...
a9324bf4-0f03-4ec8-ac01-a22af74f55f0
kevinzhang334455/leetcodeCpp
BestTimeToBuyAndSellStockIV.cpp
#include <vector> #include <iostream> using namespace std; /* You are given an integer array prices where prices[i] is the price of a given stock on the ith day, and an integer k. Find the maximum profit you can achieve. You may complete at most k transactions. Note: You may not engage in multiple transactions simu...
ALGO
0.999889
5.777087
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2020-06-22T04:30: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": "aa5fa98ba...
c206e1f8-0727-43a1-9f9f-8a48bd78a98a
liuyubobobo/Play-Leetcode
2001-2500/2263-Make-Array-Non-decreasing-or-Non-increasing/cpp-2263/main.cpp
/// Source : https://leetcode.com/problems/make-array-non-decreasing-or-non-increasing/ /// Author : liuyubobobo /// Time : 2022-06-09 #include <iostream> #include <vector> #include <algorithm> using namespace std; /// DP + Basic Optimization /// Time Complexity: O(n * maxv) /// Space Complexity: O(n * maxv) clas...
ALGO
0.999989
5.837831
{ "github_metadata": { "branch": "master", "commit_count": 2592, "repo_created_at": "2016-12-01T17:08:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2732, "forks": 718, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "89...
cb90f481-7cd5-4183-9277-2640424975b9
iseol/CP
BOJ/2000/2447.cpp
#include <iostream> using namespace std; int n; char board[2187][2187]; void sol(int n, int r, int c) { if (n == 3) { for (int i = r; i < r+n; i++) { for (int j = c; j < c+n; j++) { if (i-r == 1 && j-c == 1) board[i][j] = ' '; else { board[i][j] = '*'; } } } return; } int third = n/3...
ALGO
0.999926
4.034145
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2020-12-22T04:45: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": "0dc79992f...
dc882444-1ddc-40e0-b1c5-1cb769d529b4
Tedxz/Online-Judge-Archive
URAL/Ural_1569.cpp
/*Ural 1569*/ #include<cstdio> #include<bitset> #include<queue> #include<algorithm> using namespace std; const int MAX_N=110, MAX_M=10010; struct edge { int a,next; }; int n,m,ans=0X10000000; int head[MAX_N]; edge e[MAX_M*2]; bitset<MAX_M> tem,sol; inline void add_edge(const int &u, const int &v) { static int t...
ALGO
0.999958
3.307241
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-08-28T15:31: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": "4f96ed9035...
8469625e-7794-4a98-8cea-931c47813600
Wsh7Ash/LEETCODE
cpp/c0-500/101-150/maxProfit-1.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: int maxProfit(vector<int>& prices) { int min_price = INT_MAX; // Initialize the minimum price to a very large number int max_profit = 0; // Initially, the maximum profit is 0 ...
ALGO
0.999987
6.557565
{ "github_metadata": { "branch": "master", "commit_count": 365, "repo_created_at": "2025-03-26T15:51:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7071bb6a...
f6ddc56f-fc2f-405d-9f16-ff68d5c7a111
kramer04/France-Ioi
Niveau 3/Opérations avancées sur les chaînes de caractères/Inversion de dictionnaire/main.cpp
#include <iostream> #include <string> #include <algorithm> int main() { std::ios::sync_with_stdio(false); int nbMots{0}; std::cin >> nbMots; std::cin.ignore(); std::string mot1 [100], mot2 [100], s1{""}, s2{""}; for (int i{0}; i < nbMots; i++) { std::cin >> mot1 [i] >> mot2 [i]; } for (int i{1}; i...
ALGO
0.999984
4.30751
{ "github_metadata": { "branch": "main", "commit_count": 470, "repo_created_at": "2024-06-18T16:28: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": "29ab73fa2f...
aa7ce1b7-1ff6-4fcc-abec-e5d0db017198
lucianoscarpaci/Programming-in-Cpp
14.12.cpp
/* This program displays total cost of purchase for given number of units by user. */ #include<iostream> using namespace std; int main() { //Declare variables int countPackage; double price; //Display a message to enter the number of packages. cout << "Enter the number of packages to purchase: \n...
ALGO
0.991875
4.351505
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-08-15T01:31:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "460807057b93...
6c3cc3ec-f8cd-47c2-8fac-795661e91245
fetchai/ledger
libs/semanticsearch/include/semanticsearch/schema/semantic_reducer.hpp
#pragma once //------------------------------------------------------------------------------ // // Copyright 2018-2020 Fetch.AI Limited // // 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 Licen...
TOOL
0.969174
6.335041
{ "github_metadata": { "branch": "master", "commit_count": 2056, "repo_created_at": "2018-01-15T16:15:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 84, "forks": 43, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa8948...
98664f84-2040-4976-86b2-3ae09affcb17
cran/hergm
src/RcppExports.cpp
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: 1<PASSWORD> #include <Rcpp.h> using namespace Rcpp; // isTauSignificantlyChanged bool isTauSignificantlyChanged(double tauPrecision, NumericMatrix tau, NumericMatrix prevTau); RcppExport SEXP hergm_isTauSignificantlyChanged(SE...
ALGO
0.99955
4.165908
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2014-03-13T04:58:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c7da80906...
bd274c99-9feb-4ae0-8d08-25aadad146a5
Oxmose/SATSolver
dev/src/Old/Core/SATSolverSTD.cpp
#include "SATSolver.h" #include "SATSolverSTD.h" using namespace std; SATSolverSTD::SATSolverSTD() { OUTDEBUG("Using standard solver."); } SATSolverSTD::~SATSolverSTD() { } void SATSolverSTD::initializeMethod() { for(auto iClause : m_unsatClauses) for(auto lit : m_clauses[iClause].getLiterals()) ...
ALGO
0.999418
4.881529
{ "github_metadata": { "branch": "master", "commit_count": 384, "repo_created_at": "2016-02-03T09:18: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": "153e551d...