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
ae5fa47a-5b1b-4941-9151-f55fc850c98c
yangsej/AlgorithmPractice
CodeJam/2020/QR ESAb ATAd.cpp
#include <iostream> #include <string> using namespace std; int T, B; int first, last, numQuery, eq, neq; bool rev, comp; string A; char query(int P) { int p = P; if (rev) p = B - P - 1; // indicating which position in the array you wish to look at. printf("%i\n", p); fflush(stdout); ...
ALGO
0.999987
3.684811
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2021-03-15T23:46:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e524e8f664...
ef24fc9e-caa2-4d63-9de6-4ed18206e657
satoshihamasuna/micromouse_type6
mouse_type6/Core/CPP/Component/Src/controller.cpp
/* * controll.cpp * * Created on: 2023/06/18 * Author: sato1 */ #include "../Inc/controller.h" #include "../../Pheripheral/Include/typedef.h" #include "../../Pheripheral/Include/macro.h" void PID_Controller::Gain_Set(float _Kp,float _Ki,float _Kd) { Kp = _Kp; Ki = _Ki; Kd = _Kd; } void PID_Controller::...
TOOL
0.95521
4.607753
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2023-06-08T05:55:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bab66954...
0604b8b3-1193-476f-b30a-30e53d8eb7ad
agooteam/CM_kurs
functions.cpp
#include "functions.h" void MKE::read_node(char *filename){//функция чтения данных об узлах FILE *fp = fopen(filename,"r"); fscanf(fp,"%d",&count_node); nodes = new node[count_node];//выделяем память под узлы for(int i = 0;i < count_node; i++){ fscanf(fp,"%lf %lf",&nodes[i].node_coord.r,&nodes[i].node_coord.fi);...
ALGO
0.995708
3.36879
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2014-12-21T12:02: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": "40b8808056...
96deb523-5a3f-401e-ab1a-9252a3dc31ad
jose-joaquim/vrbspheuristics
HeuristicDecoder.h
// // Created by <NAME> on 03/03/20. // #ifndef BRKGA_FF_BEST_HEURISTICDECODER_H #define BRKGA_FF_BEST_HEURISTICDECODER_H #include <vector> #include <algorithm> #include <cmath> #include <iostream> #include <cstdio> #include <vector> #include <cstring> #include <cassert> #include <numeric> #include <random> #include ...
ALGO
0.995025
4.196413
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2020-03-11T18:49: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": "35231cbf4...
7c68a9b3-f5f2-41d2-b458-a9e9c69d2e3b
huangbin5/PAT_Advanced
113-10/1137.cpp
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; // #define DEBUG const int maxn = 10005; struct Node { string id; int online, middle, final, g; Node(string _id) : id(_id) { online = middle = final = g = -1; ...
ALGO
0.999076
3.73955
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-03-26T14:20: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": "cf403af4da...
fdcb9312-b3f6-4bb2-a5bb-d5c643d4721b
FredericFyon/Enhancer-Runaway-Process
CycleModel7.cpp
#include "CycleModel7.h" #include "SelectionModel7.h" #include "RecombinaisonModel3.h" #include "Matrice.h" #include "Vecteur.h" #include <string> #include <boost/random.hpp> #include <boost/random/mersenne_twister.hpp> #include <boost/random/normal_distribution.hpp> #include <boost/random/uniform_int_distribution.hpp...
ALGO
0.99458
3.123143
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-09-17T13:08: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": "9207b8045d61...
f17cd518-1a2e-4aaf-b239-8e0a801de571
chncwang/news-title-classification
src/basic/Targets.h
#ifndef SRC_BASIC_TARGETS_H #define SRC_BASIC_TARGETS_H #include <vector> #include <array> #include <string> #include "MyLib.h" #include "Example.h" enum Target { ATHEISM = 0, CLIMATE_CHANGE = 1, FEMINIST_MOVEMENT = 2, HILLARY_CLINTON = 3, LEGALIZATION_OF_ABORTION = 4, DONALD_TRUMP = 5 }; co...
TOOL
0.90257
4.682922
{ "github_metadata": { "branch": "master", "commit_count": 110, "repo_created_at": "2017-12-11T07:48:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "64d1355a...
f756895d-3348-4676-8d5e-6ef690123da1
n1ckfg/SynDraw
SynDraw/src/Common/MeshObject.cpp
#include <igl/read_triangle_mesh.h> #include <igl/per_face_normals.h> #include <igl/edge_topology.h> #include <igl/avg_edge_length.h> #include "MeshObject.h" #include "ViewCamera.h" #include "../Tools/Gradient.h" #include "../Tools/CurvatureDerivative.h" #include <algorithm> MeshObject::MeshObject(): gaussian_compute...
ALGO
0.963532
3.208757
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-12-09T05:54:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c38f3dc24a24...
9dc511bb-897f-4f97-a37d-7c6582677094
lballabio/QuantLib
ql/models/volatility/garch.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2006 <NAME> Copyright (C) 2012 Liquidnet Holdings, Inc. This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free s...
ALGO
0.998966
5.340002
{ "github_metadata": { "branch": "master", "commit_count": 17543, "repo_created_at": "2015-12-17T16:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6151, "forks": 1964, "issues": 51, "pull_requests": 11 }, "file_meta": { "content_id":...
0d7a429e-7ec2-47c4-9e59-44f6ae853a28
texeca/Inatel
C204 (codigos)/Soma Dos Nos.cpp
#include <iostream> using namespace std; struct treenode { int info; treenode *esq; treenode *dir; }; typedef treenode *treenodeptr; // Insere x na arvore void tInsere(treenodeptr &p, int x) { if (p == NULL) // insere na raiz { p = new treenode; p->info = x; p->esq = NULL; ...
ALGO
0.999939
4.900478
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-05-29T23:32: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": "b80c7acdf230...
902a37d1-aebb-4fd4-bf11-2c27d76e03e3
quintinmr/DGIIM_1
C1/Informática/Fundamentos de Programación/FP_sesion11/V_EliminaOcurrencias.cpp
/******************************************************************************/ // FUNDAMENTOS DE PROGRAMACIÓN // // <NAME> 1º A.2 DGIIM // /* Programa que lee una secuencia de caracteres, y elimina uno de los caracteres de dicha secuencia tantas veces como aparezca en ella. Dicho carácter es elegido por el usua...
ALGO
0.976852
4.900389
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-03-12T10:12:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc92f91414c7...
ac72d093-0d07-40ba-9a06-1a9d5549dd6b
ducnhan123-co/Resource_Bai_tap_thay_Dat-site_2024
STRING SACH KTLT.cpp
#include<iostream> #include<string.h> #include<ctype.h> using namespace std; char *tachtutrai(char *s);// cau a char *tachtuphai(char *s);// cau a char *chuanhoatu(char *s);// cau b int demsotu(char *s);//cau c int demtubatdaunguyenam(char s[]); // cau d void demkytucuamoitu (char *s);// cau e void sapxepkytutang (char...
ALGO
0.999596
3.027855
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-08-05T15:12: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": "6e2f747871...
62471343-fd46-41e1-a2ca-76f8f3fdef5d
TomArrow/JK2DemoCutter
shared/DemoReader.h
#pragma once #ifndef DEMOREADER_H #define DEMOREADER_H #define PCRE2_STATIC #include "jpcre2.hpp" #include <demoCut.h> #if USE_PMOVE #include "CModel.h" #include "PMove.h" #endif #include <DemoReaderBase.h> #define PLAYERSTATE_FUTURE_SEEK 60000 typedef jpcre2::select<char> jp; enum highlightSearchMode_t { SEARCH_...
TOOL
0.937036
4.536965
{ "github_metadata": { "branch": "master", "commit_count": 461, "repo_created_at": "2022-03-25T19:25:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "acf68dcc...
cf6d02fa-a7b1-43e3-b968-40d617d86bc1
DionysiosB/CodeForces
0300-0399/358A-DimaAndContinuousLine.cpp
#include <cstdio> int main(){ int n(0); scanf("%d", &n); long *left = new long[n - 1]; long *right = new long[n - 1]; long lastPoint(0), currentPoint(0); bool intersect(0); scanf("%ld", &lastPoint); for(int k = 0; k < n - 1; k++){ scanf("%ld", &currentPoint); if(curre...
ALGO
0.999995
3.981906
{ "github_metadata": { "branch": "master", "commit_count": 4487, "repo_created_at": "2013-06-27T18:15:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 690, "forks": 163, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e25...
97d85c53-819c-42b5-8801-b5bb7acbef2c
gabrielvasiljevic/mastermindchess
code/checkmate.cpp
#include <SFML/Graphics.hpp> #include "headers/checkmate.h" using namespace std; int color; //Extremely sensitive, enormous and complex algorithm. Do not touch, as only God knows what lies below this comment! void CheckMate::resetAttackBoard(Piece board[8][10]){ int i, j, k, p; for(i = 0; i < 8; i++){ ...
ALGO
0.979481
3.682428
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2014-03-13T15:42: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": "06ab648153...
a2fbf47c-8eef-4f0f-9293-825e2fcc1e5e
andrewlin27/Data-Structures-Algorithms
priority-queue/src/PriorityQueue.h
#pragma once #include <functional> #include <utility> #include <vector> template <class T, class Container = std::vector<T>, class Compare = std::less<T>> class PriorityQueue { public: using value_compare = Compare; using value_type = T; using size_type = size_t; using reference = T&; using const_...
ALGO
0.998944
6.507536
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-01-08T01:23: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": "aecd63c261d...
3f78d518-49bf-4e21-a40f-6590f76acc47
sdsasf/bustub2023fall
src/include/execution/executors/hash_join_executor.h
//===----------------------------------------------------------------------===// // // BusTub // // hash_join_executor.h // // Identification: src/include/execution/executors/hash_join_executor.h // // Copyright (c) 2015-2021, Carnegie Mellon University Database Group // //===-------------------...
ALGO
0.99288
3.979887
{ "github_metadata": { "branch": "master", "commit_count": 471, "repo_created_at": "2024-02-09T07:06: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": "d9651296...
18260a5c-a967-4010-9208-cb29bd54ab8e
josehgarciaa/k_quant
old_cppcore/include/chebyshev_moments.hpp
// With contributions made by <NAME>. #ifndef CHEBYSHEV_MOMENTS #define CHEBYSHEV_MOMENTS #include <complex> #include <vector> #include <string> #include <array> #include "sparse_matrix.hpp" //contain SparseMatrixType #include <cassert> //needed for assert #include <fstream> //For ifstream and ofstream #incl...
ALGO
0.906358
5.319741
{ "github_metadata": { "branch": "main", "commit_count": 192, "repo_created_at": "2022-07-12T10:10:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8f493313ce...
cb4f3706-6478-43e7-9360-552cc632880f
hello-world0421/Algorithm-Code-Repository
code_learning/牛客/contest/2024-8-7/题解/L.cpp
/* 概率dp + 逆元 时间复杂度 O(n) */ #include <bits/stdc++.h> using namespace std; using ll = long long; constexpr int MAXN = 1e6 + 1, MOD = 998'244'353; ll n; // 数组 dp 维护的是以 si 结尾的字符的概率 // 其中 0 表示相同字符串组成的概率,1 表示不严格递减字符串组成的概率,2 表示不严格递增字符串组成的概率 // 因为当计算以某个字符结尾单调的概率的时候如果其出现多次,后面的字符取与不取均为以该字符结尾的情况 ll dp[123][3], p[MAXN]; ll fact[M...
ALGO
0.999946
4.211746
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2024-11-03T02:06:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bc94c050e0...
d8ea0963-2989-4b1b-881d-18a358f748de
algosenses/AlgoSE-SDK-Cpp
Inc/AlgoOrder.h
#ifndef ALGO_ORDER_H #define ALGO_ORDER_H #include <string.h> #include "Defines.h" namespace AlgoSE { typedef struct { enum { ParamId_Start = 0, // Global parameters LowerLimit_PriceTicks, UpperLimit_PriceTicks, Float_PriceTicks, TimeToLive_Ms, CloseAction...
TOOL
0.908811
4.585975
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-07-05T06:36:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bddb29048...
3a0dc56e-62e6-435c-a99b-b41c8db2b45b
filipeabelha/gym-solutions
uri/1907.cpp
#include <bits/stdc++.h> using namespace std; #define st first #define nd second #define mp make_pair #define pb push_back #define cl(x, v) memset((x), (v), sizeof(x)) #define db(x) cerr << #x << " == " << x << endl #define dbs(x) cerr << x << endl #define _ << ", " << typedef long long ll; typedef long double ld; ty...
ALGO
0.999698
4.131724
{ "github_metadata": { "branch": "master", "commit_count": 1023, "repo_created_at": "2017-03-27T00:56: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": "1d550dc...
8151befe-4a95-4461-bea7-e224ffd58906
LucasCamporro/TP-Final-Froger-Lucas-Camporro
main.cpp
#include<iostream> #include <ctime> #include <conio2.h> #include <cstdio> #include <windows.h> using namespace std; class pantalla { private: int xpositionBordes; int ypositionBordes; int xpositionMeta; int ypositionMeta; int xpositionInicio; int ypositionInicio; public: pantalla(); void dibujar(); }; pan...
ALGO
0.984645
3.778923
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-02-28T06:33: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": "0e69dd7e1eb6...
766d23b8-0789-43cd-9514-3088832d400c
sudhanshu-t/DSA
HomePepCodes/Lec12-17/7_recArr.cpp
#include <iostream> using namespace std; void disp(int arr[], int vidx, int n){ // w/o vidx // if(n == 0){ // return; // } // disp(arr, n - 1); // cout << arr[n-1] << endl; // w/ vidx // if(vidx == n){ // return; // } // proactive cout << arr[vidx] << endl; ...
ALGO
0.999924
4.691364
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-07-09T11:48: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": "4ea9bdc8b...
4b7d0bbc-655e-4a4e-b6f3-7bd68f06cac5
lsgwr/algorithms
Part13算法竞赛宝典/第二部资源包/第六章 穷举算法/时钟问题/src/优化枚举法/clock.cpp
#include <cstdio> using namespace std; /* Clock[i][j]记录第i行第j列的时钟需转几次才能成功 即读入 一个x Clock[i][j] = (4 - x) % 4 Map[i][j] 记录第 (i - 1) * 3 + j 的方案用了几次 */ int Clock[4][4], Map[4][4]; int Order(int k)//统一变成范围内值的函数 { int c = k; while (c < 0) { c += 4; } while (c > 4) { c -= 4; } return c; } int main(...
ALGO
0.999972
3.686916
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2018-04-13T13:43:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 347, "forks": 110, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "7125d...
62732b28-6dbe-4825-b92f-17d872b6dc5e
IMCG/icoding
OJLeetCode/FirstMissingPositive.cpp
/*Given an unsorted integer array, find the first missing positive integer. should run in O(n) time For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2.*/ #include<iostream> using namespace std; class Solution{ public: int firstMisingPosition(int A[], int n) { int *B = {}; int *C = {}; int i; for (i...
ALGO
0.999912
4.096583
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2015-09-25T13:51:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "330d0105...
f4b423ea-f78e-4abd-9617-b06afef3c89b
lakshv06/cp-practice
code/LFUCache.cpp
#include <bits/stdc++.h> using namespace std; class cacheNode{ public: int key, value, freq; cacheNode * prev, *next; cacheNode(int key, int value){ this->key = key; this->value = value; this->next = nullptr; this->prev = nullptr; this->freq = 1; } }; c...
ALGO
0.999438
5.546744
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2024-09-01T01:56: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": "d386dc16b2c...
cdaa0660-18fe-418d-a096-d6f68295af04
mridulcr7/Templates
leetcode_comp.cpp
//os #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update #include <ext/pb_ds/detail/standard_policies.hpp> using namespace __gnu_pbds; typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> orde...
ALGO
0.999952
3.156804
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-06T09:17: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": "0ffe6c89b889...
0432be2f-50da-43c0-808f-77943f79970a
dhanika08/100DaysOfCode_Dhanika
Day 09/IterativeBinarySearch.cpp
// Search an element in array with O(logn) time complexity #include <iostream> using namespace std; int binarySearch(int arr[], int n, int k) { int start = 0; int end = n - 1; while (start <= end) { int mid = start + (end - start) / 2; if (arr[mid] == k) return mid; ...
ALGO
0.999779
5.707918
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-03-12T04:20:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b87586a1ada...
875e9033-4773-407c-81c1-0cd626abc783
web3Aiden/LeetCode
ShortestPalindrome.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; class Solution { public: string shortestPalindrome(string s) { int len = s.size(); if (len <= 1) return s; string ss("#"); for (int i = 0; i < len; ++i) ss = ss + s[i] + '#'; int pl = lo...
ALGO
0.99991
5.322955
{ "github_metadata": { "branch": "master", "commit_count": 449, "repo_created_at": "2016-03-02T14:55: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": "76e6e605...
5e395972-a61b-4356-93e2-e793525de410
GAlekseyV/Yellow_belt
Week_4/task_7.1_sort/main.cpp
// // Created by GAlekseyV on 18.09.2018. // /* * Напишите шаблонную функцию MergeSort, принимающую два итератора шаблонного типа RandomIt и сортирующую * заданный ими диапазон с помощью сортировки слиянием. Гарантируется, что: * - итераторы типа RandomIt аналогичны по функциональности итераторам вектора и строки, т...
ALGO
0.999707
6.070981
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-11-09T10:51:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e892c6b4b...
cfa0c7bb-7d37-4086-bca8-158b1b799d3d
Sudhir878786/MyLeetCode_Solutions
Eventual Safe States - GFG/eventual-safe-states.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: bool func(int cur,vector<int>adj[],vector<int>&vis) { vis[cur]=1; bool ans =true; for(auto it:adj[cur]){...
ALGO
0.999957
6.762196
{ "github_metadata": { "branch": "Sudhir", "commit_count": 2704, "repo_created_at": "2022-05-30T12:33:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "645e06b...
d95f288a-7462-409a-a2ae-bb44ff6fb24a
tomotsune/Banker-s-Algorithm
main.cpp
#include <iostream> #include <vector> using namespace std; int main() { cout << "processes and sort of resources" << endl; int processes, resources; cin >> processes >> resources; vector<vector<int>> max; vector<vector<int>> allocation; vector<int> available; vector<vector<int>> need; ...
ALGO
0.999784
3.862934
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-06-28T13:26: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": "2360aa976a...
afd201d1-f8cc-4afc-a6ee-2fdbd146276f
vbonnici/grafe-sim
analysis/data/p02260/s507810719.cpp
#include <iostream> using namespace std; void printA(int A[], int N){ for(int i = 0; i < N - 1; ++i){ cout << A[i] << " "; } cout << A[N - 1] << "\n"; } int selectionSort(int A[], int N){ int nSwap = 0; for(int i = 0; i < N - 1; ++i){ int minIdx = i; for(int j = i; j < N; ...
ALGO
0.999871
5.1533
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-07-10T13:21: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": "e74212d1bee...
7face1c7-3d36-4f84-8b60-fefe06470fb2
ajaymd/ikk
Arrays/Detect_Prime_Numbers/solutions/sub_optimal_solution.cpp
#include<bits/stdc++.h> using namespace std; // ----------------------------- START ------------------------------- const int MAX_N = 300000, MAX_A = 4000000; int check_if_prime(int no) { if (no == 1) { return 0; } for (int i = 2; i * i <= no; i++) { if (no...
ALGO
0.999971
4.098579
{ "github_metadata": { "branch": "master", "commit_count": 352, "repo_created_at": "2018-11-13T13:31:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a1c75a2...
a01bd268-e4a5-4d04-ac74-f073b3dc4874
weidai11/cryptopp
blowfish.cpp
// blowfish.cpp - originally written and placed in the public domain by <NAME> #include "pch.h" #include "blowfish.h" #include "misc.h" NAMESPACE_BEGIN(CryptoPP) void Blowfish::Base::UncheckedSetKey(const byte *key_string, unsigned int keylength, const NameValuePairs &) { AssertValidKeyLength(keylength); unsigned...
ALGO
0.997291
7.091044
{ "github_metadata": { "branch": "master", "commit_count": 6471, "repo_created_at": "2015-06-03T21:53:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5163, "forks": 1564, "issues": 58, "pull_requests": 17 }, "file_meta": { "content_id": ...
fe5c53d9-8533-41fb-ab7e-c4c0d727d598
kgoel9899/CF_Solutions
codeforces/1450/D.cpp
#include<bits/stdc++.h> using namespace std; #define MOD 1000000007 #define mod 998244353 #define int long long #define setpres cout << fixed << setprecision(10) #define all(x) (x).begin(), (x).end() #define fast ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" const int INF = 1e18; #ifdef DEBUG #de...
ALGO
0.99992
4.180808
{ "github_metadata": { "branch": "master", "commit_count": 1962, "repo_created_at": "2020-12-21T08:58: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": "b643da5...
452b12f7-0faa-434c-a378-a7f2bb4d05a5
Hironobu-Kawaguchi/atcoder
atcoder/nikkei2019_qual_c.cpp
// https://atcoder.jp/contests/nikkei2019-qual/tasks/nikkei2019_qual_c #include<iostream> // #include<algorithm> // #include<string> // #include<numeric> // #include<vector> // #include<map> // #include<tuple> // #include<set> // #include<queue> // #include<deque> // #include<regex> // #include<bitset> // #include<ioma...
ALGO
0.999965
3.880734
{ "github_metadata": { "branch": "master", "commit_count": 865, "repo_created_at": "2019-07-16T15:08: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": "653d559e...
98e18e64-e154-412f-808e-5494db2bad47
anushka4902/sl-4-assignment
file1.cpp
#include<stdio.h> #include<stdbool.h> #include<stdlib.h> typedef struct node { int count; struct node *next_1; struct node *next_2; struct node *next_3; int data; bool mark; }Node; Node *pointers[8]; void display_node(int i) { printf("value=%d\t reference count=%d\nfree size=...
ALGO
0.998555
3.284292
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-04-18T17:00: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": "bb1bb079783f...
2bcb5648-9049-457a-962b-8bf6c76144ea
Group08-Chitkara-University/2110990192
armstrong_num.cpp
// Program to check armstrong number #include <iostream> #include <math.h> #include <string> using namespace std; int main() { int n; cout << "Enter a number: "; cin >> n; int originalnum = n; int sum = 0; while (originalnum != 0) { int lastdigit = originalnum % 10; // Acce...
ALGO
0.999105
4.416481
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2022-06-02T08:38:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ef15425a50...
0910bf66-809c-4c0c-9114-14ff375efb9a
Srishtik16/Leetcode-Submissions
2121-intervals-between-identical-elements/2121-intervals-between-identical-elements.cpp
class Solution { public: vector<long long> getDistances(vector<int>& arr) { int n = arr.size(); map<int, vector<int>> m; for(int i = 0; i < n; i++) { m[arr[i]].push_back(i + 1); } vector<long long> ans(n, -1); for(auto x: m) { int l = x.second....
ALGO
0.999914
4.914847
{ "github_metadata": { "branch": "main", "commit_count": 3606, "repo_created_at": "2022-04-28T14:27:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8cf225823...
5a00a237-6a5e-413b-9f65-171cd4f6aa7c
ethz-adrl/control-toolbox
ct_optcon/examples/nlp/Nlp3D.cpp
/********************************************************************************************************************** This file is part of the Control Toolbox (https://github.com/ethz-adrl/control-toolbox), copyright by ETH Zurich. Licensed under the BSD-2 license (see LICENSE file in main directory) ****************...
ALGO
0.998628
6.428134
{ "github_metadata": { "branch": "v3.0.2", "commit_count": 1871, "repo_created_at": "2019-04-25T21:55:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1596, "forks": 332, "issues": 59, "pull_requests": 4 }, "file_meta": { "content_id": "6f...
d3052587-ebda-439a-87bc-17b6398daea9
OloieriAlexandru/Competitive-Programming-Training
codeforces/159B.cpp
#include <bits/stdc++.h> #define mkp make_pair using namespace std; int n, m, x, y, ans1, ans2, v1, v2, minn; bool ex1[1005], ex2[1005]; map<pair<int,int>,int>mp1; map<pair<int,int>,int>mp2; pair<int,int>p1; int main() { scanf("%d %d",&n,&m); for (int i=1; i<=n; ++i) { scanf("%d %d",&x,&y); ...
ALGO
0.999942
3.271852
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2019-05-29T19:18: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": "39f59d06d...
8c36559e-4a2d-40fb-84cd-8c1b9e690c54
pumfit/PracticeForCodingTest
CodingTestExProject/CodingTestExProject/백준/10211.cpp
/* 10211 Maximum Subarray 7번이나 왜맞틀한 문제.. 아주 여러번 풀어본 Maximum Subarray이지만 간과한 부분이 있었다. 먼저 들어오는 값의 범위를 간과하고 최대값 초기화를 0으로 해서 25퍼센트 대에 틀렸다. 이후 -1001으로 바꾸니 100퍼센트에서 틀려서 뭐지뭐지 하다가 dp 반복문에서 0이 아닌 1에서 부터 시작하는게 보였다. 설마..? 0의 값이 구간 최대라면 나는 이경우를 생각하지 않고 있었고 이전에 최대값 초기화를 max = dp[0] = arr[0]으로 바꿔 통과할 수 있었다. 이제부터 dp 구간 최대/최소 ...
ALGO
0.999902
4.773474
{ "github_metadata": { "branch": "master", "commit_count": 450, "repo_created_at": "2021-06-30T02:44: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": "680912c2...
97c16f58-c107-486c-83f8-f72b755d83c0
khalid-imran/phitron
c++/M3.5practice/W_Mathematical_Expression.cpp
#include<bits/stdc++.h> using namespace std; int main() { int a, b, c; char s ,q; cin >> a >> s >> b >> q >> c; int statement = 0; long long int value = 0; if (s == '+') { if (a + b == c) { statement = 1; } else { value = a + b; } ...
ALGO
0.999978
3.715737
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2024-05-20T15:49: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": "6da9e7f0d...
3395bc16-7fa2-457a-ac31-ecd8ef1869eb
cseshamim47/competitive-programming
2024/Platform Wise/LightOJ/Dynamic Programming/LOJ-1159 Batman.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define all(x) x.begin(),x.end() // #define int long long #ifdef SHAMIM_AHMED #include <G:\Desktop Items\STATION\CPP\debug.h> #else #define debug(x...) #define debug2(x...) #define debug3(x...) #endif string a,b,c; int dp[50][50][50]; in...
ALGO
0.999976
4.78462
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-10-03T10:18:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9489233ae8...
62297ebe-7d62-4a60-80dd-5e26cf1e8878
PW486/leetcode
solutions/cpp/114-flatten-binary-tree-to-linked-list.cc
#include <iostream> using namespace std; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; class Solution { public: void flatten(TreeNode *root) { if (root == NULL) return; if (root->left != NULL) { flatten(root->left); ...
ALGO
0.999989
5.262076
{ "github_metadata": { "branch": "master", "commit_count": 139, "repo_created_at": "2019-11-27T03:28: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": "619049b5...
58c840bc-a78f-4220-9c74-66a7fa0145ea
koosaga/olympiad
Library/icpc-book-master/xyz/codes/old_template/graph_mincostflow_7k+.cc
/////////////////////////// // // MinCostFlow // /////////////////////////// int he[NN], ne[MM], ad[MM], di[MM], wi[MM]; int pr[NN], ed[NN], d[NN]; bool v[NN]; int t; void addE(int x, int y, int z, int w) { ++t; ne[t] = he[x]; he[x] = t; ad[t] = y; di[t] = z; wi[t] = w; ++t; ne[t] = he[y]; he[y] = t; ad[t] = x; d...
ALGO
0.992091
3.893963
{ "github_metadata": { "branch": "master", "commit_count": 361, "repo_created_at": "2015-11-06T16:01:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 285, "forks": 31, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "af418...
69feabdd-102c-4b2d-9c40-391263e4645f
valvarezma/estructurasdedatos_maestria
trabajo_final/source_SIFT.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <opencv2/opencv.hpp> #include "tinyxml2.h" struct ImageDataPoint { cv::Mat descriptor; // Descriptor de la imagen std::string label; // Etiqueta de la imagen }; // Estructura para un nodo del k-d tree struct KDTreeNode { ...
DATA
0.999383
6.207178
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2023-07-25T00:50:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "42543ce8760...
415d237d-8d24-4e36-b6af-13c242cc7367
ValveSoftware/source-sdk-2013
src/raytrace/trace2.cpp
//========= Copyright Valve Corporation, All rights reserved. ============// // $Id$ #include "raytrace.h" #include <mathlib/halton.h> static uint32 MapDistanceToPixel(float t) { if (t<0) return 0xffff0000; if (t>100) return 0xff000000; int a=t*1000; a&=0xff; int b=t*10; b &=0xff; int c=t*.01; c &=0xff; return 0...
ALGO
0.972862
5.377406
{ "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": ...
de8ac507-5f94-4ca2-a9d1-aacd6b922703
dust9826/codeforce
1158_A.cpp
//https://codeforces.com/problemset/problem/1158/A #include <iostream> #include <vector> using namespace std; int main() { int n, m; cin >> n >> m; vector<int> a(n); vector<int> b(m); long long int sum=0; int maxA_1 = 0, maxA_2 = 0; for (int i = 0; i < n; i++) { cin >> a[i]; sum += a[i]; if (a[i] > maxA_...
ALGO
0.999973
3.266196
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-07-18T17:12:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebdd1eff18...
2a620b4d-62b1-43a8-b2f4-bb90a92b083f
Chenghr/Code
VS_C_code/code/wangdao/6.2/main.cpp
#include <iostream> #include <string> #include <algorithm>//包含reverse函数 using namespace std; string stradd(string s1,string s2,int m)//字符串本身是从低位到高位存储 { int cur = 0;//保存进位 int i=0; for(; i<s2.size(); i++) { int temp = s1[i]+s2[i]+cur-'0'-'0'; s1[i] = temp%m +'0'; cur = temp/m; ...
ALGO
0.999987
3.580345
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2020-11-22T14:12:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "555dfe435cc...
8804c2af-894f-43ce-a22b-4bf584f65d7f
HimanshuJo/CPP-Basic-to-Advance-Important-Concepts-With-Implementations
C++/Important Concepts/Tuple/Swap.cpp
// swap() :- The swap(), swaps the elements of the two different tuples. #include<iostream> #include<tuple> using namespace std; int main() { tuple <int, char, float> tup1(20, 'g', 17.5); tuple <int, char, float> tup2(10, 'f', 15.5); cout << "The first tuple elements before swapping are : "; cout << get<0>(tup1)...
ALGO
0.995596
5.790467
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2022-05-09T14:00: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": "92ec92de6cf...
b51cb2e0-4b3a-48c3-b416-9c12dece3072
GitHub-Crow/Algorithm
CF/1514C.cpp
/* Q: 给定数字n,求序列[1, 2, .. n] 中的最长子序列使得,子序列的乘积对n取模的结果为1。 A: gcd(prod % n, n) = gcd(prod, n) = gcd(1, n) */ #include <bits/stdc++.h> using namespace std; typedef long long LL; #define LOCAL int main(int argc, char * argv[]) { std::ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); #ifdef LOCAL freopen("data.in...
ALGO
0.999978
4.021894
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-11-03T12:39:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa8d9c9cbf...
a3847118-21a8-462a-8cbf-9e0ab9924e78
Sharim0684/CPP_OPP_DSA
STL priority_queue/8.cpp
// Given an array arr[] of N elements, the task is to perform using priority_queue and // the following operation: // ● Pick the two largest element from the array and remove these element. If the // elements are unequal then insert the absolute difference of the elements into the // array. // ● Perform the above opera...
ALGO
0.999995
4.382188
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2022-07-14T15:24: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": "a667deccf6e...
16ad576c-f29c-48d7-a3e1-b450da2eb7e7
yg838457845/OKVIS_Chinese_annotation
build/brisk/src/brisk_external/include/brisk/scale-space-feature-detector.h
/* Copyright (C) 2011 The Autonomous Systems Lab, ETH Zurich, <NAME>, <NAME> and <NAME>. Copyright (C) 2013 The Autonomous Systems Lab, ETH Zurich, <NAME> and <NAME>. All rights reserved. This is the Author's implementation of BRISK: Binary Robust Invariant Scalable Keypoints [1]. Various (partly unpublishe...
ALGO
0.920392
7.532042
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-07-28T08:41:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 46, "forks": 16, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38e760ba...
15b7b751-bd97-47f2-b8be-7c94d2f7f672
ajeevani/Rock-Paper-Scissors-Game
main.cpp
#include <iostream> #include <string> #include <cstring> #include <conio.h> using namespace std; class Player { char rock = 'R'; public: Player() {} virtual char GetMove() = 0; virtual string GetName() = 0; }; class HumanPlayer : public Player { public: // method to get move by human player with ...
TOOL
0.927374
4.040127
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-12-20T21:55: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": "552d34eb2dc7...
f6e4b582-7fea-4dbe-8d10-b9c7aa00f079
AdaCompNUS/sarsop
src/OfflineSolver/solverUtils.cpp
/** * Part of the this code is derived from ZMDP: http://www.cs.cmu.edu/~trey/zmdp/ * ZMDP is released under Apache License 2.0 * The rest of the code is released under GPL v2 */ #include <assert.h> #include <stdlib.h> #include <sstream> #include "GlobalResource.h" #ifdef _MSC_VER #else #include <unistd.h> #endif ...
TOOL
0.996778
4.961746
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-04-09T01:37:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 90, "forks": 39, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "cc32539d...
9b90f538-5d6e-4590-a58c-36d61e71f2a3
SamIeer/datastructure_cpp
ASSINGMENTS_DS/Introduction_Assingment.cpp
#include <iostream> using namespace std; //ANSWER 1: TO CHECK WETHER A NUNBER IS PRIME OR NOT void prime(int a){ if(a==1){ cout<<"Nether prime nor composite";} else if(a==2){ cout<<"PRIME NUMBER";} else{ bool is_prime = true; for(int i=2;i<a;i++){ if(a%i==0){ ...
ALGO
0.975008
3.20996
{ "github_metadata": { "branch": "main", "commit_count": 112, "repo_created_at": "2023-10-13T15:39: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": "a608b2a73c...
58c07557-c6d1-4155-9e0e-962e1e4f73fa
VinhTungg/PTIT_DSA
DSA02023 - ĐẶT TÊN.cpp
#include <bits/stdc++.h> #define ll long long #define boost ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define MOD 1000000007 using namespace std; int t = 1, n, k; vector<string> s; int X[20] = {}; bool visited[20]; void Try(int i){ for(int j = X[i - 1]; j < s.size(); ++j){ if(!vi...
ALGO
0.999995
4.226163
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-04-05T08:06:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5505e9fc6eac...
d3ca6c52-a070-49e6-95da-50dbe87e55be
thibaultdalmon/acm-icpc-prep
1753-NFS/NFS.cpp
#include <cstdio> using namespace std; int main(){ double eps = 1e-06; int n,t; int ret = scanf("%d %d", &n, &t); while (ret!=-1){ int d_i[n]; int s_i[n]; int min_s = 0; for (int k=0; k<n; k++){ int d, s; scanf("%d %d", &d, &s); if (!k){ min_s = s; }else{...
ALGO
0.999862
3.387254
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-10-15T20:39: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": "ad561c9922...
9d5ef974-3daa-4bbd-87b1-f29b93b2b9ac
MykhailoYa/Ford-Fulkerson-and-Humori-Hu
Gomory-Hu and Ford-Fulkerson algorithms/Course_work_froms_v1/graph.cpp
#include "graph.hpp" namespace coursework { graph* create_graph(int n_vertexes, int n_edges, bool or ) { // Create dynamic values graph *result = new graph; result->edges = new edge[n_edges]; result->v_n = new T_vertex[n_vertexes]; result->n_vertexes = n_vertexes; result->n_edges = n_edges; result->ty...
ALGO
0.903415
3.983589
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2017-05-03T08:11:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "41c81001b...
6d972aab-f7a0-4a24-af8d-5e1aaaea88c9
yangzebin001/OJ
lanqiao/changenum.cpp
#include <iostream> #include <algorithm> #include <cstdio> #include <cmath> #include <vector> #include <map> #include <fstream> using namespace std; string s; map<char, int> M; // ABT 出现的组合情况 char per[6][3] = { {'A', 'B', 'T'}, {'A', 'T', 'B'}, {'B', 'A', 'T'}, {'B', 'T', 'A'}, {'T', 'A', 'B'}, {'T', 'B...
ALGO
0.99999
3.896867
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2019-08-17T03:54:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1df367c9...
1fc330c2-c19a-4b52-a07a-bc0ac2509064
Jialin/ICPC
Archive/SPOJ/T/TIP3.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstddef> #include <cstdint> #include <cstdio> #include <cstring> #include <functional> #include <iostream> #include <map> #include <set> #include <string> #include <tuple> #include <unordered_map> #include <unordered_...
ALGO
0.999995
3.771206
{ "github_metadata": { "branch": "master", "commit_count": 886, "repo_created_at": "2019-03-04T23:30:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "517ff524...
194ac3f7-6437-4188-985f-695760c1d7db
Ahmad45123/codeforces-submissions
codeforces/1303/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define INT_INF 1e9 #define LL_INF 1e18 int main() { ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); int t; cin >> t; while(t--) { string s; cin >> s; vector<char> chars; int curIndex = 0; ...
ALGO
0.99998
3.773108
{ "github_metadata": { "branch": "master", "commit_count": 515, "repo_created_at": "2021-01-11T18:38: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": "288243c3...
01be240e-d56a-4f04-b1dd-0c13ed669a48
tgoMota/Competitive-programming
UVA Solutions/10074.cpp
//https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1015 #include <bits/stdc++.h> using namespace std; #define oo 10300 int n, m, tab[101][101], maxp, sump; int main(){ while(scanf("%d%d", &m, &n)){ if(m == 0 && n == 0) break; for(int i = 0; i < m ; ++...
ALGO
0.999983
3.36323
{ "github_metadata": { "branch": "main", "commit_count": 187, "repo_created_at": "2019-08-30T00:01: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": "8dd442cbbb...
e766bb3c-0803-47a2-82ed-f26de8dc6ae7
wyllowyllo/Coding_Test_Problems
problems/Algorithm_Codes/Algorithm_Codes/Scripts/9935.cpp
#include <bits/stdc++.h> using namespace std; string s; string p; #pragma region MySol // find와 erase를 사용 //시간 초과 //투포인터를 써볼까? void MySol() { cin >> s; cin >> p; //첫번째 시도 /*auto start = 0; auto pos = s.find(p, 0); while (pos != string::npos) { s.erase(pos, p.size()); start = max(0, (int)(pos - p.size(...
ALGO
0.999912
5.162381
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2024-09-02T14:25: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": "ac5adfe0053...
e73364f3-dfc8-42ba-a955-f6f2ae155521
tyler-hagen/leetcode-cpp
Longest_Increasing_Subsequence/solution.h
using namespace std; class Solution { public: vector<int> cacheLIS; int lengthOfLIS(vector<int>& nums) { return lengthOfLISDynamic(nums); } int lengthOfLISDynamic(vector<int>& nums) { cacheLIS.resize(nums.size()); cacheLIS[nums.size() - 1] = 1; for(int i ...
ALGO
0.999996
6.000871
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2022-02-23T00:00:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3191865c579...
131685fd-0b7b-48db-b09b-f3cd7c7a1302
noel-vargas/PingPongCPP
PingPong.cpp
#include <iostream> #include <time.h> #include <conio.h> using namespace std; enum eDir{STOP=0,LEFT=1,UPLEFT=2,DOWNLEFT = 3,RIGHT=4,UPRIGHT=5,DOWNRIGHT=6}; class cBall{ private: int x,y; int originalX,originalY; eDir direction; public: cBall(int posX,int posY){ originalX = posX; ...
ALGO
0.985805
3.762324
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-01-06T20:57: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": "707d89f88727...
e88847b2-86e6-40a4-a935-7581c0ac2978
Serah73/Practica_ordenacion
Estadistica.hpp
#ifndef ESTADISTICA_HPP_ #define ESTADISTICA_HPP_ #pragma once #include<cstdlib> #include<iostream> #include<iomanip> #include<ctime> #include"Datos.hpp" #include"Metodos.hpp" //#include"QuickSort.hpp" //#include"HeapSort.hpp" //#include"ShellSort.hpp" //#include"Burbuja.hpp" //#include"Insercion.hpp" template <cla...
ALGO
0.991834
4.753468
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-04-19T13:07: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": "519342d0d7...
3dd668b3-74f8-4995-9a38-c7fe63ee1a84
AnikDas-Stack/Codeforces-Problem-Solution
599A. Patrick and Shopping.cpp
#include <stdio.h> void swap(long long int* a, long long int* b) { int t = *a; *a = *b; *b = t; } int partition (long long int arr[], int low, int high) { long long int pivot = arr[high]; int i = (low - 1); for (int j = low; j <= high- 1; j++) { if (arr[j] <= pivot) { ...
ALGO
0.999968
3.709915
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2020-01-20T07:11: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": "0a0f1cd73...
83dd69cb-1034-4548-8e85-e20192cf78eb
shin5774/BaekjoonPractice
11053.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { cin.tie(0); ios_base::sync_with_stdio(0); int n; cin >> n; vector<int> *pos = new vector<int>[1001]; vector<int> input; vector<int> sorted; int *dp = new int[n]; for (int i = 0; i < n; i...
ALGO
0.999987
4.105608
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2021-11-02T08:05: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": "88771a6af...
02ba8163-2b87-4e48-be54-e601d33d5ff7
Mneach/Leetcode-Solution
3445-lexicographically-minimum-string-after-removing-stars/3445-lexicographically-minimum-string-after-removing-stars.cpp
class Solution { public: string clearStars(string s) { map<char,vector<int>> mp; unordered_map<int,int> excludeIndex; for(int i = 0; i < s.length(); i++){ char character = s[i]; if(character == '*'){ // find left a...
ALGO
0.999927
4.951643
{ "github_metadata": { "branch": "main", "commit_count": 4239, "repo_created_at": "2023-05-07T02:35: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": "fc3a00ca6...
30526b08-46fc-44f2-aee5-2052848f152e
pratikraj21/DSA_Level_1
Stack_&_Queue/celebrity_problem.cpp
#include<iostream> #include<stack> using namespace std; int main() { int n; cin>>n; // input array is an array of characters and not an integer char arr[n][n]; for(int i = 0; i < n; i++){ for(int j = 0; j < n; j++){ cin>>arr[i][j]; } } stack <int> st; ...
ALGO
0.999972
4.180536
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-07-07T08:47:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8390cbcb0...
d97ce2ed-45d6-4766-9ca1-1a5e73dcf5f8
justiny7/competitive-programming
codeforces/div-3/virtual/855-1800/F+/F.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { cin.tie(0)->sync_with_stdio(0); int n; cin >> n; vector<string> v(n); for (string &s : v) cin >> s; ll res = 0; for (char no = 'a'; no <= 'z'; ++no) { map<int, ll> mp; for (string s ...
ALGO
0.999895
4.00041
{ "github_metadata": { "branch": "main", "commit_count": 462, "repo_created_at": "2020-11-07T20:39:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d645ab420...
504a14df-281f-4e6c-ae4a-d37fac09e2c5
STRUKTUR-DATA-SE-07-02/ujian-praktikum-1-
2311104058_Dimastian Aji Wibowo/program/doublelinkedlist.cpp
//<NAME> //2311104058 #include "doublelinkedlist.h" #include <iostream> using namespace std; Mahasiswa* newElement(string nama, string nim, string kelas, int nilaiAsesmen, int nilaiPraktikum){ Mahasiswa* p = new Mahasiswa; p->nama = nama; p->nim = nim; p->kelas = kelas; p->nilaiAsesmen = nilaiAsesm...
ALGO
0.994377
3.917883
{ "github_metadata": { "branch": "main", "commit_count": 156, "repo_created_at": "2024-11-21T02:19:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f4a73eb29c9...
bcdbb81a-5157-4a7c-b55c-6482018ebc9c
jesusdelgadoPi/ContadorConDisplay7SegmentoConPulsadorLedBuzzer
contador_de_7_segmentos_con_boton.ino
//declaracion const int a = 2; const int b = 3; const int c = 4; const int d = 5; const int e = 6; const int f = 7; const int g = 8; const int botonIncremento =9; const int ledEntrada = 10; const int buzzPin =11; const int botonDecremento =12; const int ledSalida = 13; const int tiempoAntirebote = 10; int cuenta = 0; ...
TOOL
0.992311
4.288458
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-02-22T04:31: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": "1f241fcf897e...
10704c1c-417a-4ae8-b03f-ed84f5c94d07
OldScripter/Task_14_6
main.cpp
#include <iostream> void enterMatrix(float matrix[][4]) { std::cout << "Please enter the matrix row by row:\n"; for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { std::cin >> matrix[i][j]; } } } void multiplyVectorOnMatrix(float vector[], float matrix[][4],...
ALGO
0.99971
4.282265
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-05-30T17: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": "6ee7c1fa71a9...
1b348684-7089-4f4f-ad16-d785c8eab089
ejhasler/cs-ntnu
ntnu-dtu/5-semester-dtu-exchange/INFT2503/mandatory-assigments/mandatory-01/main.cpp
#include <iostream> int main() { const int length = 5; double temperatures[length]; int count_below_10 = 0; int count_between_10_and_20 = 0; int count_above_20 = 0; std::cout << "Du skal skrive inn 5 temperaturer." << std::endl; for (int i = 0; i < length; i++) { std::cout << "Temperatur nr " << i ...
TOOL
0.995875
4.886518
{ "github_metadata": { "branch": "main", "commit_count": 181, "repo_created_at": "2023-01-17T15:51:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 62, "pull_requests": 0 }, "file_meta": { "content_id": "cab4b5b34...
a82dc762-f4e0-423d-b87e-fc70385ca424
raincross7/code-similarity
codes/train_code/problem043/problem043_104.cpp
#include <bits/stdc++.h> #define rep( i, n ) for( int ( i ) = 0; ( i ) < ( n ); ( i )++ ) #define repr( i, n ) for( int ( i ) = ( n ); ( i ) >= 0; ( i )-- ) #define FOR( i, m, n ) for( int ( i ) = ( m ); ( i ) < ( n ); ( i )++ ) #define all( x ) ( x ).begin(), ( x ).end() typedef long long lint; using namespace std; i...
ALGO
0.9998
3.348678
{ "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": "68e379b436e4...
9b0f8bda-21c2-411e-923c-a429a30bdd23
kkadusic/data-structures-and-algorithms
Stack/stack-binary-search.cpp
#include <iostream> #include <stdexcept> #include <vector> using namespace std; template<typename Tip> class Iterator; template<typename Tip> class Stek { struct Cvor { Tip element; Cvor *sljedeci; Cvor(const Tip &el, Cvor *pok) : element(el), sljedeci(pok) {} }; Cvor *pVrh; // ...
ALGO
0.998636
4.662221
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-06-18T16:50:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "459ac5bf70...
77e360a3-6c94-4c6d-9d5f-c07bc4f1ccbc
dongb94/algorithm
nexon/2023.cpp
/// 2023.04.30 넥슨 코딩 테스트 #include <map> #include <set> #include <list> #include <cmath> #include <ctime> #include <deque> #include <queue> #include <stack> #include <string> #include <bitset> #include <cstdio> #include <limits> #include <vector> #include <climits> #include <cstring> #include <cstdlib> #include <fstream...
ALGO
0.999941
3.971771
{ "github_metadata": { "branch": "master", "commit_count": 202, "repo_created_at": "2018-08-27T11:13: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": "96727704...
88b521e9-efb1-4cda-bc2f-d2c67e724448
raincross7/code-similarity
codes/train_code/problem241/problem241_419.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define FOR(i,a,n) for(ll i=(ll)a;i<(ll)n;i++) #define RFOR(i,a,n) for(ll i=(ll)n-1;i >= (ll)a;i--) #define rep(i,n) FOR(i,0,n) #define rrep(i,n) RFOR(i,0,n) #define ALL(v) v.begin(), v.end() #define bra(first,second) '(' << first << ',' << second << ...
ALGO
0.999983
4.248227
{ "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": "5f2e5fecd084...
dedabc9e-3b2e-4c89-ba85-40a5f80eacad
Daeyeon23/Algorithm
백준/Gold/1019. 책 페이지/책 페이지.cc
#include<iostream> #include<algorithm> #include<cmath> using namespace std; int DAT[10]; int N; int Make9(int num, int e) { while (num % 10 != 9) { int temp = num; while (temp > 0) { int now = temp % 10; DAT[now] += pow(10, e); temp /= 10; } num--; } return num; } int main() { cin.tie(NULL); ...
ALGO
0.999858
3.844122
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2023-03-01T07:22:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e25b6340b...
ce8e137e-5277-4909-833f-be5159befb88
WillowTI/OnlineJudge
贪心/[贪心] - EOJ2531.cpp
/** * 经典贪心策略 * 一开始看错题目,WA了好几发 * 然后弄明白了,按照正确的策略写,实现错了好几发,被自己蠢哭 * 策略很简单,每次重量最小的先上船,然后把重量尽可能大的也一起上船,没有满足的就算了 */ #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int cas, n, k, t, a[2005]; bool vis[2005]; int main() { //freopen("in.txt", "r", stdin); scanf("%d", &cas); while (...
ALGO
0.999971
3.655316
{ "github_metadata": { "branch": "master", "commit_count": 204, "repo_created_at": "2017-04-08T09:21:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7547e6c8...
61f8d343-e599-4fb2-826c-666b91e02f91
ustcyyw/algorithm
luogu/graph/base_cycle/ CF1454E.cpp
/** * @Time : 2024/7/7-1:04 AM * @Author : <EMAIL> * @E-mail : <EMAIL> * @Github : https://github.com/ustcyyw * @desc : CF1454E 图论 基环树 数学 */ /* * 明显n个结点和n条边 保证连通的情况下 一定有且仅有一个环 * 环中的元素:假设有cycle个 找规律发现其能贡献的路线有 cycle * (cycle - 1) * 不在环中的元素: * 也就是枝条 按枝条与环的交点结点分组 因为每个组内的元素合在一起看,可以等价为一条元素个数相同的单链条 * 链条长度为 nu...
ALGO
0.999963
5.304088
{ "github_metadata": { "branch": "main", "commit_count": 162, "repo_created_at": "2024-11-11T07:09:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9fbd92216...
ff7ec9a6-ff3a-49a4-b0a0-74a7c8ba1b80
NVIDIA/cutlass
include/cutlass/epilogue/threadblock/epilogue_with_broadcast.h
/*************************************************************************************************** * Copyright (c) 2017 - 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...
ALGO
0.930922
7.162977
{ "github_metadata": { "branch": "main", "commit_count": 667, "repo_created_at": "2017-11-30T00:11:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8078, "forks": 1336, "issues": 322, "pull_requests": 54 }, "file_meta": { "content_id": "64...
28e6e29f-0222-4b2a-b152-53bf82d29038
ChristopherRabotin/GMAT
src/csaltTester/src/TestOptCtrl/src/ConwaySpiralDriver.cpp
//------------------------------------------------------------------------------ // ConwaySpiralDriver //------------------------------------------------------------------------------ // GMAT: General Mission Analysis Tool // // Copyright (c) 2002 - 2022 United States Government as represented...
ALGO
0.998989
4.772208
{ "github_metadata": { "branch": "GMAT-R2022a", "commit_count": 1, "repo_created_at": "2017-03-09T03:09:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 52, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95d...
8afad7e2-d9a5-42d0-b130-f9a24c7d6fea
ishandutta2007/codeforces-d
dhxh/normal/1089/A.cpp
#include <iostream> #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include <string> #include <algorithm> #include <vector> using namespace std; int n, m, t; bool f[205][205][5][5]; vector <pair <int, int> > vec[205][205][5][5]; int init(){ int i, j, k, l, m; f[0][0][0][0] = true; ...
ALGO
0.998684
3.122365
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31: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": "b34f2f7fe672...
17376173-e321-40d0-abe8-1049bfcd9f17
pixxiees/final-project-pprg
PPRG_Project_Kel_3.cpp
#include <bits/stdc++.h> #include <thread> #include <conio.h> using namespace std; struct siswa { string nama; float nilai_mtk; float nilai_bindo; float rerata; bool status_siswa; }; siswa biodata[1000]; void sort_siswa(int jumlah_pendaftar) { for (int i = 1; i < jumlah_pendaftar; i++) { ...
TOOL
0.969974
4.425489
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-11-11T14:08:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac77e3f15806...
b7c2c9a7-3649-4c31-929f-973d7d4f53d3
Dknt0/ovinf
include/filter/filter_mean.hpp
#ifndef FILTER_MEAN_HPP #define FILTER_MEAN_HPP #include <yaml-cpp/yaml.h> #include <Eigen/Core> #include "filter/filter_base.hpp" #include "utils/history_buffer.hpp" namespace ovinf { // Scalar case template <typename T = float> class MeanFilter : public FilterBase<T> { public: MeanFilter() = delete; MeanFil...
TOOL
0.918983
7.394991
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2025-04-23T08:21:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "beb316ea5b3...
94e4f094-d5e0-45a1-adca-73addda22639
changdae20/BOJ
백준/Silver/17503. 맥주 축제/맥주 축제.cc
#include <iostream> #include <vector> #include <algorithm> #include <numeric> #include <climits> int main() { std::cin.tie(0); std::ios::sync_with_stdio(false); std::cout.tie(0); int N,M,K; std::cin >> N >> M >> K; std::vector<std::pair<int, int>> beers(K); for(auto& [a,b]: beers) { ...
ALGO
0.999983
3.935253
{ "github_metadata": { "branch": "main", "commit_count": 498, "repo_created_at": "2023-04-06T14:55:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9061eec12a...
cc237e6b-3be3-4541-ac9a-3f952e9a3bf7
oswalgopal/TechMaestro-75-Day-challenge
Day 10/03.largest_rectangle_in_histogram.cpp
// https://leetcode.com/problems/largest-rectangle-in-histogram/ class Solution { public: int largestRectangleArea(vector<int>& heights) { int result = 0; int size = heights.size(); stack<pair<int,int>> stk; vector<int> NSL(size, 0); vector<int> NSR(size, 0); ...
ALGO
0.999953
6.468545
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2022-03-24T03:22:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "759e1955b...
702db03c-bc13-4946-897d-2694da36d261
azaky/cp
spoj/AGGRCOW.cpp
#include <vector> #include <map> #include <set> #include <queue> #include <stack> #include <algorithm> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cstring> #include <cmath> #include <cstdlib> #include <ctime> using namespace std; #ifdef DEBUG #define debug(...
ALGO
0.999995
3.568433
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2020-05-23T01:00:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7d9b8fbea6...
87256a34-46f2-422c-a624-87f80a0aef66
Tanbir-Hasan-247/XPSC-Batch-4
Week - 1/A. Topicwise/Problem-3.cpp
#include <bits/stdc++.h> using namespace std; int main() { int m, n; cin >> m >> n; vector<int> a(m), b(n); for (int i = 0; i < m; i++) { cin >> a[i]; } for (int i = 0; i < n; i++) { cin >> b[i]; } int l = 0, r = 0; long long ans = 0; while (l < m && r < n...
ALGO
0.999981
3.529288
{ "github_metadata": { "branch": "main", "commit_count": 202, "repo_created_at": "2024-03-16T15:22: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": "1049a0d97f...
15403962-c18a-4d4c-ac68-e882521a0f5b
thangdv509/daily-code-challenge
00206_UniqueBinarySearchTreesII_02092021.cpp
#include<iostream> #include<vector> using namespace std; /* IDEA: We will use a recursive helper function that recieves a range (within n) and returns all subtrees in that range We have a few cases: 1. If start > end, which is not supposed to happen, we return a list that contains only a null 2...
ALGO
0.999935
6.025692
{ "github_metadata": { "branch": "master", "commit_count": 402, "repo_created_at": "2021-04-01T08:46:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d4db475...
780717d1-28a3-49a6-95b1-fecd9826129f
myGumi5/jungeun
BOJ/BJ1229.cpp
#pragma warning (disable:4996) #include<iostream> #include<cstdio> using namespace std; bool video[64][64]; int N; bool checkWhite(int sy, int sx, int len) { for (int i = sy; i < sy+len; ++i) { for (int j = sx; j < sx+len; ++j) { if (video[i][j] == 1) return false; } } return true; } bool checkBlack(int sy,...
ALGO
0.999793
4.076479
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-07-27T15:33:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0253566f283c...
b2dd32a8-20dc-45b1-a881-2b86b7b20876
TheIslland/learning-in-collegelife
7.代码练习/水仙花数.cpp
/************************************************************************* > File Name: 水仙花数.c > Author:TheIslland > Mail: <EMAIL> > Created Time: 2019年01月14日 星期一 11时03分28秒 ************************************************************************/ #include <iostream> #include <cstdio> #include <cmath> using namesp...
ALGO
0.999963
4.230345
{ "github_metadata": { "branch": "master", "commit_count": 649, "repo_created_at": "2018-08-10T07:32: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": "94244142...
9e99105e-839a-4ffb-8576-22dbc98778e3
Jichao-Peng/mobile_operation_project
jd_vision/src/pcl_bbox.cpp
#include <iostream> #include <sstream> #include <map> #include <Eigen/Geometry> #include <opencv2/opencv.hpp> #include <opencv2/imgproc/imgproc.hpp> #include <opencv2/highgui/highgui.hpp> #include <ros/ros.h> #include <ros/package.h> #include <pcl_ros/point_cloud.h> #include <pcl/point_types.h> #include <pcl/visuali...
DATA
0.931421
3.605304
{ "github_metadata": { "branch": "dev", "commit_count": 7, "repo_created_at": "2018-06-26T08:48: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": "37094c6afe5a8...
d0f25efc-b256-4137-ac45-e7ba21531945
facebook/mysql-5.6
router/src/routing/src/plugin_config.cc
/* Copyright (c) 2015, 2022, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, as published by the Free Software Foundation. This program is also distributed with certain software (including ...
CONFIG
0.981014
7.556639
{ "github_metadata": { "branch": "fb-mysql-8.0.32", "commit_count": 178894, "repo_created_at": "2013-04-15T17:54:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2557, "forks": 715, "issues": 198, "pull_requests": 40 }, "file_meta": { "con...
843090ee-a9b1-455a-ae02-fcb199c414b2
gregsobie/DataStructures
mp4/filler.cpp
/** * @file filler.cpp * Implementation of functions in the filler namespace. Heavily based on * old MP4 by CS225 Staff, Fall 2010. * * @author <NAME> * @date Fall 2012 */ #include "filler.h" animation filler::dfs::fillSolid(PNG& img, int x, int y, RGBAPixel fillColor, int tole...
ALGO
0.928549
6.187718
{ "github_metadata": { "branch": "master", "commit_count": 60144, "repo_created_at": "2017-04-02T00:32: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": "d29570...