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
39aded3f-d0eb-405c-afca-c95498f6dc93
bu1th4nh/Internal-Offline-Judge
Summer Camp/Chuyen Ha Long 2018/Anh Ming/TEA/main.cpp
/*==========================================================================================*\ ** _ _ _ _ _ _ _ ** ** | |__ _ _/ | |_| |__ | || | _ __ | |__ ** ** | '_ \| | ...
ALGO
0.999975
3.460623
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-01-08T13:48: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": "c11fb3e576...
a84a9084-2679-4483-a086-981cff6f3840
oxygen-hunter/Flashboom
data/big-vul-100/add_attention_code/Phi/top0-100/maximum-deletions-on-a-string-Solution3.deleteString/177859_Exec_Code_Bypass.cpp
gs_nulldevice(gs_gstate * pgs) { int code = 0; if (pgs->device == 0 || !gx_device_is_null(pgs->device)) { gx_device *ndev; code = gs_copydevice(&ndev, (const gx_device *)&gs_null_device, pgs->memory); if (code < 0) return code; ...
ALGO
0.985677
3.893689
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-03-22T14:39:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2363ea847c8...
0354f3bb-2f87-468e-bbfd-e3296ad2b309
mjbays/ROS-IvP-Native
ivp/src/lib_bhvutil/AOF_AvoidObstacle.h
/*****************************************************************/ /* NAME: <NAME>, <NAME>, and <NAME> */ /* ORGN: Dept of Mechanical Eng / CSAIL, MIT Cambridge MA */ /* FILE: AOF_AvoidObstacle.h */ /* DATE: Aug 2nd, 2006 */ /* ...
ALGO
0.962445
5.524117
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-07-21T11:39:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "686eb0633...
1c4b7090-1e4a-43e2-8a9c-09812a51c471
ggory15/NLP_test
include/hpp/foot/BoxesHullTrajProblem.hh
#pragma once #include <iostream> #include <Eigen/Core> #include <hpp/foot/utils/Box.hh> #include <hpp/foot/utils/FixedPlan.hh> #include <hpp/foot/utils/PlanForHull.hh> #include <hpp/foot/utils/ProblemConfig.hh> #include <hpp/foot/functions/BoxAbovePlan.hh> #include <hpp/foot/functions/BoxAboveFixedPlan.hh> #include <...
ALGO
0.999111
4.786068
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-09-25T13:31: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": "61d1a28590...
d0350efa-5712-46cd-ba8a-8edcec0316af
bvquoc/CP-Trainning-2021
0 - Contest 2020/PreVOI2019/PreVOI2019-Day2/Contestants/Ti123/fixstr.cpp
#include <bits/stdc++.h> #define f first #define s second const int maxn = 1000010; using namespace std; template <typename T> inline void read (T &x) { x = 0; char c; bool p = false; while (!isdigit(c = getchar())); if (c == '-') p = true; do x = x * 10 + c - 48; while (isdigit(c = getchar())); } string s...
ALGO
0.998867
3.501998
{ "github_metadata": { "branch": "master", "commit_count": 611, "repo_created_at": "2020-06-03T07:47: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": "87ccbf6d...
2eebabe5-0f77-49ac-817d-9017daa58317
zinzero/OOD_CNU2022
OOD10/main.cc
// Copyright [2022] <Copyright JangJinYoung> #include <iostream> #include <vector> #include "node.h" #include "int_node.h" #include "string_node.h" #include "tree_util.h" int main() { IntNode in1(nullptr, nullptr, 3); IntNode in2(nullptr, nullptr, 7); StringNode sn1(nullptr, nullptr, "hello"); String...
ALGO
0.999471
5.688768
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-12-28T05:11: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": "3768e24f3e...
ef04f6f4-c1bb-43b2-a247-30a693e5b41a
kosssshhhh/coding_test
백준/Gold/14002. 가장 긴 증가하는 부분 수열 4/가장 긴 증가하는 부분 수열 4.cc
#include <bits/stdc++.h> using namespace std; int n, ret = 1, idx, a[1004], cnt[1004]; int prev_list[1004]; vector<int> v; void go(int idx) { if (idx == -1) return; v.push_back(a[idx]); go(prev_list[idx]); return; } int main() { cin >> n; for (int i = 0; i < n; i++) cin >> a[i]; fill(prev_list, prev_...
ALGO
1
4.407705
{ "github_metadata": { "branch": "main", "commit_count": 447, "repo_created_at": "2023-12-27T05:12: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": "6fd405dfeb...
f7931b0d-fb06-4468-9a4f-b167988be468
Bzykowa/metaheuristics
l2/z1/main.cpp
#include <iostream> #include <cmath> #include <random> #include <chrono> #include <vector> #include <tuple> #include <limits> using namespace std; double salomon(double x1, double x2, double x3, double x4) { double square_sum = x1 * x1 + x2 * x2 + x3 * x3 + x4 * x4; return 1 - cos(2.0 * M_PI * sqrt(square_sum...
ALGO
0.999991
4.427411
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-03-29T14:12: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": "c816d2ec9...
91d7a87e-6136-4487-8aec-b0e484601c5e
mahimonga/Hacktoberfest-1
Languages/C++/Min_Heap.cpp
#include<bits/stdc++.h> using namespace std; void swap(int *x,int *y); class Minheap{ // class defining the Heap Structure int *harr; int heap_size; int capacity; public: Minheap(int capacity); void Heapify(int ); int parent(int x){ return (x-1)/2;} int left(int x){ return (2*x + 1);} int right...
ALGO
0.999728
3.581494
{ "github_metadata": { "branch": "master", "commit_count": 1391, "repo_created_at": "2020-10-25T19:10:07.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "shivaylamba/Hacktoberfest", "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { ...
6902e608-81e6-4516-8e75-6e084cb0cf56
ouyangyewei429/ACM-ICPC
HDOJ/hdoj_1084_simulation.cpp
/* PROG: numtri ID : ouyangyewei LANG: C */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <memory.h> #define maxn 104 int N, rank[6], solved[6], result[maxn]; struct STUDENT { int cnt, ti, index; }stu[maxn]; int compare(const void *a, const void *b) { STUDENT *c = (STUDENT *)a; ...
ALGO
0.997819
3.331449
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2014-07-31T01:34:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fee7a5a8c3...
e484c4d8-4e1c-4aca-b672-0fd04b670f98
RadheTians/Data-Structure
queue-array.cpp
#include<iostream> using namespace std; void push(int* arr, int* data, int* n, int* front, int* rear) { if(*rear+1 == *n){ std::cout << "Overflow Occured" << endl; return; } if(*front == -1 && *rear == -1){ *front = 0; *(arr + ++(*rear)) = *data; return; } *(arr + ++(*rear)) = *data; }...
ALGO
0.998314
3.768353
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-09-02T04:00:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8bf8371ecd...
1f9b09d2-030f-4008-863b-d9df53fdd7b9
HectorIGH/Competitive-Programming
Leetcode Challenge/08_August_2020/C++/Week 2/1_Path Sum III.cpp
//You are given a binary tree in which each node contains an integer value. // //Find the number of paths that sum to a given value. // //The path does not need to start or end at the root or a leaf, but it must go downwards (traveling only from parent nodes to child nodes). // //The tree has no more than 1,000 nodes a...
ALGO
0.999966
5.920701
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2020-07-16T01:13: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": "2df7c11b3...
a9c513c9-dc56-4035-8334-c12ab6ecc5e1
kushinada2077/AtCoder
ABC385/C.cpp
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> #define PATH "/Users/leedongha/Downloads/PS/input.txt" #define L_PATH "input.txt" #define fastio cin.tie(0)->sync_with_stdio(0); #define rep(n) for (int i = 0; i < n; ++i) #define si(x) int(x.size(...
ALGO
0.999706
3.826484
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-08-18T11: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": "95dcd410cd3e...
f3bf18c3-bd06-48aa-b3f4-0a3742e9a8b0
Mzohaibm/Cpp-Zero-to-Standard
smallProjects/RockPaper.cpp
#include <iostream> #include <cstdlib> #include <ctime> enum Choice { ROCK, PAPER, SCISSORS }; Choice getUserChoice() { std::cout << "Enter your choice (0 for Rock, 1 for Paper, 2 for Scissors): "; int choice; std::cin >> choice; return static_cast<Choice>(choice); } Choice getComputerChoice() { ...
TOOL
0.988839
5.760878
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-12-22T15:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a37f893ecd3d...
458103db-df67-49a4-993b-bb792df7accb
g0729/Algorithm
백준/Gold/20055. 컨베이어 벨트 위의 로봇/컨베이어 벨트 위의 로봇.cc
#include <bits/stdc++.h> using namespace std; #define ll long long #define MOD 1000000007 #define MAX 100000 #define INF 987654321 int dx[] = {1, -1, 0, 0}; int dy[] = {0, 0, 1, -1}; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n, k; cin >> n >> k; vector<int> a(2 * ...
ALGO
0.999995
3.720828
{ "github_metadata": { "branch": "main", "commit_count": 2327, "repo_created_at": "2024-03-27T07:16: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": "d6ccc972a...
508db6a3-2028-4e0a-8e2f-918850294d48
dewanhimanshu/Undergrad-Courses
data-structures/quicksort.cpp
#include<iostream> using namespace std; int partition(int a[],int start,int end) { int pivot = a[start]; int count = 0; for(int i=start+1;i<=end;i++) { if(a[i]<=pivot) { count++; } } count = start+ count; int temp = a[count]; a[count] = pivot; a[st...
ALGO
0.999979
5.234464
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-01-03T12:21: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": "002bc85454d8...
96cea051-b562-4aeb-889c-4a91f2387c8e
DylanKPoole/sumOfTwoValues
sumOfTwoValues.cpp
#include <iostream> using namespace std; //Given an array of integers and a value, determine if there are any two integers in the array whose sum is equal to the given value. int main(){ int arr[] = {1,2,3,4,5,6,7,8,9}; //given array *editedable* int val = 5; //given value *editable* int arrLen = sizeof...
ALGO
0.999904
5.050507
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-04-18T16:57: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": "a9d46c9c03bc...
e88a4420-20a2-4306-9408-53aee59f9c0a
danilo-p/competitive_programming
a2oj/39222/P9.cpp
#include <bits/stdc++.h> #define MAX_LINES_COUNT 100 #define MAX_COLUMNS_COUNT 100 #define MAX_ZEROS 20 #define MAX_NEGATIVES 20 using namespace std; int lines_count, columns_count, max_zeros, max_negatives; int matrix[MAX_LINES_COUNT][MAX_COLUMNS_COUNT]; int memo[MAX_LINES_COUNT][MAX_COLUMNS_COUNT][MAX_ZEROS][MAX_N...
ALGO
0.999935
4.478768
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2019-03-15T02:27: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": "d466f4b83...
1a7fa5c3-890c-4cf1-a8fd-2ec8069b91b0
m-a-r-o-u/columnmodel
include/advect.h
#pragma once #include <cmath> #include <memory> #include <iostream> #include "member_iterator.h" #include "state.h" #include "logger.h" class Advect { public: virtual void advect(State& state, const double& dt) = 0; virtual void setupdraft(State& state, double t){} virtual void keepcloudbase(State& stat...
ALGO
0.998811
5.40815
{ "github_metadata": { "branch": "develop", "commit_count": 38, "repo_created_at": "2021-01-28T10:11: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": "600c8b2a...
2aa3a30f-14ba-4417-843b-5a8629583716
kkufieta/openstreetmap_routeplanner_astar
src/route_planner.cpp
#include "route_planner.h" #include "route_model.h" #include <algorithm> RoutePlanner::RoutePlanner(RouteModel &model, float start_x, float start_y, float end_x, float end_y) : m_Model(model) { // Convert inputs to percentage: start_x *= 0.01; start_y *= 0.01; end_x *= 0.01; en...
ALGO
0.978687
5.693077
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2020-10-11T17:21:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1da501a8c40...
35e423f9-bd69-4fe5-bd74-ba2ef119c026
rin-23/tyro
Source/Math/CurvesSurfacesVolumes/Wm5MultipleCurve3.h
// Geometric Tools, LLC // Copyright (c) 1998-2014 // Distributed under the Boost Software License, Version 1.0. // http://www.boost.org/LICENSE_1_0.txt // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt // // File Version: 5.0.1 (2010/10/01) #ifndef WM5MULTIPLECURVE3_H #define WM5MULTIPLECURVE3_H #includ...
ALGO
0.93685
7.464748
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2017-10-09T21:05:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3aef95c2...
d153d0fb-81d9-4821-b9f6-62a4ee5d6e1e
Kathelas007/IMS
Automata.h
// // Created by dasa on 5. 12. 2020. // #ifndef IMS_C___AUTOMATA_H #define IMS_C___AUTOMATA_H #include <vector> #include <map> #include <iostream> #include <iterator> #define ENUM_LEN 4 using namespace std; using Coord = pair<int, int>; class Automata { public: enum WindDirection{ North, West...
ALGO
0.996984
4.518258
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-08-25T08:20: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": "6252b637b435...
5a830287-5d8c-4faa-8e25-0a3c1f466cf2
FangGet/BundleFusion_Ubuntu_Pangolin
include/FreeImage/include/CGAL/Polynomial/internal/Kernel/Sign_between_roots.h
// Copyright (c) 2005 Stanford University (USA). // All rights reserved. // // This file is part of CGAL (www.cgal.org); 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 ...
ALGO
0.998483
6.508158
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-06-29T03:53:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 132, "forks": 34, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "a522fd8...
44c1b8f2-6216-41b3-b4d7-3824fcb66538
manahil-16/OOP-Assignment-1
source.cpp
#include <iostream> #include <fstream> #include <string> using namespace std; class BankAccount { private: string accountNumber; string accountHolderName; double balance; public: BankAccount(string accNum, string accHolder, double bal) { accountNumber = accNum; accountHolderName = accHolder; ...
TOOL
0.931182
4.718106
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-10-05T08:15: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": "066edef1fcb6...
cdfec531-0575-473b-bc1b-5609f81384b6
AkashSingh3031/The-Complete-FAANG-Preparation
1]. DSA + CP/1]. DSA/4]. Striver Series/30 Days of SDE Sheet/C++/20]. Day-20 (Binary Search Tree)/GeeksforGeeks/7]. Find the inorder predecessor.cpp
// C++ program to find predecessor and successor in a BST #include <iostream> using namespace std; // BST Node struct Node { int key; struct Node *left; struct Node *right; Node(int x){ key = x; left = NULL; right = NULL; } }; int key=0; // This function finds predecessor and successor of key in...
ALGO
0.99998
4.952703
{ "github_metadata": { "branch": "master", "commit_count": 1827, "repo_created_at": "2021-05-29T04:41:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11343, "forks": 2526, "issues": 3, "pull_requests": 2 }, "file_meta": { "content_id": "...
0c244cdd-edda-4988-b8c0-2413e1a0d603
xulzee/LeetCodeProjectCPP
source/spring-recruitment/110. Balanced Binary Tree.cpp
// @Time : 2019/3/18 20:09 // @Author : xulzee // @Email : <EMAIL> // @Software: CLion #include <iostream> #include <vector> #include <sstream> #include <string> #include <algorithm> #include <queue> using namespace std; //Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; ...
ALGO
0.999925
5.58332
{ "github_metadata": { "branch": "master", "commit_count": 257, "repo_created_at": "2019-07-29T13:58: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": "c9d7ad13...
eb406e84-be95-440b-acba-6d3be023c9a0
anuragm/parallel-tempering
include/pt.hpp
/** * \file pt.hpp * \brief Interface for the various classes used in the parallel * tempering algorithm. * * All definitions in this interface belong to the namespace * pt. Different classes provide for different functions. * */ #ifndef PT_HPP #define PT_HPP 1 #include <armadillo> #include <random>...
ALGO
0.902184
6.261576
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2015-09-03T23:18: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": "131b1122d...
b52ee686-18ae-488e-bb5f-cdcf31251a84
mns0301/Algorithm
백준/Silver/1158. 요세푸스 문제/요세푸스 문제.cc
#include <algorithm> #include <array> #include <cmath> #include <deque> #include <iostream> #include <map> #include <queue> #include <stack> #include <vector> using namespace std; #define INT_MAX 2147483647 #define INT_MIN -2147483648 #define fastio \ ios_base::sync_with_stdio(0); \ cin.tie(...
ALGO
0.99999
3.973367
{ "github_metadata": { "branch": "main", "commit_count": 495, "repo_created_at": "2024-08-02T03:49: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": "f35405e287...
81f6da24-39a4-470d-ab7c-a27e983b8d0b
ishandutta2007/codeforces-a
anta/normal/500/D.cpp
#define _CRT_SECURE_NO_WARNINGS #include <string> #include <vector> #include <algorithm> #include <numeric> #include <set> #include <map> #include <queue> #include <iostream> #include <sstream> #include <cstdio> #include <cmath> #include <ctime> #include <cstring> #include <cctype> #include <cassert> #include <limits> ...
ALGO
0.999612
3.75388
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c378f90dcfb...
ef28f954-88b4-4fe9-9a10-aaba6e46d16a
sky8c9/Prac
AtCoder/ABC/348/D.cpp
#include <iostream> #include <string> #include <vector> #include <queue> #include <algorithm> using namespace std; const int MAX = 1e9; void task() { int h, w; cin >> h >> w; vector<string> grid(h); vector<int> didj{1,0,-1,0,1}; for(int i = 0; i < h; i++) cin >> grid[i]; int sX, sY, tX, tY; ...
ALGO
0.99999
5.891243
{ "github_metadata": { "branch": "master", "commit_count": 181, "repo_created_at": "2021-11-02T06:57: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": "f9fef761...
6204db3b-67de-434e-8f4c-97dbfeaa10e0
ishandutta2007/codeforces-s
shnirelman/normal/1684/E.cpp
#include <bits/stdc++.h> #define f first #define s second //#define int li using namespace std; using li = long long; using ld = long double; using pii = pair<int, int>; const int INF = 1e9 + 13; const li INF64 = 1e18 + 13; const int M = 1e9 + 7; //const int M = 998244353; const int N = 100 + 13; const int LOGN = 30...
ALGO
0.999887
4.677658
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ff6d6cf2a41...
280b1fc6-c4d4-460e-ae15-a73ce78bd3ec
yuyashiraki/CTCI
HR/top_k_frequent_elements.cpp
class Solution { public: // Hash Table + Bucket Sort // Time O(n) Space O(n) vector<int> topKFrequent(vector<int>& nums, int k) { int n = nums.size(); vector<vector<int>> freq(n + 1, vector<int>()); unordered_map<int, int> MP; for (int i = 0; i < n; i++) MP[nums[i]]++; ...
ALGO
0.999998
6.999882
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2018-02-23T02:32:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e9aaa4941...
da877aef-36d1-4f74-b179-e496da7874dd
sauloq/CompContextBased
main.cpp
#include <iostream> #include <unordered_map> #include <string> using namespace std; class nodeTrie{ public: unordered_map<char,nodeTrie*> children; int weight; nodeTrie(){ this->weight = 0; } void print(int level); }; void nodeTrie::print(int level)...
ALGO
0.999832
3.647327
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-01-22T22: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": "daf7648b31...
3c56b74d-e434-4de2-b699-464fa5b49fbe
Fudan-EGA/LEDSpectrum
examples/arduinoFFT/FFT_02/FFT_02.ino
/* Example of use of the FFT libray to compute FFT for several signals over a range of frequencies. The exponent is calculated once before the excecution since it is a constant. This saves resources during the excecution of the sketch and reduces the compiled size. The sketch shows the time th...
ALGO
0.998897
5.812636
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-07-11T14:35:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c86cbe4030...
14fa91c5-132f-4608-9d98-7614f3018011
ia-toki/ksn-2020
ksn-2020-mengambil-batu/solutions/solution-wa.cpp
#include <cstdio> int n, r; int piles[2]; void play() { while (true) { if (piles[0] > 0 && piles[0] <= r) { printf("1 %d\n", piles[0]); piles[0] = 0; } else if (piles[1] > 0 && piles[1] <= r) { printf("2 %d\n", piles[1]); piles[1] = 0; } else if (piles[0] > 0) { printf("1 1...
ALGO
0.999917
3.144948
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-01-11T09:51:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b2066bd8b8...
78ded128-579a-4110-8291-774eca985cc2
Sharia-Zaman79/XPSC05
DAY6/w8day6/keep_beautiful.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int t; cin >> t; while (t--) { int query_count; cin >> query_count; vector<int> sequence; string result = ""; bool increasing_phase = true; w...
ALGO
0.999981
4.483193
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2024-10-27T18:07: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": "b52bc6af057...
a6e1ae18-2ebd-4f31-baa7-9c4ab1517515
LucassLin/Mini-B-tree-database
externalSort.cpp
#include "externalSort.h" #include <algorithm> #include <sstream> #include <map> using namespace std; typedef std::pair <string, string> stringPair; bool next(Seq* seq) { if (seq->source.good()) { seq->source >> seq->value.first >> seq->value.second; return true; } return false; } s...
ALGO
0.968414
3.595837
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-04-15T03:56: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": "620d18d6c6...
505f9915-8f68-460d-8c16-94ad41930ef4
heavenMOJANG/ICPC
programmes_C_Cpp/Codeforces/CF1872/E.cpp
#pragma GCC optimize(1) #pragma GCC optimize(2) #pragma GCC optimize(3,"Ofast","inline") #include<bits/stdc++.h> typedef long long ll; using namespace std; constexpr ll inf=0x7fffffff; struct Node{ll s0,s1,tag;}t[400010]; ll n,a[100010],q; string s; void pushUp(ll p){ t[p].s0=t[p<<1].s0^t[p<<1|1].s0; t[p].s1=t[...
ALGO
0.999739
5.461893
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2025-01-19T07:27:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0316d571a99...
fbb5bbc8-8dcd-4485-b45b-71f3bc7f1907
SGpp/SGpp
optimization/src/sgpp/optimization/gridgen/IterativeGridGeneratorSOO.hpp
// Copyright (C) 2008-today The SG++ project // This file is part of the SG++ project. For conditions of distribution and // use, please see the copyright notice provided with SG++ or at // sgpp.sparsegrids.org #ifndef SGPP_OPTIMIZATION_GRIDGEN_ITERATIVEGRIDGENERATORSOO_HPP #define SGPP_OPTIMIZATION_GRIDGEN_ITERATIVEG...
ALGO
0.991084
6.364183
{ "github_metadata": { "branch": "master", "commit_count": 9382, "repo_created_at": "2018-03-05T12:33:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 76, "forks": 38, "issues": 36, "pull_requests": 5 }, "file_meta": { "content_id": "19360...
fe9e54ff-d75a-4f37-b49d-0cf602b4162f
aditya5289/PGDAC_Assignments
1.C++ Assignments/2.Tushar Sir Assignments/program35.cpp
#include <iostream> int main() { int n; // Input the number of subjects std::cout << "Enter the number of subjects: "; std::cin >> n; // Dynamically allocate memory for the marks array int* marks = new int[n]; // Input marks for each subject for (int i = 0; i < n; ++i) { std:...
ALGO
0.995749
5.28911
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-12-20T13:03: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": "d13cf00baa61...
b8cffe4b-4e4d-4440-a374-65ace29a9571
PhyCoe/ACM-Training
Mobius01.cpp
/************************************************************************* File Name: Mobius01.cpp ID: PhyCode PROG: LANG: C++ Mail: <EMAIL> Created Time: 2016年08月25日 星期四 15时42分53秒 ************************************************************************/ #include<cstdio> #include<cstri...
ALGO
0.999921
3.930606
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2016-08-22T12:52: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": "c2589f3f2...
b03f80e2-0613-41aa-a986-854e69b26ac6
Nanako7-ix/Daily
2104D.cpp
/** * Author: Nanako7_ix * Created: 2025/04/28 23:06:09 * 好想和 めぐる 一起打 xcpc 啊 */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define setpre(x) fixed << setprecision(x) #define debug(x) cerr << #x << " = " << x << "\n" #define endl "\n" using namespace std; ...
ALGO
0.999587
5.060959
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2025-04-01T07:11: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": "7956ab045b7...
805eda54-236a-47dc-8b59-1dc206a7cdfa
MijaTola/Codeforce
989C.cpp
#include <bits/stdc++.h> using namespace std; int v[4]; int b[4]; int d[4]; int c[55][55]; bool vis[55][55]; int dx[] = {1,-1,0,0}; int dy[] = {0,0,1,-1}; bool ver() { for (int i = 0; i < 4; ++i) { if(b[i] > v[i]) return 0; } return 1; } bool valid() { for (int i = 0; i < 4; ++i) if(d[...
ALGO
0.999772
3.322753
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-10-31T01:44: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": "fca29496ca...
73732f22-f8b8-49d5-8022-e22a90508c5d
Sailesh-2209/competitive-programming
atcoder/Educational DP Contest/h.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int mod = 1e9 + 7; void test_case() { int m, n; cin >> m >> n; vector<vector<char>> grid(m, vector<char> ()); for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { char c; cin >> c; grid[i...
ALGO
0.999915
5.155313
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-01-25T10: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": "1c87553096...
6d04efc8-faf1-4957-b230-e4565a874bee
vineet-k-motwani/OACP
07 Largest Number/LargestNumber.cpp
/* Problem Name: Largest Number Author: <NAME> */ #include <bits/stdc++.h> using namespace std; #define int long long #define MOD 1000000007 #define vll vector<int> void obtainInputs(string& s, vll& inputs) { int n = s.length(); int num; for(int i=0; i<n; i++) { num = 0; while(i<n and s[i...
ALGO
0.999595
5.326654
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2024-03-12T11:41:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "02dfee69031...
58bcf9c4-ef60-4880-95f3-72b2af98bb8c
ZetkoOfficial/MathLibCpp
matrixvector.hpp
#ifndef MATRIX_VECTOR_LIB #define MATRIX_VECTOR_LIB #include <iostream> #include <iomanip> #include <cmath> #include <functional> #include <string> #include <array> #include <vector> namespace matrixvector { template<int dimensions> struct vector_f { std::array<double, dimensions> data; vector_f() { dat...
ALGO
0.923261
6.370679
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2020-02-15T17:35: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": "f38363284...
f7a7abe8-81dd-4375-8f0a-94e255edd673
khanhtc1202/cp
leetcode/prepare/24.cpp
/* https://leetcode.com/problems/swap-nodes-in-pairs/ */ #include <bits/stdc++.h> using namespace std; 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 Soluti...
ALGO
0.999998
6.328757
{ "github_metadata": { "branch": "master", "commit_count": 1266, "repo_created_at": "2018-04-28T06:43:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "02dca3d...
5d26ba2d-050e-49cc-a5ef-cffdfcb9a4dc
vanessadcamara/Programacao-competitiva
uva/uva462.cpp
#include<bits/stdc++.h> using namespace std; int main(){ string str; while (getline(cin, str)){ vector<vector<char>> v(4); int ans = 0; // cout << str << endl; for(int i = 0; i < str.size()-1; i++){ if(str[i] == ' ') continue; if(str[i] == 'A') ans+= 4; ...
ALGO
0.999613
4.133255
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2020-09-25T16:20: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": "182ca0fdc...
7d1c50a8-4f48-4f8a-b158-1f73aa6db6b5
nachiketkanore/Codeforces-Solved-Problems
975_C.cpp
#include <bits/stdc++.h> using namespace std; #define sz(x) (int)(x.size()) #define FOR(x,y,z) for(int x = y; x <= z; x++) #define int long long const int N = 2e5 + 2, inf = 1e18; int n, q, a[N], k, ans, curr; int32_t main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #ifndef ONLINE_...
ALGO
0.999872
3.949175
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-06-03T14:49:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c842e467d7...
ed135ed7-4d0b-4583-a6cd-dc97629337a8
RawsTourix/cpp_stl_container_templates_operator_overriding
main.cpp
#include <iostream> #include <vector> #include <list> #include <deque> #include <map> #include <set> using namespace std; // Переопределение операторов + и += для всех типов контейнеров с простым типом данных template <template <typename...> class Container, typename T> Container<T> operator+(const Container<T>& a, c...
TOOL
0.986797
5.624327
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-19T16:53: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": "eee6b69fbcec...
b70346bc-898c-4d8b-819c-4e354c5eb314
jjoeldaniel/si
121/recursion/recursion_solved.cpp
#include <iostream> #include <vector> std::vector<int> vec{5, 6, 7, 8}; void iterate(int index) { // Ensure we don't go past the final valid index if (index >= vec.size()) return; // Print value at current index std::cout << "iterate(" << index << ") " << vec.at(index) << std::endl; // Recursively ca...
ALGO
0.997629
6.489074
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2024-02-08T23:56: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": "c3d9a8ea6d3...
ca84f81d-10e5-49e1-9cdc-4a41e7b52a48
shreyamalogi/DSA-BOOK
strings/063_word break.cpp
//author :shreyamalogi // dp prob //Given a string A and a dictionary of n words B, find out if A can be segmented into a space-separated sequence of dictionary words. // we are given a string......we need to break the strings anmd check whether the broken strings are found in the library //trying with recurssion...
ALGO
0.999508
4.29031
{ "github_metadata": { "branch": "main", "commit_count": 202, "repo_created_at": "2021-04-27T18:03:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f77b17c6f...
da6d1c4e-bf7d-4b50-99a2-bbd830908309
azabrod1/tarjan
utility.cpp
// // Utility.cpp // Tarjan // // Created by <NAME> on 4/27/17. // Copyright © 2017 <NAME>. All rights reserved. // #include "utility.hpp" #include <math.h> #include <stdlib.h> std::random_device rd; std::mt19937 Utility::engine(rd()); //Select random number generator engine std::uniform_real_distribution<doubl...
ALGO
0.998526
6.147794
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2020-12-13T20:47:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c62ceadbe206...
2a282b82-66dd-40cf-a289-aad2fe0e3fb6
Dusk145/PTIT---DSA
DSA04017 - PHAN TU KHAC NHAU.cpp
#include <bits/stdc++.h> #define ll long long #define endl "\n" using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t; cin >> t; while (t--){ int n; cin >> n; vector <int> a(n), b(n - 1); for (int i = 0; i < n; ++i){ ...
ALGO
0.999962
3.949995
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-12-07T09:42: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": "b6748f3665e...
338819a3-769a-4199-807d-3d94d355e3e8
Luvkush8941/DSA-Using-Cplusplus
Calculating-Time-Complexity/Part_1_Time_complexity.cpp
/* iteration : Writing a single statement in a code known to be as 1 iteration. */ #include<iostream> using namespace std; int main(){ int x; // single iteration int sum = 0; // 2nd iteration sum = x + x; // 3rd iteration // Number of iterations = 3 // All these single units combined iteration a...
ALGO
0.997083
3.654929
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2022-07-18T11:41:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80589f345cc...
f7378126-eaa8-4bf5-9e10-7ec15c7b9d4d
GraphChi/graphchi-cpp
example_apps/pagerank_functional.cpp
/** * @file * @author <NAME> <<EMAIL>> * @version 1.0 * * @section LICENSE * * Copyright [2012] [<NAME>, <NAME>, <NAME> / Carnegie Mellon University] * * 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 cop...
ALGO
0.999808
6.200121
{ "github_metadata": { "branch": "master", "commit_count": 960, "repo_created_at": "2013-07-24T13:36:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 808, "forks": 311, "issues": 25, "pull_requests": 8 }, "file_meta": { "content_id": "6f19...
dc54bdd6-3a1a-47a3-b5f2-04a93c7dd9c7
k8440009/Algorithm
BOJ/2529_bf.cpp
// 부등호 // https://www.acmicpc.net/problem/2529 #include <bits/stdc++.h> using namespace std; bool check(vector<int> &perm, vector<char> &ch) { for (int i = 0; i < ch.size(); i++) { if (ch[i] == '<' && perm[i] > perm[i + 1]) return false; if (ch[i] == '>' && perm[i] < perm[i + 1]) ...
ALGO
0.999998
4.042634
{ "github_metadata": { "branch": "master", "commit_count": 762, "repo_created_at": "2019-08-04T15:03:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 12, "pull_requests": 0 }, "file_meta": { "content_id": "5687be0...
57fad59e-db6e-43a9-af40-c308fb1e40cc
SAMIUL-35/codeforces_contest
D_Unnatural_Language_Processing.cpp
#include <iostream> #include <vector> using namespace std; int main() { int t; cin >> t; while (t--) { int n; cin >> n; string word; cin >> word; vector<string> syllables; int i = 0; while (i < n) { string syllable; // Ch...
ALGO
0.999821
5.905446
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-18T14:26: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": "5f5dfe0997ce...
f6d3b87a-e63c-443e-b72e-9ec5196f13f6
htbkoo/cplusplus
src/onlinePlatform/leetcode/leetcoding_challenge/2024/jun2024/week4/binary_search_tree_to_greater_sum_tree.cpp
#include <algorithm> #include <vector> #include <queue> #include <set> #include <limits> #include <map> #include <unordered_set> #include <unordered_map> #include <iterator> #include <sstream> #include <iostream> // includes cin to read from stdin and cout to write to stdout using namespace std; // since cin and cout a...
ALGO
0.999966
5.517103
{ "github_metadata": { "branch": "master", "commit_count": 686, "repo_created_at": "2022-08-18T20:40:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c4e1f766...
b1ce4ba2-2d9b-4bdf-ae14-7a7caec29460
vsramadanov/crypto-fiesta
utils/prefix_tree.h
#include <algorithm> #include <array> #include <iostream> #include <iterator> #include <memory> #include <ranges> #include <stack> #include <string> #include <vector> namespace utils { class prefix_tree { constexpr static int R = 'z' - 'a' + 1; struct Node { bool is_end; std::array<Node *, R> ...
ALGO
0.996789
5.461769
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-06-13T14:32: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": "f4a4954d54...
a3df21cc-f095-4d7a-ade0-b6055ff19e02
dlvguo/NoobOJCollection
FZUPostgraduateExamQuestions/SuanFaJieGouShiTi/No.2LinkList/P35-32.cpp
#include <iostream> #include "../../Headers/linkList.h" using namespace std; void Divide(LinkList &A, LinkList &B, LinkList &C) { //pb代表b链表中最末尾那个 c代表c链中最末尾那个初始为NULL LinkList pa = A->next, pb = NULL, pc = NULL; while (pa) { //插入A中 if (pa > 0) { if (pb = NULL) ...
ALGO
0.999937
3.681027
{ "github_metadata": { "branch": "master", "commit_count": 860, "repo_created_at": "2019-04-17T10:27:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d84faa2...
bd7a9833-2e36-4d4f-b36c-6a50b0e883ee
parthenon-hpc-lab/parthenon
src/mesh/forest/logical_coordinate_transformation.cpp
//======================================================================================== // (C) (or copyright) 2024. Triad National Security, LLC. All rights reserved. // // This program was produced under U.S. Government contract 89233218CNA000001 for Los // Alamos National Laboratory (LANL), which is operated by Tr...
TOOL
0.969686
6.818085
{ "github_metadata": { "branch": "develop", "commit_count": 6713, "repo_created_at": "2020-01-29T20:29:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 141, "forks": 37, "issues": 231, "pull_requests": 32 }, "file_meta": { "content_id": "e...
d9a83beb-87ba-474e-9287-430ba4bb345a
as-gupta/my-code-library
sourceCodez/C++/Kingdom Of Monkeys/Solution.cpp
#include<bits/stdc++.h> using namespace std; vector<int> edges[100001]; vector<vector<int>> components; vector<int> component; void dfs(int start, bool* visited) { visited[start] = true; component.push_back(start); for(int i=0;i<edges[start].size();i++) { int adj=edges[start][i]; if(!v...
ALGO
0.999986
4.486228
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2020-11-02T12:49: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": "a24038080...
0a18ca45-2ad7-49ea-81bf-c0ad929aace5
Destiny-King/Algorithm_Exercice
List/DetectCycle/DetectCycle.cpp
// // Created by Destiny on 2022/8/18. // #include "DetectCycle.h" //初始化链表 void DetectCycle::initList(ListNode *head) { vector<int> nums = {1, 4, 2, 4, 3, 4, 4, 4, 5, 4}; //待创建链表的数值内容 ListNode *cur = head; for (int i = 1; i < nums.size(); ++i) { //通过循环把数组里的值依次放到链表 ListNode *newNode = new ListNode(nums[i]);...
ALGO
0.999824
4.124048
{ "github_metadata": { "branch": "master", "commit_count": 159, "repo_created_at": "2022-07-04T05:46: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": "a3a0925a...
6a41d70a-7a5f-4882-9cb1-4fb0b8131498
tiqwab/atcoder
abc090/b/main.cpp
#include <algorithm> #include <cassert> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> #include <limits.h> using namespace std; typedef long long ll; template<class T> inline bool chmax(T &a, T b) { if(a < b) { a = b; return true; } return false; } ...
ALGO
0.999939
4.679041
{ "github_metadata": { "branch": "master", "commit_count": 236, "repo_created_at": "2019-10-21T04:57: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": "6efd9582...
c0ac36ab-e385-4e46-868a-786ca0a32f64
amoe/acceleratedcpp
src/ex8_3.cc
#include <iostream> #include <vector> #include <algorithm> #include "util.hh" using std::cout; using std::endl; using std::vector; using std::sort; using iter_t = vector<double>::iterator; // MUTATES ITS ARGUMENT; iterators are required to be random-access iterators. double median_f(iter_t b, iter_t e) { typedef...
ALGO
0.997813
6.126465
{ "github_metadata": { "branch": "master", "commit_count": 543, "repo_created_at": "2020-07-16T18:25: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": "2782d5b8...
7061ed4e-9090-446a-b1fd-0b3cccce26c1
David-5-5/tutorial
cplus/leetcode/202504/algo1883.cpp
#include <bits/stdc++.h> using namespace std; // 动态规划 - 多维 DP class Solution { public: int minSkips(vector<int>& dist, int speed, int hoursBefore) { // 参考题解 !!!代码很短,思维很难!!! int sum = accumulate(dist.begin(), dist.end(), 0); if ((sum+speed-1)/speed > hoursBefore) return -1; ...
ALGO
0.999965
4.732782
{ "github_metadata": { "branch": "main", "commit_count": 2940, "repo_created_at": "2022-11-22T17:09:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa2f75880...
2f4ef7b5-09d7-43a0-94a9-aa5b9a9082f5
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/09/0925/personal_submission/cf761e_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); int n; cin >> n; vector<vector<int...
ALGO
0.999962
4.449681
{ "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": "6116...
4e7764a3-0026-4006-b550-56f9a779cf53
dolphin-emu/dolphin
Source/Core/Core/IOS/IOSC.h
// Copyright 2017 Dolphin Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later // Implementation of an IOSC-like API, but much simpler since we only support actual keys. #pragma once #include <array> #include <cstddef> #include <utility> #include <vector> #include "Common/CommonTypes.h" #include "Common/Cr...
TOOL
0.900859
7.420745
{ "github_metadata": { "branch": "master", "commit_count": 44003, "repo_created_at": "2013-07-22T09:07:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13918, "forks": 2828, "issues": 0, "pull_requests": 338 }, "file_meta": { "content_id":...
ac93a367-c8cf-48a9-86c3-0bfb27d3d3b8
X3n0nP0w3r3d/InputOutput
problemsets/live_contests/DIV3_2037/touristsolns/B_touristsoln.cpp
/** * author: tourist * created: 17.11.2024 06:36:17 **/ #include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "algo/debug.h" #else #define debug(...) 42 #endif int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int tt; cin >> tt; while (tt--) { int n; cin >> n; ...
ALGO
0.999954
3.836616
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-10-18T06:34: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": "c29948d9fd2...
4b0f1149-dd2b-4acb-ad19-b98a7bd3a1cf
arangodb/arangodb
arangod/Graph/Cursors/RefactoredSingleServerEdgeCursor.cpp
//////////////////////////////////////////////////////////////////////////////// /// DISCLAIMER /// /// Copyright 2014-2024 ArangoDB GmbH, Cologne, Germany /// Copyright 2004-2014 triAGENS GmbH, Cologne, Germany /// /// Licensed under the Business Source License 1.1 (the "License"); /// you may not use this file except...
TOOL
0.933062
6.544784
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
6c125147-fe55-446d-9594-25f2ce9098c9
CypherVault/ESE224LabDocuments
Hw5Part3/Hw5Part3/main.cpp
#include <iostream> using namespace std; struct Node { int data; int rdepth; int ldepth; struct Node* left; struct Node* right; }; bool perfectBSTcheck(int depth) { depth = depth + 1; while (depth % 2 == 0) { depth = depth / 2; } if (depth == 1) { return true; } else { return false; } } struct Node* create_N...
ALGO
0.999929
4.526808
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-09-16T04:51:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d2c5bcd913...
374f52dc-5363-4364-b5b9-68d8a3734c69
Keltasan/AlgorithmsAndDataStructures
Lab1/main.cpp
#include <iostream> #include <string> #include "Stack.h" #include "functions.h" void SortStationAlgorithm(std::string input, std::string &output, int &error) { int i = 0; Stack op; while (i < input.size() && !error) { if (input[i] >= '0' && input[i] <= '9') { output += input[i]; } else if (input[i] ==...
ALGO
0.999797
4.191798
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-10-03T21:22: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": "f39159a3a684...
606c7732-9b63-4d43-8557-1f81bea66333
pj0y1/code-snippet
cpp/Algorithm/Search/DFS/hz_535.cpp
#include <iostream> // 判断'.'的连通性 找到最大连通区域 using namespace std; int w, h, sx, sy; char g[100][100]; int vis[100][100], ans; int dir[4][2] = {{1,0}, {-1, 0}, {0, 1}, {0, -1}}; void dfs(int x, int y){ vis[x][y] = 1; for(int i = 0; i < 4; i++){ int tx = x + dir[i][0]; int ty = y + dir[i][1]; if(tx < 1 || tx...
ALGO
0.999618
3.696372
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-01-23T13:06: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": "3ba60a3a83e...
51b02d38-aa6d-4003-b075-32b0644694a0
KamilMarkuszewski/Studia
c++/Rok 3/grafika komputerowa/GK PROJEKT/PEAtest/PEAtest.cpp
// RAY TRACING // <NAME> 171016 #include "stdafx.h" #include <math.h> #include <stdlib.h> #include <string> #include <GL/glut.h> #include <GL/gl.h> #include <fstream> #include <iostream> #include <stdio.h> /*************************************************************************************/ using namespace std; t...
ALGO
0.989188
3.014977
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-01-06T20:24: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": "1ba56ed0d2...
d19cc792-d629-4953-a461-cb6f325c4f9d
Manan-Joshi750/Code_Through_DSA_CPP
Arrays/2D_MatrixSearch.cpp
#include <iostream> #include <vector> using namespace std; bool searchMatrix(vector<vector<int>>& matrix, int target) { if (matrix.empty() || matrix[0].empty()) { return false; } int m = matrix.size(); int n = matrix[0].size(); int left = 0, right = m * n - 1; while (left <= right) { ...
ALGO
0.999968
6.398249
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2024-12-31T13:52:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "094c816e665...
2431ecd9-e911-4c50-9c85-fd0b2846e2be
johny65/ic-2012
tp4/ejercicio1/grad.cpp
#include <iostream> #include <unistd.h> #include "func.h" #include "argparser.h" int main(int argc, char **argv){ srand(time(NULL) + getpid()); ArgParserNew(parser); parser.opcion("maxiter", 'i', "Cantidad máxima de iteraciones", "100"); parser.opcion("func", 'f', "Función a probar", "1"); parser.opcion("e...
ALGO
0.947666
4.689712
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2019-09-22T19:57: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": "56d7d4ee4...
9f3b760d-627b-4e53-b38c-e94116895ca4
LIRuixuan0407/Biomedical-OOP-in-CPP
Eddy-current/eddy_example.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <fstream> #include <cmath> #include <stdexcept> #include <iomanip> #include <sstream> #include "debug.h" #include "terminal_graphics.h" // 函数声明:计算预测梯度波形 std::vector<double> compute_predicted(const std::vector<double>& input, ...
ALGO
0.992298
5.350166
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-04-07T15:51: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": "f739575faea4...
f24935ae-1714-4651-aab2-34016ea69812
Ylandolsi/Codeforces
C. Given Length and Sum of Digits....cpp
#include <bits/stdc++.h> using namespace std ; #define pb push_back #define SPEED cout.tie(0), cin.tie(0), ios_base::sync_with_stdio(0) #define int long long #define endl "\n" class Solution { public: void solve(){ int n , m ; cin >> n >> m ; int mcopy = m ; string larg ="" , small=""; for ( int i =...
ALGO
0.999916
3.832153
{ "github_metadata": { "branch": "main", "commit_count": 120, "repo_created_at": "2024-01-27T18:40: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": "9ef40204f3...
38bfd104-9e07-4d89-90cc-ad5bfe219509
lukasz-pawlos/liczbyZespolone
src/WyrazenieZesp.cpp
#include "WyrazenieZesp.hh" #include <cmath> using namespace std; /* * Tu nalezy zdefiniowac funkcje, ktorych zapowiedzi znajduja sie * w pliku naglowkowym. */ LZespolona Oblicz (WyrazenieZesp WyrZ) { LZespolona B; switch (WyrZ.Op) { case Op_Dodaj: B = operator + (WyrZ.Arg1, WyrZ.Arg2); br...
ALGO
0.990697
3.856315
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-03-16T10:29: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": "89df91f32a...
7b1941a3-05c4-4726-907f-eb26e67e2784
Tech-Intellegent/CodeForces-Solution
CodeForces-Solution/1530G.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using db = long double; // or double, if TL is tight using str = string; // yay python! using pi = pair<int,int>; using pl = pair<ll,ll>; using pd = pair<db,db>; using vi = vector<int>; using vb = vector<bool>; using vl = vector<ll>; using vd = vec...
ALGO
0.999819
3.976678
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-01-23T07:10:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b16efd9f0813...
e45d3e19-004f-49d4-9894-dec8334a1143
Mritunjoy71/CSE_208-Algorithm-Sessional
offline/1505071_fordfulkersonOFF5.cpp
#include<bits/stdc++.h> using namespace std; #define NULL_VALUE -999999 #define INFINITY 999999 #define WHITE 1 #define GRAY 2 #define BLACK 3 #define MAX_HEAP_SIZE 100000 #define MAXREAL 999999.0 #define MAX_TREE_HT 100 int n,**G; class Queue { int queueInitSize ; int queueMaxSize; int * data; int le...
ALGO
0.999956
4.207378
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-01-22T08:20: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": "2a86ef8bb2...
c5dd654f-bf9d-499c-815d-2bb2ab7b840b
Jibrangit/GettingAroundSTL
src/challenges/createWeightedGraph.h
#pragma once #include <iostream> #include <unordered_set> #include <set> #include <map> #include <vector> #include <algorithm> #include <stack> #include <unordered_map> #include <queue> #include <forward_list> class Vertex { public: friend std::ostream &operator<<(std::ostream &os, const Vertex &v); friend bo...
ALGO
0.99763
3.865922
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2021-08-09T00:08: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": "9a861997609...
8f11698b-4d50-4b22-86d8-3680a44f7345
iluvgirlswithglasses/cpp
contest/freecontest/free-contest/fc125/beat.cpp
/* author: iluvgirlswithglasses github: https://github.com/iluvgirlswithglasses created: Tue Nov 30 14:05:22 2021 tab-width: 4 spaces /\_/\ ( o.o ) > ^ < I sexually identify myself as an Attack Helicopter BTW I use Arch */ #include <iostream> #include <cmath> #include <stack> using namespace std; /* abc < x...
ALGO
0.999961
3.540808
{ "github_metadata": { "branch": "main", "commit_count": 646, "repo_created_at": "2021-09-17T15:27: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": "8d946871ea...
e22557b0-47f9-4afc-93e4-cd3d5a1a7466
PlanarG/Code
Practise/5.22/B.cpp
#include <bits/stdc++.h> using namespace std; const int N = 200010; int st[18][N], lg[N], num[N], R[18][N], L[18][N], go[18][N]; int Max(int a, int b) { return num[a] > num[b] ? a : b; } int get(int l, int r) { if (l > r) return 0; int len = lg[r - l + 1]; return Max(st[len][l], st[len][r - (1 << le...
ALGO
0.999964
4.020921
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2020-04-07T07:52:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "583cc7d03...
e3e2fd3d-2283-4dc2-9021-e58fc591304f
Akatsyk/premium-enrage
CSGO Solution/Config.cpp
#include "Config.hpp" #include "Settings.hpp" #include "SDK/Utils/JSON.hpp" #include <functional> #include <unordered_map> #define CREATE_SERIALIZER( t, fun ) { _S( #t ), [ ]( std::any const& a ) -> std::string { return fun( std::any_cast< t const& >( a ) ); } } #define CREATE_DESERIALIZER( t, fun ) { _S( #t ), fun }...
CONFIG
0.945482
5.010031
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-09-18T20:15:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9193ad5b64...
d16de717-3e73-4918-9198-97a2a17ab017
Chrinkus/advent-of-code
2017/cpp/day02.cpp
/* * Advent of Code 2017 * * Day 2 - Corruption Checksum * * Part 1: Find the checksum of the spreadsheet data set. For each row find the * difference between the largest and smallest values. The sum of the * differences of each row is the checksum. * * Part 2: Find the sum of the results of the only even di...
ALGO
0.99889
6.049758
{ "github_metadata": { "branch": "main", "commit_count": 259, "repo_created_at": "2020-12-15T19:27:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "13987bc82a...
927e0e5e-ee2d-4374-965a-a697fb02833b
mpc-msri/EzPC
GPU-MPC/ext/sytorch/ext/sci/src/Millionaire/millionaire_with_equality.h
/* Authors: <NAME> Copyright: Copyright (c) 2020 Microsoft Research Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify...
ALGO
0.998877
3.144397
{ "github_metadata": { "branch": "master", "commit_count": 410, "repo_created_at": "2019-02-16T11:23:32.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 429, "forks": 129, "issues": 52, "pull_requests": 8 }, "file_meta": { "content_id": "d125...
bf7387a0-d0ae-423b-96d7-983e690b0050
EunTilofy/ACM-code
2022-summer/group/0818/K.cpp
#include<bits/stdc++.h> #define ll long long //#define int long long #define db double #define ld long double #define dbg1(x) cerr<<#x<<"="<<(x)<<" " #define dbg2(x) cerr<<#x<<"="<<(x)<<"\n" #define dbg3(x) cerr<<#x<<"\n" using namespace std; #define reg register #define debug(...) fprintf(stderr,__VA_ARGS__) #define D...
ALGO
0.999657
3.746107
{ "github_metadata": { "branch": "main", "commit_count": 112, "repo_created_at": "2022-09-12T07:31:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f72e7416a...
dcee9062-e1b4-4e7e-ab25-4df8601fdad6
KaHIP/KaHIP
parallel/parallel_src/lib/tools/helpers.h
/****************************************************************************** * helpers.h * * * Source of KaHIP -- Karlsruhe High Quality Partitioning. * <NAME> <<EMAIL>> *****************************************************************************/ #ifndef HELPERS_ZUTE7MAJ #define HELPERS_ZUTE7MAJ #include <...
TOOL
0.959714
5.251928
{ "github_metadata": { "branch": "master", "commit_count": 648, "repo_created_at": "2013-10-16T15:25:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 442, "forks": 101, "issues": 13, "pull_requests": 8 }, "file_meta": { "content_id": "a6e7...
c96d5f5a-d683-4b9e-88ed-a2aa6991c900
jefersonf/cp-archive
AtCoder/abc373/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i,a,b) for(ll i=a; i<=(b); i++) #define all(v) (v).begin(),(v).end() #define len(v) (ll)((v).size()) #define el "\n" vector<ll> a; bool cmp(int i, int j) { return a[i] < a[j]; } int main() { ios::sync_with_stdio(false); cin.tie(nul...
ALGO
0.999993
3.210331
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2016-03-27T00:25: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": "c31537190...
9061388b-d669-4567-a7b0-ff0820003894
zaforf/competitiveprogramming
codeforces/2112D.cpp
#include <bits/stdc++.h> using namespace std; void solve() { int n; cin>>n; vector<vector<int>> adj(n); vector<int> deg(n); for (int i=0;i<n-1;i++) { int a, b; cin>>a>>b; a--; b--; adj[a].push_back(b); adj[b].push_back(a); deg[a]++; deg[b]++; } bo...
ALGO
0.999969
5.450494
{ "github_metadata": { "branch": "master", "commit_count": 122, "repo_created_at": "2021-12-23T22:57: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": "41c09e9f...
36cf7720-1f23-4cf3-839d-590e656ab211
CubbyFlow/CubbyFlow
Includes/Core/CUDA/CUDAParticleSystemSolver2.hpp
// This code is based on Jet framework. // Copyright (c) 2018 <NAME> // CubbyFlow is voxel-based fluid simulation engine for computer games. // Copyright (c) 2020 CubbyFlow Team // Core Part: <NAME>, <NAME>, <NAME>, <NAME> // AI Part: <NAME>, <NAME> // We are making my contributions/submissions to this project solely i...
TOOL
0.969887
7.184581
{ "github_metadata": { "branch": "main", "commit_count": 996, "repo_created_at": "2018-05-05T13:13:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 286, "forks": 34, "issues": 33, "pull_requests": 1 }, "file_meta": { "content_id": "a953513...
ffa78b3b-7eaa-41fb-85ab-375f5470ad61
sweeteey/waterdrops
CompilerDesign/grammatical.cpp
// G[E]: // E->TG // G->+TG|ε // T->FS // S->*FS|ε // F->(E)|i #include <iostream> #include <iomanip> #include <string> #include <vector> using namespace std; //变量定义 string s, str, stackStr;//s:输入串、str:中间变量、stackStr : 模拟栈 int i; string ch;//当前分析字符 vector<string> v;//字符串类型的向量(文法+分析栈) //函数声明 void E();...
ALGO
0.999759
3.768471
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-10-04T01:24:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "623c575fab6...
7b592d76-caf0-4708-865f-a6383b6c63b5
habanero-rice/hclib
test/performance-regression/full-apps/qmcpack/src/QMCDrivers/DMC/DMCPeta.cpp
////////////////////////////////////////////////////////////////// // (c) Copyright 2003- by <NAME> ////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////// // <NAME> // National Center for Supercomputing Applications & // Materials Comp...
ALGO
0.983769
5.411029
{ "github_metadata": { "branch": "master", "commit_count": 705, "repo_created_at": "2014-08-11T16:15:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 71, "forks": 36, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "b034c2...
354984da-ca33-4406-badc-eaa98763b057
ronistone/Maratonas
RCC/quali-2/d/solutions/rbtree_nb.cpp
#include "bits/stdc++.h" #define puba push_back #define ff first #define ss second #define bend(_x) begin(_x), end(_x) #define szof(_x) ((int) (_x).size()) #define cmpby(_x) [](const auto& a, const auto& b) {return (a _x) < (b _x);} #define TASK_NAME "" using namespace std; typedef long long ll; typedef pair<int, int>...
ALGO
0.999964
4.131639
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2016-12-13T13:17: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": "c845e1802...
6d429696-bccc-4427-897d-799e016da0ec
codermal7/Why-only-100-days-of-code-
1277-count-square-submatrices-with-all-ones/1277-count-square-submatrices-with-all-ones.cpp
#pragma GCC optimize("O3") #pragma GCC optimize("Ofast", "inline", "ffast-math", "unroll-loops", "no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native", "f16c") static const auto DPSolver = [](){ std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); ...
ALGO
0.99978
5.919261
{ "github_metadata": { "branch": "main", "commit_count": 1869, "repo_created_at": "2022-12-24T17:54:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63e6a8865...
98bebbc4-9075-40aa-b740-38188ac373e8
meet-talaviya/Placment
code/Tree/1/postOrder tra.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *left; Node *right; Node(int data) { this->data = data; left = NULL; right = NULL; } }; Node *bulidTree() { int data; cout << "Enter the data: " << endl; cin >> data; if...
ALGO
0.999931
4.614105
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-07-30T03:40: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": "080ea3d308ee...
e205e5ea-03e2-45a8-866b-b1e8d3bbf855
taku-sea/atcoder_solutions
ABC079/ABC079_C.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll INF = 1e16; const ll mod = 1000000007; #define rep(i, n) for (int i = 0; i < (ll)(n); i++) int ctoi(char c) { if (c >= '0' && c <= '9') { return c - '0'; } return 0; } int main() { string s; cin >> s; vector <ll> v = {1, 0}...
ALGO
0.99963
3.221996
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2020-05-14T13:42: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": "613fae433...
65d66ba3-9683-4a9e-82ab-88ce24526264
Rakibul73/Programing-Code
programing_code/C++/checks_whether_number_n_is_power_of_two_or_not.cpp
/*** <NAME> Read in the name of Allah, who created you. Author : <NAME>, Faculty of CSE, Patuakhali Science & Technology University, Bangladesh. ***/ #include <bits/stdc++.h> using namespace std; int main() { long long n; cin >> n; // two(2) power of x=(0,1,2,3,4,5,6,,,,,, All natural ...
ALGO
0.999959
4.627947
{ "github_metadata": { "branch": "main", "commit_count": 262, "repo_created_at": "2020-11-09T06:43:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "523435b697...