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
50e0951e-6013-46a7-bd9a-63af08c13000
face4/AtCoder
Others/TypicalDP/C.cpp
#include<iostream> #include<iomanip> #include<vector> #include<cmath> using namespace std; double win(double x, double y){ return 1.0 / (1 + pow(10, (y-x)/400)); } int main(){ int k; cin >> k; vector<int> v(1<<k); for(int i = 0; i < 1<<k; i++) cin >> v[i]; vector<vector<double>> dp(k+1, vect...
ALGO
0.999751
4.100686
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2018-06-15T14:41: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": "99404f411...
8e111347-4116-481a-ad5b-394ff51c4867
DimaMorochenets/E-Olymp
Task00219_Central_Heating.cpp
#include <iostream> int main() { uint64_t height, width, length, volume; std::cin >> height >> width >> length >> volume; uint64_t house_volume = height * width * length; if(house_volume % volume) std::cout << house_volume / volume + 1 << std::endl; else std::cout << house_volume / volume << std::e...
ALGO
0.982935
3.278994
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2020-09-07T04:31: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": "4d1eeb858...
bdd97c99-049a-4611-b08e-d3dc97380e83
UlrichStoeckmann/MyCpp
dijkstra_2.cpp
#include "iostream" #include<conio.h> #define INFINITY 99999 using namespace std; class Dijkstra { private: int graph[30][30]; int predecessor[30],dist[30]; bool mark[30]; int source; int vertices; public: void input(); ...
ALGO
0.999973
3.126963
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-05-30T15:33: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": "56366717a...
99aac46b-ca5e-4593-903c-9fcc976f519f
vsumavane/Sem-7
INS/Cipher/Cpp/pract_5.cpp
#include <iostream> #include <vector> #include <cmath> using namespace std; // Function to generate the key matrix from the key string void getKeyMatrix(string key, int keyMatrix[][3]) { int k = 0; for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { keyMatrix[i][j] = (key[k]) % 65; ...
ALGO
0.999993
5.623682
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2024-07-03T04:53:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "305fdc10f03...
5ba7fff3-fa9c-481a-99db-5ad0e5d2105d
padap/technosphere
p4/shell.cpp
#include <iostream> #include <vector> #include <fcntl.h> #include <set> #include <unistd.h> #include <signal.h> #include <sys/stat.h> // system: Mac OS using namespace std; set <int> setAllProc; void interruptSignalVoid(int sig) { //to finish final 6th test signal(SIGINT, interruptSignalVoid); auto beg...
TOOL
0.912527
3.725583
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2016-05-10T15:30: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": "5de7465c7...
242c5658-34c2-4349-8dbc-7014e8945c3d
ishandutta2007/codeforces-a
abc864197532/normal/1474/C.cpp
#include <bits/stdc++.h> using namespace std; #define lli long long int #define mp make_pair #define pb push_back #define eb emplace_back #define test(x) cout << "Line(" << __LINE__ << ") " #x << ' ' << x << endl; #define printv(x) {\ for (auto i : x) cout << i << ' ';\ cout << endl;\ } #define pii pair <int, int> #d...
ALGO
0.999918
3.76932
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f4665e06b49e...
31b36595-a595-4841-8e25-56b19954163b
changicho/algorithm-training
LeetCode/medium/2192. All Ancestors of a Node in a Directed Acyclic Graph/answer.cpp
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; // use topological sort // time : O(V^2 * log_2(V) + E) // space : O(V + E) class Solution { public: vector<vector<int>> getAncestors(int n, vector<vector<int>> &edges) { vector<vector<int>> graph(n); vector<i...
ALGO
0.999991
6.552524
{ "github_metadata": { "branch": "master", "commit_count": 2455, "repo_created_at": "2019-09-02T14:53:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 44, "forks": 4, "issues": 25, "pull_requests": 0 }, "file_meta": { "content_id": "42c65...
1617e78b-47db-4df9-ac14-50035fd81bf0
tanvirakon/Discrete-math
lab8/1.cpp
//last lab #include <bits/stdc++.h> using namespace std; #define int long long int #define endl '\n' #define nn 100009 #define pb push_back #define mp make_pair #define ff first #define ss second #define YES cout << "YES\n" #define NO cout << "NO\n" #define f0(n) for (int i = 0; i < n; i++) #define f1(n) for (int i = ...
ALGO
0.999965
4.191977
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2023-03-01T07:19: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": "b908eeb8e08...
86ec2d44-e15b-4bc4-8777-7076d546b1b0
thanhhtung3008/code
HK2/ONHK2/B1.cpp
/* Author : <NAME> - Tran Hung Dao High School */ #include <bits/stdc++.h> using namespace std; #define ft first #define sc second #define ll long long #define FOR(i, l, r) for (ll i = (l); i <= (r); ++i) #define FORD(i, r, l) for (ll i = (r); i >= (l); --i) const ll maxn = 1e6 + 7; const ll N = 2e5 + 7; const long...
ALGO
0.999668
4.045019
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2024-08-09T09:31:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4710a33bbf6...
cd113594-97ea-4ec8-9bf3-bd6bfc9216f6
OnionPringles/teamnote
sqrtmodp.cc
namespace NT { int powmod(long long n, int e, int p) { int ret = 1; while (e) { if (e&1) ret=ret*n%p, e--; else n=n*n%p, e/=2; } return ret; } //zQ should have order 2^S int sqrt_modp(long long a, int p, long long zQ, int& stat) { stat = 1; if (!a) return 0; if (powmod(a, (p-1)/2, p)==p-1) { ...
ALGO
0.999749
3.71216
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-05-20T05:10: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": "4867e162f3...
c41f705e-e465-4e75-af31-fa33ad6cbce4
chrisv723/RunLengthDecode
main.cpp
/** * main.cpp * * Created on: Mar 26, 2020 * Author: <NAME> * * This program accepts an encoded/compressed image file as input * I previously programmed the encoding/compression algorithm for such image files. This program accepts the resulting encoding previously generated * and decodes/decompresses th...
DATA
0.975014
3.905677
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-12-31T06:31: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": "6b4d356129...
3c69d4c6-d4df-4b02-b1d4-cfbe2cb1da33
amerov/cpp-practice
data_structure/2013/src/leetcode/longest_valid_parentheses.cpp
/** REF http://discuss.leetcode.com/questions/212/longest-valid-parentheses Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the longest valid parentheses substring is "()", which has length = 2. Another example is ...
ALGO
0.999311
5.062708
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2015-08-09T15:16:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bbf211d83...
aac897e0-f383-4a59-bd88-49eed4b842c3
jeromeNoir/QuICCPython
include/Quadratures/PrueferAlgorithm.hpp
/** * @file PrueferAlgorithm.hpp * @brief Implementation of a Pruefer algorithm to compute a quadrature rule * @author <NAME> \<<EMAIL>\> */ #ifndef PRUEFERALGORITHM_HPP #define PRUEFERALGORITHM_HPP // System includes // // External includes // // Project includes // #include "Base/Precision.hpp" namespace Qu...
ALGO
0.999986
6.332881
{ "github_metadata": { "branch": "master", "commit_count": 276, "repo_created_at": "2018-11-13T14:27:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4d4ef4c...
d5f2ee2c-9390-4612-b6f8-801d74834d68
pogery-foggy/BOJ_study
code/2023/2023_09_18_after/7983_greedy.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; int N, ti, si; long long answer; vector<pair<int, int>> TS; bool cmp(pair<int, int> a, pair<int, int> b) { if (a.second == b.second) { return a.first > b.first; } return a.second > b.second; } void init() { cin >>...
ALGO
0.999953
3.810672
{ "github_metadata": { "branch": "main", "commit_count": 197, "repo_created_at": "2023-01-17T09:30: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": "5c250c1265...
fdd2ba76-9cc9-4a8a-b79b-1b6286f6dc62
baolingfeng/ProgrammingPractice
leetcode/searchinsertposition.cpp
#include<iostream> #include<vector> using namespace std; class Solution { public: int searchInsert(vector<int>& nums, int target) { int l = 0; int r = nums.size() - 1; int m; while(l <= r) { m = (l + r) / 2; if(nums[m] == target) { ...
ALGO
0.999978
5.700851
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-08-18T04:46: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": "489e769443...
84b68c51-78a8-49bb-b74f-c455f39ffa69
dhruv-yadav-nitj/striver-a2z-dsa-cpp
Step 17 ~ Trie/02-IMPLEMENTATION.CPP
/* * @lc app=leetcode id=208 lang=cpp * * [208] Implement Trie (Prefix Tree) */ // @lc code=start #include <bits/stdc++.h> #define IOS ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) using namespace std ; // it is clearly given that the word and prefix consists of lowerCase English Alphabets class TrieNode{...
ALGO
0.999825
6.148949
{ "github_metadata": { "branch": "main", "commit_count": 173, "repo_created_at": "2023-06-07T19:26:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 52, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba6c690d...
acb79ffb-3872-42bc-b293-3fbd558b2e6f
invo12/AC
AN_2_SEM_2/PA/Lab1.cpp
#include<iostream> using namespace std; //p1 struct Nod { int data; Nod* next, *prev; }; void InserareFata(Nod*& head, int x); void InserarePozitie(Nod*& head, int poz, int x); void InserareDupa(Nod* q, int x); void AfisareLista(Nod* head); //p2 void Rotire(char a[100][100],int n); void Afisare(char a[100][100], i...
ALGO
0.99882
3.92316
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2018-11-06T07:00:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8504c45a0...
d99306c1-5f60-4016-9f9b-ff99a1087b50
chestnutme/pat-solution
1004.cpp
#include <cstdio> #include <queue> #include <vector> #include <algorithm> using namespace std; const int maxn = 107; vector<int> tree[maxn]; int h[maxn] = {0}; int leaf[maxn] = {0}; int maxH = 0; void BFS() { queue<int> q; q.push(1); while(!q.empty()) { int id = q.front(); q.pop(); ...
ALGO
0.999976
3.884254
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-03-04T15:05: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": "472a3e2e94...
9e9c2868-0c7b-4d1d-b8da-d9b4bc0cf5ef
laurentkneip/opengv
src/point_cloud/methods.cpp
/****************************************************************************** * Author: <NAME> * * Contact: <EMAIL> * * License: Copyright (c) 2013 <NAME>, ANU. All rights reserved. * * ...
ALGO
0.998464
6.712993
{ "github_metadata": { "branch": "master", "commit_count": 146, "repo_created_at": "2013-08-10T03:56:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1069, "forks": 355, "issues": 43, "pull_requests": 14 }, "file_meta": { "content_id": "3...
cd354851-59a7-4b86-ad16-5396d6fd23a8
yzj19870824/000.LinkList
main.cpp
#include "stdlib.h" #include "stdio.h" #include "malloc.h" #include "string.h" typedef int DataType; struct ListNode{ DataType m_nKey; struct ListNode* m_pNext; }; typedef struct ListNode* LinkList; LinkList CreateLinkListTail(LinkList root, int arr[], int len){ int idx; for(idx = 0; idx < len; idx+...
ALGO
0.999912
4.094823
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-10-11T16:55: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": "715ebeb5dc...
826bf03b-3f20-4406-84da-446798d01d5c
JeffersonLab/chroma
lib/update/molecdyn/old/wlhdsduf_w.cc
/* $Id: wlhdsduf_w.cc,v 3.0 2006-04-03 04:59:10 edwards Exp $ ($Date: 2006-04-03 04:59:10 $) */ /* This routine is specific to Wilson fermions! */ /* WlhDsDuf -- computes the derivative of the fermionic action respect the */ /* link field */ /* u -- gauge field ( Read ) */ /* | dS dS_f */ /* ...
ALGO
0.999308
4.612775
{ "github_metadata": { "branch": "master", "commit_count": 12973, "repo_created_at": "2013-08-13T18:20:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 65, "forks": 55, "issues": 1, "pull_requests": 12 }, "file_meta": { "content_id": "87d9...
3d8cba72-6cb8-4d10-be5a-b951c99ab6e1
TNWorkers/VMPS
bases/deprecated/FermionBase.h
#ifndef FERMIONBASE #define FERMIONBASE /// \cond #include <algorithm> #include <iterator> #include <boost/dynamic_bitset.hpp> #include <Eigen/Core> /// \endcond #include "symmetry/kind_dummies.h" #include "DmrgTypedefs.h" // for SPIN_INDEX, SPINOP_LABEL #include "tensors/SiteOperator.h" #include "DmrgExternal.h" //...
ALGO
0.947815
4.659912
{ "github_metadata": { "branch": "master", "commit_count": 997, "repo_created_at": "2020-06-26T07:53:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f08b637c2...
f07ca052-552f-4a4f-80a5-3321436a0aef
rishabhs/sygus-comp14
solvers/enumerative/esolver-synth-lib/src/z3-4.3.1/src/sat/tactic/goal2sat.cpp
/*++ Copyright (c) 2011 Microsoft Corporation Module Name: goal2sat.cpp Abstract: "Compile" a goal into the SAT engine. Atoms are "abstracted" into boolean variables. The mapping between boolean variables and atoms can be used to convert back the state of the SAT engine into a goal. Th...
ALGO
0.997895
5.785017
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2014-01-02T19:42:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 19, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "0598b9d...
f3cadca0-f8ee-4155-b585-c20588377863
icharle/huffman
data/main.cpp
// // main.cpp // 哈夫曼编码译码器系统 // // Created by John on 2018/3/1. // Copyright © 2018年 Icharle. All rights reserved. // #include <iostream> #include <algorithm> #include <cstring> #include <fstream> #include <cassert> using namespace std; #define MAXBIT 100 //存放编码 #define MAXVALUE 1000000 //为后面选取权值...
ALGO
0.999831
3.133873
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-03-19T14:20:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "1414dad3a...
cb3ab5ce-d4cd-4cb7-adc6-759e9b40d834
dgreenberg/sbmvivo
mex/sbm_cuda/cuda5s_mex.cpp
//usage: [marglik, log_sum_raw_w, neff, nmean] = cuda5s_mex(g, f, u, q_spike, seedval) #include "cuda5s2b.h" #include "mex.h" #include "matrix.h" #include <cmath> #define VAR_marglik plhs[0] #define VAR_log_sum_raw_w plhs[1] #define VAR_neff plhs[2] #define VAR_nmean plhs[3] #define VAR_gpmean plhs[4] #define...
ALGO
0.999643
5.071307
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2018-11-30T00:50:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 3, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "88d693479...
e4509a1a-2d86-4c64-bbde-5aeccbb587af
Stolen-king/-CrackYourInternship
045_add_binary.cpp
class Solution { public: string addBinary(string a, string b) { // Ensure both strings are of the same length by padding with zeros at the beginning int maxLen = max(a.size(), b.size()); while (a.size() < maxLen) { a = '0' + a; } while (b.size() < maxLen) { ...
ALGO
0.999967
6.803362
{ "github_metadata": { "branch": "main", "commit_count": 114, "repo_created_at": "2024-07-21T13:16: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": "191d47a6d5...
7e8769e9-96d0-49ea-9661-680d10ac6ffd
shivani789/Complete_practical_files
Information_Security/lzw.cpp
#include <bits/stdc++.h> using namespace std; vector<int> encoding(string s1) { cout << "Encoding\n"; unordered_map<string, int> table; for (int i = 0; i <= 255; i++) { string ch = ""; ch += char(i); table[ch] = i; } string p = "", c = ""; p += s1[0]; ...
ALGO
0.999913
3.922293
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2021-02-03T12:48: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": "f9edf095c45...
cd586245-fbc6-4f54-99b3-39973c2dff3b
akirasatou/grapheneDiffusion
calc/bin/mainGain-VgWgLgDep-grounded.cpp
#include <stdio.h> #include <math.h> #include <PhysicalConstants.h> #include <PhysicalUnits.h> #include <Complex/Complex.h> using namespace std; double sigma_inter(double E, double mu, double T) { double f = 1.0/(1.0+exp((E-mu)/(kB*T))); return e*e/(4*pi*eps0*4*hbar)*(1-2*f); } Complex calc_kw(double f, double ...
ALGO
0.998172
3.493929
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2024-10-01T03:44: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": "bf14bff48...
7d610757-6761-4c7c-970f-13be8af5926a
suraj-iitb/algorithm-identification
BERT/Data_Dump/Selection/C++/Code/selection5173539.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; int arr[100]; for (int i = 0; i < n; ++i) { cin >> arr[i]; } int res = 0; for (int i = 0; i < n - 1; ++i) { int min_pos = i; for (int j = i; j < n; j++) { if (arr[min_pos] > arr[j]) m...
ALGO
0.99997
3.848967
{ "github_metadata": { "branch": "main", "commit_count": 229, "repo_created_at": "2020-05-24T06:21:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 10 }, "file_meta": { "content_id": "2e981b10c...
e493f17f-90b2-4075-adb3-74d45b5a9264
ekdls278/AlgorithmStudy
백준/Gold/15685. 드래곤 커브/드래곤 커브.cc
#include <stdio.h> #include <vector> #define MAX 101 #pragma warning(disable:4996) using namespace std; int dy[] = { 0,-1,0,1 }; int dx[] = { 1, 0,-1,0 }; int n; int x, y, d, g; int map[MAX][MAX]; int main() { #ifdef _DEBUG freopen("C:\\Users\\ekdls\\Desktop\\study\\15685.txt", "r", stdin); #endif scanf("%d", &n); ...
ALGO
0.999774
3.743409
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2023-03-13T14:40: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": "3c0a1127eb...
a0fbbf8f-fb77-4f96-80d5-46d7f9b7e244
risal-shefin/ProblemSolving
codeforces/1556/D.cpp
// #pragma GCC optimize("Ofast,unroll-loops") // #pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define dd double #define ld long double #define sl(n) scanf("%lld", &n) #define si(n) scanf("%d", &n) #define sd(n) scanf("%lf", &n) #d...
ALGO
0.999958
3.452377
{ "github_metadata": { "branch": "master", "commit_count": 1844, "repo_created_at": "2021-09-16T15:53:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd4b824...
351e7edc-a6d4-4d6f-a4a9-e023b1af161a
MichelJuillard/dynare-michel
mex/sources/bytecode/SparseMatrix.cc
/* * Copyright (C) 2007-2013 Dynare Team * * This file is part of Dynare. * * Dynare is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later v...
TOOL
0.982925
3.906072
{ "github_metadata": { "branch": "extended-preprocessor2", "commit_count": 6455, "repo_created_at": "2013-11-03T17:18:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "conte...
135a4ef1-54c7-4299-91bb-db8ee211e1a1
csusbdt/202-2017-fall
template_quicksort/main.cpp
#include <iostream> #include <cassert> using namespace std; // Sort values in range [s, e]. template <class T> void quicksort(T a[], int s, int e) { // If there are zero or one values to sort, // then there is nothing to do. if (e - s < 1) return; // Use last value in range [s, e] as pivot. // Re-organize rang...
TEST
0.999782
6.094487
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2017-07-17T23:45:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac0f520ac...
911f0810-8059-4453-b062-cb042fd9b26d
daminigarg07/Cpp-Pirates-of-the-Code-ibbean-
practice/array/search matrix.cpp
#include<bits/stdc++.h> using namespace std; bool findNumberInMatrix(vector<vector<int>>& m, int target) { int row=m.size(); int col=m[0].size(); if(row==0 || col==0) return false; for (int i = 0; i < row; ++i) { for (int j = 0; j < col; ++j) { if (m[i][j] == target) { ...
ALGO
0.999915
6.106512
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2024-09-22T18:55: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": "6cdc82bb00...
89fba9fe-0263-41a9-9865-472ff37dce5f
cou929/topcoder
RotatingTriangles.cpp
// BEGIN CUT HERE // END CUT HERE #include <sstream> #include <string> #include <vector> #include <map> #include <algorithm> #include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <utility> #include <set> #include <cctype> #include <queue> #include <stack> using namespace std; class Rotating...
ALGO
0.999491
4.057889
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2010-01-17T10:59:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 10, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f2fcbd1...
cb146869-d6bc-484c-a294-534ae1028d59
timi-liuliang/echo
thirdparty/mlpack/core/optimizers/adam/amsgrad_update.hpp
/** * @file amsgrad_update.hpp * @author <NAME> * * Implementation of AMSGrad optimizer. AMSGrad is an exponential moving average * optimizer that dynamically adapts over time with guaranteed convergence. * * mlpack is free software; you may redistribute it and/or modify it under the * terms of the 3-clause BS...
ALGO
0.955132
7.569352
{ "github_metadata": { "branch": "master", "commit_count": 3016, "repo_created_at": "2018-03-10T04:07:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 971, "forks": 116, "issues": 254, "pull_requests": 0 }, "file_meta": { "content_id": "3...
279b85aa-f43a-43b4-830e-0a16e8eb5aa5
zlaouar/AlgorithmicMotionPlanning
hw4/code/cobstacle.cpp
#include <iostream> #include <cmath> #include <vector> #include <fstream> #include "cobstacle.h" #include <cstdarg> #include <algorithm> #include <typeinfo> using namespace std; #define PI 3.14159265 vector<vector<double>> Cobstacle::getCobstacleTrans(vector<vector<double>> obstacle, vector<vector<double>> robot){ ...
ALGO
0.999611
4.146132
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-10-14T05:23: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": "bf8ec712c42a...
56db2ebc-8527-4398-bf9d-3cfc76649bfb
poojacos/graph_algos
allpaths_src_to_dest.cpp
#include <bits/stdc++.h> using namespace std; vector<vector<int> > allpaths; void dfs(int v, int t, vector<int> &path, vector<vector<int> >& graph, vector<bool>& visited){ visited[v]=true; path.push_back(v); if(v==t){ allpaths.push_back(path); } else{ for(int i=0;i<graph[v].si...
ALGO
0.999791
5.318419
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2020-10-12T19:03: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": "71570988ae1...
884bebde-72a4-4e64-92ea-35743de8f991
Preebie/CSCE_121
Test 3/Test 3/LinkedList.cpp
#include "LinkedList.h" #include <iostream> #include <string> using std::cout; using std::endl; using std::string; using std::size_t; Node::Node(int data) { this->data = data; this -> next = nullptr; } size_t LinkedList::size() const { return _size; } void Node::setNext(Node* other) { this->next = other; } v...
TOOL
0.978329
3.209082
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-09-13T00:57:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00723579e1c4...
ea9aae6b-5a9f-4540-a080-116faa7f534d
THU-DSP-LAB/ventus-driver
codetests/hello.cpp
#include <iostream> #include <vector> #include <queue> #include <cstdlib> //#include "ventus.h" #include "testlib.h" using namespace std; /* int search_binary(vector<int>v, int value) { int low = 0; int high = v.size() - 1; int mid = (low + high) / 2; if (value <= v[low]) return low; if (value ...
ALGO
0.998384
3.270044
{ "github_metadata": { "branch": "main", "commit_count": 128, "repo_created_at": "2023-07-04T10:04:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 4, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d2b68b4c885...
dacd0a89-5e7c-41b8-8fae-fd2573c6c9b1
SodiumBismuth/GameOfLife
grid.cpp
#include "grid.h" #include <fstream> #include <sstream> #include <filesystem> #include <iostream> #include <stdlib.h> using namespace std; namespace fs = filesystem; Grid::Grid(int width, int height, const string& folder_name) : h(height), w(width), grid(height, vector<Cell>(width)), output_folder(folder_name) { ...
ALGO
0.954906
4.351707
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2024-11-26T15:04:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "58ec50fa211...
1e212275-20b5-4c1a-ba76-236fc266353c
MaheshChowdary2004/C-
harshad number.cpp
#include <iostream> using namespace std; bool isHarshad(int number) { int sumOfDigits = 0; int temp = number; // Calculate sum of digits while (temp != 0) { sumOfDigits += temp % 10; temp /= 10; } // Check if the number is divisible by the sum of its digits return number %...
ALGO
0.998989
5.096772
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-01T08:31: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": "724b00b75021...
4bf2a978-155a-43e4-8c6d-61a966896d96
ignaciohermosillacornejo/competitive_programming
Code Forces/Nature Reserve/Nature Reserve.cpp
/* Problem: https://codeforces.com/problemset/problem/1059/D?locale=en Tags: Geometry, BinarySearch Status: Accepted */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> ii; typedef vector<int> vi; typedef vector<ll> vll; typedef vector<ii> vii...
ALGO
0.999933
4.445595
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2017-10-27T01:08: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": "23556455d...
1177f050-0767-42cb-b1b8-2b68e87e6c0a
Kodsport/swedish-olympiad-2019
onlinekval/brevoptimering/submissions/accepted/ng_100.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define trav(a, x) for(auto& a : x) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() #define hash dhsjakhd typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; t...
ALGO
0.999848
3.456237
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2018-12-03T14:10:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2be3f3d005...
02e2bf94-f104-4406-836c-5b392c3c4b4b
EeeUnS/2020CppStudy
week1/JunYoung/4-1.cpp
#include <algorithm> #include <iostream> #include <vector> typedef struct node { char name[10]; int x; int y; } Node; int main(void) { std::vector<std::vector<int>> adjList(100, std::vector<int>(0,0)); std::vector<Node> nodeList; Node tempData; std::vector<int>::iterator iter; int nu...
ALGO
0.999764
4.132712
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2019-12-26T09:44:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "42c4bb33b...
f1a3aafd-f92f-4a36-9d75-6b19a5e39dfa
DStrelak/xmipp
libraries/data/fourier_projection.cpp
/*************************************************************************** * * Authors: <NAME> (<EMAIL>) * * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License a...
ALGO
0.921779
6.018865
{ "github_metadata": { "branch": "master", "commit_count": 123, "repo_created_at": "2018-08-16T12:29:46.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "I2PC/xmipp", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1...
acff8a40-70e9-481a-9cbc-a146a678896f
stan-dev/math
stan/math/prim/fun/scale_matrix_exp_multiply.hpp
#ifndef STAN_MATH_PRIM_FUN_SCALE_MATRIX_EXP_MULTIPLY_HPP #define STAN_MATH_PRIM_FUN_SCALE_MATRIX_EXP_MULTIPLY_HPP #include <stan/math/prim/meta.hpp> #include <stan/math/prim/err.hpp> #include <stan/math/prim/fun/matrix_exp.hpp> #include <stan/math/prim/fun/matrix_exp_action_handler.hpp> #include <stan/math/prim/fun/mu...
ALGO
0.994298
6.109239
{ "github_metadata": { "branch": "develop", "commit_count": 28933, "repo_created_at": "2015-07-01T18:40:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 785, "forks": 195, "issues": 298, "pull_requests": 19 }, "file_meta": { "content_id": ...
c7a8af64-08a4-4a1d-b75d-e054ce371be9
runvs/2023-11-03_FrankenGameJam2023
impl/jamtemplate/common/tilemap/tilemap_collisions.cpp
#include "tilemap_collisions.hpp" #include <algorithm> #include <cassert> namespace { int getEntry(std::vector<int> const& vec, int x, int y, int width) { auto idx = x + y * width; assert(static_cast<unsigned>(idx) < vec.size()); return vec[idx]; } void setEntry(std::vector<int>& vec, int x, int y, int w...
ALGO
0.994076
6.163903
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2023-11-03T21:00:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16051b2525...
73a67570-0496-44ff-a2d1-de59a4629f4d
trinhminhtriet/leetcode
solutions/0300-0399/0364.nested-list-weight-sum-ii/Solution.cpp
/** * // This is the interface that allows for creating nested lists. * // You should not implement it, or speculate about its implementation * class NestedInteger { * public: * // Constructor initializes an empty nested list. * NestedInteger(); * * // Constructor initializes a single integer. * ...
ALGO
0.999868
5.779634
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2024-12-09T17:55:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "18dea1...
ae18a104-b8d4-4664-ae78-7f0f85954e88
rg2/xreg
lib/image/xregLabelWarping.h
/* * MIT License * * Copyright (c) 2020 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, m...
ALGO
0.917898
7.136208
{ "github_metadata": { "branch": "master", "commit_count": 314, "repo_created_at": "2020-09-14T18:53:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 105, "forks": 23, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "73144...
9ea14029-ea78-46d2-9b3b-6b22682521a0
alejoordonez02/counter-strike-2d
server/game/world/physics/player_physics.cpp
#include "player_physics.h" #include <algorithm> #include <numeric> #include <optional> #include <vector> #include "common/position.h" #include "hitbox.h" #include "trajectory.h" namespace PlayerPhysicsConstant { constexpr int max_collisions = 5; } /* * Get distance to a hitbox * */ float PlayerPhysics::get_dista...
ALGO
0.996154
7.034431
{ "github_metadata": { "branch": "main", "commit_count": 869, "repo_created_at": "2025-05-09T14:07:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "8913dfc969...
81d82ea1-60de-4aa9-8c2f-20c07d85fb15
danieltrt/SBFL
results/py/FIND_NUMBER_PAIRS_ARRAY_XOR_0.cpp
int f_filled ( string a ) { sort ( a . begin ( ) , a . end ( ) ) ; int count = 1 ; int answer = 0 ; for ( int i = 1 ; i < a . length ( ) ; i ++ ) { if ( a [ i ] == a [ i - 1 ] ) count ++ ; else { answer = answer + count * ( count - 1 ) / 2 ; count = 1 ; } } answer = answer + coun...
ALGO
0.999862
4.066591
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-08-03T19:59:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b713785a50b2...
d6a7a02d-0335-4708-a1ef-ce4a9dfa7f79
manassinghdewari/dsa
08Hashing/26LongestConsecutiveSubsequence.cpp
// longest consecutive subsequence means difference between // the elements should be one // first method // By usign sorting // time complexity nlogn // #include <bits/stdc++.h> // using namespace std; // int findLongestConsecutive(int arr[], int n) // { // int res = 1, curr = 1; // sort(arr, arr + n); // ...
ALGO
0.99982
5.684164
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2022-11-06T06:41: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": "672f0523d...
cd4bbfdd-4e3f-49fa-bc6f-474681090ab5
pallab99/CP-Solutions
CodeForces/GNU C++17/1156C | Match Points/88097222.cpp
///Have faith in god. #include<bits/stdc++.h> using namespace std; using ll = long long int; using vll = vector<ll>; using vii = vector<int>; using pll = pair<ll,ll>; using pii = pair<int,int>; using ull = unsigned long long int; //=============Typedefines=============// #define sp " " #define ...
ALGO
0.999977
3.757406
{ "github_metadata": { "branch": "main", "commit_count": 1064, "repo_created_at": "2022-09-15T12:34: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": "27489ecb8...
fd1b9a4c-d140-4aa0-8b95-3ee00958b37b
phylo42/sherpas
sherpas/src/groups.cpp
/* * groups.cpp * * Created on: 22 may 2019 * Author: scholz */ #include<iostream> #include<fstream> #include<vector> #include <string> #include<cmath> #include "groups.h" using namespace std; //everything needed to put the notion of groups at the heart of the output. //does not affect the way the main al...
ALGO
0.932509
3.968434
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2020-02-25T14:53:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9, "forks": 4, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "9b57c2d05...
44bf0dcc-59c5-4282-afd9-34f83de4a88d
Shantanu1099/Problem_Solutions
LC_balancedParanthesis.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define lli long long int #define vi vector<int > #define vvi vector<vector <int >> #define pb push_back #define pob pop_back // Always remember Overflow // Using Backtracking vector<string > valid; void generatePar(string &s, int open, int close){ // ...
ALGO
0.999666
4.192276
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2020-09-25T13:37:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c823226...
296b2679-71b1-47ed-a244-505b9753feae
DerrickWood/kraken2-experiment-code
Utilities/evaluate_calls.cc
#include <bits/stdc++.h> #include <err.h> #include <sysexits.h> using namespace std; void PopulateTaxonomy(unordered_map<int, string> &rank_map, unordered_map<int, int> &parent_map, const string &nodes_file) { ifstream file(nodes_file); if (! file) err(EX_NOINPUT, "error opening %s", nodes_file.c_str()); st...
DATA
0.946486
4.508759
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-07-22T14:35:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d6e95d73f...
43a938ce-e0de-4021-8e4a-981e92667f76
aklk1ng/code
cpp/cf/1635C.Differential_Sorting.cpp
#include <bits/stdc++.h> typedef long long ll; void solve() { int n; std::cin >> n; std::vector<int> a(n); for (int i = 0; i < n; i++) { std::cin >> a[i]; } if (a[n - 2] > a[n - 1]) { std::cout << "-1\n"; } else { if (a[n - 1] < 0) { if (std::is_sorted(a.begin(), a.end())) { st...
ALGO
0.999242
3.723833
{ "github_metadata": { "branch": "main", "commit_count": 495, "repo_created_at": "2022-02-09T13:42:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "de0d066d6a...
1f2aa7f5-f133-4bee-9f2d-8d0ef8146024
FallingStar624/GSDS3_Algo
sangsoo/0x16 Binary search tree/23326.cpp
#include <iostream> #include <set> using namespace std; int N, Q; int d; // 도형이의 위치 int main(){ ios::sync_with_stdio(0); cin.tie(0); cin >> N >> Q; set<int> s; for(int i = 0; i < N; i++){ int t; cin >> t; // cin 확인 잘해야.. if(t) s.insert(i); // 1값만 저장 } for(int i = 0; ...
ALGO
0.999822
3.966507
{ "github_metadata": { "branch": "main", "commit_count": 1008, "repo_created_at": "2022-03-30T08:56:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "702102cc8...
3dbdf37f-b2f3-4bc7-80ef-b633273a36ce
jinzcdev/PTA
PAT_(Advanced_Level)_Practice/编程题/1130 Infix Expression.cpp
// https://pintia.cn/problem-sets/994805342720868352/exam/problems/type/7?problemSetProblemId=994805347921805312 #include <bits/stdc++.h> using namespace std; struct node { string data; int lc, rc; } bt[25]; bool isOperator(int adr) { return bt[adr].lc != -1 || bt[adr].rc != -1; } string inOrder(int i) { if...
ALGO
0.999989
4.595524
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-01-23T14:11:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 27, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "620ca2a6ae0...
1561ccfe-c818-4e42-8fcc-d53a4d973b11
Yaduraj01/CPPDS-linkedlist
linkedlist.cpp
#include<iostream> using namespace std; struct node { int data; struct node *next; }; class linked_list { struct node *head; public: void add_node_beg() { struct node *newnode; int x; newnode = (struct node*)malloc(sizeof(struct node)); cout << "enter data for t...
ALGO
0.991067
4.226175
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-10-17T09:45: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": "f5e2aea4ee3d...
c3ded371-8fc6-4f06-9bdd-d47839e75e93
arriveenet/OpenGLOthello
OpenGLOthello/main.cpp
#define _USE_MATH_DEFINES #include <math.h> #include <time.h> #include <stdio.h> #include <stdarg.h> #include <freeglut.h> #include <glm/glm.hpp> #include <glm/gtx/transform.hpp> #include <glm/gtx/intersect.hpp> #include <vector> #include "Disc.h" #define WINDOW_WIDTH (960) #define WINDOW_HEIGHT (640) #define BOAR...
ALGO
0.967057
4.167609
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2022-04-21T03:46:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6676bc5258...
49a88029-d2d1-4f9c-99bd-d4629c8d3487
chickenchobab/BOJ-problem-solving
4_graph/6_topo_sort/24461_그래프의_줄기.cpp
#include <iostream> #include <algorithm> #include <vector> #include <deque> #define fastio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); using namespace std; int n; vector<int> edges[100000]; // bfs의 turn을 시간과 공간의 trade-off 만들기 int connected[100000], turn_idx[100000], turn_cnt[100000]; deque<int> q; vector<int...
ALGO
0.999971
4.870921
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2023-07-26T09:20: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": "1a577f4d26c...
58b70691-04ae-4842-bff1-50d4ed5929bf
minh1609/algorithm-cpp
Lab6/heapsort.cpp
using namespace std; #include <iostream> void heapify(int arr[], int n, int root) { int left = 2 * root + 1; int right = 2 * root + 2; int high = root; if (left < n && arr[left] > arr[high]) high = left; if (right < n && arr[right] > arr[high]) high = right; if (high != root)...
ALGO
0.999866
5.555673
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-01-10T17:57: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": "d8b6e4151...
2b16c955-f70d-4def-9edf-d7a4e51a597d
Mike1604/Codeforces-Practice
Data Structures/Teleporters.cpp
#include<bits/stdc++.h> #define fore(i,a,b) for(int i=(a), FINALD=(b); i<FINALD; ++i) #define ENDL '\n' #define f first #define s second #define _ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define sz(s) int(s.size()) #define all(s) s.begin(), s.end() using namespace std;...
ALGO
0.999977
3.673264
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2023-03-15T17:42: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": "6066ae4ef40...
4f87d400-cf18-42b2-b69d-2ffc4fca4890
Divyalok123/LeetCode_Practice
contest_practice/WC239/Splitting a String Into Descending Consecutive Values.cpp
/* https://leetcode.com/contest/weekly-contest-239/problems/splitting-a-string-into-descending-consecutive-values/ */ #include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; class Solution { public: bool splitString(string s, int i = 0, unsigned long long pre = -1, int pr...
ALGO
0.999948
5.897641
{ "github_metadata": { "branch": "master", "commit_count": 313, "repo_created_at": "2020-04-18T22:23: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": "089c91f7...
5bca23db-f209-46ad-b92d-bc43cf6247e1
google-research/exoplanet-ml
exoplanet-ml/light_curve/fast_ops/phase_fold.cc
/* Copyright 2018 The Exoplanet ML Authors. All Rights Reserved. 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 ...
ALGO
0.980532
6.580523
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2018-12-04T18:57:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 299, "forks": 118, "issues": 11, "pull_requests": 3 }, "file_meta": { "content_id": "8924...
aa80bee8-daef-4e45-bd1f-b185cb76b928
Abhi-webd/DSA
157. smallest number with given number and digit.cpp
// { Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: string smallestNumber(int S, int D){ // code here if(D*9 < S){ return "-1"; } vector<int> n(D,0); n[0] = 1; int sum = 1; int...
ALGO
0.999708
5.301497
{ "github_metadata": { "branch": "main", "commit_count": 272, "repo_created_at": "2022-05-24T13:22: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": "6702adcd5c...
99216e2f-04d3-477d-8564-c6bfcb04efd8
syed-jafrul-husen/Competitive-Programming-Code
UVA/11226/20955604_AC_90ms_0kB.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long const int high = 500050; ll arr[500050]; ll tree[3*500050]; ll spf[high+5], divisor[high+5]; void buildTree(ll node,ll b,ll e) { if(b==e) { tree[node] = arr[b]; return; } ll left = node*2; ll right = node*2+1; ...
ALGO
0.99989
4.152308
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-10-15T14:27:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a41819a25218...
e9db0385-68a4-42ae-907e-2d972a08cc39
qasimali72/Object-oriented-programming
Assignment/Assigment#8/Q3.cpp
#include <iostream> #include <stdio.h> using namespace std; int main() { int number, rev_number, next_digit,last_digit; cout<< "Enter the number that is to be reversed: "; cin>>number; last_digit = number - ((number / 10) * 10); rev_number = last_digit; /* 5 */ next_digit = (number / 10) - ((number / 100) * 10...
ALGO
0.995945
3.159893
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-05-23T20:37: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": "fe618a888c14...
e6fdaf25-9d52-411e-9153-eca1fa37ea59
harshgupta9129/DSA-in-CPP
022 All about Char Arrays Strings solving LeetCode Questions/08_String_Compression.cc
#include<bits/stdc++.h> using namespace std; int string_compression (vector <char> &chars) { int i = 0; int pos = 0; while (i<chars.size()) { int count = 1, j = i+1; while (j<chars.size()) { if (chars[i]==chars[j++]) count++; else { j--; ...
ALGO
0.999997
4.028624
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2025-05-16T14:45:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6797b3140e5...
65aff49e-14d7-4568-a3bf-b83c2d61aefc
Leaves333/competitive-programming
2119b.cpp
#pragma optimize("O3") #include <bits/stdc++.h> using namespace std; #define all(x) begin(x), end(x) typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vll; typedef vector<vll> vvll; typedef vector<bool> vb; typedef vector<vb>...
ALGO
0.999968
4.405571
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2024-12-19T02:29: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": "b07eebf4...
0dfd602e-ebdb-4d26-af34-e146e820fad2
nnlnuu/Algorithm
백준/Silver/17127. 벚꽃이 정보섬에 피어난 이유/벚꽃이 정보섬에 피어난 이유.cc
/** * [SILVER 5] 벚꽃이 정보섬에 피어난 이유 * @writer : nnlnuu */ #include<bits/stdc++.h> #include<vector> #include<string> using namespace std; #define FASTIO ios::sync_with_stdio(0),cin.tie(0); int n; int idx[3]={1,2,3}; int arr[10]; int mult(int start, int end){ int val=1; while(start < end){ val *= arr[star...
ALGO
0.999982
3.841069
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2023-06-27T08:53: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": "5f27601b...
1e027a18-44c8-4204-8d07-8f019b5d8ee2
utsxvrai/CrackYourPlacement
Day 01/SetMatrixZeroes.cpp
// TakeAway: Use a vector to store the indexes of the zeroes and then iterate over the vector to set the rows and columns to zero. // Time Complexity: O(n*m) // Space Complexity: O(n) // https://leetcode.com/problems/set-matrix-zeroes/ class Solution { public: void setZeroes(vector<vector<int>>& mat) { ve...
ALGO
0.999612
6.628009
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-07-15T18:47:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10193dfa1a9...
f4d7f4f3-d382-4519-bc5b-e46ad9571f72
HangKeon/BaekJoon
BaekJoon/BaekJoon/2980(도로와 신호등).cpp
#include <iostream> using namespace std; int main() { int n, l; //n = 신호등의 개수, l = 도로의 길이 int d, r, g; //d = 신호등의 위치, r = 빨간색이 지속되는 시간, g = 초록색이 지속되는 시간 int time = 0, preD = 0; //time = d 위치에 도착하는 데 걸리는 시간, preD = d까지 이동한 거리 int total = 0; //total = 도로 끝까지 이동하는데 걸리는 시간 cin >> n >> l; for (int i ...
ALGO
0.999115
3.518288
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-12-27T07:37:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "58a3096ed...
3e966d81-0de5-47c6-9db4-4bf2353efa99
Roler96/leetcode
2215.cpp
#include "common.h" using namespace std; class Solution { public: vector<vector<int>> findDifference(vector<int> &nums1, vector<int> &nums2) { vector<vector<int>> ans(2); sort(nums1.begin(), nums1.end()); sort(nums2.begin(), nums2.end()); int pos = 0; for (int i = 1; ...
ALGO
0.999987
5.539864
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2023-07-07T07:09:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c60edf539...
584dbdc7-0038-4c66-8ca5-b4b8b578a737
kingsmad/leetcode_2017
794.valid-tic-tac-toe-state.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: bool validTicTacToe(vector<string>& board) { int cntx = 0, cnto = 0; for (int i=0; i<3; ++i) for (int j=0; j<3; ++j) { if (board[i][j] == 'X') ++cntx; if (board[i][j] == 'O') ++cnto; } if (cntx < cnto || cntx - cnto ...
ALGO
0.999783
5.520721
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2017-07-15T13:46: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": "ea82ab705...
84e67abf-42de-4479-ae62-2d69701e92bb
rajeevtomr/BowlingGame
main.cpp
#include <iostream> #include <vector> using namespace std; class BowlingGame { public: void addRoll(int pins) { rolls.push_back(pins); } int getScore() { int score = 0; int rollIndex = 0; for (int frame = 0; frame < 10; ++frame) { if (isStrike(rollIndex)) { /...
ALGO
0.999356
7.010683
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-06-20T05:32:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "37f1576f52b6...
7614a69a-99c9-452c-9d2c-cfa4d70500e3
colinroemer/C-projects
ConsoleApplication6/ConsoleApplication6/Lab4.cpp
//*********************************************** // COSC 501 Lab4 // <NAME> DUE-DATE 2/29 // PROGRAM-NAME: Lab 4 // Use Switch to take in a letter and produce a number //*********************************************** #include <iostream> #include <cmath> #in...
ALGO
0.985257
3.407553
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-05-11T16:13:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c0f7835a20...
09366ffe-f231-482b-81d3-5e8ba57a08c6
ilya-dubovitskii/MADE19_algs
Salesman/main.cpp
#include "point.h" #include "Graph.h" #include "tsp.h" #include <iostream> #include <vector> #include <random> #include <iomanip> std::vector<Point> generate_points(int N) { std::vector<Point> result; for (int i = 0; i < N; i++) { // Box-Muller transformation std::random_device rd; std...
ALGO
0.999768
5.597234
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-12-20T09:10: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": "dd35a0fbd3...
fa62afbd-8755-4911-98d6-99f5fb7c5121
junybike/leetcode-daily
2024_Oct/1963_Minimum_Number_of_Swaps_to_Make_the_String_Balanced.cpp
// 2024 Oct 8 class Solution { public: int minSwaps(string s) { int n = s.length(); // length of s int open = 0; // Keep track of opening bracket int close = 0; // Keep track of closing bracket int ans = 0; // Number of swaps for (int i =...
ALGO
0.999657
5.963624
{ "github_metadata": { "branch": "main", "commit_count": 369, "repo_created_at": "2024-09-24T21:36: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": "8479c72bd3...
d50c6f0b-1bfc-4501-a939-42daf0b6fc3d
kei1107/algorithm
problems/yukicoder/No0011.cpp
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; } template<c...
ALGO
0.999863
3.978292
{ "github_metadata": { "branch": "master", "commit_count": 488, "repo_created_at": "2017-10-06T09:12: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": "cfffdab7...
6eebef20-7692-45a0-8940-2d35afc83e90
MekkCyber/competitive_programming_skills
Binary Trees/merge_binary_trees.cpp
/* Given two binary trees, merge them and return the resulting tree. If two nodes overlap during the merger then sum the values, otherwise use the existing node. Ex : tree1 = 1 / \ 3 2 / \ 7 4 tree2 = 1 / \ 5 9 / / \ 2 7 6 o...
ALGO
0.999998
6.175009
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2023-09-23T15:51:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf3ef73a763...
b3e86c3d-227b-4d28-a2a4-fb48dba58b36
0xAuguste/2048
2048.cpp
/* * 2048.cpp * COMP11 Project 1, Spring 2019, Tufts University * Modified by: <NAME> * Date: 3/13/19 */ #include <iostream> #include <iostream> #include <time.h> #include <sstream> using namespace std; // CONSTANTS (IF ANY) GO HERE const int BOARD_HEIGHT = 4; const int BOARD_WIDTH = 4; const string UP = "w"; co...
ALGO
0.984821
4.561715
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-01-24T19:00: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": "aa84304e5724...
688180ba-2841-4ba3-a5eb-5a38343f5096
SmileiPIC/Smilei
src/Projector/Projector3D2OrderV.h
#ifndef PROJECTOR3D2ORDERV_H #define PROJECTOR3D2ORDERV_H #include "Projector3D.h" #include "Pragma.h" class Projector3D2OrderV : public Projector3D { public: Projector3D2OrderV( Params &, Patch *patch ); ~Projector3D2OrderV(); //! Project global current densities (EMfields->Jx_/Jy_/Jz_) inline void ...
ALGO
0.93245
4.438275
{ "github_metadata": { "branch": "master", "commit_count": 11568, "repo_created_at": "2016-06-23T14:07:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 384, "forks": 130, "issues": 21, "pull_requests": 1 }, "file_meta": { "content_id": "91...
aae3fa17-6a6a-436c-a3f4-3125a5d3710f
pritamchaudhary/DSA-Supreme-2.O
Week 2 Basics of Programming/Functions/printMaximum.cpp
#include<iostream> using namespace std; // void printMaximum(int num1, int num2, int num3){ // if(num1 >= num2 && num1 >= num3){ // cout<<"Maximum is: "<< num1<< endl; // } // else if(num2 >= num1 && num2 >= num3){ // cout << "Maximum is: "<< num2 << endl; // } // else{ // c...
ALGO
0.996607
4.080248
{ "github_metadata": { "branch": "main", "commit_count": 234, "repo_created_at": "2023-09-07T16:08:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f56b7cd70f...
c7fd73bc-89d9-4c4e-8177-e221b490262c
yyh888/practice
CodeTop5/CodeTop5/practice.cpp
// 快排 //class Solution { //public: // void QuickSort(vector<int>& nums, int begin, int end) // { // if (begin >= end) return; // int keyIdx = begin + (rand() % (end - begin + 1)); // int key = nums[keyIdx]; // int l = begin - 1, r = end + 1; // while (l < r) // { // ...
ALGO
0.999025
4.636885
{ "github_metadata": { "branch": "master", "commit_count": 626, "repo_created_at": "2022-04-01T14:31: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": "598b67fa...
1ae78766-fff6-4a3e-b75c-160adc70a92f
enrevol/cpp
spoj-vn/BALLGMVN.cpp
#include <algorithm> #include <cassert> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <set> #include <sstream> #include <string> #include <vector> #define m2 std::make_pair #define m3(a, b, c) m2(m2(a, b), c) typedef std::pair<int, int> p2; typedef std::pair<p2, int> p3; struct ...
ALGO
0.999969
3.667545
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2015-03-28T03:24:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "219ec3250...
3fc19ef1-380b-469e-b418-141357be062e
huguangAOA/Mentu-Algorithm
41.金融系统中的 RSA算法(二)/【演示代码】第三十九周-现场撸代码/4.Leetcode-1031.cpp
class Solution { public: int maxSumTwoNoOverlap(vector<int>& nums, int firstLen, int secondLen) { int n = nums.size(); int lmax[n + 1], mmax[n + 1]; memset(lmax, 0, sizeof(lmax)); memset(mmax, 0, sizeof(mmax)); for (int i = n - 1, lsum = 0, msum = 0; i >= 0; i--) { ...
ALGO
0.999972
5.545474
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-08-14T04:05:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d6f986e4b1...
58bfe29a-55d7-4a7b-8f21-c67df2853951
sohonisaurabh/CarND-Extended-Kalman-Filter
src/tools.cpp
#include <iostream> #include "tools.h" using Eigen::VectorXd; using Eigen::MatrixXd; using std::vector; Tools::Tools() {} Tools::~Tools() {} VectorXd Tools::CalculateRMSE(const vector<VectorXd> &estimations, const vector<VectorXd> &ground_truth) { /** TODO: * Calculate the RMSE...
ALGO
0.992982
6.038653
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2017-07-10T06:00:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10e3d17e9...
fe420dae-ee9d-4805-9a5d-2fa27bf92857
AndersonKao/CP_Problems
codeforce/1454/E.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using vi = vector<int>; using pii = pair<int, int>; using pll = pair<ll, ll>; template<typename T> using vec = vector<T>; template<typename T> using Prior = priority_queue<T>; template<typename T> using prior = priority_queue<T, vector<T>, greater<T>...
ALGO
0.999858
4.264593
{ "github_metadata": { "branch": "master", "commit_count": 244, "repo_created_at": "2022-01-23T04:16:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47312ee7...
52e17434-7229-4819-841f-18bb46cd1072
Bossones/StPrataPLC
363.6.cpp
//From <NAME>'s book "Programming language C++" 363.6 #include <iostream> #include <string> #include <vector> #include <cstring> #include <ctime> #include <fstream> #include <cstdlib> #include <cctype> #include <array> using namespace std; const unsigned short SIZE = 200; void Fill_array(double* mass, unsigned short...
ALGO
0.985388
3.712611
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2019-07-25T21:18: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": "73d6db31f...
672584b8-9f5a-40a7-8d8f-93950a6242cf
SadmanRafith/C_plus_plus
EEE 2110 PL Lab/Lab - 1/Question_6.cpp
#include <iostream> using namespace std; int main() { // Initialize the sum to 0 int sum = 0; cout << "Enter numbers: " << endl; // Use a for loop to read numbers from the user and add them to the sum for (int n; cin >> n;) { // Read a number from the user and check if it's not EOF if (n...
ALGO
0.998431
4.125777
{ "github_metadata": { "branch": "main", "commit_count": 143, "repo_created_at": "2022-12-10T07:20:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0340320aca...
6e30244d-b298-463a-b5f4-4dfbf9927096
WYCTSTF/solution
codeforces/contest/1754/a/a.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,a,n) for(int i=a;i<=n;i++) #define per(i,a,n) for(int i=n;i>=a;i--) #define mp make_pair #define pb push_back #define fi first #define se second #define pi acos(-1) #define il inline #define rg register #define SZ(x) ((int)(x).size()) #define all(x) x.begin(...
ALGO
0.999601
4.390451
{ "github_metadata": { "branch": "main", "commit_count": 121, "repo_created_at": "2022-08-29T04:06: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": "cc9dfbd41f...
34948661-6a51-4f94-9cc7-3f2a56429193
nickzuck/Codechef
CPP/cdbstr7.cpp
#include<cstdio> #include<string.h> #define MAX 50003 int cana (char [], char[] ) ; int main () { char a[MAX] , b[MAX] , flag ; int t , i; scanf ("%d",&t) ; while (t--) { scanf ("%s %s",a ,b) ; //printf ("%s %s",a,b) ; flag = cana(a , b ) ; if (flag ==1 ) printf ("YES\n") ; else ...
ALGO
0.999974
3.794401
{ "github_metadata": { "branch": "master", "commit_count": 308, "repo_created_at": "2015-07-07T04:49:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "edff0231...
40a849df-79c6-4158-bba1-40eb50756226
jimgao1/competitive-programming
CCC/ccc13s3.cpp
#include <bits/stdc++.h> using namespace std; int diff[3][2] = {{0, 3}, {3, 0}, {1, 1}}; int T, G, ans = 0, points[5]; bool visited[5][5]; vector<pair<int, int>> matches; void dfs(int idx){ if (idx == matches.size()){ int mPoints = 0, mIndex = -1; bool flag = false; for (int i = 1; i <...
ALGO
0.999953
4.296856
{ "github_metadata": { "branch": "master", "commit_count": 847, "repo_created_at": "2014-11-17T21:27:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 37, "forks": 14, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40a2d4...
cbe1b128-efae-4cc9-afce-b3e57d4c46e8
ishandutta2007/codeforces-o
ormlis/normal/1266/D.cpp
#include <iostream> #include <vector> #include <algorithm> #include <set> #include <queue> #include <unordered_set> #include <fstream> #include <cstring> #include <map> #define ll long long #define all(arr) (arr).begin(), (arr).end() #define range(i, n) for (int i=0; (i) < n; ++(i)) #define rall(arr) (arr).rbegin(), (...
ALGO
0.999865
3.828944
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:45: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": "cbf1e0eb0d25...
46ed804b-a41c-4b24-83e6-2cf38300fc80
ChrisVilches/Algorithms
kattis/warehouse.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<string, int> psi; void solve() { int n; cin >> n; map<string, int> counts; while (n--) { string name; int count; cin >> name >> count; if (counts.find(name) == counts.end()) { counts[name] = count; } else { counts[na...
ALGO
0.999792
4.207168
{ "github_metadata": { "branch": "main", "commit_count": 855, "repo_created_at": "2021-10-04T16:05:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "b4db527c1...
526d4e91-35bf-4376-a31c-c9a023ecd822
Y-Leo/Linux
Day_code/2020_01_28/BinInsertSort.cc
#include <iostream> #include <vector> using namespace std; //折半插入排序 //默认从小到大 void BinInsertSort(vector<int> &v,int n) { if(n <= 1) return; else { int low,high,j = 0; for(int i = 1; i < n; ++i) { int value = v[i]; //待排序区间的第一个元素 low = 0; //已排序区间的第一个...
ALGO
0.999993
5.222901
{ "github_metadata": { "branch": "master", "commit_count": 166, "repo_created_at": "2019-11-10T06:46:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a11bdb99...
e2f0c28f-0c04-446b-b5b6-3dc2bd988efc
MixXz/elfak-parallel-systems
Priprema/OpenMP/jun2-2021/Source.cpp
#include<iostream> #include<omp.h> using namespace std; #define N 256 #define M 120 int main() { int x_seq, x_par, a_seq[N][M], a_par[N][M]; for (int i = 0; i < N; i++) { for (int j = 0; j < M; j++) { a_seq[i][j] = a_par[i][j] = rand() % 5; } } x_seq = 0; for (int i = 0; i < N; i++) { for (int j = 0;...
ALGO
0.999865
3.814631
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2023-03-03T21:52:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f451e7f692...