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
402f8ba0-8cee-4c4c-8c47-7d11cd5bc168
edddddee/clingalgebra
clingalgebra/main.cpp
#include "defines.h" #include "complex.h" #include "matrix.h" #include "vector.h" // rand #include <cstdlib> // time measuring #include <chrono> #include <time.h> //printf #include <cstdio> // accumulate #include <numeric> void print_complex(const Complexf& c) { std::cout << c << std::endl; } template<class T> ...
TEST
0.972293
5.03418
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2023-01-23T21:22: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": "d0332900a...
134c60eb-2501-49c1-94a0-60b94dd27546
matmarqs/aoc
aoc2022/02.2-rockpaperscissors.cpp
#include <cstdlib> #include <iostream> #include <fstream> // read and write to files using namespace std; /* DEFINITIONS */ int value(char in) { if (in == 'A') return 1; else if (in == 'B') return 2; else return 3; } int score(char in, char out) { int s; switch (out) { ...
ALGO
0.997445
4.268855
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2022-03-08T20:54: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": "e4e579d6be8...
93dd755d-a4fb-4cc2-82dc-30d3454d0423
IACJ/algorithm-experience
lab2/main.cpp
#include<iostream> #include<fstream> #include<algorithm> using namespace std; const bool FILE_INPUT = true; // 是否文件输入数据(否则手动输入数据) const bool DEBUG = false; // 是否打印出过程 int a[100]; long long maxDP[101][101]; long long minDP[101][101]; long long sum[101][101]; int main() { int n; if (FI...
ALGO
0.999959
3.2047
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-06-08T10:06: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": "7e528af4f8...
b428545c-b382-4faa-b3e8-d122a9ed5cd9
BenzinOzor/FaZoN
FrameWork/FrameWork/Code/FZN/Tools/Math.h
//------------------------------------------------------------------------ //Author : <NAME> //Date : 03.03.16 //Description : Math tools and functions //------------------------------------------------------------------------ #ifndef _ENGINEMATH_H_ #define _ENGINEMATH_H_ #include <SFML/System/Vector2.hpp> #include <...
TOOL
0.988244
6.331405
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2021-08-31T02:36:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d3e670d...
b4584c43-47b5-40d3-b0c2-166461dee4d8
lyccrius/OI-Solution
Luogu/P2606 [ZJOI2010]排列计数.cpp
#include <cstdio> const int maxN = 1e6 + 10; int n, m; int p; long long A[maxN]; long long F[maxN << 1]; int size[maxN << 1]; long long pow(long long a, long long b) { long long ret = 1; while (b) { if (b & 1) ret = ret * a % p; a = a * a % p; b >>= 1; } return ret; } long long C(int n, int m) { return A...
ALGO
0.999973
4.3367
{ "github_metadata": { "branch": "main", "commit_count": 653, "repo_created_at": "2022-09-28T05:47: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": "c538bf35b6...
cc7a700a-4174-4e01-a439-6eabca2929ea
0913vision/Study
boj/20303_dp_fail.cpp
#include <iostream> #include <algorithm> #include <vector> #define INF 2147483647 using namespace std; int n, m, k; vector<int> candy; vector<int> *friends; int *visited; int *groupCandy; int *groupNumber; int **dp; int **dp_number; void dfs(int node, int group) { visited[node] = 1; groupCandy[group] += candy...
ALGO
0.999975
3.636011
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-11-27T01:36: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": "37a48a0dbe...
1c247ec2-83ad-4c1b-9050-0ede8e3e51cf
HandIeNeeded/Retired
TopCoder/TCO/16R2A/LCMGCD.cc
#include <vector> #include <cstdio> #include <cstring> #include <cstdlib> #include <bitset> #include <utility> #include <sstream> #include <set> #include <map> #include <deque> #include <cmath> #include <ctime> #include <stack> #include <string> #include <iostream> #include <algorithm> #include <functional> using names...
ALGO
0.996243
4.8093
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2015-12-20T14:09:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd996e69...
3adf0728-0e30-4ebc-997c-64a991640134
cmaughan/practice
cpp/advent_of_code/2017/day_2.cpp
#include "common.h" #include <numeric> #include <algorithm> using namespace std; using namespace MUtils; REGISTER_PROBLEM(AOC_2017_Day2) { // Part 2:1 string str2 = R"( 116 1259 1045 679 1334 157 277 1217 218 641 1089 136 247 1195 239 834 269 1751 732 3016 260 6440 5773 4677 306 230 6928 7182 231 294...
ALGO
0.99762
3.070191
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2018-11-29T20:36:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 13 }, "file_meta": { "content_id": "453442f865...
d82f0ddf-e8ed-421d-8491-aed88170280d
FiYHer/DecisionTree_ID3
DecisionTree_ID3/DecisionTree_ID3/CDecisionTree.cpp
#include "CDecisionTree.h" bool CDecisionTree::AnaliseType() { //是否存储的标记 bool bPush = false; //对每一个属性进行操作 for (unsigned int i = 0; i < m_cStrAttribute.size(); i++) { //临时缓存数据,采访属性的类别 vector<string> cTempType; //我们对每一排数据进行操作 for (unsigned int j = 0; j < m_cStrData.size(); j++) { bPush = false;//初始化 ...
ALGO
0.942307
3.482374
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-09-25T12:04:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f93b37af35...
8d94b748-2e9b-497d-adb9-2c3391d145cf
CharmLynx/SpRzOM
lab1/m_bit.cpp
#include "m_bit.h" #include <sstream> #include <iomanip> #include <iostream> #include <cmath> using namespace std; void m_bit::hex_32(const string& hex_string, uint64_t digits[], int& count){ int hex_length = hex_string.length(); string part(8,'0'); while(hex_length>0){ if(hex_length>=8){ ...
ALGO
0.997737
3.710942
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2025-04-29T19:35: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": "681061d4d...
5058bae0-998c-40ef-9f7d-b6adb9b0d59a
ysl2/kaoyan-data-structure
01-Question_after_WangDao/Chapter_02/2.3/T11.cpp
// 2020-10-08 #include <iostream> using namespace std; typedef int ElemType; typedef struct LinkNode { ElemType data; struct LinkNode *next; } LinkNode, *LinkList; void outPut(LinkList L) { LinkNode *p = L->next; while (p != NULL) { cout << p->data << " "; p = p->next; } cout <...
ALGO
0.999907
4.011467
{ "github_metadata": { "branch": "master", "commit_count": 187, "repo_created_at": "2020-08-31T09:02:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "855d7d8e...
52701ada-687a-4936-b39a-17413cf1a08a
abdullahiqbal572/DSA-LAB-TASK
LAB 5/Q5.cpp
#include<iostream> using namespace std; class Node; class Node{ public: int data; Node *next; Node(){ data = 0; next = NULL; } Node(int d){ this->data = d; this->next = NULL; } }; class LinkedList{ Node *head; public: LinkedList(){ this->head = NULL...
ALGO
0.9993
5.023796
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-03-15T08:31: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": "06762d542a00...
bbc7fb43-419f-467f-b673-5efe74adbcd7
rbnelr/kiss
kiss/vector/fm3.cpp
// generated by C:\Users\Me\Desktop\kiss\vector_srcgen\srcgen.py #include "fm3.hpp" #include "fm2.hpp" #include "fm4.hpp" #include "fm2x3.hpp" #include "fm3x4.hpp" #include "dm3.hpp" namespace vector { //// Accessors // get matrix row fv3 fm3::get_row (int indx) const { return fv3(arr[0][indx], arr[1][indx...
ALGO
0.939824
6.138112
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2019-03-28T08:35: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": "d3f3d1ee3...
4f92e42b-d07e-4bef-9456-5a203079e733
hhtuann/Practice_Cpp_Group_19
PHUONG_TRINH_TONG_CHU_SO.cpp
#include <bits/stdc++.h> using namespace std; #define NAME "<NAME>" #define endl '\n' #define int long long int binpow(int n, int k) { int res = 1; while (k) { if (k & 1) res = res * n; n = n * n; k /= 2; } return res; } int sumDigits(int n) { int sum = 0; ...
ALGO
0.999509
3.767006
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-12-06T13:07: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": "8ad9b40b21e7...
420e2648-22c5-4a4e-a34d-510653a37e87
ishandutta2007/codeforces-k
kort0n/normal/1381/A2.cpp
#include <bits/stdc++.h> #define endl "\n" using namespace std; typedef long long ll; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; template<class T> inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T &a, T b) { ...
ALGO
0.999941
3.769434
{ "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": "a13937aad0fc...
8fe1affe-8f90-49ec-8a9c-dd4ae1d7858c
NithinSethumadhavan/CP
Kickstart/2019/D/2_final.cpp
#include <iostream> #include <vector> #include <algorithm> #include <map> #include <set> using namespace std; int main(){ int t; cin >> t; for(int tc = 1; tc <= t; ++tc){ int n,g,m; cin >> n >> g >> m; const int gc = n+1; map<int,vector<int> > a,c,af,cf; int p; char d; for(int ...
ALGO
0.999678
3.248095
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-05-03T17:48:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd1f9dd7e...
8a8f07e8-88d5-4a03-93b3-dfeffb7b0297
haourgot123/VT
CTDL/CTDL110.cc
#include <bits/stdc++.h> using namespace std; int n, m, s, t; vector<int> adj[10001]; bool visited[10001]; int parent[10001]; void bfs(int u) { queue <int> q; q.push(u); visited[u] = true; while(q.size() ! = 0) { int v = q.front(); q.pop(); for(int x : adj[v]) { ...
ALGO
0.999962
4.405268
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-03-27T19:18:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e28603910b46...
620f916a-1f2c-4eee-a466-f8dd813cf9f2
sameer2800/mohit-fu
docs/dolfin/1.5.0/cpp/source/demo/undocumented/multimesh-stokes/cpp/main.cpp
// Copyright (C) 2014 <NAME> // // This file is part of DOLFIN. // // DOLFIN is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. ...
ALGO
0.901925
5.251666
{ "github_metadata": { "branch": "master", "commit_count": 1376, "repo_created_at": "2017-10-12T12:28: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": "341f69f...
bd21e984-35de-408d-a45e-75538c4dc485
plenilune3/problem_solving_cpp
solved.ac/CLASS_4/1167_트리의 지름.cpp
#include <iostream> #include <vector> using namespace std; const int MAX = 1e5 + 1; struct edge { int v, w; }; int N; bool visited[MAX]; vector< vector<edge> > node(MAX); pair<int, int> dfs(int w, int u); edge make_edge(int v, int w); int main(int argc, char const *argv[]) { ios_base::sync_with_stdio(fals...
ALGO
0.999914
3.789451
{ "github_metadata": { "branch": "master", "commit_count": 710, "repo_created_at": "2020-04-06T05:39: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": "3fc319a2...
c209c4f8-722f-4448-91d4-4b7ef2490b06
alisw/AliRoot
MUON/MUONrec/AliMUONTrackReconstructor.h
#ifndef ALIMUONTRACKRECONSTRUCTOR_H #define ALIMUONTRACKRECONSTRUCTOR_H /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ /* $Id$ */ /// \ingroup rec /// \class AliMUONTrackReconstructor /// \brief Standard class fo...
TOOL
0.921505
6.396461
{ "github_metadata": { "branch": "master", "commit_count": 74535, "repo_created_at": "2016-03-07T09:20:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 57, "forks": 256, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "9f2a...
e5479bec-0602-4787-935b-4fa8646d9ff8
Kynn274/BaitapUPCODER
CONNECT.cpp
#include <iostream> #include <vector> #include <fstream> using namespace std; bool ss(string a, string b){ string tmp=a+b; string tmp1=b+a; //cout<<tmp<<' '<<tmp1<<endl; if(tmp>=tmp1){ //cout<<"true\n"; return true; } else{ //cout<<"false\n"; return false; } } ...
ALGO
0.999938
3.700814
{ "github_metadata": { "branch": "main", "commit_count": 173, "repo_created_at": "2024-02-18T10:03: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": "f960219b85...
0ffd3243-67d0-4bf3-8cbc-cf475af46d4b
Kestrel-omega/Baekjoon
src/1007.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <cstring> using namespace std; pair<int, int> coordinate_point_x_y[21]; vector<vector<int>> minus_vectors; vector<int> arr, comb; int N, idx, depth; double result; void combination(vector<int> arr, vector<int> comb, int R, int idx,...
ALGO
0.999574
4.842123
{ "github_metadata": { "branch": "main", "commit_count": 141, "repo_created_at": "2021-06-27T07:40:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "640464c254...
873487a4-3ac1-40bf-b650-6a1813e52d00
fm1ck3y/second_course
Alghoritms/Backpack.cpp
#include <iostream> #include <vector> #include <malloc.h> #pragma warning(disable:6386) #pragma warning(disable:6011) #pragma warning(disable:6385) template <typename T> T Max(T el1, T el2) { if (el1 > el2) return el1; return el2; } // нахождение предметов void findAns(int i, int j, std::vector<std::pair<int, i...
ALGO
0.999978
4.033295
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2020-09-07T14:17: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": "29654e3c2...
5f90dd39-b7da-4526-9734-64ae973a5106
hanky3/HLP_CodeJam
AlgoStrategy_Code/CH24/RMQ.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <string> #include <vector> #include <map> #include <algorithm> #include <list> #include <queue> using namespace std; class RMQ { public: RMQ(const vector<int> &array) { nodeCount = array.size(); rangeMin = vector<int>(nodeCount * 4); } int in...
ALGO
0.999979
3.987998
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2018-02-01T13:18: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": "987e4cd4d...
d9f04122-93db-40a3-ad3e-cb4685ec9958
kodsnack/advent_of_code_2018
digimatic-c++/Day19/main.cpp
// Advent of Code 2018 // <NAME> (digimatic) #include "config.h" #include <common/common.h> #include <algorithm> #include <array> #include <cassert> #include <functional> #include <iostream> #include <stdexcept> #include <string> #include <tuple> #include <unordered_set> #include <utility> using namespace westerstr...
ALGO
0.989982
5.62207
{ "github_metadata": { "branch": "master", "commit_count": 1772, "repo_created_at": "2018-11-28T17:59:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26, "forks": 63, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3dd73...
7ac06c16-0be2-4bf4-9cb9-b3f00d80b90b
3sigma/T-Quad-Identification-des-Moteurs-Courant-Continu
Arduino/Identification/Identification.ino
/****************************************************************************** Programme d'identification des moteurs du robot T-Quad, disponible à l'adresse: http://boutique.3sigma.fr/12-robots Fonctionne avec la version de matériel 1.2 Auteur: 3Sigma Version 1.2.0 - 31/10/2017 **************************************...
TOOL
0.9498
3.477173
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2016-12-13T16:42: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": "134d426ef...
6bd38816-c9b0-4ba9-b339-ad70f55ae493
EmoryHuang/myLeetCode
Solution/385.迷你语法分析器/385.迷你语法分析器.cpp
/* * @Descroption: LeetCode 385. 迷你语法分析器 * @Author: EmoryHuang * @Date: 2022-04-15 09:07:05 * @Method: * dfs * 使用 deep 记录当前所在位置的深度,每次遇到左括号,深度加 1,遇到右括号,深度减 1 * start 记录起始位置,把 start 到当前位置之间的字符串取出来递归调用函数 */ /** * // This is the interface that allows for creating nested lists. * // You should not implement it, o...
ALGO
0.995418
6.122558
{ "github_metadata": { "branch": "master", "commit_count": 327, "repo_created_at": "2021-05-03T09:10:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "43579ba2...
54522f87-f92e-49a0-b4c7-986abf4b9787
majestrate/metanet
include/meta/core/dht/kad.hpp
// // meta/core/dht/kad.hpp // #ifndef META_CORE_DHT_KAD_H #define META_CORE_DHT_KAD_H #include <array> #include <functional> #include <cstring> #include <vector> #include <memory> #include <map> namespace meta { namespace dht { static constexpr std::size_t keyspace_bytes = 32; static constexpr std::...
TOOL
0.904233
4.8203
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2014-08-21T11:47:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c362251dd...
87e80f89-f9a0-4047-af69-f0efddae8158
kzvd4729/Problem-Solving
codeforces/C - Remembering Strings/Time limit exceeded on test 6.cpp
/**************************************************************************************** * @author: kzvd4729 created: Mar/14/2020 19:51 * solution_verdict: Time limit exceeded on test 6 language: GNU C++14 * run...
ALGO
0.999976
4.00993
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-02-01T09:12:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d746e5b51a4...
43d0a04c-c3bd-4223-b872-6fb351119b78
prateeksinghkhutail/Leetcode
Next Permutation - GFG/next-permutation.cpp
// { Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution{ public: void swap(int *a,int *b) { int temp=*a; *a=*b; *b=temp; } vector<int> nextPermutation(int N, vector<int> arr){ int...
ALGO
0.999975
5.988322
{ "github_metadata": { "branch": "main", "commit_count": 1190, "repo_created_at": "2022-01-08T14:24: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": "940de3a4f...
d38c0a5d-6039-4295-8814-bd6c66a52bc1
maZymaZe/maze-Python-learning-luogu-cpp-py-
LeetCode/l1012.cpp
class Solution { public: int A(int x, int y) { int res = 1; for (int i = 0; i < x; i++) { res *= y--; } return res; } int f(int mask, const string& sn, int i, bool same) { if (i == sn.size()) { return 1; } int t = same ? sn[...
ALGO
0.999744
5.445181
{ "github_metadata": { "branch": "master", "commit_count": 2987, "repo_created_at": "2020-02-16T02:06:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3f2ce0...
8c8ea96c-3d39-4115-a496-d14163b268d6
usvibrus/c---problems
stack/DailyTemperature.cpp
// 739. Daily Temperatures // BRUTE FORCE // BUY GIVES TLE class Solution { public: vector<int> dailyTemperatures(vector<int> &tem) { vector<int> ans; for (int i = 0; i < tem.size(); i++) { int k = i + 1; while (k < tem.size()) { ...
ALGO
0.999976
5.842747
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2023-05-13T09:34: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": "4dc45cfa00...
e9571afe-3a89-44f9-835e-f776a40102f7
Al-ain-Developers/indesing_plugin
external/WRServices/Public/Includes/WRRedBlackTree.h
//======================================================================================== // // File: WRRedBlackTree.h // // Owner: <NAME> // // Copyright 1988 - 2005 WinSoft SA. All rights reserved. // Usage rights licenced to Adobe Inc. 1993 - 2005. // //==================================================...
TOOL
0.900144
3.018763
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-02-18T07:33:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7ef016aecf0...
33b3e1cf-e8f6-4fb7-985c-941c3df226f4
y-tag/cpp-ToyBox-TinyTopK
lib/posting_list.h
#ifndef TOYBOX_TINYTOPK_POSTING_LIST_H #define TOYBOX_TINYTOPK_POSTING_LIST_H #include <climits> #include <algorithm> #include <map> #include <vector> namespace toybox { typedef unsigned int termid_t; typedef unsigned int docid_t; typedef double payload_t; typedef std::vector<std::pair<termid_t, payload_t> > ter...
ALGO
0.963183
5.961726
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2012-04-04T21:58: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": "eb711a8ca4...
302c7e59-85ad-46cf-b06a-8c658b48b407
iEatTomatoesJack/MentorMateAssignments
Dont CPP Version/mm_assignment.cpp
// Example program #include <iostream> #include <string> using namespace std; class DoubleMLetter { private: int cWidth; int cLogoStarNumber; int cLogoSideDashNumber; int cLogoUpperDashNumber; int cLogoLowerDashNumber = 1; string drawLine(int index) { ...
ALGO
0.998531
3.663968
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-02-11T11:42: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": "73cac26bd...
8919865c-a380-4dea-a74a-e5df0ac4cfee
xiebaoma/leetcode-cpp-interview-prep
interview150/reversebetween.cpp
/** * xiebaoma * 2025-07-20 */ struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; class Solution { public: ListNode *reverse(ListNode *mleft, ListNode *mright)...
ALGO
0.999992
5.695564
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2024-10-10T13:55: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": "bb029a07a...
0205a7c2-d7d0-460b-8eb1-2a0b04517ec0
John-Atha/search-sort-ds
binarySearch.cpp
#include <iostream> using namespace std; class Solution{ public: // Function to find element in sorted array // arr: input array // N: size of array // K: element to be searche int BS(int arr[], int start, int end, int K) { if (end<start) { return -1; } ...
ALGO
0.999964
5.339352
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-03-10T09:19: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": "f4dc0d9674b...
3ea051ed-b82f-46f5-a482-7a1d570f00fa
haven0idea/wbc_control
algorithm/wbc_priority.cpp
/* This is part of OpenLoong Dynamics Control, an open project for the control of biped robot, Copyright (C) 2024 Humanoid Robot (Shanghai) Co., Ltd, under Apache 2.0. Feel free to use in any purpose, and cite OpenLoong-Dynamics-Control in any style, to contribute to the advancement of the community. <https://atomgit....
ALGO
0.999418
4.716917
{ "github_metadata": { "branch": "hw-10dof", "commit_count": 25, "repo_created_at": "2025-06-20T11:41: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": "6add10c...
1c553d74-8b10-4cf6-8dec-4447b58aed6c
TasosTerzis/Algorithmic-Problems-Exercise-3
modules/utilities/utilitiesCube.cpp
#include "../../include/utilitiesCube.h" // function to find k exact nearest neighbors of a query, by brute force std::multimap <double, Image*> bruteForceCube(DataSet& input_set, Image& query, int k) { std::multimap <double, Image*> nearest_neighbors; std::vector <Image*> images = input_set.getImages(); ...
ALGO
0.999804
4.52112
{ "github_metadata": { "branch": "main", "commit_count": 39, "repo_created_at": "2023-12-20T13:18: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": "b81e5750559...
263ffc92-69da-489b-8033-066677da1efa
zhanzy178/exercise-book
LeetCode218.cpp
// // 218_The Skyline Problem.cpp // leetcodeTest // // Created by applecz on 2017/10/1. // Copyright © 2017年 applecz. All rights reserved. // #include <stdio.h> class Solution { public: vector<pair<int, int>> getSkyline(vector<vector<int>>& buildings) { queue<vector<pair<int, int>>> myq; for ...
ALGO
0.999942
5.388622
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2017-09-04T15:25:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb0e62fd1...
a8e2ed0b-a7b4-4978-9c76-b77573541033
Krhone-bit/basic-C
grafos/grafo1.h
#include <iostream> #include <vector> using namespace std; class NodoG{ public: int v; NodoG* a; int pa; NodoG* b; int pb; NodoG* c; int pc; NodoG* d; int pd; NodoG* e; int pe; NodoG(int v){ this->v = v; a=b=c=d=e=NULL; p...
ALGO
0.99897
3.862411
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-06-23T22:24: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": "871556af5be5...
d0f81cdf-054d-4a07-9839-c1c0db3266eb
blackout-yash/Striver
Dp/19. 0 1 Knapsack/table_2_0.cpp
// 39. 0 1 Knapsack // Link - https://www.codingninjas.com/codestudio/problems/0-1-knapsack_920542 #include <iostream> #include <vector> using namespace std; class Solution { public: int knapsack(vector<int> weight, vector<int> value, int n, int maxWeight) { vector <vector<int>> dp(n, vector<int> (maxWeight + 1...
ALGO
0.999999
5.107908
{ "github_metadata": { "branch": "main", "commit_count": 261, "repo_created_at": "2022-07-19T08:09: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": "0a5828f7af...
e76fc27a-fe11-465f-94a4-844369f64ce4
huang46u/VMAS-code
cgogn/modeling/algos/decimation/SQEM_helper.h
/******************************************************************************* * CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps * * Copyright (C), IGG Group, ICube, University of Strasbourg, France * * ...
ALGO
0.999654
5.652986
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2025-03-07T22:15:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ad65345b3...
5032687e-8e9f-401f-87c4-8cbecfe7c770
luqian2017/SystemDesign
LintCode/442_Implement-Trie-Prefix-Tree/442_Implement-Trie-Prefix-Tree.cpp
class Node { public: Node() : isWord(false) { children = vector<Node *>(26, nullptr); } bool isWord; vector<Node*> children; }; class Trie { public: Trie() { root = new Node(); } /* * @param word: a word * @return: nothing */ void insert(string &word) {...
ALGO
0.999242
5.123986
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2018-08-01T05:26:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d333a20cb...
69d15664-61b0-4e4a-844f-9f2e13b159a4
jwlim/tracker_benchmark
trackers/MUSTer/mexopencv/src/+cv/HoughCircles.cpp
/** * @file HoughCircles.cpp * @brief mex interface for HoughCircles * @author <NAME> * @date 2011 */ #include "mexopencv.hpp" using namespace std; using namespace cv; /** * Main entry called from Matlab * @param nlhs number of left-hand-side arguments * @param plhs pointers to mxArrays in the left-hand-side ...
ALGO
0.996622
5.847624
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2013-04-17T01:20:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 265, "forks": 124, "issues": 25, "pull_requests": 3 }, "file_meta": { "content_id": "e734...
3f83c055-cb35-47e9-af1d-26fd473b1c4e
mpfeifer1/Kattis
nuremberg.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll inf = (ll)1 << 60; ll best_dist = inf; vector<ll> best; ll total_locs; ll dfs(ll curr, ll dist, vector<vector<pair<ll,ll>>>& adj, vector<ll>& size, vector<ll>& sub_size, vector<bool>& vis) { if(vis[curr]) return 0; vis[curr] = true; ...
ALGO
0.999965
4.200185
{ "github_metadata": { "branch": "master", "commit_count": 881, "repo_created_at": "2017-11-27T05:28:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 175, "forks": 79, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "ccee4...
a7af739b-ae56-4595-9581-d701919a5dea
ShahjalalShohag/code-library
Geometry/Onion Decomposition.cpp
#include<bits/stdc++.h> using namespace std; const int N = 3e5 + 9; struct PT { long long x,y; PT operator - (PT p) const { return {x - p.x, y- p.y}; } long long cross(PT p) const { return x * p.y- y * p.x; } long long dot(PT p) const { return x * p.x + y * p.y; } bool operator < (PT p) const { if...
ALGO
0.999992
4.731933
{ "github_metadata": { "branch": "main", "commit_count": 952, "repo_created_at": "2018-11-18T08:49:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3240, "forks": 840, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "81210...
06369e65-82c7-41a6-b690-bfe37d29c071
Dawidsoni/programming-competitions
Classic/sorting/Radix sort.cpp
#include<stdio.h> int arr[100000]; int result[100000]; int digit[100000]; int nArray[100000]; int kArray[100000]; int nRow[10]; int count, nDigits; int nDiv = 10; void countRow() { for(int i = 0; i < 10; i++) { nRow[i] = 0; } for(int i = 0; i < count; i++) { nArray[i] = result[i]; ...
ALGO
0.999955
3.648744
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-07-04T14:23:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98d71b7213...
1e204b04-08aa-4605-bc75-82cbe9bc66be
whale880/zhangjinyv
project_5/51-学生信息登记管理.cpp
#include"practice5.h" #define N 3 //学生个数 #define IDLen 20 //学号 #define NameLen 10 //姓名 #define SexLen 4 //性别 typedef struct Sco { int cp; //C语言成绩 int en; //英语 int math; //高数成绩 }Score; typedef struct Stu { char id[IDLen + 1]; //学号 char name[NameLen + 1]; //姓名 char sex[SexLen + 1]; //性别 int ...
ALGO
0.996782
3.512316
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-04-15T09:40: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": "9c0d59d20d35...
9eefd192-83e1-4fe7-8dc3-0b30c134d795
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/07/0726/personal_submission/cf231e_tiger2005.cpp
int fa[100010][20]; int main() { int n, m; cin >> n >> m; vector<vector<int>> g(n), t(n); vector<pair<int, int>> es; for (auto [a, b]: getv<int, int>(m)) { -- a, -- b; g[a].push_back(b); g[b].push_back(a); } vector<int> dep(n); vector<int> col(n); vector<bool> mark(n); for (int i = 0; ...
ALGO
0.99989
4.784496
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "8df7...
19f2d7dc-e4b2-4ac2-8178-4ac9dd084621
ddt-sato/meikai_cpp_sato
chap03-26-1/src/chap03-26-1.cpp
//演習3-26 人間とコンピュータとが対戦するジャンケンプログラムを作成せよ。 // ・人間が望む限り何度でも繰り返せるようにするもの。 // ・いずれか一方が3回勝つまで繰り返すもの。 // など、複数のパターンのプログラムを作ること。 //時間関係の関数を利用できるようにする為。 #include <ctime> //rand関数を利用できるようにする為。 #include <cstdlib> //画面の入出力を行うためのライブラリを取り込む #include <iostream> //stdという名前空間を利用する(現時点では用途不明) using namespace ...
ALGO
0.998299
3.936679
{ "github_metadata": { "branch": "master", "commit_count": 192, "repo_created_at": "2019-04-23T11:08:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "5c9e6459...
01da1cde-7318-42ff-bece-33ed178be43b
theunknowner/WebDerm
WebDerm/src/ShadeShape/ShadeMatch/shadematch.cpp
/* * shadematch.cpp * * Created on: Jul 1, 2015 * Author: jason */ #include "shadematch.h" #include "../shadeshape.h" #include "../islands.h" #include "../../Algorithms/jaysort.h" #include "../../functions.h" vector<float> ShadeMatch::shadeWeightsVec; /*************** PRIVATE FUNCTIONS *******************...
ALGO
0.900422
4.859451
{ "github_metadata": { "branch": "master", "commit_count": 569, "repo_created_at": "2014-05-07T11:24: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": "82420766...
1faecc9c-ff43-4617-ab57-d2a24998a55b
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/10/1024/personal_submission/cf305b_yawn_sean.cpp
#include <bits/stdc++.h> #pragma GCC optimize("O3,Ofast,unroll-loops") // #include <bits/extc++.h> // using namespace __gnu_cxx; // using namespace __gnu_pbds; using namespace std; signed main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); long long p, q; cin >> p >> q; v...
ALGO
0.999957
4.308453
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "6ae6...
a62ea44e-f605-4121-b7a8-deb45ce2f76d
HwangSeongYeol/Programmers-Coding-Test
Level 2/프린터.cpp
#include <string> #include <vector> using namespace std; class myClass{ public: int priority; int location; myClass(int priority_, int location_){ priority = priority_; location = location_; }; }; bool isPriority(vector<int> prioritiesArr, int now) { for(int i = now + 1; i < 10; i++) ...
ALGO
0.999983
5.627392
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2019-12-07T04:04: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": "1aa4cd3e0...
d88cdd87-57c0-40dd-b6be-6dbba6e23cd9
sark245/Competitive-Programming
BoldTheString.cpp
// // Created by sark2 on 27-06-2019. // #include "bits/stdc++.h" using namespace std; #define IOS cin.sync_with_stdio(0);cin.tie(0);cout.tie(0); #define rep(i, n) for(int i = 1; i <= (n); ++i) #define repA(i, a, n) for(int i = a; i <= (n); ++i) #define repD(i, a, n) for(int i = a; i >= (n); --i) #define cases i...
ALGO
0.987195
3.925802
{ "github_metadata": { "branch": "master", "commit_count": 234, "repo_created_at": "2019-03-26T09:41:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1dab2ac9...
2c6a51e9-3df0-43dd-8ead-b9e745e220d7
ensony713/Algorithm_Today_I_Learnd
Queue/11866.cpp
#include <iostream> #define MAX 1005 using namespace std; class Queue { int front, end; int data[MAX] = { 0 }; int set(int i) { i %= MAX; if (i < 0) i += MAX; return i; } public: Queue() { front = 0; end = 0; } void push(int x) { data[end] = x; end = set(end + 1); } int pop() { if (front ==...
ALGO
0.999983
3.440562
{ "github_metadata": { "branch": "main", "commit_count": 175, "repo_created_at": "2022-03-13T05:13: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": "357ba8c574...
2a8b68e4-ac6a-4d2a-89e4-24c6216030e0
vallagenakisu/my-github
codeforces problem/practise linkedlist.cpp
#include<bits/stdc++.h> using namespace std; class node { public: int data; node *link; }; node *temp; void creation ( node **head,int d) { node *newnode = new node ; newnode->data=d; newnode->link=NULL; if(*head==NULL) { *head=newnode; temp=newnode; } else {...
ALGO
0.999949
3.751682
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2022-10-05T13:52:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57d55eca3...
d8757e2e-94dc-4d57-afe2-b991aebba19c
fmoeran/CP
problemsets/pppp.cpp
#include<bits/stdc++.h> #define ll long long #define mn(x) const ll int N = x #define ito(n) for(int i=0; i<n; i++) #define jto(n) for(int j=0; j<n; j++) #define all(v) v.begin(), v.end() #define YES cout << "YES\n" #define NO cout << "NO\n" using namespace std; mn(2e5+1); int n, k, a[N], evens[N], odds[N]; void so...
ALGO
0.999932
3.482434
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-06-12T17:53: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": "02647494a287...
8a2a645c-cc11-4dfb-b582-7eda6da57d12
PranjalKumar09/C-Data-Structures
Arrays/merge_sort.cpp
#include <iostream> #include <vector> using namespace std; /* Merge Sort ========== */ void merge(vector<int>& arr, int low, int high, int mid) { int left = low, right = mid + 1; vector<int> temp; while (left <= mid && right <= high) { if (arr[left] <= arr[right]) temp.pu...
ALGO
0.999981
5.788028
{ "github_metadata": { "branch": "main", "commit_count": 503, "repo_created_at": "2024-06-10T12:23: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": "4128dea0dc...
a6402517-497a-4010-9a57-eccbc6350713
sitekwb/edmonds-karp-algorithm
include/Graph.h
#ifndef AAL_GRAPHS_GRAPH_H #define AAL_GRAPHS_GRAPH_H #include <vector> #include <unordered_map> #include <memory> #include <ostream> #include "Vertice.h" /** * @class * Represents graph. * Stores graph as vector of vertices with adjacent edges. * @see README.md */ class Graph { /// Vector of vertices in ord...
ALGO
0.928843
5.475182
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2019-10-20T10: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": "7dc26065c...
5d6418d7-69b5-43d9-a569-8205a4816777
burns801/Notes
AOAPC-I/Volume 6. Mathematical Concepts and Methods/uva_10417.cpp
//Clibrary: #include<cassert> #include<cctype> #include<cerrno> //#include<cfenv> #include<cfloat> //#include<cinttypes> #include<ciso646> #include<climits> #include<clocale> #include<cmath> #include<csetjmp> #include<csignal> #include<cstdarg> //#include<cstdbool> #include<cstddef> //#include<cstdint> #include<cstdio>...
ALGO
0.999699
3.742424
{ "github_metadata": { "branch": "master", "commit_count": 180, "repo_created_at": "2013-09-16T21:50:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61a3aa54...
c73898b7-2503-43ad-90f4-67639b201a8e
hashiryo/Library
test/atcoder/arc127_a.test.cpp
// competitive-verifier: PROBLEM https://atcoder.jp/contests/arc127/tasks/arc127_a // competitive-verifier: TLE 0.5 // competitive-verifier: MLE 64 #include <iostream> #include <vector> #include <array> #include "src/Misc/Automaton.hpp" using namespace std; signed main() { cin.tie(0); ios::sync_with_stdio(false); in...
ALGO
0.998382
3.47887
{ "github_metadata": { "branch": "master", "commit_count": 2057, "repo_created_at": "2020-03-25T09:12:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d52fbbd...
078e0d37-f24e-466c-a539-a71cb5722e6b
dokyeonglee/algorithm
BOJ/28067.cpp
#include <iostream> #include <vector> #include <set> using namespace std; int main(){ ios_base::sync_with_stdio(0); cin.tie(0); int n, m; cin >> n >> m; int cnt = (n + 1) * (m + 1); set<pair<int, pair<int, int>>> answer; pair<int, int> a = make_pair(0, 0); for(int i = 0; i < cnt;...
ALGO
0.999918
3.657253
{ "github_metadata": { "branch": "master", "commit_count": 1717, "repo_created_at": "2021-01-01T10:38: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": "c1eb3b1...
acfe7a05-6be6-4f5b-be0c-2d580b07cd60
ndb796/python-for-coding-test
12/3.cpp
#include <bits/stdc++.h> using namespace std; int solution(string s) { int answer = s.size(); // 1개 단위(step)부터 압축 단위를 늘려가며 확인 for (int step = 1; step < s.size() / 2 + 1; step++) { string compressed = ""; string prev = s.substr(0, step); // 앞에서부터 step만큼의 문자열 추출 int cnt = 1; ...
ALGO
0.999992
5.181976
{ "github_metadata": { "branch": "master", "commit_count": 584, "repo_created_at": "2020-04-15T21:07:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2378, "forks": 843, "issues": 131, "pull_requests": 1 }, "file_meta": { "content_id": "c...
a926fb5e-ae91-4cde-a3bf-4b6257dbfd6e
WOLFIEEEE/LeetCode_Solutions
Bit Difference - GFG/bit-difference.cpp
// { Driver Code Starts //Initial Template for C++ #include<bits/stdc++.h> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: // Function to find number of bits needed to be flipped to convert A to B int count(int a) { int count = 0; ...
ALGO
0.999497
5.467767
{ "github_metadata": { "branch": "main", "commit_count": 508, "repo_created_at": "2021-12-24T07:28:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dd7e17c6b5...
4a189943-d21f-4d76-a6fe-dd90460d3960
ishandutta2007/codeforces-f
flashmt/normal/995/A.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, k; cin >> n >> k; vector<vector<int>> a(4, vector<int>(n, -1)); for (int i = 0; i < 4; i++) for (int j = 0; j < n; j++) { cin >> a[i][j]; a[i][j]--; } vector<pair<int, int>...
ALGO
0.999932
3.720319
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70924427c5f4...
78808fd0-c9b5-42b9-9c81-b83d8fa65cad
famus2310/CP
CoderClass/tonitere.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; #define pb push_back #define debug(x) cout << x << endl #define fastio ios_base::sync_with_stdio(0), cin.tie(0) #define PI acos(-1) #define all(c) c.begin(), c.end() const int MOD = 1e9 + 7; const int INF = 1e9; const LL INF64 = 1e18; const int N = 1e...
ALGO
0.999927
4.526427
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2018-08-12T00:10: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": "58a4cd000...
89b975de-67f8-4532-b8e3-7c31de3d1b13
Tazri/Problem-Solving-By-C-and-C-Plus-Plus
codeforce/1000/before-2025-3-mar-27/1765.M.MinimumLCM.cpp
// link : https://codeforces.com/problemset/problem/1765/M #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double dl; #define optimize() \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) #define fraction() \ cout.un...
ALGO
0.999488
4.749791
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2024-11-25T23:59:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e6b12df20...
a33a6cfe-9c1b-43be-9ad0-5a58eb9343c5
jaccen/OpenGLFramework02
OpenGL_Framework/OpenGL_Framework/Projects/Sources/C++/Library/Collision/SpaceDivision/Quadtree/Creater/CollisionListCreaterImpl.h
//------------------------------------------------------------- //! //! @brief コリジョン //! @brief 衝突関連の名前空間 //! //------------------------------------------------------------- namespace Collision { //------------------------------------------------------------- //! //! @brief スペースディビジョン //! @brief 空間分割関連の...
TOOL
0.993832
5.162159
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2015-11-17T15:21: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": "6f2ee6c93...
0ef9b4d4-358c-46fd-b852-4541a3d56ac2
reidenong/CompetitiveProgramming
Archives/AC/kattis-bagoftiles.cpp
/* kattis-bagoftiles - knapsack and coinchange crossover. Each item can only be picked once, so similar to knapsack in that aspect. DP should return number of ways to get an item. - important to include number of items picked in the DP state. This is because for different number of items picked, the DP state may...
ALGO
0.999965
4.944991
{ "github_metadata": { "branch": "main", "commit_count": 910, "repo_created_at": "2023-03-19T06:39:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b78c1ea69...
4cab1c15-ca02-49ac-a7cc-c419a1283e76
RZzero/AlgorithmsLib
LeetCode/973.cpp
#include <bits/stdc++.h> using namespace std; struct Point { int x,y; double distance; }; double getDistanceToOrigin(int x, int y) { double x_distance = x * x; double y_distance = y * y; return (double)sqrt(x_distance + y_distance); } bool comparator (Point &A, Point &B) { return A.distance < B.distanc...
ALGO
0.999924
4.379184
{ "github_metadata": { "branch": "master", "commit_count": 311, "repo_created_at": "2017-12-11T02:50:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 5, "pull_requests": 1 }, "file_meta": { "content_id": "3e4ec56b...
74bc7a3a-c6d1-44bf-ad4c-3793c0186709
alexandraback/datacollection
solutions_5708284669460480_0/C++/shivamd22/B-small.cpp
#include<bits/stdc++.h> using namespace std; int strmatch(char *a,int n,string b){//a is text, b is keyword //int n=a.length(); int m=b.length(); int cnt=0; bool flag; for(int i=0;i<=(n-m);i++){ flag=true; for(int j=0;j<m;j++){ if(a[i+j]!=b[j]){flag=false; ...
ALGO
0.999549
3.368365
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1cd880444...
598208fd-1845-4ce2-9045-0272a6a7c049
Louisakai/Graph-Theory
Ex 21/FordFullkerson_Stack.cpp
#define MAXN 100 #define oo 999999 #include <stdio.h> typedef struct { int C[MAXN][MAXN]; int F[MAXN][MAXN]; int n; }Graph; void init_graph(Graph *pG, int n){ pG->n=n; for(int i=1; i<=n; i++){ for(int j=1; j<=n; j++){ pG->C[i][j]=0; } } } void init_flow(Graph *pG){ for(int u=1; u<=pG->n; u++){ for(in...
ALGO
0.999969
3.723126
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-01-04T00:50: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": "0d7d6b40212...
a69bbfb7-999c-45e9-a3f6-8b5d6329ff43
UselessFuwu/3013-Algorithms
Assignments/P02/main.cpp
/** * This program uses a "getch" function which means "get character". * However, getch does not print the character to the terminal, it * lets you decide what to do based on what character you are pressing. * * You can test which characters are being pressed using their ascii values. * * An ascii table here sh...
TOOL
0.903487
4.006672
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2024-01-22T04:35: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": "bab43febd3f...
45f9890d-ba16-4e38-bbbb-e3988d6f4ea5
rjtsdl/CPlusPlus
Interview Play CPP/ImplStrStr.cpp
// // ImplStrStr.cpp // Interview Play CPP // // Created by rjtsdl on 11/21/15. // Copyright © 2015 <NAME>. All rights reserved. // #include <stdio.h> #include <vector> #include <string> using namespace std; class Solution { public: vector<int> KMPProcessing(string needle) { vector<int> match(need...
ALGO
0.998972
5.454893
{ "github_metadata": { "branch": "master", "commit_count": 215, "repo_created_at": "2015-04-10T03:24: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": "1704a3e8...
e5c0fb3e-3511-4076-b33f-574b8478bc4d
Psirus/nuto_applications
heatconduction/PlateCooling.cpp
#include <cmath> #include "math/SparseMatrixCSRGeneral.h" #include "math/SparseDirectSolverMUMPS.h" #include "mechanics/groups/Group.h" #include "mechanics/constraints/ConstraintCompanion.h" #include "mechanics/sections/SectionPlane.h" #include "mechanics/structures/unstructured/Structure.h" #include "mechanics/timeInt...
ALGO
0.995872
4.930068
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2017-03-03T16:37: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": "cf38b86e3...
a08db6c4-a81a-4423-9ec3-cc7ddbf17b1c
hsnice16/DS-and-Algo-Foundation
Sorting/insertion_sort.cpp
// implementation of insertion sort algorithm #include <iostream> using namespace std; void insertion_sorting(int arr[], int size) { for (int i = 1; i < size; i++) { int key = arr[i]; int j = i - 1; while (j >= 0 && arr[j] > key) { arr[j + 1] = arr[j]; j...
ALGO
0.999991
5.133674
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2020-12-30T05:17:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b107ca0085...
a39441be-74ab-441e-99fd-92d52f1eb551
lnkkerst/oj-codes
src/luogu/P1621/15838476_ua_30_49ms_1312k_noO2.cpp
#include <cstdio> #define MAXN 100010 int a, b, p, f[MAXN], ans; bool book[MAXN]; void lnin(int x, int y) { for (int i = x; i <= y; i++) { f[i] = i; } } int find(int x) { return f[x] == x ? x : f[x] = find(f[x]); } void merge(int x, int y) { f[find(x)] = find(y); } int main() { scanf("%d%d%d", &a, &b...
ALGO
0.999778
3.647108
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2022-03-23T15:37:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5bf30b1d3d9...
1ef18c9c-2625-4a4f-a8b7-53608dce159e
rqy2002/OI-Problem-Codes
BZOJ/BZOJ2337.cpp
/************************************************************** * Problem: BZOJ2337 * Author: Rqy * Date: 2018 Feb 22 * Algorithm: 高消 **************************************************************/ #include <algorithm> #include <cstdio> const int N = 105; const int M = 10005; double A[N][N]; int n; inline double ab...
ALGO
0.99998
4.205798
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-05-24T13:35:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 27, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "62b1e7316...
608a15a8-26a4-48ea-9409-6c5d21be131c
aszkiel71/uwr
informatyka [computer science]/[25-S] Algorytmika Praktyczna/list12/task3.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cstdint> #include <queue> #pragma GCC optimize("Ofast") typedef long long ll; typedef int32_t i32; typedef int64_t i64; typedef uint32_t u32; typedef uint64_t u64; typedef double long dl; #include <set> #define forr(i, n) for(int i = 0; i < n; i++)...
ALGO
0.999984
3.77611
{ "github_metadata": { "branch": "main", "commit_count": 299, "repo_created_at": "2024-10-05T11:11:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1bfe25e54...
c1663dd5-2617-4a0a-b350-699ede084b75
sravanth1/CPlusPlus-Standard-Implementations
Graphs/vertexCoverInTree.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double ld; typedef vector<ll> vl; typedef queue<ll> ql; typedef set<ll> sl; typedef vector<int> vi; typedef queue<int> qi; typedef set<int> si; #define pb push_back #define lb lower_bound #define ub upper_bound #define fr(i, a, b) fo...
ALGO
0.999658
4.008846
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-01-26T15:59: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": "557f679821...
e88dc9ce-e2cd-4234-8ac6-e18efdabd400
ayush3011/hashing
Hashing_Linear_Probing.cpp
#include <bits/stdc++.h> #define SIZE 10 using namespace std; int hashFunction(int key) { return key % SIZE; } int probe(int H[], int key) { int index = hashFunction(key); int i = 0; while (H[index + i] % SIZE != 0) i++; return (index + i) % SIZE; } // returns a new probe index if already ...
ALGO
0.999238
4.350783
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-08-15T18:38: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": "71dfebf1c7ea...
98bfa365-8d78-41bd-ac42-dfe82ac561f0
isaychris/CS433
CS433_Lab3/random.cpp
#include "random.h" #include <time.h> /** Following Random number generation functions are from Numerical Recipe book */ /** * Return a random integer as the length of the next CPU burst * @param mean is the average CPU burst length, e.g. mean = 10 */ int CPUBurstRandom(int mean) { static long n = -10; //stati...
ALGO
0.999036
4.98701
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-04-03T09:26:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "884a3d7eb1...
e4340486-c377-4798-b8ab-371562c5c464
BeTechBo/Plagiarism-Detection-APP-GUI-included-
projectcs2/HS/rabin.h
#ifndef rabin #define rabin #include "Database.h" #include <bits/stdc++.h> #include <HS/dict.h> #define d 1000 using namespace std; // d is the number of characters in the input alphabet class Rabin_Karp_algorithm{ bool Isplagiarized = 0; bool Iseverplagiarized = 0; string text_in_report = ""; string pattern, text; D...
ALGO
0.938741
3.251601
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-13T20:04: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": "56d8dfcd1e45...
f6becb0b-c9dc-42e7-b5f7-e5b67d9c295b
ypark4857/GMmodel
Code/GMDerived.cpp
#include "GMDerived.h" // Constructor for MarketMaker class MarketMakerDerived::MarketMakerDerived(double v_h, double v_l, double pi) : MarketMakerBase(v_h, v_l, pi), last_price(0), theta_prior(0.5) { } // Calculates the bid and ask prices based on the current price of the stock and the probabilities of the high an...
ALGO
0.992632
5.405643
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-18T19:25: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": "79cc472bec4a...
0caefc67-0788-4a9d-8c7a-5abd4e160e45
HarshaVardhan31012007/Leetcode-and-Gfg-Codes
0354-russian-doll-envelopes/0354-russian-doll-envelopes.cpp
class Solution { public: //DP //TLE // bool issafe(vector<int>&c1,vector<int>&c2){ // if(c1[0]<c2[0] && c1[1]<c2[1]) // return true; // else // return false; // } // int solve(vector<vector<int>>& envelopes,int n){ // vector<int>cur(n+1,0); // for(int...
ALGO
0.999992
5.671718
{ "github_metadata": { "branch": "main", "commit_count": 5106, "repo_created_at": "2024-08-10T07:22: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": "138481099...
b232bd5f-b828-428e-a70d-7bdc5bb5b828
ArjunSinghShekhawat/DSA-CPP
Sort012.cpp
#include <iostream> #include <vector> using namespace std; int main() { // vector<int> arr{1, 2, 1, 2, 0, 0, 0, 1, 2, 0, 1, 2, 2, 2, 1, 0, 0, 1, 2, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 2, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 2}; vector<int> arr{2,0,1}; int low = 0; int mid = 0; int end = arr.size() - 1; ...
ALGO
0.999987
4.548364
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-07-28T11:07: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": "9fe656914af...
50dd5e91-b6b5-402b-b9b9-f138b8ff7a07
m5823779/Leetcode-problems
tree/1676.Lowest Common Ancestor of a Binary Tree IV.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999977
6.413609
{ "github_metadata": { "branch": "main", "commit_count": 413, "repo_created_at": "2022-06-09T08:09: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": "877cb2710e...
b44e38ee-efc7-4c20-9c70-606843257dea
raincross7/code-similarity
codes/train_code/problem286/problem286_437.cpp
#include <iostream> using namespace std; class Dice { public: int u, f, r, l, b, d; Dice(int uu, int ff, int rr, int ll, int bb, int dd) { u = uu; f = ff; r = rr; l = ll; b = bb; d = dd; } void move(char dir) { int tmp; if (dir == 'N') { tmp = u; u = f; f = d; d = b; b = tmp; } ...
ALGO
0.999937
3.955664
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8531bd6c46f...
c46dd880-94b7-48f5-a2b7-f0f048286574
cea-trust-platform/trust-code
src/VEF/Sources/Sources_It_Eval/Eval_Forchheimer_VEF_Face.h
/**************************************************************************** * Copyright (c) 2025, CEA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retai...
ALGO
0.996971
6.282382
{ "github_metadata": { "branch": "master", "commit_count": 9704, "repo_created_at": "2021-03-29T11:57:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 59, "forks": 19, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "4ba0ff...
5e82cca7-0881-4e28-a0dd-62d0d304d177
msharipov/simulated-annealing
annealing.cpp
#include "parameters.hpp" #include <algorithm> #include <cstddef> #include <random> #include <fstream> #include <iostream> #include <sstream> up<std::vector<coord>> valid_neighbors(const size_t r, const size_t c, const ptrdiff_t max_r, const ptrdiff_t max_c, const std::vector<coord_diff...
ALGO
0.99968
5.264688
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2024-02-15T19:23: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": "df44c48b7be...
fd86d7ad-d03c-4704-9828-07b9fc80a541
EmptyDust/Algorithm-Codes-and-writeups
codes/-0x30_competition/-0x33_codeforces/962/G_Penacony.cpp
#include <bits/stdc++.h> using i64 = long long; using u64 = unsigned long long; constexpr int N = 1e6, MAXN = 1e6 + 10, inf = 1e9, mod = 1e9 + 7; using pii = std::pair<int, int>; using a3 = std::array<int, 3>; std::mt19937_64 rng(std::chrono::steady_clock::now().time_since_epoch().count()); void solve() { int n, ...
ALGO
0.999889
4.609641
{ "github_metadata": { "branch": "main", "commit_count": 172, "repo_created_at": "2023-11-03T02:38:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "044aad0dbf...
b069c1c7-de85-47d0-b5c2-bce69a55c6a5
Ryan0v0/ACM-codes
牛客多校/1/1003_1.cpp
// // Created by 赵婉如 on 2019-08-25. // #include <bits/stdc++.h> #define F(i, s, t) for(int i=(s);i<=(t);i++) #define D(i, s, t) for(int i=(s);i>=(t);i--) #define R(i,x) for(int i=head[(x)];i;i=e[i].next) #define mec(a, x) memset(a,x,sizeof(a)) using namespace std; typedef long long LL; inline LL read() { LL x=0LL,...
ALGO
0.999936
4.023634
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2019-08-23T10:10: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": "bd410efb2...
986fbaed-7f36-45f1-b586-2a6358891ead
fradebo/cp_unipi
201207/edit/main.cpp
#include <bits/stdc++.h> using namespace std; #define INF 1e9 #define INF 1e9 #define NMAX 105 int memo[NMAX][NMAX]; //the state (spos, tpos) tell us the minimum number of moves we need to do in order to change the substring [0, spos] of s in the substring [0, tpos] of t. int dp(string s, int spos, string t, int t...
ALGO
0.999999
4.463601
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2020-09-20T15:11: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": "70cd3274c...
f66175a6-c217-48a7-a2e1-39eb5f5dd7df
kokay/CodingPractice
TopCoder/MutaliskEasy.cc
#include <iostream> #include <vector> #include <algorithm> #include <string.h> using namespace std; class MutaliskEasy { public: int minimalAttacks(vector<int> x) { memset(memo, -1, sizeof(memo)); memo[0][0][0] = 0; damege[0] = 9, damege[1] = 3, damege[2] = 1; if (x.size() == 1) return solve(x[0], ...
ALGO
0.99991
4.229028
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2016-10-04T09:21: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": "76b04142c...
2d98ef5e-89f0-4acf-81ad-e6ee2db2c39d
ValveSoftware/source-sdk-2013
src/launcher_main/main.cpp
//========= Copyright Valve Corporation, All rights reserved. ============// // // Purpose: A redirection tool that allows the DLLs to reside elsewhere. // //=====================================================================================// #if defined( _WIN32 ) #include <windows.h> #include <stdio.h> #include <a...
TOOL
0.913087
6.061102
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2013-06-26T22:21:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9165, "forks": 2667, "issues": 352, "pull_requests": 507 }, "file_meta": { "content_id": ...
8bea8235-9191-404f-81a0-e288cf2e14be
DaGuanYuan/lc_learning
Coding_interviews/Q52/Q52.cc
#include <iostream> #include <stack> #include "../../DataStructure/ListNode.h" class Solution { public: ListNode* commonNodeofTwoIntersectionList_Solution1(ListNode* l1, ListNode* l2) { if (!l1 || !l2) {return nullptr;} ListNode* pHead1 = l1; ListNode* pHead2 = l2; while (pHead1 &&...
ALGO
0.998891
5.629236
{ "github_metadata": { "branch": "master", "commit_count": 133, "repo_created_at": "2021-07-01T01:59:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca92d33e...
0732e3f1-1ad9-4717-9d48-710414a608e3
secretflow/spu
src/libspu/kernel/hal/fxp_cleartext.cc
// Copyright 2021 Ant Group Co., Ltd. // // 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 ...
TOOL
0.946512
7.437416
{ "github_metadata": { "branch": "main", "commit_count": 706, "repo_created_at": "2022-07-02T09:05:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 292, "forks": 135, "issues": 25, "pull_requests": 15 }, "file_meta": { "content_id": "1c7e7...
380d60c6-4438-4190-97b8-4a4b264a7359
Mohamed-Hossam/Problem-Solving
codeforces/337-B/337-B-19158214.cpp
#define _CRT_SECURE_NO_WARNINGS #include<iostream> #include<algorithm> #include<vector> #include<set> #include<map> #include<unordered_map> #include<queue> #include<stack> #include<iterator> #include<cmath> #include<string> #include<sstream> #include<cstring> #include<ctype.h> #include<iomanip> #include<functional> #...
ALGO
0.999855
3.831186
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-05-05T12:01: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": "f79c87b2d6...
cb11ac36-d1f1-4b23-bf78-892823fb5f31
yeungsinchun/ACM-ICPC-template
modnum/modnum.cpp
#include <bits/stdc++.h> // May not work for C++ version older than C++11, since modulo with negative // numbers are implementation-defined prior to C++11 template <const int MOD> class ModNum { private: int m_value{}; public: int normalize(int64_t num) { if (num < 0) { num += ((-num...
ALGO
0.999881
4.948494
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-06-20T08:20: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": "356b768b881e...