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 |
|---|---|---|---|---|---|---|---|
28b5acf7-cb9c-4c4c-bd89-d568ad07a386 | ArmedAndReady/AR | main.cpp | //modified by:<NAME>
//date:1-3-17 & turned into Inkman
//purpose:To lear how to delete linked list pointers and remove objects from the game
//
//Ink man shoots fron ink reserve to propel himself upward and uses tentacles
//to fling ink at targets. He gets powerups to increase potency and rapidity
//of ink shots.
//
/... | TOOL | 0.907256 | 3.118534 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-03-02T16:51:40.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a0efde97bc8... |
df48b2c5-1601-4218-888d-bc715ffc7143 | areian13/PS_BOJ | 1. Bronze/Bronze 2/[B2] 06892 Fix.cpp | #include <iostream>
#include <array>
#include <string>
#include <algorithm>
#define FastIO ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr)
using namespace std;
bool IsFixFree(string& a, string& b, string& c)
{
int n = a.size();
int m = b.size();
int k = c.size();
if (n <= m && ... | ALGO | 0.99997 | 5.462175 | {
"github_metadata": {
"branch": "master",
"commit_count": 231,
"repo_created_at": "2024-02-21T06:31: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": "5e1d1be4... |
f13c3dfd-ebaa-48be-aa86-c5975f7ff690 | eechava6/NumericalAnalysisMethods | C++/gaussPartialPivot.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <sstream>
#include "utils.h"
using namespace std;
vector<vector<vector<double>>> gaussSimple(vector<vector<double>> matrix){
vector<vector<vector<double>>> pivots;
vector<double> indexes;
pivots.push_back(matrix);
if(!isSqu... | ALGO | 0.997922 | 4.19949 | {
"github_metadata": {
"branch": "master",
"commit_count": 97,
"repo_created_at": "2020-06-07T19:07:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "5be11e192... |
0d538b82-f971-48c4-b347-fa15ab5dde48 | Bizefalo/taller3 | taller3.cpp | #include <iostream>
#include <vector>
#include <fstream>
#include <string>
#include <ctime>
#include <unordered_map>
class Transaccion {
public:
int id;
std::string cuentaOrigen;
std::string cuentaDestino;
double monto;
std::string ubicacion;
std::time_t fechaHora;
Transaccion(int _id, std... | TOOL | 0.932879 | 6.086127 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-07-02T22:36: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": "106b01e0c89d... |
dc08e66b-7b94-4e9e-b8e3-5c1c70682ee4 | alvinnardo/licode | leetcode/1534.cpp | #include "../template/head.h"
#include <bits/stdc++.h>
int countGoodTriplets(vector<int> arr, int a, int b, int c) {
// 思路:模拟
// 时间 O(n3),空间 O(1)
int sz = arr.size(), cnt = 0;
for (int i = 0; i < sz - 2; i++) {
for (int j = i + 1; j < sz - 1; j++) {
if (abs(arr[i] - arr[j]) > a) {
... | ALGO | 0.999903 | 5.611001 | {
"github_metadata": {
"branch": "master",
"commit_count": 737,
"repo_created_at": "2019-10-09T05:42:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e24f3f78... |
904e8c0e-b5a7-4c79-88f0-28fee01560ba | OneBarrack/SolvingAlgorithmProblems | PracticeCodingTest/ModifiedKaprekarNumbers.cpp | //#include <iostream>
//// 해커랭크 코딩테스트 연습
//// Lv.Medium - Modified Kaprekar Numbers
//
//#include <string>
//#include <list>
//#include <vector>
//#include <queue>
//#include <algorithm>
//#include <stack>
//#include <set>
//#include <map>
//#include <unordered_map>
//#include <sstream>
//#include <numeric>
//
//using... | ALGO | 0.984385 | 4.711494 | {
"github_metadata": {
"branch": "master",
"commit_count": 260,
"repo_created_at": "2021-11-04T18:20:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "564d1297... |
eaa323c8-34d1-44e4-bb75-08f85d7b06a3 | JackLee2111/data-structure-algorithm1 | code/yoj/yoj813-Huffman/Huffman2.cpp | #include <iostream>
#include <string>
#include <fstream>
using namespace std;
struct Htnode
{
int weight, parent, lchild, rchild;
char c;
};
struct Htcode
{
int bit[25], start;
};
int type(int a[])
{
string s;
int sum = 0;
cout << "输入需要编码的字符串" << endl;
cin >> s;
for (int i = 0; i < s.siz... | ALGO | 0.999988 | 3.066786 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2022-11-23T04:02: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": "87ae1e748d46... |
ca34c37a-45ea-4529-8483-ed57501be7e1 | 1480c1/VVCSoftware_VTM | source/Lib/CommonLib/x86/RdCostX86.h | /* The copyright in this software is being made available under the BSD
* License, included below. This software may be subject to other third party
* and contributor rights, including patent rights, and no such rights are
* granted under this license.
*
* Copyright (c) 2010-2023, ITU/ISO/IEC
* All rights reserve... | ALGO | 0.998655 | 5.610475 | {
"github_metadata": {
"branch": "master",
"commit_count": 7612,
"repo_created_at": "2020-06-04T13:40:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "f750293... |
e2a0e7c3-d0d3-42ae-958d-3dc6e0d0092a | tsugitta/atcoder | contests/abc186/abc186_f/main.cpp | // https://atcoder.jp/contests/abc186/tasks/abc186_f
#include <atcoder/all>
#include "algorithm"
#include "bitset"
#include "cmath"
#include "functional"
#include "iomanip"
#include "iostream"
#include "map"
#include "numeric"
#include "queue"
#include "set"
#include "string"
#include "vector"
#define rep(i, to) for ... | ALGO | 0.999843 | 3.912497 | {
"github_metadata": {
"branch": "master",
"commit_count": 522,
"repo_created_at": "2019-06-13T19:12:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 0,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "c077ae7... |
bcb195ad-b242-4c1e-8592-d7351901746a | romanasa/olymp_codes | ioi/ioi2014/wall-templates/grader.h | #include <bits/stdc++.h>
#define ll long long
#define err(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
using namespace std;
const int dd = (int)2e6 + 7;
const int inf = (int)1e9 + 7;
int L[4 * dd], R[4 * dd];
void calc(int v, int l, int r) {
L[v] = min(L[v], l);
L[v] = max(L[v], r);
R[v] = min(R[v], l);
... | ALGO | 0.999947 | 4.105268 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-04-11T12:03: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": "8f383d2e4b... |
7a6e8ad2-e7f3-4afa-952f-d1e75a90b224 | Yarin78/yal | cpp/componentjoin.cpp | #include <iostream>
#include <vector>
#include <map>
using namespace std;
// Input:
// prevLine = list of component numbers on previous line (at most 32 elements)
// prevParity = parity of first component in previous line,
// false if it's "white", true if "black"
// curLineMask = bitmask of current line. B... | ALGO | 0.99965 | 3.684961 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2019-12-30T13:45:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dd1d01899... |
ad16a12b-eb81-44f7-b9a9-152c012aa0a1 | abusomani/UVA | 1212(max weight independent set).cpp | // reference Cp1 - pageno - 88-91 read carefully !!
// here we need to get max weight independent set so for that purpose we are connecting those vertices which are conflicting
// and then we are getting max flow (i.e. reverse) then we will subtract it from total weight.
#include <bits/stdc++.h>
using namespace std;... | ALGO | 0.998522 | 3.028858 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-04-30T10: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": "c1d2143aaf... |
797fc935-1fb8-45a3-a511-f410978a3514 | khaledrezk/Competitive-Programming | Libraries/implicit_treap.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define INF 2000'000'000
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
template<typename T> using ordered_set = tree<T , null_type, less<T>, rb_tree_tag, tree_order_statist... | ALGO | 0.999991 | 4.479146 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2020-06-27T02:57:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "443e19e9a... |
7ee96704-3950-4f64-8d3e-5f388715fd2f | MrSago/Olymp | Usaco-Tasks/Chapter 2/Section 2.1/sort3/sagosag1_sort3.cpp |
/*
ID: sagosag1
TASK: sort3
LANG: C++
*/
#include <fstream>
using namespace std;
int main() {
ios::sync_with_stdio(false);
ifstream fin("sort3.in");
ofstream fout("sort3.out");
int arr[1000];
int counts[3] = {0};
int N;
fin >> N;
for (int i = 0; i < N; ++i) {
fin >> arr[i];
++counts[arr[i]... | ALGO | 0.99996 | 3.913523 | {
"github_metadata": {
"branch": "main",
"commit_count": 364,
"repo_created_at": "2021-03-19T14:26:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b88714e5a9... |
93467e8c-f42c-4384-93b8-02475d04c869 | Nahian-Alvy/Algorithm | damn3.cpp | #include <iostream>
using namespace std;
class Queue
{
private:
struct node
{
int value;
node* next;
node(int value, node* next = nullptr)
{
this->value = value;
this->next = next;
}
};
node* front, * back;
public:
//Constructor
... | ALGO | 0.998005 | 4.887763 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2023-01-19T16:05: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": "bd95bbbf35d... |
d92f1e3b-092c-43dc-85b7-324a8d3b5e87 | loongOpen/OpenLoong-MiniGym | robobutler/controllers/tinystretch/common_utils/common.cpp | # include "common.hpp"
void rpyToQua(double yaw, double pitch, double roll,eigenQuaternion& to){
eigenQuaternion Qyaw(cos(0.5*yaw), 0, 0, sin(0.5*yaw) );
eigenQuaternion Qpitch(cos(0.5*pitch), 0, sin(0.5*pitch), 0) ;
eigenQuaternion Qroll(cos(0.5*roll), sin(0.5*roll), 0, 0);
to = Qyaw *... | ALGO | 0.999682 | 5.103279 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-08-28T07:17:10.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 17,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c1e6b26c517... |
08346573-6a07-4dcc-963d-0b84ab92741b | Kush-Singh-26/AdventOfCode | day5/2.cpp | #include<bits/stdc++.h>
using namespace std;
bool check_order(vector<pair<int,int>> &rules, vector<int> &line)
{
bool valid = true;
for(size_t i = 1;i<line.size(); i++)
{
auto prev = line[i-1];
auto curr = line[i];
bool found = false;
for(auto& x : rules)
{
... | ALGO | 0.999951 | 4.876448 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-12-02T13:55: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": "0a67b830f2cd... |
2278cbac-d283-437d-9e52-7072068e8884 | blackhat1987/LeetCode | 060.permutationSequence.cpp | /*************************************************************************
> File Name: 060.permutationSequence.cpp
> Author: DevilBin
> Mail: <EMAIL>
> Created Time: Fri 15 Jan 2016 11:58:52 AM CST
************************************************************************/
#include <iostream>
#include <fstream>... | ALGO | 0.999954 | 5.299727 | {
"github_metadata": {
"branch": "master",
"commit_count": 107,
"repo_created_at": "2017-12-12T09:38: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": "a33167d2... |
e901a5dd-3293-4ab7-8427-28ac27130782 | Vequis/Competitive-Programming | AtCoder/ABC378/A.cpp | #include<bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define sz(x) (int)(x).size()
#define pb push_back
#define eb emplace_back
#define vi vector<int>
#define all(x) (x).begin() , (x).end()
#define fs first
#define sc second
#define ii pair<int, int>
#define vii vector<ii>
#define ... | ALGO | 0.999667 | 4.028525 | {
"github_metadata": {
"branch": "main",
"commit_count": 67,
"repo_created_at": "2024-02-01T16:09: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": "6fb611f688d... |
0274fe9d-13ca-4da7-89fb-276c43a09923 | JonSheyka/CS199 | grid.cpp | #include <iostream>
#include <math>
#include "grid.hpp"
Grid::Grid()
{
dimension = 0;
arr = NULL;
}
Grid::Grid(int dimension)
{
this->dimension = dimension;
this->arr = new *int[dimension];
for (int i = 0; i < dimension; i++) {
arr[i] = new int[dimension];
}
}
Grid::Grid(const Grid & obj)
{
dimension = o... | TOOL | 0.974148 | 4.272554 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2016-11-29T02:52: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": "50b2440aa... |
1c9f5a3d-afd8-4a75-9bdc-10d552954c53 | Nupurbhoir/DSA-C- | StackPushPop.cpp | #include <iostream>
#define MAX 100
using namespace std;
class Stack {
int arr[MAX];
int top;
public:
Stack() { top = -1; }
void push(int x) {
if(top >= MAX - 1) {
cout << "Stack Overflow" << endl;
return;
}
arr[++top] = x;
cout << x << " pushed ... | ALGO | 0.998848 | 4.696727 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-04-17T07:39: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": "3d6d8bad4677... |
caad50c8-627a-4e21-9f9b-1fcbd7a80062 | ishandutta2007/codeforces-s | sd0061/normal/550/C.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
typedef long long LL;
char s[N];
int n;
int f[N][8] , pre[N][8];
void print(int x , int y) {
if (~pre[x][y]) {
if (pre[x][y] < 8) {
print(x - 1 , pre[x][y]);
printf("%c" , s[x]);
} else {
... | ALGO | 0.999944 | 3.35019 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "063daa51cf2c... |
bfa23f9f-342c-4c9c-8286-da856b940c86 | LuisEnilton/Maratona | AtCoder/Contest 325/d.cpp | //
// Created by Luis on 21/10/2023.
//
//Template By eduardocesb
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <iomanip>
#include <iostream>
#include <ranges>
#include <string_view>
#define optimize ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(N... | ALGO | 0.999823 | 3.993654 | {
"github_metadata": {
"branch": "main",
"commit_count": 204,
"repo_created_at": "2023-06-20T00:39:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "113d3c832d... |
3451aa1c-4dfe-40ca-b399-19df2733da2a | baike2000/divcd2021 | sort/sort.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
// 0 1 2 3 4
// 1 3 3 2 5
// 0 1
// 1 2 3 3 5
bool cmp(pair<int, int> a, pair<int, int> b)
{
return a.second < b.second;
}
int main4()
{
int n;
cin >> n;
vector <int> a(n);
vector <pair<int, int>> b(n);
for (int i = 0; i ... | ALGO | 0.999975 | 3.611127 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2021-11-03T11:15: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": "c4e780b4c1... |
a117051f-f7ee-4226-9607-481d8e30969a | Pedro-Hdez/Estructura-de-datos | sistema_experto/Sistema_Experto.cpp | /*
Nombre: Sitema_Experto.h
Autor: <NAME>.
Fecha: mayo del 2019
Descripción: Archivo de implementación de un sistema experto que adivina 7 animales.
*/
#include <iostream>
#include <cstdlib>
#include <fstream>
#include <sstream>
#include <string>
#include "Sistema_Experto.h"
using namespace::std;
int... | ALGO | 0.987505 | 3.125854 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2019-03-13T02:08: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": "848919ac1... |
5dc5ad40-f80a-46e7-b28c-332ed6ae9f34 | Tipto-Ghosh/Data-Structure-and-Algorithm | Graph2/Shortest_Path/cheapestFlight.cpp | #include <bits/stdc++.h>
#define endl "\n"
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#pragma GCC optimize ("-ffloat-store")
using namespace std;
using namespace chrono;
#define firstio() ios_base::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
// Author Na... | ALGO | 0.999895 | 4.86155 | {
"github_metadata": {
"branch": "main",
"commit_count": 136,
"repo_created_at": "2025-02-21T16:03:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bd2cb5a1e9... |
1051c10d-fb16-4159-98e9-7303e16597e4 | sachuverma/DataStructures-Algorithms | Striver Sheet/Day-22/Binary Tree to DLL.cpp | /*
Binary Tree to DLL
==================
Given a Binary Tree (BT), convert it to a Doubly Linked List(DLL) In-Place. The left and right pointers in nodes are to be used as previous and next pointers respectively in converted DLL. The order of nodes in DLL must be same as Inorder of the given Binary Tree. The first nod... | ALGO | 0.999983 | 6.544629 | {
"github_metadata": {
"branch": "master",
"commit_count": 1430,
"repo_created_at": "2020-10-07T10:08:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2049,
"forks": 541,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "b1... |
455c292a-6510-4ef3-943d-9161c6b107f5 | arthurbourquin/PRG1_General | 09-Tableaux/supprimer-elements-centraux.cpp | // WIP
#include <iostream>
#include <vector>
using namespace std;
void imprimer_le_vecteur(vector<string> v) {
for(int i = 0; i < v.size(); i++) {
cout << v[i] << " ";
}
cout << endl;
}
void supprimer_elements_centraux(vector<string> &v) {
if(v.empty()) {return;}
if(v.size() % 2 != 0) {
in... | ALGO | 0.950758 | 4.730862 | {
"github_metadata": {
"branch": "main",
"commit_count": 62,
"repo_created_at": "2024-09-28T22:21: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": "22d8b480be8... |
af3d5bdf-9c7e-4649-b9bf-60e3907e0a51 | greenvale/data_structures | BinarySearchTree.hpp | /* Binary search tree - by <NAME>
- every parent has at most two children
- IMPORTANT: template class must support <, >, == comparison operators
- each subtree to the left must have a value <, and to the right must have value >
- same values are not supported
*/
#pragma once
#include <DynamicArray.hpp>... | ALGO | 0.999916 | 6.150163 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2022-08-13T09:02:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c90527c72... |
19fa4974-7026-4590-8328-a69343459baa | ChongWu-Biostat/FOGS | GMaSPU_support.cpp | #define ARMA_NO_DEBUG
#include <armadillo>
#include <RcppArmadillo.h>
// [[Rcpp::depends(RcppArmadillo, BH, bigmemory)]]
#include <Rcpp.h>
#include <vector>
using namespace Rcpp;
using namespace arma;
#include <bigmemory/BigMatrix.h>
// [[Rcpp::plugins(cpp11)]]
// [[Rcpp::depends(RcppArmadillo)]]
// [[Rcpp::expor... | ALGO | 0.999446 | 6.147227 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2019-01-28T01:08:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a6bf00fdd8... |
c1136a8a-1d08-401c-b7a1-af49e5c34806 | resfeber14/Codes | Trees problems/Longest Univalue Path.cpp | /*
Problem Link: https://leetcode.com/problems/longest-univalue-path/
*/
// Time complexity: O(N*N) Space Complexity: O(1)
int solve(TreeNode* root,int &ans){
if(!root)
return 0;
int cnt1=0,cnt2=0;
if(root->left && root->left->val==root->val)
cnt1+=solve(root->left,ans... | ALGO | 0.999941 | 6.252393 | {
"github_metadata": {
"branch": "main",
"commit_count": 389,
"repo_created_at": "2021-07-19T15:39:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f747fe31bc... |
b50fd4fd-6244-4989-8083-d55e3ce8a3e2 | leehyeji95/CodingTest | baekjoon/test_1012_bfs.cpp | #include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <cstring>
#include <queue>
using namespace std;
int board[50][50]={0,};
int visited[50][50]={0,};
int dx[4] = {-1,1,0,0};
int dy[4] = {0,0,1,-1};
int M, N, K;
void bfs(int x, int y)
{
queue <pair<int, int> >q;
visited[x][y] = 1;
//q.push(mak... | ALGO | 0.999726 | 3.909653 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-11-25T06:41:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0ddb1850ece1... |
7adda1d5-0f93-45b1-8e7a-e27e5b626a31 | eziokittu/KIIT_Laptop_C_Cpp_Codings | TrialAndPractice/Practice/Graphs/graph2_NumberOfProvinces.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
void dfs(vector<int> edges[], vector<int> &visited, int start){
if (visited[start] == 1){
return;
}
visited[start] = 1;
for (int i : edges[start]){
dfs(edges, visited, i);
}
}
int FindNumberOfProvinces(int n, vector<int> ed... | ALGO | 0.999713 | 5.591 | {
"github_metadata": {
"branch": "main",
"commit_count": 192,
"repo_created_at": "2022-09-30T11:49:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dc0824ceab... |
34b6b52d-2ebc-45b5-8979-84d38865cc0a | margonguyen/socialmedia | Graph.cpp |
/*=========================================================================
Name : Graph.cpp
Author : <NAME>
Version : Course Proj
Copyright :
Description : CIS 22C Course Project
========================================================================= */
#include <iostream>
#include... | ALGO | 0.978975 | 3.056354 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-07-25T11:51: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": "19b582a200... |
d1116b5d-3d1b-4010-9e85-896349b2832c | fuqinho/ChallengeBook | quiz/035_LakeCounting/main.cpp | #include <iostream>
#include <vector>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define dump(x) cerr << #x << " = " << (x) << endl;
int curLakeCount = '0';
void printGarden(vector<string>& garden) {
REP(i, garden.size()) {
REP(j, garden[i].size())
... | ALGO | 0.999945 | 5.040666 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2011-09-28T11:00:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7ee3bf52d... |
e46c3445-5901-43a1-8f3b-c401f7d684ac | ahnaf00/Data-Structures-C- | graph/Phitron/Dijkstra/dijkstra_codeforces.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
vector<vector<pair<ll,ll>>> adj_list;
vector<ll> dis, parent;
void dijkstra(ll src)
{
priority_queue<pair<ll,ll>,vector<pair<ll,ll>>,greater<pair<ll,ll>>> pq;
pq.push({0,src});
dis[src] = 0;
while(!pq.empty())
{
pair<... | ALGO | 0.999989 | 4.16143 | {
"github_metadata": {
"branch": "main",
"commit_count": 79,
"repo_created_at": "2024-12-15T16:11: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": "38d88bc88f9... |
57bf90de-2fd7-427a-adf1-27faa25f5af1 | NCAR/lrose-core | codebase/libs/rapmath/src/functions/FuzzyF.cc | // *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1990 - 2016
// ** University Corporation for Atmospheric Research (UCAR)
// ** National Center for Atmospheric Research (NCAR)
// ** Bo... | TOOL | 0.912254 | 5.783957 | {
"github_metadata": {
"branch": "master",
"commit_count": 7406,
"repo_created_at": "2016-02-09T23:36:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 99,
"forks": 51,
"issues": 16,
"pull_requests": 3
},
"file_meta": {
"content_id": "5891e... |
2ac41adc-de99-4398-a02f-7b3997f2bbb7 | kknayi/PAT_Basiclevel | 1026.cpp | #include <iostream>
using namespace std;
const int CLK_TCK = 100;
void out(int x) {
if (x >= 10)
cout << x;
else if (x < 10 && x != 0)
cout << "0" << x;
else
cout << "00";
}
int main() {
float c1 = 0, c2 = 0;
cin >> c1 >> c2;
float time = (c2 - c1) / CLK_TCK + 0.5;
... | ALGO | 0.967305 | 4.032403 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2018-08-14T05:30: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": "93a05f111... |
c86dcbf1-534c-4b33-9ca5-9a743e274524 | GRTLCollaboration/GRChombo | Source/InitialConditions/BlackHoles/KerrBH.hpp | /* GRChombo
* Copyright 2012 The GRChombo collaboration.
* Please refer to LICENSE in GRChombo's root directory.
*/
#ifndef KERRBH_HPP_
#define KERRBH_HPP_
#include "ADMConformalVars.hpp"
#include "Cell.hpp"
#include "CoordinateTransformations.hpp"
#include "Coordinates.hpp"
#include "Tensor.hpp"
#include "TensorA... | ALGO | 0.957084 | 6.6742 | {
"github_metadata": {
"branch": "main",
"commit_count": 565,
"repo_created_at": "2018-01-24T15:51:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 97,
"forks": 58,
"issues": 31,
"pull_requests": 11
},
"file_meta": {
"content_id": "a1cce0f... |
a3463563-0d99-427c-a906-c18c57a99a48 | RAJ4823/Codes | LeetCodes/count-ways-to-group-overlapping-ranges/3-28-2023, 9_46_19 PM/count-ways-to-group-overlapping-ranges.cpp | // Link: https://leetcode.com/problems/count-ways-to-group-overlapping-ranges
/** Submission Info:
*
* AUTHOR: the_247 | <NAME>
* TITLE: count-ways-to-group-overlapping-ranges
* RUNTIME: 413 ms
* MEMORY: 89.3 MB
* DATE: 3-28-2023, 9:46:19 PM
*
*/
// Solution:
class Solution {
public:
long long MOD =... | ALGO | 0.999967 | 5.877304 | {
"github_metadata": {
"branch": "master",
"commit_count": 124,
"repo_created_at": "2022-07-27T10:16:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cafcc818... |
1b3bdb8f-5847-4d80-82c9-67112ea5370f | TimS-ml/My-Algo | Educative/cpp_bk/ac01_SlidingWindow_b.cpp | using namespace std;
#include <iostream>
#include <vector>
class AverageOfSubarrayOfSizeK {
public:
static vector<double> findAverages(int K, const vector<int>& arr) {
vector<double> result(arr.size() - K + 1);
double windowSum = 0;
int windowStart = 0;
for (int windowEnd = 0; windowEnd < arr.size(... | ALGO | 0.99982 | 6.867846 | {
"github_metadata": {
"branch": "master",
"commit_count": 685,
"repo_created_at": "2019-08-31T04:16:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a7743292... |
3cb7e394-9fba-4b47-af0f-0a852d153de5 | bhanuone/learning | binary_search_problems/sort_estimate.cpp | #include <iostream>
#include <cmath>
using namespace std;
class SortEstimate {
public:
double howMany(int c, int time) {
double lo = 0, t, n;
double hi = 2000000000;
while((hi - lo) > 1e-9) {
n = lo + (hi - lo) / 2;
t = log2(n) * c * n;
if(t == time) return n;
if(t > time) {
... | ALGO | 0.999677 | 4.498883 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2016-05-25T17:46:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "379adaece... |
fd79d1a2-5baf-4b05-a59d-58fcf5e4a5db | alexandraback/datacollection | solutions_5688567749672960_0/C++/guangnian/main.cpp | #include <cstdlib>
#include <cctype>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <fstream>
#include <numeric>
#include <iomanip>
#include <bi... | ALGO | 0.999875 | 4.069529 | {
"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": "9578af9a7... |
39e28291-cfd3-445f-9e39-8229d97946f6 | abhikumr7248/CodeInCpp | C_2_Powering_the_Hero_hard_version.cpp | #include <iostream>
#include <vector>
#include <string>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define ll signed long long
#define ld long double
#define to_low(s) transform(s.begin(), s.end(), s.begin(), ::tolower); // conver... | ALGO | 0.999971 | 3.991479 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2023-04-15T11:52: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": "c636d9322... |
8b4fcbe6-6ff3-47e2-b1e0-3b3c336f3af0 | sstarodubov/algorithm_research | C++/codeforces/easy-100-marathon/283.cpp | #include <iostream>
#include <map>
#include <cmath>
#include <string>
#include <stack>
#include <vector>
#include <set>
#include <unordered_set>
#include <cstring>
using namespace std;
struct ListNode {
int val;
ListNode *next;
ListNode() : val(0), next(nullptr) {}
ListNode(int x) : val(x), next(nul... | ALGO | 0.99994 | 5.15098 | {
"github_metadata": {
"branch": "main",
"commit_count": 1798,
"repo_created_at": "2021-02-01T16:56: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": "9f53ff0f9... |
02a00550-3ee1-4d3e-9fa8-2b0b79d44fc0 | dwax1324/baekjoon | code/9248 Suffix Array.cpp | #include <bits/stdc++.h>
using namespace std;
#define F ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
#define debug freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout)
#define sz(x) (int)(x).size()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define... | ALGO | 0.999971 | 3.575268 | {
"github_metadata": {
"branch": "main",
"commit_count": 116,
"repo_created_at": "2020-11-07T09:27: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": "17bdc56c74... |
c096fcbb-63fd-4af2-a532-5b0caff5cd14 | ND0322/CompetitiveProgramming | CF/D_Darius_Wisdom.cpp | #include <bits/stdc++.h>
#include <iostream>
#include <set>
using namespace std;
//you can swap 2 values that differ by 1
//its like the ccc swapping seats thing or book question
//split into sections and casework
//when encountering a 2 we want to swap with the rightmost 1 or any 1 in section 3
//if there are no 1s ... | ALGO | 0.999976 | 3.393499 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2024-03-26T05:46:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d6a7b76a5e7... |
05f9236b-6c85-4979-8c8a-5e604833ba4b | praveen-Acsia/cpp_assignments | day_9/assignment9_q3.cpp | //Question3
#include <iostream>
#include <string.h>
class CEmployee{
protected:
char* m_nName;
long m_nSecurityNumber;
public:
CEmployee(){};
CEmployee(char[], long);
~CEmployee();
long getSec() { return m_nSecurityNumber; }
virtual void print() = 0;... | TOOL | 0.974147 | 3.113382 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2023-09-23T19:11: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": "26cbf614c6d... |
2d62c59f-863e-4fda-97cb-9c35a9d5e4c5 | jaydevpaul/CP-Imp-Codes | Tries-main-without-deletion.cpp |
//-------------------------------------********X********------------------------------------------------
struct Node
{
int childReferences[26];
int stringEndingHere;
int stringEndingBelow;
Node()
{
for (int i = 0; i < 26; i++)
{
childReferences[i] = -1;
}
... | ALGO | 0.999703 | 4.207446 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-05-13T16:53: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": "b93ab74cc280... |
0630bbe6-d03a-4ecc-a8e6-ca7bed3e25c5 | luk036/graphx | graphx/algorithms/flow/edmondskarp.hpp | /**
Edmonds-Karp algorithm for maximum flow problems.
*/
// import graphx as nx
#include <graphx/algorithms.flow.utils.hpp> // import build_residual_network
// __all__= ["edmonds_karp"];
auto edmonds_karp_core(R, s, t, cutoff) -> void {
/** Implementation of the Edmonds-Karp algorithm.*/
R_nodes = R.nodes
... | ALGO | 0.999973 | 6.846025 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-10-22T11:30:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "d4ac06f83c... |
b8754929-283f-421f-b463-af1df6e6a955 | oyberntzen/competitive-programming | ioi2023camp/day3/task1/glo_dlazaw/glolib.cpp | #include <iostream>
#include <vector>
#include "glolib.h"
int _n;
std::vector<int> _manager;
bool _inited = false;
std::vector<int> _taken;
std::vector<bool> _is_manager;
void _initialize() {
if (_inited) {
return;
}
_inited = true;
std::cin >> _n;
_manager.resize(_n + 1);
_taken.resi... | ALGO | 0.999951 | 3.265945 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-03-23T16:40: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": "eacbaea1835... |
0dc4460e-9996-4374-bb18-715939fbd87d | nxphuc/GoogleCodingCompetitions | 2021/KickStart/Round A/Rabbit House.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ii = pair<int, int>;
using iii = pair<int, ii>;
using vi = vector<int>;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define ep emplace_back
const int MAX = 1e6 + 10;
const int MO... | ALGO | 0.99997 | 4.832651 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2023-01-12T02:39: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": "301e611a97e... |
ac834cab-c9a7-4d51-a8f9-d127829953f1 | ishandutta2007/codeforces-k | kpw29/normal/1375/D.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); cin.tie(0); cout.tie(0); }
#define eb emplace_back
#define OUT(x) {cout << x; exit(0); }
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define scanf(... | ALGO | 0.999925 | 3.928076 | {
"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": "e97505df6f68... |
7fb04368-8abe-4a56-b677-e8ccf9faa4ff | bark-simulator/bark | bark/world/evaluation/ltl/label_functions/safe_distance_label_function.hpp | // Copyright (c) 2020 fortiss GmbH
//
// Authors: <NAME>, <NAME>, <NAME> and
// <NAME>
//
// This work is licensed under the terms of the MIT license.
// For a copy, see <https://opensource.org/licenses/MIT>.
#ifndef BARK_WORLD_EVALUATION_LTL_LABELS_SAFE_DISTANCE_LABEL_FUNCTION_HPP_
#define BARK_WORLD_EVALUATION_LTL_L... | TOOL | 0.901975 | 7.671525 | {
"github_metadata": {
"branch": "master",
"commit_count": 3507,
"repo_created_at": "2019-04-03T11:36:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 301,
"forks": 72,
"issues": 9,
"pull_requests": 6
},
"file_meta": {
"content_id": "d13d9... |
8b86a732-969e-41ad-b296-0121013f6284 | evrimulgen/Studies | L2/S3/HLIN302/TD_TP/essais/population-vivanteV1.cpp | #include <iostream>
#include <cstdlib>
#include <exception>
#include "population-vivante.h"
using namespace std;
#define CHECK_BOUND(i,j) \
if (i>=N || j>=N){ \
std::cout<<"Accessing a Cell at ("<<i<<","<<j<<") out of range ... aborting"<<std::endl; \
std::terminate(); \
} \
cons... | ALGO | 0.996543 | 4.350986 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-01-29T12:03: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": "91974a55af... |
9057bc6d-9d08-45dc-bac0-b5a8898db36b | yous/acmicpc-net | problem/2263/main.cpp | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int N;
vector<int> inorder;
vector<int> postorder;
vector<int> rev_idx;
void preorder(int root, int inorder_lo, int inorder_hi, int postorder_lo, int postorder_hi) {
if (inorder_lo == inorder_hi) {
return;
}
int inord... | ALGO | 0.999996 | 4.513153 | {
"github_metadata": {
"branch": "master",
"commit_count": 1338,
"repo_created_at": "2013-10-04T22:47:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "218f104... |
eedef369-5b99-40f9-b0cd-927bbff07da1 | yanyp/UCM-MPI-GPU | globalPb/src/math/random/util/randperm.cc | /*
* Functions for random permutations.
*/
#include "collections/abstract/collection.hh"
#include "lang/array.hh"
#include "math/random/generators/rand_gen.hh"
#include "math/random/generators/rand_gen_uniform.hh"
#include "math/random/util/randperm.hh"
#include "math/random/util/sampler.hh"
namespace math {
namespa... | ALGO | 0.999688 | 7.138383 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2018-05-02T14:38:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "2d0d06d18... |
81261df8-1944-4ad5-a816-2cfecda5277d | lakshits11/LeetCode | 2018-check-if-word-can-be-placed-in-crossword/2018-check-if-word-can-be-placed-in-crossword.cpp | // By <NAME>
#include <bits/stdc++.h>
using namespace std;
class Solution
{
private:
bool check(string &a, string &b)
{
if (a.size() != b.size())
return false;
int i, n = a.size();
for (i = 0; i < n; i++)
if (a[i] != b[i] && a[i] != ' ')
break;
... | ALGO | 0.999836 | 5.264462 | {
"github_metadata": {
"branch": "main",
"commit_count": 3865,
"repo_created_at": "2022-04-22T17:18:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "f6872007a... |
8634f287-e116-44cb-9786-8b45f03036c9 | CortlandRoberts/CS141 | CS 141/Spring/labs/ExamLab1.cpp | #include <iostream>
#include <vector>
#include <string>
using namespace std;
int p1(int num1, int num2, int numdif){
cout << "enter a number: ";
cin >> numdif;
cout << endl;
cout << "enter a range of numbers: ";
cin >> num1 >> num2;
for(int i = num1; i <=num2; i++){
if((i % numdif) == 0){
co... | ALGO | 0.979854 | 3.273422 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-03-21T19:52: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": "5ef6f425c146... |
61daad26-ad99-48fa-8dcf-a15c8540de33 | chenxli/Leetcode | 409.longest-palindrome.cpp | /*
* @lc app=leetcode id=409 lang=cpp
*
* [409] Longest Palindrome
*
* https://leetcode.com/problems/longest-palindrome/description/
*
* algorithms
* Easy (48.58%)
* Likes: 656
* Dislikes: 66
* Total Accepted: 114.3K
* Total Submissions: 233.6K
* Testcase Example: '"abccccdd"'
*
* Given a string w... | ALGO | 0.999778 | 6.236108 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-08-14T15:24: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": "c4b18999b6... |
de8ccd9e-c299-45e1-a2b2-fe7ca5e9a109 | romeric/Fastor | Fastor/tensor_algebra/strided_contraction.h | #ifndef REDUCIBLE_CONTRACTION_H
#define REDUCIBLE_CONTRACTION_H
#include "Fastor/tensor/Tensor.h"
#include "Fastor/tensor_algebra/indicial.h"
namespace Fastor {
// Broadcast-vectorisable contractions (if last dimension is contracted).
// Requres working on general strides
template<class T, class U>
struct extrac... | ALGO | 0.963533 | 6.067856 | {
"github_metadata": {
"branch": "master",
"commit_count": 778,
"repo_created_at": "2016-05-24T01:40:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 795,
"forks": 76,
"issues": 31,
"pull_requests": 2
},
"file_meta": {
"content_id": "c379... |
6091a77b-3bfa-4a0c-9229-cd78acc607fc | beingamanforever/cses-erdos-project_euler | CSES/Factory_Machines.cpp | /**
* author: compounding
* created: 2024-09-24 18:17:19
**/
#include <bits/stdc++.h>
using namespace std;
mt19937_64 RNG(chrono::steady_clock::now().time_since_epoch().count());
#define NeedForSpeed \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.ti... | ALGO | 0.999972 | 6.082584 | {
"github_metadata": {
"branch": "main",
"commit_count": 79,
"repo_created_at": "2024-09-12T17:06:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dce135a5fa8... |
4e75b1f5-f99e-4568-a3fe-e11ebe2250c9 | Maestrial-Unal/Proyecto-Sistemas-Distribuidos | 1. Secuencial/main.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <time.h>
using namespace std;
#define GAME_SIZE 3
#define MAX_CHILD 4
// __ __ __
// |__|__|__|
// |__|__|__|
// |__|__|__|
//
vector<string> states_checked;
// Problema - PUZZLE
struct state
{
int game_matrix[GAME_SIZE][GAM... | ALGO | 0.999935 | 5.067193 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2021-11-11T16:19:53.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bbd85089eb9c... |
6b151769-48d3-40ef-a254-4f066ed1a9c4 | 123Anushri/Customized-Standard-Template | Coustomized Standard Template.cpp | //Generic
#include<iostream>
using namespace std;
template <typename T>
struct node
{
T data;
struct node *next;
struct node *prev;
};
template <class T>
class SinglyLL
{
private:
node<T>* first;
int size;
public:
SinglyLL();
void InsertFirst(T);
void InsertLast(T);
void Inser... | ALGO | 0.993938 | 4.258729 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-07-13T19:53: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": "3fb439fc40c0... |
5c7b65c2-fbc0-4f4b-aede-7e241b5b5ee2 | Ayusohm432/Coding | ProblemOfTheDay/Unstop/24.10,2024_Factorial Buzz.cpp | /*
Problem Link : https://unstop.com/code/practice/304230
*/
/*Factorial Buzz
Problem Statement
Marfi is obsessed with the factorial of numbers, he has an array of N integers and he wants to print the maximum number of trailing zeros in factorial of the all numbers
Help Marfi to find the maximum number of leading z... | ALGO | 0.999656 | 5.924793 | {
"github_metadata": {
"branch": "main",
"commit_count": 1002,
"repo_created_at": "2024-06-14T10:35:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0ef6025d2... |
004a322c-39f4-4d69-824c-a41187c0ab1b | ZeroOneTaT/Algorithms | sort/heapsort.cc | /*
* @Author: ZeroOneTaT
* @Date: 2023-05-21 16:44:07
* @LastEditTime: 2023-05-21 17:25:50
* @FilePath: \MyTest\sort\heapsort.cc
* @Description:
*
* Copyright (c) 2023 by ZeroOneTaT, All Rights Reserved.
*/
#include <bits/stdc++.h>
using namespace std;
// 建立小根堆 / 大根堆
void heapify(vector<int> &arr, int start, i... | ALGO | 0.999919 | 5.153677 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2023-05-21T06:39: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": "3d9d5e3c3c... |
d2f63094-f9e2-4621-9f64-0a02fb946711 | malvarez27/Intro-To-Programming-C- | Labs.cpp/Homework3(part2).cpp/Homework3(part2).cpp/main.cpp | //<NAME>
// main.cpp
// Homework3(project 2).cpp
// CPSC 120-07
// Will drop the highest and lowest scores and average out the three leftover scores.
// Created by <NAME> on 4/30/16.
// Copyright © 2016 <NAME>. All rights reserved.
#include <iomanip>
#include <iostream>
#include <string>
#include <cmath>
#include <io... | ALGO | 0.999621 | 4.942694 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-09-20T05:18: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": "22398aa570... |
6f2f1943-fd5f-4eae-a6a8-efda20f1f5ce | andreimaximov/algorithms | codeforces/innokenty-and-a-football-league/main.cpp | #include <bits/stdc++.h>
using namespace std; // NOLINT
//
// Returns the 1st first short name option.
//
string first(const string& team) {
return team.substr(0, 3);
}
//
// Returns the 2nd short name option.
//
string second(const string& team, const string& town) {
return team.substr(0, 2) + town.substr(0, 1... | ALGO | 0.999989 | 5.23067 | {
"github_metadata": {
"branch": "master",
"commit_count": 204,
"repo_created_at": "2015-07-01T05:40:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 110,
"forks": 45,
"issues": 0,
"pull_requests": 5
},
"file_meta": {
"content_id": "0ed2c... |
7e0a7618-cb6d-4c86-beb9-8f4d2e94820c | Mahmoudezzat00/C-plus-plus | Assignments/End Year - Counting Squares/CountingSquares.cpp | #include <iostream>
#include <cstdlib>
#include <vector>
#include <algorithm>
//for random
#include <ctime>
//Define new type for vector
typedef std::vector<int> b_vec;
//MAX SIZE OF BOARD
#define Max_Size 15
//Define the size of the game board
b_vec ResizeVector(b_vec GameVector, int Rows, int Columns)
{
Game... | ALGO | 0.997607 | 4.942358 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-12-15T00:29: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": "e499f04c5885... |
abb8d070-c6dd-493f-9182-8f7b570f7d38 | gemastik/pemrograman-2016 | pemanasan/fizzbuzz/runner.cpp | #include "tcframe/runner.hpp"
using namespace tcframe;
#include <bits/stdc++.h>
using namespace std;
class Problem : public BaseProblem {
protected:
int T;
int N,K;
vector<int> M;
vector<string> S;
vector<string> RES;
void Config() {
setSlug("fizzbuzz");
setTimeLimit(2);
... | ALGO | 0.999688 | 4.566267 | {
"github_metadata": {
"branch": "master",
"commit_count": 122,
"repo_created_at": "2018-08-20T15:15:43.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac7a0e170... |
03e7e183-9af3-41c4-9a04-f9d5497842fc | ijuarezb/InterviewBit | 06_HeapsAndMaps/LFU_Cache.cpp | // C++ program for LFU cache implementation
// #include <bits/stdc++.h>
#include "/Users/ivanjuarez/stdc++.h"
#include <map>
#include <unordered_map>
using namespace std;
// Generic function to swap two pairs
void swap(pair<int, int>& a, pair<int, int>& b) {
pair<int, int> temp = a;
a = b;
b = temp;
}
// ... | ALGO | 0.999788 | 5.448932 | {
"github_metadata": {
"branch": "master",
"commit_count": 199,
"repo_created_at": "2019-09-09T17:01:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "448ee66e... |
f21ff2dd-07bf-44ac-bc37-e8d69a4d43f7 | RunzeZ0710/Competitive-Programming | Codeforces/practice/middleclass.cpp | #include <cstdio>
#include <algorithm>
#include <string>
#include <cmath>
#include <iostream>
#include <vector>
#include <numeric>
#include <set>
#include <map>
#include <tuple>
using namespace std;
using ll = long long;
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
int t; cin >> t;
while(t--){
int n; cin... | ALGO | 0.999681 | 3.92963 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-07-22T15:30: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": "a7c66f4767dd... |
90b0832e-438f-4963-8376-89d8fc7dd70b | ABKGroup/TritonRoute-WXL | src/io/frShapeUtil.cpp | /* Authors: <NAME> and <NAME> */
/*
* Copyright (c) 2019, 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 the following conditions are met:
* * Redistributions of source code ... | ALGO | 0.997912 | 5.662336 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-11-03T02:36:37.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 31,
"forks": 9,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "8b1cd63dca... |
f60c487a-6bb7-4379-ae68-abf81728ce38 | vm-iiit/Btree_OrderedSet_MedianIntegerStream | 2019201033_Q3.cpp | #include<iostream>
using namespace std;
typedef float ll;
typedef struct AVL_node node;
struct AVL_node{
ll val;
ll height;
ll bal_fact;
ll left_c;
ll right_c;
struct AVL_node* left = NULL;
struct AVL_node* right = NULL;
};
node* newAVLnode(ll data)
{
node* cnode = new struct AVL_node;
cnode->val = data;
c... | ALGO | 0.999992 | 4.598979 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2019-09-08T14:16:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d7addaae8... |
1bdaee71-6297-4f0f-aca8-645f7f2ac8d2 | kyhoon001/TIL | 알고리즘공부/알고리즘특강/백준 -16987 계란으로 바위치기.cpp | #define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<string.h>
#include<vector>
using namespace std;
int n;
int arr[10][2];
int check[10]; // 0은 내구도 // 1은 무게
int answer = -1;
void solve(int a) {
if (a == n) {
int cnt = 0;
for (int i = 0; i < n; i++) {
if (arr[i][0] <= 0) cnt++;
}
... | ALGO | 0.99999 | 3.757328 | {
"github_metadata": {
"branch": "master",
"commit_count": 192,
"repo_created_at": "2019-12-09T08:40: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": "7d6b45e3... |
1e02d7e9-9475-41ee-9ca0-3109cac5cd97 | sandialabs/shoe | Common/Elements/Quadrilateral.cxx | /*
* Copyright 2012 Sandia Corporation.
* Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive
* license for use of this work by or on behalf of the
* U.S. Government. Redistribution and use in source and binary forms, with
* or without modification, are permitted provided that this Notice and a... | ALGO | 0.993715 | 5.105725 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2024-04-10T16:43:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dc78271afa2... |
facfb70e-1424-4c14-9509-72b4764dec4a | frooms/stira | stira/filter/filter/DifferenceOfGaussians.cpp | /***********************************************************************************
* Copyright (C) 2011 by <NAME> *
* *
* Terms and conditions for using this software in any form are provi... | ALGO | 0.933435 | 5.96331 | {
"github_metadata": {
"branch": "master",
"commit_count": 292,
"repo_created_at": "2015-04-27T19:28:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b41fefd... |
5bce6278-22f9-4ec2-82f3-f7287b2574b6 | JunQiu0/ProblemasYAlgoritmos | C++/FALProblema12/FALProblema12.cpp | // Nombre del estudiante:<NAME>
// Usuario del juez:A62
#include <iostream>
#include <fstream>
#include <vector>
#include <algorithm>
#include <utility>
// Explicación del algoritmo utilizado : Algoritmo de Partición,se basa en los tres marcadores de colores de cinta : p k q (azul,verde,rojo). Pasamos toda la caja ,c... | ALGO | 0.998834 | 4.649765 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-05-07T07:50: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": "d2b255152b18... |
3e4beeaf-726f-435d-b51e-c7d81d9bb01e | SonikPr/CaesarPasswordEncryption_library | SonikCeasarEncryption/SonikEncrypt_1.0.cpp | #include <string>
#include <math.h>
#define DictionaryLength 77
int EncryptionShift = 7;
char dictionary[DictionaryLength] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-/";
using namespace std;
void SetEncryptionShift(int value) { //Сдвиг только вправо (версия библиотеки 1.0)
Encry... | TOOL | 0.98587 | 3.8045 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2022-08-12T14:49:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "70d94d7297... |
01403ed4-29f5-4e7d-816d-83d87a4238a2 | nandakishoremmn2/vmpcfc | grid.cpp | #include <fstream>
#include <cmath>
#include <cstdlib>
#include "grid.h"
Grid::Grid(real M, real Gamma, real Tau, int m, int n, real R_max, real nrtol, real Tol)
{
nr = m;
nt = n;
r_max = R_max;
NRtol = nrtol;
tol = Tol;
gamma = Gamma;
alpha = gamma / ( gamma - 1 );
tau = Tau;
lambda2 = ( 1 - tau ) / ( 1... | ALGO | 0.999412 | 3.581845 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2015-03-29T21: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": "912c43bf2... |
118364f1-8407-42aa-bf2c-e73fd5461977 | harshjoeyit/CP | OOP/classes_templates_3.cpp | #include<bits/stdc++.h>
using namespace std;
template <typename T>
void print(initializer_list<T> args) {
for(auto arg: args) {
cout << arg << " ";
}cout << endl;
}
// using vaiadic templates
// base case for recursive call
void print() {
cout << endl;
}
// template parameter pack
template <... | TOOL | 0.97804 | 6.016026 | {
"github_metadata": {
"branch": "master",
"commit_count": 166,
"repo_created_at": "2019-11-12T11:29:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "67a977be... |
704563c2-82da-47bd-95f0-d14b7222de5c | shikhargarg15/LAB | midpoint_circle_Source.cpp | #include <iostream>
#include <GL/glut.h>
using namespace std;
int xcenter, ycenter, r;
void plot_point(int x, int y)
{
glBegin(GL_POINTS);
glVertex2i(xcenter + x, ycenter + y);
glVertex2i(xcenter + x, ycenter - y);
glVertex2i(xcenter + y, ycenter + x);
glVertex2i(xcenter + y, ycenter - x);
glVertex2i(xcenter - ... | ALGO | 0.997565 | 5.709987 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-03-20T16:46:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "796f15147d46... |
b008be15-d7ed-4ddd-959d-fa26b23d2d89 | ishandutta2007/codeforces-y | yuu/normal/962/C.cpp | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, j, k) for(int i=(j); i<=(k); i++)
#define FFOR(i, j, k) for(int i=(j); i<(k); i++)
#define DFOR(i, j, k) for(int i=(j); i>=(k); i--)
#define bug(x) cerr<<#x<<" = "<<(x)<<'\n'
#define pb push_back
#define mp make_pair
#define setbit(s, i) (s|=(1LL<<(i)))
#defi... | ALGO | 0.999542 | 3.496697 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:40: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": "2ae3b8e698de... |
401fc9b2-8bf0-4fe0-a3b4-a5de76269381 | ishandutta2007/codeforces-s | sergeifedorov/normal/167/E.cpp | #include <cstdio>
#include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <ctime>
#include <cstring>
#include <cassert>
#include <bitset>
#include <sstream>
using namespace std;
#define forn(i, n) for(int i = 0; i < (int)(n); i++)
#define fo... | ALGO | 0.999954 | 4.172692 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c9fd49fb066a... |
ec773328-4edc-4191-a709-f23afa8f035b | mahaozair/DS2-Project--Tango-Tree-Application | TDS.cpp | // #include "TDS.hpp"
// #include <algorithm>
// #include <iostream>
// #include <stack>
// #include <functional>
// using namespace std;
// TangoTree::TangoTree() : referenceRoot(nullptr), root(nullptr) {}
// TangoTree::~TangoTree() {
// clearTree(referenceRoot);
// // Note: auxTrees nodes are destroyed when... | ALGO | 0.99945 | 5.422142 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2025-04-09T07:42:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9d90926960a... |
e594c134-a2dd-4cd8-b2b0-61252d1c7088 | lavish002/Data-Structures-Algorithms | Rat in a Maze Problem - I - GFG/rat-in-a-maze-problem-i.cpp | // { Driver Code Starts
// Initial template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
// User function template for C++
class Solution{
public:
int loc[4][3] = {{0,1,0}, {1,0,1},{0,-1,2},{-1,0,3}};
bool isValid( vector<vector<int>> &m, int x, int y, int n, vector<... | ALGO | 0.999806 | 5.891626 | {
"github_metadata": {
"branch": "main",
"commit_count": 382,
"repo_created_at": "2022-04-16T12:23:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7657ad88f6... |
f3058e80-b547-4b2c-bd12-0e29abfc6911 | rishisankar/icpc | kattis/trees/hyacinth.cpp | #include <bits/stdc++.h>
using namespace std;
#define PI 3.1415926535897932384626433832795
#define MOD 1000000007
#define FOR(i, j, k) for (int i=j ; i<k ; ++i)
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define FORI(i, j, k, in) for (int i=j ; i<k ; i+=in)
#define RFOR(i, j, k) for (int i=j ; i>=k ; --i)
#def... | ALGO | 0.999991 | 4.292368 | {
"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": "fe394c0158... |
17125935-0c1f-4839-b76f-2774a94c5b3f | hmipakchi/FinalYearProject | Code/InferenceAlgorithms/UNIX/snap/kronecker.cpp | #include "stdafx.h"
#include "kronecker.h"
/////////////////////////////////////////////////
// Kronecker Graphs
const double TKronMtx::NInf = -DBL_MAX;
TRnd TKronMtx::Rnd = TRnd(0);
TKronMtx::TKronMtx(const TFltV& SeedMatrix) : SeedMtx(SeedMatrix) {
MtxDim = (int) sqrt((double)SeedMatrix.Len());
IAssert(MtxDim*M... | ALGO | 0.999641 | 4.100148 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2013-10-03T07:47:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6d42e65b1... |
32f430fc-de59-4af7-8745-d9ac914d009b | arpit23697/For-Uva-solutions | Graph/specialGraph/10054/10054.cpp | #include <bits/stdc++.h>
using namespace std;
map <int , pair <int , int >> map1;
map <pair <int , int > , int> map2;
vector <vector <int> > colors;
int n;
vector <bool> taken;
int main ()
{
freopen("in.txt" , "r" , stdin);
freopen("out.txt" , "w" , stdout);
int test;
cin >> test;
//cout << tes... | ALGO | 0.999786 | 4.116433 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2018-01-04T19:37: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": "ce84501a1... |
e524a58b-af9c-4073-b757-41211f9c9155 | isaacdejesus/Languages | dsa_algo/topics/Recursion/cpp/backtracking.cpp | #include <iostream>
#include <vector>
void path(std::string, int , int );
int count(int r, int c);
std::vector<std::string> path_results(std::string, int, int);
std::vector<std::string> path_results_diagonal(std::string, int, int);
void path_obstacles(std::string, std::vector<std::vector<bool>>, int, int);
void all_pa... | ALGO | 0.99907 | 4.057615 | {
"github_metadata": {
"branch": "main",
"commit_count": 179,
"repo_created_at": "2021-11-27T18:50: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": "9039168a09... |
83700963-7c57-40f0-a108-38e0f145c149 | dodo673352/six-servo-motor | surprising_gogo1.ino | // C++ code
//
#include <Servo.h>
int position = 0;
int i = 0;
int j = 0;
Servo servo_6;
Servo servo_5;
Servo servo_4;
Servo servo_3;
Servo servo_2;
Servo servo_1;
void setup()
{
servo_6.attach(6, 500, 2500);
servo_5.attach(5, 500, 2500);
servo_4.attach(4, 500, 2500);
servo_3.attach(3, 500, 2500);
... | ALGO | 0.947078 | 4.91235 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-08-07T19:11: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": "b0dcbcd71a19... |
7dfff554-b6e9-47a9-b450-f61cadaec7ea | ACM-TOMS/CALGO | 0940/Original-Submission/Src/ThirdParty/armadillo-3.6.3/include/armadillo_bits/op_inv_bones.hpp | // Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
// Copyright (C) 2008-2011 <NAME>
//
// This file is part of the Armadillo C++ library.
// It is provided without any warranty of fitness
// for any purpose. You can redistribute this file
// and/or modify it under the terms of the GNU
// Lesser General Public Licens... | ALGO | 0.979721 | 6.607814 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2021-11-17T18:24:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11,
"forks": 1,
"issues": 9,
"pull_requests": 0
},
"file_meta": {
"content_id": "3becd870b15... |
3fd578b6-4647-416c-b1b8-de9f82f8b9a2 | czimaginginstitute/AreTomo3 | AreTomo/FindCtf/CCorrImgCtf.cpp | #include "CFindCtfInc.h"
#include <math.h>
#include <stdio.h>
#include <memory.h>
#include <cuda.h>
#include <cuda_runtime.h>
using namespace McAreTomo::AreTomo;
using namespace McAreTomo::AreTomo::FindCtf;
static float s_fD2R = 0.0174532f;
//------------------------------
// Debugging code
//------------------------... | ALGO | 0.978964 | 5.543638 | {
"github_metadata": {
"branch": "main",
"commit_count": 72,
"repo_created_at": "2024-02-05T21:29:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 30,
"forks": 5,
"issues": 14,
"pull_requests": 0
},
"file_meta": {
"content_id": "8ce631efae... |
435a55af-8d5f-49d4-bb6f-0233494090fd | hanumanb/Trillions | packages/tempus/src/Tempus_StepperDIRK_impl.hpp | // @HEADER
// ****************************************************************************
// Tempus: Copyright (2017) Sandia Corporation
//
// Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
// ****************************************************************************
// @... | TOOL | 0.916223 | 6.482384 | {
"github_metadata": {
"branch": "master",
"commit_count": 73513,
"repo_created_at": "2017-03-23T12:20: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": "7cb518... |
17db98fb-abcc-44ac-acb3-6de0f095a804 | EhsanShahbazii/Quera-Problem-Solutions | Tournonment/ZinniS1.cpp | #include <iostream>
using namespace std;
int main()
{
int nIndex;
int mIndex;
cin >> nIndex;
cin >> mIndex;
int a[nIndex][mIndex];
int sum = 0;
for (int i = 0; i < nIndex; i++) {
for (int j = 0; j < mIndex; j++) {
cin >> a[i][j];
}
}
f... | ALGO | 0.999995 | 3.780975 | {
"github_metadata": {
"branch": "main",
"commit_count": 674,
"repo_created_at": "2022-09-28T09:41:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 17,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0953c7706... |
b2d3bc52-c2ad-4975-8ab4-79a0179666d3 | yixin-cfd/unstructured_2d | src/forces.cpp | /// @file forces.cpp
///
/// Computation of forces and moments.
///
//*****************************************************************************
//
// (c) <NAME>, CFD Consulting & Analysis, www.cfd-ca.de
// Created February 15, 2014
// Last modification: July 5, 2014
//
//========================================... | ALGO | 0.998425 | 6.085996 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-11-04T03:11:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dbeb5d027ad4... |
2a2cde06-c74a-4b36-b7a5-c33525d2d85f | tunabrain/tungsten | src/thirdparty/embree/kernels/bvh/bvh_traverser1.h | // ======================================================================== //
// Copyright 2009-2016 Intel Corporation //
// //
// Licensed under the Apache License, Version 2.0 (the "License"); //
// y... | ALGO | 0.999441 | 6.6134 | {
"github_metadata": {
"branch": "master",
"commit_count": 985,
"repo_created_at": "2014-09-15T18:38:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1798,
"forks": 172,
"issues": 14,
"pull_requests": 4
},
"file_meta": {
"content_id": "56... |
fbb157a2-07d9-45b7-8733-6f0f3d1e9153 | dp2003/FundamentalsOfCS | RoundRobin1.cpp | #include<iostream>
using namespace std;
void findWaitingTime(int processes[], int n,
int bt[], int wt[], int quantum)
{
int rem_bt[n];
for (int i = 0 ; i < n ; i++)
rem_bt[i] = bt[i];
int t = 0; // Current time
while (1)
{
bool done = true;
for (int i = 0 ; i < n; i++)
{
if (rem_bt[i] > 0)
... | ALGO | 0.999942 | 4.253686 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-10-25T14:40: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": "555b5883836d... |
78173638-d491-4a74-81fc-04b4a028ac8f | loannt401/CPP_PTIT | 2.UOCSO_UOCCHUNGLONNHAT_x/CPP0119_uocsochiahetcho2.cpp | #include<iostream>
#include<cmath>
using namespace std;
/*
Hai trường hợp:
- Số không chia hết cho hai
- Số chia hết cho hai
+ số lũy thừa 2
+ số (2^k)*m (m là số lẻ)
vd:
100 = 2^2 * 25
Các ước của 25 bao gồm 1, 5 và 25, vậy ta sẽ có 6 số:... | ALGO | 0.999743 | 4.151748 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-02-24T14:36: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": "029d9b3e2c55... |
d883042d-ac3b-4369-b743-df66943187cb | eltonrawn/contests | codeforces/13_global/a.cpp | #include<bits/stdc++.h>
using namespace std;
#define MOD 998244353
#define SZ 100010
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef long long LL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_poli... | ALGO | 0.999919 | 4.811528 | {
"github_metadata": {
"branch": "main",
"commit_count": 177,
"repo_created_at": "2021-03-04T12:49: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": "c2545389bf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.