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 |
|---|---|---|---|---|---|---|---|
68b9054e-7e56-4f3a-8b44-db80ca2b78ab | SA4DRAO/CS101 | PSCP Assignment 5/PSCP_Assignment_5.7.cpp | #include <iostream>
int main(){
int n{};
std::cout << "Enter the number of elements of the array: ";
std::cin >> n;
int arr[n]{};
std::cout << "Enter the elements of the array: ";
for(int i{}; i<n; i++){
std::cin >> arr[i];
}
int k{};
int count{};
std::cou... | ALGO | 0.999689 | 4.822491 | {
"github_metadata": {
"branch": "default",
"commit_count": 3,
"repo_created_at": "2021-01-11T02:53: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": "8ebff6e9a... |
9b77f1df-1a65-42a8-9185-0a027f606d5b | Teles-Gabriel/Atividades-CPC | Semana4/exercicio6.cpp | #include <iostream>
using namespace std;
int main() {
int min = 1, max = 100, guess;
char response;
cout << "Pense em um numero entre 1 e 100 e eu tentarei adivinha-lo.\n";
while (min <= max) {
guess = min + (max - min) / 2;
cout << "O numero em que voce esta pensando e " << guess <<... | ALGO | 0.996053 | 3.588088 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2024-04-05T20:30: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": "47c82358add... |
3240f1b0-2300-4692-add1-2652ad62d28c | Tushar1805/coding_roadmap | DSA/Binary Search/BS on 1D array/11.cpp | #include<bits/stdc++.h>
using namespace std;
// Simple logic is find the minimum
// element in the array and return it's index
int countRotation(vector<int> &arr) {
int n = arr.size();
int l = 0, r = n - 1, mid;
int ans = INT_MAX;
int index = -1;
while (l <= r) {
mid = l + (r - l) / 2;
if (arr[l] <= arr[r]... | ALGO | 0.999982 | 5.371294 | {
"github_metadata": {
"branch": "main",
"commit_count": 328,
"repo_created_at": "2023-03-07T12:55: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": "521c9e0192... |
58614906-41c6-4899-9b45-0b698346e78f | Qazi-Talha-Ali-00/Virtual-Memory-Management-Simulator | main.cpp | #include <bits/stdc++.h>
#include "input.cpp"
#include "memory.cpp"
#include "replace_init.cpp"
#include <thread>
using namespace std;
long long pages, frames;
mainMemory main_arr;
MemoryTable mem;
secondaryMemory secondary_arr;
FrameTable frame_arr;
vector<mutex> mtx;
queue<int> fifoQueue; // Used for FIFO
vector<i... | ALGO | 0.998651 | 4.920232 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-11-07T16:08:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c98c84cccf8... |
2b07548e-a30b-4752-b087-e53655627370 | ChrisTroy84/CSCE-121 | starter/functions.cpp | #include <iostream>
#include <sstream>
#include <fstream>
#include <cmath>
#include "functions.h"
#include <string>
using std::cout, std::endl, std::string;
using namespace std;
using std::ifstream; using std::ofstream;
void initializeImage(Pixel image[][MAX_HEIGHT]) {
// iterate through columns
for (unsigned int... | TOOL | 0.914166 | 4.634774 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2023-10-03T04:00: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": "5c26ca20e38... |
db2b6451-6e6c-4193-845c-27eb2248319f | alsonwangkhem/data-structures-and-algorithms | Chapter_9_Greedy_Algorithms/3.cpp | // Jump game - I
// Given an array of integers nums, each element in the array represents the maximum jump length at that position. Initially starting at the first index of the array, determine if it is possible to reach the last index. Return true if the last index can be reached, otherwise return false.
#include<bit... | ALGO | 0.999947 | 5.467143 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2024-08-27T07:08: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": "b0806a9eea6... |
8de64c4b-14bd-4979-b707-5781d59a257a | cutehammond772/problem-solving-archive | 백준/Platinum/12999. 화려한 마을3/화려한 마을3.cc | #include <bits/stdc++.h>
#define FAST_IO ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr)
#define OFF 100000
using namespace std;
int N, Q, K;
struct query {
int order, x, y;
query(const int& order, const int& x, const int& y):
order(order), x(x), y(y) {}
bool operator<(con... | ALGO | 0.999948 | 5.034638 | {
"github_metadata": {
"branch": "main",
"commit_count": 1010,
"repo_created_at": "2023-07-10T17:59: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": "163f05498... |
e6e04fee-a5d8-4890-84ed-0d9d7e18bd6e | LYuri26/AulasC-CPP | exercicios/Lista 11/somapositivos.cpp | #include <iostream>
using namespace std;
int main() {
int numero, soma = 0;
// Solicita ao usuário que insira números positivos
cout << "Digite numeros positivos para calcular a soma. Insira um numero negativo para encerrar:" << endl;
// Loop while para continuar pedindo números até que um número neg... | ALGO | 0.988891 | 3.980786 | {
"github_metadata": {
"branch": "main",
"commit_count": 82,
"repo_created_at": "2023-08-04T19:08: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": "ea6ff139393... |
ede6f1b4-188e-4603-a4f1-72dd6947769c | ishandutta2007/codeforces-k | keshi/normal/1637/F.cpp | //In the name of God
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const ll maxn = 2e5 + 100;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
#define fast_io ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define file_io freopen("input.txt... | ALGO | 0.999758 | 3.708445 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:06:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2a4d5968c0e... |
71f77746-e62e-405e-b6d1-cd9e2cf6ccec | anubhvshrma18/PepCoding-Solutions | Level-1/15. Generic Tree/Size Of Generic Tree.cpp | #include <bits/stdc++.h>
using namespace std;
struct Node
{
int data;
vector<Node *> children;
};
Node *construct(int *arr, int n)
{
Node *root = new Node();
root->data = arr[0];
stack<Node *> st;
st.push(root);
for (int i = 1; i < n; i++)
{
if (arr[i] == -1)
{
... | ALGO | 0.999935 | 4.100307 | {
"github_metadata": {
"branch": "master",
"commit_count": 128,
"repo_created_at": "2021-01-31T21:06:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 35,
"forks": 15,
"issues": 2,
"pull_requests": 2
},
"file_meta": {
"content_id": "37987e... |
47a1938f-1f32-4345-aa58-cacb3ac59c4e | CGAL/cgal | Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_cylinder_fit_sorting.h | // Copyright (c) 2021 GeometryFactory (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : <NAME>
//
#ifndef CGAL_SHAPE_DETECTION_REGION_GROWING_POINT_SET_LEAST_SQUARES_CYLIND... | ALGO | 0.999775 | 7.517181 | {
"github_metadata": {
"branch": "master",
"commit_count": 113659,
"repo_created_at": "2014-10-01T12:22:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5443,
"forks": 1475,
"issues": 511,
"pull_requests": 136
},
"file_meta": {
"content_id... |
15eaedea-f409-4ad4-83fe-92bc4c1f81f5 | sunidhib2002/LeetCode_Questions | Activity Selection - GFG/activity-selection.cpp | //{ Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution
{
public:
//Function to find the maximum number of activities that can
//be performed by a single person.
struct activity {
int begin;
int finish;
};
bool static cmp(ac... | ALGO | 0.999985 | 5.642142 | {
"github_metadata": {
"branch": "main",
"commit_count": 449,
"repo_created_at": "2022-06-17T11:45: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": "658ccbbfce... |
f7360894-65e6-4f41-bbc1-c585c1c628b0 | saumyayadav25/DSA-Supreme-3.0 | 12 Linked List/Linked List Class-3/206ReverseLL.cpp | // leetcode 206: Reverse Linked List
/**
* Definition for singly-linked list.
* 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) {}
* };
*/
// using r... | ALGO | 0.999654 | 6.02943 | {
"github_metadata": {
"branch": "main",
"commit_count": 382,
"repo_created_at": "2024-04-26T16:43:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 78,
"forks": 25,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e7cc7b33... |
1838d4c3-da5b-4088-9ebf-955f68abf00b | Skier/vault_repo | DalWorth/SmartSchedule/vrph/src/demos/vrp_plotter.cpp | ////////////////////////////////////////////////////////////
// //
// This file is part of the VRPH software package for //
// generating solutions to vehicle routing problems. //
// VRPH was developed by <NAME> (<EMAIL>). //
// ... | ALGO | 0.917068 | 4.584532 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2014-11-18T17:43:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0c636a9211... |
9a2f9433-bd5a-481b-aba6-9b4cc970f0cf | caplove/CPP | 15_1쓰레드/main.cpp |
// 쓰레드
// 병렬처리를 위해 사용되는 가장 기본적인 방법
// 쓰레드는 프로세스 내에서 실행되는 흐름의 단위
// 프로세스는 최소 하나의 쓰레드를 가지고 있으며, 쓰레드가 하나인 프로세스는 싱글 쓰레드 프로세스라고 한다.
// 쓰레드는 프로세스 내의 데이터를 공유하며, 프로세스 내의 쓰레드들은 동시에 실행될 수 있다.
// join() : 쓰레드가 끝날 때까지 기다린다.
// detach() : 쓰레드가 끝나도 기다리지 않는다.
// 쓰레드는 생성자에서 시작되며, 소멸자에서 종료된다.
// race condition : 여러 쓰레드가 동시에 접근하여 데이터를 ... | ALGO | 0.997796 | 4.900302 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-01-02T04:36:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9e5a4b977c7b... |
acca02a9-5ba4-40ea-ab34-7213648632e3 | cppfastio/fast_io | include/fast_io_crypto/hash/sha256_x86_sha_extensions_msvc.h | #pragma once
#if __has_cpp_attribute(__gnu__::__flatten__)
[[__gnu__::__flatten__]]
#endif
inline void sha256_runtime_routine(std::uint_least32_t* __restrict state,std::byte const* __restrict block,std::byte const* __restrict blocks_last) noexcept
{
constexpr std::size_t block_size{64};
__m128i STATE0, STATE1;
__m1... | ALGO | 0.993154 | 7.396835 | {
"github_metadata": {
"branch": "master",
"commit_count": 1363,
"repo_created_at": "2022-02-19T18:21:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 783,
"forks": 66,
"issues": 43,
"pull_requests": 2
},
"file_meta": {
"content_id": "e95f... |
ae3ea8da-0f67-4cc2-b8db-e784b1c6932e | Shahriar-Seam/Programming | CPP/Other CF Problems/459_B.cpp | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, i, t, ma = INT32_MIN, mi = INT32_MAX, diff;
ll cnt;
vector <int> arr;
cin >> n;
for (i = 0; i < n; i++) {
cin >> t;
if (t > ma) {
... | ALGO | 0.999924 | 4.035273 | {
"github_metadata": {
"branch": "main",
"commit_count": 749,
"repo_created_at": "2023-09-13T02:53: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": "49cb3fd0c9... |
9c16e750-9fad-4fca-ab54-f2510d558364 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/04/0416/personal_submission/cf558c_tsreaper.cpp | #include <bits/stdc++.h>
#define MAXN ((int) 1e5)
#define MAXP 20
#define INF ((int) 1e9)
using namespace std;
int n;
vector<int> A[MAXN + 10];
int gao(int len) {
int now = 0, cnt[MAXP + 5] = {0};
for (int i = 1; i <= n; i++) {
int t = A[i].size();
if (t < len) return INF;
for (int j =... | ALGO | 0.999871 | 3.785693 | {
"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": "6609... |
2b558c99-57f7-4745-bfb8-56e82142f0c0 | Drisius/wfcGenerationSDL | wfcGeneration/world.h | #pragma once
#include <SDL2/SDL.h>
#include <stdlib.h>
#include <map>
#include <set>
#include <algorithm>
#include <vector>
#include <iterator>
#include <windows.h>
#include <string>
static constexpr int BIRTH_RATE = 34; // Standard 35ish
static constexpr int BIRTH_DEATH_NUMBER = 4; // Standard 4ish
enum Color
{
... | TOOL | 0.937157 | 4.882738 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2023-04-26T15:27: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": "19137722c... |
097dcbba-f9af-46bf-8d48-ab56ef965fe7 | smflorentino/whiteboarder | circle_detect/cdetect2.cpp | /**
* @file HoughCircle_Demo.cpp
* @brief Demo code for Hough Transform
* @author OpenCV team
*/
#include "/Users/scottflo/Downloads/opencv-2.4.6.1/modules/highgui/include/opencv2/highgui/highgui.hpp"
#include "/Users/scottflo/Downloads/opencv-2.4.6.1/modules/imgproc/include/opencv2/imgproc/imgproc.hpp"
#include <... | ALGO | 0.985575 | 5.825943 | {
"github_metadata": {
"branch": "master",
"commit_count": 90,
"repo_created_at": "2013-11-09T01:26:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "92cb7521c... |
fcaab5cc-7a20-4767-932b-30a885b903de | glipR/MuMonash | NZPC19/M/M.cpp | // MuMonash
#include <iostream>
#include <vector>
using namespace std;
typedef vector<int> vi;
typedef long long ll;
int main() {
int n, d, K;
cin >> n >> d >> K;
vi waves(n);
for (int i=0; i<n; i++) { cin >> waves[i]; }
// DP[i][j] = maximum fun given starting at
int DP[n][d];
// ce... | ALGO | 0.999517 | 3.247324 | {
"github_metadata": {
"branch": "master",
"commit_count": 382,
"repo_created_at": "2019-09-22T02:45:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0633c90... |
2004f05b-682e-4fd6-8515-16caa879675f | ishandutta2007/codeforces-q | qingyu/normal/1107/D.cpp | //...
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <queue>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <map>
#include <cctype>
#include <iostream>
constexpr int N = 5555;
int n, M[N][N], S[N][N];
inline char nc()
{
static char buf[1000000], *p1 = buf, *p2 = buf;
return p1 =... | ALGO | 0.999793 | 3.650475 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:56: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": "cf16e673845c... |
8b54e8c7-c775-432f-984f-c390eb956059 | lzampieri/RSA_problem | src/curve_fit.cpp | #include "curve_fit.hpp"
auto internal_solve_system(gsl_vector* initial_params, gsl_multifit_nlinear_fdf *fdf,
gsl_multifit_nlinear_parameters *params) -> std::vector<double>
{
// This specifies a trust region method
const gsl_multifit_nlinear_type *T = gsl_multifit_nlinear_trust;
const size_t max_... | ALGO | 0.996247 | 6.030215 | {
"github_metadata": {
"branch": "main",
"commit_count": 307,
"repo_created_at": "2021-11-26T18:15: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": "5abb8984ac... |
dd200014-ca1b-47ad-b2fb-ae1f6f8cdcba | sjalim/Algorithms | Graph/bellman ford.cpp | #include <bits/stdc++.h>
using namespace std;
vector<int> v[2000 + 10];
int dis[1000 + 10];
int parent[100];
void pathFinder(int n,int s)
{
cout << "Node\t\t\t\tDistance\t\t\t\tpath" << endl;
for (int i = 0; i < n; i++)
{
cout << s<<"-->"<<i << "\t\t\t\t" << dis[i]<<"\t\t\t\t"<<i;
int p =... | ALGO | 0.99995 | 4.047778 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2020-03-18T03:48: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": "16e9da4ff... |
a70a41d5-b432-4c2b-9f01-01970fee1eff | rolandjansky/athena | Simulation/ISF/ISF_Fatras/ISF_FatrasTools/src/MultipleScatteringSamplerGaussianMixture.h | /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// MultipleScatteringSamplerGaussianMixture.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef ISF_FATRASTOOLS_MUL... | ALGO | 0.954456 | 6.231182 | {
"github_metadata": {
"branch": "master",
"commit_count": 100549,
"repo_created_at": "2022-08-07T05:54:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "348b5... |
bb07b251-d9bf-470f-adeb-25bad669a4d4 | i-X-ce/competitive-programming | ABC/357D.cpp | /*
g++ XXX.cpp
./a.out
*/
#include <bits/stdc++.h>
using namespace std;
long long mp(long long bs, long long ex, long long mo){
long long ans = 1;
bs %= mo;
while(ex > 0){
if (ex % 2 == 1){
ans = (ans * bs) % mo;
}
bs = (bs * bs) % mo;
ex /= 2;
}
return ans;
}
int main() {
long long ... | ALGO | 0.999941 | 4.80981 | {
"github_metadata": {
"branch": "main",
"commit_count": 46,
"repo_created_at": "2024-09-21T13:58:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "38b95a0ee76... |
052149df-6dc3-41b7-a1d5-8186bfd95b14 | truongdcba/Algorithms-Samsung-and-PTIT | Sinh - Quay lui nhánh cận/Dãy con có tổng nguyên tố.cpp | // Cho dãy số A[] có N phần tử là các số nguyên dương khác nhau từng đôi một. Hãy sắp xếp dãy theo thứ tự giảm dần, sau đó liệt kê tất cả các dãy con của A[] có tổng các phần tử là số nguyên tố.
// Input
// Dòng đầu ghi số bộ test, mỗi test có 2 dòng:
// Dòng đầu ghi số N (2 < N <15)
// Dòng thứ 2 ghi N số của dãy A[],... | ALGO | 0.999704 | 4.549371 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-10-31T15:01: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": "db2997563102... |
e34c3b24-3b74-4a89-aad2-bf0192123208 | asa4a/archive-latihan | cpp/sort-array.cpp | #include <iostream>
using namespace std;
int main(){
int array1[6] = {1, 13, 24, 2, 15, 27};
int i,j,k,array2[6];
int divarr1[3], divarr2[3];
for (i = 0; i < 3; i++){
divarr1[i] = array1[i];
divarr2[i] = array1[i+3];
}
cout << divarr1[0] << " " << divarr1[1] << " " << divarr1[2]... | ALGO | 0.999432 | 3.017618 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2023-11-19T07:14: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": "11cace9629d3... |
23cc7999-f40a-472c-9755-9f596a98dc19 | a-dev1/CP-Repo | challenges/BACK/DEC_1/A_Long_Comparison.cpp | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define ar array
#define ll long long
// const ll MAX_N = 1e5 + 1;
const ll MOD = 1e9 + 7;
const ll INF = 1e9;
int main()... | ALGO | 0.999614 | 5.258384 | {
"github_metadata": {
"branch": "main",
"commit_count": 174,
"repo_created_at": "2021-06-14T18:35:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "41bae17f99... |
5e8385f8-64ea-4e72-9d0a-0ed52eee0154 | shashipk/interview-1 | leetcode/best_time_to_buy_and_sell_stock_III.cpp | class Solution {
public:
int maxProfit(vector<int> &prices) {
// Start typing your C/C++ solution below
// DO NOT write int main() function
int n = prices.size();
if (n < 2) return 0;
vector<int> right(n, 0);
int ans = 0;
int maxp = prices[n - 1];
for ... | ALGO | 0.999929 | 5.461803 | {
"github_metadata": {
"branch": "master",
"commit_count": 101,
"repo_created_at": "2016-12-31T17:45: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": "ce2f6910... |
f5f2309f-ce90-4280-8479-8770e708ad29 | Mujahid2923/Uva | Uva1213.cpp | #include<bits/stdc++.h>
using namespace std;
#define CIN ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ll long long int
#define ld long double
#define ull unsigned long long int
#define ... | ALGO | 0.999949 | 3.960088 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2019-02-20T18:52:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d44d15788... |
747b886e-1519-4fce-ba58-88614295dde1 | XZiar/RayRenderer | XComputeBase/XCompRely.h | #pragma once
#if defined(_WIN32) || defined(__CYGWIN__)
# ifdef XCOMPBAS_EXPORT
# define XCOMPBASAPI _declspec(dllexport)
# else
# define XCOMPBASAPI _declspec(dllimport)
# endif
#else
# define XCOMPBASAPI [[gnu::visibility("default")]]
#endif
#include "SystemCommon/MiniLogger.h"
#include "SystemCommon/Exceptions... | TOOL | 0.960842 | 5.213141 | {
"github_metadata": {
"branch": "master",
"commit_count": 1139,
"repo_created_at": "2017-02-05T02:19:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 23,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "396a9e... |
193f6df3-045e-46a1-93ff-16a301d18d95 | marinae/extractor | src/main.cpp | #include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include "extractor/BindedMatchers.hpp"
#include "extractor/Matcher.hpp"
#include "extractor/Utils.hpp"
#include "clang/AST/Decl.h"
#include "clang/AST/Stmt.h"
#include "clang/ASTMatchers/ASTMatchFinder.h"
#include "clang/Tooling/Tooling.h"
na... | TOOL | 0.950907 | 6.885125 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2016-04-04T10:21:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8644032c6... |
69dcd412-9314-47b8-949c-036eb6ba250a | e5pe0n/algorithm-training | AtCoder/ABC/161/cpp/D_Lunlun_Number_dfs.cpp | #include <bits/stdc++.h>
#define INF 1'000'000'000
using namespace std;
typedef long long ll;
ll K;
ll cnt;
ll dfs(string n, ll k) {
ll res = 0;
if (n.size() >= k) {
++cnt;
if (cnt == K) {
res = stoll(n);
} else {
res = 0LL;
}
return res;
}
if (n.size() == 0) {
for (int i =... | ALGO | 0.99974 | 4.134247 | {
"github_metadata": {
"branch": "master",
"commit_count": 571,
"repo_created_at": "2019-12-09T13:22:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 8
},
"file_meta": {
"content_id": "236b7a78... |
0cecbc5f-4f1a-4239-a382-95e3d47558e4 | HuCutie/DataStructure | Chapter 3 Stack and Queue/Problems/Chapter 3.1/04Symmetry.cpp | #include "C:\MyProjects\Visual Studio Code Workspace\DataStructure\Chapter 3 Stack and Queue\lib\Stack.cpp"
#include "C:\MyProjects\Visual Studio Code Workspace\DataStructure\Chapter 2 Linear Table\lib\LinkList.cpp"
bool Symmetry(LinkList L, SqStack & S)
{
LNode * p = L->next;
int len = GetLinkLength(L);
b... | ALGO | 0.998723 | 5.107379 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2021-09-15T11:07: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": "be2695f2e... |
26b3f89c-36c1-4108-8c46-7eb99833eba4 | thannhf/ALGORITHMS | bai_tap/bai_2.cpp | // Bài tập 1.3. Cho A là tập hợp con của tập số thực, cận dưới đúng x0 của A kí hiệu Inf(A) = x0 có thể xác định bởi mệnh đề sau:
// “ Với mọi x trong A có x0 ≤ x và với x1 có tính chất là x1 ≤ x với mọi x trong A thì suy ra x1 ≤ x0 ”. Hãy dùng các kí hiệu để
// diễn tả mệnh đề trên và mệnh đề phủ định của nó. Từ đó ... | ALGO | 0.999869 | 3.247494 | {
"github_metadata": {
"branch": "main",
"commit_count": 195,
"repo_created_at": "2024-10-20T09:18: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": "1d00b4bc86... |
e948d5d0-f501-4fb7-9bea-6f86b46f4860 | jpcrafts/Pi0_analysis | alglib_src/solvers.cpp | /*************************************************************************
ALGLIB 4.04.0 (source code generated 2024-12-21)
Copyright (c) <NAME> (ALGLIB project).
>>> SOURCE LICENSE >>>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as publishe... | TOOL | 0.99727 | 6.256512 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2024-12-09T15:33: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": "e1cc4dff0f7... |
54d8b88a-7b5a-44d1-85a8-10388a183715 | Aeshnajain/DS-Algo | 20th july/djikstra.cpp | #include<iostream>
#include<vector>
#include<climits>
#include<queue>
using namespace std;
class edge
{
public:
int nbr;
int wght;
};
vector<vector<edge> > graph;
class dpair
{
public:
int v;
int c;
string p;
dpair(int v,int c,string p)
{
this->v= v;
this... | ALGO | 0.999941 | 4.496937 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2021-04-12T21:46:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e9767e9eb966... |
2bb3a991-9704-4b64-a3f1-2fa813975b3c | Andwerpz/Competitive-Programming-Practice | - cpp -/whichplanetisthis.cpp | #include <bits/stdc++.h>
typedef long long ll;
typedef __int128 lll;
typedef long double ld;
using namespace std;
//ICPC World Finals 2020 - O
//group all the points into sets where the latitude measurements match up. Then, we can sort the longitude
//measurements and create a difference array, taking into account th... | ALGO | 0.999995 | 4.647299 | {
"github_metadata": {
"branch": "main",
"commit_count": 339,
"repo_created_at": "2021-02-26T19:38: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": "2502eb4232... |
880ebbdc-f91f-435b-ae77-bb8f143feb13 | tachithanhdanh/Competitive-Programming | USACO/Bronze/simulation/censor_slow.cpp | #include <bits/stdc++.h> // see /general/running-code-locally
using namespace std;
#define endl "\n"
using ll = long long;
//vectors
using vi = vector<int>;
#define all(x) begin(x), end(x)
#define sz(x) int((x).size())
#define pb push_back
//pairs
using pi = pair<int,int>;
#define f first
#define s second
#define m... | ALGO | 0.999928 | 5.033466 | {
"github_metadata": {
"branch": "main",
"commit_count": 598,
"repo_created_at": "2020-12-07T11:21:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1d55bc5b82... |
6b8b5a00-78f3-4b0e-a52d-73fd03d04dac | aschrein/Vulki | 3rdparty/oidn/mkl-dnn/tests/benchdnn/bnorm/bnorm.cpp | /*******************************************************************************
* Copyright 2017-2018 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apa... | ALGO | 0.998878 | 4.116446 | {
"github_metadata": {
"branch": "master",
"commit_count": 123,
"repo_created_at": "2019-07-05T13:55:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c66c6e... |
46c17f1d-8e15-46ce-88a3-050fa47a436a | zshchun/PS | boj/Platinum V/1708.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll,ll> pa;
#define endl "\n"
#define INF 123456789
struct point {
ll x;
ll y;
};
int N;
vector<point> p;
// CCW (Counter Clock Wise)
ll ccw(point a, point b, point c) {
return (a.x * b.y) + (b.x * c.y) + (c.x * a.y) - ((b.x * a.y) + (... | ALGO | 0.999984 | 4.601541 | {
"github_metadata": {
"branch": "main",
"commit_count": 719,
"repo_created_at": "2022-05-21T12:11: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": "497b273ff6... |
9ab20b1c-319b-46e4-b3d5-83af89069f73 | kkmaute/moris | projects/LINALG/src/Eigen_Impl/fn_intersect_Eigen.hpp | /*
* Copyright (c) 2022 University of Colorado
* Licensed under the MIT license. See LICENSE.txt file in the MORIS root for details.
*
*------------------------------------------------------------------------------------
*
* fn_isfinite_Eigen.hpp
*
*/
#ifndef PROJECTS_LINALG_SRC_EIGEN_IMPL_FN_INTERSECT_EIGEN_H... | ALGO | 0.998128 | 6.834528 | {
"github_metadata": {
"branch": "main",
"commit_count": 8476,
"repo_created_at": "2022-08-28T19:52:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 24,
"forks": 6,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "42480fff... |
3fcf7d13-6868-4303-ab73-0ff40b261a3a | raincross7/code-similarity | codes/train_code/problem098/problem098_395.cpp | #include<iostream>
using namespace std;
#include<string.h>
#include<string>
// study of Hash table.
#define M 1020001 // large prime number.
#define L 14 // length of term.
char H[M][L]; // Hash table.
int getnum(char ch) // character to number.
{
if(ch == 'A'){ return 1; }
else if(ch == 'C'){ ... | ALGO | 0.999818 | 3.683379 | {
"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": "57dc8748432e... |
6106631b-1928-4d95-9bed-2bfc945647e8 | jeffcullis/phylogeny-compression | edgelist.cpp | #include <iostream>
#include <vector>
#include "edgelist.hpp"
void EdgeList::append_bits (boost::dynamic_bitset<> & packedEdges, const boost::dynamic_bitset<> & b)
{
for (size_t i=0; i<b.size(); i++) {
packedEdges.push_back(b[i]);
}
}
boost::dynamic_bitset<> & EdgeList::packEdgeList(std::vector<std::s... | ALGO | 0.993924 | 5.627201 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-10-24T05:41: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": "d91a8f8b6f... |
f4225547-2740-43b7-8920-470ee9f1c743 | Ankitchawla3123/toc | A_A-B_B.cpp | #include <iostream>
#include <string>
using namespace std;
void state0(const string &w, int i);
void state1(const string &w, int i);
void state2(const string &w, int i);
void simulateFA(const string &w)
{
state0(w, 0);
}
void state0(const string &w, int i)
{
cout << "State 0: Reading '" << w[i] << "'" << end... | ALGO | 0.999852 | 5.309921 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-12-04T03:35: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": "80760b636fbe... |
3fc9c109-d68e-4096-9d51-d50d85012997 | CloudCompare/CloudCompare | plugins/core/Standard/qRANSAC_SD/extern/RANSAC_SD/GfxTL/MaxIntervalSplittingKdTreeStrategy.h | #ifndef GfxTL__MAXINTERVALSPLITTINGKDTREESTRATEGY_HEADER__
#define GfxTL__MAXINTERVALSPLITTINGKDTREESTRATEGY_HEADER__
#include <GfxTL/ScalarTypeDeferer.h>
#include <GfxTL/ScalarTypeConversion.h>
namespace GfxTL
{
template< class InheritedStrategyT >
struct MaxIntervalSplittingKdTreeStrategy
{
typedef typename Inh... | ALGO | 0.998389 | 6.465639 | {
"github_metadata": {
"branch": "master",
"commit_count": 5089,
"repo_created_at": "2012-11-06T20:15:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4019,
"forks": 1100,
"issues": 256,
"pull_requests": 4
},
"file_meta": {
"content_id": "... |
da92217c-0edf-4419-a88a-0c213cce4e9a | ry0u/SRM | SRM301/div2/InsertionSortCount.cpp | // BEGIN CUT HERE
// END CUT HERE
#line 5 "InsertionSortCount.cpp"
#include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <cstring>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#define REP(i,k,n) for(int i=k;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define ea... | ALGO | 0.999968 | 4.949351 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2015-01-24T21:03: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": "c4a1b5f53... |
9be48423-0677-4a93-a6fb-b5b5e9b7eb52 | SVCH3R/algo_term_3 | contest_1/S.cpp | #include <iostream>
#include <string>
#include <random>
struct Node {
Node* left;
Node* right;
int64_t size;
int64_t value;
int64_t priority;
int64_t min;
bool promise;
explicit Node(const int64_t& cval)
: left(nullptr), right(nullptr), size(1), value(cval), priority(rand()), min(cval), promise(... | ALGO | 0.999987 | 5.462965 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-11-13T19:26: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": "1f1286bf143e... |
d53e6e1b-1c5d-4856-b1e4-0f2b2698489d | HiteshPGDAC/c- | Day07/demo07.cpp | #include <iostream>
using namespace std;
// abstract class
class Shape
{
public:
// pure virtual functions
virtual void acceptData() = 0;
virtual void calculateArea() = 0;
};
class Circle : public Shape
{
int radius;
public:
void acceptData()
{
cout << "Enter the radius - ";
c... | TOOL | 0.974745 | 3.855173 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-04-27T05:44:42.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fddfc6aee6e35... |
619e4faf-fac3-4c4c-840a-1f8d49e6594c | WOPH96/Hardwork_Luck | baekjoon/greedy/greedy-15903/C++/greedy-15903.cpp | // #include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <queue>
using namespace std;
typedef long long ll;
// 입력변수생성
ll n, try_num;
// 다른 변수 생성
priority_queue<ll, vector<ll>, greater<ll>> pq;
// 입력, 테스트 출력
void print();
void sol()
{
while (try_num)
{
ll min_num1, min_num2;
... | ALGO | 0.999973 | 3.932567 | {
"github_metadata": {
"branch": "main",
"commit_count": 647,
"repo_created_at": "2024-08-23T12: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": "2933143bc2... |
92af65e5-98d9-4f3f-bbd5-9ffc492964ba | NMRanaHamid/Problem_Solving | XPSC/week-07/day-01/G_Favourite_Numbers.cpp | #include <bits/stdc++.h>
using namespace std;
// rename macro of operations using typedef
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<double,double> pdd;
typedef vector<ll> vll;
typedef vector<int> vii;
typedef vector<string> vss;
typedef vector<pair<... | ALGO | 0.999921 | 3.800608 | {
"github_metadata": {
"branch": "main",
"commit_count": 61,
"repo_created_at": "2023-09-30T10:39:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0aecec5c043... |
9b70a6b1-7c1a-48a6-b691-45f6aaffb0a6 | google/orbit | third_party/libbase/include/android-base/strings.h | /*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | TOOL | 0.986748 | 7.52531 | {
"github_metadata": {
"branch": "main",
"commit_count": 6738,
"repo_created_at": "2017-09-21T14:28:35.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4298,
"forks": 354,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b4090... |
296213ae-18cf-4127-9038-4e1a17e9568a | ishandutta2007/codeforces-t | timmyfeng/normal/1012/B.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 1;
struct disjoint_set_union {
int par[N];
int sz[N];
void init(int n) {
iota(par, par + n, 0);
fill(sz, sz + n, 1);
}
int find(int u) {
if (par[u] != u) {
par[u] = find(par[u]);
}
return par[u];
}
bool unite... | ALGO | 0.999872 | 3.349276 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:27:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d110fede7c9f... |
0f675f02-0adc-443e-bd15-580d03aeb8e0 | jnk0le/cortexm-AES | aes/target/cipher_impl_CM85.hpp | /*!
* \file cipher_impl_CM85.hpp
* \brief implementation wrappers of AES implementations for cortex-m85
*
* don't use directly
*
* \author jnk0le <<EMAIL>>
* \copyright MIT License
*/
#ifndef AES_TARGET_CIPHER_IMPL_CM85_HPP
#define AES_TARGET_CIPHER_IMPL_CM85_HPP
#include <stdint.h>
#include <stddef.h>
#incl... | ALGO | 0.966448 | 7.065099 | {
"github_metadata": {
"branch": "master",
"commit_count": 415,
"repo_created_at": "2018-06-09T16:29:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 41,
"forks": 4,
"issues": 8,
"pull_requests": 0
},
"file_meta": {
"content_id": "97bf982... |
8d2c94e5-5b58-46d7-8218-2bcf981fea4f | INDA23PlusPlus/redkar-strings | src/stringmatching.cpp | #include "bits/stdc++.h"
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
/* typedef tree<int,null_type,less<int>,rb_tree_tag,
tree_order_statistics_node_update> indexed_set; */
#define el "\n"
#define faster ios_base::sync_with_stdio(0); cin.tie(0);
#defin... | ALGO | 0.999851 | 4.218147 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-02-23T10:52:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f174925c5172... |
9182a269-9d67-430b-8db6-92f6d256190e | Cruyun/LeetCode | CPP/006_ZigZag_Conversio.cpp | class Solution {
public:
string convert(string s, int numRows) {
if (numRows == 1)
return s;
int col = 0;
int len = s.size();
bool flag = true;
string arr[numRows];
int i;
for (i = 0; i < numRows; i++)
arr[i] = "";
... | ALGO | 0.999998 | 6.156535 | {
"github_metadata": {
"branch": "master",
"commit_count": 63,
"repo_created_at": "2017-11-17T14:00:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f8fc1e493... |
330236a4-50cc-446d-bc21-76043587a8c0 | katomizuki/AlgorithmMethodSample | SAIKI_1_7.cpp | #include <bits/stdc++.h>
#include <vector>
using namespace std;
vector<vector<int>> func(int N, int L, int R) {
if (L > R) {
return {};
}
if (N == 0) {
return {{}};
}
vector<vector<int>> ans;
for (auto x: func(N-1, L, R)) {
vector<int> to = {L};
to.insert(to.e... | ALGO | 0.999438 | 3.428445 | {
"github_metadata": {
"branch": "main",
"commit_count": 78,
"repo_created_at": "2023-10-05T13:24:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "addea4cd9a4... |
e9fefe28-27f5-4eda-a14d-a7ab81245166 | JonoChadwell/FourthDimension | BallSimulation.cpp | #include "BallSimulation.h"
#include "BallObject.h"
#include "HyperShapes.h"
#include "Program.h"
#include "MatrixStack.h"
#include "Controls.h"
#include <cmath>
#include <random>
#include <iostream>
#include <glm/vec4.hpp>
#include <glm/gtc/type_ptr.hpp>
#define BOUND 10.0f
// objects below this point will recieve ... | ALGO | 0.970566 | 4.048769 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2017-03-07T08:49: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": "05755e3a0... |
e90ffcfd-8920-4123-801f-43d755890e30 | TNSGayathri/GreeksforGreeks | Difficulty: Easy/Find length of Loop/find-length-of-loop.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
struct Node {
int data;
struct Node *next;
Node(int x) {
data = x;
next = NULL;
}
};
void printList(Node *node) {
while (node != NULL) {
cout << node->data << " ";
node = node->next;
}
cou... | ALGO | 0.999607 | 5.23832 | {
"github_metadata": {
"branch": "main",
"commit_count": 400,
"repo_created_at": "2024-01-06T04:28: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": "3d5ac9bc28... |
6931c618-531c-458f-b927-0be69513fac3 | Ebisu02/algorithms | sorts/heap_sort.cpp | //
// Created by admin on 17.06.22.
//
#include "../main_lib.h"
void heapify(int arr[], int n, int i)
{
// Функция чтобы скопировать поддерево с корневым узлом i,
// которая является индексом в массиве arr[].
// n - размер дерева
int largest = i; // Задаем наибольший как корень дерева
int left = 2... | ALGO | 0.99982 | 4.600868 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2021-02-05T05:37: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": "c7c6270d1... |
6c300313-cb78-4856-8f19-460e69a08399 | eaertbel/expressiongraph | src/mptrap.cpp | #include <kdl/mptrap.hpp>
#include <limits>
#include <math.h>
namespace KDL {
MPTrap::MPTrap():
amax(1),vmax(1),spos(0),epos(0),duration(0),t1(0),t2(0),
s(1),dT(0), d_t1_d_dpos(0),d_t2_d_dpos(0), d_duration_d_dpos(0)
{}
void MPTrap::setPlan(double _spos, double _epos, double _vmax, double _amax) {
spos = ... | ALGO | 0.999621 | 6.883867 | {
"github_metadata": {
"branch": "master",
"commit_count": 49,
"repo_created_at": "2014-11-25T21:43:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7881b59... |
4c4229a0-4b2b-4ead-a7a7-c906b45feba7 | VladPavliuk/PaintClone | PaintClone/common.cpp | #include "common.h"
bool CompareStrings(const char* first, int firstLength, const char* second, int secondLength)
{
if (firstLength != secondLength) return false;
return memcmp(first, second, secondLength) == 0;
}
void BubbleSort(SimpleDynamicArray<int>* arr)
{
for (int i = 0; i < arr->length - 1; i++)
{
for (... | ALGO | 0.978404 | 4.149879 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2024-02-02T20: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": "d61c9bc41... |
8d0ec293-efba-40fa-9bd2-03370d819d7a | ykmyou/Algorithm | Codeforce/621E - Wet Shark and Blocks.cpp | #include <stdio.h>
#include <string.h>
const long long mod = 1e9 + 7;
struct matrix{
long long R[101][101];
int n;
matrix(int n, long long init){
memset(R, 0, sizeof(R));
this->n = n;
for(int i = 0; i < n; i++) R[i][i] = init;
}
matrix operator *(matrix &mat){
matrix ... | ALGO | 0.999887 | 3.946644 | {
"github_metadata": {
"branch": "master",
"commit_count": 258,
"repo_created_at": "2017-06-11T12:59: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": "0f9a7d85... |
23c2e8a6-6f4f-4295-a91f-b0e18c6fa515 | izlyforever/cf | contest/1409/d/d.cpp | #include <bits/stdc++.h>
#define watch(x) std::cout << (#x) << " is " << (x) << std::endl
#define print(x) std::cout << (x) << std::endl
using LL = long long;
int main() {
std::cin.tie(nullptr)->sync_with_stdio(false);
int cas;
std::cin >> cas;
while (cas--) {
int s;
std::string a;
std::cin >> a >>... | ALGO | 0.999457 | 3.732772 | {
"github_metadata": {
"branch": "master",
"commit_count": 306,
"repo_created_at": "2021-02-20T10:51:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "113596d0... |
f7bf17cf-895b-4ca2-a53f-5b7e277c6adf | alfredtruong/aoc2022 | cpp/day13.hpp | #ifndef __DAY13_HPP
#define __DAY13_HPP
namespace day13 {
/*
struct PacketEntry
{
bool isValue;
int value;
std::vector<PacketEntry>;
};
struct Packet
{
std::vector<PacketEntry>
void Packet(std::string str)
{
parse_packet(str);
}
void parse_packet(std::string str)
{
// ltrim '['
// rtr... | ALGO | 0.972968 | 4.8635 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2023-01-03T06:31: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": "b1ddd4cfb45... |
c806258c-58aa-4d9a-8d4b-45495f511c6c | amitsunildhamne/Threaded-Fast-Fourier-Transform | threadDFT2d.cc | // Threaded two-dimensional Discrete FFT transform
// Author:<NAME>
// ECE8893 Project 2
#include <iostream>
#include <string>
#include <math.h>
#include <stdlib.h>
#include <pthread.h>
#include "Complex.h"
#include "InputImage.h"
// You will likely need global variables indicating how
// many threads there are, and... | ALGO | 0.998887 | 5.264855 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-03-21T17:50: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": "a395ba8c88... |
e6c10301-d53a-4e98-8d6e-2966d089784c | ttyang/sandbox | sandbox/statistics/kernel/libs/statistics/detail/kernel/example/mv_mono_bw_rp.cpp | ///////////////////////////////////////////////////////////////////////////////
// kernel::example::mono_bw_kernel_rp.cpp //
// //
// Copyright 2009 <NAME>. Distributed under the Boost //
// Sof... | ALGO | 0.999661 | 5.854998 | {
"github_metadata": {
"branch": "trunk",
"commit_count": 20907,
"repo_created_at": "2013-10-11T03:08:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5a2bec6... |
7cbb6255-181c-488d-a43b-080a75bbfbfa | alexandraback/datacollection | solutions_2458486_0/C++/santanusinha/test.cpp | #include<iostream>
#include<string>
#include<sstream>
#include<algorithm>
#include<list>
#include <set>
#include <iterator>
#include<queue>
using namespace std;
struct Chest{
int keyType;
int numKeys;
list<int> keys;
int index;
};
struct MaxKeyCountSelector {
bool operator ()(const Chest &lhs, const Chest &rhs ... | ALGO | 0.999816 | 3.750779 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f6482c0fc... |
ec30ab80-2f4d-4580-9d48-3d70980bfa39 | giaphu39/practiceCplusplus | practicetest/quicksort/quick2/main.cpp | #include <iostream>
#include<vector>
using namespace std;
///2 5 3 2 6 8 2 -1
void input(vector<int>& a){
while(true){
int temp;
cin>>temp;
if(temp < 0) break;
a.push_back(temp);
}
}
void output1(vector<int> a, int l, int r){
cout<<"["<<l << "-" << r<<"]" <<endl;
}
void o... | ALGO | 0.999859 | 4.67396 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2025-03-30T16:35: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": "7a1dd5228d... |
8147cd85-b4fc-4108-87b7-a10025283c2f | ciruscaio/Programacao2022.1 | Questoes5/Questoes5.cpp | #include <iostream>
#include <string.h>
#include <math.h>
using namespace std;
int main()
{
//SLIDERs
//Construa um algoritmo que, tendo como dados de entrada quatro pontos quaisquer no plano (aos pares, pois cada par deve ser uma reta),
//PA1(x1,y1), PA2(x2,y2), PB1(x1,y1) e PB2(x1,y1) escreva a distân... | ALGO | 0.999878 | 3.853301 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2022-04-12T23:21:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b3bcff247... |
3468d97e-bac2-40b5-8c11-a49e68627bb8 | khu-kimjunseo/DPO_for_CodeGen | dpo_train/generation_output/py-cpp/HumanEval_132_is_nested.cpp | ### Python version
def is_nested(string: str) -> bool:
opening_bracket_index = []
closing_bracket_index = []
for i in range(len(string)):
if string[i] == '[':
opening_bracket_index.append(i)
else:
closing_bracket_index.append(i)
closing_bracket_index.reverse()
... | ALGO | 0.998331 | 5.715825 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-12-12T11:58: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": "414a6a345c76... |
923456f8-a29e-41ff-855a-0c827e4626a2 | leandrolcampos/daa_paradigms | src/six_flags.cc | /* ----------------------------------------------------------------------- *
*
* Author: <NAME> <<EMAIL>>
*
* Federal University of Minas Gerais (UFMG)
* Department of Computer Science
* Graduate Program in Computer Science
* Design and Analysis of Algorithms
*
* Solution for Six Flags problem usin... | ALGO | 0.99942 | 5.684847 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2019-05-19T23:17: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": "adf2fff2f... |
09fc9831-d903-4e8a-8bb6-d848a47be724 | RongshengXu/Fighting | test.cpp | #include <fstream>
#include <sstream>
#include <string>
#include <iostream>
#include <vector>
#include <unordered_set>
#include <unordered_map>
using namespace std;
unordered_map<int, double> AD = {
{1,0.1},
{2,0.2},
{3,0.3},
{4,0.4},
{5,0.5},
{6,0.6},
{7,0.7},
{8,0.8}
};
unordered_map<int, double> sec = {
{1, 0.1},... | ALGO | 0.998595 | 3.366228 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-11-18T03:00: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": "973415e01c... |
48f2564c-ef46-45b9-b38e-238847078638 | camil0palacios/Competitive-programming | solutions/codeforce/Codeforces Round #686 (Div. 3)/C. Sequence Transformation/solution.cpp | #include <bits/stdc++.h>
#define endl '\n'
#define ll long long
#define fori(i,a,b) for(int i = a; i < b; i++)
#define ft first
#define sd second
using namespace std;
typedef pair<int,int> ii;
typedef vector<int> vi;
int main() {
ios_base::sync_with_stdio(false); cin.tie(NULL);
int t;
cin >> t;
while... | ALGO | 0.999886 | 4.142082 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2018-10-30T16:26: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": "40bbc2164... |
3e738f71-e371-4ab8-9661-52cba4d5582e | lixiang2017/leetcode | cpp/0001.0_Two_Sum.cpp | /*
执行用时:8 ms, 在所有 C++ 提交中击败了92.05% 的用户
内存消耗:10.5 MB, 在所有 C++ 提交中击败了38.27% 的用户
通过测试用例:57 / 57
*/
class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
unordered_map<int, int> um;
int n = nums.size();
for (int i = 0; i < n; i++) {
if (um.count(target - nums[i... | ALGO | 0.999939 | 5.945446 | {
"github_metadata": {
"branch": "master",
"commit_count": 1482,
"repo_created_at": "2018-10-15T09:54:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b3bae3c... |
8c53edca-7ede-46da-bfe8-2d9bc895301b | XxroxiplxX/Algorithms-and-Optimization-Repository | Graph-Algorithms/Introduction/src/Graph.cpp | //
// Created by piotrkali on 3/1/23.
//
#include "Graph.h"
void Graph::addEdge(int u, int v) {
getVertex(u)->id = u;
getVertex(v)->id = v;
getVertex(u)->neighbours.push_back(getVertex(v));
getVertex(v)->neighbours.push_back(getVertex(u));
}
Vertex *AbstractGraph::getVertex(int id) {
if (id == 0 ... | ALGO | 0.941129 | 4.168805 | {
"github_metadata": {
"branch": "master",
"commit_count": 55,
"repo_created_at": "2023-03-01T17:58: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": "a49a64d36... |
4510627b-f2a0-46d2-965f-ca6ff5b2a68a | Ritesh25696/companiywise | oracle/Shortest un-ordered subarray.cpp | Given an array of n distinct elements. Find the length of shortest unordered (neither increasing nor decreasing) sub array in given array.
Input:
The first line consists of an integer T i.e number of test cases. The first line of each test case consists of an integer n.The next line consists of n spaced numbers.
Out... | ALGO | 0.999839 | 4.040994 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2017-08-24T17:04: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": "7c5bf5268... |
ab1d49ad-ea25-4125-b079-0ccdd6064f7c | leebohm/codetree-TILs | 240304/벽이 있는 충돌 실험/collision-experiment-with-wall.cpp | #include <iostream>
#include <tuple>
#include <vector>
#define DIR_NUM 4
#define MAX_N 50
#define ASCII_NUM 128
using namespace std;
typedef tuple<int,int,int> Marble;
int t,n,m;
int marble_cnt[MAX_N+1][MAX_N+1];
int mapper[ASCII_NUM];
int dx[DIR_NUM] = {-1,0,0,1};
int dy[DIR_NUM] = {0,1,-1,0};
vector<Marble> ... | ALGO | 0.999957 | 4.271623 | {
"github_metadata": {
"branch": "main",
"commit_count": 1508,
"repo_created_at": "2024-01-24T06:41:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "384b21335... |
6180403d-42ce-4d55-ac08-c3c2baf43c40 | dake0805/DataStructureExperimentNwpu2019 | Exercise3_Tree/LeetCode654.cpp | //
// Created by zy on 4/17/2019.
//
#include "LeetCode654.h"
#include "BinaryTree.h"
#include <iostream>
using namespace std;
void LeetCode654::RunApplication()
{
int n;
cin >> n;
int *array = new int[n];
for (int i = 0; i < n; i++)
cin >> array[i];
TreeNode654 *treeNode654 = constructMa... | ALGO | 0.999972 | 6.187782 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2019-03-20T07:21:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa5918c43... |
bba02798-42bd-499f-b3f2-91ab66881b1b | mdihemu/Online-Judge | June'21/C. K-th Not Divisible by n.cpp | #include<bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int long long
#define endl "\n"
#define PI acos(-1.0)
#define IN freopen("input.txt",'r',stdin)
const int MOD = 1e9+7;
const int INF = 2e5+5;
... | ALGO | 0.9999 | 3.138985 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2019-11-14T18: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": "71946e2fe... |
e99176a5-3b46-41e2-95b0-5072036ff326 | harshitneversettle/DSA | class_14_2d_Array_1/Q2.cpp | // Write a programme to find the smallest element of a given 2D array of integers
#include<iostream>
#include<climits>
using namespace std ;
int main(){
cout << " Enter the number of rows : " ;
int n ;
cin >> n ;
cout << " Enter the number of columns : " ;
int m ;
cin >> m ;
int arr[n][... | ALGO | 0.999549 | 3.953479 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-07-23T16:14: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": "63d4e3533a35... |
316aa219-c9df-40b7-9c0b-3fcb2999e5d9 | AnnoNuem/anna | aureservoir/aureservoir/simulate.h | /***************************************************************************/
/*!
* \file simulate.h
*
* \brief simulation algorithms for Echo State Networks
*
* \author <NAME>, grh _at_ mur _dot_ at
* \date Sept 2007
*
* ::::_aureservoir_::::
* C++ library for analog reservoir computing neural ne... | ALGO | 0.999054 | 6.811804 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2014-05-24T12:49:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a3d0a41bfb... |
9d9d4ddf-0d0a-47fe-b2e3-da7b6e238cc5 | durgeshkk/Codeforces-Contests | Practice/1700/C_Nezzar_and_Symmetric_Array.cpp | #include<bits/stdc++.h>
#include<iomanip>
#include <deque>
#include <bitset>
#include <cstdint>
//#include <ext/pb_ds/assoc_container.hpp> // Common file
//#include <ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
//#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_updat... | ALGO | 0.999666 | 3.727351 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2023-11-23T16:31:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "453085c8ed2... |
9d080811-f92b-4a46-8934-a8b0729fa89a | LawrenceScroggs/CS161 | wk3_tshirts_Lscroggs.cpp | /********************************************************************
* wk3_tshirts_Lscroggs.cpp
*
* Summary: this program takes input of the users for how many tshirts
* they bought. It then calculates how much of a discount the user gets.
* displays price
* displays discount
* displays total amount saved
*
* Aut... | ALGO | 0.97734 | 3.627741 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-02-13T17:47: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": "301f7a63d1... |
52c58e2c-e886-4869-8bd5-9810d99b866c | XyeHyin/vscode | acm/传媒大学/ii.cpp | #include <bits/stdc++.h>
#define L using
#define S namespace
#define Y std
#define endl '\n'
#define int long long
#define lowbit(x) (x & (-x))
const int N = 1e6 + 10;
// const int INF = 0x3f3f3f3f;
const int mod = 1e9 + 7;
// const int mod = 998244353;
// L S Y;
// int xx[] = {-1, 0, 1, 0}, yy[] = {0, 1, 0, -1}; // (-... | ALGO | 0.999882 | 5.096679 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-07-02T00:53: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": "9828251ec3e0... |
ee632672-7ad2-4465-a265-c16443f577c4 | Balramsah108/Netflix_clone | test.cpp | #include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <utility>
using namespace std;
int max_item_size(int n, int m, const vector<vector<int>>& shops, int k) {
/**
* Calculate the maximum size Geek can achieve for all items within the given budget.
*
* Parameters:
... | ALGO | 0.999741 | 5.723313 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-07-08T13:46: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": "0aea8f3a12d7... |
712fd574-444e-4c11-8392-900e979116f9 | rishisankar/icpc | codeforces/888/G.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define pb push_back
#define F first
#define S second
#define mp make_pair
#define INP(v, n) for (int i=0; i<n; ++i) { cin >> v[i]; }
#define ceil(x) (ll)ceil(x... | ALGO | 0.999958 | 4.630394 | {
"github_metadata": {
"branch": "main",
"commit_count": 324,
"repo_created_at": "2021-01-08T15:36:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "18e4c7d6ec... |
114e6e9e-ae8a-4343-b018-3bdbc7c25b0b | sherbondy/assignment1 | surf.cpp | #include "surf.h"
#include "extra.h"
using namespace std;
namespace
{
// We're only implenting swept surfaces where the profile curve is
// flat on the xy-plane. This is a check function.
static bool checkFlat(const Curve &profile)
{
for (unsigned i=0; i<profile.size(); i++) {
... | TOOL | 0.911686 | 5.221308 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2012-09-21T20:48:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cf0e9ce7f... |
cae795dc-8db9-4b5f-a832-6daf3c3ff0fc | smoky96/LeetCode | 0001.two-sum.cpp | #include <iostream>
#include<map>
#include<vector>
using namespace std;
class Solution {
public:
vector<int> twoSum(vector<int>& nums, int target) {
vector<int> result;
map<int, int> hash;
for (int i = 0; i < nums.size(); i++) {
int newTarget = target - nums[i];
if (... | ALGO | 0.999801 | 5.671389 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2020-02-29T03:07:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4699f7b9d... |
e483e0b3-2588-444f-b673-6e8d72530719 | GGapa/vscode | program/old program/2024/02/20240204/Shortest Routes I.cpp | #include <bits/stdc++.h>
#define rep(i, a, b) for(int i = (a), stOwxc = (b); i <= stOwxc; i++)
#define per(i, a, b) for(int i = (a), stOwxc = (b); i >= stOwxc; i--)
using namespace std;
typedef long long ll;
#define int long long
typedef pair<int, int> pii;
const int N = 1e5 + 5;
int n, m, s = 1;
vector<pii> G[N];
ll... | ALGO | 0.999974 | 4.400224 | {
"github_metadata": {
"branch": "main",
"commit_count": 191,
"repo_created_at": "2023-11-17T05:37: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": "1199c7de1a... |
bca9cc48-1d73-4dcb-ba85-419baf1bb6ab | heyuhhh/ACM | oj/codeforces/gym/2020 ICPC Universidad Nacional de Colombia Programming Contest/F.cpp | // Author : heyuhhh
// Created Time : 2021/03/06 14:29:43
#include<bits/stdc++.h>
#define MP make_pair
#define fi first
#define se second
#define pb push_back
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define INF 0x3f3f3f3f
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;... | ALGO | 0.999956 | 3.48419 | {
"github_metadata": {
"branch": "master",
"commit_count": 693,
"repo_created_at": "2019-11-25T06:31:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2339f464... |
c09125ea-1fe3-451b-a452-f4be6032ed5a | ethz-adrl/towr | towr_ros/src/towr_ros_app.cc | /******************************************************************************
Copyright (c) 2018, <NAME>. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain t... | ALGO | 0.930516 | 6.536814 | {
"github_metadata": {
"branch": "master",
"commit_count": 1639,
"repo_created_at": "2018-01-14T13:53:05.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1004,
"forks": 245,
"issues": 23,
"pull_requests": 3
},
"file_meta": {
"content_id": "b4... |
35fb3cdf-a3e3-4439-b10c-d169b9cb7ef3 | LiLiParty/AtCoder_Archive | atcoder.jp/atc001/dfs_a/Main.cpp | #include <bits/stdc++.h>
using namespace std;
//移動ベクトル
const int dx[4] = {1 , 0, -1, 0};
const int dy[4] = {0 , 1, 0 , -1};
//入力
int H,W;
vector<string> field;
//seen配列、検出済み→true 未検出→false
bool seen[510][510];
void dfs(int h, int w){
seen[h][w] = true;
for(int dir=0; dir<4; dir++){
int nh = h + ... | ALGO | 0.999977 | 4.800038 | {
"github_metadata": {
"branch": "main",
"commit_count": 669,
"repo_created_at": "2021-09-14T07:16:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "74c203d798... |
c9942710-452b-4b83-85ce-6aeb7b58401a | anishsingh20/Programming-in-Cpp | Data Structures/Trees/Binary Trees/MirrorTreesOrNot.cpp | #include<iostream>
#include<queue>
using namespace std;
//PROGRAM TO CHECK IF 2 TREES ARE MIRROR OF EACH OTHER
struct BinaryTreeNode
{
int data;
BinaryTreeNode *left;
BinaryTreeNode *right;
};
//recursive program to find if 2 trees are Mirrors of each other or not
bool MirrorOrNot(struct BinaryTreeNode *root1,... | ALGO | 0.999982 | 5.248165 | {
"github_metadata": {
"branch": "master",
"commit_count": 1086,
"repo_created_at": "2017-12-04T18:42:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 44,
"forks": 12,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "9d50a... |
082a54d0-92c5-4d6b-b452-215aaac02b9b | metaflow/contests | codeforces/500/c.cc | #include<bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using ii = pair<int,int>;
using ll = long long;
using llu = unsigned long long;
const int INF = numeric_limits<int>::max();
int main() {
int n, m;
while (cin >> n >> m) {
vi w(n);
for (int i = 0; i < n; i++) cin >> w[i];
vi d(m);
... | ALGO | 0.999986 | 3.454525 | {
"github_metadata": {
"branch": "master",
"commit_count": 415,
"repo_created_at": "2014-05-12T04:59:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5f8589dd... |
36ad2c75-f3ad-428f-b82b-05193ffd7dec | shih-hao-tseng/UCP-Solver | single_threaded/sources/UCP_solver.cpp | /*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be use... | ALGO | 0.999564 | 4.574409 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2019-03-02T01:03: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": "92cda199ad... |
aba8281b-4dfb-421b-a865-9585df36f527 | vafrederico/unicamp | mc558/lab02/main.cpp | /*
Para toda estrada e para toda ferrovia de A <-> B, são adicionados ao grafo uma aresta A->B e uma aresta B->A com mesmo identificador.
Ao executarmos o relax durante a execução de dijsktra, de A -> B utilizando a aresta E, se o caminho utilizando E é pior, ele é ignorado.
Se ele for melhor, é utilizado. No caso em ... | ALGO | 0.998851 | 4.439858 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-05-20T21:08: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": "29902f80d0... |
660b116a-a9d8-45a1-b0be-d2e2ff3feed8 | gupta-manas6268/learning-C | geeks_for_geeks/GFG_DSA/04_Medium/0001_pr.cpp | // From this Question & Solve this strictly.
// From this Question & Solve this strictly.
// Wrong.
// Longest Common Substring
// https://www.geeksforgeeks.org/problems/longest-common-substring1452/1?page=1&category=Strings&difficulty=Medium&sortBy=submissions
//{ Driver Code Starts
#include<bits/stdc++.h>
u... | ALGO | 0.999941 | 5.147325 | {
"github_metadata": {
"branch": "main",
"commit_count": 569,
"repo_created_at": "2023-05-18T17:22:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "937a4517d4... |
5377f438-6910-41ac-85f4-bd9f79ddc43e | Brisimgr/StrukturyDanych-PAMSI | inc/quickSort.hh | #ifndef SORT_HH
#define SORT_HH
// Funkcja zamieniająca wartości dwóch elementów tablicy
void swap(int* a, int* b)
{
int temp = *a;
*a = *b;
*b = temp;
}
/* Funkcja pomocnicza do sortowania QuickSort.
* Parametry:
* arr - tablica do posortowania
* low - indeks początkowy (najniższy)
* high - indeks ko... | ALGO | 0.999838 | 5.442232 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2023-03-06T14:30: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": "c1a73271800... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.