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
c92a912a-04be-4e93-a734-197440f69469
gkastel/neurofitterMOEA
MOEAFitterInterface.h
/* * Revision of last commit: $Rev$ Author of last commit: $Author$ Date of last commit: $Date$ */ #ifndef NEUROFITTER_MOEAFITTERINTERFACE_H #define NEUROFITTER_MOEAFITTERINTERFACE_H #include "FitterResults.h" #include "FitterInterface.h" #include "ErrorValueCalculator.h" #include "FixedParamObject.h" #include "MOEA...
ALGO
0.998249
6.327345
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2013-03-27T12:32:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac346411ee...
c4b3c436-5136-4a1e-aa20-fdb407445b0c
QuqqU/Algorithm-DataStructure
CutEdge.cpp
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <map> #include <set> #include <stack> #include <tuple> #include <functional> #include <math.h> #include <string.h> #include <string> #include <bitset> #include <stdlib.h> #include <time.h> #define INF 999999999 #define INFLL 999999999...
ALGO
0.999922
3.621689
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2017-09-25T15:31:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a01837cc3...
0e6fc41a-13bf-4f9b-badd-d119a3ea4899
envoyproxy/envoy
source/extensions/filters/udp/udp_proxy/config.cc
#include "source/extensions/filters/udp/udp_proxy/config.h" #include "source/common/filter/config_discovery_impl.h" #include "source/common/formatter/substitution_format_string.h" namespace Envoy { namespace Extensions { namespace UdpFilters { namespace UdpProxy { using ConfigTypeCase = envoy::extensions::filter...
TOOL
0.955009
7.473569
{ "github_metadata": { "branch": "main", "commit_count": 24827, "repo_created_at": "2016-08-08T15:07:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26282, "forks": 5012, "issues": 1550, "pull_requests": 138 }, "file_meta": { "content_id"...
82ef3d1a-34c4-43e4-bfaf-a59198b59c9b
sasanka0212/DSA_Series
Queue/SumOfSubArray.cpp
// sum of minimum and maximum element of every subarray of size k #include<iostream> #include<queue> using namespace std; int solve(int *arr, int N, int K) { deque<int> maxi(K); deque<int> mini(K); for(int i = 0; i<K; i++) { while(!maxi.empty() && arr[maxi.back()] <= arr[i]) maxi.pop_ba...
ALGO
0.999969
5.103441
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2023-10-08T05:26: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": "e2889402be...
7b447242-d0d8-488f-a9ab-e89a75b07bd7
Sumanth-NR/CompetitiveProgramming
Platforms/CodeForces/Rounds_0751-0800/Round786_Div3/E_Breaking_the_Wall.cpp
#include <bits/stdc++.h> using namespace std; /** * 1 1 -> 1 * 2 3 - 1 1 -> 2 * 3 4 -> 2 2 -> 0 1 -> 3 * */ int treat(int a, int b) { if (a > b) swap(a, b); if (a + a <= b) return (b+1)/2; // 2a > b int res = b - a; a -= res; // Now a = b res += 2*(a/3) + a%3; return res; } void so...
ALGO
0.999989
3.796845
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2022-04-18T13:29:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df78db15...
d20c471d-5b31-47c6-8bde-20638b7189cf
ahmedelissawi/banker-s_algorithm
Banker's algorithm.cpp
#include<iostream> #include<vector> #include<string> using namespace std; int no_of_processes, no_of_resources; string* names_of_processes, * names_of_resources; // the allocated matrix //for 2d dynamic array int** allocated; // the maximum matrix int** Max; //the available vector int* available; //the work ...
ALGO
0.998565
3.447163
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-04-21T00:04: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": "b9541fb070...
9ae859e4-9d37-4291-80e0-34977b872cf6
augustocarrera/circular-doubly-linked-list
LinkedList.cpp
#include "LinkedList.h" #include <iostream> LinkedList* Create() { LinkedList* list = new LinkedList; list->count = 0; list->head = nullptr; list->tail = nullptr; return list; } void Destroy(LinkedList* list) { Clear(list); delete list; list = nullptr; } void Insert(LinkedList* list, int data, std::string ...
TOOL
0.951266
4.270378
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-06-07T21:39:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8da07e90ac15...
a208a40f-20bb-426c-a6b5-1b891944155a
Yefri97/Competitive-Programming
Training/UVa/CP3/Mathematics/Number Theory/11752 - The Super Powers.cpp
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ll; const ll MXN = -1; const int nsieve = 70000; int main() { int sieve[nsieve + 10]; memset(sieve, 1, sizeof sieve); for (int i = 2; i * i < nsieve; i++) if (sieve[i]) for (int j = i * i; j < nsieve; j += i) sieve[j] = 0; int isPow[n...
ALGO
0.999774
4.11123
{ "github_metadata": { "branch": "master", "commit_count": 378, "repo_created_at": "2016-06-01T01:51:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7085ddb9...
80e26d9f-5b6b-4816-8450-413ac238b202
sirupsen/informatics
usaco/1-2/milk2/milk22.cpp
/* ID: sirup1 PROG: milk2 LANG: C++ */ #include <cstdlib> #include <cstdio> #include <vector> #include <algorithm> using namespace std; struct range { int start; int end; }; bool range_cmp(const range &a, const range &b) { return a.start < b.start; } int main() { FILE * inputFile; inputFile = fopen("milk2....
ALGO
0.999587
3.355724
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2012-04-22T09:34:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c666fd5db...
4ec9e83e-d695-405c-8720-a3e4ee79ac41
keijak/comp-pub
atcoder/typical90/077/review_077.cpp
#include <bits/stdc++.h> #define REP_(i, a_, b_, a, b, ...) for (int i = (a), END_##i = (b); i < END_##i; ++i) #define REP(i, ...) REP_(i, __VA_ARGS__, __VA_ARGS__, 0, __VA_ARGS__) #define ALL(x) std::begin(x), std::end(x) using Int = long long; using Uint = unsigned long long; using Real = long double; template<typen...
ALGO
0.999971
4.311012
{ "github_metadata": { "branch": "master", "commit_count": 2362, "repo_created_at": "2020-04-12T08: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": "a4d2c2c...
0f3e8c10-d38c-41ce-85f8-7b6ce0605055
yogada508/NYCU-Network-Programming
project2/src/np_single_proc.cpp
#include <sys/socket.h> #include <sys/wait.h> #include <sys/stat.h> #include <sys/types.h> #include <fcntl.h> #include <arpa/inet.h> #include <netdb.h> #include <iostream> #include <stdlib.h> #include <vector> #include <string> #include <string.h> #include <unistd.h> #include <cstring> #include <iterator> #include <sst...
WEB
0.911916
3.612281
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-06-07T16:10: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": "ab2ceba780...
834f53e2-3583-4ee6-beda-c8bb0b1edb8e
kt0415/Data-Structures
Dynamic Programming/frog-jump.cpp
#include <bits/stdc++.h> using namespace std; //momoization approach // int solve(int ind, vector<int>&heights, vector<int>&dp) // { // if(ind == 0) return 0; // if(dp[ind]!=(-1)) return dp[ind]; // int left = solve(ind-1,dp,heights) + abs(heights[ind] - heights[ind-1]); // int right = INT_MAX; ...
ALGO
0.99998
4.589987
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-10-27T16:39: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": "9a252ccce676...
cc001ba0-bd6c-4643-ac78-139fcb6bf656
xangusx/DS_summer_2023
assignment5/Hamilton Path.cpp
#include <bits/stdc++.h> using namespace std; vector<int> topo; bool topological_sort(int n, vector<vector<int>>& adj, vector<int> indegree){ queue<int> q; for(int i=1; i<=n; i++){ if(indegree[i] == 0){ q.emplace(i); topo.emplace_back(i); } } if(topo.size() > 1) ...
ALGO
0.999985
5.526453
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-08-06T10:57: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": "9d21a0c89a55...
36ee6ab9-a312-4a73-aaa5-653c7d65be82
notbhuvangab/Competitive-Programming
CodeForces/690/1.cpp
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define fr first #define sc second #define MOD 1000000007 #define len(x) x.size() #define min3(a, b, c) min(a, min(b, c)) #define max3(a, b, c) max(a, max(b, c)) #define all(v) v.begin(), v.end() #define alla(a, n) a, a + n #define fastAsFk_boi() ios_...
ALGO
0.999866
3.741648
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2020-04-29T13:25:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f4487d032...
d82a63ff-2296-465f-abd7-157a4fa2235a
Lakshmithra/CPP-Programming
STL/sets.cpp
// Program to demonstrate about sets in STL and its member functions #include <iostream> #include <set> using namespace std; int main(){ // Syntax :- set <type> setname; set <char> letters = {'L','P','N','A','C','L'}; //The .empty() function returns 1 (true) if the set is empty and 0 (false) cout<...
ALGO
0.985204
5.909992
{ "github_metadata": { "branch": "main", "commit_count": 126, "repo_created_at": "2025-06-28T14:04: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": "32fd87f5aa...
696fda58-3117-44cb-892a-9d19e62bbe36
sdehaarte/WCA-SumOfRanks
src/main.cpp
#include "sum_of_ranks.h" #include <iostream> #include <string> #include <vector> #include <chrono> #include <limits> using namespace SumOfRanks; void displayTopN(const std::vector<Cuber>& cuber, int n) { for (int i = 0; i < std::min(n, (int)cuber.size()); ++i) { std::cout << i + 1 << ". " << cuber[i].wca...
ALGO
0.999136
5.456761
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2025-04-17T18:06: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": "7c3feb16017...
16f4f575-b008-4263-803a-d1fa989feaef
sergey162/Oc-Mai
labs/lab3/parent.cpp
#include <sys/mman.h> #include <sys/stat.h> #include <fcntl.h> #include <iostream> #include <cstring> #include <sys/wait.h> static inline constexpr size_t kBufferSize = 1024u; int main() { int fd1 = shm_open("/shared_memory", O_CREAT | O_RDWR, 0666); if (fd1 == -1) { std::cerr << "Error open shared memory" <...
TOOL
0.964425
3.979802
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2024-09-22T07:55: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": "e309ee175fa...
633c286e-73d2-43d3-ba12-6b1fa1026154
KurumiSerori/testPhoneInfo
generatePhoneSoftwareInfo.cpp
/* * randomly generates valid phone info tuples * generate and then test * * Kurumi * 2017/12/15 */ #include <iostream> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <memory.h> #include <time.h> #include <ctype.h> // use <random> to replace the current logic in the future to support more d...
TOOL
0.971197
3.273671
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2017-12-15T05:29: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": "e6f62f46b...
c56ab22e-71c4-48cf-9814-ce68112e842a
pibuxd/competitive-programming
Algorithms/Mathematics/incl_excl_principle.cpp
// inclusion-exclusion principle // https://cses.fi/problemset/task/2185 // an example of a task on this technique #include <bits/stdc++.h> using namespace std; #define int long long int n, k, ans; vector<int> kv; void foo(int sum, int siz, int ki){ if(ki > k || sum > n/kv[ki]) return; int SUM = sum * kv[ki]; ...
ALGO
0.999955
3.737197
{ "github_metadata": { "branch": "master", "commit_count": 409, "repo_created_at": "2021-01-06T21:36:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "002affdc...
9a9ae445-71f3-414a-b0db-207bb80bcbc8
EduardoOrsi/Cbasics
media_de_provas_vetores.cpp
/* Em uma turma com 50 alunos, cada um faz 3 provas por semestre. Além de armazenar as 3 provas dos 50 alunos, existe a necessidade de mostrar: -> A média de cada prova; -> A média de cada aluno; -> A média da turma; */ #include <stdio.h> #include <stdlib.h> #include <locale.h> int main(void){ setlocale(LC_ALL, "Por...
ALGO
0.998232
4.084721
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-05-01T03:04: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": "d4d403d0cbc5...
770a2284-4f4c-4671-93ac-9a67cd235ab0
AIChoubeyX/C-
sortonesandzeros.cpp
#include <iostream> #include <vector> using namespace std; void sort01(vector<int>& arr) { int n = arr.size(); int count0 = 0; // Count the number of 0s for (int i = 0; i < n; i++) { if (arr[i] == 0) { count0++; } } // Fill the array with 0s and 1s for ...
ALGO
0.999967
5.085617
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-02-17T14:43: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": "8bbc42b7f181...
fe0d9167-9091-4aa3-8b50-a0bb411dbb80
rakesh-chinta/Big4_Interview_Preparation
linked_list_problems/listPallindrome.cpp
/** * Given a linkedList, determine the data it has are in pallindrome * a->b->c->c->b->a * r->a->d->a->r */ #include <iostream> struct Node { char data; Node * next; Node( char c ) : data{ c }, next{ nullptr } { } }; void insert( Node * & head, char c ) { Node * newNode = new Node(c); if ( head == ...
ALGO
0.997166
6.031538
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-06-25T18:07:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c619f61f07...
d6ea1149-1f67-4cc6-bf03-076dc42092a4
Basharabum/os
CacheTest/CacheTest.cpp
#include "stdafx.h" #include "CacheRecord.h" #include "SetOfCacheRecord.h" #define DEBUG 1 //запись результатов работы в файл result.txt или result2.txt #define SAVE_CODE_TO_FILE 1 //сохранить сгенерированную последовательность видов кода в файл codegenerator.txt #define LOAD_CODE_FROM_FILE 0 //загрузит...
ALGO
0.971907
3.417892
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2016-11-23T05:11:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "42346d1db...
aa02918e-fb0c-4585-8bd5-566266c64b91
MoppelDerDegu/warping
Solver.cpp
#include "Solver.h" #include "WarpingMath.h" #include "MeshManager.h" void Solver::calculateEdgeLengthRatios(Mesh &originalMesh, Mesh &deformedMesh, vector<pair<Edge, float>> &edgeLengthRatios) { edgeLengthRatios.clear(); for (unsigned int i = 0; i < deformedMesh.edges.size(); i++) { pair<Edge, float> p; p.fir...
ALGO
0.999782
4.74971
{ "github_metadata": { "branch": "master", "commit_count": 126, "repo_created_at": "2013-04-05T09:03: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": "13baca0d...
b8c67312-4a9e-48f6-8368-2bec8c997ebe
yejun614/algorithm-solve
problems/baekjoon/p2178.cpp
/* * (221229) 미로 탐색 * https://www.acmicpc.net/problem/2178 * * [풀이] * 미로를 탈출하기 위한 최소의 이동거리를 구하는 문제이다. * 문제에서 입력되는 미로의 크기가 가로, 세로 100을 넘지 않기 때문에 * 시간 복잡도가 O(100^2)으로 계산된다. 따라서 완전탐색 하더라도 시간 초가 되지 않는다. * 때문에 너비우선탐색(BFS)를 사용하여 해결 가능하며 탐색도중 목적지에 처음 도달하는 * 경로가 최단거리가 된다. * * BFS 구현 방법은 아래 코드를 참고 * * [실수] * (+) 처...
ALGO
0.999959
4.116921
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2021-07-03T07:38:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69ace0866ab...
4f697f5d-129b-4ccb-be2a-586c0565bf46
ishandutta2007/codeforces-x
xellos/normal/1500/B.cpp
// iostream is too mainstream #include <cstdio> // bitch please #include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <queue> #include <stack> #include <list> #include <chrono> #include <random> #include <cstdlib> #include <cmath> #include <ctime> #include <cstring> #include ...
ALGO
0.999996
3.672118
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:38: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": "f0eae3fa5dc0...
8300c19d-80ea-4756-a00d-eb5432aef32e
MySuperSoul/pat-advanced
1126.cpp
#include <bits/stdc++.h> #include <cstdio> using namespace std; #define maxn 505 int n, m; int graph[maxn][maxn]; int degrees[maxn]; int visit[maxn]; void dfs(int position){ visit[position] = 1; for (int i = 1; i <= n; i++){ if (visit[i] == 0 && graph[position][i] == 1) dfs(i); } } bool valid()...
ALGO
0.999948
4.341471
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-09-23T15:48:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f394fd8a1a...
8ddb1ce0-4ce3-4ac0-83f5-f8c2fe8c6c8f
firewood/topcoder
marathon/mm_81/CirclesSeparation.h
#pragma once #include <cmath> #include <set> #include <vector> using namespace std; typedef pair<double, int> DI; typedef vector<int> IntVec; typedef vector<double> DblVec; typedef vector<DI> DIVec; typedef set<int> IntSet; #define INF 1.0e+12 #define EPS 1.0e-9 #define CENTER 0.5 #define PITCH 0.1 #define GRIDS 5...
ALGO
0.999923
4.719161
{ "github_metadata": { "branch": "master", "commit_count": 4451, "repo_created_at": "2011-04-18T02:33:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1dca2...
08a0dab9-aaf1-4db6-8cba-bc539aa96b3f
andreihaivas6/OOP-Labs
S4/Sortare/main/Sort.cpp
#include "Sort.h" #define _CRT_SECURE_NO_WARNINGS #include <time.h> #include <stdio.h> #include <stdlib.h> #include <stdarg.h> // va_arg #include <string.h> void Sort::insereaza(int x) { nod* p = new nod; p->info = x; p->urm = NULL; if (this->prim == NULL) this->prim = this->ultim = p; else { this->ultim->...
ALGO
0.99799
4.619882
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-03-13T23:02: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": "d2900cf2bdb9...
55611ffb-5114-4ac8-80c2-db436e559f86
ishandutta2007/codeforces-y
yuu/normal/827/D.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i, j, k) for(int i=(j); i<=(k); i++) #define FFOR(i, j, k) for(int i=(j); i<(k); i++) #define DFOR(i, j, k) for(int i=(j); i>=(k); i--) #define bug(x) cerr<<#x<<" = "<<(x)<<'\n' #define pb push_back #define mp make_pair #define setbit(s, i) (s|=(1LL<<(i))) #defi...
ALGO
0.999961
3.877062
{ "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": "6e0e489964c8...
92a21c9d-5e43-4a12-8911-e26c6d1a3ccf
ShazidMashrafi/Codeforces
Codes/1097 B - Petr and a Combination Lock/1097B.cpp
#include <bits/stdc++.h> using namespace std; #ifdef ONLINE_JUDGE #define dbg(...) #else #include <debug.h> #endif #define ll long long #define endl '\n' #define ff first #define ss second #define pb push_back #define sz(x) (int)(x).size() #define all(x) x.begin(), x.end() #define Dpos(n) fixed << setpre...
ALGO
0.999821
3.815704
{ "github_metadata": { "branch": "master", "commit_count": 596, "repo_created_at": "2023-06-07T18:01:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 75, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1039ae...
39bc7f8b-90fe-4f84-b7fd-3ad744d76be1
AerialSpy4/DMOJSolutions
lkp18c1p4_funinforag.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define endl "\n" int32_t main() { cin.sync_with_stdio(0); cin.tie(0); int n, m; cin >> n >> m; unordered_map<int, vector<tuple<int, int, int>>> adj; for (int i=0; i<m; i++) { int a, b, c; cin >> a >> b >> ...
ALGO
0.999968
4.234933
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-06-16T22:12: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": "c8193ed0e9f6...
8e4dbd03-a903-4f73-9c7f-295ce7a14724
Kewth/OJStudy
lg3810.cpp
#if 0 2019.05.02 三维偏序,sort 做掉第一维,cdq 分治做掉第二维,权值树状数组做掉第三维。 由于比较是 <= 相等的要合并,相等的元素看作整体记个数量一起算贡献。 #endif #include <bits/stdc++.h> struct Fuck { int a, b, c, times, ans; Fuck(): times(1), ans(0) { } bool operator == (Fuck &an) { return a == an.a and b == an.b and c == an.c; } }; const int maxn = 100050, maxm = 20005...
ALGO
0.999987
4.325753
{ "github_metadata": { "branch": "master", "commit_count": 779, "repo_created_at": "2019-02-26T09:28:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e2e60b1...
91dc195f-9671-4629-8d33-fdb03aecbdc4
AaronNGray/prop-cc
include/AD/automata/treemat.h
////////////////////////////////////////////////////////////////////////////// // NOTICE: // // ADLib, Prop and their related set of tools and documentation are in the // public domain. The author(s) of this software reserve no copyrights on // the source code and any code generated using the tools. You are encourag...
ALGO
0.966333
6.751198
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2011-07-01T17:29:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 6, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "e65daca8...
5cc7acec-bcf6-496d-a1bf-f89cc5d63727
JasmitKaur/Programming-practice
general problems/DP/dp_number_of_paths.cpp
#include "math.h" #include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <climits> #include <deque> #include <queue> #include <stack> #include <bitset> #include <cstdio> #include <limits> #include <vector> #include <cstdlib> #include <fstream> #include <numeric> #include <sstream> #inc...
ALGO
0.9999
4.41101
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2015-09-13T23:35: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": "6dd2985a6...
c6824e9e-55c5-4f68-b8a1-d957a602a2a0
szryldrm/BasicBankCppConsoleApp
queue.h
// // Created by <NAME> on 10.11.2016. // #ifndef BANKASSİGENT_QUEUE_H #define BANKASSİGENT_QUEUE_H #include <iostream> #include <string> #define MAX 100 using namespace std; template <class T> class queue{ private: T arr[MAX]; int front,back,count; public: queue();// Constructor void enqueue (T valu...
TOOL
0.906863
3.561177
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-02-24T21:26: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": "950aec497f...
aa13d57d-c49b-4ae6-b5a2-5fd235953a8c
lukefi/metsi-simlib-cpp
metsi-simlib/include/metsi-simlib/event_graph.hpp
#ifndef EVENT_GRAPH_HPP #define EVENT_GRAPH_HPP #include <functional> #include <vector> #include <set> #include <memory> #include "core_types.hpp" /** * A node in the directed graph of simulation events. Holds a simulation event function (T=>T). Holds a * list of follow-up nodes. This structure describes a full, co...
ALGO
0.997883
7.686519
{ "github_metadata": { "branch": "main", "commit_count": 144, "repo_created_at": "2023-01-30T09:11:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "0b7e8c5289d...
dca1c771-94af-494f-87e4-de2ef76174f7
phuc16102001/competitive-programming
ICPC/ICPC-CENTRAL-2022/sol/D.cpp
#include <bits/stdc++.h> using namespace std; int a[100005]; struct Vertex { Vertex *l, *r; int sum; Vertex(int val) : l(nullptr), r(nullptr), sum(val) {} Vertex(Vertex* l, Vertex* r) : l(l), r(r), sum(0) { if (l) sum += l->sum; if (r) sum += r->sum; } }; Vertex* build(int tl, i...
ALGO
0.999984
5.269924
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2020-11-06T06:59:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66aa87565...
bfe1e8f6-44f3-45db-b0a5-0e54f71b671c
mariamm786/DSA-problems
Binary.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; class Solution { public: string addBinary(string s1, string s2) { int i = s1.size() - 1, j = s2.size() - 1, carry = 0; string str = ""; while (i >= 0 || j >= 0 || carry) { int sum = carry; if (i >= 0) sum += ...
ALGO
0.999973
6.476249
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2024-12-03T13:18: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": "a162cf259f4...
af19ac5a-0237-4e7e-81ba-dcd54dbdd230
GeodeStudios/Advent-Of-Code-2023
Day1/main.cpp
#include <iostream> #include <string> #include <fstream> #include <vector> #include <sstream> using namespace std; int getFirstAndlast(string str) { auto len = str.length(); string numInStr; char temp = '\0'; for (char ch : str) { if (isdigit(ch) != 0) { if (numInStr.empty()) numInStr += ch; else ...
ALGO
0.99299
3.933841
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-11-28T13:39:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8be66062a9f...
167e590d-5498-455e-8ead-e858f8a83b0f
JunheeLee7/Programers.CP
[프로그래머스 C++] 외계행성의 나이.cpp
◈ 문제 설명 링크 https://school.programmers.co.kr/learn/courses/30/lessons/120834 ◈ 작성 코드 #include <string> #include <vector> using namespace std; string solution(int age) { string answer = ""; vector<string> finds = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s",...
ALGO
0.99833
3.889391
{ "github_metadata": { "branch": "main", "commit_count": 276, "repo_created_at": "2023-12-29T06:31: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": "dfadbc2e80...
a0c2dbf2-fdaa-4b4f-807a-52a7199cd7a5
gwdueck/cirkit
src/classical/utils/aig_dfs.cpp
/* CirKit: A circuit toolkit * Copyright (C) 2009-2015 University of Bremen * Copyright (C) 2015-2017 EPFL * * 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, in...
ALGO
0.998319
6.836854
{ "github_metadata": { "branch": "master", "commit_count": 2383, "repo_created_at": "2017-07-25T17:10:48.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "msoeken/cirkit", "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id...
57d162b0-ad36-469b-a918-220f7f6ff97f
eliet24/LeetCode
LeetCode/108_ConvertSortedArrayToBinarySearchTree.cpp
#include <iostream> #include <cstdlib> #include <unordered_map> #include <vector> #include <queue> #include <algorithm> #include <cmath> #include <unordered_set> using namespace std; typedef struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {...
ALGO
0.999991
6.140915
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-01-11T21:03: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": "eb75307645f2...
52aaeba9-0087-41ac-8092-071ba7d6015c
murfreesboro/cppints
test_deriv/nai.cpp
#include "libgen.h" #include "angmomlist.h" #include "shellprop.h" #include "functions.h" #include "derivinfor.h" #include "ov.h" #include "norm.h" #include "nai.h" using namespace shellprop; using namespace functions; using namespace derivinfor; using namespace norm; using namespace ov; using namespace nai; #ifdef OR...
ALGO
0.997861
3.12531
{ "github_metadata": { "branch": "master", "commit_count": 181, "repo_created_at": "2014-08-19T21:47:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a054d0e4...
0f495372-0ef8-4c99-a8c1-41323f193da8
kousuketk/atcoder_practice
202107/10th~19th/13_パ研合宿_C_カラオケ.cpp
#include <bits/stdc++.h> using namespace std; #include <algorithm> #define rep(i,n) for (int i = 0; i < (n); ++i) using ll = long long; using P = pair<int,int>; using T = tuple<int,int,int>; using Graph = vector<vector<int>>; const int INF = 1001001001; void printVec(vector<int> &vec) { for (auto itr = vec.begin(); i...
ALGO
0.999981
4.308361
{ "github_metadata": { "branch": "main", "commit_count": 406, "repo_created_at": "2021-04-19T14:33: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": "7d4ed6d6c0...
4f8a892a-e3c3-45a8-84df-c2c072c3a878
nvtaveras/Codeforces-Solutions
Codeforces Round #218 (Div. 2)/C.cpp
#include <iostream> #include <string> #include <vector> #include <cstdlib> #include <map> #include <set> #include <algorithm> #include <cstring> #include <queue> #include <stack> #include <sstream> #include <cstdio> #include <ctime> #include <cctype> using namespace std; #define mp make_pair typedef long long llong; t...
ALGO
0.999344
3.603379
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-06-08T01:18: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": "2a19257677...
8aac9a47-f6c3-4ad3-b61e-17c0543daa57
huyluongme/CSES_ProblemSet_Solution
Introductory_Problems/Chessboard_and_Queens.cpp
#include <bits/stdc++.h> using namespace std; vector<bool> left_diagonal(30, false); vector<bool> right_diagonal(30, false); vector<bool> placed_col(30, false); vector<vector<bool>> placed(8, vector<bool>(8)); char chessboard[8][8]; int res = 0; void solve(int cur_col){ if(cur_col == 8){ ++res; re...
ALGO
0.999281
4.508496
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2022-10-30T16:52:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "446cc8ed78...
60dde46b-c080-451b-91ed-a9a56073765c
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p03439/s391613899.cpp
#include <bits/stdc++.h> #define rep(i,n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int,int>; int main() { int n; scanf("%d", &n); int l = 0, r = n; printf("%d\n", l); fflush(stdout); string sl; cin >> sl; while (sl != "Vacant") { int m = (l + r) / 2; ...
ALGO
0.999587
3.339767
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-06-06T16:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "1fd00d55a2...
60b1c618-5599-4186-ae2c-dd5395f80d92
SZSilence06/Simplified_Bounding_Volume
src/alg/External/kifmm3d/common/vecmatop.hpp
/*! \file */ /* Kernel Independent Fast Multipole Method Copyright (C) 2004 <NAME>, New York University 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 2, or (at your option) any la...
ALGO
0.995112
5.817176
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2017-02-24T10:29:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04242adc...
f9b7525b-1ea2-48f3-98da-b3b8ec0221aa
Fantazer01/task
Map/PriorityQueue/PriorityQueue.cpp
// // Created by oleg on 08.11.2021. // #include <exception> #include <iostream> #include "PriorityQueue.h" PriorityQueue::PriorityQueue(const int &_size, const std::pair<int, int> *_array): array_size(_size), heap_size(_size), array(new std::pair<int, int>[_size]) { for (int i = 0; i < heap_size; ++i) { ...
ALGO
0.999767
4.305488
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2021-11-08T04:56: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": "00f65e90bb0...
377ff491-9f36-4627-986c-f19297aaa17c
MahmudulArif/Object-Oriented-Programming
Code/lab3/excercise1.cpp
#include<iostream> using namespace std; class Batsman{ private: string batsman_name[10]; int Batsman_ID; public: static int number_Count; Batsman(){ number_Count++; } static int getCount(){ cout << "\nFinally number of objects: " << number_Count << endl; } void getName(i...
TOOL
0.903111
4.251789
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-02-06T13:56: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": "2196ecc18876...
7feb9769-30dd-4a33-9c60-01a26398ae75
assemhossam99/Problem-Solving
Codeforces Accepted Solutions/1506E- Restoring the Permutation.cpp
#include <bits/stdc++.h> #define Assem99 ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define ll long long #define ld long double #define endl '\n' #define sz(a) (int)(a).size() #define File freopen("string.in","r",stdin); freopen("string.out","w",stdout); int dx[] = { 0, -1, 0, 1, -1, 1, -1, 1 }; int dy[] = { ...
ALGO
0.999982
3.658921
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2021-01-09T00:21:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1216999e2b8...
7f199130-f907-47a3-a154-2831b734e716
Wadiya003/Leetcode_Practice
743-network-delay-time/743-network-delay-time.cpp
class Solution { public: int networkDelayTime(vector<vector<int>>& times, int n, int k) { vector<pair<int,int>> adj[n+1]; //make adjacency list for(int i=0;i<times.size();i++) adj[times[i][0]].push_back(make_pair(times[i][2],times[i][1])); //distance calculate for s...
ALGO
0.999992
5.688867
{ "github_metadata": { "branch": "main", "commit_count": 1286, "repo_created_at": "2022-01-22T09:55: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": "8684b1e43...
477da5b2-0d7b-417e-aace-76f50206334b
aki-hsk/competitive_programming
atcoder/ABC/2021/220-/227/d.cpp
#include <bits/stdc++.h> #include<atcoder/all> using namespace std; using namespace atcoder; #define rep(i, n) for(int i = 0; i < (n); ++i) #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() using ll = long long; using mint = modint1000000007; const long long INF = 1LL << 60; const int SINF = 1LL <<...
ALGO
0.999991
4.180209
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2022-03-22T12:47: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": "1032b5d16...
555fcde3-872f-4bd7-b737-4e1abead50eb
tensonohikari/.happy-coooding
AlgoKit (3rdp)/Code-store v1.0/code-jam/cpp/algorithms/math/BigNum.cpp
# include <stdio.h> # include <string.h> //typedef __int64 Big; typedef long long Big; # define MAXLEN 300 void rev(char s[]) { int len=strlen(s),t; for(int i=0,j=len-1;i<j;i++,j--){ t=s[i]; s[i]=s[j]; s[j]=t; } } class BigNum{ int len; char n[MAXLEN+1]; public: BigNum(); BigNum(int val);...
ALGO
0.999357
3.165672
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2018-10-14T21:04:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d69a67931...
5fb5be41-9413-4294-ae48-eac46e88f304
thechris3069/3rd-Semester
Informatik_2/file.cpp
/* * Einfache Implementierung eines Quicksort * Vorlesungsbeispiel Informatik 2 * <NAME> */ #include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int>::size_type teile(vector<int> &feld, vector<int>::size_type links, vector<int>::size_type rechts) { vector<int>::size_type p = ...
ALGO
0.999964
5.303196
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2019-10-01T13:21: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": "66c60ff54...
f20fcaef-8018-4948-b9cd-ed45fd60b24d
archibate/co_async
3rd/bearssl/include/bearssl/impl/hash/md5.hpp
#ifndef BEARSSL_IMPL_HASH_MD5_HPP #define BEARSSL_IMPL_HASH_MD5_HPP /* * 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, incl...
ALGO
0.987151
7.221136
{ "github_metadata": { "branch": "master", "commit_count": 269, "repo_created_at": "2024-03-20T19:45:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 250, "forks": 16, "issues": 9, "pull_requests": 1 }, "file_meta": { "content_id": "37f41...
9640b065-6e17-40e5-97ed-332b42d9862c
juandiegocastano/Competitiva
RPC/RPC07/D.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin>>n; while(n--) { int t, s; cin>>t>>s; long long actual, siguiente; cin >> siguiente; long long ans=0; if(t!=1) { for (int i = 1; i < s; i++) { actual=siguiente; ...
ALGO
0.999579
3.199391
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-10-06T15:35: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": "f5d456ee2e...
6d0b21c8-ba54-4d93-8db4-68a55b3ddf47
iamvaijanath/111
srtfAlgo.cpp
#include <iostream> #include <vector> #include <algorithm> #include <iomanip> #include <climits> using namespace std; struct Process { int id; int arrivalTime; int burstTime; int remainingTime; int waitingTime; int turnaroundTime; }; void getProcesses(vector<Process>& processes) { int n;...
ALGO
0.99998
5.759723
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-22T08:59: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": "77cbf5d23309...
c0b0dc65-2f01-410a-839f-c6fe926fe20d
arundeegutla/Programming-Team
Practices/2024/varsity/ucftemplate/3/f.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int MAXN = 5e5 + 5; ll n, q; string s; int num; int d_c, d_r; ll res; bool rows[MAXN] = {false}; bool cols[MAXN] = {false}; bool inBounds(int x) { return (0 < x && x <= n); } void query() { int i = num; if (s[0] == 'R') { ...
ALGO
0.998866
4.883939
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2023-04-09T01:50: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": "b79d1b61de5...
5ea09a28-e743-43da-a8b5-f4adc40bdd95
AravindVasudev/cpp-testbed
leetcode/3sum.cc
// https://leetcode.com/problems/3sum/ class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { // Sort the vector. std::sort(nums.begin(), nums.end()); vector<vector<int>> result {}; int N = nums.size(); for (int i = 0; i < N && nums[i] <= 0; i++) { ...
ALGO
0.999871
6.717932
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2017-06-21T21:21: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": "0e4314719...
0507d544-99fc-43aa-87d3-907b12e8f4f2
alhajri/FUDGE
Merced/Src/Watt.cpp
/* * ******** merced: calculate the transfer matrix ********* * $Revision: 1 $ * $Date: 2006-02-01 19:06:56 -0800 (Wed, 01 Feb 2006) $ * $Author: hedstrom $ * $Id: Watt.cpp 1 2006-02-02 03:06:56Z hedstrom $ * ******** merced: calculate the transfer matrix ********* * * # <<BEGIN-copyright>> Copyright (c) 201...
ALGO
0.999682
5.521077
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-12-22T19:48: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": "ceb7dbb337...
07d8bd83-0c8a-45ca-99ab-477073992ac2
fieryheart/PAT
Advanced Level/1056.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int mice[1010] = {0}; vector<int> prem, match; vector<int> rrank[1010]; int np, ng, index = 0; bool cmp(int q, int p) { return mice[q] > mice[p]; } int main() { int i, j; cin >> np >> ng; for(i = 0; i < np; i++) scanf("%d", &mice[i]);...
ALGO
0.999988
3.195882
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2018-03-25T14:16: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": "f8f2ef863...
beed4e5b-2af2-45d9-b989-24b0bb3d94ed
RustgaarAhmad/Test
task10pd.cpp
#include <iostream> using namespace std; main() { cout << "Number 1: "; int number1; cin >> number1; cout << "Number 2: "; int number2; cin >> number2; cout << "Number 3: "; int number3; cin >> number3; cout << "Number 4: "; int number4; cin >> number4; cout << "N...
ALGO
0.997074
3.092732
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-09-14T11:18:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da67e0cf29f8...
54acf569-1c63-4877-8c53-33e053ad0fb6
frederic-perez/Lungs-bounding-boxer
src/main.cpp
#include <iostream> #include <limits> #include <string> #include "aux-raw-compiler-warnings-off++begin.hpp" // clang-format off #include <itkBinaryImageToShapeLabelMapFilter.h> #include <itkBinaryThresholdImageFilter.h> #include <itkConnectedComponentImageFilter.h> #include <itkConnectedThresholdImageFilter.h>...
DATA
0.937859
5.87869
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2016-02-02T17:06: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": "3b016b87a...
aa20cf41-3fd8-4607-bb3b-03e4158f4350
zzethh/DSA-Practice
bit manipulation/single-number-iii.cpp
class Solution { public: vector<int> singleNumber(vector<int>& nums) { int sum = 0; for (int i = 0; i < nums.size(); i++) { sum = sum ^ nums[i]; } int cnt = 0; while (sum != 0) { int x = sum & 1; if (x) break; sum = sum >> 1; ...
ALGO
0.999993
5.223262
{ "github_metadata": { "branch": "master", "commit_count": 579, "repo_created_at": "2022-08-25T09:05:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "362bffca...
f8a794ee-c74c-45de-af4b-940470b1c893
pixarninja/shortest_path_algorithm
source/pop_reverse.cpp
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <limits.h> #include <float.h> #include <ctype.h> #include <unistd.h> #include <new> #define NUM_FILES 4 struct point_t { double x; double y; double theta; double curvature; double tao; double tao_distance; int index; }; st...
ALGO
0.999001
3.563894
{ "github_metadata": { "branch": "master", "commit_count": 183, "repo_created_at": "2016-10-07T19:03:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "704c2d88...
112d5af3-e380-4a89-904a-b64719fc6293
Hyrum-Coleman/MIT-OCW-C-Work
c-console-app/HW4_min.h
#pragma once #include <iostream> #include <vector> template <typename T> T min_template(T val1, T val2) { if (val1 == val2) { std::cout << "The values are equal to each other... " << "Returning the first input" << std::endl; return val1; } if (val1 < val2) { return val1; ...
TOOL
0.991205
5.381268
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2023-02-17T19:03: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": "cdb65104305...
96364bc9-bb1f-4fe1-945f-864cfcb70c55
gaolichen/contest
topcoder/136_2/250/250.cpp
//program framework generated with WishingBone's parser :)- //common header #include <iostream> #include <vector> #include <string> #include <deque> #include <map> #include <set> #include <list> #include <algorithm> #include <utility> #include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> using names...
TOOL
0.92669
3.157671
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-04-06T06:11:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cbf5827120...
13c30b4f-0ee8-4f8f-ad1b-0b46f32fa0c2
elbica/algorithm
boj/2021/21_01_06_1700.cpp
#include<bits/stdc++.h> using namespace std; vector<int> input; bool check[101]; int n, k, answer; int func(int idx){ //아이디어 : 꽂아진 플러그 중, //1. 앞으로 나오지 않거나 2. 가장 늦게 사용하는 플러그를 찾는다. //처음에 앞으로의 사용 횟수가 적은 플러그로 생각해 헤맸다. vector<int> temp(k+1); int ret = 0, temp1 = 0; for(int i=idx; i<input.size();i+...
ALGO
0.999943
4.049837
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2020-11-05T16:38: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": "07229b9ccb...
af6e8b44-674d-4bc5-8311-ffc3df4d5b17
CWYH/Leetcode_Group
DP/P0300_Longest_Increasing_Subsequence/main.cpp
/** * 300. Longest Increasing Subsequence -- Medium */ #include <iostream> #include <vector> #include <algorithm> using namespace std; class Solution { public: int lengthOfLIS(vector<int>& nums) { const int N = nums.size(); if (N <= 0) return 0; if (N == 1) return 1; vector<int...
ALGO
0.999986
5.910289
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2019-12-04T04:25: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": "e555a3055...
2c857a27-4da0-45e5-bc63-5cca69b897bd
jkvishu/DSA-Practice-GFG
Easy/Unique rows in boolean matrix/unique-rows-in-boolean-matrix.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; #define MAX 1000 vector<vector<int>> uniqueRow(int M[MAX][MAX],int row,int col); // } Driver Code Ends class Solution { public: // #define MAX 1000 vector<vector<int>> uniqueRow(int M[MAX][MAX],int row,int col) { //Your code ...
ALGO
0.998992
4.577114
{ "github_metadata": { "branch": "main", "commit_count": 2654, "repo_created_at": "2022-12-31T18:42:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f6f49155...
29629b2b-fb71-4ce2-b14b-345c46a617e7
tiankonguse/ACM
contest/poj/vol_14/2332.cc
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> #include <cmath> #include <string> #include <sstream> #include <vector> #include <queue> #include <set> #include <map> #include <ctime> #define inf 0x3f3f3f3f #define Inf 0x3FFFFFFFFFFFFFFFLL #define rep(i, n) for (int i =...
ALGO
0.999977
3.111868
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2013-03-25T04:04:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 69, "forks": 40, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "350091...
e0de835e-0ddb-4739-9ba7-384d8ddba58c
lucianovr/competitive-programming
URI/1550.cpp
#include <algorithm> #include <cstring> #include <iostream> #include <queue> #include <string.h> #include <utility> #include <vector> using namespace std; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ii> vii; #define rep(i, n) for (int i = 0; i < (n); i = i + 1) #define tr(it, S) for (typeof(S.be...
ALGO
0.999931
3.719198
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-05-28T00:31:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ec5c9e27b...
a3e06e02-a49a-4a43-8df2-b4687ea0902f
mixtlan1957/CS162
Lab1/Lab1/Lab1/readMatrix.cpp
/********************************************************************* ** Program name: Lab1 (Matrix Determinant Calculator) ** Author: <NAME> ** Date: 09/27/2017 ** Description: This file contains the function readMatrix which is a part of the Matrix Determinant Program. ** This function asks the user to enter the val...
TOOL
0.922849
4.411892
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2017-09-03T04:18: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": "eef965156...
18e191ce-fff3-4c4a-bcb2-e1f5b62c0809
hhk0571/leetCode
q763_partition-labels.cpp
#include<bits/stdc++.h> using namespace std; using Interval = vector<int>; using Intervals = vector<Interval>; class Solution { public: vector<int> partitionLabels(string s) { Intervals intervals{}; for (size_t i = 0; i < s.size(); i++) { auto pos = s.find_last_of(s[i]); //...
ALGO
0.999764
5.378568
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-11-19T01:05:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a1e6bbd0...
8453e0cc-c207-4364-98ef-6e17a7cff07e
WhiZTiM/coliru
Archive2/95/3047c77f3495b2/main.cpp
#include <iostream> #include <string> #include <algorithm> #include <ctype.h> using namespace std; bool task1(const string& first, const string& second) { if (first.size() != second.size()) return false; size_t pos = first.find(*second.begin()); if (pos == string::npos) return false; size_t len = firs...
ALGO
0.999605
3.230014
{ "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": "e1fa9f...
f05f071b-733e-4961-ab85-0dc74be03953
SuperTikuwa/dip
week7/dip07/dip07a.cpp
//(OpenCV4) g++ -std=c++11 dip07a.cpp `pkg-config --cflags --libs opencv4` //(OpenCV3) g++ dip07a.cpp `pkg-config --cflags --libs opencv` #include <iostream> //入出力関連ヘッダ #include <opencv2/opencv.hpp> //OpenCV関連ヘッダ int main(int argc, char *argv[]) { //①ビデオキャプチャの初期化 cv::VideoCapture capture("walking.mov"); ...
TOOL
0.958389
4.112949
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-07-04T09:46:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3e3204a4c2a...
77de38ca-ed74-48b4-bfb3-2eeed2a2f91d
juhsinto/ProjectClover
Iris/include/Recognizer/Recognizer.h
#ifndef RECOGNIZER_H #define RECOGNIZER_H #include "opencv2/opencv.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "unistd.h" // To check for file on disk #include <sys/stat.h> // Exception classes #include "Exceptions/Generic/FilePathInvalidException.h" #include "Exceptio...
ALGO
0.91377
6.311318
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2014-04-03T19:43:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95e41cb22a...
5e2e07bc-a7a7-40a8-87c5-bc242106d5fe
ZoonAttack/UniversityProjects
TwitterAccounts/Algorithmss.cpp
#include <iostream> #include <fstream> #include <sstream> #include <unordered_map> #include <vector> #include <queue> using namespace std; class User { public: int id; int followers; User() : id(0), followers(0) {}; User(int i) : id(i), followers(0) {}; // To sort in top followers order bool operator<(const User&...
DATA
0.99875
5.506184
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-02-26T18:47: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": "34868ed157c1...
fca51043-f604-4a67-832c-cfef2265e655
aditimahabole/Programming-Languages
HASH/HARD_HASH/MAX_COLLINEAR_POINTS.cpp
//PROBLEM STATEMENT : // https://www.geeksforgeeks.org/count-maximum-points-on-same-line/ //UNORDERED_MAP FOR PAIR CONCEPT //https://www.geeksforgeeks.org/unordered_map-insert-in-c-stl/ #include <iostream> #include <bits/stdc++.h> using namespace std; /////////////////HASH_PAIR CLASS//////////////////////// class ha...
ALGO
0.999908
4.79333
{ "github_metadata": { "branch": "master", "commit_count": 492, "repo_created_at": "2021-10-09T08:17:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d22fd8e5...
ed94d456-8ad8-4f41-9124-fa9f5d78db84
Meh494/Coding-solutions
CCC '18 S2 - Sunflowers.cpp
//Thoughts: Logic + 2-D array useage //Meh494 #include <bits/stdc++.h> using namespace std; char alpha[26] = {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'}; int main() { cin.sync_with_stdio(0); cin.tie(0); int n; cin>...
ALGO
0.999986
3.754533
{ "github_metadata": { "branch": "main", "commit_count": 126, "repo_created_at": "2022-08-06T16:05:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94f1fe3714...
347b1233-8c1a-451c-a938-9063069607c4
bvntoo/3305-Data-Structures
Lab12/main.cpp
#include <string> #include "bst.h" using namespace std; int rnd() { return rand() % 10000; } int main() { binary_search_tree<string> bst; cout << bst << endl; bst.insert("baker"); cout << bst << endl; // making sure the output operator was working properly. bst.get_root()->set_left(new bi...
TEST
0.993715
4.264298
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-09-02T02:18: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": "3ecfc1df95...
e4be7a57-9cf3-486b-b6cd-92ac5ce1f397
ishandutta2007/codeforces-s
sirrembocodina/normal/1704/C.cpp
#pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; #include <bits/stdc++.h> using namespace std; #define int int64_t #define forn(i, n) for (int i = 0; i < (int)(n); i++) struct my_hash { inlin...
ALGO
0.99996
4.260933
{ "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": "70b342e9e1e7...
56a369e6-4524-413d-a3b5-1804f4a9d23b
ishandutta2007/codeforces-m
mango_lassi/normal/1439/D.cpp
#include "bits/stdc++.h" #define rep(i, a, n) for (auto i = a; i <= (n); ++i) #define revrep(i, a, n) for (auto i = n; i >= (a); --i) #define all(a) a.begin(), a.end() #define sz(a) (int)(a).size() template<class T> inline bool chmax(T &a, T b) { if(a < b) { a = b; return 1; } return 0; } template<class T> inline bool ...
ALGO
0.999943
4.298844
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03: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": "f69f8517662d...
c3a5dd15-4493-425e-b4c2-db4b40c25ad8
iamslash/learntocode
algospot/JOSEPHUS/a.cpp
// Copyright (C) 2016 by iamslash // https://algospot.com/judge/problem/read/JOSEPHUS #include <cstdio> #include <vector> #include <queue> int N, K; void PrintVInt(const std::vector<int>& v) { for (int i = 0; i < v.size(); ++i) { printf("%d ", v[i]); } printf("\n"); } std::vector<int> Solve() { std::vec...
ALGO
0.999968
4.426837
{ "github_metadata": { "branch": "master", "commit_count": 2102, "repo_created_at": "2020-11-23T21:43:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1fd30aa...
a0785e87-70d8-4eaf-a82a-2fda5fd65a06
aravindvenu7/MicronProject
micron_code/branch3d.cpp
// Copyright (c) 2017 <NAME> <<EMAIL>> #include "branch3d.h" #include <cmath> // #include <opencv2/imgproc.hpp> // #include "src/3d_reconstruction/3d_visualization.h" cv::Mat LeftPos = (cv::Mat_<double>(4, 3) << -0.001214151033252 ,0.019751914026335, 0.000000279242639, 0.017568309880265, 0.003261235549883, 0.000000...
ALGO
0.991332
4.301291
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-04-20T06:40:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0227668bfbaa...
092445e3-a721-490e-98dd-1d9bffd84f56
ENAMINE1/CP-JOURNEY
QUESTIONS/PRACTICE/GRAPHS/TOPO using DFS.cpp
// Date: 05-06-2024 // Start Time: 22:13:29 // End Time : 22:21:18 // Time Taken: 7 minutes // Author: <NAME> // QUESTION LINK: Algozenith // Rating: Easy // Description: Topological sorting using dfs // Solved: Yes // Learning: if length of topo array is not equal to number of nodes then there is a cycle in the graph...
ALGO
0.999993
5.05455
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2024-05-27T11:19: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": "ac2664530e...
312e0504-4ae6-415c-b031-f911e5599175
SaiVamshiK/revised-ds
Recursion & Backtracking/Recursion/Return Keypad Combinations.cpp
Given an integer n, using phone keypad find out all the possible strings that can be made using digits of input n. Return empty string for numbers 0 and 1. Note : 1. The order of strings are not important. 2. Input and output has already been managed for you. You just have to populate the output array and return the co...
ALGO
0.999482
4.919833
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-03-20T15:43: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": "5d7f88d427...
739eed2c-a010-44f4-9071-6322b5b60464
ishandutta2007/codeforces-f
farhod_farmon/normal/997/A.cpp
#include <bits/stdc++.h> #define fi first #define se second #define fin(s) freopen( s, "r", stdin ); #define fout(s) freopen( s, "w", stdout ); const long long N = 100100; const long long Q = 2e18; const long long mod = 998244353; const long long MAGIC = 30; using namespace std; int n; long long x, y; void solve()...
ALGO
0.999411
3.858214
{ "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": "3dbe0477b9a4...
85693c4c-779b-4684-be2c-9d5bb3ceeabf
Rtk100/DIAS-Summer-Internship
C++/D-BranesNis4/Simulate_D0_branes.cpp
#include <iostream> #include <random> #include <ctime> #include <cmath> #include <fstream> #include "eigen/Eigen/Dense" #include <iomanip> int start = std::time(nullptr); const int N = 4; const int iterations = 2e6; const long double dt = 1e-4; const int perturb_iterations = 1e4; const int record = 1000; typedef std...
ALGO
0.999922
3.961287
{ "github_metadata": { "branch": "main", "commit_count": 74, "repo_created_at": "2023-06-07T11:07: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": "472a3c5465d...
16e74988-3337-4df6-ad3b-025f873ec261
edouarda/brigand
include/brigand/algorithms/transform.hpp
/*! @file @copyright <NAME> and <NAME> 2015-2017 (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ #ifndef BOOST_BRIGAND_ALGORITHMS_TRANSFORM_HPP #define BOOST_BRIGAND_ALGORITHMS_TRANSFORM_HPP #include <brigand/functions/lambda/apply.hpp> #include <brigand/sequences/back.hpp> #include ...
ALGO
0.985486
7.617726
{ "github_metadata": { "branch": "master", "commit_count": 429, "repo_created_at": "2015-05-31T16:35:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 572, "forks": 48, "issues": 16, "pull_requests": 0 }, "file_meta": { "content_id": "83dd...
0e47c8bf-b75e-4ab7-9f2d-d6ea72663086
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/01/0117/personal_submission/cf1725f_lyxxys.cpp
void solve(){ int n; cin >> n; vector <int> ls(n), rs(n); for (int i = 0; i < n; ++ i){ cin >> ls[i] >> rs[i]; } auto call = [&](int k)->int{ int len = 1 << k; int all = 0; vector <array<int,2>> difs = {{0,0}}; for (int i = 0; i < n; ++ i){ in...
ALGO
0.999739
4.329701
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "0e85...
854c9504-d63e-4b5a-8e3d-19dac8c9abb8
offamitkumar/LeetCode
Problems/5. Longest Palindromic Substring.cpp
class Solution { int get (int &l , int &r, string &s) { while (l>=0 && r<s.size() && s[l] == s[r]) { l--; r++; } return r-l-1; } public: string longestPalindrome(string s) { if (s.size() <=1) {return s; } const int &n =s.size(); int...
ALGO
0.999956
5.825648
{ "github_metadata": { "branch": "master", "commit_count": 758, "repo_created_at": "2020-04-29T11:36:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6463f257...
0ae19799-2baf-4b61-b805-e519a444ec83
Rhythm-Jain-42/LeetCode
0010-regular-expression-matching/0010-regular-expression-matching.cpp
class Solution { public: bool helper(string str, string pat, int i, int j, vector<vector<int>> &dp){ if(i >= str.size() && j >= pat.size()){ return true; } if(j >= pat.size()){ return false; } if(dp[i][j] != -1){ ...
ALGO
0.999928
5.369934
{ "github_metadata": { "branch": "main", "commit_count": 1134, "repo_created_at": "2023-06-02T15:35:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "797d1c40f...
dfb6e226-0079-4040-97e8-0243bc5cfee8
ASC8384/MyCode
OIandACM/OJ/HDU/1016.cpp
#include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> using namespace std; int n; int a[23]; bool is[23]; bool isp(int x) { if(x <= 3) return true; if(x % 2 == 0) return false; int t = sqrt(x); for(int i = 3; i <= t; i += 2) if(x % i == 0) return false; return true; } void dfs(int ...
ALGO
0.999818
4.025634
{ "github_metadata": { "branch": "master", "commit_count": 442, "repo_created_at": "2017-07-20T06:47:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3defc0e...
f984cb06-b576-4149-9e22-a8754a6dbeb5
Vaibank1/DSAndAlgo
DSAndAlgo/HackerRank Problems/WorldCodeSpring/FactorialArray.cpp
#include<iostream> #include<vector> using namespace std; #define ULL unsigned long long #define MAX 100001*2 ULL modM = pow(10, 9); unsigned long long nfactmod(unsigned long long n, unsigned long long m) { unsigned long long i, f; for (i = 1, f = 1; i <= n; i++) { f *= i; if (f > m) { f %= m; } } return ...
ALGO
0.999879
4.55617
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2017-09-26T17:57:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "20585a68d...
4369ec96-6bb9-40fd-bef7-4c545f6549a4
Cplo/leetcode
leetcode010/Regular Expression Matching.cpp
#include<iostream> using namespace std; #include<string.h> #include<vector> /* '.' Matches any single character. 任意1个字符 '*' Matches zero or more of the preceding element. 0到多个字符 The matching should cover the entire input string (not partial). The function prototype should be: bool isMatch(const char *s, const ch...
ALGO
0.999677
3.657974
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2015-05-12T09:11: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": "a9b18f6ba...
9a3536eb-906f-4cf4-963a-43c92903aded
SundeepChand/DSA-Practice
Leetcode/Topicwise/Graphs/motherVertex.cpp
// https://www.geeksforgeeks.org/find-a-mother-vertex-in-a-graph/ #include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define FF first #define SS second #define endl "\n" typedef long long ll; typedef unsigned long long ull; #define int ll void dfs(vector<vector<int>> &adj, int src, vector<bool> &v...
ALGO
0.999918
4.903422
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2021-09-02T19:00:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec2e62bd584...
eb8e781e-328c-4cbd-9d82-b459eba18884
amiradridi/Job-Resume-Matching
venv/Lib/site-packages/torch/include/ATen/ops/searchsorted.h
#pragma once // @generated by torchgen/gen.py from Function.h #include <ATen/Context.h> #include <ATen/DeviceGuard.h> #include <ATen/TensorUtils.h> #include <ATen/TracerMode.h> #include <ATen/core/Generator.h> #include <ATen/core/Reduction.h> #include <ATen/core/Tensor.h> #include <c10/core/Scalar.h> #include <c10/co...
ALGO
0.962878
6.427892
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2022-08-05T15:27:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 122, "forks": 34, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "56c748...