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
7e9338d2-84a1-4494-9914-de34a48a35f7
Mu-L/TracerInteractiveUE4Plugins
Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/XPBDLongRangeConstraints.h
// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "Chaos/PBDLongRangeConstraintsBase.h" #include "Chaos/PBDParticles.h" #include "Chaos/PBDConstraintContainer.h" #include "ChaosStats.h" DECLARE_CYCLE_STAT(TEXT("Chaos XPBD Long Range Constraint"), STAT_XPBD_LongRange, STATGROUP_Chaos); namespac...
TOOL
0.99084
6.651392
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2020-03-24T02:30:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 11, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "0b5583a...
821bab6c-e16d-4d83-9c91-9beed50617f4
azcy-qwq/JZOI_
Contests/2024-10-21-yd-C.cpp
#pragma GCC optimize(2) #include <bits/stdc++.h> using namespace std; namespace IN { #define MAX_INPUT 25000003 #define getc() (p1 == p2 && (p2 = (p1 = buf) + inbuf->sgetn(buf, MAX_INPUT), p1 == p2) ? EOF : *p1++) char buf[MAX_INPUT], *p1, *p2; template <typename T> inline bool redi(T &x) { sta...
ALGO
0.999872
5.367877
{ "github_metadata": { "branch": "a", "commit_count": 54, "repo_created_at": "2024-09-18T10:37: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": "db9ef5165d1702...
eca4ecb2-7e49-4652-87bd-cab2cda86253
moadmmh/Competitive-Programming
Kattis/Almost Perfect.cpp
#include <bits/stdc++.h> //#include<iostream> using namespace std; #define sf(n) scanf("%d", &n) #define pd(n) printf("%.12lf", n) #define pf(n) printf("%d\n", n) #define p() printf("\n") #define ps() printf(" ") #define ll long long #define ull unsigned long long #define MAX 1e9 #define mod 1000000000 #define pi 3.14...
ALGO
0.999552
3.605269
{ "github_metadata": { "branch": "master", "commit_count": 534, "repo_created_at": "2018-08-16T19:41: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": "8be298ce...
576b81c9-67d7-451e-abd0-0e626504a6c1
trinhminhtriet/leetcode
solutions/0700-0799/0773.sliding-puzzle/Solution.cpp
class Solution { public: int slidingPuzzle(vector<vector<int>>& board) { string start = gets(board); string end = "123450"; if (start == end) return 0; unordered_set<string> vis; vis.insert(start); queue<string> q{{start}}; int ans = 0; while (!q.empty...
ALGO
0.999963
5.514956
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2024-12-09T17:55:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2848bf...
afcfa232-b835-40cf-8a3e-38396a26da9c
raincross7/code-similarity
codes/train_code/problem076/problem076_272.cpp
/* maybemaybemaybeno */ #include<bits/stdc++.h> using namespace std ; typedef long long ll ; typedef long double lld ; #define f(i,s,n) for(int i=s;i<(int)n;i++) const int MAXN = 1e5+5 ; #define pb push_back #define X first #define Y second #define pii pair<int,int> #define pll pair<ll,ll> #define pli pair<ll,int...
ALGO
0.999938
3.332087
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7edf48491d0...
11a88cd0-f70f-4166-8a80-20bc430e2653
sylvainthery/ASTex
ASTex/distances_maps.cpp
/******************************************************************************* * ASTex: * * Copyright (C) IGG Group, ICube, University of Strasbourg, France * * ...
ALGO
0.997249
3.881452
{ "github_metadata": { "branch": "sylvain", "commit_count": 200, "repo_created_at": "2017-10-23T08:43:45.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "ASTex-ICube/ASTex", "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content...
fe1b5ac5-c9f0-48bf-b430-805ff5d5bdd4
pradnyesh61/CP
LeetCode/1091_Shortest_Path_in_Binary_Matrix.cpp
// 1 June 2023 #include <bits/stdc++.h> using namespace std; class Solution { public: int recursion(int i, int j, vector<vector<int>> &grid, int count) { int n = grid.size(); if (i == 0 && j == 0) { return count + 1; } int row[] = {-1, -1, 0, +1, +1, +1, 0...
ALGO
0.99998
5.439826
{ "github_metadata": { "branch": "main", "commit_count": 709, "repo_created_at": "2022-12-31T16:08:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6e5425ac9...
c7afe99e-6d9a-477c-a107-ccce4f0f197b
shishirRsiam/My-Solve
All Solve/Moody_Chef.cpp
#include <bits/stdc++.h> #define str string #define ll long long #define pi pair<ll, ll> #define vec vector<ll> #define py cout << "YES\n" #define pn cout << "NO\n" #define pb(x) push_back(x) #define bee(x) x.begin(), x.end() #define loop(start, i, end) for (int i = start; i < end; i++) using namespace std; void calcu...
ALGO
0.999894
4.338418
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2024-03-18T19:40: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": "0f40fa019b2...
42cc62d9-2864-47c9-9fc8-e76fd79527ad
dueugene/adventofcode
2021/day16/packet.cpp
#include <algorithm> #include <string> #include <vector> class Packet { public: Packet(std::string& bin_msg) { version_ = bin_string_to_int(bin_msg.substr(0,3)); id_ = bin_string_to_int(bin_msg.substr(3,3)); int ind = 6; if (id_ == 4) { std::string val_str; w...
ALGO
0.999149
5.321346
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2020-12-01T19:17: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": "e09934ce61b...
a4f7fc35-032b-4dd9-b37d-282d999bb73d
alexandraback/datacollection
solutions_2463486_1/C++/rabbit125/solution.cpp
#include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <vector> #define MAXSIZE 10000000 using namespace std ; bool testF( long long a ) { char Now[ 60 ] ; int Len ; bool Fair = 1 ; sprintf( Now , "%lld" , a ) ; Len = strlen( Now ) ; for( int i = 0 ; i < Len/2 ; i++ ) if( Now[ i ]...
ALGO
0.999593
4.048278
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62ad898f8...
8cd835a5-6d55-45f4-8ce7-f5b19005ef97
6851-2021/Cache-Oblivious-Data-Structures
dynamic_search_trees/perf_std_set.cpp
#include <set> #include <random> #include <iostream> const int rand_reset_const = 10000; void test(int max_value, int Q) { std::set<int> tree; for (int i = 0; i <= max_value; i++){ tree.insert(i * 7); } while (Q--) { int query_type = rand() % 12; if (Q % rand_reset_const =...
TOOL
0.96031
3.485508
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2021-03-18T23:40:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "798ee81873ed...
5da71ec9-9aad-474d-a785-122a1161a77c
An3sha/Data-Structures-and-Algorithms
LINKED LIST/Deleting a node.cpp
//delete at head void deleteathead (node* &head) { if(head == NULL) { return; } node* temp = head; head = head -> next; delete temp; return; } //delete at tail void deleteattail (node* &head) { node* prev = NULL; node* temp = head; while(temp -> next != NULL) { prev = temp; te...
ALGO
0.99991
3.181283
{ "github_metadata": { "branch": "main", "commit_count": 137, "repo_created_at": "2021-06-13T17:03:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a24654961c...
3496d9fc-d425-4c85-8eb1-06ecf9071bb8
AlgoStudyGroup/Leetcode
May-LeetCoding-Challenge/25-Uncrossed-Lines/Uncrossed-Lines.cpp
// O(n^2) time, O(n^2) space class Solution1 { public: int maxUncrossedLines(vector<int>& A, vector<int>& B) { int n = A.size(), m = B.size(); if (n == 0 or m == 0) return 0; vector<vector<int>> dp(n+1, vector<int>(m+1, 0)); for (int i = 1; i <= n; i++) ...
ALGO
0.999989
6.257814
{ "github_metadata": { "branch": "master", "commit_count": 907, "repo_created_at": "2020-04-30T16:15:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 56, "forks": 26, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2187b91...
755b69d2-ef5f-4c44-828a-b70db096d6bb
WebberJ201/303-Assignment1
Functions.cpp
#include "functions.h" #include <iostream> #include <fstream> #include <stdexcept> #include <limits> using namespace std; //Reads a given .txt file and stores its data within an array. bool readFile(const string& filename, int arr[], int size) { // Takes in a file ifstream inputFile(filename); if (!inputFil...
TOOL
0.960249
4.561469
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-02-13T19:38: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": "95e3b11e3f8e...
49c69440-15ca-408d-b8b8-dcf08cd54c53
abhijeetsingh-22/Competitive-programming
Leetcode/516.longest-palindromic-subsequence.cpp
/* * @lc app=leetcode id=516 lang=cpp * * [516] Longest Palindromic Subsequence */ // @lc code=start class Solution { int f(int start, int end, string &s, vector<vector<int>> &dp) { if (start > end) return 0; if (start == end) return 1; if (dp[start][end] != ...
ALGO
0.999991
6.814735
{ "github_metadata": { "branch": "master", "commit_count": 251, "repo_created_at": "2020-10-14T11:36: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": "fe6049fe...
688949b8-bfbc-4e4f-8f4e-c72ce999dc0b
Axe-hyx/leetcode-salute
307.range-sum-query-mutable.cpp
/* * @lc app=leetcode id=307 lang=cpp * * [307] Range Sum Query - Mutable */ // @lc code=start #include <bits/stdc++.h> using namespace std; // Time Complexity: // Space Complexity: class NumArray { public: struct node{ int left, right, sum; }; int n; node *tree; int *num; NumArray(...
ALGO
0.999916
7.077984
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-02-20T07:44:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "115666ab092...
134c22d8-8d77-4c9e-85d1-90b7465b5884
PradeepSahhu/100-Day_DSA_Challenge
medium_linkedList/remove_from_back.cpp
#include <iostream> #include <bits/stdc++.h> #include <chrono> using namespace std; auto start = chrono::steady_clock::now(); class Node { public: int data; Node *next; Node(int data, Node *next) { this->data = data; this->next = next; } Node(int data) { this->data...
ALGO
0.999916
5.518832
{ "github_metadata": { "branch": "main", "commit_count": 248, "repo_created_at": "2024-01-19T18:23:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0bbf9afa0a...
5513682d-2dca-42c6-92c3-9412d1e3c15d
thirofoo/atcoder-archives
abc231/abc231_d_27884342_WA.cpp
/* * Author: through * Submission URL: https://atcoder.jp/contests/abc231/submissions/27884342 * Submitted at: 2021-12-12 22:35:07 * Problem URL: https://atcoder.jp/contests/abc231/tasks/abc231_d * Result: WA * Execution Time: 173 ms */ #include <bits/stdc++.h> using namespace std; typedef pair<int, int> P; typ...
ALGO
0.999997
4.106408
{ "github_metadata": { "branch": "main", "commit_count": 5513, "repo_created_at": "2022-12-17T09:45:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "40eac5994...
9d3764ca-0f02-44fa-86eb-3aec34ef9e43
shunjilin/AlgorithmsSpecialization
12.ClusteringBig/main.cpp
#include <iostream> #include <fstream> #include <string> #include <sstream> #include <vector> #include "SteadyClockTimer.hpp" #include "ClusteringBig.hpp" using namespace ClusteringBig; int main(int argc, char *argv[]) { std::vector<int> nodes; unsigned n_nodes, n_bits; if (argc > 1) { std::ifstre...
ALGO
0.995587
4.910556
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2018-02-24T06:24:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c0d44b1f...
847876ba-6360-4bcd-8a5b-9e7f4767ffb7
Sp-177/CODEFORCES
C_Che_city.cpp
#include<iostream> #include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // #include <ext/pb_ds/tree_policy.hpp> // #include <ext/pb_ds/trie_policy.hpp> // #include <ext/pb_ds/priority_queue.hpp> // using namespace __gnu_pbds; // // **1. Ordered Set** // template <typename T> // using ordered_set = tre...
ALGO
0.99985
3.811617
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2024-02-26T07:56: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": "416121c1403...
609cf07d-29af-4dd4-8067-2741112e43b6
dlawjddn/algorithm
programmers/algorithm/디스크컨트롤러_42627.cpp
/** * @file 디스크컨트롤러_42627.cpp * @brief 프로그래머스 lv.3 디스크 컨트롤러 * @version 0.1 * @date 2024-08-19 * * @copyright Copyright (c) 2024 * * 현재 시간보다 시작 시간이 빠른 애들 모두 pq.push(); (pq는 작업 시간이 작은 순으로 정렬되는 상태) * 그리고 현재 pq에 들어간 작업들은 모두 당장 시작해서 종료가 가능한 애들 -> 종료까지 바로 해야한다. * 따라서 가장 빠른 작업 하나만 마무리 짓는다. * * 이때 pq에 들어간 요소가 없...
ALGO
0.999962
5.722527
{ "github_metadata": { "branch": "main", "commit_count": 699, "repo_created_at": "2022-08-06T14:47: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": "5ee0be920f...
8c870529-b886-4fdc-9403-2fe96a1b84b3
sunpxyz/online-judge
pat-b-cpp/pat_b_1061.cpp
// pat_b_1061.cpp // 2021.10.15 #include <iostream> #include <cstdio> #define M 101 #define N 101 int main() { int ns, mq; scanf("%d%d", &ns, &mq); int score[M], answer[M]; for (int i = 0; i < mq; ++i) { scanf("%d", &score[i]); } for (int i = 0; i < mq; ++i) { scanf("%d", &answer[i]); } int total = 0, ...
ALGO
0.999965
3.549835
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2021-09-13T14:28: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": "1781b2f0592...
73b8f8ea-352a-4fd1-b426-276c1512cc51
Tryphonpatta/my-leetcode
3394-CheckifGridcanbeCutintoSections/3394-CheckifGridcanbeCutintoSections.cpp
// Last updated: 3/26/2025, 12:42:35 AM class Solution { public: bool checkValidCuts(int n, vector<vector<int>>& rectangles) { vector<pair<int, int>> horizon, vertical; for (auto rect : rectangles) { vertical.push_back({rect[0], rect[2]}); horizon.push_back({rect[1], rect[3]}...
ALGO
0.999975
5.769654
{ "github_metadata": { "branch": "main", "commit_count": 645, "repo_created_at": "2024-10-26T15:52:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c92ee599ce...
e85e3cc0-747c-4f03-b268-74023dd766cf
michaelGonzalez1812/proyecto1-analisis
algorithms/MullerMethod.h
// // Created by mike on 13/03/18. // #ifndef PROYECTO_1_ROOTMULLER_H #define PROYECTO_1_ROOTMULLER_H #include "boost/math/tools/polynomial.hpp" #include <complex> #include <typeinfo> #include <iostream> #include <type_traits> using namespace std; using namespace boost::math::tools; /** * Encuentra las raices de u...
ALGO
0.999666
4.279363
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2018-03-11T03:42:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "efd5c50ea...
de9c0e11-0bf2-4196-a83f-830889b005ab
manoflearning/cp-codes
Baekjoon OJ/01000-01999/1245.cpp
#define _USE_MATH_DEFINES #include <bits/stdc++.h> #include <cassert> using namespace std; #define ll long long #define pii pair<int, int> #define pll pair<ll, ll> #define vi vector<int> #define vvi vector<vector<int>> #define vl vector<ll> #define vvl vector<vector<ll>> const int INF = 1e9 + 7; const int MOD = 1e9 + ...
ALGO
0.99985
3.636431
{ "github_metadata": { "branch": "main", "commit_count": 1899, "repo_created_at": "2020-08-06T14:38:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5bab03d7e...
3807c15e-8c07-42fd-b6a8-bddf988c5105
sktzwhj/algorithms
DFS/Q684_Redundant_Connection.cpp
// // Created by wu061 on 13/03/18. // #include <vector> #include <iostream> #include <unordered_map> #include <set> #include <stack> using namespace std; class Solution { public: vector<int> findRedundantConnection(vector<vector<int>> &edges) { //since there is only one additional edge so that the prob...
ALGO
0.999945
5.20401
{ "github_metadata": { "branch": "master", "commit_count": 298, "repo_created_at": "2017-09-02T04:26: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": "d7b6b694...
ceb4bd85-83c7-40df-8f78-2e2d326dd581
sergiovasquez122/EPI_SOLUTIONS
enumerate_trees.cc
#include <algorithm> #include <stack> #include <vector> #include <memory> #include "binary_tree_node.h" #include "test_framework/generic_test.h" #include "test_framework/timed_executor.h" using std::vector; std::unique_ptr<BinaryTreeNode<int>> Clone(const unique_ptr<BinaryTreeNode<int>>& tree){ return tree ? std::ma...
ALGO
0.999132
7.121621
{ "github_metadata": { "branch": "master", "commit_count": 181, "repo_created_at": "2020-05-31T03:03: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": "0a9fe9ab...
c3a7532c-8fba-4049-8e6c-6adee303cf57
jmalisz/University-PRR
openmp.cpp
#include <openmp.h> #include <stdexcept> // Perform Gaussian elimination to find matrix solution with OpenMP void OpenMPGaussianElimination(Matrix2D<double> &matrix) { int matrix_rows = matrix.rows(); int matrix_cols = matrix.cols(); for (int diagonal = 0; diagonal < matrix_rows; diagonal++) { int pivot_row = d...
ALGO
0.999944
5.70524
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-06-26T21:32: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": "45e36bb3e326...
cdba13c8-f544-4f6d-acbb-3b0c412c0fde
RaghuTheFire/DSA-Interview-Questions
FrequentElements.cpp
/************************************************ Find k most frequent elements in an array. Example: Input: [4, 4, 4, 5, 5, 3], k = 2 Output: [4, 5] Explanation: Top 2 frequent elements are 4 and 5 **************************************************/ #include <iostream> #include <vector> #include <unordered_map> #inclu...
ALGO
0.999998
6.927909
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-09-04T04:07: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": "43cf9964c9b...
ae7b5721-4893-4ac0-b651-55b023f6b363
juliamsousa/bcc201-introducao-a-programacao
Practice/funcao2.cpp
#include <iostream> using namespace std; // prototipos das funcoes bool par_impar (int x); int idade (int a, int m, int d); char conceito (double m); void tabuada (int n); int main () { int op, npar, anos, meses, dias, ntabuada; double media; // le a operacao a ser realizada cin>>op; while (op!=...
ALGO
0.999426
3.228211
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2020-11-01T21:38:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "322823017f9...
eb80415c-411b-4dbe-820e-77f78fdddfef
Kr-Shanu/codeChef
Randomly solved questions/MKGPLNKS.cpp
// https://www.codechef.com/FZBZ21C/problems/MKGPLNKS // ABOVE LINK OF THE PROBLEM IS GIVEN. #include <iostream> #include <vector> using namespace std; // If we look at the test cases then we can see that if there is variation of // black and white , let's take an example : // WWBBWW , here we can see that first ...
ALGO
0.99975
4.442879
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2022-01-15T09:38:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f4af3221c...
9c809b71-2681-4ed9-accc-bd7434ad2670
Iliocostalis/NumberMatchSolver
src/include/Utils.h
#pragma once #include <vector> #include <algorithm> #include <Image.h> #include <Position.h> #include <string> #define DEFINED(v) (v == 1) #ifndef NDEBUG #define DEBUG 1 #else #define DEBUG 0 #endif #define WINDOWS 1 #if DEFINED(LINUX) struct PlayField { Position<int> topLeft; Position<int> topRight; Po...
ALGO
0.981317
5.467219
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-09-09T15:55:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7915e3dbf65...
e4c38c9e-bed1-4ba2-82e6-7879875bfc58
gwqw/LeetCodeCpp
Algorithms/medium/535_encode_decode_tiny_url.cpp
/** 535. Encode and Decode TinyURL TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http://tinyurl.com/4e9iAk. Design a class to encode a URL and decode a tiny URL. There is no restriction on how your encode/decode alg...
ALGO
0.924913
6.251459
{ "github_metadata": { "branch": "master", "commit_count": 263, "repo_created_at": "2019-08-23T13:27: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": "3f7b4098...
b361ccda-e82c-4a94-a506-c2bb4340280f
cyclone-mind/Algorithm_tutorial
Code_Caprice/binary-tree/450delete-node-in-a-bst.cpp
/* 给定一个二叉搜索树的根节点 root 和一个值 key,删除二叉搜索树中的 key 对应的节点,并保证二叉搜索树的性质不变 。返回二叉搜索树(有可能被更新)的根节点的引用。 一般来说,删除节点可分为两个步骤: 首先找到需要删除的节点; 如果找到了,删除它。 */ struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(n...
ALGO
0.999994
5.057106
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2025-05-16T02:52: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": "09aa5e1c581...
e7d26a6e-7609-40a0-ac20-f19678a63b0c
KratosMultiphysics/Kratos
applications/RANSApplication/custom_conditions/fractional_step_k_based_wall_condition.h
// | / | // ' / __| _` | __| _ \ __| // . \ | ( | | ( |\__ ` // _|\_\_| \__,_|\__|\___/ ____/ // Multi-Physics // // License: BSD License // Kratos default license: kratos/license.txt // // Main authors: <NAME> // #ifndef KRATOS_FS_H...
ALGO
0.921617
6.562777
{ "github_metadata": { "branch": "master", "commit_count": 106408, "repo_created_at": "2017-02-13T10:58:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1141, "forks": 265, "issues": 381, "pull_requests": 258 }, "file_meta": { "content_id"...
68604c62-7cba-44dc-9f9d-7420543d6861
Geant4/geant4
source/processes/hadronic/models/fission/src/G4FissLib.cc
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
TOOL
0.968703
5.178567
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2016-06-21T08:25:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 705, "forks": 340, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "b8d5d5...
5eb70313-993a-4f55-abe3-eb36b0fa35ae
xhwhis/hzoj
540.cpp
#include <iostream> #include <algorithm> using namespace std; int n, cost, num[45], set[2][2100000], cnt[2] = {1, 1}; void func(int set_num, int start, int end, int sum) { if (sum > cost) return ; for (int i = start; i < end; i++) { sum += num[i]; set[set_num][cnt[set_num]] = sum; cnt[...
ALGO
0.999994
3.758327
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-10-11T05:29:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5365d2b5...
70d70d89-49e8-4f22-b55d-f31654773f3f
Alberto-SC/Competitive-Programming-solutions
Codeforces/Mashups/Morado 5/c.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' #define __ ios_base::sync_with_stdio(false),cin.tie(NULL); const int M = 1e6; const int mod = 998244353 ; vector<int> fact(M+1, 1), inv(M+1, 1), invfact(M+1, 1); int ncr(int n, int r){ if(r < 0 || r > n) return 0; return fact[n] *...
ALGO
0.99997
4.808689
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2020-07-20T03:18: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": "d8c0d36f4d8f...
8c618fc0-b109-4e20-95cb-fbc9076f175c
kroma-network/tachyon
tachyon/crypto/commitments/fri/prove.h
// Copyright (c) 2022 The Plonky3 Authors // Use of this source code is governed by a MIT/Apache-2.0 style license that // can be found in the LICENSE-MIT.plonky3 and the LICENCE-APACHE.plonky3 // file. #ifndef TACHYON_CRYPTO_COMMITMENTS_FRI_PROVE_H_ #define TACHYON_CRYPTO_COMMITMENTS_FRI_PROVE_H_ #include <utility> ...
ALGO
0.998654
7.632431
{ "github_metadata": { "branch": "main", "commit_count": 3504, "repo_created_at": "2023-06-27T10:48:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7765, "forks": 233, "issues": 18, "pull_requests": 1 }, "file_meta": { "content_id": "585c...
71c55eeb-b965-46f1-a925-9896b0471e12
vivek8420/programming
Tree-Graph/minimum_xor_over_tree.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define PI pair<ll,ll> #define ff first #define ss second #define boost ios_base::sync_with_stdio(false);cin.tie(NULL) #define MAX 1111111 vector<ll>tree[MAX]; ll a[MAX],in[MAX],out[MAX],preoder[MAX],cnt; void flush() { for(int i=0;i<MAX;i++)...
ALGO
0.999927
4.158492
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-02-15T17:29:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1dfdd5e159...
222ada94-d991-4e37-a103-f535929cef36
vv2529/Lab-weather
Container.h
// <NAME> #pragma once #include <functional> #include <cstdlib> #include <string> using sizetype = std::size_t; // ...nodes...<-head // head is empty template<class T> class Container { public: using Fmatch = std::function<bool (const T&)>;// bool(*) (const T&); using Fcompare = std::function<short (const T&, ...
TOOL
0.956463
4.843548
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2019-05-24T20:37: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": "22a97bf2a...
60ef0468-7db7-4ea6-9550-b7fd01a498ff
H-Shen/My_Code_Collection
Kattis/awkwardparty.cpp
// https://open.kattis.com/problems/awkwardparty // #include <bits/extc++.h> using namespace std; using namespace __gnu_pbds; int main() { int n, val; scanf("%d", &n); vector<int> A(n); unordered_set<int> unique_check; unordered_map<int, vector<int> > seats_stats; int min_val = numeric_limits...
ALGO
0.999912
3.8233
{ "github_metadata": { "branch": "master", "commit_count": 1586, "repo_created_at": "2019-04-11T06:48:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8da49a...
2bad5ba3-db21-4525-8359-e1defe602822
danieltrt/SBFL
results/GIVEN_1S_2S_3S_KS_PRINT_ZIG_ZAG_WAY.py.cpp
int ZigZag ( int rows , int columns , int * numbers ) { int k = 0 ; int arr [ columns ] [ rows ] ; for ( int j = 0 ; j < rows ; j ++ ) { for ( int i = 0 ; i < rows ; i ++ ) { if ( ( i % 2 == 0 ) ) { int j = 0 ; while ( j < columns && numbers [ k ] > 0 ) { arr [ i ] ...
ALGO
0.999628
3.678454
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-08-03T19:59: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": "17c221c7518e...
20df13d0-a629-48cd-9dc8-8981d1b55d31
tushar-fs/Data-Structures-Algorithms
Trie/Problems/MaximumXOR/solution.cpp
#include <iostream> #include <vector> using namespace std; class TrieNode { TrieNode *links[2]; public: TrieNode() { for (int i = 0; i < 2; i++) links[i] = nullptr; } bool containsKey(int bit) { return this->links[bit]; } void setKey(int bit) { ...
ALGO
0.999948
5.180534
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-04-14T22:38: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": "bc628347d48...
eb27f743-4eed-4625-891b-f4bb883cb54d
zepyoorkhechadoorian/Run4CBOTemplates
fullFits/CornellFitAlgorithm.hh
#include <cmath> #include <iostream> #include "gm2util/blinders/Blinders.hh" //histogram binning int startBin = 203; const int nBins = 4357; double n = 0.108; double wc_0 = 0.0; // histogram declarations static TH1D* wiggle = new TH1D("wiggle", "wiggle", nBins, 0.0, 650.0644);...
ALGO
0.994794
3.66891
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-12-05T19:14: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": "56aec385a...
ede0d40c-4bd1-415f-8cfd-47324a2742d7
gy2649263674/leetcode
code/test.cpp
#include <bits/stdc++.h> using namespace std; struct Node { int val; Node *left; Node *right; Node(int x) : val(x), left(nullptr), right(nullptr) {} }; template <typename T> ostream &operator<<(ostream &out, vector<T> vec) { for (auto &i : vec) { out << i << " "; } return out; } ...
ALGO
0.998217
4.088646
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-07-13T08:00: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": "c0d7dbba714...
0ccf2443-5223-47b6-ac06-ddb418296e67
trannguyenhan/workspace-algorithms
Contest_PTIT/C8_bai4.cpp
#include <iostream> #include<string> #include<vector> #include<queue> using namespace std; /*Bai toan dua ve tim tong binh phuong nho nhat cua day so khi giam day di k don vi trong bat ki so hang nao, -> Giai quyet bai toan : Giam di lan luot so lon nhat trong day*/ /*Y tuong : Dua het so ki tu cua chuoi str vao 1 h...
ALGO
0.999862
4.61229
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2020-09-08T02:54:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 90, "forks": 46, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7094a1f...
ef976140-3eae-4d98-8dff-e7a6ad26adfe
FrancoGAlbornoz/Trabajos-integradores-UTN
Menu TP Integrador.cpp
/* INTEGRANTES : <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>*/ #include<stdio.h> #include <stdlib.h> //*Parte de la funcion del metodo QuickSort*// void qs(int lista[],int limite_izq,int limite_der){ int izq,der,temporal,pivote; izq=limite_izq; der = limite_der; pivote = lista[(izq+der)/2]; ...
ALGO
0.999798
4.158084
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-12-30T16:03: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": "b5dc0866acbb...
2e9f9e0b-f2c3-40b9-97fd-32c6d6113d19
hpcc-systems/HPCC-Platform
system/jlib/jset.cpp
/*############################################################################## HPCC SYSTEMS software Copyright (C) 2012 HPCC Systems®. 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...
TOOL
0.934765
5.694907
{ "github_metadata": { "branch": "master", "commit_count": 39949, "repo_created_at": "2011-07-11T14:29:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 593, "forks": 306, "issues": 0, "pull_requests": 88 }, "file_meta": { "content_id": "25...
4844d3bf-31b7-480a-b545-e81289744041
NicoKNL/coding-problems
problems/uva/UVA00661.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, m, c; int seq = 1; while (cin >> n >> m >> c) { if (n == 0 && m == 0 && c == 0) break; vector<int> device_on(n); vector<int> current(n); for (int i = 0; i < n; i++) { cin >> current[i]; } ...
ALGO
0.997116
3.942154
{ "github_metadata": { "branch": "master", "commit_count": 768, "repo_created_at": "2018-12-03T23:57:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "afcf4f73...
c6bd0738-61c2-44e4-9b23-5b673c3233b0
FiejdaszBartosz/metody_obliczeniowe
zad7/main.cpp
// // Created by <NAME> on 12/04/2022. // #include <iostream> #include <cmath> #define TOLF 1e-10 //ustawienie tolerancji residuum #define TOLX 1e-10 //ustawienie tolerancji estymatora #define ITERACJE 50 //ustawienie liczby iteracji void uzupelnijDane(double **pA, double *pB, double *pX) { pA[0][0] = 100.0; pA[...
ALGO
0.999992
4.433641
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2022-03-08T08:30: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": "41775beb5f8...
0fc46ceb-4d69-4ca8-b5a5-947ab7730724
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1245/Standings3/29604535_64009322.cpp
#include <iostream> #include <algorithm> #include <stdio.h> #include <vector> using namespace std; #define LL long long #define FOR(i,l,r) for(int i = l; i <= r; ++i) #define REP(i,l,r) for(int i = l; i < r; ++i) #define FORD(i,r,l) for(int i = r; i >= l; --i) #define REPD(i,r,l) for(int i = r; i > l; --i) #define p...
ALGO
0.999913
3.699112
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-11-22T14:40:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8a6813d1c...
61993d2b-e347-461a-85d7-da1b495e7953
johnyejin/Algorithm
Algorithm/프로그래머스/기지국설치_조혜영.cpp
#include <iostream> #include <vector> using namespace std; int solution(int n, vector<int> stations, int w) { vector <int> check; int answer = 0; int cnt; if (stations[0] - w > 1) { cnt = (stations[0] - w) - 1; check.push_back(cnt); } for (int i = 0; i < stations.size() - 1; i++) { if ((stations[i + 1] -...
ALGO
0.999907
4.1062
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2018-08-03T17:40:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8efbf915...
d301fd0c-538b-48e7-9ad6-39c3a3649983
ki-opt/AtCoder-ABC
ABC201-ABC300/ABC220/C/src/src.cpp
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <unordered_map> #include <cmath> #include <climits> #include <string> #include <queue> #include <stack> #include <set> #include <math.h> #include <float.h> #include "atcoder/all" using namespace std; using namespace atcoder; using ull=...
ALGO
0.999835
4.383744
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-02-05T05:00:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "868d391e4...
7630f020-b0bb-4b3d-984a-b6345a545ed3
wyx150137/wyx-infinity37-ac-code-on-BZOJ
4624_wyx.cpp
#include <cmath> #include <stdio.h> #include <string.h> #include <iostream> #include <algorithm> using namespace std; const int N = 600 * 600 * 4; typedef double f2; const f2 PI = acos(-1); struct cp { f2 a, b; cp (f2 _a = 0, f2 _b = 0) :a(_a), b(_b){} cp operator + (const cp &z) const {return cp(a+z.a,b+z.b);} cp...
ALGO
0.991536
3.111492
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-07-12T01:10:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d920631e1f...
96dc62fa-a04a-4cdb-a80b-89c0a72e7f62
michiganhackers/AlgorithmsAndDatastructures
Sorting/bubbleSort/bubbleSort.cpp
#include <iostream> #include <vector> #include <utility> void bubble_sort(std::vector<int> &vec) { for (int i = 0; i < vec.size(); ++i) { for (int j = i + 1; j < vec.size(); ++j) { if (vec[j] < vec[i]) { std::swap(vec[i], vec[j]); } } } } void bubble_sort_optimized(std::vector<int> &vec) { for (int i...
ALGO
0.999477
6.290824
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2018-01-26T07:36:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "339633bda...
56d7e594-a94a-4066-97d3-2ad98d1ec4eb
IsrakAhmed/CSE4112_Parallel_Processing_and_Distributed_System_Lab
RU Q Solve/phonebook.cpp
#include <bits/stdc++.h> #include <mpi.h> /* mpic++ phonebook.cpp -o pb mpirun -np 4 ./pb contact_list.txt Bob */ using namespace std; struct Contact { string name; string phone; int lineNumber; }; // Converts a slice of Contact vector into a single string string vector_to_string(const vector<Co...
TOOL
0.991292
4.56883
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-05-03T06: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": "30ea7cf3be14...
245cbbd3-54bd-407d-b088-5bf134d2450a
grame-cncm/faust
tools/physicalModeling/mesh2faust/vega/libraries/include/matrix.h
/************************************************************************* * * * Vega FEM Simulation Library Version 3.1 * * * * "matrix" library ...
ALGO
0.99454
6.163169
{ "github_metadata": { "branch": "master-dev", "commit_count": 13912, "repo_created_at": "2016-11-05T13:09:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2789, "forks": 355, "issues": 204, "pull_requests": 7 }, "file_meta": { "content_id...
3cc48695-37e3-47fe-ae2c-3607422df7ab
egorkuzn/associative_caches
my_main.cpp
#include <stdlib.h> #include <iostream> #include <fstream> #include <x86intrin.h> #include <limits> #define L1 131072 // L1 data = 128 KB #define L2 2097152 // L2 = 2 MB #define L3 4194304 // L3 = 4 MB #define BLOCKS_COUNT 32 #define K 10 size_t takeTime(size_t* array, size_t size){ // cash warming up for(size_t ...
ALGO
0.99779
3.710735
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-12-12T08:09: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": "02e4bb4975...
e2ea7406-705e-4b23-83e3-dd286ab7a123
renling/S3PIR
src/include/utils.h
#pragma once #include "cryptopp/cryptlib.h" #include "cryptopp/hex.h" #include "cryptopp/rijndael.h" #include "cryptopp/modes.h" #include "cryptopp/files.h" #include "cryptopp/osrng.h" #include <cassert> #define AES_KEY "1234567812345678" #define LAMBDA 80 using namespace std; using namespace CryptoPP; // PRF across...
ALGO
0.976744
5.999928
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-07-19T14:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1dfa677284f...
d6680fa9-f0f4-4c90-bcb3-d1b8892862e3
githubweek1/DSA
Mathematics/primeFactors.cpp
// C++ program to get all the prime factors of a number #include <iostream> using namespace std; // function prototype void primeFactors(int n); int main() { int n; cout << "n: "; cin >> n; primeFactors(n); } // function to get prime factors void primeFactors(int n) { if (n <= 1) return; w...
ALGO
0.999773
4.478922
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2023-08-07T04:09: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": "a5c7bbb366c...
9b0c9363-a724-4056-a7e7-03b4a214518d
TimothyHorscroft/competitive-programming
codeforces/1251/d.cpp
#include <bits/stdc++.h> using namespace std; typedef long long lglg; int main() { ios::sync_with_stdio(0), cin.tie(0), cout.tie(0); int T; cin >> T; while (T--) { int N; lglg S; cin >> N >> S; lglg R[N]; pair<lglg, lglg> LR[N]; for (int i=0; i<N; ++i) { lglg l, r; cin >> l >> r; R[i] ...
ALGO
0.999932
4.384264
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2020-07-03T11:07: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": "3f64b7932...
61718812-84f0-4692-b5aa-8e91de36d6c3
khuranagarvit019/100-Days-of-Code
MaxSubArraySum.cpp
#include <iostream> using namespace std; int max(int a, int b){ return(a > b) ? a : b; } int maxSum(int arr[], int p, int r){ if(r == p){ // only if n = 1 return arr[p]; } int q = (p+r)/2; int maxFromLeft = 0; int sum = 0; for (int i=q; i>=p; i--)...
ALGO
0.999962
4.761718
{ "github_metadata": { "branch": "master", "commit_count": 139, "repo_created_at": "2020-08-20T12:31:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa1463cd...
dace7094-0de0-4e29-8862-dde348ab673c
gxtxhm/algorithm-1day-1commit
algorithmPractice/튜플/튜플.cpp
#include <string> #include <vector> #include <algorithm> #include<sstream> using namespace std; bool hash_table[100001] = { 0, }; bool compare(const string& a, const string& b) { return a.length() <= b.length(); } void slicingString(vector<string>& ss,const string& s) { bool open = false; string i = "";...
ALGO
0.998081
4.155979
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2022-08-06T08:09:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "192cd4223cf...
de4ff35c-be3a-4abf-9565-e5d698f83723
sandra-chavdarova/Structural-Programming
Exercises/Second Partial Exam/59.cpp
/* N positive integers are entered from the standard input and stored in an array a (N <100). Also, a single-digit integer k is entered. Write a function that will find the maximum of the abbreviated numbers of the elements in the array a and provide a call to that function in the main () function. A given element ...
ALGO
0.999917
5.232126
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2024-10-27T21:46: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": "934d51b63...
54deaadb-beab-441b-8abd-bc3067c3ca83
Thriliriel/BioCrowdsPurdue
BioCrowdsTio/Agent.cpp
#include "stdafx.h" Agent::Agent() { //set inicial values valorDenominadorW = 0; denominadorW = false; idleTimer = 0; maxIdleTimer = 50; } //initialize with its new position Agent::Agent(Vector3 newPosition, std::string newName) { position = newPosition; name = newName; //set inicial values valorDenominador...
ALGO
0.999233
4.809586
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2017-01-13T16:26: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": "c6fe5d88c...
5ca31d3e-7bdc-4063-81b1-ed1fe68150f5
ljy0221/Algorithm_Study
C++17/백준/Gold/2294. 동전 2/동전 2.cc
#include <iostream> #include <vector> #include <climits> using namespace std; int main() { int n, k; cin >> n >> k; // Boolean 배열로 동전 종류 저장 (중복 자동 제거) vector<bool> hasCoin(k + 1, false); for(int i = 0; i < n; i++) { int coin; cin >> coin; if(coin <= k) { // k보다 큰 동전은 사...
ALGO
0.999914
4.585526
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2025-05-07T01:10: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": "602b0613fc...
5f58dd0e-b480-4b63-95b9-a0611d2d7a41
YashrajTilekar/Projects
Genric Data Structure Library/SinglyLL.cpp
// Generic Data Structure Library //Singly Linear Linked List #include<iostream> using namespace std ; //////////////////////////////////////////////////////////////////////////////// template<class T> struct node { T data ; struct node *next ; }; //////////////////////////////////////////////////////////////...
ALGO
0.997991
4.641078
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2022-07-15T13:57:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b30efb7b9bc...
7b911e23-2244-4fd6-896f-1ed917928735
akankshaaa013/DSA_Busted
Dynamic_Programming/DP_2/Unique_paths.cpp
#include <bits/stdc++.h> using namespace std; int solve(int row, int col, vector<vector<int>> &dp) { if (row == 0 && col == 0) return 1; if (row < 0 || col < 0) return 0; if (dp[row][col] != -1) return dp[row][col]; int top = solve(row - 1, col, dp); int left = solve(row,...
ALGO
0.999945
5.410469
{ "github_metadata": { "branch": "main", "commit_count": 53, "repo_created_at": "2023-06-26T04:55: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": "13a11c09b33...
49437e56-ac04-41b8-8498-265e17fa18cc
WUST-mengqinyu/Template
04_String/01_KMP/02_exKMP.cpp
const int maxn = 1e5 + 10; int nex[maxn], extend[maxn]; //预处理计算Next数组 void getNext(char *str) { int i = 0, j, po, len = strlen(str); nex[0] = len; //初始化nex[0] while (str[i] == str[i + 1] && i + 1 < len) i++; //计算nex[1] nex[1] = i; po = 1; //初始化po的位置 for (int i = 2; i < len; i++) { ...
ALGO
0.999908
3.719028
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2020-04-17T13:37:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8a035eac6...
e6b7addf-18c5-4b4a-932a-b520116134fa
AsterNighT/OI-Package
DS&Algorithm-Models/图论/二分图匹配/KM_BFS.cpp
#include <iostream> #include <cstdlib> #include <cstdio> #include <algorithm> #include <string> #include <cstring> #include <cmath> #include <map> #include <stack> #include <set> #include <vector> #include <queue> #include <time.h> #define eps 10e-7 #define INF 0x3f3f3f3f #define MOD 1000000007 #define rep0(j,n) for(in...
ALGO
0.99998
3.593384
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2017-03-05T06:38:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ff502f59...
a9e798ba-400e-4db6-b549-ef7cd4e920a7
avcopan/MPACK
mlapack/library/Rlarfg.cpp
/* * Copyright (c) 2008-2010 * <NAME> * All rights reserved. * * $Id: Rlarfg.cpp,v 1.7 2010/08/07 04:48:32 nakatamaho Exp $ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of...
ALGO
0.985183
4.334817
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-12-18T18:49:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "467f9395c...
45a482c0-eca0-4b1e-a335-4f761305019e
azoththecreator/BaekJoon
알고리즘_기초 1/301_수학_1_연습/01_9613.cpp
/* 9613. GCD 합 [문제] 양의 정수 n개가 주어졌을 때, 가능한 모든 쌍의 GCD의 합을 구하는 프로그램을 작성하시오. [입력] 첫째 줄에 테스트 케이스의 개수 t (1 ≤ t ≤ 100)이 주어진다. 각 테스트 케이스는 한 줄로 이루어져 있다. 각 테스트 케이스는 수의 개수 n (1 < n ≤ 100)가 주어지고, 다음에는 n개의 수가 주어진다. 입력으로 주어지는 수는 1,000,000을 넘지 않는다. [출력] 각 테스트 케이스마다 가능한 모든 쌍의 GCD의 합을 출력한다. */ #include <iostream> using namespace...
ALGO
0.999897
5.25626
{ "github_metadata": { "branch": "main", "commit_count": 83, "repo_created_at": "2025-04-14T03:46:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ac98d66a8c8...
6281814a-82bd-4090-9a88-1b5e003b09e6
kaseyleavell/ChangeMachine
changeMachine/changeMachine/BillCounter.h
#pragma once #include <iostream> using namespace std; //predefine denominations array extern unsigned int g_denominations[]; //prints the array to the console in a readible fashion void printCash(unsigned short c[]) { //print all values in this "cash" instance to console cout << "+++++++++++++++++++++++++++++++++++...
CONFIG
0.996505
3.794007
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-07-24T23:33: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": "9c9983de1592...
08a57cd6-3c4e-42f8-82c3-2c1f6ee9df6a
codejoydo/codeforces
669c.cpp
//joyneel #include<bits/stdc++.h> using namespace std; typedef pair<int,int> II; typedef vector< II > VII; typedef vector<int> VI; typedef vector< VI > VVI; typedef long long int LL; #define PB push_back #define MP make_pair #define F first #define S second #define SZ(a) (int)(a.size()) #define ALL(a) a...
ALGO
0.999953
3.342849
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2015-11-11T01:06:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 12, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "dc11e077...
2f8e58e6-767f-4726-bd4f-8f65d9f0ecfa
ftiasch/mithril
2013-05-30/F.cpp
#include <cstdio> #include <cstring> #include <utility> #include <vector> #include <queue> #include <map> #include <algorithm> struct Point { int x, y; Point(int x = 0, int y = 0) : x(x), y(y) {} Point &operator +=(const Point &o) { x += o.x; y += o.y; return *this; } }; int ...
ALGO
0.999933
4.231101
{ "github_metadata": { "branch": "master", "commit_count": 162, "repo_created_at": "2012-07-17T06:58:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6b4b662...
f455eb69-ad68-4217-95b3-d217b4a8a2ee
Matwy/programmazione1
lettura scrittura file/comparaparole.cpp
#include <fstream> #include <iostream> using namespace std; bool parole_uguali(char[], char[]); int main(int argc, char** argv){ if(argc < 4) { cout << "Usage: " << argv[0] << "<in> <in> <out>" << endl; return -1; } fstream inputa, inputb, outputc; inputa.open(argv[1], ios::in); ...
TOOL
0.939884
3.695383
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2023-12-14T07:30:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4579e18024...
8c075d45-fd52-4e61-97f1-cb1a7a704629
MiniZinc/libminizinc
lib/chain_compressor.cpp
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* * Main authors: * <NAME> <<EMAIL>> */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. *...
ALGO
0.998806
4.511641
{ "github_metadata": { "branch": "master", "commit_count": 6934, "repo_created_at": "2015-01-21T00:20:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 555, "forks": 84, "issues": 108, "pull_requests": 12 }, "file_meta": { "content_id": "e1...
1e033da4-8ca7-4b9f-b9b3-1eb7824bce0e
hectarra/Ejercicios-EDA-2018-2019
09_Impares_DivideYVenceras_Binaria.cpp
// 2E - <NAME> // E04 #include <iostream> #include <iomanip> #include <fstream> #include <vector> // función que resuelve el problema int resolver(std::vector<int> const& v, int ini, int fin) { int m = (ini + fin - 1)/2; if (v[m] % 2 == 1) return v[m]; else if ((v[m] - v[ini]) / 2 == m - ini) retu...
ALGO
0.999973
4.62
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-09-13T21:49: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": "390df94165...
6ebe8129-101e-4153-95cd-c8cf388e6928
maspypy/library
mod/mod_pow.hpp
#pragma once #include "mod/mongomery_modint.hpp" #include "mod/barrett.hpp" u32 mod_pow(int a, ll n, int mod) { assert(n >= 0); if (mod == 1) return 0; a = ((a %= mod) < 0 ? a + mod : a); if ((mod & 1) && (mod < (1 << 30))) { using mint = Mongomery_modint_32<202311021>; mint::set_mod(mod); return ...
ALGO
0.998588
5.802594
{ "github_metadata": { "branch": "main", "commit_count": 10525, "repo_created_at": "2022-04-15T18:55:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 92, "forks": 11, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "876c2c...
e33a6230-2bbc-41fb-aa56-369a35dfb450
jstraub/dpMM
include/dpMM/lrCluster.hpp
/* Copyright (c) 2015, <NAME> <<EMAIL>> * Licensed under the MIT license. See the license file LICENSE. */ #pragma once #include <Eigen/Dense> #include <iostream> #include <boost/random/gamma_distribution.hpp> // for gamma_distribution. #include <dpMM/basemeasure.hpp> #include...
ALGO
0.991222
6.154327
{ "github_metadata": { "branch": "master", "commit_count": 238, "repo_created_at": "2015-04-08T18:56:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c939ecf...
775796b6-e9e6-4343-be04-849e137ebe79
Amtilan/cpp
lab pp1/9 lab/9f.cpp
#include <bits/stdc++.h> using namespace std; string polindrom (string arr){ int a [2], cnt = 0; for (int i = 0; i < arr.length(); i++){ if ((int)arr[i] + 1 == (int) arr[arr.length() - 1 - i] || (int) arr[i] - 1 == (int) arr[arr.length() - 1 - i]){ cnt++; } } if (cnt == arr...
ALGO
0.999793
4.003434
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-02-18T13:38:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c436e1ab76...
6c182e43-ebe1-4b2e-8067-bb03c3f60cac
diyabhandari/DSA-in-CPP
arrays/medium/findLeaders.cpp
//Given an integer array nums, return a list of all the leaders in the array. //A leader in an array is an element whose value is strictly greater than all elements to its right in the given array. The rightmost element is always a leader. The elements in the leader array must appear in the order they appear in the ...
ALGO
0.999995
5.473687
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2024-05-01T13:52: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": "bbcdbf069...
5c98995c-7d80-41a9-b14e-e1b070572239
sifatmahmud/Phitron
Data structure/Module-06/delete_from_position.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node *next; Node(int val) { this->val = val; this->next = NULL; } }; // ------------------ function area --------------------- void insert_at_tail(Node *&head, int val) // insert at tail er function { No...
ALGO
0.998114
4.8972
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-09-29T17:17: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": "f72fd1d91b3...
7236b6a8-972f-4ac9-ac68-45f3d4b2f3fa
yrahul3910/chatting-style-recognizer
code.cpp
#include <iostream> #include <fstream> #include <string> #include <cstring> using namespace std; int main(int argc, char** argv) { if (argc != 4) { cout << "Arguments invalid.Format:\n" << "segregate <input file> <name1> <name2>"; } ifstream fin(argv[0]); ofstream fout1("1.txt"); ofstream fout2("2.txt"); w...
TOOL
0.943853
3.865009
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-09-12T17:34:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b07531b5e0...
bbbe37ed-48be-485f-aa22-2af7514e32ae
Gautam-git1050/APS2022-CodeLibrary
exponential_search.cpp
#include <assert.h> #include <iostream> #include <string> using namespaces std; template<class Type> inline Type* binary_s(Type *array, size_t size, Type key) { int32_t lower_index(0), upper_index(size - 1), middle_index; while (lower_index <= upper_index) { middle_index = floor((lower_index + upper_index) / 2); ...
ALGO
0.99975
4.574142
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-04-06T18:02: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": "b7364745bae...
e5cd730a-4645-4661-8273-ee195b827f73
loiipa/ft_containers
algorithm.hpp
// #include <algorithm> namespace ft { /* std::equal determines if two sets of elements are the same, function templtae */ template <class InputIt1, class InputIt2> bool equal (InputIt1 first1, InputIt1 last1, InputIt2 first2) { for (; first1 != last1; ++first1, ++first2) { if (!(*first1 == *first2)) ...
ALGO
0.968035
5.426104
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-05-29T07:07: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": "6b4c549438a...
87888728-59c5-46f6-8075-9f26ef6d7654
denjai/TU-Plovdiv
Semester6/OOP/TDihot.cpp
#pragma hdrstop #include "TDihot.h" #include <string.h> #include <stdio.h> #pragma package(smart_init) int TDihotTable::search(char *bg, char *en, int &k) { int start = 0, end = count - 1, m; m = (start + end) / 2; while (start < end) { if (!strcmp(tb[m].wordbg, bg)) return m; else if (strcmp(tb[m].wordbg, bg)...
TOOL
0.988296
3.496443
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2015-11-02T12:15: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": "279fe011e...
9eca7e3f-d5bb-4725-9963-25f37dc29e03
amritpandey23/DSA-Library
_ARCHIVE/stack/balanced_paranthesis.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int #define print(a) for (auto x : a) cout << x << " "; cout << endl; #define mod 1e9 + 7 #define endl "\n" /* author: ok-ape date: */ bool isBalanced(string exp) { /* [({ })] */ stack<char> s; for (int i = 0; i < exp.length(); ++...
ALGO
0.999663
5.013953
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2022-04-13T12:28: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": "c21480e58...
d180f559-2c53-40cf-b68c-62fe23cdcd4c
Sumanth-NR/CompetitiveProgramming
Platforms/CodeForces/Rounds_0751-0800/Round787_Div3/A_Food_for_Animals.cpp
#include <bits/stdc++.h> using namespace std; typedef unsigned long int ul; typedef long long int ll; typedef unsigned long long int ull; typedef vector<int> vi; typedef vector<long long int> vll; typedef pair<int, int> pii; #define MOD 1000000007 #define PI 3.1415926535 #define pb push_back #define prec fixed << se...
ALGO
0.999579
3.825598
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2022-04-18T13:29:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8da716c4...
f3e3f20b-5637-419d-89fd-4ececa505d5b
serega404/CFTasks
siaod/Вирусы/main.cpp
#include <iostream> #include <queue> using namespace std; int main() { int m, n, k, steps = 0; cin >> n >> m >> k; vector<vector<bool>> field(n, vector<bool>(m, false)); queue<pair<int, int>> q; int x, y; for (int i = 0; i < k; i++) { cin >> x >> y; field[x-1][y-1] = true; ...
ALGO
0.999989
3.78059
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2023-02-23T13:11: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": "aa0e03a9cb6...
bfe5a0fd-cbb8-416e-8756-e3b44cd4cf1f
yangshuophd/aep
platform/model2.cpp
#include "model2.h" Model2::Model2() : Model() { } Model2::Model2(ComponentList &componentList, ConnectorList &connectorList) : Model(componentList, connectorList) { } Model2::~Model2() { for (UINT32 i = 0; i < m_InputTreeList.size(); ++i) { ComponentNode *inputTree = m_InputTreeList[i]; Dest...
ALGO
0.965462
5.027323
{ "github_metadata": { "branch": "master", "commit_count": 204, "repo_created_at": "2013-09-22T07:38:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f789e8a3...
c7f25260-f510-4399-be7e-a5a38ab06ac5
raincross7/code-similarity
codes/train_code/problem112/problem112_231.cpp
#include <iostream> #include <algorithm> #include <list> using namespace std; int main(void){ cin.tie(0); ios::sync_with_stdio(false); list<int> List; //????????? int CommandNum; //????????° string Command; int Number; List.clear(); cin >> CommandNum; for(i...
ALGO
0.99941
4.653164
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f690716be83...
bfbb0b8c-2316-4746-909a-28e65792487c
mangomatcha/SeismicRaytracer
ray.cpp
#include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <vector> #include <fstream> #include <iostream> #include <time.h> #include <string> #include <sstream> #include <istream> #include <windows.h> #include <cuda_runtime.h> #include <algorithm> #include <cassert> #include "ray.cuh" using...
ALGO
0.990254
4.2411
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-10-31T21:07:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e3284117...
34b0a35b-76ee-4a98-b4a7-a201ca6b7b3e
Da-Huang/tag2vec
omp_main.cc
#include <iostream> #include <omp.h> #include <unistd.h> namespace { int i = 0; void F(int p) { int k; #pragma omp critical(A) { k = i + 1; sleep(1); i = k; std::cerr << "f(" << p << "): " << i << std::endl; } } void G(int p) { int k; #pragma omp critical(A) { k = i + 1; sleep(...
ALGO
0.998304
4.823093
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2016-03-12T15:15:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "6a48bbce5...
521626db-faf7-431a-80db-e8c5e9d58adb
thinkphp/computer-science-in-c
Gems /Cryptology/cifrul_de_subtitutie.cpp
#include <iostream> #include <string> #include <map> std::string substitutionCipher(std::string text, std::map<char, char> key, bool encrypt) { std::string result = ""; // If decrypting, create a reverse key std::map<char, char> reverseKey; for (const auto& pair : key) { reverseKey[pair.second...
ALGO
0.999608
5.884305
{ "github_metadata": { "branch": "master", "commit_count": 2852, "repo_created_at": "2014-08-20T07:22:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "7886bac...
4f97c241-210f-4c61-b717-5e9071157c0b
ishandutta2007/codeforces-r
rfpermen/normal/1207/G.cpp
#include<bits/stdc++.h> #pragma GCC optimize("O3") #pragma GCC target("tune=native") #pragma GCC optimize("unroll-loops") using namespace std; template<class A, class B> ostream& operator<<(ostream& os, const pair<A, B> &p) { os << '(' << p.first << ',' << p.second << ')'; return os; } template<class T> ostream...
ALGO
0.999712
3.664715
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58: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": "4d1fa015d0be...
590f2fa6-79f8-4193-a569-2419e8cfa603
ela60/Analysis-Algorithm-lab-problem-solve
problem2.cpp
#include <stdio.h> #include <bits/stdc++.h> using namespace std; int convertTimeToMinutes(string timeStr) { string hr = ""; string min = ""; int flag = 0; for (auto i : timeStr) { if (i == ':') { flag = 1; continue; } !flag ? hr += i : min += i...
ALGO
0.999266
4.971487
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-07-10T13:04:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b4f00bacb064...
28ab0fcb-1cf6-41b0-8f7b-041619d6075c
vishnupsatish/dmoj-practice
valentines19j3.cpp
#ifdef ONLINE_JUDGE #include <bits/stdc++.h> #else #include <iostream> #include <iomanip> #include <vector> #include <deque> #include <algorithm> #include <numeric> #include <cmath> #include <queue> #include <functional> #include <stack> #include <map> #include <cstring> #include <set> #include <unordered_map> #include...
ALGO
0.999645
4.197382
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2021-02-17T18:33:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "553eec2aa...
9a274cd8-ceea-4fa1-93d3-0eaa168db5ea
satya-arjunan/visiocyte
released_plugins_more/visiocyte_plugins/minMaxfilter/minMaxfilterplugin.cpp
/* minMaxfilterplugin.cpp * 2009-08-19: create this program by <NAME> */ // Adapted and upgraded to VISIOCYTEPluginInterface2_1 by <NAME>, 2012-04-05 // add dofunc() by <NAME>, 2012-04-11 #include <QtGui> #include <iostream> #include <math.h> #include <stdlib.h> #include "minMaxfilterplugin.h" using namespace st...
TOOL
0.949913
4.834272
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-02-15T09:14: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": "d4e492a5d...