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
1feaa85e-6908-4793-a0bf-b07fbce92796
ljy0221/Algorithm_Study
C++17/백준/Gold/2098. 외판원 순회/외판원 순회.cc
#include <iostream> #include <vector> #include <algorithm> #include <climits> #include <cstring> using namespace std; int N; // 도시의 수 int W[16][16]; // 비용 행렬 int dp[16][1 << 16]; // DP 테이블: dp[current][bitmask] // current: 현재 도시, visited: 방문한 도시들(비트마스크) int tsp(int current, int visited) { /...
ALGO
0.999976
5.224062
{ "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": "cc3bc4d3f0...
c812c54d-ba59-4949-bc42-742e52b6632e
eric15342335/comp2113
Module5/meanSD.cpp
#include <iostream> #include <cmath> #include <iomanip> using namespace std; double mean_5(double a, double b, double c, double d, double e){ return (a+b+c+d+e)/5; } double sd_5(double mean, double a, double b, double c, double d, double e){ return sqrt((pow(a-mean, 2)+pow(b-mean, 2)+pow(c-mean, 2)+pow(d-mean...
ALGO
0.993953
4.075362
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2024-02-02T15:20: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": "4ec153e1f84...
e1f229d3-8ed3-4e2d-8543-1a3d0714c3e9
MazenAli/LAWA
lawa/constructions/realline/multi/refinementbspline.tcc
#ifndef LAWA_CONSTRUCTIONS_REALLINE_MULTI_REFINEMENTBSPLINE_TCC #define LAWA_CONSTRUCTIONS_REALLINE_MULTI_REFINEMENTBSPLINE_TCC 1 #include <cassert> #include <iostream> #include <lawa/math/lawa_math.h> #include <lawa/constructions/interval/multi/_linear_evaluator.h> #include <lawa/constructions/interval/multi/_quadra...
ALGO
0.937413
5.947334
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2015-08-06T13:24:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f43220d25...
82a7125f-e84b-4398-9536-d23d71191d65
lampralexandros/Work4_-Parallel-and-distributed-systems-
stable_versions/bpnet.cpp
/********************************************************************************************************** C++ Source FILE: Backpropagation Neural Network Implementation File: bpnet.cpp Version: 0.1 Copyright(C) NeuroAI (http://www.learnartificialneuralnetworks.com) Documentation:http://www.learnartificialne...
ALGO
0.989603
4.411294
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2017-08-24T14:52: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": "1d5205e68...
ebc42aa1-766a-437e-9ea2-bc4a4dd3f1fe
raincross7/code-similarity
codes/train_code/problem438/problem438_160.cpp
/* * atcoder/abc108_2nd/c.cpp */ // C++ 14 #include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <cstring> // memset #include <cassert> using namespace std; #define ll long long #define loop(__x, __start, __end) for(int __x = __start; __x < __end; __x++) template <class T> bool chmin(T...
ALGO
0.999939
3.992143
{ "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": "437d07aed1fb...
589fee36-cb1c-426e-9be3-05d5255d1940
nimacgit/CPP
class-olympiad/1394/judge/prime.cpp
#include <iostream> #include <vector> #include <algorithm> #include <set> using namespace std; const int maxn = 150 * 1000 + 100; vector <int> list[maxn]; int w[maxn]; vector <int> edge[2]; const int inf = 1000; int d[maxn], n, m; set < pair <int, int> > myset; int parent[maxn]; long long sum = 0; bool mark[maxn]; in...
ALGO
0.999997
3.896474
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-11-23T15:25: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": "d3f2092f66...
4a5f0681-8208-4416-acec-8a1a599d65ee
chenghu17/Algorithm
Leetcode/c_914_X_of_a_Kind_in_a_Deck_of_Cards.cpp
// // Created by Mr.Hu on 2019/1/6. // // leetcode 914 X of a kind in a deck of cards // // 题目给定一些卡片,要求选择一个数字X,可以将卡片分成多组,每组卡片的个数为X,且每组卡片上的数字都相同。 // // 首先,我们需要统计每种数组的卡片有多少个。所以这里使用map<int,int>来保存; // 得到每个卡片的个数之后,便设计到划分的问题了。刚开始对题目没有理解透,以为只有每种卡片的个数相等才满足条件。 // 一顿操作之后,提示[1,1,2,2,2,2]也可以...然后发现如果某一种卡片的个数能被其他卡片个数都整除,也是可以的... /...
ALGO
0.990122
5.160444
{ "github_metadata": { "branch": "master", "commit_count": 501, "repo_created_at": "2018-01-25T08:00:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55d694fd...
ce6a6ae1-2bc8-4fcf-85fa-88e33a5d10f9
KrisjanisP/cp-algorithms
src/string-trie.hpp
#include <bits/stdc++.h> #define ALPHA_START 'A' #define ALPHA_SIZE 26 using namespace std; struct Vertex { char alphabet; bool exist; vector<Vertex *> child; Vertex(char a) : alphabet(a), exist(false) { child.assign(ALPHA_SIZE, NULL); } }; class Trie { private: Vertex *root; publ...
ALGO
0.997562
3.814694
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-03-20T11:26:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97e3f70935bf...
408205da-361a-42e6-a990-8996e9c7ba53
DungNguyenManh/Homework
Main/Lap 9/Nâng cao/Bai10.cpp
#include <stdio.h> #include <time.h> #include <stdlib.h> #define Max 100 #define Min -100 int Nhap_Kich_Thuoc_Mang(); void Nhap_X(int &x); void Nhap_Mang(int a[], int n); void Xuat_Mang(int a[], int n, int x); int main() { int a[Max], n = Nhap_Kich_Thuoc_Mang(), x; srand((int)time(NULL)); Nhap_X(x); ...
ALGO
0.998465
3.045615
{ "github_metadata": { "branch": "main", "commit_count": 217, "repo_created_at": "2021-12-05T05:02: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": "28399a4845...
79030d7d-d982-46d7-950e-c5834ded5643
jp9573/LeetCode-Solutions
cpp/887. Super Egg Drop.cpp
class Solution { public: int dp[101][10001]; int solve(int e, int f) { if (f == 0 || f == 1 || e == 1) return f; if (dp[e][f] != -1) return dp[e][f]; int ans = INT_MAX, temp, l = 1, h = f; while (l <= h) { int mid = (l + h) / 2; int left = solve(e - 1, mid - 1); int right = solve(e, f - mid) ; ...
ALGO
0.999983
4.848002
{ "github_metadata": { "branch": "main", "commit_count": 531, "repo_created_at": "2021-07-15T03:07:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 36, "forks": 124, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd248fd...
6d203e87-dd9f-4478-bec3-8d9b573f73dd
Modnars/Tsinsen
cpp/A1021/main.cpp
// Source : http://www.tsinsen.com/A1021 // Author : Modnar // Date : 2019-01-20 #include <iostream> void swap(int &a, int &b) { int temp = a; a = b; b = temp; } int min(int a, int b) { if (a < b) return a; return b; } void quicksort(int list[], int m, int n) { if (m < n) { ...
ALGO
0.999998
3.672269
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2019-03-11T16:08: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": "695c5b36b...
9d4a19a6-088f-432d-8bfe-7c3046b1b5ad
karygauss03/Leetcode-Solutions
1797-design-authentication-manager/1797-design-authentication-manager.cpp
class AuthenticationManager { private: int timeToLive; unordered_map<string, int> tokenWithExpirationTime; public: AuthenticationManager(int timeToLive) { this->timeToLive = timeToLive; } void generate(string tokenId, int currentTime) { tokenWithExpirationTime[tokenId] = current...
ALGO
0.94834
5.808798
{ "github_metadata": { "branch": "main", "commit_count": 3023, "repo_created_at": "2022-05-07T10:16:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "804726d2...
3db5023d-08f5-4e23-9de9-4da6045d74c1
purnamrita/LC
Cheapest Flights Within K Stops - GFG/cheapest-flights-within-k-stops.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int CheapestFLight(int n, vector<vector<int>>& flights, int src, int dst, int K) { vector<vector<int>> adj[n]; for(int i = 0; i < flights.size(); i++){ int u ...
ALGO
0.999856
5.415044
{ "github_metadata": { "branch": "master", "commit_count": 1002, "repo_created_at": "2023-07-03T03:31:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa46be5...
cf7bf218-4d4c-421a-a203-5ced63a8e570
sonumahajan/All_Program_helper
C++/MexOfSubarrayFinder.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; //#define int long long using vi = vector<int>; #define pb push_back #define all(x) begin(x), end(x) #define rsz resize #define FOR(i,a,b) for(int i=(a); i<=(b); i++) #define trav(a,x) for (auto& a: x) #define MOD 1000000007 #define INF 1e16 void sta...
ALGO
0.999958
4.926424
{ "github_metadata": { "branch": "main", "commit_count": 1698, "repo_created_at": "2021-10-01T14:26:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 64, "forks": 331, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "edba8b...
3103a3d9-9806-4107-bfae-0a0a2abc6ba7
GaussGreen/old-code
arm/dev/ARMGenPricer/GP_Infra/gpinfra/pricingfunctionir.h
/*! * * Copyright (c) CDC IXIS CM July 2003 Paris * * \file pricingfunctionlir.h * * \brief * \author <NAME> * \version 1.0 * \date July 2004 */ #ifndef _INGPINFRA_PRICINGFUNCTIONIR_H #define _INGPINFRA_PRICINGFUNCTIONIR_H #include "gpbase/env.h" #include "typedef.h" CC_BEGIN_NAMESPACE( ARM ) /// macro ...
TOOL
0.955527
4.529838
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-02-17T09:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61a0d9fb4510...
be764f48-e3f7-4947-946f-87e40830c853
razibdeb/Programming
Leetcode/Algorithm/28. Find the Index of the First Occurrence in a String KMP Medium.cpp
/* 28. Find the Index of the First Occurrence in a String Medium Given two strings needle and haystack, return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Input: haystack = "sadbutsad", needle = "sad" Output: 0 Explanation: "sad" occurs at index 0 ...
ALGO
0.999829
5.551943
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-02-01T09:20: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": "d82ccdc103f...
31c53494-e050-4f4b-b067-6dd241985164
takaxyz/atcoder
Typical90/012.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a);i<(b);++i) #define REP(i,n) FOR(i,0,n) #define ALL(a) (a).begin(),(a).end() #define RALL(a) (a).rbegin(),(a).rend() #define PRINT(a) cout << (a) << endl #define pb push_back #define eb emplace_back #define mp make_pair #define ...
ALGO
0.999843
4.355413
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2018-10-28T03:22:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6c08560d8...
ee182b50-c9c4-4746-9021-ad136dfe22e6
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/12/13/18.cpp
#include <algorithm> #include <iostream> #include <iomanip> #include <cstring> #include <cstdlib> #include <cstdio> #include <string> #include <vector> #include <cmath> #include <ctime> using namespace std; int n; char side[51]; double vel[51], pos[51]; double INF = 1e100; double eps = 1e-6; bool linked[51][51]; bool ...
ALGO
0.999555
4.276825
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a639d481...
8110044d-ca58-455f-a0df-9d9d00e66762
Worldswayfarer/RayTracer
closest_intersection.cpp
#include "closest_intersection.h" #include "global_values.h" #include "BVH/BoundingVolumeTree.h" #include <iostream> Intersection* get_closest_intersection(size_t triangles_size, std::vector<triangle3>* triangles, ray& raymond) { Intersection* closest_intersection = nullptr; for (int n = 0; n < triangles_...
ALGO
0.999866
4.545789
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-05-07T16:01:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "344fda3ba13...
c28a336f-8172-4ca5-bd25-274a3d7d4797
NikitaTimoshin/1KursProgramms
2sem/Fion/multigmp/DH.cpp
#include <gmp.h> #include <rdtsc.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> FILE *fp; int main() { gmp_randstate_t state; gmp_randinit_mt(state); gmp_randseed_ui(state, time(0)); mpz_t q, p, g, x, y, X, Y, xx, yy; mpz_inits(q, p, g, x, y, X, Y, xx, yy...
ALGO
0.998701
3.380102
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-03-11T13:03: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": "600f21f959...
b37ddf61-05ac-4404-af31-f5e96137742b
ImperishableMe/codeforces-practice
cf-round-595/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main(){ ios::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while(t--){ int n; cin >> n; vector<int>p(n+1); for(int i = 1 ; i <= n; i++) cin >> p[i] ; vector<int>mark(n+1,0); vec...
ALGO
0.999952
3.594643
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2020-03-16T15:56:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "41bda3745...
6b0af858-9d5f-4ce4-a0a3-46638ac80941
KuangjuX-Archived/SimpleSqlParser
src/dfa.cpp
#include "dfa.hpp" void NFAToDFA::print_vec(std::vector<int> vec) { std::cout << "{"; for(std::vector<int>::const_iterator i = vec.begin(); i != vec.end(); i++) { if(i != vec.end() - 1){ std::cout<< *i <<","; }else { std::cout<< *i; } } std::cout<< "}"; ...
ALGO
0.998177
4.079462
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2022-03-29T12:20:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aac7689168b9...
89697f7c-cb9c-416b-8396-9b85c6fa99f5
5hawon/Competitive_Programming
C_Mr_Perfectly_Fine.cpp
#include <bits/stdc++.h> using namespace std; // defines... #define ll long long #define tata return; #define pb push_back #define mp make_pair #define in insert #define run \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define YES cout << "YES" << endl; #define NO cout << "NO"...
ALGO
0.999751
4.237361
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-05-29T15:00: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": "f300a6307794...
f8ee6c9f-f47a-4550-bb6f-d49bf7929a30
mahadinaeem00/Problem-solve
BEECROWD/another 1047.cpp
#include <iostream> using namespace std; int main() { int start_h, start_m, end_h, end_m; cin >> start_h >> start_m >> end_h >> end_m; int total_minutes = 0; if (end_h > start_h || (end_h == start_h && end_m >= start_m)) { // Same day total_minutes = (end_h - start_h) * 60 + (end_m - ...
ALGO
0.999676
4.726568
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-04-04T16:02: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": "fc6eb9bf459...
b19d6833-499e-4316-b85e-a2afce6dd0b0
Vaibhav14072004/DSA-Problems
2891-maximum-beauty-of-an-array-after-applying-operation/maximum-beauty-of-an-array-after-applying-operation.cpp
// To become {x, y} overlapping // x+k >= y-k ->>>> (y <= x + 2*k) // Approach 3 -> Sorting + BinarySearch // TC= O(N log N) class Solution { public: int binarySearch(int y,vector<int> &nums) { int start= 0; int end= nums.size()-1; int idx; while(start <= end) {...
ALGO
0.999862
6.041977
{ "github_metadata": { "branch": "main", "commit_count": 1590, "repo_created_at": "2023-08-17T14:37:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b23892aa3...
18ff08a2-cbdc-43b4-8a0b-ed47a825a1ad
qRe0/algorithms_and_data_structures_bsu
Dynamic Programming/0_6_palindrome/main.cpp
#include <iostream> #include <vector> #include <fstream> using namespace std; int main() { ifstream input("input.txt"); ofstream output("output.txt"); string s; input >> s; int n = s.length(); vector<vector<int>> dp(n, vector<int>(n, 0)); for (int i = 0; i < n; i++) { dp[i][i] =...
ALGO
0.999999
5.52338
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2024-01-08T16:07: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": "e3d08bec7...
be0ef947-6856-4cfc-91ab-ff789da42710
MrM21632/WinUtils
sort.cpp
/* * sort.cpp: Sorting Utility. Given a list of numbers (via a file), sort them in * ascending order with a considerably fast sorting algorithm. For purposes of * speed, we will be using Quicksort. * * Version: 1.0.0 * License: MIT License (see LICENSE.txt for more details) * Author: <NAME> (MrM2163...
ALGO
0.999658
6.179683
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2017-11-12T18:11: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": "314b90a2d...
26b9ca9b-9314-4595-9e5b-8045093399ee
Valiev2002/LR5-2
main.cpp
#include <iostream> #include <algorithm> #include <iterator> #include "QueueList.h" int main() { QueueList lab; std::cout << "Push back:" << " "; lab.push_back(2); std::cout << lab << std::endl; lab.push_back(3); std::cout << lab << std::endl; lab.push_back(4); std::cout << lab << ...
TOOL
0.933494
4.127981
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-08-21T19:43:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f3f5f085877b...
b9a99ea3-f581-47d9-88cc-105195ded9b6
Aravind-Suresh/OIC
C++ code/oic0.cpp
#include<opencv2/opencv.hpp> #include<iostream> #include<string.h> #include<stdlib.h> using namespace cv; using namespace std; void CannyThreshold(Mat src_gray, Mat& edge_gray, int lowThreshold, int highThreshold, int kernel_size) { //blur( src_gray, edge_gray, Size(3,3) ); GaussianBlur( src_gray, edge_gray, Size(5...
TOOL
0.945981
4.254651
{ "github_metadata": { "branch": "master", "commit_count": 129, "repo_created_at": "2015-05-31T18:53: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": "a66f100f...
fa6a7e37-b223-4c2a-bea1-b7bce883eb39
Pkataki/Problem_Solving
uva/12532.cpp
#include<bits/stdc++.h> using namespace std; struct no { int pos,zero,neg; no(){} no(int pos, int zero, int neg) : pos(pos) , zero(zero), neg(neg) {} }; no tree[400005]; int v[100000]; no combine(no a, no b) { no aux; aux.pos = a.pos + b.pos; aux.neg = a.neg + b.neg; aux.zero = a.zero + b.zero; return aux; } vo...
ALGO
0.999927
4.096077
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2017-11-27T18:35: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": "b0f46af5ca...
5c90c31b-dd29-4f4e-ae8c-d3f8db062ebd
wushiye/DataStructure
DataStructure/BinaryHeap/BinaryHeap1/BinaryHeap/main.cpp
// // main.cpp // BinaryHeap // // Created by admin on 2021/12/11. // #include "BinTHeap.hpp" #include <iostream> void generate_heap() { BinTHeap<int> *heap = new BinTHeap<int>(); // (cnt, false) std::cout << "is empty = " << (heap->isEmpty() ? "YES" : "NO") << "\n"; heap->push(5); ...
ALGO
0.992809
4.00166
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-12-23T23:50: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": "da92e8b76211...
db5fa27d-9829-4960-a007-53735abcfc68
kaantemel/Word-Graph
main.cpp
// // main.cpp // wordgraph // // Created by <NAME> on 12/25/21. // #include <iostream> #include <unordered_map> #include <fstream> #include <iomanip> #include <vector> #include <stack> using namespace std; struct myStruct{ string word; // Stores the actual word bool known; // Tracks whether the word ha...
ALGO
0.999732
5.116808
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-07-02T00:12: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": "6c85679c91ca...
e7871cf0-136e-49b8-9641-3993838db784
pengsun/AOSOLogitBoost
src/AOSOLogitBoost.cpp
#include "AOSOLogitBoost.hpp" using namespace std; using namespace cv; #define DBG #ifdef DBG #include <fstream> std::ofstream ofs("output.txt"); #endif // Implementation of AOSOSplitgain AOSOSplitgain::AOSOSplitgain() { reset(); } void AOSOSplitgain::reset() { var_idx_ = -1; threshold_ = FLT_MAX; subset_.r...
ALGO
0.999583
5.096678
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2013-07-09T05:53:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9f8addf48...
43a4e34b-f78b-4ad4-9625-3b51af77c009
CTPdeBelenMarioQuezada/IntelNow2023
Documents/IntelNow2023/src/Pruebaconjeturadebil2.cpp
#include <iostream> #include <cmath> using namespace std; bool esPrimo(int numero); int main() { int a, b; do { cout << "Introduzca el valor de a y b: "; cin >> a >> b; } while (a >= b); if (a % 2 != 0) a++; for (int i = a; i <= b; i += 3) { for (int n1 = ...
ALGO
0.99956
3.905392
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2023-07-29T15:45: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": "40f8d21d7e7...
b212f995-cfcf-40bc-9482-2d869b08d4f2
antoshkaplus/CompetitiveProgramming
SPOJ/bsheep.cpp
#include <iostream> #include <string> #include <cmath> #include <cstdio> #include <set> #include <limits> #include <vector> #include <queue> #include <map> #include <algorithm> using namespace std; typedef int Int; typedef int Index; struct Point { Point() {} Point(Int x, Int y) : x(x), y(y) {} void ...
ALGO
0.999993
4.397129
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2014-09-30T13:15: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": "409ab4cbd...
89456e96-78fc-428e-a62d-cda3681d2aa8
tomm26177/OOP-in-C-
zadanie_2_i_4/Haslo.cpp
#include <iostream> #include <string> class Haslo { public: string Haslo; public: string getHaslo() { return Haslo; } void setHaslo(String s) { Haslo = s; } int jestSamogloska(int i) { char c = Haslo[i]; if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'y' || c == 'A' || c...
TOOL
0.940029
3.265646
{ "github_metadata": { "branch": "main", "commit_count": 69, "repo_created_at": "2023-03-23T07:48: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": "445b7ca052b...
c0e515e9-f12b-4153-9c4f-a35c31a7cd97
vgitton/fast-inflation
src/inf/events/event_tree.h
#pragma once #include "../../util/debug.h" #include "../../util/file_stream.h" #include "../../util/loggable.h" #include "event.h" #include <memory> namespace inf { /*! \ingroup eventstorage * \brief Storing a set of inf::Event as a tree * \details The idea is that we take a set of inf::Event of fixed length. * W...
ALGO
0.976517
7.115953
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-12-18T17:17:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec30a260f351...
4e85e158-c4bf-4af3-98fa-2789ee454ba8
Dev-Fault/Binary
binary.cpp
#include "binary.h" #include <iostream> const std::map<unsigned int, std::string> intToHexMap { {0, "0"}, {1, "1"}, {2, "2"}, {3, "3"}, {4, "4"}, {5, "5"}, {6, "6"}, {7, "7"}, {8, "8"}, {9, "9"}, {10, "A"}, {11, "B"}, {12, "C"}, {13, "D"}, {14, "E"}, {15, "F"} }; const std::map<char, std::string> hexT...
ALGO
0.995559
4.647175
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-10-23T16:27: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": "3c66ad969481...
96a485d4-81f3-40c3-8365-ea1c5e8cb9cd
andongjoo/algorithm
letter.cpp
/* 세로 R칸, 가로 C칸으로 나누어진 표 모양의 판이 있다. 판의 각각의 모든 칸에는 대문자 알파벳이 하나씩 적혀 있다. 좌측 상단 칸 (1행 1열) 에는 말이 놓여 있다. 말은 인접한 네 칸(상하좌우) 중의 한 칸으로 이동할 수 있다. 이때 매순간 여태 지나온 칸에 적힌 알파벳과 다른 알파벳 칸으로만 이동할 수 있다. 즉, 같은 알파벳이 적힌 칸을 두 번 지날 수 없다. 말이 가능한 많은 칸을 지나도록 할 때, 몇 칸을 이동할 수 있는지 구하는 프로그램을 작성하시오. 말이 지나는 칸은 초기에 말이 위치했던 칸도 포함된다. 입력 첫째 줄에 R과 C가 빈...
ALGO
0.999859
3.601536
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2019-03-20T09:54: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": "5bf85c7d...
4b9f13cf-5d07-4c80-b66c-a61354a6251d
ishandutta2007/codeforces-a
andreasyan/normal/1593/G.cpp
#include <bits/stdc++.h> using namespace std; #define m_p make_pair #define all(x) (x).begin(),(x).end() #define sz(x) ((int)(x).size()) #define fi first #define se second typedef long long ll; mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count()); mt19937 rnf(2106); const int N = 1000006; int n; char a[...
ALGO
0.999558
4.152373
{ "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": "4e8014855ba3...
7bdfa82e-26fd-4aa3-af31-39fdc1b5a429
KudryX2/UGR_EstructurasDeDatos_ED
Practica1/EntregaPractica1/Ejercicio1/ordenacion.cpp
#include <iostream> #include <ctime> #include <cstdlib> using namespace std; void ordenar(int *v, int n) { for (int i=0; i<n-1; i++) // O(n) for (int j=0; j<n-i-1; j++) // O(n) if (v[j]>v[j+1]) { // O(1) int aux = v[j]; // O(1) v[j] = v[j+1]; // O(1) v[j+1] = aux; // O(1) } ...
ALGO
0.990891
4.572269
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-11-28T14:05: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": "abe4f52812...
dc6fb197-ef3b-40a7-b896-36dec4254c67
Kumarevich/Skillbox-Homework14-6
main.cpp
#include <iostream> #include <vector> float multiplicate(float vec, float matrix[4][4], int column) { float sum = 0.0f; for (int i = 0; i < 4; ++i) { sum += vec * matrix[i][column]; } return sum; } int main() { std::vector<float> vec; float matrix[4][4]; float temp; std::cout ...
ALGO
0.99994
4.637369
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-08-03T11:40: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": "a0fe260f3d...
f20c99ef-501e-418d-91d7-5e981fbeb614
dngur6344/baekjoon-online-judge
14502.cpp
#include<iostream> #include<deque> using namespace std; class two{ private: public : int row; int col; }; int arr[8][8]; int tmp[8][8]; int max_val=0; int cnt=0; deque<two> dq; deque<two> virus; void init(int a,int b){ for(int i=0;i<a;i++){ for(int j=0;j<b;j++){ tmp[i][j]=arr[i][j]; } } } void ...
ALGO
0.999931
3.092538
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2019-02-20T15:52: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": "f7b2b20a8...
c99f5bae-6bc2-4470-918d-d4c43300acc3
gutty333/Practice-2
Week 7 Program 18.cpp
/********************************************************************* Tic-Tac-Toe Game Write a modular program that allows two players to play a game of tic-tac-toe. Use a two- dimensional char array with 3 rows and 3 columns as the game board. Each element of the array should be initialized with an a...
ALGO
0.975956
5.169197
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2015-11-27T21:25:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bfe8dd8f2...
df2b8b43-4e48-4a00-88aa-46e9e74d27c6
vishnuvardhanreddychallapalli/Parallel-Computing
assign5_merge_serial/bubblesort/bubblesort.cpp
#include <stdio.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <iostream> #include <unistd.h> #include <omp.h> #include <cmath> using namespace std; #ifdef __cplusplus extern "C" { #endif void generateMergeSortData (int* arr, size_t n); void checkMergeSortResult (const int* arr, size...
ALGO
0.995269
4.057632
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-05-03T19:36: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": "a20e1e39cc...
b8f59868-8b45-4668-8bb8-e418403329d4
sidharth-085/Striver-SDE-Sheet
Tries/DistinctSubstringCount.cpp
#include <iostream> #include <unordered_set> using namespace std; // We have to return the count of distinct substrings of the given string word // Approach 1: Using Brute Force (by generating all substrings and add in set) // Time Complexity: O(N^3) // There will be total O(N^2) time to generate all substrings & pu...
ALGO
0.999981
6.329144
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-08-30T21:55:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "357cab9609...
4efbca2f-c3a4-44d4-943e-87e120e67fa6
Isur/Studia
Semestr II/Programowanie/Zadanie09/main.cpp
/* Zadanie: Napisz program wykorzystujący mechanizm "try throw catch". Program powinien: 1) zawierać funkcję dzielenia z obsługą wyjątku dzielenia przez zero. 2) zawierać funkcję modulo z obsługą wyjątku gdzie wprowadzone dwie zmienne są równe bądz są swoimi wielokrotnościami. W sytuacji kiedy wprowadzane dane są praw...
ALGO
0.966707
4.730526
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2016-10-28T16:32:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d7fdebfa...
7915511f-9b81-4430-b9c2-3dcc2da2940b
Prashant8722/leetcode
Rotate by 90 degree - GFG/rotate-by-90-degree.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: //Function to rotate matrix anticlockwise by 90 degrees. void rotateby90(vector<vector<int> >& matrix, int n) { vector<vector<int>> mat(n, vector<int>(n)); for(int...
ALGO
0.999882
6.293396
{ "github_metadata": { "branch": "main", "commit_count": 407, "repo_created_at": "2023-01-25T05:55: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": "7e89d21e56...
01988f52-1ea5-406a-b523-0ff080012988
dygks232/SWExpertAcademy_problem
MinimumSpanningTree/Kruskal/1251_Hanaro_Kruskal.cpp
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<cstdio> #include<cstdlib> #include<vector> #include<stack> #include<queue> #include<deque> #include<algorithm> #include<cmath> #include<climits> #include<set> #include<map> #include<string> #include<cstring> #include<functional> using namespace std; #define M...
ALGO
0.999729
3.776067
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2020-03-07T11:13: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": "9b7cda12b...
28e4d3f5-4fa5-4218-8187-7789fe5e6aa8
Asuka54089/KESMP
src/topk.cpp
#include "../include/topk.h" using namespace std; TopK_StableMarriages::TopK_StableMarriages(){} bool TopK_StableMarriages::update(ClosedSubset S, int k) { // if the number of candidate best results is smaller than k if (topk_heap.size() < k) { topk_heap.push(S); return true; } ...
ALGO
0.999471
4.574474
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2022-02-01T11:02:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "897ff8128c...
3adf9c66-4a05-4804-ba0a-bfcdf418c78e
xunilrj/sandbox
sources/hackerrank/fraudulent-activity-notifications/main.cpp
#include <bits/stdc++.h> #include <algorithm> using namespace std; #include <set> #include <functional> #include <algorithm> #include <queue> template <typename T> struct reversion_wrapper { T& iterable; }; template <typename T> auto begin (reversion_wrapper<T> w) { return std::rbegin(w.iterable); } template <type...
ALGO
0.999827
4.571386
{ "github_metadata": { "branch": "master", "commit_count": 878, "repo_created_at": "2016-07-31T20:12:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 9, "issues": 0, "pull_requests": 117 }, "file_meta": { "content_id": "2bc61...
b57b3fe4-85ae-427a-9b64-7a4ca6a74a2d
2hanhan/algorithm
算法学习/6.DoublePointer/reverse-linked-list.cpp
/** * @file reverse-linked-list.cpp * @author your name (<EMAIL>) * @brief * @version 0.1 * @date 2022-12-07 * 翻转链表 * - 方法1:双指针法 * - 思路依次调转cur->next指向前一个节点pre * - 注意需要首先保存cur->next的指针然后调转 * @copyright Copyright (c) 2022 * */ #include <stdlib.h> #include <iostream> using namespace std; struct ListNode { ...
ALGO
0.999968
5.492452
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2022-12-05T00:58:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b6edcfd...
567eacfd-da6d-42b5-a551-05ca33c1d374
ShahjalalShohag/ProblemSolving
codeforces/52/C.cpp
#pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; us...
ALGO
0.999984
5.05207
{ "github_metadata": { "branch": "master", "commit_count": 2261, "repo_created_at": "2020-12-20T21:28:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 37, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fcc90...
8d47559a-0fd2-46d6-92a1-a33bb0412157
Vladimir-Mendoza/LABORATORIO-PROGRAMACION-5
LISTAS.cpp
/*Crear una lista que almacene "n" numeros enteros y mostrarlos*/ #include<iostream> #include<conio.h> using namespace std; struct Elemento { int numero; struct Elemento *siguiente; }; struct Elemento *pi, *pa, *pf; void insertar_lista(int valor) { if (pi == NULL) { pi = new (Elemento); pi->numero = valor; ...
ALGO
0.995522
3.832247
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-04-09T22:48:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33c00d40a63d...
0c8cb69a-1ab9-401e-a1c8-ca7f66983d3e
lseman/baldes
include/miphandler/MIPHandler.h
/* * @file MIPHandler.h * @brief MIP Problem class implementation * * This file contains the implementation of the MIPProblem class. * The MIPProblem class represents a Mixed-Integer Programming (MIP) problem * and provides methods to add variables, constraints, and objective functions. * */ #pragma once #incl...
ALGO
0.979455
3.521301
{ "github_metadata": { "branch": "main", "commit_count": 275, "repo_created_at": "2024-06-14T11:01:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 19, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "1d72aa78c...
b553a6f5-d089-4ca8-b096-9d87a63f927b
Pisces311/vscode_workspace
ACM/Online Judges/Codeforces/Educational Codeforces Round 83 (Rated for Div. 2)/C.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; constexpr int maxn = 35; int T, n; ll k; ll a[maxn]; int num[100], tmp[100]; void transfer(ll x) { memset(tmp, 0, sizeof(tmp)); int top = 0; while (x) { tmp[++top] = x % k; x /= k; } for (int i = 1; i <= top; ++i)...
ALGO
0.999919
4.430857
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2020-03-21T02:52:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a17f8ff...
32e22a0c-cfe4-41e2-a00c-3db5f4dc8eaf
phaistos-networks/TANK
Switch/ext/FastPFor/src/entropy.cpp
/** * This code is released under the * Apache License Version 2.0 http://www.apache.org/licenses/. * * (c) <NAME>, http://lemire.me/en/ */ #include "common.h" #include "maropuparser.h" #include "util.h" #include "entropy.h" #include "deltautil.h" using namespace std; using namespace FastPForLib; void message(c...
TOOL
0.902254
5.324654
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2016-06-29T14:35:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 937, "forks": 70, "issues": 31, "pull_requests": 2 }, "file_meta": { "content_id": "a2e421...
b943b5cc-07e4-45d4-b8a4-8fd932e3a7c1
14bscsmzafar/AP-LAB-10
main.cpp
#include <iostream> #include <string> #include <cstdlib> #include <cctype> #include <cmath> using namespace std; class stack { public: stack(int); ~stack(); void push(char); char pop(); bool isfull(); bool isEmpty(); void clear(); char peek(); private: char* arr; int count; int size; }; stack::stack(int I...
ALGO
0.999591
3.621504
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-12-05T15:08: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": "aedccc38ee...
b004ed99-05f2-45ef-bfee-210c40fb9288
Kiritow/OJ-Problems-Source
HDOJ/2282_autoAC.cpp
#include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> using namespace std; const int maxn = 505; const int INF = (1<<30)-1; int g[maxn][maxn]; int lx[maxn],ly[maxn]; int match[maxn]; bool visx[maxn],visy[maxn]; int slack[maxn]; int a[maxn]; int n,m,rn; bool dfs(int cur){ visx[cur] = true; f...
ALGO
0.999933
3.376529
{ "github_metadata": { "branch": "master", "commit_count": 939, "repo_created_at": "2016-04-10T01:06:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5a26e2...
c879f081-1187-4ae2-9c51-949124fe857a
hxuanyu/LeetCode-solutions
leetcode-algorithms/653. Two Sum IV - Input is a BS/Solution.cpp
// Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target. // // Example 1: // Input: // 5 // / \ // 3 6 // / \ \ // 2 4 7 // // Target = 9 // // Output: True // Example 2: // Input: // 5 // / \ // 3 ...
ALGO
0.999988
6.504299
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2018-06-26T23:39: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": "76213960...
b34a5bd4-5137-4137-9fa8-d78902aedf90
raidenblackout/Competitive-Programming
M_-_Critical_Links.cpp
#include <bits/stdc++.h> #if 0 #define HOME #endif #ifndef ONLINE_JUDGE #define dbgA2(A, n, m) \ { \ cout << "-->" << #A << "=\n"; \ for (int i = 0; i < n; i++) \ { \ for (int j = 0; j < m; j++...
ALGO
0.999752
3.7337
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-04-30T17:42: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": "39270f2165...
a5682ef9-d18a-4580-9d35-6497efcb9f69
datduc165/Algorithms-agents-and-ai-CITS3001
labs/lab1_string_algorithms/PatternMatchAlgorithms.cpp
#include <iostream> #include <vector> #include <string> // The number of char in input alphabet. #define ASCII_CHARS 256; using namespace std; /** * Print out the array, and then free its memory. */ void printArr(vector<int> a) { cout << "[ "; for(unsigned i = 0; i < a.size(); i++) { cout<<a[i]<<" "; } cout ...
ALGO
0.999609
5.443841
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2019-08-22T14:55: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": "cf508dc5c...
b709f795-7094-4bcd-8e26-c729e298f976
G-L-X-B/ads
lab3-2022/src/measure.cpp
#include <algorithm> #include <chrono> #include <fstream> #include <iostream> #include <sstream> #include <vector> #include "sorts.hh" using namespace std; vector<int> readData() { ifstream in("data.txt"); size_t n; in >> n; vector<int> data(n); for (size_t i = 0; i < n; ++i) in >> data[i...
ALGO
0.998048
5.405111
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2021-11-17T12:38: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": "d70138321...
b7a56f25-a2e9-49ca-a8ec-421201fe80f0
MIKBRUNO/binary-search-tree
Iterators.cpp
#include "BSTree.h" namespace BinSearchTree { BSTree::iterator::iterator(BSTree& tree) { current = tree.root; isAfterEnd = (nullptr == current); } BSTree::iterator& BSTree::iterator::operator++() { if (isAfterEnd) return *this; if (nullptr != current->link[1]) current = deepLeft(current->link[1]); ...
ALGO
0.954371
3.846237
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2022-10-13T14:34:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d7d9956b...
3a4707eb-2cd7-4884-95f6-313fc501c034
morphes1995/dsac-
linked_list/merge_sorted_list.cpp
#include "list_node.h" #include <vector> #include <queue> class Solution { public: class NodeItem { public:NodeItem(ListNode *node):node(node){} ListNode *node; // 注意参数为常引用,返回值也为const bool operator < (const NodeItem &another) const{ if (node->val < another.node->val){ ...
ALGO
0.999857
5.666603
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-01-06T13:49: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": "c195493cc57...
050490c6-2eae-43d9-b935-85eb0dbf341b
peymaann/TMM-Optic-Simulation-cpp
src/matrix2by2.cpp
#include "matrix2by2.h" #include<iostream> #include <complex> using namespace std; matrix2by2::matrix2by2() :_m00(0.0),_m01(0.0) ,_m10(0.0) ,_m11(0.0) { } matrix2by2::~matrix2by2() { } matrix2by2::matrix2by2(double a00, double a01, double a10, double a11) :_m00(a00),_m01(a01) ,_m10(a10) ,_m11(a11) { } void matrix2...
ALGO
0.960169
4.546374
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2024-10-25T11:31: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": "49eb56153...
b05acf81-fe0c-43f6-a26d-af2fd6e078b4
geme9876/PracticeC14
Project1/사천성.cpp
//#include <string> //#include <vector> //#include <algorithm> //#include <map> //#include <set> //using namespace std; // //// 전역 변수를 정의할 경우 함수 내에 초기화 코드를 꼭 작성해주세요. // // // //bool IsInBoard(int x, int y, int BoardSize) //{ // if (x < 0 || x >= BoardSize || y < 0 || y >= BoardSize) return false; // return true; //} //...
ALGO
0.999978
4.238683
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-04-09T07:52: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": "312f35bb8...
b7e0bb9e-6700-4350-9744-af6411a9fff1
SKundu312/Crack-Your-Internship
Searching and Sorting/Hard/Median2SortedArrays.cpp
//O((m+n)log(m+n)) double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { int i=0,j=0,k=0; vector<int>a; while(i<nums1.size()&&j<nums2.size()){ if(nums1[i]<=nums2[j]) a.push_back(nums1[i++]); else a.push_back(nums2[j++]); ...
ALGO
0.999999
5.962237
{ "github_metadata": { "branch": "main", "commit_count": 163, "repo_created_at": "2022-05-02T18:00:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3fd14d7cb...
fdb40471-160e-4c27-9e7f-7345f209f460
rimjhimittal/coe
Operating_Systems/CPU_Scheduling/fcfs.cpp
// FCFS CPU SCHEDULING ALGORITHM For FCFS scheduling algorithm, read the number of processes/jobs in the system, their CPU burst times. The scheduling is performed on the basis of arrival time of the processes irrespective of their other parameters. Each process will be executed according to its arrival time. Calculate...
ALGO
0.999925
4.18209
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2023-08-11T03:52:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38b6e802245...
90337cb4-535e-412f-96cc-52cca167cd85
raihanuldev/Problem-Solving
codeChef/START190D/Parry_It_Easy.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int T; cin >> T; while (T--) { int N, X; cin >> N >> X; vector<int> A(N), B(N); for (int i = 0; i < N; ++i) cin >> A[i]; for (int i = 0; i < N; ++...
ALGO
0.999834
4.52359
{ "github_metadata": { "branch": "main", "commit_count": 373, "repo_created_at": "2024-12-21T15:38: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": "dea94f7486...
e9983187-a081-48ba-aa44-08354532e7f9
Konstantin343/Algorithms-ITMO
Dynamic programming/Наибольшая возрастающая подпоследовательность.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[2001], b[2001], d[2001]; for (int i = 0; i < n; i++) { cin >> a[i]; d[i] = 1; } for (int i = 0; i < n; i++) { for (int j = 0; j < i; j++) if (a[j] < a[i]) { if ...
ALGO
0.999998
3.96971
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-04-28T18:37:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "158ca1305...
bec4829a-aa86-4681-af99-395a34a853db
Ujjwal2327/Love-Babbar-Yt-Playlist-Practice
cpp23.cpp
#include<bits/stdc++.h> using namespace std; void findkey(int a[][4], int key, int m, int n){ //we need to specify number of columns, when passing a 2d array as a parameter int flag=0; for(int i=0; i<m; i++){ for(int j=0; j<n; j++){ if(key==a[i][j]){ cout<<"key is foun...
ALGO
0.999694
3.001611
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-02-23T09:42:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2c53aa668...
b5cb811d-1973-4310-9a04-1692caeb313b
j-moralejo-pinas/LeetCode
Medium/889. Construct Binary Tree from Preorder and Postorder Traversal/constructFromPrePost.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999964
6.658447
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2025-02-16T21: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": "9b5e5d2a3e1...
c39883f1-093b-4730-9124-61a72f638167
Sagorika28/CB-codes
Stacks+Queues/linked_list.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *next; // construtor Node(int val) { this->data = val; this->next = NULL; } }; //// void insertAtHead(Node *&head, int data) { Node* new_node = new Node(data); new_node->next = head; head = new_node; } void insertAtTail(Node *&he...
ALGO
0.999502
4.195327
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-05-08T10:21: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": "2a899ead38...
07cc4275-cad5-413f-99ea-8b15ccd44d50
sachuverma/DataStructures-Algorithms
DSA Crack Sheet/solutions/Check If Circular Linked List.cpp
/* Check If Circular Linked List ============================= Given a singly linked list, find if the linked list is circular or not. A linked list is called circular if it not NULL terminated and all nodes are connected in the form of a cycle. An empty linked list is considered as circular. Example 1: Input: Linked...
ALGO
0.999401
5.417049
{ "github_metadata": { "branch": "master", "commit_count": 1430, "repo_created_at": "2020-10-07T10:08:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2049, "forks": 541, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3a...
174c3c32-0ba6-4cb1-bc82-fbaf9f3a5dd0
omidm/nimbus
applications/physbam/physbam-lib/Public_Library/PhysBAM_Rendering/PhysBAM_Ray_Tracing/Rendering_Objects/RENDERING_CHIMERA_VOXELS.h
//##################################################################### // Copyright 2011- // This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt. //##################################################################### // Class RENDERING_CH...
TOOL
0.961865
5.528576
{ "github_metadata": { "branch": "master", "commit_count": 3869, "repo_created_at": "2017-04-27T02:25:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f52a...
e7757582-04aa-4f2c-ae1e-d54d9ae4e880
gmorton2/Ciphers
RailFence.cpp
#include "RailFence.h" #include<iostream> using namespace std; bool RailFence::setKey(const string& key) { for (int i = 0; i < key.length(); i++) { if (!isdigit(key[i])) return false; } int tempkey = stoi(key); cipherKey = tempkey; return true; } string RailFence::encrypt(const string& pla...
ALGO
0.999656
4.279649
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-04-19T21:07: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": "23b49e93b8d8...
12739dd1-6406-4415-a354-66c7f32f5854
ggaaggaabbii/Cpp
infoarena/xcmmdc/main.cpp
#include <fstream> #include <iostream> #define MAXN 1010 #define MAXLG 12 using namespace std; ifstream f("xcmmdc.in"); ofstream g("xcmmdc.out"); int rmq[MAXLG][MAXN][MAXN], a[MAXN][MAXN], n, m, k, q, lg[MAXN], poz1, poz2, mij, val, ad1, ad2, rez[MAXN], x, pow, lim, l, nexti, nextj, c; int cmmdc(int a, int b) { i...
ALGO
0.999936
3.259194
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2017-11-01T10:38: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": "85f43e2c3...
62a2329c-c24c-4e21-b1cf-709c6afc18ee
wlxklyh/RookieRenderer
Proj/src/RMath/Perlin.cpp
// // Created by linyanhou on 2021/11/11. // #include "Perlin.h" namespace RMath { FVec3 *Perlin::ranvec = perlin_generate(); int *Perlin::perm_x = perlin_generate_perm(); int *Perlin::perm_y = perlin_generate_perm(); int *Perlin::perm_z = perlin_generate_perm(); float perlin_interp(FVec3 c[2][2...
ALGO
0.992294
4.90158
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2021-10-12T15:30:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dc84290e714...
e7cf2f95-af9e-4181-ab32-ed30b3439698
theopolisarmstrong/Armstrong-Theopolis_CIS-17A-44082
Proj/Project_2/Battleship4_V3/Computer.cpp
/* * File: Computer.cpp * Author: <NAME> * Created on May 29, 2019 4:39 AM * Purpose: Human Player class definition */ #include <iostream> #include <vector> using namespace std; #include "Computer.h" void Computer::placeAll(){ place(PATROL); place(DESTROY); place(CARRIER); } void Computer::place(M...
ALGO
0.983103
3.359025
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2019-02-12T22:03: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": "6b0d4d188...
77a55c75-63ce-4fb8-b4fc-b633012ccb77
mongodb/mongo
src/mongo/db/exec/document_value/value_comparator.h
/** * Copyright (C) 2018-present MongoDB, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the Server Side Public License, version 1, * as published by MongoDB, Inc. * * This program is distributed in the hope that it will be useful, * but W...
TOOL
0.906933
7.681637
{ "github_metadata": { "branch": "master", "commit_count": 90314, "repo_created_at": "2009-01-15T16:15:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 27329, "forks": 5655, "issues": 0, "pull_requests": 82 }, "file_meta": { "content_id": ...
25f3c9f9-8724-449c-a743-67583b84f7b7
JakubRajcok/AI_chess
king.cpp
#include "king.h" King::King(BoardPosition *pos, ChessBoard *board): ChessPiece(pos,board) { findValidMoves(); if(this->type == 5){//black king this->iconName = "king0.png"; }else{ this->iconName = "king1.png"; } } bool King::checking(){ //It is black king if(this->getType() ==...
ALGO
0.970395
3.829957
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2019-10-08T10:05: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": "ebffe5a74...
307aa580-bcb4-41f4-ad4f-1c9b238daf93
himalayaashish/CPP_REV
Lab-7/Prg-13.cpp
// 13. C++ Program to Delete All Duplicate Elements from an Array: #include <iostream> #include <unordered_set> using namespace std; void deleteDuplicates(int arr[], int& size) { unordered_set<int> uniqueElements; int newSize = 0; for (int i = 0; i < size; i++) { if (uniqueElements.find(arr[i]...
ALGO
0.995501
5.668239
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-12-15T10:54: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": "8b59b5921d2...
9b66bd99-6547-44ed-82a3-5909286233c5
Anand749/DSA
410-split-array-largest-sum/split-array-largest-sum.cpp
class Solution { int countPartitions(vector<int>& a, int maxSum) { int n = a.size(); int partitions = 1; long long subarraySum = 0; for (int i = 0; i < n; i++) { if (subarraySum + a[i] <= maxSum) { subarraySum += a[i]; } else { ...
ALGO
0.999918
5.807249
{ "github_metadata": { "branch": "main", "commit_count": 110, "repo_created_at": "2025-05-12T03:22: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": "fa4750cc71...
9157fadb-773b-4c5c-8b09-e97ab6e5877e
TopherNie/toy-project
CFR/zhajinhua/include/tree.hpp
// // Created by Administrator on 2019/12/30 0030. // #ifndef TOY_PROJECT_TREE_HPP #define TOY_PROJECT_TREE_HPP #include <vector> #include <string> #include <array> #include <iostream> #include <constants.h> #include <tools.h> using namespace std; template <typename T> struct Node { T _val; vector<Node<T>*>...
ALGO
0.984714
4.522268
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2019-12-28T04:48: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": "f59912639...
ae7fd7d6-b5ea-4531-9b48-9fe748562c4d
StefanVNikolov/OhloneCS102
Class_08/Homework/StefanNikolov_HwrkV-A.cpp
// <NAME> // This program considering the effect of changing the // basic Reproductive number, R0 // on the strength of the epidemic #include <iostream> #include <string.h> #include <fstream> using namespace std; bool checkR0_rate(double R0, double suscepriable, double infected, int days, double alpha, int closingInfec...
ALGO
0.999379
4.045068
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-02-16T06:52: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": "359bff6e6bf0...
d059bcde-735a-4dad-91f9-ce99a83ce42b
AbhishekChahar/4_BackTracking
2_Permutations(LexicographicOrder).cpp
// //Permutations In lexicographic order // //step1-> Take an input array for Permutations // //step-2-> call Permute Function // //Step 3-> Use backtracking swap(using right Rotation) call unswap(Using left rotation) // #include<bits/stdc++.h> // using namespace std; // void rightRotation(vector<int>&nums, int f ,...
ALGO
0.999832
6.039815
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-04-02T13:54: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": "ec1f692b13...
48ddc572-b63e-466e-98b0-d59c0eeee6a7
LetaoC/HPC23
hw3/gs2D-omp.cpp
#if defined(_OPENMP) #include <omp.h> #else typedef int omp_int_t; inline omp_int_t omp_get_thread_num() { return 0;} inline omp_int_t omp_get_num_threads() { return 1;} #endif #include <stdio.h> #include <math.h> #include "utils.h" using namespace std; double cal_norm(double* u, double* f, long N){ double* tmp...
ALGO
0.999991
4.169466
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2023-03-04T23:52: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": "ca2ba00dc...
5aae75ca-2f36-4ff2-802a-36fc295dee9f
jer22/OI
USACO/6.2/rect1/rect1.cpp
/* ID:shijiey1 LANG:C++ PROG:rect1 */ #include <cstdio> #include <cstring> #include <algorithm> #include <iostream> using namespace std; struct Rect{ int x1, y1, x2, y2; int color; void init(int a, int b, int c, int d, int col) { x1 = a, y1 = b, x2 = c, y2 = d, color = col; } }; int n; Rect rect[1005]; int ans...
ALGO
0.9997
3.720269
{ "github_metadata": { "branch": "master", "commit_count": 357, "repo_created_at": "2014-12-02T12:22: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": "5cadb5c6...
9e5d6e17-748b-4c59-bca9-5c871eaa4e20
majdi-m01/FullyHomomorphicEncryptionWithThreeLibraries
BGV_HElib_TotalCovidDeaths.cpp
/**********************************************/ /* HElib BGV Total Covid-19 Deaths calculator */ /* Author: <NAME> */ /* Parts of code learned from: */ /* BGV_general_example.cpp */ /* Total Deaths = sumOf(DeathsInState_i) */ /*******************************...
ALGO
0.997815
4.148638
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-09-19T21:54:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5db5a0d13cd7...
be890caa-dd56-40c9-ab76-d01a923ffd67
Vaa3D/vaa3d_tools
released_plugins/v3d_plugins/Janelia_ssd_registration/main_affine_registration.cpp
//main_affine_registration.cpp // by <NAME> //2010-03-29 #ifndef DISABLE_V3D_MSG #define DISABLE_V3D_MSG #endif #ifndef SHOWTIME #define SHOWTIME 0 #endif #include <QtGui> #include <stdio.h> #include <time.h> #include <unistd.h> extern char *optarg; extern int optind, opterr; #include "../../basic_c_fun/stackutil.h...
TOOL
0.925983
3.195024
{ "github_metadata": { "branch": "master", "commit_count": 7983, "repo_created_at": "2016-01-27T18:19:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 110, "forks": 70, "issues": 11, "pull_requests": 12 }, "file_meta": { "content_id": "a84...
4b685ace-8171-4fb8-a3e4-ec057dd337b5
haozha111/crack_ctci
ch04/4.1.cpp
#include "../header/BinaryTree.hpp" #include "../ctci.h" using namespace std; //not a good solution, runs in O(n^2) time template<class T> bool isBalance1(Tnode<T>* root, BinaryTree<T>& bt){ if (root == nullptr){ return true; } bool lbalance = isBalance(root->lchild, bt); bool rbalance = isBalance(root->r...
ALGO
0.999569
4.919994
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2014-12-10T00:39: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": "7321fef7c...
f6177ef3-49e8-43c0-b206-1a53496ec972
Ambrou/adventcode2022
Day02/Day02.cpp
// Day02.cpp : Ce fichier contient la fonction 'main'. L'exécution du programme commence et se termine à cet endroit. // #include <iostream> #include <fstream> #include <string> #include <map> #include <cstdint> using namespace std::literals; int main() { std::ifstream input { "Input.txt"s }; constexpr std::...
ALGO
0.999083
5.201944
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-12-01T20: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": "000e9e43d63...
4a3e28d3-05ba-462b-b5b4-fbc18731de82
bhsingleton/Shake
src/Noise.h
#ifndef _Noise #define _Noise // // File: Noise.h // // About: These functions are taken from the 3ds Max SDK inside perlin.cpp! // // Author: <NAME> // #include <stdlib.h> #include <stdio.h> #include <math.h> #define MAX_OCTAVES 50 #define TRUE 1 #define FALSE 0 #define B 0x100 #define BM 0xff #define N ...
ALGO
0.993961
5.901905
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-10-16T19:03: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": "3d1be027bc3...
46ca9ddd-37b3-4abc-9a87-86a17ee7735d
lapl/Maratona
Seletiva/Simulado Pre Classificatorio/C.cpp
//TEMPLATE #include <cstdio> #include <vector> #include <algorithm> #include <cstring> #include <cmath> #define FOR(i,n) for(int i = 0; i < (n); ++i) #define REP(i,a,b) for(int i = (a); i < (b); ++i) #define mp make_pair #define pb push_back #define ALL(c) (c.begin(),c.end()) using namespace std; typedef vector<int>...
ALGO
0.999787
3.21792
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2013-07-09T00:31:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d8a2f523cb...
4e06f9df-1ff8-4442-bec8-7b490d9317b0
sahilgupta0607/Data-Structures-Algorithms
Graphs/cycleDetectionDSU.cpp
#include<vector> #include<queue> #include<list> #include<iostream> #include<unordered_set> using namespace std; int find(vector<int> &parent, int x){ if(parent[x] == x) return x; return find(parent, parent[x]); } bool unionGraph (vector<int> &parent, vector<int> &rank, int a, int b){ a = find(parent, a)...
ALGO
0.999882
5.519242
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-02-12T17:48: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": "4940c719662f...
e346564a-4a85-4191-963f-d5991c2ad6d7
maanindermaan/Data-Structures-Algorithms
3. Arrays /11/printsumcolwise.cpp
#include <iostream> using namespace std; // ROW WISE // void addRowWise(int arr[][4] , int rows , int cols){ // for(int i=0 ; i<3 ; i++){ // int sum = 0; // for(int j=0 ; j<4 ; j++){ // sum = sum + arr[i][j]; // } // cout<<sum<<endl; // } // } // COL WISE void colSu...
ALGO
0.999609
4.797771
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-08-02T08:02: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": "b0a54f06ebf6...
88a6542a-b5be-45b7-ac3e-4dac99617686
arihant32/Leetcode
Find Right Interval.cpp
/* Find Right Interval Given a set of intervals, for each of the interval i, check if there exists an interval j whose start point is bigger than or equal to the end point of the interval i, which can be called that j is on the "right" of i. For any interval i, you need to store the minimum interval j's index, whic...
ALGO
0.999979
5.85014
{ "github_metadata": { "branch": "master", "commit_count": 310, "repo_created_at": "2020-05-14T11:53: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": "c9d3b073...
65086454-72cf-4448-92f0-3290075378f1
mzry1992/workspace
OJ/CDOJ/I.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> using namespace std; int n,m; double a[100][100],b[100][100]; int cmp(double a,double b) { if (fabs(a-b) < 1e-6) return 0; if (a < b) return -1; return 1; } int main() { while (scanf("%d%d",&n,&m) != EOF) { for (...
ALGO
0.9999
3.220594
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2012-11-03T05:40:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9da5be9f5...
c7c42d40-0695-4a21-bc6c-a4c0bc941ec4
bluesquanium/Algorithm
Codeforces/c1428/B.cpp
#include <iostream> #include <cmath> #include <string> #include <cstring> #include <vector> #include <map> #include <queue> #include <set> #include <algorithm> #define ll long long #define pii pair<int,int> #define pll pair<ll, ll> #define LINF 0x7fffffffffffffff #define INF 0x7fffffff using namespace std; ll T, N, M,...
ALGO
0.999948
3.297502
{ "github_metadata": { "branch": "master", "commit_count": 145, "repo_created_at": "2019-03-09T10:10:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e1c3433...