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
8918aeae-0460-4cff-b4b5-5fccb73272b5
XFRCSD45/GeeksForGeeks
Easy/Find Nth root of M/find-nth-root-of-m.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: //in the fun function we are finding the power of mid to the we are //returning 0 if mid to the power of n is less than m , 1 if it equals to m and 2 if its greater than m int fun(int mid, int m, int n...
ALGO
0.999954
5.983913
{ "github_metadata": { "branch": "main", "commit_count": 368, "repo_created_at": "2023-08-04T17:06: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": "65ade8c494...
603ea84d-b498-4a3b-9284-3a37479b9614
eastgerm/eastgerm-algo
BOJ/Math/2484. 주사위 네개.cpp
// // Created by kimdong on 2019-08-16. // #include <iostream> #include <vector> #include <algorithm> using namespace std; int N; vector<int> res(4, 0); int ans; void input(); int dice(); void output(); int main() { cin >> N; for (int i = 0; i < N; i++) { input(); int now = dice(); ...
ALGO
0.999645
4.283557
{ "github_metadata": { "branch": "master", "commit_count": 219, "repo_created_at": "2019-11-03T06:30: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": "77513faa...
4c57796d-4b91-46be-84b0-57f8a8d5ed4f
etadmor/centpack
src/2d/SD3/reconstruction_diag_2d_SD3.cc
//////////////////////////////////////////////////////////////////////////// // // CentPack -- A generic numerical solver for hyperbolic conservation // laws and related time dependent problems // // Copyright (C) 2006 <NAME> and <NAME> // // reconstruction_diag.cc -- a core function of CentPack // // Funct...
ALGO
0.999695
5.060675
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-02-17T22:00:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b7c1683fb...
6013a7cd-52b4-41bd-8fc4-4ebf04d86f34
JJandot/M2_CodageEtCompressionMultimedia
Crypto/TP2/chiffrement.cpp
#include <iostream> #include <cmath> #include <vector> #include "../../libs/ImageBase.h" bool estPremier(int nb){ int close = floor(sqrt(nb)); for(int i = 2; i <= close; ++i){ if(nb % i == 0) return false; } return true; } bool sontPremiers(int a, int b){ int mod = a % b; ...
ALGO
0.999238
4.112797
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2018-09-10T10:09: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": "fc9888126...
2d65f2bf-2c85-4a00-a997-e5031ceb0c21
gokulkrishna-k/data-structures-and-algorithms
pepcoding/level 1/remove-first-linked-list.cpp
// PROBLEM //https://pepcoding.com/resources/online-java-foundation/linked-lists/remove-first-linked-list-official/ojquestion #include <iostream> #include<string> using namespace std; class node{ public : int data; node* next; }; class linked_list{ public: node* head, *tail; int size = 0; public: linked_...
TOOL
0.960712
4.075352
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-07-18T10:59: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": "88aa43f31...
82b51fe4-65f4-422b-acea-f4aaf8ce0763
zmx4/MySteps
codeforces/2025年3月/B_Gifts_Fixing.cpp
#include <bits/stdc++.h> #define endl "\n" #define ll long long using namespace std; void solve() { int n;cin>>n; vector<int>candy(n),orange(n); for(int i = 0;i < n;i++)cin>>candy[i]; for(int i = 0;i < n;i++)cin>>orange[i]; int mincan = *min_element(candy.begin(),candy.end()); int minorg = *mi...
ALGO
0.999948
4.545244
{ "github_metadata": { "branch": "master", "commit_count": 317, "repo_created_at": "2024-11-25T11:00:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4be119f8...
269b5f81-08cc-4349-b130-413cbdf737a0
yeunjoo121/2021_KAU_DataStructure
hw00/BinarySearch.cpp
#include <iostream> #include <vector> #include <algorithm> #include <stdlib.h> #include <string> #include <sstream> using namespace std; void displayArr(vector<int> arr) { for(int i = 0; i < arr.size(); i++) { cout << arr[i] << " "; } cout << endl; } void selectionSort(vector<int> *arr) { ...
ALGO
0.999743
3.917865
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-01-15T05:55: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": "bfc59b31bdd0...
9cb86a98-cfb3-44c2-895a-1f9fb08d908a
mossXie/2025Cpp
e9.cpp
#include <iostream> using namespace std; class Vector_2d{ public: Vector_2d(double x = 0.,double y = 0.){ x_ = x; y_ = y; } void print(const char*str)const; Vector_2d operator+(const Vector_2d & op) const; Vector_2d operator-(const Vector_2d & op) const{ return Vector_2d(x_ - op.x_,y_ - op.y_);//sim...
TOOL
0.953462
4.00767
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2025-02-16T11:45: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": "7aee52e3c26...
ab66825d-720a-4484-8575-7dbcf6ef8401
pedrocanddz/Maratona2023
2022/Aula2/eko.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, m; scanf("%d", &n); scanf("%d", &m); int array[n]; for (int i = 0; i < n; i++) { scanf("%d", &array[i]); } sort(array, array + n); // 4 7 // 10 15 17 20 // 20 - 17 = 3 // 3 > 7 ? // 20 + 3 = ...
ALGO
0.999992
3.782004
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-03-03T19:26: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": "308795b4edd...
57ea96eb-0a1e-4123-bb1c-1b7738ceaf60
nlpming/leetcode
recurion_and_backstracking/47_permutations-ii.cpp
// // Created by 陈志明 on 2021/8/29. // /* * 考点:回溯,深度优先搜索; * 难度:*** * */ class Solution { public: vector<vector<int>> res; vector<bool> visited; void helper(vector<int>& nums, int index, vector<int>& tmp){ if(index == nums.size()){ res.push_back(tmp); return; } ...
ALGO
0.999981
6.24101
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2020-06-19T14:23: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": "a3acc8c60...
9fd9e7c1-0044-4abc-a345-76ade68c4a75
Leapense/problems
12046번: Not So Random (Small)/Not So Random (Small).cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; int main() { int T; cin >> T; for (int t = 1; t <= T; t++) { int N, X, K, A, B, C; cin >> N >> X >> K >> A >> B >> C; double expected = 0.0; for (int i = 0; i < 15; i++) { int k_i = (K...
ALGO
0.97243
4.116579
{ "github_metadata": { "branch": "master", "commit_count": 2661, "repo_created_at": "2024-10-12T10:53: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": "2e45447...
ded4a9c1-55e6-487f-a1f8-8fac762eef8c
godotengine/godot
thirdparty/spirv-cross/spirv_cfg.hpp
/* * Copyright 2016-2021 Arm Limited * SPDX-License-Identifier: Apache-2.0 OR MIT * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 *...
TOOL
0.938156
7.630196
{ "github_metadata": { "branch": "master", "commit_count": 76043, "repo_created_at": "2014-01-04T16:05:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 98972, "forks": 22820, "issues": 5000, "pull_requests": 3866 }, "file_meta": { "content...
347d4a43-240e-4bd9-927a-c67a7646af0c
ColorfulOrangeCN/oicode
zr-20-10-30/D.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 1001, maxp = 1e4+1; int f[maxp]; int A[maxn], B[maxn], C[maxn]; int main() { int T; cin >> T; while(T--) { memset(f, 0x3f, sizeof(f)); int N, P; cin >> N >> P; for (int i = 1; i <= N; ++i) cin >> A[i...
ALGO
0.999946
3.955648
{ "github_metadata": { "branch": "master", "commit_count": 165, "repo_created_at": "2020-10-29T08:08:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "913b050f...
172a1f71-3830-4aab-bb5c-2c9e845831e7
Netz00/attendance-monitoring-system
esp8266/src/buzzer/buzzer.cpp
#include "buzzer.h" // notes in the melody: int melody_accept[] = { NOTE_F5, NOTE_A5}; int melody_deny[] = { NOTE_B2, NOTE_E2}; // note durations: 4 = quarter note, 8 = eighth note, etc.: int noteDurations[] = { 4, 4}; void play(int accepted) { // iterate over the notes of the melody: for (int ...
TOOL
0.92265
5.224277
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-01-02T22:12: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": "2bc61b8924aa...
2cb3cce6-5951-4e71-8a40-3e138ec49d89
alex-eg/cellular-automaton
automaton.cpp
#include "automaton.hpp" #include <iostream> namespace ca { void Automaton::update(void) { for (u32 i = 0; i < height; i++) { for (u32 j = 0; j < width; j++) { state_count[(*front)(i, j)]--; (*back)(i, j) = transition[state[(*front)(i, j)].code](neighbours(i, j)); ...
ALGO
0.998966
4.580977
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2012-05-21T10:07:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "0ff39ad51...
18d5f2f5-17a5-488d-9b86-fa02d8988f5f
chasemalbright/CSCE221
graphAlgorithms/src/graph-algorithms.h
#pragma once #include <istream> #include <ostream> #include <sstream> #include <limits> #include <list> #include <queue> #include <string> #include <unordered_set> #include <unordered_map> #include "weighted-graph.hpp" #include "graph-types.h" // if the arrow is a box, change to the other line #define ARROW_SEPARAT...
ALGO
0.996085
6.423216
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-01-31T18:04:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10dde14bde3...
ddc37c54-25b7-4e2b-9120-b412bacef1b6
Siddeshwar002/DSA-again
String/Pattern Matching/number-of-subarrays-that-match-a-pattern-ii.cpp
#include <bits/stdc++.h> using namespace std; // Patter matching using KMP and Pi function // String pre-processing class Solution { public: int KMP(string s, string p) { s = p + '#' + s; cout << "S "; cout << s << endl; vector<int> Pi(s.length()); vector<int> ans; ...
ALGO
0.999945
5.011752
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-01-25T14:42: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": "aa4e84dcacf...
c0b9b2fc-2d3c-4f57-a61c-16b5fae37768
ishandutta2007/codeforces-b
bluediamond/normal/1535/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define int ll /// fflush(stdout); /// DO NOT FORGET TO FLUSH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! const int N = (int) 3e5 + 7; const int K = 300; /// CHANGE TO 300!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! int ...
ALGO
0.998349
3.529654
{ "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": "dbc1b1427a30...
eeb796fe-1360-4342-abe1-9dd09664ad5a
zengruizhao/Radiomics
tool/code/trunk/matlab/feature_extraction/grey/stdfilt3mexmt.cpp
#include "mex.h" #include <cmath> #include <algorithm> #include "../../general/maxNumCompThreads.h" /* undef needed for LCC compiler */ #undef EXTERN_C #ifdef _WIN32 #include <windows.h> #include <process.h> #else #include <unistd.h> #include <pthread.h> #endif #ifndef min #define min(X, Y) (X < Y ? X : Y...
ALGO
0.999087
4.882515
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-04-20T08:46:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "667620e808...
85756f2f-a534-48c4-820c-9a2427899688
glenn400/dataStructures
heaps/heap.cpp
#include <iostream> using namespace std; class PQueue { private: int *queue; int length; int capacity; void reheapDown(int root, int bottom ) { int max; int rc; int lc; lc = root * 2 + 1; rc = root * 2 + 2; if (lc == bottom) { max = lc; } else { if (queue[lc] <= queue[r...
ALGO
0.999081
4.348989
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-12-21T00:04: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": "1fbe45f6fb...
fcfd410a-09d4-4982-82e0-9c11c39dd947
in-silico/Maratones-src
UVA/2010/RWU/triangle.cpp
#include <cstdlib> #include <cstring> #include <cstdio> #include <cmath> #define REP(i,N) for(int i=0; i<(N); i++) #define REPB(i,N) for((i)=(N)-1; (i)>=0; (i)--) #define min(X,Y) ( ((X)<(Y)) ? (X) : (Y) ) #define max(X,Y) ( ((X)>(Y)) ? (X) : (Y) ) #define PREC 1E-6 #define f1(X) ( ((X)>0) ? (X) : 0 ) #define f2(X) ...
ALGO
0.99986
4.06619
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2012-07-30T00:42:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d784c2178ae...
0798d005-4990-4cb4-aee2-37f531bd32ac
Aniket118/Binary_Search_Research
Binary_All_implementation.cpp
#include <iostream> using namespace std; // easy version int f() { int left = 0, right = n - 1; while (left <= right) { int mid = left + (right - left) / 2; if (a[mid] == x) { return mid; } if (a[mid] > x) { right = mid - 1; } else { low = mid + 1; } } return -1; // no element } // 1) F F...
ALGO
0.9999
4.546852
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-12-28T20:57: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": "8376db2f04...
6cb8f493-87bd-402e-8dfe-8d3ac491acaa
ToLoveToFeel/LeetCode
Cplusplus/_0331_Verify_Preorder_Serialization_of_a_Binary_Tree/_0331_main.cpp
// Created by WXX on 2021/2/25 10:55 #include <iostream> using namespace std; /** * 执行用时:4 ms, 在所有 C++ 提交中击败了75.60%的用户 * 内存消耗:6.7 MB, 在所有 C++ 提交中击败了83.33%的用户 */ class Solution { public: int k; string s; bool isValidSerialization(string _s) { k = 0; s = _s + ','; if (!dfs()) ret...
ALGO
0.99935
4.42454
{ "github_metadata": { "branch": "master", "commit_count": 2211, "repo_created_at": "2019-12-30T06:46:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "892b6cc...
8cf0c1fe-57d3-4c39-afa8-5bfc232aae8e
Haneol/Algorithm
daily algorithm/1167.cpp
#include <bits/stdc++.h> using namespace std; /* 1167 트리의 지름 */ int v, x, y, d, res; vector<pair<int, int>> tree[100001]; stack<pair<int, int>> s; bool visited[100001]; int main() { cin.tie(0); ios::sync_with_stdio(0); cin >> v; for(int i = 1; i <= v; i++) { cin >> x; while(tru...
ALGO
0.999924
3.990691
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2023-01-11T13:25:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "af6be54f52...
e09a1e85-17f9-4d0c-a166-cf424578c317
Haseebi-khan/NumJig
Practice_Question/37.a.Q1.cpp
// 3. Write a C++ program to sort a given stack (using an array) using another stack. // Test Data: // Input some elements onto the stack: // Stack elements: 0 1 5 2 4 7 // Sort the elements in the stack: // Display the sorted elements of the stack: // Stack elements: 0 1 2 4 5 7 // Remove two elements: // Stack elemen...
ALGO
0.999986
5.526004
{ "github_metadata": { "branch": "main", "commit_count": 147, "repo_created_at": "2024-09-22T19:44:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df5f9e54e0...
43d629fb-7bd9-4a45-93b5-e3659203cdee
SpeedOfMagic/Cpp-algorithms
k_min_sketch.cpp
#include "bits/stdc++.h" using namespace std; void run(); signed main() { ios::sync_with_stdio(0); cin.tie(); cout << fixed << setprecision(13); run(); } mt19937 rng(random_device{}()); uint32_t Hash(uint32_t x) { x = ((x >> 16) ^ x) * 0x45d9f3b; x = ((x >> 16) ^ x) * 0x45d9f3b; x = (x >> 16) ^ x; ...
ALGO
0.983426
3.612309
{ "github_metadata": { "branch": "master", "commit_count": 150, "repo_created_at": "2018-01-08T12:53: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": "bb9447fc...
515e0c50-229d-4161-9982-1d829bd7a635
rla523at/mssolver
mssolver/src/Semi_Discrete_Equation.h
#pragma once #include "msgrid/Grid.h" #include "msmath/Vector.h" class Semi_Discrete_Equation { public: virtual ~Semi_Discrete_Equation(void) = default; public: // virtual std::vector<double> calculate_error_norms(const ms::grid::Grid& grid, const double end_time) const = 0; // virtual void ...
ALGO
0.999069
5.231695
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2023-05-04T14:01: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": "b2f4f67467...
a9e87eae-0fd4-44be-ad08-8d542deafb5c
luzh0422/LeetCode
Solution.cpp
// // Created by luzh on 2021/3/14. // #include "Solution.h" MyHashMap::MyHashMap() { hashMap.resize(100); for (int i = 0; i < 100; i++) { hashMap[i] = new HashListNode(-1, -1); } } void MyHashMap::put(int key, int value) { int hashkey = key % 100; HashListNode* node = hashMap[hashkey]; ...
ALGO
0.999999
6.151138
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2022-03-12T13: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": "96c8964ba8...
077cca5d-ff9f-4164-b463-527f606a20df
Palitri/Axis
Engine/Axis/Source/Engine/Primitive/AxMatrix.h
#pragma once #include "..\..\AxGlobals.h" class AxVector3; class AxVector4; class AXDLLCLASS AxMatrix { public: static const int handedness_Left = 0; static const int handedness_Right = 1; static int handedness; float _11, _12, _13, _14, _21, _22, _23, _24, _31, _32, _33, _34, _41...
ALGO
0.975356
5.797555
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-06-02T21:46:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e09ec0b61...
d4fbb36b-cac4-405a-96b6-ee43d789cb87
ahmedelsaie/AlgorithmsProblems
UVA/10400 - Game Show Math.cpp
#include <stdio.h> #include <cstring> int fn(int value, int i); bool check(int x); void trace(int value, int i); int dp[64009][102]; int n, target; int arr[105]; int correct = 32000; int main() { int cases, ans; scanf("%d", &cases); while(cases--) { scanf("%d", &n); for(int i = 0; i < ...
ALGO
0.999973
3.376523
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-12-26T01:29: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": "68f400541c...
7f0488e4-fe27-4eec-bdae-af88945654a0
alvie97/competitive
codeforces/356_2/a/a.cpp
#include <bits/stdc++.h> using namespace std; #define forn(i, n) for(int i = 0; i < (int)(n); ++i) #define fore(i, a, b) for (int i = (int)(a); i < (int)(b); ++i) #define ford(i, n) for(int i = (int)(n) - 1; i >= 0; --i) #define trav(a, x) for(auto& a: x) #define all(x) begin(x), end(x) #define rall(x) (x).rbegin(), (...
ALGO
0.99989
4.026307
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-06-26T04:31: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": "73eb068d13...
2879aa3a-0614-43f0-8586-292e7dd0a33c
PrveenYadav/DSA-Journey
17_Linked List/Lecture-45 Linked list/Lecture-53 Linked List/code3.cpp
#include <iostream> using namespace std; struct Node { int data; Node* next; Node* bottom; //constructor Node(int val) : data(val), next(nullptr), bottom(nullptr) {} }; // Function to merge two sorted linked lists Node* mergeTwoLists(Node* a, Node* b) { if (!a) return b; if (!b) return...
ALGO
0.999953
6.040303
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-02-28T08:40:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07a29a7956a9...
69bacb87-1eed-4d86-bc23-84990999bc9f
andy489/Data_Structures_and_Algorithms
1 – FMI Data Structures & Algorithms/05–week/05–06 Rotten from the core–3.cpp
// https://www.hackerrank.com/contests/practice-5-sda/challenges/rotten-from-the-core #include <iostream> using namespace std; int main() { int n, m, t, x1, y1, x2(1e5), y2(1e5), check; cin >> n >> m >> t >> x1 >> y1; if (cin >> check) { x2 = check; cin >> y2; } int not_rotten =...
ALGO
0.999982
4.697484
{ "github_metadata": { "branch": "master", "commit_count": 4429, "repo_created_at": "2019-07-24T12:33:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 30, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64e4cc...
4f664257-2db2-4a71-bd2c-cbdd89bb2967
nuptxxp/algorithm
ds/AVLTree.h
/** * @author <EMAIL> * @version 2016/02/29 */ #ifndef ALGORITHM__AVLTREE_H_ #define ALGORITHM__AVLTREE_H_ #include "BinaryTree.h" namespace algorithm { namespace dataStruct { template<typename Object> class AVLTree : public BinaryTree<Object>{ public: int search(const Object& v) { return...
ALGO
0.997282
5.70793
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2016-02-18T11:31: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": "278755aaf...
024f52a8-d14a-4b62-afe1-19d050ac9489
clamugi/AtCoder-solutions
ABC/101~200/129/129c.cpp
#include <bits/stdc++.h> using namespace std; #define repr(i,a,b) for (int i=a; i<b; i++) #define rep(i,n) for (int i=0; i< n; i++) #define PI 3.14159265359 const long long INF = 1LL << 60; long long MOD = 1000000007; long long gcd(long long a, long long b) { return b ? gcd(b, a%b) : a; } long long lcm (int a, in...
ALGO
0.999979
3.665415
{ "github_metadata": { "branch": "main", "commit_count": 222, "repo_created_at": "2020-11-09T11:39: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": "4118d3a81e...
71aa3896-c5a7-454f-ad61-c1e142b090ac
glycerine/shore-mt
dias/shore-kits/include/workload/ssb/ssb_random.h
/* -*- mode:C++; c-basic-offset:4 -*- Shore-kits -- Benchmark implementations for Shore-MT Copyright (c) 2007-2009 Data Intensive Applications and Systems Labaratory (DIAS) Ecole Polytechnique Federale de Lausanne All Rights Reserved. ...
TOOL
0.935295
5.907279
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2012-10-28T23:58:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d67b6c5c...
8cbb433e-18e7-4499-9d02-8fbe592d2d91
ShuntaIshihara/Inserting_with_volume-hiding_using_SGX
non_secure/cuckoo.cpp
#include <string> #include <cstring> #include <openssl/sha.h> #include "structure.hpp" int hash(char* key) { unsigned char digest[SHA256_DIGEST_LENGTH]; SHA256_CTX sha_ctx; SHA256_Init(&sha_ctx); // コンテキストを初期化 SHA256_Update(&sha_ctx, key, std::strlen(key)+1); // message を入力にする SHA256_Final(digest, &sha_ctx)...
ALGO
0.997993
4.269287
{ "github_metadata": { "branch": "main", "commit_count": 160, "repo_created_at": "2021-05-25T03:19:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90fab1f240...
64306dc1-d0d1-4ac3-8c9e-b0426b3acfa5
seungdo1234/CodingTestPractice
프로그래머스/2/159993. 미로 탈출/미로 탈출.cpp
#include <string> #include <vector> #include <queue> using namespace std; int map[101][101]; int copyMap[101][101]; int dx[4] = {1 ,-1, 0,0}; int dy[4] = {0,0,1,-1}; int n, m; pair<int, int> leverPair; pair<int, int> exitPair; pair<int, int> startPair; void ResetMap(){ for(int i = 0; i <n; i++){ for(in...
ALGO
0.999904
4.638203
{ "github_metadata": { "branch": "main", "commit_count": 249, "repo_created_at": "2023-10-20T06:43: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": "1bd89f31cd...
bf719b42-c71e-4ebf-ba55-453a9abda56c
CR-Juan/Taller-1-Tinkercad
spectacular_elzing1.ino
bool Negativos = true; int Suma = 0; void setup() { pinMode(0, OUTPUT); pinMode(1, OUTPUT); pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(8, INPUT_PULLUP); pinMode(9, INPUT_PULLUP); pinMode(10, INPUT_PULLUP); pinMode(11, INPUT_PULLUP); } void sumador(){ if (digitalRead(11)==1)...
ALGO
0.998183
4.280976
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-08-15T05:09:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "179276a42de5...
2204da30-939a-4ba9-9f47-90ff996e83ea
ltf0501/NoName
Contest/2017 SEERC/pA.cpp
#include <iostream> #include <queue> #include <utility> #include <vector> using namespace std; const int N = 1e5 + 10; const int K = 1e3 + 10; const int MOD = 1e9 + 7; int dp[N][2]; int main() { cin.tie(0); ios::sync_with_stdio(false); int n, k, nxt, cost[26], ans = 0; bool f = true; string a, b; cin >> k >...
ALGO
0.999974
4.508768
{ "github_metadata": { "branch": "master", "commit_count": 136, "repo_created_at": "2019-05-19T15:55:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a0c0a08...
66422c12-1159-4c11-be38-5bfa7f5efd78
ishandutta2007/codeforces-b
brunovsky/normal/1496/D.cpp
#include <bits/stdc++.h> using namespace std; // ***** auto solve() { int N; cin >> N; vector<int> P(N + 2); for (int i = 1; i <= N; i++) { cin >> P[i]; } const int L = 0, R = 1, D = 0, U = 1; vector<int> dist[2][2]; // dist[right?][up?] dist[0][0].assign(N + 2, 0), dist[0][1...
ALGO
0.999841
4.122286
{ "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": "58c34ac8185e...
b3980fad-4f87-4b11-958c-2dc5b4993c54
ishandutta2007/codeforces-c
compute/normal/1425/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int mod=1e9+7; void IO() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); } const int maxn=1e3+10,maxm=2e3+10; int n,m,r; int sum[maxm][maxm]; bool mp[maxm][maxm]; int b[maxm],x[maxm],y[maxm]; int inv[maxm],finv[maxm],f[m...
ALGO
0.999727
4.179194
{ "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": "95ccfc48946a...
1cfd8757-9827-45e8-bb75-1c9e6d0c109a
Akhil0502/SPOJ
FCTRL2 - Small factorials.cpp
#include <bits/stdc++.h> #include<vector> using namespace std; string _util(string A,string B){ if (A=="0" || B=="0") return "0"; int aL = A.length(), bL = B.length(); vector<int> result(aL+bL, 0); string res = ""; for (int i=aL-1; i>=0; --i) { for (int j=bL-1; j>=0; ...
ALGO
0.999972
4.662766
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-10-13T18:32: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": "b19cc773e...
97944a9b-4b6f-493f-b335-b01e5990e4d5
Codensity30/Strivers-A2Z-DSA-Sheet
04.Linked List/2.Doubly Linked List/03.Delete_node_in_DLL.cpp
/*Given a doubly linked list and a position. The task is to delete a node from given position in a doubly linked list. Example 1: Input: LinkedList = 1 <--> 3 <--> 4 x = 3 Output: 1 3 Explanation: After deleting the node at position 3 (position starts from 1), the linked list will be now as 1->3. Example 2: Input...
ALGO
0.999977
6.236008
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2023-05-29T13:38:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 213, "forks": 70, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "64e90faf...
11fe7997-5615-4f43-b14a-b8f352a13ef1
rolandjansky/athena
Calorimeter/CaloClusterCorrection/CaloClusterCorrection/interpolate.h
// This file's extension implies that it's C, but it's really -*- C++ -*-. /* Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /** * @file interpolate.h * @author <NAME> <<EMAIL>> * @date June, 2004 * @brief Polynomial interpolation in a table. * * This function performs polynomial i...
ALGO
0.915461
6.725305
{ "github_metadata": { "branch": "master", "commit_count": 100549, "repo_created_at": "2022-08-07T05:54:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69330...
a4624a34-6206-4d0f-9b5b-63f824b611cc
IvanMalkS/codes_style_2
1/1.cpp
/* Дан указатель P1 на вершину непустого стека. Извлечь из стека первый (верхний) элемент и вывести его значение D, а также адрес P2 новой вершины стека. Если после извлечения элемента стек окажется пустым, то положить P2 = nullptr. После извлечения элемента из стека освободить память, занимаемую этим элементом. Для к...
ALGO
0.999317
4.517903
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2025-04-10T16:05: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": "ac9813b46...
3803d96b-0128-43ba-8172-531cb4d677b3
vNaonLu/leetcode-daily
src/q_2051_2100/q2073.cc
// Copyright 2023 <NAME> // // This file describes the solution of // Time Needed to Buy Tickets // // https://leetcode.com/problems/time-needed-to-buy-tickets/ // // Question ID: 2073 // Difficult : Easy // Solve Date : 2023/09/25 20:57 #include <iosfwd> #include <vector> // -- This header must be included after ot...
ALGO
0.999874
6.553646
{ "github_metadata": { "branch": "main", "commit_count": 2477, "repo_created_at": "2021-09-06T15:30:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6c713462...
47b1281e-c080-4d9a-9474-935fcd7ca8c9
AIS-Bonn/attitude_estimator
src/attitude_estimator.h
// Attitude estimator based on the fusion of 3-axis accelerometer, gyroscope and magnetometer data // File: attitude_estimator.h // Author: <NAME> <<EMAIL>> // Ensure header is only included once #ifndef ATTITUDE_ESTIMATOR_H #define ATTITUDE_ESTIMATOR_H // State estimation namespace namespace stateestimation { /** ...
ALGO
0.967975
4.558713
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2014-05-23T09:16:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 143, "forks": 49, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a952563...
ba920eaa-da7e-4222-bbab-596a0932dd75
XinLin-cs/ACM_Note
Template/== template-maker/src/Geo/1 基础点、向量.cpp
struct P { int quad() const { return sign(y) > 0 || (sign(y) == 0 && sign(x) >= 0); } P rot90() { return P(-y, x); } P rot(db a) { return P(cos(a) * x - sin(a) * y, cos(a) * y + sin(a) * x); } P norm() { return *this / len(); } }; db rad(P p1, P p2) { return atan2l(det(p1, p2), dot(p1, p2)); } // p1 与 p2 的夹角,有方向 bo...
ALGO
0.999944
4.790652
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2019-09-07T16:44:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e47f22c9...
eb936442-df3c-4c88-8d8f-e8c427132b87
Ayuzh0/BasicProgramming
2ndsem/Data Structure/stackcpp.cpp
#include<iostream> using namespace std; class Stack { int st[999]; int lim; public: Stack() { lim=-1; } void push(int n) { lim++; st[lim]=n; } void pop() { if(lim>=0) { cout<<st[lim]<<" popped\n"; st[lim]=NULL; ...
ALGO
0.982529
3.928579
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-10-06T01:55: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": "bcc191b4d239...
1e03b2f7-3f6f-41bc-9d82-170d90cafa9e
svan0/CompetitiveProgramming
SPOJ/FASTFLOW.cpp
#include <iostream> using namespace std; struct flow_graph{ int MAX_V,E,s,t,head,tail; int *to,*next; long long *cap; int *last,*dist,*now,*q; flow_graph(){}; flow_graph(int V,int MAX_E){ MAX_V=V; to=new int[2*MAX_E],next=new int[2*MAX_E],cap=new long long[2*MAX_E]; last...
ALGO
0.999927
3.930072
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-05-30T13:07:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b488a8d858...
714f18d5-ce7f-45fc-be36-ab9c047e63b0
jywangx/leetcode
labuladong/linkedlist/reverse-linked-list/234.回文链表.cpp
/* * @lc app=leetcode.cn id=234 lang=cpp * * [234] 回文链表 */ // @lc code=start /** * 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) : ...
ALGO
0.999876
6.501615
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2023-09-18T07:02:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "465eef46...
b36493de-2f61-461f-954b-e7f0c3d78a2b
agadilkhan/algo
kbtu_labs/lab5/e.cpp
#include <iostream> #include <limits.h> using namespace std; struct Heap { long long * a; int sz; Heap(){ a = new long long[200001]; a[0] = LLONG_MIN; sz = 0; } int parent(int i){ return i / 2; } int left(int i){ return i * 2; } int right(in...
ALGO
0.998884
4.15032
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-04-13T12:36: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": "b67a92668106...
dd776aa5-8496-4858-95d9-b2c280101a0c
ByConity/ByConity
src/Interpreters/ActionsVisitor.h
/* * Copyright 2016-2023 ClickHouse, Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
TOOL
0.912786
7.712831
{ "github_metadata": { "branch": "master", "commit_count": 72498, "repo_created_at": "2022-12-22T11:50:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2202, "forks": 317, "issues": 155, "pull_requests": 26 }, "file_meta": { "content_id": ...
d912f95f-8789-42d8-98c0-d8737e078c94
Himanshu-Shukla1235/Compatative-programming-Codes
All_codes/2024-month-june(target2,3)/q9.cpp
// ---------------------------------C. Insert and Equalize-------------------------------------- #include <bits/stdc++.h> using namespace std; void logic(); // Function to calculate GCD of two numbers long long gcd(long long a, long long b) { while (b != 0) { long long t = b; b = a % b; ...
ALGO
0.999954
5.060853
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-12-07T05:25: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": "21ca80adb6d...
8f138e26-4f4d-4c95-9dfd-3f035c3413fa
Shubaduba55/KPI-Repository
ОП/C/Перший семестр/Лабораторна5/Лабораторна5/Лабораторна5.cpp
#include <iostream> using namespace std; int main() { int n; //кількість простих чисел int kilk;//кількість виведених простих чисел int dil;//змінна для перевірки ділення bool Bool; cout << "enter quantity of prime numbers(n>=1(int))" << endl;//Запит на кількість простих чисел cin >> n; ...
ALGO
0.998359
3.804319
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2021-09-26T17:26:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e20bee0a5...
6456dc6e-c2c1-4981-b9e7-c6d6a7503770
isazheng888/DailyStudy
LeetCode/DFS/0695_maxAreaOfIsland.cpp
/* 给定一个包含了一些 0 和 1的非空二维数组 grid , 一个 岛屿 是由四个方向 (水平或垂直) 的 1 (代表土地) 构成的组合。你可以假设二维矩阵的四个边缘都被水包围着。 找到给定的二维数组中最大的岛屿面积。(如果没有岛屿,则返回面积为0。) 示例 1: [[0,0,1,0,0,0,0,1,0,0,0,0,0], [0,0,0,0,0,0,0,1,1,1,0,0,0], [0,1,1,0,1,0,0,0,0,0,0,0,0], [0,1,0,0,1,1,0,0,1,0,1,0,0], [0,1,0,0,1,1,0,0,1,1,1,0,0], [0,0,0,0,0,0,0,0,0,0,1,0,0], [...
ALGO
0.999915
6.371079
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2019-12-13T16:22:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d393a8faa...
74d62be0-aca5-48d6-a354-4ab98743ddce
qf6101/algorithm-components
external/adaqs/src/qs_model/qs_adaptive_block.cpp
// // Created by qfeng on 17-10-13. // #include <gbtree_model/leaf_node.h> #include "qs_model/qs_adaptive_block.h" namespace quickscorer { float QSAdaBlock::raw_predict(const Eigen::SparseVector<float> &features) { // initialize result bitvectors, one per each tree vector<BANDWITH_TYPE> v(_tree_w...
ALGO
0.978957
6.64126
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-11-26T12:26:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49772c3c7...
62cb8314-0b84-4da2-8d01-e77dc1356fa4
quzanh1130/Kattis
basketballoneonone.cpp
// <NAME> #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define ff first #define ss second #define enld endl #define endl '\n' #define pb push_back #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define fort(i, a, b) for(ll i = a; i <= b; ++i)...
ALGO
0.999974
3.741598
{ "github_metadata": { "branch": "main", "commit_count": 90, "repo_created_at": "2021-10-18T15:09:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88ee8a6548f...
e915fe98-9490-4594-89ed-6e6d959be501
moheemohaeng/Computer-Vision
3_Noise Filtering/Noise Filter.cpp
#include <opencv2/opencv.hpp> #include <opencv2/highgui.hpp> #include <time.h> #include <iostream> using namespace cv; using namespace std; void Gaussian_noise(Mat &input, Mat &output, double std); void Salt_and_Pepper_noise(Mat &input, double noise_ratio); void filter(Mat &img, Mat &output_img, Mat &mask, int mask_r...
ALGO
0.905595
4.25561
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-10-06T04:50: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": "e18eaa3b1e54...
67574d98-bc60-411a-bb23-3d165724eead
jiho5993/solving_algorithm
BOJ/1759.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef priority_queue<int> pqi; #define fr(i, a, b) for(int i=a; i<b; i++) #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define sz(a) ((int)(a.size())) #define len(a) ((int)(a.length()))...
ALGO
0.999958
3.257872
{ "github_metadata": { "branch": "master", "commit_count": 700, "repo_created_at": "2019-06-23T07:11:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6bc4279...
50826b9e-c08c-465b-ae1a-5d062c5aac94
prs-prabodh/competitiveCoding
Mishika_and_the_last_exam.cpp
/* * @author <NAME> * Institute - ASET, New Delhi */ #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double const int M = 1e9 + 7; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int n; cin >> n; ll...
ALGO
0.999926
3.870529
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2017-09-02T19:21: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": "a99a8636f...
67e39379-f51e-4310-b247-b1c963ea7a90
arthurherbout/crypto_code_detection
data/code-jam/files/32011_tos.lunar_24469_1_extracted_D.cc
#include <iostream> #include <vector> #include <string> #include <deque> #include <queue> #include <map> #include <set> using namespace std; typedef pair<int,int> PII; #define INF 1000000000 // 1e9 < INT_MAX/2 #define MP make_pair int dx[4]={1,0,-1,0}; int dy[4]={0,1,0,-1}; void tos(){ int N,M; cin>>N>>M; ve...
ALGO
0.999658
3.718674
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2019-09-20T18:35:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "97d20a38...
fcb4a797-62b3-4678-965c-c691c58c8923
Linzecong/My-ACM-Code
Gym/101201I/10900090_AC_15ms_24kB.cpp
#include <iostream> #include <cstring> #include <algorithm> using namespace std; int n,k; int numda,numxiao; int tempP,tempL; bool usedda[1001],usedxiao[1001]; long long ans=0; struct node { int pos; int let; }da[1001],xiao[1001]; bool cmp(node a,node b) { if(a.pos!=b.pos)return a.pos>b.pos; else ret...
ALGO
0.999772
3.462965
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-02-26T08:44:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "717799ccdb...
ba87c3cf-5c0e-4e50-ad2a-ffd037acb4e0
lifev/lifev
lifev/fsi/solver/FSISolver.cpp
//@HEADER /* ******************************************************************************* Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University This file is part of LifeV. LifeV is free software; you can redistribute it a...
ALGO
0.945678
6.110935
{ "github_metadata": { "branch": "master", "commit_count": 12133, "repo_created_at": "2012-11-06T15:58:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 36, "forks": 30, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b51b5...
2ec961e3-7870-4dc2-86a5-9087119a292f
hywei/MultiChart-Parameterization
Param/src/Param/TriDistortion.cc
#include "TriDistortion.h" #include "Parameter.h" #include "Barycentric.h" #include "../ModelMesh/MeshModel.h" #include <boost/shared_ptr.hpp> #include <hj_3rd/hjlib/math/blas_lapack.h> #include <hj_3rd/zjucad/matrix/lapack.h> #include <hj_3rd/zjucad/matrix/io.h> namespace PARAM { TriDistortion::TriDistortion(const ...
ALGO
0.998401
5.301047
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2011-03-14T03:27:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bce98e1f2e...
ed646f4f-5202-4ed6-a5ad-5230bd4094cf
raghutillu/Coding
src/arrays/RangeBased/MissingRange/MissingRange.cpp
#include <iostream> #include <vector> #include <utility> #include <initializer_list> using namespace std; // https://leetcode.com/problems/missing-ranges/ // Given a sorted integer array where the range of elements are in the inclusive range [lower, upper], return its missing ranges. // For example, given [0, 1, 3, 50...
ALGO
0.987476
5.651722
{ "github_metadata": { "branch": "master", "commit_count": 281, "repo_created_at": "2017-08-25T17:35: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": "ef9c105a...
b9154df5-6ede-49ac-95e1-392b137ea8fe
MazzyG/FAI
ex1.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { //Get first vector vector<float> Vector1; float value; int nr1,nr2,Vector10,Vector20; Vector10=0; Vector20=0; cout<<"Introduceti numarul de elemente al primei multimi."<<endl; cin>>nr1; for(int i=1;...
ALGO
0.999709
4.40908
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-12-15T15:20: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": "fc5c11a3d2...
0bdc6184-f695-4dfb-8297-3cda09ad5791
gyoseon123/baekjoon
백준/Platinum/1761. 정점들의 거리/정점들의 거리.cc
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <queue> #include <stack> #include <set> #include <map> #include <unordered_set> #include <cstring> // #define ll long long #define int long long using namespace std; int n,m; vector<pair<int, int>> graph[101010]; int table[101010][2...
ALGO
0.999967
4.050663
{ "github_metadata": { "branch": "master", "commit_count": 370, "repo_created_at": "2022-12-15T14:51: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": "78e35790...
d43c4e87-f566-45ab-a5c9-bfba12089d9f
hemanth1999k/Competitive-Programming
Codeforces/miraclesleeper.cpp
#include<bits/stdc++.h> #define FOR(n) for(int i=0;i<n;++i) #define FOR1(n) for(int i=1;i<n;++i) #define FR(i,a,b) for(int i=a;i<b;++i) #define rng(a,b) for(int i=a;i<b;++i) #define ll long long #define vint vector<int> #define vlong vector<long long> #define vstr vector<string> #define vvin vector<vector<int>> #defin...
ALGO
0.999973
3.745899
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2024-02-05T20:11:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e7aef016a7...
cf495b37-c75f-4ee5-aba3-93276db6a67e
cctbx/cctbx_project
cctbx/maptbx/asymmetric_map.h
#ifndef CCTBX_MAPTBX_ASYMMETRIC_MAP_H #define CCTBX_MAPTBX_ASYMMETRIC_MAP_H #include <boost/config.hpp> #include <utility> #ifdef BOOST_NO_CXX11_RVALUE_REFERENCES // # include <boost/tr1/utility.hpp> // # include <boost/move/utility.hpp> // namespace std { using boost::move; } #endif #include <scitbx/array_family/t...
ALGO
0.937918
5.439604
{ "github_metadata": { "branch": "master", "commit_count": 38660, "repo_created_at": "2015-07-22T13:36:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 256, "forks": 121, "issues": 120, "pull_requests": 31 }, "file_meta": { "content_id": "...
c79698ab-115f-40f3-b5c9-06611a3b8756
Martijnadj/Bachelor-Project
Tissue Simulation Toolkit/ca.h
/* Copyright 1996-2006 <NAME> This file is part of Tissue Simulation Toolkit. Tissue Simulation Toolkit is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any ...
ALGO
0.986582
4.535109
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-06-12T08:31: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": "5671ec90c4...
e7cf49c6-8fcb-453f-b5ba-7e7d727875c5
piyush1146115/Competitive-Programming
Intra University Contest/individual contest on top sort + articulation point 7 april 2017/K - Network.cpp
#include<bits/stdc++.h> using namespace std; #define mxx 10005 vector<int> g[mxx]; vector<int> art; #define inf 1000000 int tme; int dis[mxx],vis[mxx], lo[mxx], par[mxx]; int ans; map<int, int> mp; void init() { for(int i = 0; i < mxx; i++) { vis[i] = 0; dis[i] = 0; lo[i] = inf; ...
ALGO
0.998728
4.213862
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2019-09-30T18:09:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "423bd1beb...
a1bf16ad-0b0e-4ec4-a43a-633101a98136
mrreda1/problem-solving
codeforces/DrunkenMaze.cpp
#include <bits/stdc++.h> #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define make_unique(x) sort(all(x)), x.erase(unique(all(x)), x.end()) #define pow2(x) ((x) * (x)) using namespace std; template <typename T> T nxt(); template <typename T> class is_iterable { public: template <typena...
ALGO
0.999929
4.591238
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-01-27T18:28:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f924ec9473...
03ed0ac0-4469-48fc-9e35-9421ffe00168
moaangel/Algorithm
SWEA/D4/1210. [S/W 문제해결 기본] 2일차 - Ladder1/[S/W 문제해결 기본] 2일차 - Ladder1.cpp
#include<iostream> using namespace std; int dy[3] = { -1,0,0 }; int dx[3] = { 0,-1,1 }; int a[102][102]; int visited[102][102]; int ret; int check(int y, int x) { if (x < 99 && a[y][x + 1] && !visited[y][x + 1]) return 2; else if (x >= 1 && a[y][x - 1] && !visited[y][x - 1]) return 1; return 0; } int dfs(int y,...
ALGO
0.995822
3.603751
{ "github_metadata": { "branch": "main", "commit_count": 571, "repo_created_at": "2023-05-06T15:59: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": "d659bed160...
c6c7359a-cab7-4572-b327-11d032451246
ferdouszihad/DSA-King
binaryTree/Level_Nodes.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *left; Node *right; Node(int val) { this->val = val; left = NULL; right = NULL; } }; Node *inputTree() { Node *root = NULL; queue<Node *> q; int n; cin >> n; if (n != -1)...
ALGO
0.99999
3.407663
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-12-08T19:22: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": "cda588c7d81d...
50db5cd1-056d-486f-a442-11632e7b5380
easychoco/contest
AtCoder/cpp/abc/199/c.cpp
#include <bits/stdc++.h> #include <atcoder/all> #define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define endl "\n" #define rep(i,n) repi(i,0,n) #define repi(i,a,n) for(ll i=a;i<(ll)n;++i) #define repe(i,n) repie(i,0,n) #define repie(i,a,n) for(ll i=a;i<=(ll)n;++i) #define ALL(a) (a).begin(...
ALGO
0.999994
4.117195
{ "github_metadata": { "branch": "main", "commit_count": 137, "repo_created_at": "2021-08-07T14:51:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "edc08f2ceb...
7295bd4b-8c86-4905-81b8-8ed86bd45aa9
MariaChrysafis/CompetitiveProgramming
Codeforces/1516B.cpp
#include <iostream> #include <bitset> #include <algorithm> #include <vector> #include <map> #include <set> using namespace std; const int MOD = 1e9 + 7; void solve(){ int n; cin >> n; long long arr[n]; long long cur = 0; for(int i = 0; i < n; i++){ cin >> arr[i]; cur ^= arr[i]; }...
ALGO
0.999862
4.670781
{ "github_metadata": { "branch": "main", "commit_count": 2959, "repo_created_at": "2020-11-28T04:57:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "785602fea...
a39b837c-d382-4975-ba75-fa4c77f4f992
noahhan03/baekjoon
1238.cpp
#include<iostream> #include<vector> #include<queue> #include<algorithm> using namespace std; // n명의 학생 x번에서 모여 파티 ~ m개의 도로 w가 시간 소요 int n,m,x; vector<pair<int,int>> adj[10010]; int min_time_go[1010]; // 걸리는 최단 시간 가는데- 계속 update int min_time_back[1010];//돌아오는데 최단 int min_time_tot[1010]; //go+back 최단 int time_tot; ...
ALGO
0.999987
4.475598
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-05-13T06:16: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": "6543e482503...
c558e7ae-c2aa-4124-8a32-14395d364fae
Bima42/cpp_modules
08/ex01/Span.hpp
#ifndef SPAN_H # define SPAN_H #include <iostream> #include <vector> #include <iterator> #include <algorithm> #include <limits> class Span { public: Span ( void ); Span ( unsigned int N ); Span ( const Span &copy ); ~Span ( void ); Span &operator=( const Span &right ); std::vector<int> getVec ( void )...
TOOL
0.937202
4.333869
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2022-05-22T10:56:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b429407c4a...
ffa9b166-44ac-4b3a-b07d-431d7b0f249b
ManavdhiMan003/Practice
codeforces/div_2/A_NezzarandColorfulBalls.cpp
#include<bits/stdc++.h> using namespace std; #define endl "\n" #define loop(i,n) for(int i=1;i<n;i++) #define loop1(i,k,n) for(i=k;i<n;i++) #define pb push_back typedef long long int ll; // long long binpowmod(long long a, long long b, long long m) { // a %= m; // long long res = 1; // while (b > 0) { // ...
ALGO
0.999837
3.307774
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2020-10-28T08:34: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": "72d67a19a...
a26d9c53-7ea6-4903-a09c-11a28496d928
dulev23/StructuredProgramming
ZadaciZaPrvKolokviumCpp/ZadacaRandom.cpp
#include <iostream> using namespace std; int main() { int jabolka, malini, banani, iskoristiKarticka; cin >> jabolka >> malini >> banani >> iskoristiKarticka; double cenaJabolka = 30.0; double cenaMalini = 50.0; double cenaBanani = 40.0; double vkupnaCenaJabolka = jabolka * cenaJabolka / 100....
ALGO
0.999162
4.052248
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2023-12-13T23:00: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": "62a4cbf00...
690050f6-2829-477a-8e6a-e95f5a6990cc
kzvd4729/Problem-Solving
codeforces/D - Design Tutorialx Inverse the Problem/Wrong answer on test 9.cpp
/**************************************************************************************** * @author: kzvd4729 created: May/24/2020 19:17 * solution_verdict: Wrong answer on test 9 language: GNU C++14 * run...
ALGO
0.999953
3.958374
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-02-01T09:12:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad729c10cd0...
aba1e2fd-cf75-4765-9938-6b23b447c3b7
robot14g3/hand_follower
src/hand_tracker.cpp
#include <ros/ros.h> #include <limits> #include <sensor_msgs/PointCloud2.h> #include <geometry_msgs/Point.h> #include <visualization_msgs/Marker.h> #include <tf/transform_broadcaster.h> #include <pcl_conversions/pcl_conversions.h> #include <pcl/point_cloud.h> #include <pcl/point_types.h> #include <pcl/kdtree/kdtree_fla...
DATA
0.915626
5.968961
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2014-10-15T15:53:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "642cea8b7...
942b0085-d145-46b4-99f1-f7f71c550122
jkde7721/coding-test
DP/2302.cpp
//DP 풀이 #include <bits/stdc++.h> using namespace std; //dp 배열: 해당 인덱스 좌석부터 끝 좌석까지 앉을 수 있는 경우의 수 저장 int n, m, tmp, dp[41]; bool fix[41]; int go(int idx) { if (idx >= n) return 1; int& ret = dp[idx]; if (ret == -1) { ret = 0; if (fix[idx]) ret += go(idx + 1); else if (!fix[idx + 1]) ...
ALGO
0.999995
4.20283
{ "github_metadata": { "branch": "main", "commit_count": 251, "repo_created_at": "2023-01-28T14:45:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "382b1d5f26...
c23d106b-b9be-4120-9d88-5026f4cea52d
alpha7894550/OOP_-_polynomial_python
Assignment 1/Assignment 1/matrix.cpp
#include <iostream> #include <cmath> #include <cassert> #include "matrix.h" #include "vector.h" using namespace std; //constructors and destructor : Matrix::Matrix(const int& m, const int& n) { numRows = m; numCols = n; entry = new double* [numRows]; for (int i = 0; i < numRows; i++) { entry[i] = new double[n...
ALGO
0.941727
4.166079
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-02-23T11:56: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": "23d2763b1097...
7fdd291e-77b4-47d2-9c7b-b35fd772b54f
arisluk/GooberEats
GooberEats/PointToPointRouter.cpp
#include "provided.h" #include <list> #include <set> #include <map> #include <cmath> // For distance calculations #include <float.h> // For DBL_MAX #include <iostream> using namespace std; class PointToPointRouterImpl { public: PointToPointRouterImpl(const StreetMap* sm); ~PointToPointRouterImpl(); Deli...
ALGO
0.937219
5.574006
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-11-28T05:16: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": "7a50577c18...
167c506e-5305-4967-a76a-3bb48a34a542
ishandutta2007/codeforces-a
arsijo/normal/620/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef unsigned int ui; typedef long double ld; typedef pair<int, int> ii; typedef pair<ii, ii> iii; const int MOD = 1e9 + 7; const ld E = 1e-11; #define null NULL #define ms(x) memset(x, 0, sizeof(x)) #define endl "\n"...
ALGO
0.999984
3.485152
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "253ddb2f75a0...
0d87275d-2213-4a0a-84bf-ff717f3bf37d
giovincentricels/C-Programming_CaseStudy
aol1.cpp
#include <stdio.h> #include <string.h> //global variabel ini digunakan sebagai deklarasi awal untuk menyimpan //kalimat input dari stdin user dengan rentang 105 huruf yang diakhiri //dengan akhiran null terminator yang menandakan dia kalimat. char string[105]; //fungsi rev tanpa pengembalian ini digunakan untuk menu...
TOOL
0.99952
3.649654
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-12T12:20:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "553c67600b7a...
225dc418-49f2-4c44-bfe4-15a59b3db946
asmmo/data-structures
Stack.cpp
#include <iostream> template<typename T> class Stack{ struct Node{ T data{}; Node * next{}; Node(const T & data, Node * next = nullptr ) : data{data}, next { next }{ } }; Node * head {}; size_t _size{}; public: Stack() = default; Stack(const Stack & rhs) = del...
ALGO
0.934951
5.07029
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2020-04-30T16:01: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": "16b1279fd...
07115ff7-1d3f-4202-94dd-59f26adb8987
SantanuGarai/Leetcode
Binary Tree/Binary Tree Paths.cpp
/* * Given the root of a binary tree and an integer targetSum, return true if the tree has a root-to-leaf path such that adding up all the values along the path equals targetSum. * A leaf is a node with no children. * * Example 1 * Input: root = [5,4,8,11,null,13,4,7,2,null,null,null,1], targetSum = 22 * Output: ...
ALGO
0.999977
6.187692
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2020-07-30T03:05: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": "95da0e93e...
a36ab855-8555-4788-9f17-11d9402036b8
Akshat-07-ux/Gfg-Questions-2
Difficulty: Medium/Count Numbers Containing Specific Digits/count-numbers-containing-specific-digits.cpp
class Solution { public: int countValid(int n, vector<int>& arr) { vector<bool> isTarget(10, false); for (int d : arr) isTarget[d] = true; // Total number of n-digit positive integers int total = 9 * pow(10, n - 1); // Count how many n-digit numbers have NONE of the arr[]...
ALGO
0.999608
6.119372
{ "github_metadata": { "branch": "main", "commit_count": 167, "repo_created_at": "2025-06-10T14:24: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": "3730236458...
6c6eb6e4-d5fd-4b2d-ae0a-ce17e488fa73
dnx04/cp
archives/atcoder/abc/241/D_-_Sequence_Query.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ull = unsigned long long; signed main() { ios::sync_with_stdio(false); cin.tie(nullptr), cin.exceptions(cin.failbit); int q; cin >> q; multiset<ll> mts; while (q--) { int t; cin >> t; if (t == 1) { ll x; cin...
ALGO
0.999793
4.670619
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2024-11-01T08:44: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": "1c94edeefc3...
4f703ae0-7bc8-4a98-8dd7-ca3da8f100be
NhatMinh0208/CP-Archive
codeforces/1471/A.cpp
// Problem : Strange Partition // Contest : Codeforces // URL : https://m1.codeforces.com/contest/1471/problem/A // Memory Limit : 256 MB // Time Limit : 1000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) /* Normie's Template v2.0 */ // Standard library in one include. #include <bits/stdc++.h> ...
ALGO
0.999949
3.555093
{ "github_metadata": { "branch": "master", "commit_count": 1398, "repo_created_at": "2020-12-23T02:12: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": "01e8044...
22623838-61db-46fb-a771-22de418952f2
lparis/cpp
lparis_cpp/lparis_lab14.cpp
/* **************************************************************** LParis CSE100 Session A lparis_lab14.cpp g++ -std=c++11 -o lparis_lab14 lparis_lab14.cpp **************************************************************** Purpose: Calculate student's final grade. Inputs: Test scores 1 and 2, homework score. P...
TOOL
0.997148
5.386435
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-03-09T19:42: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": "90ffce4848...
99bb7cd4-9559-4bc0-be6e-8d8ea850834e
herrbrave/RTS_Engine
RTS/RTS/Flowfield.h
#ifndef __FLOWFIELD_H__ #define __FLOWFIELD_H__ #include<queue> #include<SDL_ttf.h> #include"Entity.h" #include"Map.h" #include"SDL_Helpers.h" #include"Vector2f.h" class Flowfield; typedef shared_ptr<Flowfield> FlowfieldPtr; typedef weak_ptr<Flowfield> WeakFlowfieldPtr; class Flowfield { public: Flowfield(EntityP...
ALGO
0.945535
6.270538
{ "github_metadata": { "branch": "original", "commit_count": 113, "repo_created_at": "2016-01-24T20:00:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 14, "pull_requests": 0 }, "file_meta": { "content_id": "190c2...
a5eae6f2-42b6-4ed9-a8b4-9607339be656
Realhyeonwoo/study-algorithm
02.탐색(BFS+DFS)/7562.cpp
#include<iostream> #include<queue> #include<cstring> using namespace std; int T, l; int map[300][300]; bool visited[300][300]; int value[300][300]; int dy[] = { -2, -2, -1, -1, 1, 1, 2, 2}; int dx[] = { -1, 1, -2, 2, -2, 2, -1, 1}; void bfs(int start_y, int start_x, int end_y, int end_x) { queue<pair<int, int> > q; ...
ALGO
0.999937
3.995942
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2019-09-20T15:53: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": "709777b9...
87b299d0-35d4-47a5-97b7-3b74746fe653
Krishna-Sneha/Recursion-Backtracking
luckyNumbers.cpp
// Lucky numbers are subset of integers. Rather than going into much theory, let us see the process of arriving at lucky numbers, // Take the set of integers // 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,…… // First, delete every second number, we get following reduced set. // 1, 3, 5, 7, 9, 11, ...
ALGO
0.99993
5.164619
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-02-21T07:55:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5c4138fc36...
e6c45fcf-63fa-413f-9ca9-9bc6b0b8dc27
YahiaAshraf74/problem-solving
Codeforces/CF-Div. 2 B/BModuloEquality.cpp
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <set> #include <map> #include <unordered_set> #include <unordered_map> #include <queue> #include <stack> #include <complex> #include <string> #include <bitset> #include <stdio.h> #include <string.h> #include <fstream> #include <iomanip...
ALGO
0.999993
4.103125
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-03-13T01:17: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": "27e095f810...
4a1adde5-54a2-4ea7-909d-87eec0eb9811
key-moon/compro
codeforces/818/C/107657781.cpp
// detail: https://codeforces.com/contest/818/submission/107657781 #include <bits/stdc++.h> #define var auto using ll = long long; const char newl = '\n'; template <typename T1, typename T2> inline void chmin(T1& a, T2 b) { if (a > b) a = b; } template <typename T1, typename T2> inline void chmax(T1& a, T2 b) { if (a <...
ALGO
0.999851
3.930995
{ "github_metadata": { "branch": "master", "commit_count": 4488, "repo_created_at": "2020-11-08T08:45:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f03e27...