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
f16024c0-4634-44ba-a2ce-6ec61b6a74b1
xyyzy/LetCode-Cpp
daily practice/_845_Longest Mountain in Array/Solution.h
// // Created by Xulin on 2020/10/25. // #ifndef LETCODEC___RANDOMIZEDCOLLECTION_H #define LETCODEC___SOLUTION_H #include <vector> #include <algorithm> using namespace std; class RandomizedCollection { int longestMountain(vector<int> &A) { int n = A.size(); if (!n) { return 0; ...
ALGO
0.999898
5.830779
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2020-06-09T02:58: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": "c548e24fd...
687044d9-5fbc-4b43-ba42-3527d28f733f
marivin23/sources
PrimeCheck&Search.cpp
#include <iostream> #include <Windows.h> using namespace::std; unsigned int n, index, i, j, prime; /*void setConsoleWin() { HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); SMALL_RECT rect = { 0, 0, 100, 100 }; SetConsoleWindowInfo(hConsole, TRUE, &rect); }*/ void searchPrime() { cout << "Input the number ...
ALGO
0.992412
3.800164
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2017-10-20T23:22: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": "6b5ad1315...
df862887-5c08-46c6-ba98-2764e3d3fcbf
SKTT1-Zeus/test.001
哈希冲突解决.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #define TABLE_SIZE 10 typedef struct { char* key; char* value; } KeyValuePair; typedef struct { KeyValuePair* table[TABLE_SIZE]; } HashTable; // 哈希函数 int hash(char* key) { int hashValue = 0; while (*key) { hashValue = (hashValue << ...
ALGO
0.994964
4.212731
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2023-11-20T14:10: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": "958850c63e8...
abc7246e-9c57-4021-94b9-057c6d82a4d2
Tejas-00/Design-and-Analysis-of-Algorithms
Practical_3HuffmanEncoding.cpp
#include <iostream> #include <queue> #include <unordered_map> #include <vector> using namespace std; struct HuffmanNode { char data; int freq; HuffmanNode *left, *right; HuffmanNode(char data, int freq) : data(data), freq(freq), left(nullptr), right(nullptr) {} }; struct Compare { bool operator(...
ALGO
0.999993
5.380303
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-11-08T06:57: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": "f837b9d33fd...
8b5b3977-6b0d-4cc0-9316-592277dddc8d
kevinchahine/supersonicai
supersonicai/ml/brute_trainer.cpp
#include "supersonicai/ml/brute_trainer.h" #include <opencv2/opencv.hpp> #include "supersonicai/agents/brute.h" #include "supersonicai/game/levels.h" #include "supersonicai/rewards/reward_system.h" #include "supersonicai/util/stopwatch.h" #include "supersonicai/vision/helpers.h" using namespace std; namespace super...
ALGO
0.992003
6.269567
{ "github_metadata": { "branch": "stable", "commit_count": 20, "repo_created_at": "2023-03-08T19:11:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b4c6c5024...
06e6efb2-27d1-49d0-8e34-711d8061526c
nuwanda57/CodeU
Assignment6/tests.cpp
#include <vector> #include "tests.h" #include "CParkingLot.h" void AllTests() { TestAlgorithm_v0(); TestAlgorithm_v1(); TestAlgorithm_v2(); TestAlgorithm_v3(); TestAlgorithm_v4(); TestAlgorithm_v5(); } void TestAlgorithm(std::vector<int>& FirstState, std::vector<int>& SecondState){ std::...
TEST
0.991746
4.85615
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2017-05-17T14:13:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "64de7e53b...
5fae267d-5474-4da2-8827-a7d183545f19
kardach/PO
PO/MovePlanner.cpp
#include <SFML/Graphics.hpp> #include <functional> #include "MovePlanner.h" #include "Team.h" #include "Settings.h" #include "Rules.h" #include "Board.h" #include "MainTile.h" #include "Piece.h" #include "Turn.h" #include "Move.h" #include <iostream> MovePlanner::MovePlanner(const Settings& settings, const Turn& tur...
ALGO
0.907478
5.713831
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2024-10-09T00:50: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": "d270fc158...
70dec1f4-f043-425e-bef3-ac12a6396d72
dylanx22/RentManager
Project1/Project1/Source.cpp
#include <iostream> #include <iomanip> using namespace std; //Globals const int SIZE = 5; int property; int rent[SIZE]; int* rentp = rent; //Function Prototypes void getMenuItem(bool hasMadeFirstSelection); void selectionSort(int*, int); void displayMemoryLocations(int*, int); void enterRents(int*, int); int sumRents(...
TOOL
0.988861
3.652749
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-09-12T11:30: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": "1f3b00d0c7...
8160db63-852a-468d-b73b-47d7e32ff170
cms-externals/blackhat
src/primitive_ampl_map.cpp
/* * primitive_ampl_map.cpp * * Created on: 15 Jan 2011 * Author: */ #include <algorithm> #include "BH_utilities.h" #include "primitive_ampl_map.h" #include "helcode.h" using namespace std; namespace BH { //modified in the sense that we do not disinguish between gluinos and quarks long compute_pcode(cons...
ALGO
0.981379
3.440206
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2014-07-24T12:51:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b6cefac457...
444a3543-b7a0-4f04-a458-d76b195041f4
ishandutta2007/codeforces-t
teja349/normal/860/B.cpp
//teja349 #include <bits/stdc++.h> #include <vector> #include <set> #include <map> #include <string> #include <cstdio> #include <cstdlib> #include <climits> #include <utility> #include <algorithm> #include <cmath> #include <queue> #include <stack> #include <iomanip> //setbase - cout << setbase (16); cout << 100 << end...
ALGO
0.999866
3.21484
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "89d7499903d4...
36ee6171-b66a-469a-bba3-6a108791eea3
TaigoFr/GAcpp
GA/Old/v2/GA/Evolver.hpp
#ifndef _EVOLVER_ #define _EVOLVER_ #include "Random.hpp" #include "Clock.hpp" #include "Population.hpp" #include <string> namespace GA{ extern Random generator; enum Objective{ NONE ,MINIMIZE ,MAXIMIZE }; enum StopReason { Undefined ,MaxGenerations ,StallAverage ,StallBest }; void printStop...
ALGO
0.979622
5.871957
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2019-04-14T22:22: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": "84642fffd...
bb83926b-2a5e-45e4-9058-844143a41dfe
trijalkaushik/CollegeD
CollegeOS/nonpreemptive.cpp
#include <stdio.h> void sjf(int processes[], int n, int bt[]) { int wt[n], tat[n]; // Sort processes based on burst time for (int i = 0; i < n-1; i++) { for (int j = 0; j < n-i-1; j++) { if (bt[j] > bt[j+1]) { // Swap int temp = bt[j]; bt[j] = bt[j+1]; bt[j+1] = temp; temp = processes[j]; processes[j] = proc...
ALGO
0.999989
5.314142
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-07-10T14:26: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": "8ef0503728...
c87b597c-b7cb-404e-a904-1c67c901f468
NamNamju/Algorithm
DP/baekjoon_1912.cpp
#include <iostream> using namespace std; /* n개의 정수로 이루어진 임의의 수열이 주어진다. 우리는 이 중 연속된 몇 개의 수를 선택해서 구할 수 있는 합 중 가장 큰 합을 구하려고 한다. 단, 수는 한 개 이상 선택해야 한다. */ int main() { int num; long long arr[100002] = { 0, }; // 입력한 수를 저장할 배열. long long dp[100002] = { 0, }; // 다른 배열. cin >> num; for (int i = 0; i < num; i++) { c...
ALGO
0.999886
4.280089
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2019-12-22T08:25:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dffcd1f5...
ece982a4-ffb8-4e1c-8d7e-ab53f1074d6f
LFJINGT/acm_practise
W-1 Saving James Bond - Easy Version.cpp
// W-1 Saving James Bond - Easy Version(深度优先搜索) #include <iostream> #include <stdio.h> #include <malloc.h> #include <stdbool.h> #include <math.h> using namespace std; int mark[100]; //用于记录各结点(鳄鱼)是否跳到过,默认没有被跳到过,为 0 int n; //用于记录结点(鳄鱼)的总数 int jumpsize; //用于记录每次可以跳出的距离 double R = 7.5; //用于保存中心小岛的半径 int set; ...
ALGO
0.999996
3.919571
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-03-19T06:09:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "56d872a223...
b032e17d-ab11-4e98-a07c-e119b288db32
akhrot/cns_lab
CNS Lab/cycle_2/rsa_openssl.cpp
#include<bits/stdc++.h> #include<openssl/rsa.h> using namespace std; int main() { cout<<"Here 1\n"; RSA *keypair = NULL; keypair = RSA_new(); BIGNUM *e = NULL; BN_dec2bn( &e, "3" ); cout<<"Here 2\n"; if( RSA_generate_key_ex( keypair, 256*8, e, NULL )==0 ) { cout<<"RSA key generation failed\n"; return -1;...
ALGO
0.974947
3.730417
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-08-29T09:17: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": "145b5f540...
6639c75c-b793-43c6-828c-b9114f2ed7f7
ShahjalalShohag/code-library
Number Theory/Intersection of Arithmetic Progressions.cpp
#include<bits/stdc++.h> using namespace std; using T = __int128; using ll = long long; // ax + by = __gcd(a, b) // returns __gcd(a, b) T extended_euclid(T a, T b, T &x, T &y) { T xx = y = 0; T yy = x = 1; while (b) { T q = a / b; T t = b; b = a % b; a = t; t = xx; xx = x - q * xx; x = t; t = yy; ...
ALGO
0.999944
4.948943
{ "github_metadata": { "branch": "main", "commit_count": 952, "repo_created_at": "2018-11-18T08:49:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3240, "forks": 840, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "f67d4...
0c547b6d-57b0-424f-ad7b-7525c18615d0
johnnyoh555/Baekjoon
24.03-2/1707_이분 그래프.cpp
// https://www.acmicpc.net/problem/1707 #include <iostream> #include <vector> #include <queue> #include <cstring> using namespace std; short vis[20001]; int K, V, E; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> K; for (int i = 0; i < K; i++) { cin >> V >> E; bool flag = 0; vector<int> arr...
ALGO
0.999977
5.08815
{ "github_metadata": { "branch": "main", "commit_count": 278, "repo_created_at": "2024-01-18T08:04: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": "b9acc003c7...
7684173f-1455-4650-8a36-679262e20dd9
sandstorm666/offer
最长连续序列.cpp
// 给定一个未排序的整数数组nums,找出数字连续的最长序列(不要求序列元素在原数组中连续)的长度。 // 请你设计并实现时间复杂度为 O(n) 的算法解决此问题。 #include <vector> #include <queue> using namespace std; /*优先队列:默认从大到小排序 priority_queue<int,vector<int>,greater<int> > q;改为从小到大排列*/ class Solution { priority_queue<int> q; public: int longestConsecutive(vector<int> &nums) { ...
ALGO
0.999974
5.045458
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2022-05-08T11:49: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": "7ef8beeaa...
a693db1d-ba32-4280-a0f2-006c872e8ea9
scturtle/leetcode-sol
cpp/36.cpp
#include <iostream> #include <vector> #include <algorithm> #include <iterator> #include <utility> #include <map> #include <set> #include <string> #include <unordered_map> #include <climits> #include <numeric> using namespace std; template<typename T> void prints(vector<T> &v){ cout << "["; for(uint i=0; i<v.size()...
ALGO
0.996419
5.786375
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2015-03-17T09:59: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": "ddfd28566...
b865add6-1493-48ac-9c81-d1c490f889cf
ammardab3an/ACM
problems/done/codeforces/D1. 388535.cpp
// Problem: D1. 388535 (Easy Version) // Contest: Codeforces - Codeforces Round #779 (Div. 2) // URL: https://codeforces.com/contest/1658/problem/D1 // Memory Limit: 256 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org) // By AmmarDab3an - Aleppo University #include "bits/stdc++.h" using ...
ALGO
0.999948
4.891336
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2021-10-06T07:54:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d45f7e5f7e3...
b9068c07-c124-49ae-a8a6-9c5728c9686b
fengbingchun/Face_Test
src/libfacedetection/example/benchmark.cpp
/* The MIT License (MIT) Copyright (c) 2016 <NAME> <EMAIL> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge...
TOOL
0.902806
4.436995
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2016-10-24T12:47:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 72, "forks": 63, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75805ae...
cf05d4a0-45a0-4aa6-b882-ad573f2a3e1e
DuongHaoNika/DSA_CodePTIT
DSA01015 - TÌM BỘI SỐ.cpp
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define fi first #define se second #define pb push_back #define sz size() #define ll long long #define FOR(i, a, b) for (int i = a; i <= b; ++i) #define FORD(i, a, b) for (int i = a; i >= b; --i) #define ALL(x) x.begin(), x.end() #define NALL(x) x.begin...
ALGO
0.999534
4.214547
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-01-19T06:01:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00f19f652b5...
c81d2740-bd03-4f39-946f-8dd1c3f2a7f7
light17ln/problemSolving
Tries 2/01_Phone_directory.cpp
#include <bits/stdc++.h> using namespace std; // METHOD 1 class Solution { public: vector<vector<string>> displayContacts(int n, string contact[], string s) { // code here vector<vector<string>> ans; vector<string> temp; string check = ""; for (int i = 0; i < s.length()...
ALGO
0.999986
4.553339
{ "github_metadata": { "branch": "main", "commit_count": 132, "repo_created_at": "2024-03-08T16:37: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": "8243103a5c...
8c38066d-1d23-40f0-87c3-13a5ff545d61
fantasydreams/findwork
bazelProject/leetcode/devide/241.DifferentWaystoAddParenthesesTest.cpp
#include "241.DifferentWaystoAddParentheses.h" #include "gtest/gtest.h" #include <algorithm> TEST(case_1,content) { std::vector<int> ans = {0, 2}; std::string expression = "2-1-1"; std::vector<int> resVec = diffWaysToCompute(expression); std::vector<int> resVec1 = diffWaysToCompute1(expression); st...
ALGO
0.99923
5.552243
{ "github_metadata": { "branch": "master", "commit_count": 414, "repo_created_at": "2020-09-08T08:30:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c419739b...
6bfb1e08-409f-4e12-9870-fdb6203e40b3
SungwookLE/Codingtest_Algorithm
baekjoon/sort_n2.cpp
#include <iostream> #include <vector> // full_search_sort: n^2 int main(){ std::vector<std::vector<int>> data; int n; std::cin >> n; for (int i = 0 ; i < n ; ++i){ int w, h ; std::cin >> w >> h; data.push_back({w,h, i+1, 0}); } for(int i = 0 ; i < data.size() ;...
ALGO
0.999788
4.128411
{ "github_metadata": { "branch": "master", "commit_count": 180, "repo_created_at": "2021-04-05T14:24: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": "5ebbccf9...
c7747ef2-ae0a-4cbf-b22e-220b939a938f
Mindjolt2406/Competitive-Programming
Codeforces/553/B.cpp
/* <NAME> IIIT Bangalore */ #include<bits/stdc++.h> #define mt make_tuple #define mp make_pair #define pu push_back #define INF 1000000001 #define MOD 1000000007 #define ll long long int #define ld long double #define vi vector<int> #define vll vector<long long int> #define fi first #define se second #define pr(v) { f...
ALGO
0.999978
3.635993
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2018-11-15T05:50:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ab85f0bd...
ea3b048a-164c-439c-9af8-d3c50af04b56
mamun-akand/Programming-Problem-Solving-List
03 ATCODER C++/dp_c.cpp
// URL: https://vjudge.net/problem/atcoder-dp_c #include<bits/stdc++.h> using namespace std; #define ll long long int const ll N = 1e5+7; ll a[N], b[N], c[N]; ll dp[N][4]; ll max_happiness(ll n, ll task){ if(n==0) return 0; if(dp[n][task] != -1) return dp[n][task]; if(task == 0){ ll choice1 = a[n] + max_happ...
ALGO
0.999835
4.000759
{ "github_metadata": { "branch": "main", "commit_count": 90, "repo_created_at": "2022-03-26T08:39: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": "ebca7870528...
f496018e-280b-4400-b054-1d44722e7d5e
Euijune/2021_C-Study
C++_STUDY/BAEKJOON/Q_2636.cpp
#include <iostream> #include <memory.h> using namespace std; #define HOLE 0 #define CHEESE 1 #define AIR 2 #define endl '\n' int M, N; int grid[100][100]; int temp[100][100]; int drs[4] = { 1,-1, 0, 0 }; int dcs[4] = { 0, 0, 1, -1 }; bool inRange(int r, int c) { return 0 <= r && r < M && 0 <= c && c < N; } bool ca...
ALGO
0.999944
3.410353
{ "github_metadata": { "branch": "main", "commit_count": 286, "repo_created_at": "2021-06-22T06:12: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": "15663e1cdf...
a3765c99-9767-4215-88f7-922709d87b05
cbkpar/BOJ
boj_16118.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> using namespace std; vector<pair<int, long long>> vecNode[4001]; long long distFox[4001] = { 0, }; long long distWolf[4001][2] = { 0, }; void dijkstraFox(int start) { priority_queue<pair<long long, int>, vector<pair<long long, int>>, greate...
ALGO
0.999936
3.69102
{ "github_metadata": { "branch": "main", "commit_count": 2802, "repo_created_at": "2021-07-03T02:01:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "44bc4000a...
d0509f7b-a30c-4f97-bdd3-f8fec9f6f0fd
baijiangying/OJ
lesson/chapter 0/MaxRectangle.cpp
#include <stack> #include <bits/stdc++.h> int maxInHistogram ( int*, int ); int main() { std::ios::sync_with_stdio(false); int n = 0, m = 0; std::cin >> n >> m; std:: string* matrix = new std::string[n](); for ( int i = 0; i != n; ++i ) { std::cin >> matrix[i]; } int max = 0; int* histogram = new int[m]; ...
ALGO
0.999935
4.000098
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-07-18T07:50:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74fba1cc9...
9b2ba1b1-1a13-4ccb-b254-a59f4e7e2712
old-yan/CP-template
TEST/oj/luogu_p4314.cpp
#include "DS/SegmentBeat.h" #include "IO/FastIO.h" /* [P4314 CPU 监控](https://www.luogu.com.cn/problem/P4314) */ /** * 本题为区间推平修改,可以由区间最值修改组装出来,可以应用 SegBeat */ // 本题一种思路是,在区间最大化修改、区间最小化修改的基础上,组合成区间 assign 操作。 // 但这么做的问题是,区间最大化修改、区间最小化修改的标记本身就很多,与历史最值标记相互耦合之后非常复杂 // 如果重新写一个不支持区间最值修改的结点,反而简单很多 template <typename ValueTyp...
ALGO
0.999367
5.236534
{ "github_metadata": { "branch": "main", "commit_count": 390, "repo_created_at": "2021-06-29T16:22:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 268, "forks": 43, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "199d60d...
18f94d70-6b0e-4a50-a7bf-99ccd36501dd
ishandutta2007/codeforces-y
yfhuang/normal/1278/D.cpp
#include <cstdio> #include <algorithm> #include <iostream> #include <cstring> #include <vector> #include <set> using namespace std; const int maxn = 1e6 + 5; int pre[maxn]; int l[maxn], r[maxn]; int n; vector<int> G[maxn]; int id[maxn]; bool vis[maxn]; set<int> s; void dfs(int u, int fa){ vis[u] = true; for...
ALGO
0.999983
3.855403
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:40:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07605845a20c...
6ddeb65d-c2a8-4ccc-9d10-d4524eab381a
BhartiRajesh99/DSA
BinarySearchTree.cpp
#include<iostream> using namespace std; class BST{ public: int data; BST* left; BST* right; BST(){ this->data=0; this->left=nullptr; this->right=nullptr; } BST(int v){ this->data=v; this->left=nullptr; ...
ALGO
0.999992
4.171431
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-09-30T03:37: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": "b45b900309a...
a085d524-479b-4b56-b9db-f539545f8ab7
jiayiliu18/CSE-332S-Object-Oriented-Software-Development-Laboratory
Lab3/FiveCardDraw.cpp
// FiveCardDraw.cpp // Author: <NAME> <EMAIL> <NAME> <EMAIL> // Definition of the FiveCardDraw class member functions // Definitions of the non-member functions #include "stdafx.h" #include "Player.h" #include "Game.h" #include "FiveCardDraw.h" #include "Deck.h" #include "Hand.h" #include "Card.h" #include <ios...
ALGO
0.993586
3.592812
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-02-28T17:06: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": "9b999adae8...
c18d646b-dc26-40c1-aed3-9c2f1d166a68
physimals/quantiphyse-dce
src/Optimizer_class.h
/* Author: <NAME> (<EMAIL>) Copyright (c) 2013-2015 University of Oxford, <NAME> */ #ifndef OPTIMIZER_CLASS_H #define OPTIMIZER_CLASS_H // std libraries #include <stdio.h> #include <iostream> #include <cmath> #include <stdlib.h> #include <time.h> // My libraries #include "lmcurve.h" // Functions to optimise: //...
ALGO
0.996687
5.48136
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2019-02-05T11:11:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4588180265...
1ff3a438-b7a2-435a-b834-7f02cf17e8e8
ishandutta2007/codeforces-s
shayan.p/normal/1342/D.cpp
// Never let them see you bleed... // Shayan.P 2020-04-26 #include<bits/stdc++.h> #define F first #define S second #define PB push_back #define sz(s) int((s).size()) #define bit(n,k) (((n)>>(k))&1) using namespace std; typedef long long ll; typedef pair<int,int> pii; const int maxn = 2e5 + 10, mod = 1e9 + 7, inf ...
ALGO
0.999953
3.544245
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "904adfb68a68...
178a430f-75e9-4e96-8a6c-896609d46c57
hafsawaseem14/DSA-LAB
calculator.cpp
#include <iostream> #include <stack> using namespace std; class Node { public: string operation; int result; Node* next; Node(string op, int res) { operation = op; result = res; next = nullptr; } }; class Linkedlist { private: Node* head; public: Linkedlist() { ...
ALGO
0.999574
5.593445
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2025-02-03T06:53: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": "2ee277842cf...
ae082854-8600-423d-8f41-f0a13736ef0c
Agda78/Algoritmi_e_strutture_dati
Algoritmi_Noti/01_Ordinamento/Countsort.cpp
#include <iostream> using namespace std; void stampa_array(int A[], int dim){ cout << "Stampa array: " << endl; for (int i = 0; i < dim; i++){ cout << A[i] << " "; } } void count_sort(int A[], int dim, int k){ int C[k + 1]; int B[dim]; // Inizializzazione dell'array di frequenz...
ALGO
0.999948
4.591292
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-11-10T00:11:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62147405f94...
5e453b09-d9ad-4d81-b87b-0ef40a7120a9
AKARAPONz/ComEn
11.1.cpp
#include <stdio.h> int BinSearch(int arr[], int n, int key); int main() { int data[6] = {1, 2, 3, 4, 5, 7}; int n = 6; int find = 5; int pos = BinSearch(data, n, find); if (pos != -1) { printf("Found %d at %d\n", find, pos); } else { printf("%d not found in the array.\n", find...
ALGO
0.999972
5.468041
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2023-09-02T05:44: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": "2b3de8df330...
2676bf3a-4aff-47a7-b65b-c26cc8e5c987
shaoormunir/big-numbers
BigNum.cc
#include "BigNum.h" BigNum::BigNum() { initialize(); } BigNum::BigNum(const BigNum &object) { initialize(); for (size_t i = 0; i < 32; i++) { data[i] = object.data[i]; } } BigNum::~BigNum() {} bool BigNum::areCoPrime(unsigned int a, unsigned int b) { return __gcd(a, b) == 1; } bool ...
ALGO
0.992875
4.002963
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-11-30T09:52: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": "436301ddc9...
1d076139-89e8-4edf-a8de-dd966f959f53
hujunyu1222/leetcode
Number of Islands.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; int numIslands(vector<vector<char>>& grid) { queue<pair<int, int> > q; vector<pair<int, int> > direct{{-1,0}, {1,0}, {0,-1}, {0,1}}; int i, j; int cnt = 0; int m = grid.size(); if (m == 0) return 0; int n = grid...
ALGO
0.999976
5.785743
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-10-23T07:52: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": "f3a6f41357...
b225e4f8-4800-46a8-80e8-13a6edb59dc8
rjenez/W266-final-project
data/programming-homework-dataset-plagiarism-detection/src/B2017/Z3/Z2/student1110.cpp
/B2017/2018: Zadaća 3, Zadatak 2 #include #include <iostream> #include <map> #include <string> #include <stdexcept> #include <utility> #include <vector> #include <iterator> #include <cctype> #include <set> using namespace std; typedef map <string, vector<string>> Knjiga; string pretvoriUMala(string tekst){ s...
TOOL
0.950909
4.247807
{ "github_metadata": { "branch": "main", "commit_count": 125, "repo_created_at": "2022-02-09T00:45:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d81ccfd3b7...
729840e9-8dc8-4534-864d-d61996a7af40
Tewer1234/Codeforces-Round-506-Div.-3-
pF.cpp
#include <iostream> #include <stdlib.h> #include <stdio.h> #include <algorithm> #include <bits/stdc++.h> #include <iomanip> #include <vector> #include <map> #include <queue> #include <stack> #include <set> #include <typeinfo> #define ll long long int #define pb push_back #define inf 0x3f3f3f3f #define SIZE 400005 usin...
ALGO
0.999973
3.675019
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-09-26T16:33: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": "088b6393b511...
415948bd-bfa7-497a-965c-e5470b9c0188
ethz-asl/mav_trajectory_generation
mav_trajectory_generation_ros/include/mav_trajectory_generation_ros/feasibility_base.h
/* * Copyright (c) 2016, <NAME>, ASL, ETH Zurich, Switzerland * Copyright (c) 2016, <NAME>, ASL, ETH Zurich, Switzerland * Copyright (c) 2016, <NAME>, ASL, ETH Zurich, Switzerland * Copyright (c) 2016, <NAME>, ASL, ETH Zurich, Switzerland * Copyright (c) 2016, <NAME>, ASL, ETH Zurich, Switzerland * * Licensed un...
ALGO
0.989367
7.398368
{ "github_metadata": { "branch": "master", "commit_count": 572, "repo_created_at": "2016-12-09T13:40:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 609, "forks": 228, "issues": 18, "pull_requests": 3 }, "file_meta": { "content_id": "5553...
963274b3-5b3f-4402-90f7-8b9e2dcd328c
0x1306e6d/algorithm
strategies/wildcard.cpp
/* WILDCARD : 와일드카드 Difficulty : 중 Input : 2 he?p 3 help heap helpp *p* 3 help papa hello Output : heap help help papa */ #include <iostream> #include <cstring> #include <vector> #incl...
ALGO
0.999797
3.665513
{ "github_metadata": { "branch": "master", "commit_count": 1147, "repo_created_at": "2016-01-15T16:22:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9155ded...
58647e77-da32-479a-914e-7d2e760e52b7
ldw3097/Algorithm_study
baekjoon_22.02/240-2225-합분해.cpp
#include <bits/stdc++.h> using namespace std; int N, K; array<long, 201> dp{}; array<long, 201> dp2{}; void addone(bool todp2) { if (todp2) dp2.fill(0); else dp.fill(0); for (int i = 0; i <= N; ++i) { for (int j = 0; j <= N - i; ++j) { if (todp2) { dp2[i + j] += dp[i]; } else { ...
ALGO
0.999973
4.754871
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2020-09-14T13:40: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": "469e851c9...
118e2a01-f66a-4b4e-8ae6-81bf12ebed13
ssavi-ict/LeetCode-Submission
palindrome-pairs/Accepted/9-17-2022, 6_47_07 PM/Solution.cpp
// https://leetcode.com/problems/palindrome-pairs class Solution { public: struct TrieNode{ int index; struct TrieNode * next[26]; }; struct TrieNode * getNode(){ struct TrieNode * newNode = new TrieNode; newNode->index = -1; for(int i=0; i<26; i++){ ...
ALGO
0.999984
6.386357
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2022-12-03T11:51: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": "081d56a2eaa...
d9e7eae7-6cb0-4488-9695-6fbff334fb3b
mikolaj-jalocha/data-structures
include/collections/hash_tables/HashMap.cpp
// // Created by <NAME> on 24/05/2025. // #include "HashMap.h" HashMap::HashMap() { tab = new DoublyLinkedList<std::pair<int, int> *>[arraySize]; } HashMap::~HashMap() { delete [] tab; } int HashMap::getHash(int key) const { return key % arraySize; } void HashMap::insert(int key, int value) { auto* ...
ALGO
0.989795
5.387093
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2025-03-14T15:59: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": "97d5d3fa...
d14b60b4-d4c9-4647-b758-a63653dfd10c
flysoso/NewQuant
MatrixComputation/BandMatrix.cpp
#ifndef BAND_MATRIX_CPP #define BAND_MATRIX_CPP #include "BandMatrix.h" #include "SquareMatrix.h" #include "IdentityMatrix.h" #include "LowerTriangularMatrix.h" #include "UpperTriangularMatrix.h" #include "DiagonalMatrix.h" #include "DiagonalSolver.h" #include "LowerBandSolver.h" #include "UpperBandSolver.h" #include ...
TOOL
0.970512
6.56072
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2015-10-31T15:34: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": "53f1cf56a...
6a187f41-0c01-4641-b61e-5d991d4b74d8
yixuan/MiniDNN
include/Activation/Softmax.h
#ifndef ACTIVATION_SOFTMAX_H_ #define ACTIVATION_SOFTMAX_H_ namespace MiniDNN { /// /// \ingroup Activations /// /// The softmax activation function /// class Softmax { private: typedef Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic> Matrix; typedef Eigen::Array<Scalar, 1, Eigen::Dynamic> R...
ALGO
0.995129
6.611572
{ "github_metadata": { "branch": "master", "commit_count": 135, "repo_created_at": "2018-01-21T15:02:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 423, "forks": 96, "issues": 11, "pull_requests": 1 }, "file_meta": { "content_id": "32c0...
23a8faf4-a2c5-441f-8282-97a16d03fc94
matiego1/sio2
Klasa 3 (24-25)/paths2.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> para; const int MAX = 200 * 1000; vector<int> graf[MAX + 1]; int rozmiar[MAX + 1]; bool czy_centroid[MAX + 1]; int n, k_min, k_max; ll query(unordered_map<int, int>& tree, int i) { ll wynik = 0; for (;...
ALGO
0.999595
3.982692
{ "github_metadata": { "branch": "main", "commit_count": 185, "repo_created_at": "2024-02-18T09:50:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f78697fc7...
5d12399e-8ece-4caa-a35c-d5b09da03f95
abeccaro/project-euler
src/problems/101-150/110/problem110.cpp
// // Created by <NAME> on 06/12/18. // #include "problem110.hpp" using series::primes; using prime_it = primes<uint32_t>::iterator; namespace problems { uint64_t problem110::find_num(uint32_t solutions, uint64_t best, const prime_it& p, uint32_t max_mult_p, uint64_t n, uint32_t sol_found) { ...
ALGO
0.999869
5.274094
{ "github_metadata": { "branch": "master", "commit_count": 253, "repo_created_at": "2017-12-11T06:47: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": "175e9e43...
b72d4465-d66a-433a-8094-ceab5f22627b
CodeTest-StudyGroup/Code-Test-Study
maywngml/[5]백준/4256_트리.cpp
#include <vector> #include <algorithm> #include <iostream> using namespace std; int N; // 전위순회, 중위순회 결과를 저장할 벡터 vector<int> preorder, inorder; // 후위순회를 진행하는 함수 void postorder(int start, int end, int parent) { for (int index = start; index <= end; index++) { // 중위순회 벡터에서 전위순회의 부모 노드의 위치를 찾음 if (inorder[index...
ALGO
0.999997
5.177771
{ "github_metadata": { "branch": "master", "commit_count": 1647, "repo_created_at": "2020-04-05T11:06:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1145, "forks": 167, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ce...
1a9ce889-238e-4a99-a4db-9fc11cd817f1
horoshenkiy/OpenCell
external/fruit-0.0.1/src/controller/render_controller/fluid/fluid_renderer.cpp
#include <controller/render_controller/fluid/fluid_renderer.h> #include "controller/compute_controller/compute_controller.h" namespace FruitWork { namespace Render { using namespace GL; namespace Fluid { //shaders for points //-----------------------------------------------------------------------------------------...
TOOL
0.941415
5.827928
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-10-21T11:02:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "740800467...
f7139df8-c5cd-46b4-96c3-9c6e67bd18de
SiyangShao/codes
luogu/P2024.cpp
#include <bits/stdc++.h> using namespace std; int fa[150010], n, k, ans; void init() { for (int i = 1; i <= n * 3; i++) { fa[i] = i; } } int find(int x) { if (x != fa[x]) { fa[x] = find(fa[x]); } return fa[x]; } void unionSet(int x, int y) { x = find(x); y = find(y); fa[x] = y; } int main() { cin >> n >> k...
ALGO
0.999891
3.879062
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-04-08T14:41:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12f643ec7563...
58b7b551-32ab-4631-ade6-1835bf1d4ad0
smdirfan72/CSA1457_Compiler_design
compiler design program 35.cpp
#include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> char *input; int pos; int expression(); int term(); int factor(); void error(); void consume(char expected) { if (*input == expected) input++, pos++; else error(); } void error() { fprintf(stderr, "Syntax error ...
ALGO
0.999468
4.412258
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-14T08:28: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": "d4994eae7694...
8d9c322f-4c79-43df-8456-5b3e3a493182
AndreiMit23/TIC-TAC-TOE-game
Joc.cpp
#include <iostream> #include "Joc.h" #include <ctime> void verificaElement(char &Jucator, char &Computer) { if (Jucator == 'X') { Computer = 'O'; std::cout << "Jucator: " << Jucator << std::endl; std::cout << "Computer: " << Computer << std::endl; } else { Computer =...
ALGO
0.989582
4.129548
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-04-02T17:44:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a4e15f4ad4...
900eb4c9-9fb0-4bdf-b160-f10a51fb7e64
hpsim/foam-extend-mirror
src/immersedBoundary/immersedBoundaryTurbulence/compressible/wallFunctions/immersedBoundaryMutWallFunction/immersedBoundaryMutWallFunctionFvPatchScalarField.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | foam-extend: Open Source CFD \\ / O peration | Version: 5.0 \\ / A nd | Web: http://www.foam-extend.org \\/ M anipulation | For ...
TOOL
0.954724
6.307605
{ "github_metadata": { "branch": "master", "commit_count": 5570, "repo_created_at": "2023-09-29T13:27:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf5ff7c7...
3f91d8c6-b33c-4df5-81d9-835405e5af6f
sai-sreekhar/Competitive-Coding
cat.cpp
#include <iostream> #include <vector> using namespace std; bool isSubString(string s1, string s2) { int M = s1.length(); int N = s2.length(); for (int i = 0; i <= N - M; i++) { int j; for (j = 0; j < M; j++) if (s2[i + j] != s1[j]) break; if (j == M...
ALGO
0.999986
4.237622
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2022-04-03T07:14: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": "104e28ff0...
8066219e-0fb0-4547-8c9b-5d7b4e24d012
micheeeeell/AtCoder
ABC/ABC034/D.cpp
#include<bits/stdc++.h> #include<iostream> #include<cstdio> #include<vector> #include<string> #include<algorithm> #include<map> using namespace std; #define rep(i,x) for(ll i = 0; i < (ll)(x); i++) #define pb push_back #define eb emplace_back #define mp make_pair #define debug(x) cerr << #x << ": " << (x) << "\n"; #def...
ALGO
0.999872
3.922337
{ "github_metadata": { "branch": "master", "commit_count": 237, "repo_created_at": "2019-06-21T04:33: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": "1e1e383b...
f5e038a9-eb3d-4cfe-900f-74448b56d46d
aamir-ops/Competitive-Programming
Kattis/icpc-tutorial.cpp
#include<bits/stdc++.h> using namespace std; int n, m, t; bool go() { if(t == 1) { if(n == 1) { return 1; } else { long long fac = 1; int it = 0; for(int i = 1; i <= n && fac < m; i++, it++) { fac *= i; } return (it == n && fac <= m); } } else if(t == 2) { long long fac = 1; int it ...
ALGO
0.999908
4.495971
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2020-01-17T12:04: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": "5191da57...
8613ab8a-2f4f-4fa9-88af-445415b23948
woshiluo/algorithm_competition
cf/contest/2002/e/e.cpp
/* * e.cpp 2024-08-12 * Copyright (C) 2024 <NAME> <<EMAIL>> * * 「Two roads diverged in a wood,and I— * I took the one less traveled by, * And that has made all the difference.」 * * Distributed under terms of the GNU GNU AGPLv3+ license. */ #include <cstdio> #include <cstdint> #include <cstring> #include <cstd...
ALGO
0.999784
4.749841
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2019-01-06T05:21: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": "7d747ced6...
513a7a39-6850-4154-bb7d-f79e344d2d1a
Shadowslice62642/SHARCS_0.2
moves.h
#pragma once template< template<char, char, char> class corner_move, char corner_length, char corner_ori, char corner_oriented, template<char, char, char> class edge_move, char edge_length, char edge_ori, char edge_oriented, uint64_t movecount> class movepair { corner_move<corner_length, c...
ALGO
0.998682
4.69953
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2021-09-21T09:58: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": "77c67eb0f...
d0afe157-a385-4099-bb27-72447fff377d
chenky111/UE4-Source
Engine/Source/Runtime/Renderer/Private/RayTracing/RayTracingDeferredMaterials.cpp
// Copyright 1998-2019 Epic Games, Inc. All Rights Reserved. #include "RayTracingDeferredMaterials.h" #include "RHIDefinitions.h" #include "RenderCore.h" #include "GlobalShader.h" #include "ShaderParameterStruct.h" #include "RenderGraphUtils.h" #include "DeferredShadingRenderer.h" #include "PipelineStateCache.h" #if ...
TOOL
0.976481
7.488402
{ "github_metadata": { "branch": "master", "commit_count": 54632, "repo_created_at": "2019-02-22T04:19:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da58f9...
b1121c5d-aac4-4627-9273-aac7161f3aac
BlitW0/cp-codes
codeforces/1003/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double ld; ld a[5005]; int main() { ios_base :: sync_with_stdio(false); cin.tie(0), cout.tie(0); ll n, k; cin >> n >> k; for (ll i = 0; i < n; i++) cin >> a[i]; ld ans = -1.00; for (ll i = k; i <= n; i++...
ALGO
0.999873
3.972229
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-09-01T18:08:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b0a1d1556e...
116cddab-0f6f-4430-84e4-da0ff72597c7
nhocki/notebook
src/grafos/bellman.cpp
//Complejidad: O(V*E) const int oo = 1000000000; struct edge{ int v, w; edge(){} edge(int v, int w) : v(v), w(w) {} }; vector<edge> g[MAXNODES]; int d[MAXNODES]; int p[MAXNODES]; // Retorna falso si hay un ciclo de costo negativo alcanzable // desde s. Si retorna verdadero, entonces d[i] contiene la // distancia m...
ALGO
0.99856
3.893981
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2015-04-02T04:10:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c584584b...
f4b67b45-a6a2-47ff-a0cc-0c19e581edf5
YtXmmie/CV
CV/CV/原始.cpp
#define _USE_MATH_DEFINES #include <opencv2/opencv.hpp> #include <vector> #include <random> #include <cmath> #include <queue> #include <algorithm> #include <stdexcept> #include <ctime> // 在文件头部添加以下头文件 #include <unordered_map> // 解决unordered_map报错 #include <unordered_set> // 解决unordered_set报错 #include <functional> #...
ALGO
0.9987
4.181983
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-05-16T12: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": "8a80c7e9dc2b...
f041ae08-de69-4f05-a0a7-821fe5cde3bb
jaydip1235/DSA
DynamicProgramming/Hard/MinTimeToRemoveAllIllegal.cpp
// https://leetcode.com/problems/minimum-time-to-remove-all-cars-containing-illegal-goods/ #include<bits/stdc++.h> class Solution { public: int minimumTime(string s) { int n = s.size(); vector<int> left(n, 0); vector<int> right(n, 0); if (s[0] == '1') left[0] = 1; ...
ALGO
0.999989
4.852717
{ "github_metadata": { "branch": "master", "commit_count": 631, "repo_created_at": "2021-09-03T04:29:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 23, "issues": 1, "pull_requests": 5 }, "file_meta": { "content_id": "39bb299...
d76eac85-1850-47d8-bc89-016eb6df2ba3
daishironishida/AtCoder-submissions
abc/abc394/d.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { string s; cin >> s; deque<char> stack; for (int i = 0; i < s.size(); i++) { if (s[i] == '(' || s[i] == '[' || s[i] == '<') { stack.push_back(s[i]); } else { if (stack.size() ==...
ALGO
0.999968
4.441066
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2023-08-19T08:08: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": "7ac1e545cbb...
38c1ca73-76cc-4305-9ab9-1ab0c959442d
roflox/PJC
TRIE/trie.cpp
#include "trie.hpp" #include <utility> #include <algorithm> #include <cassert> #include <stack> #include <set> #include <iostream> trie_node *currentNodePointer; using namespace std; //420 line just for fun trie::trie(const std::vector<std::string> &strings) { for (const auto &word: strings) { insert(wo...
ALGO
0.985544
4.150723
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2020-09-28T07:44:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23fe96cb3...
d5f09a07-d669-4864-9574-f0c18531a16d
alaneos777/club
tcarg/train/B.cpp
#include <bits/stdc++.h> using namespace std; inline bool get(uint64_t x, int i){ return (x >> (63-i)) & 1; } int gauss(vector<uint64_t> & A){ int m = A.size(), n = 64, i = 0, j = 0; while(i < m && j < n){ if(get(A[i], j) == 0){ for(int k = i + 1; k < m; k++){ if(get(A[k], j) != 0){ swap(A[i], A[k]...
ALGO
0.999998
4.522201
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2018-08-06T04:13:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "03cd542c9...
8fd0cd48-778e-4e2b-a4bc-e4be49c97710
jpryan1/ie-solver
ie_solver/ie_solver_dev.cpp
// Copyright 2019 <NAME> #include <omp.h> #include <string.h> #include <fstream> #include <memory> #include <iostream> #include <cmath> #include <cassert> #include "ie_solver/ie_mat.h" #include "ie_solver/initialization.h" #include "ie_solver/skel_factorization/skel_factorization.h" #include "ie_solver/quadtree/quadtre...
ALGO
0.978871
5.15915
{ "github_metadata": { "branch": "master", "commit_count": 201, "repo_created_at": "2018-09-17T17:04:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "552bc3f0...
7b3fcaaf-26c6-4d81-8006-058cd491d44a
ShahjalalShohag/bcs-contest-resources
aust_iupc_2025/J/main_solution.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long int; using pii = pair<int, int>; const int MAX = 1e6+5; const ll MOD = 998244353; ll modexpo(ll x, ll n) { ll res = 1; while(n) { if (n&1) res = res * x % MOD; x = x * x % MOD; n >>= 1; } return res; } ll fact[...
ALGO
0.999982
4.733342
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-02-24T08:42:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee97c8ba9ad...
311f8a99-62ef-45b7-aef3-543d4d431a7f
Safayatcc20/Problem_solving_in_Judge
Codeforces_20May2023_to July20_target_special/A_k_Factorization.cpp
/* **** <NAME> **** */ #include <bits/stdc++.h> using namespace std; #define sad '\n' #define all(b) b.begin(), b.end() #define ha cout << "YES" << '\n' #define na cout << "NO" << '\n' long long t = 1; constexpr bool multiple_test_cases = 1; long long gcd(long long x, long long y) { if (y == 0) return x...
ALGO
0.999842
4.278813
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2024-11-12T17:56: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": "cd771fad1...
972ab846-73f3-49c5-aa15-1e23016e8b89
sukiand/LeetCode-LintCode
Two Sum.cpp
/*Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Please note that your returned answers (both index1 and index2) are not zero-based. ...
ALGO
0.999899
5.223188
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-02-11T20:24:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6562df4509...
e129f51d-fe6d-496e-bcc3-f69f37c0e15f
Chinesezjc/Solved-Problems
Luogu/P3383.cpp
//This Code was made by Chinese_zjc_. #include <iostream> #include <fstream> #include <iomanip> #include <algorithm> #include <vector> #include <bitset> #include <cmath> #include <queue> #include <stack> #include <list> #include <string> #include <cstring> #include <cstdio> #include <cstdlib> #include <cctype> #include...
ALGO
0.999943
3.647914
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2020-12-29T10:37: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": "98cf406be...
a5620313-18f4-452d-ac75-a3393c64c871
Draxent/GameOfLife
graphical_version/src/barrier.cpp
/** * @file barrier.cpp * @brief Implementation of \see Barrier class. * @author <NAME> (draxent) * * Copyright 2015 <NAME> * https://github.com/Draxent/ConnectedComponents * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the Licens...
ALGO
0.97781
5.816482
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2015-11-17T11:29: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": "adb376601...
e0d13d80-6221-413c-90ec-013b55121f45
swadhwa5/Trie
Tree.inc
#include <iostream> #include <cstdlib> #include <string> #include "Tree.h" #include <sstream> // siblings and children must be unique, return true if added, false otherwise template <typename T>//template Tree<T>::Tree(T value): data(value), kids(nullptr),sibs(nullptr),prev(nullptr) {//constructor function ...
ALGO
0.938907
3.944883
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-05-15T04:10: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": "1e7efa197f...
747f05fb-aaee-49bb-8f69-92f28a5d13d9
qsrws/closer_sum_to_R_-_farthest_sum_from_R
Program.cpp
#include <iostream> #include <cmath> class Numbers { public: int ind_i; int ind_j; double res; double arg; Numbers Get_Numbers(int ind_i, int ind_j, double arg, double r) { this->ind_i = ind_i; this->ind_j = ind_j; this->res = abs(r - arg); this->arg = arg;...
ALGO
0.999927
3.784827
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-02-28T20:43: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": "51cdc0e7ff5d...
2fbf6fc0-5556-4fa4-8820-32cd7a663bae
MasteringOpenCV/code
Chapter9_FluidInteractionUsingKinect/FluidSolver.cpp
/***************************************************************************** * Ch9 of the book "Mastering OpenCV with Practical Computer Vision Projects" * Copyright Packt Publishing 2012. * http://www.packtpub.com/cool-projects-with-opencv/book * http://code.google.com/p/fluidwall/ **************************...
ALGO
0.998711
4.885619
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2012-12-09T02:48:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2756, "forks": 1643, "issues": 45, "pull_requests": 4 }, "file_meta": { "content_id": "441...
6f4deb2c-1191-4db5-a3de-6b8fd9dd553c
Yutong-Dai/codes-for-courses
cpp_CS225/mp/clean/07-mp_stories/Graph.h
#pragma once #include <list> #include <unordered_map> #include <string> #include <algorithm> #include <functional> #include "Edge.h" #include "Vertex.h" #include <iostream> template <class V = Vertex, class E = Edge> class Graph { typedef std::reference_wrapper<E> E_byRef; typedef std::reference_wrapper<V> V_by...
ALGO
0.995381
5.91609
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2018-09-04T01:39:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "768cff035...
b4e16d77-8959-41d5-9848-cbe14f020fac
a5834929/NTHU-Advanced_Programming
100062236_10248.cpp
#include<cstdio> #include<cstdlib> #include<cstring> #include<deque> using namespace std; int adj[10][10]; int out[10], in[10]; int num[10]; deque<int> Q; void initialize(){ Q.clear(); memset(adj, 0, sizeof(adj)); memset(out, 0, sizeof(out)); memset(in, 0, sizeof(in)); memset(num, -1, sizeof(num));...
ALGO
0.999894
3.258501
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-11-16T21:08: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": "aa079390f9...
f8d4c7f5-c622-4599-8c34-25cc93e124a5
WhiZTiM/coliru
Archive2/0f/10151f53ee32de/main.cpp
#include <cstdint> #include <iostream> #include <string> #include <vector> #include <utility> namespace rc4 { namespace detail { template<typename T> struct wrap { T x; wrap() = default; wrap(T const& x) : x{x} {} operator T&() { return x; } operator T const &() co...
ALGO
0.999006
4.995222
{ "github_metadata": { "branch": "master", "commit_count": 42630, "repo_created_at": "2016-04-21T16:34:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dae971...
06d66e65-29af-4126-8037-2c6e2e76b85c
samkitjain/CPlusPlus
linklist.cpp
#include<iostream> using namespace std; template <class T> struct ListNode{ // Init Constructor with initializer list ListNode():val(0),next(nullptr){} ListNode(T v):val(v),next(nullptr){} ListNode(T v, ListNode *n):val(v),next(n){} // Destructor // Members T val; ListNode<T> *next; ...
ALGO
0.998481
5.209272
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-08-24T22:12:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ffa2306fe16...
fd8be7d2-6ed8-4f16-9939-7238dfb12981
DavidLozano1/Ejercicios-TIC-2-ADavid
Ejercicios1-4DavidLozano.cpp
//<NAME> 2º Bach A #include<iostream> #include<cmath> using namespace std; void ej1(){ //Ejercicio 1: calcula la resta de dos numeros que introduzca el usuario. utiliza tres variables cout<<"\n----Ejercicio 1: ----"<<endl; int x, y, res; cout<<"\n------------------------------"<<endl; cout<<"Introduce el ...
TOOL
0.98129
3.073243
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-10-28T07:28:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b17cea39b35...
390b089d-237e-4b64-a66a-99bdbe30c8a0
frank0911C/Euclideon_Vault
3rdParty/udcore/Source/udIntersectionTest.cpp
/********************************************************/ /* AABB-triangle overlap test code */ /* by <NAME> */ /* Function: int triBoxOverlap(float boxcenter[3], */ /* float boxHalfSize[3],float triverts[3][3]); */ /* History: ...
ALGO
0.998659
6.606685
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-03-14T03:50:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6b8ee04240...
9a009b15-d331-43bb-9f97-8524548eaff7
em3ly/axon_training
Cracking Fenwick Tree to the root V1/Solutions/gmeligio/D/D.cpp
#include <bits/stdc++.h> using namespace std; void bit_update(int x, int y, int v, int n, vector<vector<int>> &bit) { for (int i = y; i <= n; i += (i & -i)) { for (int j = x; j <= n; j += (j & -j)) { bit[i][j] += v; } } } int bit_prefix(int x, int y, int n, vector<vector<int>> &bit) { int ans = 0...
ALGO
0.998944
4.634698
{ "github_metadata": { "branch": "master", "commit_count": 134, "repo_created_at": "2019-04-30T16:00:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "bb91f9e7...
0e6fe14c-f30b-46a6-b558-5cc67812d65b
Siddhant/revkit-2.0
src/reversible/functions/pattern_to_circuit.cpp
/* RevKit (www.revkit.org) * Copyright (C) 2009-2014 University of Bremen * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any late...
ALGO
0.992861
5.044977
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2014-10-23T17:38:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "544fb457b...
f23e1dc2-2a6c-4db3-863c-f4bb0d329c07
yutaokamoto/Atcoder
abc212/c/main.cpp
#include <bits/stdc++.h> #include<atcoder/all> using namespace atcoder; using namespace std; using ll = long long; #define rep(i, n) for(int i=0; i<(n); i++) int ans = 1000000001; int main(){ int n, m; cin >> n >> m; vector<int> a(n); for (int i = 0; i < n; i++) cin >> a[i]; vector<int> b(m); for (int i = 0; i ...
ALGO
0.999991
3.797047
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2020-06-28T07:02: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": "8bd36be78...
39149b69-5ec3-4dc8-9a46-8e6c820e253e
shashank0107/CompetitiveProgramming
Topcoder/SRM392-D1-1000.cpp
/* Author : manu_sy Idea : We are give an n-digit no. num and need to find smallest no. greater than num that is equidigit - Let d be the frequency of each digit in our answer - Notice d is a divisor of n and digits used : dcnt = n/d - Since the values of d for a particular n are very limited...
ALGO
0.999944
4.347463
{ "github_metadata": { "branch": "master", "commit_count": 289, "repo_created_at": "2019-08-13T06:18:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7852983...
36ad3600-a9fb-463b-b30c-8c587745a47b
manush2312/DSA
TRIE/Implementation/code.cpp
#include<iostream> using namespace std; class TrieNode { public: char data; TrieNode* children[26]; bool isTerminal; TrieNode(char ch){ // Constructor this->data = ch; for(int i=0 ; i<26; i++){ // during start all the child nodes must be NULL.. ...
ALGO
0.999571
4.211169
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-09-04T06:23: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": "c722d7983fdc...
5675560d-a86a-4264-a5e1-d18c779b36a4
kamingchan/Hajime
Sicily/Problems/1028.cpp
#include "iostream" #include "string" using namespace std; string numtostr (int num) { string result="00"; result[1] = num%10+48; num = num/10; result[0] = num+48; return result; } int main(int argc, char const *argv[]) { int t; cin >> t; for (int i = 1; i <= t; ++i) { int...
ALGO
0.999438
3.828083
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2015-04-27T10:31:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d157ced...
dd81dbbe-33f6-412a-89d5-6bd68ed14281
megamino81/coding_test
cpp/reserve_meetingroom.cpp
// 회의실 예약 // https://softeer.ai/practice/6266 #include <iostream> #include <vector> #include <string> #include <algorithm> #include <map> #include <iomanip> using namespace std; int main(int argc, char** argv) { int N, M; map<string,vector<int>> rooms; vector<string> room_names; cin >> N >> M; f...
ALGO
0.999649
4.44515
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2024-07-04T08:36:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "419e4749996...
10a75d0d-896c-4a14-a30b-8811e6b4aa76
nowek7/competitive-programming-solutions
LeetCode/medium/1347_minimum_number_of_steps_to_make_two_strings_anagram.cpp
#include <array> #include <cassert> #include <numeric> #include <string> int minSteps(std::string s, std::string t) { std::array<int, 26> frequency {0}; for (char c: t) { ++frequency[c - 'a']; } for (char c: s) { const int idx = c - 'a'; if (frequency[idx] > 0) { --frequency[idx]; } } ...
ALGO
0.999942
6.18798
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2023-09-10T09:58: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": "cd262d3c940...
b9a96c1c-5ba3-4d31-8dff-3ecf7d263cd3
zukun/rcc
vxl/vxl-1.13.0/core/vnl/vnl_hungarian_algorithm.cxx
#include "vnl_hungarian_algorithm.h" #include <vcl_vector.h> #include <vcl_limits.h> #include <vcl_algorithm.h> #include <vnl/vnl_matrix.h> #include <vcl_cassert.h> // set all the elements of v to false. static void clear_vector( vcl_vector<bool>& v ) { v.assign( v.size(), false ); } vcl_vector<unsigned> vnl_hunga...
ALGO
0.999911
5.548235
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2013-02-21T15:10:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 16, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "880012d...
86e96aee-98b2-42ec-a71b-6c6ca63e3e63
fpdjsns/Algorithm
leetcode/medium/34. Find First and Last Position of Element in Sorted Array.cpp
/** * problem : https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/ * timc complexity : O(logN) * algorithm : binary search */ class Solution { int binarySearch(vector<int>& nums, int target, bool isLeft) { int left = 0; int right = nums.size() - 1; ...
ALGO
0.999949
6.418242
{ "github_metadata": { "branch": "master", "commit_count": 766, "repo_created_at": "2018-03-20T14:36:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca5b3b2...
1bcae40a-c236-4abf-95d8-edbfb7c2194b
Guosheng-Ye/Divide
Ai-Aj=C.cpp
/************************************************************************* > File Name:Ai-Aj=C.cpp > Author: YeGuoSheng > Description: for n numbers and a interger c,how many i and j fulfil( Ai-Aj = C) > Created Time: 2019-04-01 20:00:41 ************************************************************************/ #...
ALGO
0.999937
3.904357
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-05-29T07:19:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91d06c39d2...
6506cf8b-45f2-4b72-a1e7-798f03193b10
ishandutta2007/codeforces-f
fsouza/normal/436/B.cpp
#include <iostream> #include <cstdio> #include <algorithm> #include <numeric> #include <climits> #include <sstream> #include <cstring> #include <cassert> #include <vector> #include <stack> #include <queue> #include <cmath> #include <map> #include <set> #define INF (INT_MAX/2) #define MAXN 2500 #define MAXM 2500 type...
ALGO
0.9998
3.518078
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "473be9adf736...
95b6fdb7-2f56-4095-a1b1-65cc4b365215
Md-Noman-Biswas/Codeforces_problems
C_Tiles_Comeback.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define nl "\n" void solve(){ ll n, k; cin >> n >> k; vector<ll> arr(n); for(int i=0; i<n; i++) cin >> arr[i]; bool flag = false; int cntL = 0; int cntF = 0; vector<ll> suffix(n, 0); suffix[n-1] = 1; for(int i=n-2...
ALGO
0.999891
4.785174
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-07-24T09:21:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac7116ebe5e...
55613faf-3129-49f3-8113-5bd60c5237ba
erwinvaneijk/bgl-python
src/minimum_degree_ordering.cpp
// Copyright 2005 The Trustees of Indiana University. // Use, modification and distribution is subject to the Boost Software // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Authors: <NAME> // <NAME> // <NAME> #include <boost/g...
ALGO
0.974978
6.346746
{ "github_metadata": { "branch": "master", "commit_count": 263, "repo_created_at": "2010-04-03T13:05:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "54a5af5...