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 |
|---|---|---|---|---|---|---|---|
fe466b45-fdb7-4e0a-bd26-64ecd6e28c5d | windoze/Argos | include/common/hash_function.h | //
// hash_function.h
// Argos
//
// Created by Windoze on 12-6-13.
// Copyright (c) 2012 <EMAIL>. All rights reserved.
//
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wsign-conversion"
#endif
#include <stdint.h>
#ifndef Argos_hash_function_h
#define Argos_hash... | ALGO | 0.905646 | 6.081148 | {
"github_metadata": {
"branch": "master",
"commit_count": 71,
"repo_created_at": "2012-07-29T14:13:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 41,
"forks": 21,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d11a5bf... |
cb1e3d62-6043-41dd-98fc-6a8fc5728541 | SenitCo/Data-Structure-and-Algorithm | 017_letterCombinations.cpp | /*@Description: Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent.
A mapping of digit to letters (just like on the telephone buttons) is given below.
Input:Digit string "23"
Output: ["ad", "ae", "af", "bd", "be", "bf", "cd", "ce", "cf"].... | ALGO | 0.999854 | 6.179701 | {
"github_metadata": {
"branch": "master",
"commit_count": 207,
"repo_created_at": "2017-11-27T02:35:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a4f13a78... |
5c5460b0-5dba-4602-85c4-862e4323dd95 | MedAzizTousli/Competitive-Programming-Solutions | Codeforces/!Junior Training Sheet/A/A_Lucky_Ticket.cpp | #include <bits/stdc++.h>
#define int long long
#define ll long long
#define FLASH ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end))) // rep(i, 1, 5) --> {1,2,3,4} ... | ALGO | 0.999847 | 4.12419 | {
"github_metadata": {
"branch": "master",
"commit_count": 505,
"repo_created_at": "2019-04-23T21:46:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f374ce8b... |
6aaa7d65-0117-437a-8f05-060fbdf62908 | MaybeNotASpy/CS799--Assignment-2 | Algorithms/chc.cpp | #include "chc.hpp"
std::vector<Individual> CHC::generate_initial_population()
{
std::vector<Individual> population;
population.reserve(population_size);
for (size_t i = 0; i < population_size; i++) {
auto individual = Individual(variable_size, number_of_variables, function);
population.empl... | ALGO | 0.999784 | 5.61898 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-09-27T17:56: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": "db19c38c51b6... |
d1ae4f5c-97fe-458b-8aae-bc708570a876 | wavedreamer0822/mpi | advanced/datatype/mpi_type_vector.cpp | #include<iostream>
#include"mpi.h"
using namespace std;
// int MPI_Type_vector(
// int count, // 块的数量
// int blocklength, // 每个块中所含元素的个数
// int stride, // 各块第一个元素之间相隔的元素数
// MPI_Datatype oldtype, // 旧数据类型
// MPI_Datatype *newtype // 新数据类型
// )
//允许复制的数据之间有空隙
in... | TOOL | 0.923604 | 3.710801 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2023-10-10T08:04:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c519f78e13... |
f56a9180-1d5b-470d-bb07-c06d935e7870 | HRF05/DMOJSolutions | coci06c2p5.cpp | #pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#include <iostream>
#include <queue>
#include <cmath>
#include <vector>
#include <set>
#include <unordered_set>
#include <list>
#include <string>
#include <stack>
#include <iomanip>
#include <fstream>
#... | ALGO | 0.999889 | 3.675315 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2022-08-10T03:36:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "792fa28dd30... |
04720c9c-6569-472b-9f4c-6eaed2dca50b | SujitKar1195/PracticeProblems | BinaryTree/8_MirrorOfTree.cpp | /*
Author: <NAME>
Date: 28/06/2023
Topic: Given an algo. for converting a tree to its mirror. Mirror of a tree is another tree with left and right children of all non-leaf nodes interchanged.
Time Complexity: O(n)
Space Complexity: O(n)
*/
/*
Discussion:
What is the mirror of a Binary tree?
... | ALGO | 0.999995 | 5.885433 | {
"github_metadata": {
"branch": "main",
"commit_count": 61,
"repo_created_at": "2022-11-23T13:57: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": "76fb428897d... |
bf456c8a-899a-4956-9a3d-d85bfa63a5a6 | Vivek01110/CPP-DSA-Vault | Queues/kqueues_in array.cpp | #include<iostream>
using namespace std;
class Nqueues{
int *arr;
int *front;
int *rear;
int *next;
int freespot;
Nqueues(int size ,int N){
arr = new int[size];
front = new int[N];
rear = new int[N];
next = new int[size];
for(int i=0;i<N; i++){
... | ALGO | 0.999757 | 3.635614 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2024-12-26T16:34: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": "766a929a7ac... |
573a422e-efdc-4c6d-bdd0-7dbfe7f4c324 | yycho0108/LearnOpenCV | 08_TunaCounter/Classifier/main.cpp | /**
* @file objectDetection2.cpp
* @author <NAME> ( based in the classic facedetect.cpp in samples/c )
* @brief A simplified version of facedetect.cpp, show how to load a cascade classifier and how to find objects (Face + eyes) in a video stream - Using LBP here
*/
#include <opencv2/core/core.hpp>
#include <opencv2... | ALGO | 0.939078 | 6.003232 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2016-03-17T03:25:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d46a8f182... |
61cb8570-3d8d-4d63-b258-373606d7d0dd | ss-shrishi2000/LeetCoding_All_Around | Find_Eventual_Safe_States.cpp | PROBLEM STATMENT :- There is a directed graph of n nodes with each node labeled from 0 to n - 1. The graph is represented by a 0-indexed
2D integer array graph where graph[i] is an integer array of nodes adjacent to node i, meaning there is an edge from node i to each node in graph[i].
A node is a terminal node if the... | ALGO | 0.999994 | 6.46766 | {
"github_metadata": {
"branch": "main",
"commit_count": 121,
"repo_created_at": "2021-10-02T07:26:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f057f19b11... |
0b6b550a-422b-479d-a3de-f67bb595e9b8 | Jihunn-Kim/Coding-Test-Practice | BAEKJOON/17837.cpp | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <queue>
#include <stack>
#include <cmath>
#include <list>
#include <cstring>
#include <set>
#include <unordered_set>
#include <climits>
#include <unordered_map>
#include <map>
#include <iomanip>
using namespace std... | ALGO | 0.999809 | 3.850239 | {
"github_metadata": {
"branch": "master",
"commit_count": 111,
"repo_created_at": "2017-11-26T10:36:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "36f26f5b... |
c343b915-14b4-499e-ad3e-b980126a3440 | ishandutta2007/codeforces-k | kpw29/normal/1137/B.cpp | #include <bits/stdc++.h>
using namespace std;
#define e1 first
#define e2 second
#define pb push_back
#define mp make_pair
#define boost ios_base::sync_with_stdio(false)
#define eb emplace_back
#define OUT(x) {cout << x; exit(0); }
#define REYNA(i,a,b) for(int i=(a);i<(b);++i)
#define FOR(i,a,b) for(int i=(a);i<=(b);++... | ALGO | 0.999984 | 3.127364 | {
"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": "51eef5aa87fe... |
8644efd4-5867-4d40-842e-fdead4008ed3 | adityajamwal02/LeetcodeProblemSet2 | FindPairsWithGivenSumInDoublyLinkedList.cpp | /*
Given a sorted doubly linked list of positive distinct elements, the task is to find pairs in a doubly-linked list whose sum is equal to given value target.
Example 1:
Input:
1 <-> 2 <-> 4 <-> 5 <-> 6 <-> 8 <-> 9
target = 7
Output: (1, 6), (2,5)
Explanation: We can see that there are two pairs
(1, 6) and (2,5) with... | ALGO | 0.999984 | 5.950732 | {
"github_metadata": {
"branch": "main",
"commit_count": 335,
"repo_created_at": "2023-05-07T06:18: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": "f42181bc4f... |
ef04dca8-00dd-4aa6-9833-ba4dfd6b3372 | Kkackit02/SICT_GIT_SAVE | Baekjoon/13335.cpp | #include<iostream>
using namespace std;
class Truck
{
private:
int mass; // 트럭 무게
int location; // 트럭 위치
bool isPass = false; //
public:
void SetData(int input_mass, int input_location)
{
mass = input_mass;
location = input_location;
}
int ReturnMass() const
{
... | ALGO | 0.999953 | 3.912896 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2021-06-09T14:06: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": "29304a21811... |
018d010a-8351-4fc4-a056-4428227b8589 | TommyGong08/BIT-CS-Code | Data_Image_Process/腐蚀和膨胀/Dilation.cpp | #include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
int main()
{
int height , width = 0;
int height_B,width_B = 0;
//输入图像的长宽
cin >> height >> width;
//输入结构化元素的长宽(只可能为奇数)
cin >> height_B >> width_B;
int src[100][100] = {0};
int temp_src[100][100] = {0};
for(int... | ALGO | 0.998343 | 3.030583 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2021-01-04T11:32: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": "3db2f3a3b... |
cddb665a-c56c-430b-8e4b-0d870e2f1841 | palilo815/ps | baekjoon/21000/21142.cpp | #include <bits/stdc++.h>
using namespace std;
namespace std {
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0200r0.html
template <class Fun>
class y_combinator_result {
Fun fun_;
public:
template <class T>
explicit y_combinator_result(T&& fun) : fun_(std::forward<T>(fun)) {}
template <c... | ALGO | 0.999983 | 4.547647 | {
"github_metadata": {
"branch": "master",
"commit_count": 6725,
"repo_created_at": "2020-01-12T04:58:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "20d26d6... |
91b6af4a-d697-4bed-9e2a-6e9a893f00a1 | Ajajahmad/DSA-problem-solving | 91-decode-ways/91-decode-ways.cpp | class Solution {
public:
int numDecodings(string s) {
int n = s.length();
vector<int> dp(n+1, -1);
if(s[0]=='0') return 0;
return solve(s , n ,dp);
}
int solve(string s , int n, vector<int>& dp )
{
if(n==0)
{
return 1;
... | ALGO | 0.999695 | 5.083159 | {
"github_metadata": {
"branch": "main",
"commit_count": 1152,
"repo_created_at": "2022-03-27T12:37:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4bb950a2e... |
c93418d2-9dd7-48d3-8eb0-3987ad9de5d1 | logicallaw/codetree-TILs | 240729/가장 가까운 점/nearest-point.cpp | #include <iostream>
#include <queue>
#include <vector>
#include <tuple>
using namespace std;
int main(void) {
int n, m;
cin >> n >> m;
priority_queue<tuple<int, int, int>, vector<tuple<int, int, int>>, greater<tuple<int, int, int>>> pq;
for(int i{ 0 }; i < n; i++) {
int x, y;
cin >> x >>... | ALGO | 0.99997 | 3.397101 | {
"github_metadata": {
"branch": "main",
"commit_count": 425,
"repo_created_at": "2024-04-30T01: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": "e5780dca82... |
f51a0565-cb19-4ebf-9a40-2f5f4a1c10ce | asraf-patoary/Coding_problems | math/hackerEarth/OddNumbersOfDivisors.cpp | #include <bits/stdc++.h>
using namespace std;
#define IOS ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define endl '\n'
#define MOD 1000000007LL
#define F first
#define S second
#define U unsigned
#define LL long long
#define ULL unsigned long long
#define LD long double
#define MAX(a,b) ((a)>(b)?(a):(b))... | ALGO | 0.999643 | 3.468999 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2019-06-29T06:43: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": "b4c0954fe2... |
7181deee-0ffa-447e-9284-25229a6f9932 | bhanu-pappala/CP | datastructures/fenwick.cpp | #include<bits/stdc++.h>
using namespace std;
struct fenwick {
vector<int> fn;
int n;
void init(int n) {
this->n = n + 1;
fn.resize(this->n, 0) ;
}
void add(int x, int y) {
x++;
while(x < n) {
fn[x] += y;
x += (x & (-x));
}
}
... | ALGO | 0.999885 | 5.047223 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2021-07-31T13:49:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d667aae99a6... |
d14fbbb5-3182-4339-9aa5-9d45a7349331 | rereyang/kattis | bruteforce/10kindsofpeople.cpp | #include <iostream>
#include <vector>
#include <string>
using namespace std;
void dfs(vector<vector<int>>& board, int i, int j, int iden, vector<vector<int>>& ident, int marker) {
if (i < 0 || j < 0 || i > board.size() - 1 || j > board[0].size() - 1 || ident[i][j] != -1 || board[i][j] != marker)
return;
... | ALGO | 0.999717 | 5.003366 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2020-04-08T04:36: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": "3ff92c4799... |
6929865f-2bec-4a8c-9da5-4fc6a5124550 | franfill1/cses.fi-solutions | src/Graph Algorithms/1192-Counting Rooms.cpp | /*
Task: 1192 Counting Rooms
Sender: franfill
Submission time: 2021-02-26 22:09:11
Language: C++11
Result: ACCEPTED
*/
#include <bits/stdc++.h>
using namespace std;
int main()
{
int N, M;
cin >> N >> M;
vector < string > m(N);
for (int i = 0; i < N; i++)
{
cin >> m... | ALGO | 0.999781 | 4.151658 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2021-07-01T10:41:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b50d88e42... |
81829a75-4e42-482a-a02b-1359febd14cc | nillerusr/source-engine | engine/debug_leafvis.cpp | //========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//===========================================================================//
#include "render_pch.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
// Leaf vi... | ALGO | 0.980748 | 5.083827 | {
"github_metadata": {
"branch": "master",
"commit_count": 551,
"repo_created_at": "2020-10-22T15:16:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1850,
"forks": 286,
"issues": 89,
"pull_requests": 19
},
"file_meta": {
"content_id": "3... |
849a3343-86ce-4a50-a971-2b2153955e07 | Iamthankyou/Codeforces | codeforces/1450/C1.cpp | #include <bits/stdc++.h>
using namespace std;
#define send {ios_base::sync_with_stdio(false);}
#define help {cin.tie(NULL); cout.tie(NULL);}
#define f first
#define s second
#define getunique(v) {sort(v.begin(), v.end()); v.erase(unique(v.begin(), v.end()), v.end());}
typedef long long ll;
typedef long double lld;
typ... | ALGO | 0.999971 | 4.937458 | {
"github_metadata": {
"branch": "main",
"commit_count": 55,
"repo_created_at": "2020-12-07T04:18: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": "681d387c8b0... |
62a058b6-3fe2-482b-9922-f2ab7dca6bb2 | yudhik11/google_kickstart | 2019/f/teach_me.cpp | #include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
using namespace __gnu_pbds;
#define lsc(x) scanf("%lld",&x)
#define sc(x) scanf("%d",&x)
#define lpr(x) printf("%lld "... | ALGO | 0.999579 | 3.387923 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2020-08-19T06:39: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": "fc5cc52b5... |
0c67a6e7-5981-408b-845c-eeba6c83d4aa | tanishqg0511/Data-structures-using-C | priority queue.cpp | #include <stdio.h>
#include <stdlib.h>
#define MAX 10
void insert_by_priority();
void delete_by_priority(int);
void create();
void check(int);
void display_pqueue();
int pri_que[MAX];
int front, rear;
int main()
{
printf("TANISHQGUPTA");
int n, ch;
printf("\n1)Insert an element into queue");
printf("\n... | ALGO | 0.999858 | 3.821069 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2021-10-15T07:28:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "10decb3bb55... |
fa690173-6250-424d-8196-765a17a3822f | arpg/kf_bayesopt | include/system_models.hpp | #ifndef __SYSTEM_MODELS_HPP__
#define __SYSTEM_MODELS_HPP__
#include <cmath>
#include <vector>
#include "eigenmvn.h"
#include "continuous2discrete.hpp"
#include "read_para_vehicle.h"
#include <chrono>
#define N 2
#define Me 1 //1 before
typedef Eigen::Matrix<double, N, 1> State;
typedef Eigen::Matrix<double, N, N> S... | ALGO | 0.94827 | 6.20585 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2018-02-09T21:58:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 20,
"forks": 7,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "a0f748f59... |
42a5d220-8f09-4647-98bb-2148def80eb6 | wangqifei/leetcode | 26_RemoveDuplicatesfromSortedArray.cpp | // 26 Remove Duplicates from Sorted Array Total Accepted: 60785 Total Submissions: 193003 My Submissions Question Solution
// Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
// Do not allocate extra space for another array, you must do this in pl... | ALGO | 0.999963 | 5.659828 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2015-07-03T18:53: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": "68137e0d4e... |
e7e3eabc-663c-494e-b6f0-1e2c85fcc5a2 | Ben-Remez/DoubleSidedBFS | vs2017test/main.cpp | #include "glut.h"
#include "Cell.h"
#include <time.h>
#include <vector>
#include <iostream>
using namespace std;
const int W = 600;
const int H = 600;
const int WALL = 1;
const int SPACE = 0;
const int START = 2;
const int TARGET = 3;
const int EMARKED = 4; // Cells marked (visited) by target BFS.
const int SMARKED = ... | ALGO | 0.999873 | 4.582853 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2021-05-04T18:01: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": "56ecdeb3eb... |
821dbf6a-db39-4328-b0dd-c90c0dda7dac | kjhyun824/BaekJoon | prisonBreak/prisonBreak.cpp | /*
* =====================================================================================
*
* Filename: prisonBreak.cpp
*
* Description: Break the prison with minimum number of opening door
*
* Version: 1.0
* Created: 02/04/19 17:12:39
* Revision: none
* Compiler: gcc... | ALGO | 0.99986 | 4.473186 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2019-01-16T07:24: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": "9574590eb2e... |
eaf8b2f3-9cb3-42b2-a6df-4f3a6e83d490 | Joaohnt27/Sistemas-Operacionais | roundrobin.cpp | #include <iostream>
using namespace std;
// Definindo constantes
const int MAX_PROCESSOS = 10;
const int QUANTUM = 2;
// Definindo estrutura para representar um processo
struct Processo {
int id; // Identificador do processo
int tempo_execucao; // Tempo de execução restante do processo
int tempo_chegada; ... | ALGO | 0.999979 | 6.188229 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-03-19T18:54:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1843e10dd782... |
438330b5-eec6-4355-a5c2-e99e3c7e18aa | tooy0202/Engce117 | 06 DoubleLinklist/011.cpp | #include <stdio.h>
#include <string.h>
struct studentNode {
char name[ 20 ] ;
int age ;
char sex ;
float gpa ;
struct studentNode *next ;
struct studentNode *back ;
} ;
//-----------------------------------------------------------------------------------------------------------------------------
void ShowAll... | TOOL | 0.930194 | 3.533544 | {
"github_metadata": {
"branch": "Peactge1",
"commit_count": 29,
"repo_created_at": "2022-11-16T10:37:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "42148ec... |
d0584f2a-38c1-4a51-bcad-4f0b9bf1f3d0 | Karelito00/problems | COJ/3849.cpp | #include <bits/stdc++.h>
using namespace std;
int const MAXn = 1e7 + 2, MAXp = 7e5;
bool criba[MAXn];
int primos[MAXp];
int table[MAXn][10];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n = 0;
for(int i = 2; i * i <= MAXn - 2; i++){
for(int j = i * i; j <= MAXn ... | ALGO | 0.9999 | 4.444767 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2021-10-29T03:11:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "29c44e4cbd... |
28f3fc24-8dd6-4d73-8d0f-5b6efbe5614a | thiago9864/estrutura_de_dados1 | Laboratorio_ED2/Aula02/main.cpp | #include <iostream>
using namespace std;
/**
Exercicio 1
*/
/*
int main()
{
int *pt;
cout << "Endereco de pt: " << &pt << endl;
//Crie uma variavel inteira ́ x.
int x;
//Leia um valor para x.
cout << "Digite um valor: ";
cin >> x;
//Faça com que pt aponte para x.
pt = &x;
... | ALGO | 0.990792 | 3.334168 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-09-23T23:47: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": "a1b9df53de... |
0bffd3b8-aeb3-457e-a534-f39505d44eb0 | Orion545/OI-Record | Grade 10-12/2018 autumn/NOIP/NOIP2018提高组Day1程序包/GD-Senior/answers/GD-0352/road/road.cpp | #include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
typedef long long ll;
using namespace std;
int d[100010];
ll dfs(int l, int r, int min)
{
int lmin = 100000;
int rmin = 100000;
ll cnt1 = min;
int i;
if (l > r)
return 0;
if (l == r)
return min;
for (i = l;i <... | ALGO | 0.999943 | 3.36912 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-05-26T05:47:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "1468c0aa19... |
03d9d32d-f0e4-4079-80cd-daa5936fa758 | GENIE-MC/Generator | src/Framework/Utils/PhysUtils.cxx | //____________________________________________________________________________
/*
Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org
<NAME> <c.andreopoulos \at cern.ch>
University of Liverpool
*/
//_________________________________________________... | ALGO | 0.99377 | 3.755872 | {
"github_metadata": {
"branch": "master",
"commit_count": 7950,
"repo_created_at": "2018-09-25T13:46:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 53,
"forks": 100,
"issues": 51,
"pull_requests": 22
},
"file_meta": {
"content_id": "83a... |
40c74ad5-6883-4f46-8f1e-4840f42877b8 | serafernandez/metodosNumericos | EjerciciosResueltos/parcial/ej2/newtonRaphson.cpp | #include <iostream>
#include <math.h>
using namespace std;
double h = 0.01;
double f(double x){
return 3 * x + sin(x) - exp(x);
}
double fprima(double x){
return (f(x + h) - f(x - h)) / (2 * h);
}
double g(double x){
return x - ( f(x) / fprima(x) );
}
int main(){
double valorInicial, e;
cout ... | ALGO | 0.999956 | 3.591212 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2015-08-18T16:18: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": "bd7d78f88... |
d3c373cd-dfbd-478b-9d84-37adcb4763c9 | toshiya1015programmer/compro | src/atcoder/abc225/d.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, q;
cin >> n >> q;
vector<int> pr(n, -1), ne(n, -1);
for (int qi = 0; qi < q; qi++) {
int k;
cin >> k;
if (k == 1) {
int u, v;
cin >> u >> v;
u--, v--;
ne[u] = v;
pr[v] = u;
} else if (k == 2) {
... | ALGO | 0.999752 | 4.132194 | {
"github_metadata": {
"branch": "main",
"commit_count": 112,
"repo_created_at": "2021-11-03T20:29:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "31201ab2ee... |
c430c8da-5633-439c-8600-fa3a565d92da | AyoubOd/ticTacToe | tictac.cpp | #include <iostream>
#include <vector>
using namespace std;
char matrix[3][3] = {{'1', '2', '3'}, {'4', '5', '6'}, {'7', '8', '9'}};
int a;
char player = 'X';
bool gameOver = false;
vector<char> previous_a(1, 0);
void Draw()
{
cout << "welcome to Tic Tac Toe Game" << endl;
for (int i = 0; i < 3; i++)
{
... | ALGO | 0.998756 | 4.502872 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-08-19T14:52:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "881d99da0f29... |
4628711c-9f15-4734-ac57-fade339ecefa | Shiyu-Xing/RegHEC | limbo-release-2.1/src/limbo/experimental/acqui/ucb_imgpo.hpp | //| Copyright Inria May 2015
//| This project has received funding from the European Research Council (ERC) under
//| the European Union's Horizon 2020 research and innovation programme (grant
//| agreement No 637972) - see http://www.resibots.eu
//|
//| Contributor(s):
//| - <NAME> (<EMAIL>)
//| - <NAME> (<EMAIL>)... | ALGO | 0.975971 | 6.990807 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2023-04-02T05:43:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 17,
"forks": 2,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "c740fcfe... |
c008befa-2f35-4e89-966f-347d31690f95 | kimh060612/KimALGO | Desktop/AlgorithmPS/2176.cpp | #include <iostream>
#include <queue>
#include <vector>
#include <string.h>
using namespace std;
using iip = pair<int, int>;
vector<iip> T[1001];
int DP[1001], dist[1001], check[1001];
int N, M;
void minDistance() {
priority_queue<iip> pq;
pq.push({ 0, 2 });
dist[2] = 0;
while (!pq.empty()) {
... | ALGO | 0.999958 | 4.309109 | {
"github_metadata": {
"branch": "main",
"commit_count": 750,
"repo_created_at": "2020-12-21T02:25: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": "967b2584ae... |
d5a604a8-6896-4e5b-a328-7463d3c93a7c | kassonlab/gmxapi | src/gromacs/topology/idef.h | /*
* This file is part of the GROMACS molecular simulation package.
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
* Copyright (c) 2013,2014,2015,2016,2018 by the GROMACS development team.
* Copyright (c) 2019,2020, by the GROMACS de... | TOOL | 0.953256 | 5.934999 | {
"github_metadata": {
"branch": "master",
"commit_count": 19315,
"repo_created_at": "2017-05-25T14:05:14.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 53,
"forks": 13,
"issues": 93,
"pull_requests": 2
},
"file_meta": {
"content_id": "eda8... |
9b94fa44-0463-4156-aebc-05cf14b9a5ce | nykoh2001/Algorithm | cpp/algo/assignment/7주차/q1.cpp | #include <iostream>
#define infoNIL 0
#define itemMIN -1
#define black 0
#define red 1
using namespace std;
using itemType = int;
using infoType = double;
void insert(itemType k, infoType info, int *cmp_rb);
void split(itemType k, int *cmp_rb);
struct node *rotate(itemType k, struct node *y);
void sort(itemType **... | ALGO | 0.999629 | 4.094981 | {
"github_metadata": {
"branch": "main",
"commit_count": 115,
"repo_created_at": "2023-03-08T13: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": "2f6a0041c6... |
4946a989-2d42-4162-bf86-10333ed5ba1a | nayuki/Nayuki-web-published-code | binary-array-set/BinaryArraySet.hpp | /*
* Binary array set (C++)
*
* Copyright (c) 2024 Project Nayuki. (MIT License)
* https://www.nayuki.io/page/binary-array-set
*
* 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 wit... | ALGO | 0.996844 | 7.349809 | {
"github_metadata": {
"branch": "master",
"commit_count": 1350,
"repo_created_at": "2014-10-24T20:33:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 147,
"forks": 50,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "87d1... |
139bfd58-e198-4573-99d3-f03b7dfad6a9 | yash-gargji/codeforces-solution | D_Eating.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
int q;
cin>>q;
int arr[n];
vector<vector<int>>b(n,vector<int>(30,-1));
vector<int>suff(n+1);
for(int i = 0;i<n;i++){
cin>>arr[i... | ALGO | 0.999942 | 4.428914 | {
"github_metadata": {
"branch": "main",
"commit_count": 90,
"repo_created_at": "2023-05-22T20:06:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f3131cc3e71... |
ae8dfbaa-b007-4f59-a106-683bd994a5ef | ftarlaci/LeetCode | balancedBinaryTree.cc | /** Given a binary tree, determine if it is height-balanced.
For this problem, a height-balanced binary tree is defined as:
a binary tree in which the depth of the two subtrees of every node never differ by more than 1.
Example 1:
Given the following tree [3,9,20,null,null,15,7]:
3
/ \
9 20
/ \
1... | ALGO | 0.999868 | 6.470503 | {
"github_metadata": {
"branch": "master",
"commit_count": 171,
"repo_created_at": "2018-07-19T20:50: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": "d9f1624a... |
8f7ffce0-b73e-4282-a82a-58ebd73fd5dc | justbegginer/SinglyOrderedList | SinglyOrderedList.h | //
// Created by user.v2.0 on 18.02.2021.
//
#pragma once
#ifndef SINGLYORDEREDLIST_SINGLYORDEREDLIST_H
#define SINGLYORDEREDLIST_SINGLYORDEREDLIST_H
#include <ostream>
class SinglyOrderedList {
private:
// Тип Node используется для описания элемента списка, связанного со
// следующим с помощью поля next_
int c... | TOOL | 0.907274 | 4.773089 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-01-15T19:27:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f3cf0b887... |
0d9707cd-e0e6-442a-9a7c-5c2f06170997 | stephenchenxj/myLeetCode | cpp/15. 3Sum.cpp | //
// 15. 3Sum.cpp
// leetcode
//
// Created by <NAME> on 6/1/20.
// Copyright © 2020 <NAME>. All rights reserved.
//
/*
15. 3Sum
Medium
6543
785
Add to List
Share
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which g... | ALGO | 0.99967 | 6.006584 | {
"github_metadata": {
"branch": "master",
"commit_count": 213,
"repo_created_at": "2019-01-14T04:21:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b0c614f5... |
cc77e2cc-4238-4777-99df-d2701a96964b | VChristinne/100-Days-Cpp | Practice/day_004-guessing-game.cpp | #include <iostream>
#include <cstdlib>
#include <random>
using std::cout, std::cin, std::endl;
void begin() {
cout << "\n* Guessing Game *"
"\nTry to guess the secret number\n" << endl;
}
void play() {
int level;
int chances;
int rounds;
int score = 1000;
std::random_device rd;
... | TOOL | 0.932835 | 3.275364 | {
"github_metadata": {
"branch": "main",
"commit_count": 103,
"repo_created_at": "2024-02-25T10:41: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": "8e5fb7b2f7... |
e1b04ae2-3801-4275-8c10-ddff818ce01e | manykits/PHOENIXEngine | PHOENIX/PX2Engine/Mathematics/PX2InterpCurve.inl | // PX2InterpCurve.inl
//----------------------------------------------------------------------------
static std::string gsInterpCurveModeString[ICM_MAX_MODE] =
{
"ICM_LINEAR",
"ICM_CONSTANT",
"ICM_CURVE_AUTO",
"ICM_CURVE_AUTOCLAMPED",
"ICM_CURVE_USER",
"ICM_CURVE_BREAK"
};
//-------------------------------------... | ALGO | 0.980553 | 6.497593 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-04-14T04:12:57.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 72,
"forks": 23,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "490d8335d... |
b776c479-8b46-431e-86c7-85e03fd1eef9 | cs106l/cs106l-assignments | assignment4/utils.cpp | #include <algorithm>
#include <string>
#include <tuple>
bool operator<(const Token& a, const Token& b) {
return std::tie(a.src_offset, a.content) < std::tie(b.src_offset, b.content);
}
bool operator<(const Misspelling& a, const Misspelling& b) { return a.token < b.token; }
template <typename Iterator, typename Una... | ALGO | 0.906672 | 5.622453 | {
"github_metadata": {
"branch": "main",
"commit_count": 102,
"repo_created_at": "2024-09-30T01:54:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 76,
"forks": 98,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "1641ed6c1... |
69a115bf-f867-4e41-a6ff-4c47e6004b82 | maheshbhire/Students_predictionCpp | knn.hpp | #ifndef KNN_HPP
#define KNN_HPP
#include <vector>
#include <cmath>
#include <algorithm>
#include <map>
using namespace std;
class KNN {
int k;
vector<vector<double>> X_train;
vector<int> y_train;
public:
KNN(int neighbors = 3) : k(neighbors) {}
void fit(const vector<vector<double>>& X, const ve... | ALGO | 0.99897 | 6.417788 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-05-24T19:46: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": "fbe27a8cb394... |
1d4acaa8-6433-4084-87c0-e615b3960237 | chef/dep-selector-libgecode | ext/libgecode3/vendor/gecode-3.7.3/gecode/search/worker.hh | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* <NAME> <<EMAIL>>
*
* Copyright:
* <NAME>, 2004
*
* Last modified:
* $Date: 2009-08-26 23:58:07 +1000 (Wed, 26 Aug 2009) $ by $Author: schulte $
* $Revision: 9628 $
*
* This file is part of Gecode, the g... | TOOL | 0.918438 | 7.229086 | {
"github_metadata": {
"branch": "main",
"commit_count": 94,
"repo_created_at": "2014-04-07T05:23:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11,
"forks": 25,
"issues": 7,
"pull_requests": 2
},
"file_meta": {
"content_id": "80bfda81d4... |
3a5909dc-0af1-49d8-86ab-514bfef38321 | xiangzebo/Polyanya | other/jump_point_graphs/source/ReachabilityRelation/Grid2D/Grid2DClearanceManager.h | /*
* Grid3DCardinalClearanceManager.h
*
* Created on: Oct 9, 2016
* Author: idm-lab
*/
#ifndef APPS_SUBGOALGRAPH3DGRID_GRID3DCLEARANCEMANAGER_H_
#define APPS_SUBGOALGRAPH3DGRID_GRID3DCLEARANCEMANAGER_H_
#include "Grid2DGraph.h"
#include "CPUTimer.h"
#include <iostream>
// For each cell, stores the distan... | ALGO | 0.958778 | 6.739944 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-03-17T09:24:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5c444d0424c... |
3ec40c55-1f3d-4c8e-b734-6bf10af55eba | wiwitrifai/competitive-programming | katties/UIT16/c.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 6e5 + 5;
int a[N<<2], b[N], n;
void build(int id = 1, int l = 0, int r = n) {
a[id] = 0;
if(r-l < 2)
return ;
int mid = (l + r) >> 1, il = id<<1, ir = il|1;
build(il, l, mid);
build(ir, mid, r);
}
int get(int val, int id = 1, int l = 0, int ... | ALGO | 0.99988 | 3.611186 | {
"github_metadata": {
"branch": "master",
"commit_count": 628,
"repo_created_at": "2016-05-21T12:11:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 37,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aa7fe5f... |
dd33f4b0-3ce4-4026-b9f7-b2a6dd74dd10 | iloginov/programming-workout | edx-course/week 1/problem 6/solution.cxx | #ifdef JUDGE
# include <fstream>
std::ifstream cin("input.txt");
std::ofstream cout("output.txt");
#else
# include <iostream>
using std::cin;
using std::cout;
#endif
#include <map>
#include <utility>
#include <string>
#include <limits>
using namespace std;
int main() {
int w, h;
cin >> w >>... | ALGO | 0.998427 | 3.663243 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2015-10-06T20:34: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": "cce169068... |
23727c0f-719f-4837-9147-b052f42a7124 | STRIDES-Codes/MicrobeTaxaSARS2 | src/metaspades/src/common/modules/simplification/superbubble_finder.hpp | //***************************************************************************
//* Copyright (c) 2019 Saint Petersburg State University
//* All Rights Reserved
//* See file LICENSE for details.
//***************************************************************************
#pragma once
#include "sequence/range.hpp"
#inc... | ALGO | 0.999042 | 5.555219 | {
"github_metadata": {
"branch": "main",
"commit_count": 56,
"repo_created_at": "2021-05-28T16:52:17.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "d06cfe4590fc... |
b6b6dd29-c9d0-4fd7-a2f3-fb60c7afd98f | RayyanUrRehman/DataStructures-FAST | lab8/q3.cpp | #include <iostream>
using namespace std;
class node {
public:
int data;
node* right;
node* left;
node(int d) {
data = d;
right = NULL;
left = NULL;
}
};
void print(node* root) {
if (root == NULL) {
return;
}
print(root->left);
cout << root->data << ... | ALGO | 0.999987 | 5.725367 | {
"github_metadata": {
"branch": "main",
"commit_count": 153,
"repo_created_at": "2024-09-01T16:43: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": "9ff7357f6d... |
a463d7d9-4b1c-4c49-ac88-4eee74fe99e7 | stoimilovh/Structured-Programming | Прв колоквиум/ЦикЦак број/main.cpp | //Цик-цак е број за кој што важи дека за секој пар соседни цифри, тие се наизменично поголеми односно
//помали една во однос на друга. На пример, ако бројот x е составен од цифрите a, b, c, d и е, тогаш за нив важи:
//
//a>b, b<c, c>d, d<e или a<b, b>c, c<d, d>e
//
//Пр. 343, 4624, 6231209
//Од тастатура се читаат непо... | ALGO | 0.999953 | 4.11346 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-05-27T19:48: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": "13174eafa7... |
d0d30c92-5bc3-4452-9bb1-bfa02f671d52 | Anirudhpolawar/Data-Structure-And-Algorithms | Graph/Paths/1_bfs/bfs.cpp | #include <iostream>
#include <vector>
#include <queue>
#include<climits>
using std::vector;
using std::queue;
int distance(vector<vector<int> > &adj, int s, int t) {
//write your code here
queue<int> que;
que.push(s);
vector<int> dis(adj.size(),INT_MAX);
dis[s] = 0;
que.push(s);
while(!que.empty())
{
... | ALGO | 0.999984 | 4.044622 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-05-28T05:39: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": "a5bb53edef... |
cc98d2cc-b4cc-489b-9c87-0fce9471f6b7 | nurayomirzak/MPI | nuraympi.cpp | #include <iostream>
#include <vector>
#include <random>
#include <chrono>
#include <fstream>
#include <iomanip>
#include <mpi.h>
const int AES_BLOCK_SIZE = 16; // Размер блока AES (16 байт)
// Умножение в поле Галуа
uint8_t gmul(uint8_t a, uint8_t b) {
uint8_t p = 0;
while (b) {
if (b & 1) p ^= a;
... | ALGO | 0.999658 | 5.701344 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-12-03T14:02:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5253628d08a5... |
55a8dc9b-1ae0-40fb-91e6-e8eb9df20976 | AdmiJW/CPP | LeetCode/Interleaving String.cpp | #include <string>
#include <vector>
using namespace std;
//https://leetcode.com/problems/interleaving-string/
/*
* This is a Dynamic Programming problem. I took a peek at the solution
*
* For brute force, we would generate all possible interweaved strings and check if it matches s3. The way we do this
* is thro... | ALGO | 0.999154 | 6.102703 | {
"github_metadata": {
"branch": "master",
"commit_count": 513,
"repo_created_at": "2020-09-22T14:44:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ffb22684... |
339ab7d4-50ea-4ba8-ae66-fdb3bf893157 | ABKGroup/TritonPart | OpenROAD/src/mpl/src/Partition.cpp | ///////////////////////////////////////////////////////////////////////////////
// BSD 3-Clause License
//
// Copyright (c) 2019-2020, The Regents of the University of California
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that... | TOOL | 0.948409 | 5.346058 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2022-12-31T03:19:20.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 27,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "d5c2b256aef... |
f5ecac0d-6c9b-4235-8405-bb6e992d9f73 | gamer-project/gamer | src/Model_Hydro/MHD_BoundaryCondition_Outflow.cpp | #include "GAMER.h"
#if ( MODEL == HYDRO && defined MHD )
static void BC_Outflow_xm( real **Array, const int NVar, const int TVarIdxList[], const int GhostSize, const int ArraySizeX, const int ArraySizeY,
const int ArraySizeZ, const int Idx_Start[], const int Idx_End[] );
static void BC_O... | ALGO | 0.925704 | 3.496235 | {
"github_metadata": {
"branch": "main",
"commit_count": 7047,
"repo_created_at": "2017-12-13T20:44:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 86,
"forks": 70,
"issues": 99,
"pull_requests": 32
},
"file_meta": {
"content_id": "107264... |
bd6d7fdc-ccef-45d6-b1f1-59d672291301 | anindya028/Programming-Contest-Problems | regional/2721.cpp | //============================================================================
// Name : 2003A.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include<cst... | ALGO | 0.999886 | 3.480367 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2020-07-05T23:19:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "234a647291... |
c27b1ca2-0bed-4814-9e11-f3aa7d54ca7e | Arnab-Purkaystha/Coding | tcs1.cpp | #include <bits/stdc++.h>
using namespace std;
void merge_array(int arr1[], int num1, int arr2[], int num2);
int main(void)
{
int first_arr[30];
int second_arr[30];
int num1, num2;
cin>>num1;
cin>>num2;;
for (int i = 0; i < num1; i++)
{
cin>>first_arr[i];
}
for (int i =... | ALGO | 0.99996 | 3.349507 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2022-07-29T09:04: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": "065faf4550... |
886c5c7e-ccac-4a27-a104-3bdf04d46582 | af-orozcog/competitiveProgramming | atCoder/abc157_b.cpp | #include<bits/stdc++.h>
using namespace std;
int marked[3][3];
int nums[3][3];
void mark(int num){
for(int i = 0; i < 3;++i){
for(int j = 0; j < 3;++j)
marked[i][j] = (marked[i][j])| (nums[i][j] == num);
}
}
int main(){
for(int i = 0; i < 3;++i){
for(int j = 0; j < 3;++j)
... | ALGO | 0.99994 | 4.569112 | {
"github_metadata": {
"branch": "master",
"commit_count": 63,
"repo_created_at": "2019-08-19T16:21: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": "74073c629... |
92983ab7-6257-4428-8b83-5e318bb39e09 | samarth1301/hackDSA | kadens-algorithm.cpp | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int kadenesAlgorithm(vector<int> array){
int max_sum = array[0];
int util_sum = 0;
int max_val = *max_element(array.begin(), array.end());
for(auto val : array){
if(util_sum + val >= val){
util_sum += v... | ALGO | 0.999938 | 4.702051 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2022-10-08T19:36:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e71660d6054... |
1364824f-000a-4562-9eb8-fecfbd00ebc3 | asarria48/MSF | C1/bisection.cpp | #include <iostream>
#include <cmath>
using std::cout;
using std::endl;
using std::sin;
const double error = 1e-7; //precisión requerida
double f(double x){ //función a la que le voy a hallar los ceros
return sin(x)/x;
}
int main(){
double a = 2, b = 4, fa; //intervalo y función evaluada en a
d... | ALGO | 0.999821 | 4.517041 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2024-02-09T21:03: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": "6a9dd7dd3d3... |
59de90c4-433e-4c4d-b793-110219905a86 | DanBennettDev/max_cpg | source/projects/cpg.network_tilde/cpg.network_tilde.cpp | /// @file
/// @ingroup CPG
/// @author <NAME>
/// @license Usage of this file and its contents is governed by the MIT License
/*
TODO:
IMMEDIATE:
- Build help patch
- Rebuild & test neurythmic patch
- Compile for mac
- Frontend compile for mac
- Release neurythmic & externals
- Document engine & release
LONGER T... | TOOL | 0.964894 | 3.591994 | {
"github_metadata": {
"branch": "master",
"commit_count": 153,
"repo_created_at": "2018-03-04T15:14:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 17,
"forks": 1,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "80f3fe8... |
c880a57e-778d-4bc7-bfe0-be93f946c9fb | ADVRHumanoids/ComplianceRos | custom_controller/src/actuator_position_controller_classes.cpp | /*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, <NAME>, Inc.
* Copyright (c) 2012, hiDOF, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitte... | TOOL | 0.921557 | 5.658334 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2017-10-10T11:09:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc25abe4ac... |
5953f255-0460-4b3b-8eb4-93ff388f75fc | ravenxrz/MyLeetCode | 1.LeetCode/452.用最少数量的箭引爆气球.cpp | /*
* @lc app=leetcode.cn id=452 lang=cpp
*
* [452] 用最少数量的箭引爆气球
*/
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
// @lc code=start
class Solution
{
public:
int findMinArrowShots(vector<vector<int>> &points)
{
if (points.size() == 0)
return 0;
//... | ALGO | 0.999984 | 5.945237 | {
"github_metadata": {
"branch": "master",
"commit_count": 436,
"repo_created_at": "2020-09-06T02:42:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "93b7e3e0... |
b25b2cd1-1edb-4a7f-a0e0-692b52077082 | enhyq/MCNL-study | Week1/Trie/SimpleTrie.cpp | /*
* code copied for reference: from "알고리즘 문제 해결 전략"
*/
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
// 알파벳 대문자를 저장하는 경우 각 노드는 26개의 자손을 가질 수 있다.
const int ALPHABETS = 26;
int toNumber(char ch) { return ch - 'A'; }
struct TrieNode {
TrieNode* children[ALPHABETS];
bool ter... | ALGO | 0.999451 | 3.08244 | {
"github_metadata": {
"branch": "main",
"commit_count": 99,
"repo_created_at": "2022-06-30T09:11:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "adc72ae942b... |
93f44c64-fbeb-496b-8c82-3ef147b0ba8b | peterasplund/2D-game-engine | src/components/collidable.h | #pragma once
#include "../engine/logger.h"
#include "../engine/map.h"
#include "../engine/math.h"
#include "../entityManager.h"
#include "velocity.h"
struct CollisionAt {
int idx;
Tile tile;
};
// @TODO: use bitfield instead?
/// Each direction corresponds to the ID of the tile it collided with. -1 means
/// no ... | ALGO | 0.922135 | 7.15308 | {
"github_metadata": {
"branch": "master",
"commit_count": 140,
"repo_created_at": "2020-01-07T15:27: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": "9878eedf... |
ccf774a0-52bd-4811-b78f-2f973a223172 | XiandaChen/LeetCode | CPP/601-700/Q694_NumberofDistinctIslands_dfs.cpp | class Solution {
public:
int numDistinctIslands(vector<vector<int>>& grid) {
if (grid.empty()) return 0;
int n = grid.size(), m = grid[0].size();
vector<vector<bool>> visited(n, vector<bool>(m, false));
unordered_set<string> islands; // island patterns
for (int i = 0; i < n; ... | ALGO | 0.999956 | 6.418876 | {
"github_metadata": {
"branch": "master",
"commit_count": 257,
"repo_created_at": "2019-08-29T02:19: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": "434be284... |
075a22a7-0fd8-4638-83dc-b7fc2653cca3 | ibudiselic/contest-problem-solutions | tc 160+/EllysString.cpp | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <numeric>
using namespace std;
string S, T;
int n;
int dp[2500][26][26];
int go(int i, int s, int t) {
if (i == n) {
... | ALGO | 0.999955 | 3.870008 | {
"github_metadata": {
"branch": "master",
"commit_count": 75,
"repo_created_at": "2011-08-14T11:43:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3cc0a7b78... |
5f3e6dfb-d0cd-4d94-818f-69bd71d130d8 | MISabic/Competitive-Programming-Problem-Implementation | uva/12805 - Raiders of the Lost Sign.cpp | #include<bits/stdc++.h>
#define max 100005
using namespace std;
int arr[max],k;
vector<int>fact;
vector<int>pri;
int seive()
{
memset(arr,0,sizeof(arr));
for(int i=4; i<max; i=i*2)
arr[i]=1;
int n=sqrt(max);
for(int i=3; i<=n; i+=2){
if(arr[i]==0){
for(int j=i*i; j<max; j+=... | ALGO | 0.999982 | 4.053948 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-08-11T06:10:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "72554b008d... |
60dcd2fc-ec4a-4ada-bbd8-67ed84c9c288 | alexhcheng/marian-dev | src/layers/lsh.h | #pragma once
#include "graph/expression_operators.h"
#include "graph/node_initializers.h"
#include <vector>
/**
* In this file we bascially take the faiss::IndexLSH and pick it apart so that the individual steps
* can be implemented as Marian inference operators. We can encode the inputs and weights into their
* ... | ALGO | 0.996558 | 7.215104 | {
"github_metadata": {
"branch": "master",
"commit_count": 4816,
"repo_created_at": "2021-08-17T16:25: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": "ac4e649... |
55aabe0c-91d4-4340-9ad6-cc9e21298b7f | Seven-Streams/Bookstore | Rubbish_Bookstore/pre_task.cpp | #include <algorithm>
#include <bits/stdc++.h>
#include <cassert>
#include <cstring>
#include <iostream>
#include <ostream>
#include <unistd.h>
using namespace std;
const int minus_inf = -2147483648;
template <class T, int info_len = 2> class MemoryRiver {
private:
fstream file;
string file_name;
int sizeofT = si... | ALGO | 0.999408 | 3.736119 | {
"github_metadata": {
"branch": "main",
"commit_count": 210,
"repo_created_at": "2023-11-27T23:20: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": "42c10766e0... |
7aea2db3-beb7-4841-85ab-edd45ba189fe | Tomoki-Goda/Saturation-Model | saturation-ver3/Functions/gluons.hh | // Claculating of xgpdf(x,Q^2) by DGLAP evolution of initial condition
// xgpdf(x,Q^2_0)
// Originally written by <NAME>
// Modified by <NAME>
//
// COLGLU Defined at the end
//
// Chebyshev_Collinear_Gluon
// approximate gluon by 2d chbyshev.
// Chebyshev1D_Collinear_Gluon
// approximate gluon for a fixed va... | ALGO | 0.993962 | 3.031239 | {
"github_metadata": {
"branch": "master",
"commit_count": 553,
"repo_created_at": "2022-03-18T14:48:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7e78207d... |
43538079-b247-4f28-a45d-bcb719c15368 | algorithm007-class02/algorithm007-class02 | Week_04/G20200343040154/LeetCode_127_0154.cpp | //127. 单词接龙
//https://leetcode-cn.com/problems/word-ladder/
// 解法1:BFS
// 广度优先搜索求解,注意这里我们选用unordered_set<string> visited用来标记单词是否被访问过,如果已经被访问过,说明已经有对应路径存在,因此跳过访问
class Solution {
public:
int ladderLength(string beginWord, string endWord, vector<string>& wordList) {
unordered_set<string> dict(wordList.begin(), wordL... | ALGO | 0.999924 | 5.577778 | {
"github_metadata": {
"branch": "master",
"commit_count": 1636,
"repo_created_at": "2020-03-10T07:12:35.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 33,
"forks": 115,
"issues": 619,
"pull_requests": 4
},
"file_meta": {
"content_id": "fb4... |
810356b6-a338-43dd-bc04-a7ba1faa78f1 | mandalsudipti/competitive_programming | codeforces/Acacious and string (2).cpp | #include<bits/stdc++.h>
using namespace std;
const string match = "abacaba" ;
string X;
bool get_match(int idx)
{
string S = X ;
for(int i=0;i<7;i++)
{
if(S[i+idx]==match[i])
continue;
else if(S[i+idx]=='?')
S[i+idx]=match[i];
else
return false;
... | ALGO | 0.999908 | 3.414402 | {
"github_metadata": {
"branch": "master",
"commit_count": 151,
"repo_created_at": "2020-01-28T05:18:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f095e0c9... |
bd64718c-58a6-4dc0-9535-3ae325178b78 | MAHFUZ003/xpsc__ | week 10/day 7/E_Interview.cpp | #include <bits/stdc++.h>
using namespace std;
#define read(type) readInt<type>() // Fast read
#define ll long long
#define nl "\n"
void solve()
{
int n;
cin >> n;
ll arr[n + 1];
ll hash[n + 1];
memset(hash, 0, sizeof(hash));
hash[0] = 0;
for (int i = 1; i <= n; i++)
{
cin >> arr... | ALGO | 0.999808 | 3.204231 | {
"github_metadata": {
"branch": "main",
"commit_count": 51,
"repo_created_at": "2023-08-06T10:23: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": "ced11cfb046... |
8e3acad9-a4bf-4853-a616-3713fb0856d7 | skygragon/Q.solution | leetcode/087.scramble-string.cpp | /*
* [87] Scramble String
*
* https://leetcode.com/problems/scramble-string
*
* Hard (28.56%)
* Total Accepted: 60275
* Total Submissions: 211039
* Testcase Example: '"a"\n"a"'
*
*
* Given a string s1, we may represent it as a binary tree by partitioning it
* to two non-empty substrings recursively.
*... | ALGO | 0.999975 | 6.254607 | {
"github_metadata": {
"branch": "master",
"commit_count": 522,
"repo_created_at": "2017-03-02T02:05:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e87966c... |
c0293b63-57d5-4757-aa6d-6b126358183c | brianferri/cpp-exercises | 75-verifica-se-ci-sono-duplicati-in-un-array-e-ritorna-la-sua-posizione.cpp | /*
* Author: <NAME> #0001040624
*
* Nome/Descrizione: 75-verifica-se-ci-sono-duplicati-in-un-array-e-ritorna-la-sua-posizione.cpp
*
* INF-UNIBO 2021-2022
* Primo anno del Corso di laurea in Informatica
*/
#include <iostream>
using namespace std;
int main() {
bool flag = false;
int n;
cout << "Inser... | ALGO | 0.99891 | 4.137516 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-05-15T09:56: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": "aef84c567737... |
7334c0b4-e848-4a93-9782-a0e4c28ff4be | j-beniwal/cpp | cpp-introduction_to_data_structures/week19_recursions_lectures/printascending.cpp | // Problem :
// * Write a recursive implementation of the function
// void printAsc(int start, int end);
// The function print the numbers from start to end in the ascending order.
// Assuming that start<end.
// Solving the problem
// Step 1. The Base case : solve the problem for smallest possible inpu... | ALGO | 0.999881 | 5.677811 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-01-02T10:31: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": "baba2a02e076... |
ebafc3ee-91ff-44a6-b527-a8498dc83046 | Bakado0704/atcoder | abc/B/B303/atcoder.cpp | // g++ -o atcoder atcoder.cpp
// ./atcoder
#include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ull = unsigned long long;
const double PI = acos(-1);
template <class T>
void chmax(T& a, T b) {
if (a < b) {
a = b;
... | ALGO | 0.999981 | 3.459148 | {
"github_metadata": {
"branch": "main",
"commit_count": 99,
"repo_created_at": "2024-12-20T08:22: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": "3b9ceeabdc4... |
551837c3-6d75-48e3-bb4d-47110c9c47b8 | MinsooKim99/eee | CPP practice/while.cpp | #include <iostream>
using namespace std;
int main()
{
//int i=0;
int answer;
cout << "몇번 물어볼까?" << endl;
cin >> answer;
/*while (answer>i)
{
cout << "뭐 드시냐고 " << i+1 << "번째 물어봅니다" << endl;
i++;
}*/
/*for (int a=0;a<answer;a++)
{
cout << "뭐 드시냐고 " << a+1 << "... | ALGO | 0.99724 | 3.445812 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2021-07-07T11:32: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": "293b03b25... |
e9ee6d50-e1be-4d8b-9e11-aa25d7b4bf0f | TheSwarnim/DSA-Practice-Questions | Level 1/2 Recursion and Backtracking/6 Recursion Backtracking/2 (IMP) Knight Tour.cpp | #include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define calcTime cerr << "\ntime taken : " << (float)clock() / CLOCKS_PER_SEC << " secs" << endl
void optimize(){
fast
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
#endif
}... | ALGO | 0.999876 | 4.037004 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2021-03-23T18:34:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fcfc8db4862... |
81762279-ed4d-42e2-98a5-3de88f876250 | cyendra/ACM_Training_Chapter_One | 1401 Solitaire/main.cpp | /*
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
typedef struct{
int x;
int y;
}POINT;
POINT a[4];
POINT b[4];
int direct[4][2]={ {0,1},{1,0},{-1,0},{0,-1} };
int direct2[4][2]={ {0,2},{2,0},{-2,0},{0,-2} };
int map[10][10];
bool ok;
void dfs(int deep);
bool check(int x,int... | ALGO | 0.999967 | 3.73992 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2013-11-17T08:33: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": "5a43574459... |
cc123e25-8a0a-4ca2-afc6-145740f082df | Aslamyouseph/C- | polynomial_addition.c++ | // reffer renisha's cs eduworld
#include <iostream>
using namespace std;
class poly_add
{
public:
void operation(int a[20][2], int b[20][2], int m, int n);
};
void poly_add::operation(int a[20][2], int b[20][2], int m, int n)
{
int c[20][2], i = 0, j = 0, k = 0; // Initialize i, j, k
while (i < m && j < ... | ALGO | 0.999621 | 4.919723 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-09-14T16:12:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0e006a1520... |
0717c100-405f-45c2-8cef-24a863a0a7ec | SabirKhanAkash/problem-solving | Hacker Rank/Interview Preparation Kit/Warm-up Challenges/Sales by Match.cpp | #include<bits/stdc++.h>
using namespace std;
//<--------- Coded by SabirKhanAkash 1603108 --------->
#define ll long long
#define p(a) cout<<a<<" "
#define pd(a) printf("%lf",a)
#define pf(a) printf("%f",a)
#define sd(a) scanf("%... | ALGO | 0.999945 | 3.954946 | {
"github_metadata": {
"branch": "main",
"commit_count": 106,
"repo_created_at": "2021-01-03T21:44:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c36ed5d405... |
28ee0ba6-8818-4461-95ac-4325a85e0a08 | Viktoria181/Lab | Exercises/Exercises_02/ConvertingNumbers.cpp | #include <iostream>
#include <string>
#include <bitset>
#include <sstream>
#include <cmath>
using namespace std;
void convertDecimal(int decimal) {
cout << "Binary: " << bitset<32>(decimal).to_string().substr(32 - (decimal ? (int)log2(decimal) + 1 : 1)) << endl;
cout << "Octal: " << oct << decimal << endl;
... | TOOL | 0.915885 | 5.23186 | {
"github_metadata": {
"branch": "main",
"commit_count": 144,
"repo_created_at": "2024-09-28T06:50: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": "62a1557f4a... |
cca55c4a-5ec1-452d-a1db-b12808b67223 | varshikakamala/MissionRnD-C-LinkedLists2-Worksheet | src/insertAtEveryKthNode.cpp | /*
OVERVIEW: Given a single linked list insert a new node at every Kth node with value K.
E.g.: 1->2->3->4->5, k = 2, 1->2->2->3->4->2->5
INPUTS: A linked list and Value of K.
OUTPUT: Insert a new node at every Kth node with value K.
ERROR CASES: Return NULL for error cases.
NOTES:
*/
#include <stdio.h>
#include <... | ALGO | 0.9965 | 4.12315 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2016-01-07T03:14: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": "ee4a05d4f4... |
6eba5c80-158d-4ddd-bb56-0c9703153f78 | Devansh-rookie/CSES | misc/union_find.cpp | #include<bits/stdc++.h>
using namespace std;
void setIO(string name = "") {
ios_base::sync_with_stdio(0);
cin.tie(0);
if (name.size()) {
freopen((name + ".in").c_str(), "r", stdin);
freopen((name + ".out").c_str(), "w", stdout);
}
}
class DSU {
public:
vector<int> parent;
v... | ALGO | 0.999843 | 4.905581 | {
"github_metadata": {
"branch": "main",
"commit_count": 74,
"repo_created_at": "2024-12-15T21:22: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": "af1d6108c89... |
377945e1-ef0e-490c-a708-b28cbce15f60 | Tora416/MultiCodeEmbed | dataset/dataset_raw/gcj_cpp/Jael860/8294486_5681755159789568_Jael860.cpp | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> ii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ii> vii;
const int MAXN = 150;
int n, q;
double dp[MAXN][MAXN];
ll e[MAXN], s[MAXN], dist[MAXN][MAXN], adist[MAXN][MAXN];
const double INF = 1e18;
double go(int pos, int curh) {
if (... | ALGO | 0.999731 | 3.653522 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2025-07-10T08:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b8fca6533... |
8c692dfb-ce8e-473e-8d51-2ec4e21b5118 | anandwetzel/grokking | Subsets/subsets.cpp | /*
Given a set with distinct elements, find all of its distinct subsets.
Example 1:
Input: [1, 3]
Output: [], [1], [3], [1,3]
Example 2:
Input: [1, 5, 3]
Output: [], [1], [5], [3], [1,5], [1,3], [5,3], [1,5,3]
*/
#include <iostream>
#include <vector>
using namespace std;
class Subsets {
public:
s... | ALGO | 0.999456 | 6.976694 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2022-08-28T16:01: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": "2857b6857ef... |
821bfa9b-466f-476d-9e92-fd8e91ea0c37 | raincross7/code-similarity | codes/train_code/problem024/problem024_219.cpp | #include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <stdlib.h>
#include <string.h>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <stdio.h>
#include... | ALGO | 0.999992 | 3.064944 | {
"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": "0a2ff5b3925f... |
ac27fc7e-cb7e-4566-a8e4-dea2360dc40b | pabzun/SPDEcensSpatial | src/Funciones.cpp | // [[Rcpp::depends(RcppArmadillo, roptim, RcppProgress)]]
#include <RcppArmadillo.h>
#include <roptim.h>
#include <progress.hpp>
#include <progress_bar.hpp>
using namespace Rcpp;
using namespace arma;
using namespace roptim;
// Optimizer for phi and gamma
//----------------------------------------------------------... | ALGO | 0.999994 | 6.853347 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-01-31T23:35: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": "835f5823fa1e... |
8f792cff-736b-4074-9939-f24d5132ed06 | bcc32/tju-online-judge | 2010/sol.cc | #include <iostream>
#include <vector>
using namespace std;
void init(vector<int> &);
int main(void)
{
vector<int> primes;
vector<int> ways(10001);
init(primes);
for (int i = 0; i < primes.size(); i++)
{
int s = 0;
for (int j = i; j < primes.size(); j++)
{
s += p... | ALGO | 0.999662 | 3.890898 | {
"github_metadata": {
"branch": "master",
"commit_count": 285,
"repo_created_at": "2012-02-14T02:25: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": "507c682b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.