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
c072149f-768a-4795-99c0-e119c89d9e4c
alluminized/ac
BOJ/10001 - 20000/11442.cpp
#include <iostream> #include <vector> #define ll long long #define vv vector<vector<ll>> using namespace std; // 행렬 곱셈 // 연산자 오버로딩은 더 배워야 할 듯 vv operator*(const vv &a, const vv &b) { int s = a.size(); vv res(s, vector<ll>(s)); for (int i = 0; i < s; i++) { for (int j = 0; j < s; j++) { for (int k = 0;...
ALGO
0.99997
4.259571
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2024-11-22T05:00:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d019650d4f...
356eeb43-edcb-4ad4-bff5-638d8128defa
Anjana-sankar-k/OOP_S1
oops.cpp
#include <iostream> using namespace std; class Courses { //creation of class public: int student_id; //attributes of class string student_name; string subject; int marks[3]; int calculateAverage() { //a method to calculate average int sum = 0; for (int i = 0; i < 3; i++) { ...
TOOL
0.915213
3.928765
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-15T10:00: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": "04b4acc94d80...
cb8d9f36-d67e-4d8a-a1b4-cc16d761e6ec
manu05X/ProgramFiles
InterviewBit/Backtracking/Subsets.cpp
//https://leetcode.com/problems/subsets-ii/ // 90. Subsets II example: given [2,1,2] 1. sort the given vector and get [1,2,2] 2. sss=[[]], with section=1, ending=1, j=0 3. copy [] and add '1', get sss=[[],[1]], with section=2, ending=2, j=0 4. copy [],[1,2] and add '2's, get sss=[[],[1],[2],[1,2]], with section=...
ALGO
0.999337
6.160919
{ "github_metadata": { "branch": "master", "commit_count": 178, "repo_created_at": "2019-10-04T05:46: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": "ae8de325...
26ca1405-2081-491d-bb62-3067e679c36c
CGJiaxiLiu/MyPortfolio
UE4_Project/Physics_In_UE4/ChronoPhysicsDemo/Plugins/ChronoPhysics/Source/ChronoPhysics/Include/chrono/fea/ChMatrixCorotation.h
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of t...
ALGO
0.994983
7.174799
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2019-09-23T19:42:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a9e86d8b...
205965d5-518d-452d-84e3-1ea25c9e0406
ishandutta2007/codeforces-l
loghorizon/normal/1621/A.cpp
// Skyqwq #include <bits/stdc++.h> #define pb push_back #define fi first #define se second #define mp make_pair using namespace std; typedef pair<int, int> PII; typedef long long LL; template <typename T> bool chkMax(T &x, T y) { return (y > x) ? x = y, 1 : 0; } template <typename T> bool chkMin(T &x, T y) { return...
ALGO
0.99926
3.5615
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17: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": "f364516d772d...
83e04253-295c-4c5d-b428-c0e895aca11f
Tunghohin/Competitive_Coding
Luogu/p3225.cpp
#include <iostream> #include <cstring> #include <vector> using namespace std; typedef unsigned long long ULL; const int N = 1010, M = 1010; struct edge { int to, next; }e[M]; int head[N], tot = 0; void add_edge(int from, int to) { e[++tot].to = to; e[tot].next = head[from]; head[from] = tot; } int root; int d...
ALGO
0.999817
4.156184
{ "github_metadata": { "branch": "master", "commit_count": 367, "repo_created_at": "2021-08-05T14:13:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e8a6cd0...
efd0f928-f5a0-4d8c-a80a-8f6118647551
ishandutta2007/codeforces-k
kdvinit/normal/1535/E.cpp
/* <NAME> |,,| */ #include<bits/stdc++.h> using namespace std; #define int long long const int N = 3e5+1; const int H = 20; int a[N], c[N]; int par[N][H]; void solve() { int q; cin>>q>>a[0]>>c[0]; for(int j=0; j<H; j++) par[0][j]=-1; int typ; for(int i=1; i<=q; i++) { cin>>typ; ...
ALGO
0.999707
3.782158
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06: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": "e012d8d1fa26...
ef1ff3dc-9bc8-45d8-ad9e-5a026552d155
Ashirog1/CompetitiveProgramming
Contest/usaco/platspleepingcow.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int mod = 1e9 + 7, maxn = 3005; void add(int & x, int y) { x += y; if (x >= mod) x -= mod; if (x < 0) x += mod; } int f[2][maxn][2]; /// available cow to match all previous cow is match vector<pair<int, int>> events; int N, a[maxn], ...
ALGO
0.999978
4.401885
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-09-23T10:49:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "bedbf2c36a...
952f3bf5-0213-4836-84e2-f8733e77a174
qgiraux/WebServ
config/ConfigServer.hpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ConfigServer.hpp :+: :+: :+: ...
WEB
0.948587
5.92894
{ "github_metadata": { "branch": "main", "commit_count": 259, "repo_created_at": "2024-08-27T09:00:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "3c002decc2...
652e48e2-ac84-4330-84b2-ad7bbdefa1bb
rohitash-chandra/NeuralNetworksCourse_CTDS
week7/code/G3-PCX/RandomNumber.cpp
/* * individual.cpp * * Created on: 13/08/2009 * Author: rohit */ #include<stdio.h> #include<math.h> #include<stdlib.h> #include<ctype.h> using namespace::std; #include "RandomNumber.h" //--------------------------------------------------- double RandomNumber::noise(double mu ,double sigma) /* normal no...
ALGO
0.994725
4.00914
{ "github_metadata": { "branch": "master", "commit_count": 120, "repo_created_at": "2017-06-09T06:09:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "936474e1...
88af5be2-6cca-409e-97cd-4c27277d7cd0
taegun1011/problem-solving-cpp
repos/gold/7569.cpp
#define _CRT_SECURE_NO_WARNINGS #include <bits/stdc++.h> using namespace std; #define FASTIO ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0) //dir : 축, 행, 열 //위, 아래, 왼쪽, 오른쪽, 앞, 뒤 short dir[6][3] = { 0,0,-1,0,0,1,0,-1,0,0,1,0,1,0,0,-1,0,0 }; short graph[101][101][101]; int day[101][101][101]; int main() {...
ALGO
0.999729
3.587975
{ "github_metadata": { "branch": "master", "commit_count": 119, "repo_created_at": "2024-01-15T23:25:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "be194c09...
635ab9cb-7ba9-4302-bf53-770066a03d1b
Sunghee2/Algorithm
백준_알고리즘/2174_로봇_시뮬레이션.cpp
#include <iostream> #include <vector> #define MAX 102 using namespace std; typedef struct { int x, y, dir; } Robot; char DIR, ORDER; int A, B, N, M, NUM, LOOP; int dx[] = { 1, 0, -1, 0 }; int dy[] = { 0, -1, 0, 1 }; int map[MAX][MAX]; int get_dir(char dir) { if(dir == 'E') return 0; else if(dir == 'W') r...
ALGO
0.999983
4.037026
{ "github_metadata": { "branch": "master", "commit_count": 196, "repo_created_at": "2019-01-17T07:00:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "336cb3a1...
f9c30432-e73e-4650-aad2-9723d18b868e
Kyalivia/algo-study
boj/10448.cpp
#include <bits/stdc++.h> using namespace std; // Tn의 최대 값: 1000이라고 가정 // n의 범위: 1~45 vector<int> t_list; int check_sum(int num) { int sum = 0; for (int p = 0; p < 45; p++) { sum = 0; for (int q = 0; q < 45; q++) { for (int r = 0; r < 45; r++) { ...
ALGO
0.999703
4.348144
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2025-06-02T11:45: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": "2f842180139...
4c875b78-6fbf-4f8c-968a-bb0ca5a276e0
laituan245/spoj-solution
classical/DICT.cpp
// DICT - Search in the dictionary! // http://www.spoj.com/problems/DICT/ // laituanksa245 #include <string> #include <iostream> using namespace std; int totalNbFound; struct trieNode { string dataStr; bool isLeafNode; trieNode * children[27]; }; trieNode * newInternalNode () { trieNode * tempPtr = new trie...
ALGO
0.999872
4.195982
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2015-08-12T08:53:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 17, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ec6033...
41113d08-1cc0-4062-a1d1-e3c5702434ef
BaiJiazm/DS-Algorithm
Nowcoder/Fundmental Practice/Course List for Student.cpp
#include <cstdio> #include <cstring> #include <vector> #include <algorithm> using namespace std; const int maxx = 26 * 26 * 26 * 10 + 1; int hashName(const char *name) { return (name[0] - 'A') * 26 * 26 * 10\ + (name[1] - 'A') * 26 * 10\ + (name[2] - 'A') * 10\ + (name[3] - '0'); } vector<int> course...
ALGO
0.99945
3.339696
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2018-03-10T05:28:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f50cf0fb...
1cc4b7bd-a861-4b7d-8010-5f83a42dd136
IEEE-SB-VIT-Pune/CodeZest22_Div1_Solutions
1_Marathon.cpp
/* CodeZest22 Div-1 Question 1 - Marathon Problem Statement- <NAME> and Chachi decided to run. Chacha said the following: "I will run at Y meters a second for X seconds and take a rest for Z seconds." Chachi said the following: "I will run at L meters a second for K seconds and take a rest for M seconds." When S s...
ALGO
0.999952
3.863559
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-09-30T19:12:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31053e4a8efa1...
025b01cc-fdc0-4e77-967b-569d299818d6
PS-Yang/University
3 Algorithm/hw4/hw4.cpp
#include <windows.h> #include <time.h> #include <math.h> #include <string> #include <iostream> #include <iomanip> using namespace std; int stack[1000000], stack_size; int stack_d[1000000]; string str_stack[1000000];//未走到存著的節點 int output[1000000],output_size; //輸出節點 int output_d[1000000]; string str_outp...
ALGO
0.999974
3.461734
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2018-12-28T07: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": "d151379ec...
6183bcec-f748-484f-90cb-cbdb64ffafe7
cypress777/oj
hiho/hiho_o95_p4_1.cpp
#include <iostream> #include <vector> #include <queue> #include <algorithm> using namespace std; int N, maxn; vector<int> bst; vector<int> sorted_bst; vector<int> res; queue<vector<int>> que; int main() { cin >> N; bst = vector<int>(N, 0); maxn = 0; for (int i = 0; i < N; i++) { cin >> bst[...
ALGO
0.999995
4.332448
{ "github_metadata": { "branch": "master", "commit_count": 449, "repo_created_at": "2018-08-15T14:16: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": "14a5b51f...
db7f50f9-56a8-4a3d-80b7-9d9a7f3f6106
Anuj3412/DS-Algo
Data Structure and Algorithms/11 Linked_List/02_tail_insertion.cpp
#include <bits/stdc++.h> using namespace std; class node { public: int data; node *next; node(int data) { this->data = data; this->next = NULL; } }; void insert(int data, node *&tail) { node *temp = new node(data); tail->next = temp; //current node is attached to the new ...
ALGO
0.999162
4.296483
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2023-07-27T15:48: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": "45946b9de09...
1c86447a-c022-4ce7-bc08-99e60e8cdc80
Ayushi0405/DSA_Practice
Array/Int2Arr.cpp
#include <bits/stdc++.h> using namespace std; // vector<int> FindArrInt(vector<int> &A, int n, vector<int> &B, int m) { // vector<int> ans; // vector<int> vis(m, 0); // Corrected to use vector instead of C-style array // for (int i = 0; i < n; i++) { // for (int j = 0; j < m; j++) { // ...
ALGO
0.999948
5.807489
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-02-14T16:16:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d089144759...
c51cd72b-7a8e-4139-889c-1b992244376b
PRABHUDEESHWARAN/dsa-preparations
arrays/hard/longSubarr_SumZero.cpp
#include<bits/stdc++.h> using namespace std; /* Longest Subarray with Sum zero: -> for this problem we can use the prefix sum method using a map. -> if the current prefix sum is equal to zero we update length variable. -> if not then, we check if there is prev subb array possible with sum zero with curr ele...
ALGO
0.999974
5.197539
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-08-17T05:12: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": "1ce139c2b46...
7bafca10-9301-4522-b613-c797d20b38bb
psktam/Algorithms
graphs/graphs/main.cpp
#include <algorithm> #include <iostream> #include <vector> #include <string> #include <limits> #include "graphs.hpp" #include "dijkstra.hpp" using namespace std; void graph_problem(){ cout << "What filename to load> "; string graph_filename; cin >> graph_filename; cout << "Loading graph...\n"; G...
ALGO
0.984205
4.555264
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2017-03-11T04:20:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "761a73681a...
78bd566f-088d-4a9f-b2b4-96a3855c6d6e
WenqiJiang/SC-ANN-FPGA
FPGA_with_network/CPU_programs/anns_client_non_blocking.cpp
// Client side C/C++ program to demonstrate Socket programming #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <sys/socket.h> #include <arpa/inet.h> #include <unistd.h> #include <string.h> #include <unistd.h> #include <time.h> #include <pthread.h> #include <algorithm> #include <iostream> #in...
WEB
0.901203
4.39866
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2023-03-09T18:08:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5e422f2...
665dfb51-6ed0-4583-8891-4c6cf00315e3
mjdeschenepoole/Animation-BVH
SimulationStep.cpp
// SimulationStep.cpp // This will update the world (i.e. the objects) // Note that this is *separate* from the // Render() function.... #include "global.h" #include "globalAngleAdjust.h" // Bullet time... #include <sstream> // For changing the window title text... void UpdateObject( std::vector<CObject>::iterato...
ALGO
0.944455
3.989426
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-08-06T01:01: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": "43ee9441aff1...
4eefbf49-f444-418a-a6a6-efb6d2058d89
27augain/Code
364577I/364577I.cpp
#include<bits/stdc++.h> using namespace std; #pragma GCC optimize("Ofast","unroll-loops") #define FOR(i, a, b) for(int i=(a), _b=(b); i<_b; ++i) #define fi first #define se second #define pb push_back #define int long long #define all(a) a.begin(),a.end() typedef pair<int, int> pii; const int N = 9 + 1e6; const int INF...
ALGO
0.999992
3.600148
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-11-03T13:58: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": "b3cbe08d4b2...
8ff68df7-9131-42be-9465-675867614158
nonrice/compprog
library/testing/BIT_test.cpp
// https://cses.fi/problemset/task/1648 #include <bits/stdc++.h> using namespace std; // // Binary Indexed Tree // // BIT: Construct binary indexed tree for array of size n in O(n). // // sum 1: Compute sum on range [1, r] in O(log(r)). // // sum 2: Compute sum from on range [l, r] in O(log(r)). // // inc: Increment ...
ALGO
0.999277
5.530843
{ "github_metadata": { "branch": "main", "commit_count": 241, "repo_created_at": "2022-03-20T16:23:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cae68e8517...
b43d452c-93c4-4c39-a90e-73d0ec7a955d
Elrandom37/Vectores
Vectores figura.cpp
#include <iostream> using namespace std; const int MAX_VERTICES = 100; const int MAX_CARAS = 100; struct Vertice { float x, y, z; }; struct Cara { int indices[MAX_VERTICES]; int numVertices; }; Vertice vertices[MAX_VERTICES]; Cara caras[MAX_CARAS]; int numVertices = 0, numCaras = 0; void registrarVerti...
TOOL
0.941776
4.493289
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-03-31T13:41: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": "065a521bf17d...
2cd90fff-4432-458c-b44a-cbb0f8df83dc
sshpark/codeForACM
hdu/6186.cpp
#include <iostream> #include <algorithm> #include <string.h> #include <stdio.h> using namespace std; #define ll long long const int maxn = 100005; int sum[maxn], sum1[maxn], sum2[maxn], rsum[maxn], rsum1[maxn], rsum2[maxn]; int main(int argc, char const *argv[]) { int n, q, x; while (cin >> n >> q) { me...
ALGO
0.999905
3.945109
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2017-06-20T13:01: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": "b6aa4322e...
0c085667-23f3-4022-89a2-18eba5997949
Vanshika35/-CrackYourPlacement
day2/MajorityElement.cpp
class Solution { public: int majorityElement(vector<int>& nums) { // int n = nums.size(); // for(int i = 0; i < nums.size(); i++){ // int count = 0; // for(int j = 0; j < nums.size(); j++){ // if(nums[i] == nums[j]){ // count++; // ...
ALGO
0.999973
5.60129
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2024-07-15T14:05:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3bff0a6ba30...
60e62783-484a-49f0-8399-6c195700ff9e
this-1s-sparta/data_structures
data_structures/main.cpp
#include <fstream> #include <iostream> #include <sstream> #include <string> #include <cstdlib> #include <cassert> #include <chrono> #include "minheap.h" #include "maxheap.h" #include "avltree.h" #include "graph.h" #include "hashtable.h" using namespace std; typedef std::chrono::high_resolution_clock::time_point ...
ALGO
0.981109
3.614594
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-07-28T01:55: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": "aaf38b8054fa...
f738374d-92cd-42d5-a364-3973aba33f8d
Ladgelson/codes
contests/SELETIVA2/H.cpp
#include <bits/stdc++.h> using namespace std; #define MAXN 550 #define f first #define s second #define pb push_back #define ins insert #define er erase #define lsb(x) ((x) & (-x)) typedef long long ll; typedef pair<int,int> pii; int n,t; int pai[MAXN]; int peso[MAXN]; vector< pair<double,pii>>adj; int find(int x){ ...
ALGO
0.999535
4.015519
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2019-02-08T01:46:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97cb389df...
2554edf5-0ac5-4a24-8948-fd5de2edb63f
zryyyy/C
leetcode/35.search-insert-position.cpp
// // Created by Matrix on 2022/1/9. // 35.搜索插入位置 int searchInsert(int* nums, int numsSize, int target){ int i = 0,j = numsSize - 1; if (nums[j] < target) return numsSize; // 防止target大于最右边的数字 while (i < j) { int search = (i + j) / 2; // 对分法 if (nums[search] < target) i = search + 1; ...
ALGO
0.999905
5.452812
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2021-11-01T12:04: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": "d4d997919f6...
ef11286d-d36c-4335-aa3d-d9de15136dc5
ishandutta2007/codeforces-t
tute7627/normal/663/E.cpp
//#define _GLIBCXX_DEBUG #include<bits/stdc++.h> using namespace std; #define endl '\n' #define lfs cout<<fixed<<setprecision(10) #define ALL(a) (a).begin(),(a).end() #define ALLR(a) (a).rbegin(),(a).rend() #define spa << " " << #define fi first #define se second #define MP make_pair #define MT make_tuple #define P...
ALGO
0.999982
3.931655
{ "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": "51b771994eda...
c6d03ed7-4fbf-4fe8-8bfa-2bd91a88cf7b
gabriel88766/C-CPP-AlgorithmsAndContests
Codeforces/1725/1725C.cpp
//WA #include <bits/stdc++.h> using namespace std; long long mod = 998244353; long long binpow(long long int a, long long int b, long long int m = mod){ if(a == 0 && b != 0) return 0; a %= m; long long int res = 1; while(b > 0){ if(b & 1) res = (res * a) % m; a = (a * a)...
ALGO
0.99999
4.442898
{ "github_metadata": { "branch": "master", "commit_count": 436, "repo_created_at": "2020-08-21T00:21: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": "12c36700...
a957b896-48e0-4e66-930c-6bdc0372d2a3
ZlatanCN/SCAU-OJ
Data Structure/8580 合并链表.cpp
#include<stdio.h> #include<malloc.h> #define ERROR 0 #define OK 1 #define ElemType int typedef int Status; typedef struct LNode { int data; struct LNode *next; } LNode,*LinkList; Status ListInsert_L(LinkList &L, int i, ElemType e) // 算法2.9 { // 在带头结点的单链线性表L的第i个元素之前插入元素e LinkList p,s; p = L; int j = 0; whil...
ALGO
0.999927
3.292067
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-07-19T10:08: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": "5f691da6d89b...
ec2e9499-f2c4-48ae-9ee2-9095feacf2cf
Tora416/MultiCodeEmbed
dataset/dataset_raw/gcj_cpp/nein/3264486_5736519012712448_nein.cpp
#include <bits/stdc++.h> char str[1010]; char filp(char ch) { if (ch == '+') return '-'; return '+'; } int main() { int tc; scanf("%d", &tc); int p = 0; while (tc--) { int k; scanf("%s%d", str, &k); int cnt = 0; for (int i = 0; str[i + k - 1] != '\0'; i++) { if (str[i] == '-') { ...
ALGO
0.998861
3.36245
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2025-07-10T08:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62687529e...
d70b16d1-ce46-4d04-aa89-48b94a90693f
k-rahul1/Computer-Vision
CBIR/CBIR_code/CBIR_prog/distanceMetric.cpp
//Created by <NAME> //it implements different distance metric on feature vector #include <opencv2/opencv.hpp> #include <opencv2/highgui.hpp> #include <opencv2/videoio.hpp> #include <opencv2/imgproc.hpp> #include <iostream> #include <vector> #include "distanceMetric.h" #include "csv_util.h" #include <cmath> //Impleme...
ALGO
0.996207
5.013389
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2023-02-15T06:36: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": "b3afcd83f0...
4260a9ca-baf9-4893-830a-8b56560a2bc5
thortoyo/study
AGC043/B.cpp
#include <bits/stdc++.h> #define REP(i,n) for(int i=0;i<(n);++i) using namespace std; typedef long long ll; ll C[1000005]; int main() { int N; string S; cin >> N >> S; vector<ll> A(N); A[0] = S[0] - '1'; REP(i,N-1) { int a0 = (S[i]-'1'); int a1 = (S[i+1]-'1'); A[i+1] = A[i] + abs(a0-a1); } ...
ALGO
0.999992
3.431874
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2019-07-15T03:49: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": "513dd30d...
62a985e2-e211-4fe9-978c-3593efe42499
kabirgogoi/class-xii-cs-practical
linked-list/insert-at-the-end.cpp
// Aim: To insert an element at the end of a linked list #include <iostream> using namespace std; // Define a node structure struct Node { int data; Node* next; }; // Function to insert a new node at the end of the linked list void insert(Node*& head, int data) { // Allocate memory for a new node Nod...
ALGO
0.998916
5.888993
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-10-14T17:53:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7febc1444ea...
b52c964b-51cb-4aaa-b0e3-180705742ff8
Teschtastic/CS-Repo
CSCI 342/Sorting Algoritms/Sorting Algoritms/main.cpp
// Sorting Algorithms // Selection, Merge, and Radix // // Created by <NAME> on 9/11/17. #include <stdio.h> #include <cstdlib> #include <iostream> #include <ctime> using namespace std; // Swap used for Selection Sort void swap(int *first, int *second) { int temp = *first; *first = *second; *second = t...
ALGO
0.999993
6.043452
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-02-15T21:13: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": "133ddc59ea...
f9798255-5d51-40ef-929a-324e8208e57f
yanhuanwang/codekata
wikioi3/1315.cpp
//#include <cstdio> //#include <cstdlib> //#include <memory.h> //#include <algorithm> //#include <string> //#include <map> ////#include <unordered_map> ////#include <unordered_set> //#include <set> //#include <vector> //#include <cmath> //#include <climits> //#include <queue> //#include <cassert> //#include <iostream> ...
ALGO
0.999962
3.796344
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-06-19T09:57: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": "ff9e376d91...
8de99678-ae3e-4e9d-bf6c-5a1093a46766
Jomppa69/Quicksort-algorithm
level1.cpp
#include <iostream> #include <vector> #include <random> #include <stdlib.h> #include <time.h> #include <fstream> using namespace std; // Compare function for qsort algorithm. int compare(const void *a, const void *b) { int int_a = *((int*)a); int int_b = *((int*)b); if (int_a < int_b) { return -1...
ALGO
0.999788
4.940019
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-26T19:54: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": "c4942c81da78...
3546d779-115d-47e8-a6f7-d509ba486475
dernDren161/DataStructuresAndAlgorithms
Facebook-Leet/Top79/SearchingSorting/FindPeakElement.cpp
//Problem Link: https://leetcode.com/explore/interview/card/facebook/54/sorting-and-searching-3/3032 // NOTE: these edge cases like: (m==0), (m>0)(line 16), etc are very Important, never forget to write them down. class Solution { int call(vector<int>& nums, int l, int r, int n){ if(nums.size() == 0) ret...
ALGO
0.999999
5.660828
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2020-07-18T01:29: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": "4324501d1...
0cd385f1-abf0-4b9c-b7a1-da0e8fb597ce
Dreadyyyy/advent-of-code-2024
day5/task2.cpp
#include <bits/stdc++.h> using namespace std; int main(void) { unordered_map<string, int> cmp; string line{"|"}; ifstream file{"input.txt"}; while (line.find('|') != string::npos) { cmp[line] = true; cmp[string{line.begin() + line.find('|') + 1, line.end()} + "|" + string{...
ALGO
0.999052
4.486402
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-12-01T23:11: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": "1767d102a34...
500657d6-a45e-4715-b567-c5435101dc9f
already5chosen/others
cholesky_solver/chol.cpp
#include <complex> #include <float.h> #include <intrin.h> //#include <stdio.h> #include "chol.h" #include "chol_internal_definitions.h" #define CHOL_DBG 0 #if CHOL_DBG bool chol_scalar(std::complex<double> *dst, const std::complex<double> *src, int n); void PrintLowerTriangle(const std::complex<double> *src, unsigned...
ALGO
0.998168
4.90363
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2020-06-17T19:32:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd3a153e2...
6b1571ba-35ee-44ea-9010-b3772b129366
aubreyfern/data-structures
aubreyfernando_assignment4/dll.h
#include <iostream> #include "list.h" using namespace std; template <class T> class ListNode { public: ListNode(); ListNode(T d); ~ListNode(); T data; ListNode<T> *prev; ListNode<T> *next; }; template <class T> ListNode<T>::ListNode() { data=0; next=NULL; prev=NULL; } template<class T> ListNode<T>:...
TOOL
0.990017
3.581902
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-12-11T20:06: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": "7daabebca6...
c0a5b271-6aaf-4398-924e-90061f1e0461
Shikharagrawal-2408/DSA
CodeChef/1000-1200/1053.cpp
/* Prime Reversal You are given two binary strings A and B, each of length N. You can perform the following operation on string A any number of times: Select a prime number X. Choose any substring of string A having length X and reverse the substring. Determine whether you can make the string A equal to B using any (po...
ALGO
0.99997
6.223126
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2025-07-05T19:48: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": "0cecf6650e...
140fb972-468d-4b9a-9e64-36a8999277b8
odinthenerd/tmp
include/boost/tmp/algorithm/sort.hpp
#ifndef BOOST_TMP_SORT_HPP_INCLUDED #define BOOST_TMP_SORT_HPP_INCLUDED // Copyright 2018 <NAME>. // // Distributed under 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 #include "../comparison.hpp" #include "../detail/capabil...
ALGO
0.999727
6.864472
{ "github_metadata": { "branch": "development", "commit_count": 21, "repo_created_at": "2018-06-15T14:49:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 67, "forks": 9, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ddd...
3dea9736-7017-4c63-b2aa-db2a68c9f59d
wwqgtxx/pat-a-practise
1087.cpp
#include<cstdio> #include<cstring> #include<stdint.h> #include<algorithm> #include<set> #include<iostream> #include<vector> #include<stack> #include<map> #include<queue> struct city_name_t{ char str[4]; city_name_t(){ memset(str,0,sizeof(str)); } city_name_t(const char* string){ memcpy(str,string,sizeof(str));...
ALGO
0.999937
3.823283
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-03-17T12:20: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": "12ad75e7f4...
98fffdac-b911-4992-91d8-ac0b2b33505f
ydiz/decays
kaon/typeI/typeI_utils.h
#pragma once #include "kaon/kaon.h" namespace Grid { std::vector<std::vector<LatticeColourMatrix>> conv_with_E_typeI(const std::vector<std::vector<LatticeColourMatrix>> &F, double M_K, int max_uv_sep) { using namespace std; GridBase *grid = F[0][0].Grid(); FFT theFFT((GridCartesian *)grid); static vector<v...
ALGO
0.939233
5.320501
{ "github_metadata": { "branch": "master", "commit_count": 116, "repo_created_at": "2019-09-18T01:37: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": "8e5211a2...
d74fa3b7-0b1b-4076-8ada-a9ec3921b15e
GersonCavalheiro/OpenMPSnapshot
May2023/RepCPP/611347127/grid_operators.hxx
#pragma once #include <cstdio> #include <cmath> #include <cstdint> #include <complex> #include <vector> #include <algorithm> #include "status.hxx" #include "atom_image.hxx" #include "real_space.hxx" #include "finite_difference.hxx" #include "boundary_condition.hxx" #include "recorded_warnings.hxx" #i...
ALGO
0.992647
5.444294
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-08-19T17:35:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9d7123b76a...
fdba758c-7da9-4054-b784-e60444263d55
SanskritiAripineni/Pointers
Pointers 6/main.cpp
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. ******************************************...
ALGO
0.990246
4.070138
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-03T21:48: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": "0703fcdeb3c2...
a28c39b4-26c1-4d41-9a8c-6a883488ee2e
savish28/CP
cf contest/edu 71/2.cpp
#include<bits/stdc++.h> #define ll long long int using namespace std; #define mod 1000000007 #define pb push_back #define ff first #define ss second #define mp make_pair #define lb lower_bound #define debug(x) cout<<"["<<#x<<": "<<x<<"]"<<endl #define f(i,p,n) for(ll i=p;i<n;i++) ll exp(ll a,ll b,ll m); ll a[51][51]; ...
ALGO
0.99958
3.047856
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-05-14T11:49:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "981bbcae3f...
eb89569d-464d-4005-92df-760f1f50a1df
praveen-velliengiri/orcspecbench
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
//===- IndVarSimplify.cpp - Induction Variable Elimination ----------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
TOOL
0.941983
6.208602
{ "github_metadata": { "branch": "orcspecbench", "commit_count": 324579, "repo_created_at": "2019-08-18T14:51:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": ...
a827cd36-4548-4af1-8de5-e38f0440a565
LeulShiferaw/CSES
Increasing Subsequence/main.cpp
#include <bits/stdc++.h> #include <bits/extc++.h> using namespace std; using namespace __gnu_pbds; #define F first #define S second #define PB push_back #define MP make_pair #define REP(i, a, b) for(int i = a; i<b; i++) #define rREP(i, b, a) for(int i = b; i>=a; i--) using indexed_set = tree<int, null_type, less<in...
ALGO
0.999977
4.655834
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-11-21T09:46: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": "cf221b423d1...
f7b9b543-154e-47d3-be09-c7542477a68d
Flab-E/EmulatingAProcessor
main_6502.cpp
# include <stdio.h> # include <stdlib.h> using Byte = unsigned char; using Word = unsigned short; using u32 = unsigned int; struct Mem { static constexpr u32 MAX_MEM = 1024 * 64; Byte Data[MAX_MEM]; void Initialise(){ for (u32 i = 0; i<MAX_MEM; i++){ Data[i] = 0; } } // read byte function Byte operator...
TOOL
0.902915
4.565797
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-06-01T05:23: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": "78c5ca0fa4fa...
cd44e695-fafe-42b7-878c-cb7bc29ce0a0
Sazol-Sarker/Competitive-Programming
CF/Codeforces Round 1017 (Div. 4)/C_Brr_Brrr_Patapim.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define en '\n' // Fast I/O void fast_io() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); } // Comparator for sorting vector of pairs bool cmp(pair<ll, ll> &a, pair<ll, ll> &b) { // Example: Sort by first ascending, then seco...
ALGO
0.999536
3.83136
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-03-29T08:45: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": "abc9c357165...
314023e9-556c-407e-af75-2ada20b0275c
Eristic0618/code
二叉搜索树/BinarySearchTree.h
#pragma once #include <iostream> using namespace std; template<class K> struct BSTreeNode { BSTreeNode<K>* _left; BSTreeNode<K>* _right; K _key; BSTreeNode(const K& key) :_left(nullptr) ,_right(nullptr) ,_key(key) {} }; template<class K> class BSTree { typedef BSTreeNode<K> Node; public: bool insert(co...
ALGO
0.999734
4.028484
{ "github_metadata": { "branch": "main", "commit_count": 373, "repo_created_at": "2023-10-09T06:01: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": "692df80b2c...
2457e2c3-0348-4089-9453-f4e4c76e5122
Shethyash/coding_practice
arrays/rotate-array.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" // https://leetcode.com/problems/rotate-array/ void rotate(vector<int> &nums, int k) { int n = nums.size(); if (k > n) k = k % n; if (n == 1 || n == k) return; vector<int> temp(n); for (int i = 0; i < n; i++) { ...
ALGO
0.999972
5.732773
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2021-12-22T08:32: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": "59e14b1b89a...
2d39fd71-b715-4c66-82f0-4848b7a75893
Meg-Div/DigitalCraftsProjects
Magic8Ball/index.cpp
/*------------------------------- ShakeBall --------------------------------- - index: int - response: string - count: int - OUTLOOK: const vector <string> --------------------------------- + ShakeBall() + print() : void + firstShake() : void + nextShake() : void + check() : void ---------------------------...
TOOL
0.946572
5.392368
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-12-18T22:20: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": "416d684820ef...
b533d1b5-3581-4b7a-88f7-f1d16a9bef10
ishandutta2007/codeforces-h
hogloid/normal/329/B.cpp
#include<bits/stdc++.h> #define REP(i,m) for(int i=0;i<(m);++i) #define REPN(i,m,in) for(int i=(in);i<(m);++i) #define ALL(t) (t).begin(),(t).end() #define CLR(a) memset((a),0,sizeof(a)) #define pb push_back #define mp make_pair #define fr first #define sc second using namespace std; #ifndef ONLINE_JUDGE #define dum...
ALGO
0.999711
3.640149
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d4bdb37aa50...
30eabd91-b95f-4606-bd7f-533758f12a0c
zdzapple/LeetCode
Anagrams.cpp
class Solution { public: // 248ms vector<string> anagrams1(vector<string> &strs) { vector<string> result; map<string, vector<string> > dict; if (strs.empty()) return result; for (int i = 0; i < strs.size(); ++ i) { string s(strs[i]); sort(s.begin(), s.end()); dict[s].push_back(strs[i]); ...
ALGO
0.99998
5.393253
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2013-05-08T01:58:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "136b2cfbb...
db2e2c8d-0a87-4fb1-afa8-3f5dec512801
aviadblumen/Candies
candies.cpp
#include <iostream> #include <cctype> #include <random> #include <ctime> #include <windows.h> using u32 = uint_least32_t; using engine = std::mt19937; using namespace std; void playGame(int, int); int getRandomInRange(engine& generator, int min, int max){ uniform_int_distribution< u32 > distribute( min, max...
ALGO
0.996941
4.132852
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-02-01T02:00: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": "ffffa2eeb1ca...
b1ccce5b-c010-4710-b3b1-78820cee18c0
kassnery/dimsum
src/countmin.h
// Two different structures: // 1 -- The basic CM Sketch // 2 -- The hierarchical CM Sketch: with log n levels, for range sums etc. #ifndef COUNTMIN_h #define COUNTMIN_h #include "prng.h" //#define min(x,y) ((x) < (y) ? (x) : (y)) //#define max(x,y) ((x) > (y) ? (x) : (y)) typedef struct CM_type{ int64_t co...
ALGO
0.983518
5.140434
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-12-17T14:25:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e4cc139f...
b72c1f65-b290-47bf-8cda-937d0ae41e80
advayaggarwal/Data-Structures-Algorithms
Codechef/CHFGCD.cpp
/* AUTHOR: <NAME> */ #include<bits/stdc++.h> using namespace std; #define mod 1000000007 //1e9+7 ans%mod #define ll long long int #define test_cases(x) int x; cin>>x; while(x--) #define vi vector<int> #define setbits(x) __builtin_popcountll(x) #define endl "\n" #define pii pair<int,int> template <typename ...
ALGO
0.999991
3.924604
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2020-09-04T07:02: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": "6d86184ae...
d46b0f20-a696-46bc-a47e-796e81488f34
ericchang123/Google-Interview-Practice
minLevel.cpp
#include <iostream> #include <queue> #include <unordered_map> #include <climits> using namespace std; struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; int minLevel(TreeNode* root){ if(root == NULL) return 0; TreeNode* curr; int sum = 0;...
ALGO
0.999981
4.649878
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-05-05T01:14: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": "de2a6ee79...
bdb77977-a5af-42e7-bfea-78151d23dd4d
anuraag1501/PlacementPreparationModule
Striver's SDE Sheet Codes/Day 24 - Graph II/5. MST Using Prim's Algorithm .cpp
#include<bits/stdc++.h> class cmp{ public: bool operator()(pair<pair<int,int>,int>& a,pair<pair<int,int>,int>& b){ return a.second > b.second; } }; vector<pair<pair<int, int>, int>> calculatePrimsMST(int n, int m, vector<pair<pair<int, int>, int>> &g) { vector<vector<int>> adj(n+1,ve...
ALGO
0.99999
4.392794
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2022-07-07T12:06: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": "60e62a3bf...
5563ac6a-0c21-411b-afff-bb9de4979640
mysh212/Coding
contest/joined/YTP-2022/C.cpp
// Author : ysh // 07/22/2022 Fri 17:13:52 #include<bits/stdc++.h> using namespace std; struct box{ int l,r; box(int l = 0,int r = 0): l(l), r(r) {}; }; vector<box>mark; vector<bool>f; // vector<bool>re; int a,b; int c = 0; int d = 0; inline void flip(int n) { if(f[n]) { f[n] = 0; c-...
ALGO
0.999985
3.183895
{ "github_metadata": { "branch": "master", "commit_count": 300, "repo_created_at": "2022-02-05T12:21:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c6e7cd9...
2e935676-1c9d-4596-a6b3-72da6b1d1fdb
MBilalShaikh2003/DSA-Assignments
PrefixEvaluation.cpp
// Online C++ compiler to run C++ program online #include <iostream> using namespace std; struct stnode{ int value; stnode* next; }; stnode* top=NULL; void push(int value){ stnode* st=new stnode; st->value=value; st->next=top; top=st; } int pop(){ if(top==NULL){ cout<<"stack ovrflow"<<en...
ALGO
0.999975
4.252572
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-05-13T09:03: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": "5b3c2df7a1d9...
bf58318a-175b-408f-a686-0ca2cd343306
duguyue100/acm-training
UVa/uva10924.cpp
// UVa 10924 Prime Words #include <iostream> #include <cstdio> #include <string> #include <deque> #include <set> #include <cctype> #include <sstream> #include <map> #include <algorithm> #include <utility> #include <stack> #include <tuple> #include <cmath> #include <vector> using namespace std; bool is_prime(int n) ...
ALGO
0.999677
4.075958
{ "github_metadata": { "branch": "master", "commit_count": 326, "repo_created_at": "2013-07-17T10:41:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 57, "forks": 38, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "b23b3c...
0d7abf1e-da4b-4dd7-813b-982ccfe9c106
ArvinCS/competitive-programming
Contest/Pelatnas3/Latihan/P7-Old.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long const int maxN = 2002; const ll inf = 1e18; ll dist[maxN][maxN]; vector<pair<int, ll>> adj[maxN]; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, m; cin >> n >> m; fill(dist[0], dist[n], 1e18); for(int x=0...
ALGO
0.999948
4.525342
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-07-22T02:02: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": "c753a378003d...
4ee45bad-046f-4c84-8f03-4b19e6e78afc
NidhiKamal05/leetcode_solutions_CPP
leetcode_problem_1201_to_1300/leetcode_1290_convertBinaryToIntegerInLinkedList.cpp
// 1290. CONVERT BINARY NUMBER IN A LINKED LIST TO INTEGER #include<iostream> #include<vector> #include<cmath> using namespace std ; struct ListNode { int val ; ListNode *next ; } ; int getDecimalValue(ListNode *head){ vector<int> binary{} ; ListNode * p ; p = head ; while(p != NULL){ ...
ALGO
0.999953
5.043828
{ "github_metadata": { "branch": "main", "commit_count": 95, "repo_created_at": "2025-03-30T12:30:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e663686ade...
b2924a7f-4113-425a-a57a-47189c9308f3
OP-DSL/tridsolver
apps/adi/src/preproc_mpi.hpp
/* * Open source copyright declaration based on BSD open source template: * http://www.opensource.org/licenses/bsd-license.php * * This file is part of the scalar-tridiagonal solver distribution. * * Copyright (c) 2015, <NAME> and others. Please see the AUTHORS file in * the main source directory for a full list...
ALGO
0.997239
5.778375
{ "github_metadata": { "branch": "master", "commit_count": 268, "repo_created_at": "2018-01-15T10:48:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 5, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c0ba207f7...
c89158c2-d897-465e-8d99-71826c69ff11
moondemon68/cp
TOKI/OSN20/D1/B.cpp
#include <bits/stdc++.h> #define fi first #define se second #define pb push_back #define mp make_pair #define MOD 1000000007 #define INF 1234567890 #define pii pair<LL,LL> #define LL long long using namespace std; LL a[200005]; vector<pair<pii, LL>> v; bool cmp (pair<pii, LL> c, pair<pii, LL> b) { if (c.fi.fi == ...
ALGO
0.99996
3.369878
{ "github_metadata": { "branch": "master", "commit_count": 184, "repo_created_at": "2018-09-17T12:29: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": "dacc7da4...
41f7d15a-1601-493e-b479-4eb32c2a3d94
IndianShifu/Data-Structures
LAB/lab_sheet_1/problem3.cpp
#include<iostream> #include<cstdlib> using namespace std; int main() { int sumofdie[13] = {0}; for(int i =0 ; i < 36000 ; i++) { int x = rand()/100%6+1; int y = rand()/100%6+1; int sum= x+y; switch(sum) {case 2 : sumofdie[2]++; break; case 3 : sumofdie[3]++; break; case 4 : sum...
ALGO
0.997787
3.801392
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-04-28T13:56: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": "5275f5b635...
acb82467-e561-4a0c-881c-f1c82a85f345
ishandutta2007/codeforces-b
bohun/normal/1666/J.cpp
#include<bits/stdc++.h> using ll = long long; using namespace std; const int N = 210; int n, p[N]; ll c[N][N], d[N][N]; pair<ll, int> dp[N][N]; int build(int l, int r) { if (l > r) return 0; int mid = dp[l][r].second; p[build(l, mid - 1)] = mid; p[build(mid + 1, r)] = mid; return mid; } int main() { cin.tie(...
ALGO
0.999965
3.61569
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2f4096dc766...
893255e4-b41c-4c18-9388-ead125f773be
lmalkam/C-DSA
DSA/SSS_7522.cpp
#include<iostream> using namespace std; struct trnode { int data; trnode *next; }; typedef trnode* LPTR; LPTR findend(LPTR L){ while(L->next!=NULL) L=L->next; return L; } void addend(LPTR &L,int n){ if(L==NULL){ L=new(trnode); L->data=n; L->next=NULL; } else{...
ALGO
0.999803
3.817685
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-12-22T10:58: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": "33af5a7c2dca...
f28cc679-459a-41fb-abb3-265256682953
miguelsndc/competitive-programming-lib
Solutions/Seletiva-2025/H5/H.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define MOD 1000000007 #define ii pair<int, int> #define vi vector<int> #define vii vector<ii> struct Project { int start, end, pay; Project() {}; Project(int _a, int _b, int _c): start(_a), end(_b), pay(_c) {} ...
ALGO
0.999898
4.851099
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2025-03-19T13:03: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": "fbe079cc7d7...
f9a30d08-3cb9-433b-9f96-f2634d281853
pseong/ProgramSolving
Baekjoon Online Judge/6137.cpp
#include <bits/stdc++.h> #define all(c) (c).begin(),(c).end() #define srt(c) sort(all(c)) #define srtrev(c) sort(all(c)); reverse(all(c)) using namespace std; using ll=long long; using i128 = __int128_t; using pi=pair<int, int>; using pll=pair<ll, ll>; using ti=tuple<int, int, int>; using tll=tuple<ll, ll, ll>; templat...
ALGO
0.999999
3.916403
{ "github_metadata": { "branch": "main", "commit_count": 2105, "repo_created_at": "2021-01-25T02:47:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00b9555a9...
5ab969c7-a41b-482a-b5c7-0d1ee6898c6d
AlanV16/Ejercicios
semana 1/Ejercicio 9.cpp
#define _USE_MATH_DEFINES #include <cmath> #include <iomanip> #include <iostream> using namespace std; //ejercicio 9 //El siguiente codigo nos ayudara //a resolver el area y volumen de un cilindro int main(){ int opcion; double radio, altura, area, volumen; cout << "Bienvenido al programa para calcular e...
TOOL
0.956454
3.388645
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-01-25T04:12: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": "143d40f72636...
b70bc610-4c5c-4472-a5ea-af8ef6fabe05
zhongyoub/algoStudy
linux_algo/01-bag.cpp
#include<iostream> #include<vector> #include<set> #include<map> #include<string> using namespace std; /* 【数组类型】客户经理小郭明下有n个客户,每个客户持有部分可用资金,现行内推出理财产品P0001, 客户经理小郭争取到总额度100万元,需在名下客户内选择5个客户,要求5个客户名下的可用资金总和最接近总额度100万元。 输入:以csv文件格式给出姓名和可用资金(单位:万)的列表,如 张三,23 李四,12 王五,33 输出: 5个客户姓名和需占用的总额度。 分析:该问题是从中选取5个数,最接近100,并且输出选取的,可能...
ALGO
0.996988
3.095204
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2019-09-29T06:42:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac4524e7a...
6ffec577-ed7c-4e89-a8e9-931a881fb863
waseem-irfan/OOP-DSA
LinkedList.cpp
#include <iostream> using namespace std; class node { public: int data; node *next; node() { next = NULL; } }; class List { node *head; public: List() { head = NULL; } void insert_at_position(int v, int p); void print(void); void sorting(); }; void Lis...
ALGO
0.999924
4.282997
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-03-05T17:17: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": "f7df562e5263...
52f8329f-a596-4e20-b801-ae272831d43a
ishandutta2007/codeforces-c
cheissmart/normal/1288/D.cpp
#include <iostream> #include <vector> #include <algorithm> #pragma GCC optimize("Ofast,no-stack-protector","unroll-loops") #define IO_OP std::ios::sync_with_stdio(0); std::cin.tie(0); #define F first #define S second #define V vector #define PB push_back #define MP make_pair #define EB emplace_back #define ALL(v) (v).b...
ALGO
0.999957
3.443115
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "271faeb91925...
846294eb-5af2-49ad-aa04-ec9e9c81b767
Xilinx/Vitis_Libraries
solver/L2/include/xf_solver_L2.hpp
/* * Copyright 2019 Xilinx, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
CONFIG
0.991869
5.527875
{ "github_metadata": { "branch": "main", "commit_count": 471, "repo_created_at": "2019-09-23T19:13:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 988, "forks": 381, "issues": 0, "pull_requests": 12 }, "file_meta": { "content_id": "bd522b...
7c9be521-7273-452b-8055-8bfe28427481
ogurdima/technion-236373-image-synthesis-2014
raytracer/src/Voxel.cpp
#include "Voxel.h" Voxel::Voxel(MPoint _min, MPoint _max) { min = _min; max = _max; center = (min + max) / 2; planes.resize(6); planes[X_NEG] = Plane(min, MVector(-1,0,0)); planes[X_POS] = Plane(max, MVector(1,0,0)); planes[Y_NEG] = Plane(min, MVector(0, -1 ,0)); planes[Y_POS] = Plane(max, MVector(0,1,0)); p...
ALGO
0.943196
4.741382
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2015-04-14T19:23: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": "a07c7c73c...
8dfdee75-17c6-4be2-9eb6-590fa8eff00c
Stephenalexngo/Java-Cpp-Programs
KattisC++/abc.cpp
#include<bits/stdc++.h> using namespace std; typedef vector<char> vc; typedef vector<string> vs; typedef vector<int> vi; typedef vector<double> vd; typedef vector<long> vl; typedef vector<long long> vll; typedef stack<long long> sll; typedef string st; typedef int i; typedef double db; typedef long long ll; typedef lo...
ALGO
0.999824
3.304218
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2019-10-26T05:48: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": "b22ce7df8...
f80e8acd-53a6-4f0e-a104-2709ecb31c13
imdudder/OpenCV_Coin_Detection
OpenCV_Coin_Detection/main.cpp
//============================================================================== // Coin Detection // Authors: <NAME> and <NAME> // CSS 487 A, Autumn 2020 //------------------------------------------------------------------------------ // This program seeks to find and identify US coins within a given image. The // co...
TOOL
0.995288
6.842885
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2021-07-27T03:36:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31baed8a96...
9cac5bf0-785f-4362-a2d8-28c3154c4fe5
iimuz/til
others/atcoder/ABC123/B/main.cpp
/// @file #include <algorithm> #include <iostream> #include <vector> namespace { bool run(std::istream& is, std::ostream& os); } // unnamed namespace /// @brief エントリポイント #ifdef _TEST static int run() #else int main() #endif { try { if (run(std::cin, std::cout) == false) { std::cerr << "main funciton er...
ALGO
0.999645
5.332946
{ "github_metadata": { "branch": "master", "commit_count": 1179, "repo_created_at": "2019-09-17T03:49:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ef05e7...
1ea85111-0a00-446a-bf40-9a8708f06e00
ssoo2024/Programmers
Problems[LV3]/[LV3]섬 연결하기.cpp
#include <vector> #include <string> #include <functional> #include <algorithm> #include <queue> #include <map> #include <cstdlib> #include <ctime> #include <iostream> using namespace std; vector<vector<int>> check(101, vector<int>(101)); bool isCycle; void dfs(int N, int root, int parent, int me) { for (int i = 0; i...
ALGO
0.999656
4.112041
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2020-10-15T16:54: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": "3588ae3a2997...
15d73213-8cfe-4480-8e72-0058056242b0
pratikkumar399/Data-Structures-And-Algorithm
codechef/FRTIME.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll n, m, i; cin >> n >> m; array<ll, 2> alice[n], bob[m]; for (i = 0; i < n; i++) { cin >> alice[i][0] >> alice[i][1]; } for (i = 0; i < m; i++) { cin >> bob[i][0] >> bob[i][1]; ...
ALGO
0.999976
3.66812
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2021-12-14T11:43:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77d007da6...
b91a8e48-d231-44a4-b696-21c7ebbd884b
indrajohn7/Algorithm
Dynamic Programming/N_Queens_chess.iter.cpp
class Solution { public: vector<vector<string>> solveNQueens(int n) { vector<vector<string>> res; vector<vector<pair<int, int>>> vec; for (int i = 0; i < n; i++) { // pos of Q in row 0; bool possib = false; vector<pair<int, int>> temp; pair<int, i...
ALGO
0.999959
5.810058
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-07-24T08:17:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05dc84593e...
53c1a667-2a74-497f-9c14-ab311a849670
gilvillard/hplll
stats/gen.cc
#include "hplll/hlll.h" #include "hplll/ratio.h" /* *********************************************** MAIN ********************************************** */ using namespace hplll; int main(int argc, char *argv[]) { filebuf fb; iostream os(&fb); ZZ_mat<mpz_t> A; // For hpLLL ZZ_mat<m...
TEST
0.993007
4.319422
{ "github_metadata": { "branch": "master", "commit_count": 661, "repo_created_at": "2017-07-20T15:09:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "416a0f3d...
ac47ce56-2c6f-4a80-8f72-a8ccd0439a61
bnjmn-git/wavy
src/oscillators.h
#pragma once #include "source.h" #define _USE_MATH_DEFINES #include <math.h> namespace detail { inline double sine_wave(double phase) { return sin(phase); } inline double saw_wave(double phase) { return M_2_PI * atan(tan(phase * 0.5)); } inline double square_wave(double phase) { return sin(phase) < 0.0 ...
ALGO
0.943321
6.749572
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-05-17T09:27: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": "f01023f0e35e...
55114d25-b9ff-492e-89bb-df7fbba2394e
GersonCavalheiro/OpenMPSnapshot
May2023/RepCPP/611347127/sho_radial.hxx
#pragma once #ifndef NO_UNIT_TESTS #include <cstdio> #include <algorithm> #endif #include <cmath> #include <cassert> #include "constants.hxx" #include "status.hxx" #include "quantum_numbers.h" namespace sho_radial { template <typename real_t> void radial_eigenstates( real_t poly[] , int const nrn , int con...
ALGO
0.994072
5.411739
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-08-19T17:35:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "481aa70b51...
9ddf5d3a-437d-41c9-a5a7-bb4d198c98a5
AldoArcos/compiladores
Code/src/LL1.cpp
#include "LL1.hpp" std::set<std::string> LL1::First(std::list<ReglaGramatical::Nodo> & l) { std::set<std::string> r; if(l.empty()) return r; for(auto N : l) { if(N.terminal || N.simbolo == "EPSILON") { r.insert(N.simbolo); return r; } // Si el simbolo es un ...
ALGO
0.999711
4.713128
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2023-03-07T23:52:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "74a0e9e6ad3...
135e824f-2987-40c1-bf1f-a163db6835b3
Ragdha-Elgaidi/cpp-lessons-M_s_Loops
FindAllQuadruplesUsingForLoop.cpp
/* Count how many (a, b, c, d) with following property: ○ 1 <= a, b, c, d <= 200 ○ a + b = c + d ● Code it once using 4 loops ○ How much time does it take! ● Code it once using 3 loops only ● Future: With hash tables, you can do it using 2 loops only */ #include<iostream> using namespace std; int main() { int count ...
ALGO
0.997265
4.639736
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2022-12-02T15:02:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f32b1f82395...
f4f9bbcd-25a1-4a77-9af4-207c91e903e6
kartik-py12/neoColab
CPP/unit_1/static/5.cpp
// Single File Programming Question // Problem Statement // Alex is a math enthusiast who loves playing with numbers. One day, Alex came across a challenge to write a program that reverses a given number. Intrigued by the challenge, Alex decides to write a program using reference variables. // Can you help Alex b...
ALGO
0.999932
4.914572
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-10-20T09:29: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": "7d5d060b856...
23aebcdd-c683-4013-813b-d25b6f5354ba
harD1kkkk/Ped_lab_7.2_ite
LAB_7.2_ite/LAB_7.2_ite/lab_7.2_ite.cpp
#include <iostream> #include <iomanip> #include <cstdlib> #include <ctime> using namespace std; void Create(int** a, const int k, const int n, const int Low, const int High) { for (int i = 0; i < k; i++) { for (int j = 0; j < n; j++) { a[i][j] = Low + rand() % (High - Low + 1); } } ...
ALGO
0.998378
5.188939
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-10T08:07: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": "8a158bcb3f9a...
dbb96d96-303b-483e-a3f8-98655129a343
morazow/Algorithms
InverseFunction/main.cpp
#include "inverse_function.h" //#include "sqrt_newtons.h" #include <stdio.h> #include <assert.h> #include <math.h> double square(double x) { return x * x; } double cube(double x) { return square(x) * x; } double power10(double x) { return pow(10.0, x); } int main(int argc, char* argv[]) { func_t in...
TEST
0.921346
4.555922
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2013-07-03T18:39:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9053d8f30...
093a7a01-f5ad-4db0-92b8-51c956c1c02a
viktoriia-fomina/Homework
hw3/BinarySearch/BinarySearch/Source.cpp
#include "Header.h" bool binarySearch(int const number, int size, int const * const array); void quickSort(int const size, int* array); int arrayPartition(int const size, int* array); int pivotIndex(int const first, int const last, int const * const array); int middleOfThreeIndex(int const first, int const last, int c...
ALGO
0.999981
4.382154
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2018-09-29T14:08:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 11 }, "file_meta": { "content_id": "4e986ec...