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 |
|---|---|---|---|---|---|---|---|
06a52efd-068d-4cf9-8088-ef86b47c58cd | hljeong/cp | kattis/abandonedanimal.cpp | #include <bits/stdc++.h>
#define A first
#define B second
#define vc vector
#define pb push_back
using namespace std;
using ll = long long; using ld = long double;
using vi = vc<int>; using vll = vc<ll>;
using si = set<int>; using sll = set<ll>;
using pii = pair<int, int>; using mii = map<int, int>;
using gr = vc<vi>; ... | ALGO | 0.99994 | 4.549094 | {
"github_metadata": {
"branch": "main",
"commit_count": 71,
"repo_created_at": "2022-03-04T08:01: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": "7986fd880be... |
791c5e27-3136-48f2-88c4-bf87406b9bb9 | abgandar/IDEA | src/include/idea.h | #include <dace/dace.h>
template <class T>
class RHS
{
public:
virtual DACE::AlgebraicVector<T> operator()(double t, const DACE::AlgebraicVector<T> &x);
virtual DACE::AlgebraicVector<T> f(double t, const DACE::AlgebraicVector<T> &x) = 0;
};
template <class T>
DACE::AlgebraicVector<T> RHS<T>::operator()(doubl... | ALGO | 0.999818 | 5.353467 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2018-11-09T09:39:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "591f13bf3... |
7dd8fc77-40c4-4186-b1c4-1a17c93a7d82 | AdaCompNUS/despot | include/despot/solver/pomcp.h | #ifndef POMCP_H
#define POMCP_H
#include <despot/interface/pomdp.h>
#include <despot/core/node.h>
#include <despot/core/globals.h>
namespace despot {
/* =============================================================================
* POMCPPrior class
* ===============================================================... | ALGO | 0.999639 | 6.747937 | {
"github_metadata": {
"branch": "API_redesign",
"commit_count": 241,
"repo_created_at": "2015-06-26T05:56:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 257,
"forks": 105,
"issues": 6,
"pull_requests": 2
},
"file_meta": {
"content_id": ... |
57692e7a-f65d-431b-a7a2-eafef2152e54 | halo-project/halo | tools/haloserver/Bakeoff.cpp | #include "halo/tuner/Bakeoff.h"
#include "halo/tuner/TuningSection.h"
#include "halo/tuner/CodeVersion.h"
#include "halo/server/ClientGroup.h"
#include "halo/nlohmann/util.hpp"
#include <cmath>
#include <algorithm>
namespace halo {
BakeoffParameters::BakeoffParameters(nlohmann::json const& Config) {
SWITCH_RATE = ... | ALGO | 0.977107 | 6.427372 | {
"github_metadata": {
"branch": "master",
"commit_count": 624,
"repo_created_at": "2019-06-26T19:18:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 27,
"forks": 0,
"issues": 17,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0e07f0... |
6cb21343-701a-4d34-bc9a-ac246595196c | DishaSharma-dev/leetcode | leetcode/Easy/Two_Sum_IV.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.99999 | 6.461918 | {
"github_metadata": {
"branch": "main",
"commit_count": 299,
"repo_created_at": "2021-10-19T12:18:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a37ed9d2a6... |
ba85693e-efab-4578-a146-8cac33faa183 | yuanyupeng0000/CPP_2020520 | caffe_cambricon/src/caffe/src/caffe/layers/crelu_layer.cpp | /*
All modification made by Cambricon Corporation: © 2018-2019 Cambricon Corporation
All rights reserved.
All other contributions:
Copyright (c) 2014--2019, the respective contributors
All rights reserved.
For the list of contributors go to https://github.com/BVLC/caffe/blob/master/CONTRIBUTORS.md
Redistribution and us... | DATA | 0.941427 | 7.850029 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2020-05-20T07:41:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 17
},
"file_meta": {
"content_id": "fad25700... |
96f3cd56-aea0-4271-a646-8fc08e68ab5c | wiwitrifai/competitive-programming | codeforces/369_2/e.cpp | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e6 + 3;
long long powmod(long long b, long long p) {
long long ret = 1;
while (p) {
if (p & 1)
ret = (ret * b) % mod;
b = (b * b) % mod;
p >>= 1;
}
return ret;
}
int main() {
long long n, k;
cin >> n >> k;
long long kk = ... | ALGO | 0.999965 | 4.409226 | {
"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": "96aa2f5... |
c9c44b2d-2f27-4079-a027-c10b9e11f054 | Xilinx/Vitis_Libraries | dsp/L2/include/aie/fir_decimate_sym_graph.hpp | /*
* Copyright (C) 2019-2022, Xilinx, Inc.
* Copyright (C) 2022-2025, Advanced Micro Devices, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licens... | ALGO | 0.990041 | 6.834083 | {
"github_metadata": {
"branch": "main",
"commit_count": 471,
"repo_created_at": "2019-09-23T19:13:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 988,
"forks": 381,
"issues": 0,
"pull_requests": 12
},
"file_meta": {
"content_id": "73abc7... |
adfc1b2c-c432-40b6-83cb-c8a4b8c66cff | b3lchior/DA_TP1 | headers/GraphAlgorithms.h | //
// Created by tomas on 17/03/2023.
//
#ifndef DA_TP1_GRAPHALGORITHMS_H
#define DA_TP1_GRAPHALGORITHMS_H
#include "Graph.h"
struct MaxTrainPair {
Vertex* station1;
Vertex* station2;
int numTrains;
};
struct AfectedStation{
Vertex* station;
int numTrainsBefore;
int numTrainsAfter;
};
struct ... | ALGO | 0.986006 | 5.379098 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2023-03-13T17:29: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": "45247db4c10... |
d7673c7a-ce68-4704-9275-be4e7d34623e | wassimalharaki/algorithms | geometry/smallest_largest_triangle.cpp | /**
* 12:17:16 9/21/24
* O
*/
// ./ICPC/Geometry/Medium/O.cpp
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define uint unsigned int
#define double long double
#define fast ios_base::sync_with_stdio(false);cin... | ALGO | 0.999613 | 4.414714 | {
"github_metadata": {
"branch": "main",
"commit_count": 54,
"repo_created_at": "2024-04-11T16:28:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "00f615af0c1... |
7a044d5d-adcf-4110-84db-322ed10a0989 | lalala9813/Ejercicios-de-Programacion- | Ejercicios de Programacion!/Ejercicio 4/main.cpp | #include <iostream>
using namespace std;
bool Primo(int numero)
{
int divisores = 0;
for(int i = 1; i <= numero; i++)
{
if(numero % i == 0)
{
divisores++;
}
}
bool x;
if(divisores == 2)
{
x = true;
return x;
}
else
{
... | ALGO | 0.999577 | 4.111788 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-01-16T16:42:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2dfaac4065... |
eab77605-7b26-44ab-bad0-b4b6b51469fc | baibaixue/acm | string定义.cpp | #include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
class String{
public:
String(){//默认构造函数
buf=NULL;
}
String(const char* s){//构造函数
buf=new char[strlen(s)+1];
strcpy(buf,s);
}
String(const String& rhs){//复制构造函数
buf=new char[strlen(rhs.buf)+1];
strcpy(buf,rhs.buf);
... | TOOL | 0.967974 | 3.842908 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-07-05T15:12: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": "6e9efa50a4... |
9b197436-3c56-4d48-8e41-d75649a56e3a | kikiinthebuilding/Baekjoon_Algorithm | 백준/Gold/11559. Puyo Puyo/Puyo Puyo.cc | #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <memory.h>
using namespace std;
vector<string> field(12);
bool flag[12][6];
int cnt = 0;
int dy[4] = { -1, 1, 0, 0 };
int dx[4] = { 0, 0, -1, 1 };
bool chain(int y, int x, char c) {
queue<pair<int, int>> q;
vector<pair<int, int>> v;
... | ALGO | 0.999734 | 3.864143 | {
"github_metadata": {
"branch": "main",
"commit_count": 227,
"repo_created_at": "2024-08-02T05:32:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "78bf61f0f6... |
5c850be4-f3e2-4267-9809-68abf42e00c6 | stp/stp | include/stp/Simplifier/constantBitP/ConstantBitPropagation.h | /********************************************************************
* AUTHORS: <NAME>
*
* BEGIN DATE: Jul 5, 2010
*
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, includ... | ALGO | 0.989276 | 5.590869 | {
"github_metadata": {
"branch": "master",
"commit_count": 3188,
"repo_created_at": "2013-08-27T00:53:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 547,
"forks": 142,
"issues": 51,
"pull_requests": 5
},
"file_meta": {
"content_id": "271... |
cd1b3433-2963-4597-b7b7-4c887777514b | studouglas/GEANT4-GPU | geant4.10.02/source/processes/electromagnetic/polarisation/src/G4PolarizedMollerCrossSection.cc | //
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration... | ALGO | 0.940729 | 5.221313 | {
"github_metadata": {
"branch": "master",
"commit_count": 518,
"repo_created_at": "2015-09-13T23:36:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 40,
"forks": 18,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d7534e... |
c0bea2e3-9b92-4dc7-b2a8-90f5f9c8ba74 | austinJames96/CS431 | Cache Management Project/Cache_Management.cpp | //
// Cache_Management.cpp
//
//
// Created by <NAME> on 12/6/19.
//
#include "Cache_Management.hpp"
#include <stdio.h>
#include <iostream>
#include <string>
#include <math.h>
#include <time.h>
#include <stdlib.h>
using namespace std;
int EffectiveAccessTime(int memoryAccessTime, int TLBAccessTime, int hit_rati... | ALGO | 0.992347 | 4.934451 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2019-11-04T14:58: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": "bcff91fad5... |
8ebd154b-f6de-4957-b9b1-60f0fc77015c | stonne-simulator/stonne | pytorch-frontend/caffe2/sgd/adagrad_fused.h | #pragma once
#include "caffe2/sgd/adagrad_op.h"
#include "caffe2/sgd/math_lp.h"
namespace caffe2 {
namespace {
template <
typename Tdata, // embedding and momentum types
typename T, // everything else
typename TLengths,
typename adagradT,
bool is_mean = false>
class SparseAdagradFusedWithSparseL... | ALGO | 0.982099 | 7.405457 | {
"github_metadata": {
"branch": "master",
"commit_count": 90,
"repo_created_at": "2020-12-01T17:24:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 134,
"forks": 30,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3f7f44... |
e9cb78d9-642e-4897-ba22-eb6ce528b4fb | SapogMl/Klotski-02-2023 | Klotski/Main.cpp | #include<iostream>
#include"Header.h"
void solveKlotskiPuzzle()
{
char empty = '.'; char immov = '-';
int w, h;
cout << "Ширина игрового поля = ";
cin >> w;
cout << "Высота игрового поля = ";
cin >> h;
string start;
char c;
cout << "Игровое поле. Разные блоки обозначайте разными символами. Точка (.) обознач... | ALGO | 0.999038 | 3.556467 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2023-04-24T06:21: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": "f035d98beb2... |
0896f460-574b-491a-9583-a7167d888dc7 | suman105/LeetCode-Top-100-Liked-Problems | Graph/207. Course Schedule.cpp | class Solution {
public:
bool dfs(int course, vector<vector<int>>& adj, vector<int>& state) {
if (state[course] == 1) return false; // Cycle detected
if (state[course] == 2) return true; // Already processed
state[course] = 1; // Mark as visiting
for (in... | ALGO | 0.999817 | 6.458476 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2025-02-22T10:10: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": "c43646c9065... |
916c3cec-2941-457e-b0e4-2a1a0e180b65 | xu20160924/leetcode | leetcodecpp/leetcode/SixEightFour.cpp | //
// Created by John on 2020/3/28.
//
#include "vector"
using namespace std;
class UnionFindSet{
public:
UnionFindSet(int n) {
ranks_ = vector<int>(n + 1, 0);
parents_ = vector<int>(n + 1, 0);
for (int i = 0; i < parents_.size(); i++) {
parents_[i] = i;
}
}
... | ALGO | 0.999771 | 5.811866 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2020-04-04T06:57:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "e4dd22100... |
ff088469-be7b-4e5c-b382-0149201cfd1b | codingksj/Baekjoon-Solution | 백준/05000~05999/05100~05199/05169.cpp | #include<iostream>
#include<sstream>
#include<bitset>
#include<set>
#include<unordered_map>
#include<map>
#include<vector>
#include<queue>
#include<deque>
#include<stack>
#include<algorithm>
#include<string>
#include<numeric>
#include<cmath>
#include<cctype>
#include<cstring>
#include<iomanip>
#include<chrono>
using n... | ALGO | 0.999914 | 4.127985 | {
"github_metadata": {
"branch": "main",
"commit_count": 1562,
"repo_created_at": "2023-08-03T10:44: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": "00d23f55b... |
2ec89ae8-0600-4641-b88e-7e2382a0a3c6 | wallstead/cs302 | project5/SortedList.cpp | // Created by <NAME> and <NAME>.
// Copyright (c) 2017 Pearson Education, Hoboken, New Jersey.
/**
* @file SortedList.cpp
*
* @brief Implementation file for the SortedList class
*
* @author Someone at Pearson (I didn't code any of this)
*
* @details Specifies function of the class.
*
* @version 0.10
*
*/
... | TOOL | 0.991577 | 4.712875 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2016-09-12T20:36: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": "6484eb039... |
740deabb-4a29-484d-a919-6693b65343e4 | lostjared/acidcamGL | source/plugin/alpha_diamond3/alpha.cpp | #include"ac.h"
extern "C" void filter(cv::Mat &frame) {
static constexpr int MAX = 8;
static ac::MatrixCollection<MAX> collection;
if(collection.empty())
collection.shiftFrames(frame);
collection.shiftFrames(frame);
static int index = 0;
static int offset = 0;
static doub... | ALGO | 0.906779 | 4.512117 | {
"github_metadata": {
"branch": "master",
"commit_count": 2537,
"repo_created_at": "2020-02-27T08:20:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 31,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "06d6f8... |
0f9d35bf-4109-4c56-8917-90d559d18fde | y4MhQpykWl4suNiX/ordu | utk_math_lib.h |
#ifndef UTK_BV_UTK_MATH_LIB_H
#define UTK_BV_UTK_MATH_LIB_H
#include "osqp.h"
#include "utk_vector.h"
//template<typename V, typename VV, typename A>
//double if_r(const V& tmpT, const VV& PG, vector<float> &w,
// const A& pdt, int dimen, int k, int rou);
template<typename V, typename VV>
dou... | ALGO | 0.998908 | 4.714471 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-10-01T10:49: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": "2adc1b6c09... |
436d184b-2671-48cd-8e91-cfed10fc48bc | KaynRO/C-Cpp | C++-20181025T075829Z-001/C++/ALGORITMI/lantmaxim/main.cpp | #include <fstream>
#include <queue>
#include <cstring>
using namespace std;
ifstream fin ( "lantmaxim.in" ) ;
ofstream fout ( "lantmaxim.out" ) ;
int n , m , matrix[30][30] , node_start , node_finish , sol[30] , solmax[30] , used[30][30] , st = 0 , maxim = -100 , dist[30] ;
int father[30] ;
queue<int> Q ;
void rea... | ALGO | 0.999956 | 3.417161 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-10-24T18:47:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "950e2fce0e... |
dc491038-5f50-48fd-a1d7-daee5dda0e1d | hyanquiv/EPCC_ADA | Laboratorios/Lab01/Lab01_E04.cpp |
/*
El algoritmo de la burbuja ( Bubblesort ) es uno de los algoritmos más simples de implementar pero ineficiente.
Repetir la actividad del Ejercicio 3 con este algoritmo. Realice un gráfico comparativo entre ambos algoritmos
e indique cual podría ser el tiempo de ejecución del algoritmo Bubblesort.
*/
#include <bits... | ALGO | 0.997862 | 4.966586 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-04-27T20:50: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": "95ffe8d0bef9... |
992222e6-340b-4727-a6b4-b42a8f7e4b1d | Anubhav6205/LeetCode-Practice | check_distances_between_same_letters.cpp | /*You are given a 0-indexed string s consisting of only lowercase English letters, where each letter in s appears exactly twice. You are also given a 0-indexed integer array distance of length 26.
Each letter in the alphabet is numbered from 0 to 25 (i.e. 'a' -> 0, 'b' -> 1, 'c' -> 2, ... , 'z' -> 25).
In a well-spac... | ALGO | 0.999851 | 5.739543 | {
"github_metadata": {
"branch": "main",
"commit_count": 467,
"repo_created_at": "2021-08-16T16:19:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "593d2a7e41... |
48f0969e-4563-40bf-bffd-05a4160bbc75 | sakshgupta/DSA_Self_Paced | 07. Sorting/sort_arr_3_types.cpp | #include <iostream>
using namespace std;
void partition(int arr[], int n)
{
int l = 0, m = 0, h = n - 1;
while (m <= h)
{
if (arr[m] == 0)
{
swap(arr[l], arr[m]);
l++;
m++;
}
else if (arr[m] == 1)
{
m++;
}
... | ALGO | 0.999874 | 4.881168 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2023-04-15T17:11: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": "8d4bcc3ff69... |
e896c0d2-9fd7-41b0-8b16-d6471b0d3fe1 | saif-gitreps/Algorithms | Graph/Network-Delay-Time.cpp | class Solution {
public:
const int INF = 1000000000;
void dijkstra(int s, vector<int> &d, vector<vector<pair<int, int>>> &adj) {
int n = adj.size();
d.assign(n, INF);
vector<bool> u(n, false);
d[s] = 0;
for (int i = 0; i < n; i++) {
int v = -1;
fo... | ALGO | 0.999981 | 5.699267 | {
"github_metadata": {
"branch": "main",
"commit_count": 1012,
"repo_created_at": "2023-02-28T07:05:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a02c7c8c2... |
c0a60447-be3b-43b3-8bdb-cbca293d2e22 | kazeuwu/Akira-CP | VNOI/LongestPalindrome.cpp | /**
* author: akira
* created: 16/06/2023 20:46:58
**/
#include <bits/stdc++.h>
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
#define pb push_back
#define fi first
#define se second
#define llll pair<long long, long long>
typedef long long ll;
typedef long double ldb;
typedef unsigned long long... | ALGO | 0.999919 | 3.794908 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2023-06-20T16:17: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": "eed3685bd8d... |
d8232298-6195-4e97-9b93-94bf2511df30 | Kawser-nerd/CLCDSA | Source Codes/AtCoder/arc050/B/1872254.cpp | #include <algorithm>
#include <cctype>
#include <algorithm>
#include <cctype>
#include <complex>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::to_string;
using std::vector;
using std::set;
using s... | ALGO | 0.999954 | 3.66112 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-09-30T05:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 8,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "56ab4347... |
d42a96de-ba45-4858-bc94-296524a9b7f3 | ml1150258/CSC_CIS_17C | Class/Factorial/main.cpp | /*
* File: main.cpp
* Author: Dr. <NAME>
* Created on April 7th, 2021, 11:51 AM
* Purpose: Factorials
*/
//System Level Libraries
#include <iostream> //I/O Library
#include <cmath> //Math Library
using namespace std; //Library Scope
//User Libraries
//Global Constants
//Science and Math, Conversions,... | ALGO | 0.999114 | 5.636515 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2023-02-15T16:15:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "527c09291... |
974e5bbe-0e16-4087-91ba-6f1ffc73f155 | mikhaeljonathan/online-judges | POJ/1789.cpp | #include <stdio.h>
#include <algorithm>
struct edge{
int begin;
int end;
int dist;
}edges[3000000];
int d(char a[], char b[]){
int ret = 0;
for (int i = 0; i < 7; i++)
if (a[i] != b[i])
ret++;
return ret;
}
bool comparator(edge a, edge b){
return (a.dist < b.dist);
}
int findpar(int par[], int x){
if... | ALGO | 0.999608 | 3.714597 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-06-10T02:36: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": "c1d1d68fece3... |
be1a61c5-f5fe-4a9c-94d5-8fb90473ecec | ia7ck/competitive-programming | AOJ/HUPC2019/day1/A/a.cpp | #include <algorithm>
#include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
int n;
cin >> n;
vector<int> p(4);
rep(i, 4) cin >> p[i];
vector<int> t(4);
rep(i, 4) cin >> t[i];
int ans = 1000000000;
for (int a = 0; a <= n; a++) {
... | ALGO | 0.999887 | 3.635262 | {
"github_metadata": {
"branch": "master",
"commit_count": 1235,
"repo_created_at": "2018-09-24T11:32:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 32,
"pull_requests": 0
},
"file_meta": {
"content_id": "d11771... |
a5382d01-1364-4283-a4ad-e7d3aa53b93e | knuu/competitive-programming | aoj/21/aoj2155.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
typedef vector<int> Vi;
typedef tuple<int, int, int> T;
#define FOR(i,s,x) for(int i=s;i<(int)(x);i++)
#define REP(i,x) FOR(i,0,x)
#define ALL(c) c.begin(), c.end()
#define DUMP( x ) cerr << #x <... | ALGO | 0.999794 | 4.093431 | {
"github_metadata": {
"branch": "master",
"commit_count": 86,
"repo_created_at": "2014-12-11T18:59:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "84d6635db... |
a4cccec3-afa2-4792-b9eb-a2a284fa8be6 | paragns/CPP-codes | remove boxes- maximum score obtained by removing k continuous boxes.cpp | class Solution {
public:
vector<vector<vector<int>>> memo;
int maxPoints(vector<int> &boxes, int i, int j, int k){
if(i > j) return 0;
if(i == j) return k * k;
if(memo[i][j][k] != -1) return memo[i][j][k];
int removeBoxes = maxPoints(boxes, i + 1, j, 1) + (k * k);
... | ALGO | 0.999839 | 5.172366 | {
"github_metadata": {
"branch": "main",
"commit_count": 127,
"repo_created_at": "2021-09-06T11:57:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "abe34196d0... |
743ba5ee-5e5e-41f2-b989-2d943eb0edad | Team2122/2122_TeamTators | 2022 Off-Season Code/vision/c-code/VisionLib/TargetLocation.cpp | #include "TargetLocation.hpp"
#include "Vision_Model.hpp"
#include <math.h>
#include <string>
#include <iostream>
#include <string>
#include <tgmath.h>
#ifndef __linux__
# define M_PI 3.14159265358979323846 ;
#endif // !__linux__
using std::string;
using std::endl;
double TargetLocation::getDistance()
{
... | TOOL | 0.971336 | 5.821534 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2022-01-08T16:32: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": "a4d871a4560... |
e6b44f9e-ebc9-4b44-95d2-3f19c19c9f0b | trgtanhh04/Data-Structures-and-Algorithms | CTDL>-TH/22120017_Week02.1/Bai02/02.cpp | #include<iostream>
#include<math.h>
#include<vector>
using namespace std;
struct Node
{
int key;
Node* next;
};
struct Stack
{
Node* top;
};
typedef struct Node* node;
typedef struct Stack stack;
node createNode(int data)
{
node tmp = new Node();
tmp->key = data;
tmp->next = NULL;
return tmp;
}
void push... | ALGO | 0.993015 | 3.591174 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-03-15T12:13:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0f67a7c64eda... |
5876db01-ea47-4744-a8a6-982c02fe98db | F18/CFFC | cantera/Cantera/src/numerics/BandMatrix.cpp | /**
* @file BandMatrix.cpp
*
* Banded matrices.
*/
// Copyright 2001 California Institute of Technology
#ifdef WIN32
#pragma warning(disable:4786)
#pragma warning(disable:4503)
#endif
#include "BandMatrix.h"
#include "ctlapack.h"
#include "utilities.h"
#include "ctexceptions.h"
#include "stringUtils.h"
#inclu... | ALGO | 0.990267 | 6.134013 | {
"github_metadata": {
"branch": "master",
"commit_count": 1856,
"repo_created_at": "2024-01-15T11:24:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1da6552... |
451248f2-2572-4f0f-aff6-863c38fca21d | ishandutta2007/codeforces-g | greenheadstrange/normal/1314/D.cpp | #include <bits/stdc++.h>
#define ll long long
#define maxn 85 /*rem*/
#define mod 1000000007
#define db double
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define pi pair<int, int>
#define fi first
#define se second
using namespace std;
int n, k;
int eg[maxn][maxn];
int dp[11][maxn];
int col[maxn]... | ALGO | 0.999689 | 3.690923 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:55: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": "543cbc44699a... |
d5c41004-a7d9-45f0-a837-2e936a582ee8 | kiraclf/leetCodePractice | DailyPractice/859_buddy_string.cpp | #include <string>
#include <unordered_set>
using namespace std;
class Solution {
public:
bool buddyStrings(string s, string goal) {
int sSize = s.size();
int gSize = goal.size();
if (sSize != gSize) {
return false;
}
int sMissChar = -1;
int gMissChar = -1;
int missCount = 0;
boo... | ALGO | 0.999779 | 5.229673 | {
"github_metadata": {
"branch": "master",
"commit_count": 115,
"repo_created_at": "2020-08-27T16:08: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": "782dc20b... |
da399838-5cb8-40f4-9e5c-79febe4dc6b7 | shivaang12/808x_midterm_project | include/bfs.hpp | /**
* @file bfs.hpp
* @author <NAME>
* @copyright MIT license
* @brief DESCRIPTION
* Header file for the class Bfs. Bfs class implements a planning algorithm
* BFS. Breadth First Search algorithm is used for traversing as well as
* searching. It starts at root and explores all the neighbor nodes at
* cu... | ALGO | 0.992142 | 5.255987 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2018-10-09T22:24:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "612a7a033... |
bf84b24e-a6ef-46f3-a15c-cfd39967f50d | ishandutta2007/codeforces-a | arbuzick/normal/1486/D.cpp | #include <bits/stdc++.h>
using namespace std;
//#define int long long
//#define double long double
#define f first
#define s second
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define pb push_back
#define eb emplace_back
#define pii pair<int, int>
void solve() {
int n, k;
cin >> n ... | ALGO | 0.99999 | 4.608449 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ee3ad3f6cce9... |
f5113935-c347-4b3f-adc9-62ab22dee42c | m-reuter/arpackpp | examples/reverse/sym/rsymreg.cc | /*
ARPACK++ v1.2 2/18/2000
c++ interface to ARPACK code.
MODULE RSymReg.cc.
Example program that illustrates how to solve a real symmetric
standard eigenvalue problem in regular mode using the
ARrcSymStdEig class.
1) Problem description:
In this example we try to solve A*x = x*lambda in re... | ALGO | 0.99971 | 5.868637 | {
"github_metadata": {
"branch": "main",
"commit_count": 191,
"repo_created_at": "2015-05-07T13:44:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 67,
"forks": 29,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "e34ad61e... |
f25dadab-ff19-4e5d-9f94-d203e469d636 | hyjk826/baekjoon | 백준/Gold/13905. 세부/세부.cc | // 2023-01-04
#include <bits/stdc++.h>
#define fastio \
ios_base::sync_with_stdio(0); \
cin.tie(0);
#define vi vector<int>
#define vl vector<long long>
#define vc vector<char>
#define vs vector<string>
#define pi pair<int, int>
#define pl pair<ll, ll>
#define vp vector<pi>
#define vpl vector<pl>
#d... | ALGO | 0.99997 | 4.32592 | {
"github_metadata": {
"branch": "main",
"commit_count": 2540,
"repo_created_at": "2022-05-26T21:55:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cfe2df8c5... |
f0ab1e65-7941-4056-bfca-11a09d319a71 | SuranjanGautam/RaytracerCpp | RaytracerCpp/bvh.h | #pragma once
#include "general.h"
#include "hittable.h"
#include "hittablelist.h"
#include <algorithm>
#include <future>
#include <thread>
class bvh_node : public hittable {
public:
bvh_node(const hittable_list& list) {
int _count = 0;
int* countptr = &_count;
*this = bvh_node(list.objects, 0, list.objects.si... | ALGO | 0.995902 | 5.82224 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2023-11-20T01:57: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": "2b4f43f71e... |
6a813d8c-ec24-4704-acd8-eb289f9173e0 | k10ps/HashTable | twochoice.hpp | #pragma once
//chaining ale kubelki wypelnnione tablica z BST dodatkowo 2 funckje hashujace
template <typename E, typename P>
class TwoChoice
{
public:
int size; //liczba elementow
int capacity; //liczba kubelkow
Dynamic<E,P> *HashTab; //tablica wskaznikow na ... | ALGO | 0.993069 | 4.124624 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-06-08T18:06:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a0886e01f89d... |
bff039b4-3299-4bfe-97e1-d5f0eac08f3d | Sumanth-NR/CompetitiveProgramming | Platforms/ICPC/Practise_2023_08_14/G_Pokémon_Army_hard_version.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
void solve() {
int n, q; cin >> n >> q;
vector<int> a(n); for (auto &x: a) cin >> x;
if (n == 1) {
cout << a[0] << '\n';
for (int _ = 0; _ < q; _++) {
int l, r; cin >> l >> r;
cout << a[0] << '\n';
}
return;
}
ll cur = 0;
auto va... | ALGO | 0.999915 | 4.325602 | {
"github_metadata": {
"branch": "master",
"commit_count": 104,
"repo_created_at": "2022-04-18T13:29:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b3327233... |
92801d6f-8089-47e5-a301-246000a10eea | hdjkfhkj/pat | pat/pat_b/1019.cpp |
/*给定任一个各位数字不完全相同的4位正整数,如果我们先把4个数字按非递增排序,再按非递减排序,然后用第1个数字减第2个数字,将得到一个新的数字。一直重复这样做,我们很快会停在有“数字黑洞”之称的6174,这个神奇的数字也叫Kaprekar常数。
例如,我们从6767开始,将得到
7766 - 6677 = 1089
9810 - 0189 = 9621
9621 - 1269 = 8352
8532 - 2358 = 6174
7641 - 1467 = 6174
... ...
现给定任意4位正整数,请编写程序演示到达黑洞的过程。
输入格式:
输入给出一个(0, 10000)区间内的正整数N。
输出格式:
如果N... | ALGO | 0.999916 | 3.780967 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-03-04T06: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": "9e1663cd4a... |
d9cedbb0-3b9b-4123-a3be-491259f889a5 | TasiChicken/LeetCode | cpps/1000/100/20/11.cpp | #include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int maxArea(vector<int>& height) {
int left = 0, right = height.size() - 1, maxArea = 0;
while (left < right)
maxArea = max(maxArea, (right - left) * (height[left] < height[right] ? height[left++] : he... | ALGO | 0.998987 | 5.276632 | {
"github_metadata": {
"branch": "main",
"commit_count": 265,
"repo_created_at": "2023-08-02T15:42:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c859f19517... |
13b2d19e-c3b4-4d92-81f6-502315e1c69d | khalilalquraan/Competitive-Programming-3-The-New-Lower-Bound-of-Programming-Contests-Steven-Felix-Halim- | Introduction/Getting Started: The Easy Problems/Medium/11661 - Burger Time?.cpp | #include<bits/stdc++.h>
#define ll long long
#define ld long double
using namespace std;
int main(int argc, char const *argv[]) {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int n;
while(cin >> n) {
if(n == 0)break;
int D = -1, R = -1... | ALGO | 0.999548 | 3.861683 | {
"github_metadata": {
"branch": "master",
"commit_count": 64,
"repo_created_at": "2019-08-11T17: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": "ef2a6e64e... |
1f252d6e-1293-4e9e-b252-36f5b45e570d | Picodes10/Disease-Prediction-using-Machine-Learning | venv/Lib/site-packages/tensorflow/include/tensorflow/cc/ops/nn_ops.h | // This file is MACHINE GENERATED! Do not edit.
#ifndef TENSORFLOW_CC_OPS_NN_OPS_H_
#define TENSORFLOW_CC_OPS_NN_OPS_H_
// This file is MACHINE GENERATED! Do not edit.
#include "tensorflow/cc/framework/ops.h"
#include "tensorflow/cc/framework/scope.h"
#include "tensorflow/core/framework/tensor.h"
#include "tensorflo... | TOOL | 0.962713 | 6.320641 | {
"github_metadata": {
"branch": "main",
"commit_count": 62,
"repo_created_at": "2024-11-16T18:14:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "768d2603903... |
7119cb4d-0e50-4011-88d5-dfc0f0ba61d7 | kimh060612/KimALGO | Desktop/AlgorithmPS/13023.cpp | #include <iostream>
#include <vector>
using namespace std;
int n, m, visited[2001];
vector<int> E[2001];
bool dfs(int x, int depth)
{
if (depth >= 4) return true;
visited[x] = 1;
bool result = false;
for (int i = 0; i < E[x].size(); i++)
{
int nx = E[x][i];
if (!visited[nx]) resul... | ALGO | 0.999961 | 4.067898 | {
"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": "ca6fe33a8a... |
bc18bb1b-8eab-4e3a-9bd0-1971641dbcf9 | emilyju0314/gpt_code_plagiarism | dataset/code_content_classifier/allpro_train/1_10255_209.cpp | #include <bits/stdc++.h>
using namespace std;
long long a[300001], n, i, j, k, top, t, c[300001], cut[300001], maxs, s;
int main() {
cin >> n;
maxs = -9999999999;
for (i = 1; i <= n; i++) cin >> a[i];
for (i = 1; i <= n - 1; i++) {
memset(c, 0, sizeof(c));
j = n;
t = n - 2;
while (a[j] != a[i]) ... | ALGO | 0.999976 | 3.321452 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2024-04-28T03:59: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": "7a5d0705a1a... |
ef2b97f4-bd48-4c29-8dc9-1787fff62c49 | man0045/Data_Structure_with_Cpp | Trees/Left_ViewOfBinaryTree.cpp | #include<iostream>
#include<climits>
#include<vector>
using namespace std;
class Node{
public:
Node* left;
Node* right;
int val;
Node(int val){
this->val = val;
this->left = NULL;
this->right = NULL;
}
};
int levels(Node* root){
if(root == NULL) return 0;
return 1 + max(levels(root->left), levels(root->ri... | ALGO | 0.999986 | 4.222297 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2023-10-02T15:35:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae92e8d2f... |
d2c8aeda-1939-49cc-be7f-b2fa25fbdff2 | SaiHarshaK/Assignments | 1st semester/intro to programming/lab-8_assgn-2/15puzzle.cpp | /*********************************************************************
// author : <NAME>
// use : The 15-Puzzle game
// best run on linux
*********************************************************************/
#include<iostream>
#include<string>
#include<cstdlib>
#include<ctime>
#include<ios>
#include<limits>... | ALGO | 0.982711 | 3.572625 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2018-12-03T17:44:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "98e0c4715... |
dc6916e7-9d98-4318-9a0a-1ccaca3212b7 | thSmartGuy/CodechefSolution | codechef_ARTBALAN.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#define FOR(i, k, n) for(int i = k ; i < n ; i++)
void fast() {std::ios_base::sync_with_stdio(false) ; std::cin.tie(0) ; std::cout.tie(0);}
typedef long long int lld ;
lld gcd(lld a, lld b){ if(!a) return b ; return gcd(b%a, a) ;}
template <class T> void print... | ALGO | 0.999989 | 4.127133 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2019-02-15T15:22: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": "a06f88094... |
2d1928e5-d867-4271-bfec-435920220a86 | prajwalbayari/C_plus_plus | Apna college/Stack/ST.cpp | #include<iostream>
#include<vector>
#include<stack>
#include<stdlib.h>
#include<algorithm>
#include<string>
#include<math.h>
using namespace std;
// class stack
// {
// int top;
// char* arr;
// public:
// stack()
// {
// arr=new char[100];
// top=-1;
// }
// void push(char ... | ALGO | 0.999631 | 4.328605 | {
"github_metadata": {
"branch": "main",
"commit_count": 111,
"repo_created_at": "2024-10-23T03:40: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": "b7cf4d4a4e... |
c54bc783-c8c8-469e-9b0a-b7b3b801b065 | ericgjackson/slumbot2019 | src/regret_compression.cpp | #include <stdio.h>
#include <stdlib.h>
#include "rand.h"
#include "regret_compression.h"
// 0...49: 0...49
// 50...69: 50...59
// 70...99: 60...69
// 100...139: 70...79
// 140...189: 80...89
// 190...249: 90...99
// 250...319: 100...109
// 320...399: 110...119
// 400...489: ... | ALGO | 0.999083 | 4.613201 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2019-03-25T21:04:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 160,
"forks": 32,
"issues": 24,
"pull_requests": 0
},
"file_meta": {
"content_id": "e4170... |
ddb5df0c-c6be-461c-b8ee-f2f3465491e6 | vando2108/competitive_programming | Codeforces/CodeforcesRound898(Div4)/EBuildinganAquarium/solution.cpp | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
void solve() {
int n, x;
cin >> n >> x;
int mx = 0;
vector<int> a(n);
for (auto &it : a) {
cin >> it;
mx = max(mx, it);
}
long long l = 1, r = INT_MAX;
long long result = 0;
while (l <= r) {
long long mid = ... | ALGO | 0.999994 | 5.032654 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2020-10-26T00:18: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": "41a42f542119... |
438d44f1-a2de-4bf3-8c7e-4283e838dac3 | tylertran349/vowel-counter | Vowel Counter.cpp | #include <iostream>
using namespace std;
int main() {
string text;
int numVowels, numA, numE, numI, numO, numU;
for(int i = 1; i > 0; i++) {
numVowels = numA = numE = numI = numO = numU = 0;
cout << "Enter text: ";
getline(cin, text);
for(int i = 0; i < text.length(); i++) {
switch(text[i]) {
case 'A... | ALGO | 0.980296 | 4.248771 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-06-01T23: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": "0356a209b630... |
4935320b-f8cf-4357-bd24-fba238f89a5e | Sunbaked-Bricks/Digital-Control-System | test_files/stepper-motor_test/stepper-motor_test.ino | #define IN1 D0
#define IN2 D1
#define IN3 D2
#define IN4 D3
int Steps = 0;
boolean Direction = true;// gre
unsigned long last_time;
unsigned long currentMillis ;
int steps_left=4095;
long t;
void setup()
{
Serial.begin(115200);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT... | ALGO | 0.930331 | 5.018411 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2023-02-02T19:37:44.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c377fa5d4fb1... |
f2b259e9-ea61-48ad-84ba-79b4842dfe2f | nhhoang14/CodePTIT_Source | CodePTIT - TRR2/CT003.cpp | //https://code.ptit.edu.vn/student/question/CT003
//Chu trình Euler 03
#include <bits/stdc++.h>
using namespace std;
#define MAX 1005
int status, n, u, A[MAX][MAX], B[MAX][MAX], visited[MAX], DegIn[MAX], DegOut[MAX];
void DFS(int u) {
visited[u] = 1;
for(int v = 1; v <= n; v++) {
if(B[u][v] && !visit... | ALGO | 0.999917 | 3.898299 | {
"github_metadata": {
"branch": "main",
"commit_count": 646,
"repo_created_at": "2024-04-19T11:42:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3d5ba2039f... |
763961fa-e7af-414f-80e6-e63c261cdea7 | ellisss133/new | numbers.cpp | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
string trimZeros(string number)
{
while (number.size() > 1 && number[0] == '0')
{
number.erase(0, 1);
}
return number;
}
int compareNumbers(string first, string second)
{
if (first.size() > second.size())
... | ALGO | 0.999805 | 4.933005 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-12-25T09:33:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "3d71c0110071... |
69321133-53ed-4776-b40f-4ef58d08a5f7 | MateiPop12/Molecular | Molecular/src/Molecular/Physics/ForceCalculator.h | #pragma once
#include "Atom.h"
namespace Molecular
{
class ForceCalculator
{
public:
explicit ForceCalculator(double energyLossFactor = 0.9);
[[nodiscard]] glm::dvec2 CalculateVanDerWaalsForce(const Atom& a, const Atom& b) const;
[[nodiscard]] glm::dvec2 CalculateCoulombForce(cons... | ALGO | 0.971218 | 6.665294 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2024-11-30T10:26:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "02384b95f0b... |
6a2b17e5-1fc2-4671-8b11-82fa308138a4 | yongweianna/areaofTRI_devC- | exam1.cpp | #include<iostream>
#include<fstream>
using namespace std;
// function prototype -- like fomula
double luassegi3(double tapak , double tinggi); // like declare
double luasbulatan(double radius);
void displayLuas(double luassegi3 , double luasbulatan);
int main(void)
{
// function cell
... | ALGO | 0.99744 | 3.920031 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-10-09T12:02: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": "63d2a500332e... |
76660a3d-4e0e-4fbc-8aae-63cf6ef92330 | Blaga-Cristian/Personal-Projects | Competitive programming - solutions/All Problems (pbInfo, Infoarena, Codeforces, Kilonova...)/smsm/main.cpp | #include <fstream>
using namespace std;
ifstream cin("smsm.in");
ofstream cout("smsm.out");
const int N = 504;
int d[] = {6, 2, 4, 8};
int t[] = {1, 3, 9, 7};
int D,T,P,Q;
long long ans;
long long A[N][N]; ///A[i][j] = asociatul lui 2^i*3^j
long long dp[N][N],E[N][N]; ///cea submultimea cu suma maxima care include dp[... | ALGO | 0.999758 | 4.162157 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-10-23T19:43:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1bcf4f0c1ab8... |
e8aef34c-5a6c-422a-9abd-c692c8eee426 | maryialejandra/CursoFCII_UdeA-2020-2 | Documentos/Parcial1/CC1036666894/punto_1/cuadraticaImp.cpp | #include <iostream>
#include <iomanip>
#include <cstdlib>
#include <cmath>
#include "cuadratica.h"
using namespace std;
//Constructor inicializando numeros ingresados por el usuario
cuadratica::cuadratica(float var_a, float var_b, float var_c){
a = var_a;
b = var_b;
c = var_c;
}
//Calcula el discriminante y... | ALGO | 0.945007 | 3.404179 | {
"github_metadata": {
"branch": "master",
"commit_count": 616,
"repo_created_at": "2020-08-20T13:35:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 22,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5913a61... |
10f2e5c1-7408-47f2-8ebc-fe6fc76d41d2 | SuhaniSK/OOPS-Lab | lab11.cpp | #include<iostream>
using namespace std;
struct node {
int data;
struct node* llink;
struct node* rlink;
};
class dlist {
node* first;
node* last;
int count;
public:
dlist() {
first = last = NULL;
count = 0;
}
void insertfirst(int data);
void insertnode(int dat... | ALGO | 0.998555 | 5.078183 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-05-19T19:30:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "80792d7269fb... |
593cedab-11f1-41dd-a1bc-a9d2cedeedbd | feal-ca/Class-Code | ExercisesCpp/wordSearch.cpp | #include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef vector<vector<char>> Board;
typedef vector<vector<int>> Points;
int place_word(int i, int j, string w, const Board &b, const Points &p,
int max_points) {
bool placeable = true;
if (i + w.size() <= b.size()) {
i... | ALGO | 0.999821 | 4.279558 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2024-02-13T08:45: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": "cb688b1c685... |
416da362-2b44-4dd2-8d37-ca8bd980b243 | buckeye-cn/ACM_ICPC_Materials | solutions/kattis/ecna18/carvet_hcz.cpp | // https://open.kattis.com/problems/carvet
#include <cstdlib>
#include <cstdint>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <string>
#include <iostream>
using namespace std;
int v[250][250];
bool visited[250][250];
int d_i[250][250];
int d_j[250][250];
int q_i[62500];
int q_j[62500];
int head, t... | ALGO | 0.999982 | 4.260247 | {
"github_metadata": {
"branch": "master",
"commit_count": 1094,
"repo_created_at": "2017-09-09T18:26:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 40,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2cba22f... |
c329fc64-cdb9-4baf-bbc8-393268ac263e | cnsuhao/cppcode | DotNet/VC++2010/Examples/Ch06/Ex6_08.cpp | // Ex6_08.cpp
// Using function templates
#include <iostream>
using std::cout;
using std::endl;
// Template for function to compute the maximum element of an array
template<typename T> T max(T x[], int len)
{
T maximum(x[0]);
for(int i = 1; i < len; i++)
if(maximum < x[i])
maximum = x[i];
retu... | ALGO | 0.996434 | 6.181782 | {
"github_metadata": {
"branch": "master",
"commit_count": 256,
"repo_created_at": "2017-11-30T04:51:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "89612423... |
0a41dba2-df44-4345-aa33-92b7cb454cd0 | MarinYoung4596/LeetCode | 301.RemoveInvalidParentheses.cpp | /*
Remove the minimum number of invalid parentheses in order to make the input string valid. Return all possible results.
Note:
The input string may contain letters other than the parentheses ( and ).
Example 1:
Input: "()())()"
Output: ["()()()", "(())()"]
Example 2:
Input: "(a)())()"
Output: ["... | ALGO | 0.999779 | 5.714511 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2015-04-07T10:31:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "14da05356... |
2a2ffc4e-defa-4f0a-b239-b42599d5d616 | damdamgo/Diaballik | IAlib/Starting.cpp | #include "utils.h"
#include "Starting.h"
#include <iostream>
Starting::Starting(int** board, int sizeBoard, int player) {
this->board = board;
this->sizeBoard = sizeBoard;
this->player = player;
srand(time(NULL));
}
/**
Méthode permettant de repérer les pieces ennemy potentiel à bloquer
@return position des... | ALGO | 0.995478 | 4.324026 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-01-15T11:06:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d58abe230a... |
c98c3632-f647-4957-96de-185f6cd8d5f2 | MITK/MITK | Modules/Classification/CLUtilities/src/GlobalImageFeatures/mitkGIFFirstOrderNumericStatistics.cpp | /*============================================================================
The Medical Imaging Interaction Toolkit (MITK)
Copyright (c) German Cancer Research Center (DKFZ)
All rights reserved.
Use of this source code is governed by a 3-clause BSD license that can be
found in the LICENSE file.
=================... | ALGO | 0.928124 | 6.253566 | {
"github_metadata": {
"branch": "master",
"commit_count": 45999,
"repo_created_at": "2011-05-17T13:21:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 758,
"forks": 348,
"issues": 4,
"pull_requests": 17
},
"file_meta": {
"content_id": "fc... |
486bd77f-954c-417b-a327-34ea84293dff | psy2013GitHub/NLPLabCpp | dsa/graph/Trie.hh | //
// Created by System Administrator on 10/15/15.
//
#ifndef NLPCPP_TRIE_H
#define NLPCPP_TRIE_H
// 本质上,Trie是unordered map
#include <cassert>
#include <vector>
#include <string>
#include <deque>
#include "../../data_type.hh"
#include "../../utils/string_util.hh"
using namespace std;
namespace graph {
templa... | ALGO | 0.997576 | 3.900343 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-12-05T02:40: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": "258847ee35... |
f5481107-44e0-4e99-abcc-19002b0c0c97 | chunlinsun/peercode | hw0/Graph_1552.hpp | #ifndef CME212_GRAPH_HPP
#define CME212_GRAPH_HPP
/** @file Graph.hpp
* @brief An undirected graph type
*/
#include <algorithm>
#include <vector>
#include <cassert>
#include "CME212/Util.hpp"
#include "CME212/Point.hpp"
/** @class Graph
* @brief A template for 3D undirected graphs.
*
* Users can add and retri... | ALGO | 0.937957 | 6.614699 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-03-10T19:43: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": "27eff36495... |
12dc9895-2865-4d41-a830-1dca7235987e | Arshjeet-Singh/Strivers-SDE-Sheet-Challenge | Predecessor And Successor In BST.cpp | #include <bits/stdc++.h>
/*************************************************************
Following is the Binary Tree node structure
template <typename T>
class BinaryTreeNode
{
public :
T data;
BinaryTreeNode<T> *left;
BinaryTreeNode<T> *right;
BinaryTreeNode(T d... | ALGO | 0.999998 | 4.348567 | {
"github_metadata": {
"branch": "main",
"commit_count": 186,
"repo_created_at": "2023-06-06T12:27: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": "b2e7ee0e75... |
1acc64ab-42b1-4056-93ab-4ad95b66777a | nsakki55/tech-notes | book_algorithm_solution/src/ch15/ch15_1.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
using Edge = pair<int, pair<int, int>>; // 重み、頂点番号
struct UnionFind {
vector<int> par, siz;
UnionFind(int n) : par(n, -1), siz(n, 1) {}
int root(int x) {
if (par[x] == -1)
return x;
else
return par[x] = root(p... | ALGO | 0.999972 | 4.935903 | {
"github_metadata": {
"branch": "master",
"commit_count": 388,
"repo_created_at": "2019-05-15T11:33:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 13
},
"file_meta": {
"content_id": "77e672f... |
68b34538-ad29-435b-bc78-cce20c3ced47 | ipc-sim/IPC | src/Utils/GivensQR.hpp | //
// GivensQR.hpp
// IPC
//
// Created by <NAME> on 10/19/19.
//
#include "Types.hpp"
#include <Eigen/Eigen>
namespace IPC {
template <int dim>
class GivensQR {
public:
static void compute(const Eigen::Matrix<double, dim, dim>& A,
Eigen::Matrix<double, dim, dim>& Q,
Eigen::Matrix<double, dim... | ALGO | 0.99943 | 6.318228 | {
"github_metadata": {
"branch": "main",
"commit_count": 89,
"repo_created_at": "2020-05-21T15:52:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 622,
"forks": 74,
"issues": 10,
"pull_requests": 0
},
"file_meta": {
"content_id": "b12cb596... |
b7c2ad92-760f-4e82-9f6a-5344cc4c9af0 | odanado/Procon | TopCoder/SRM/0685/MultiplicationTable2Easy.cpp | #include <iostream>
#include <string>
#include <vector>
#include <sstream>
#include <map>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
using namespace std;
using ll = long long;
#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(int)(n);... | TEST | 0.993346 | 5.10306 | {
"github_metadata": {
"branch": "master",
"commit_count": 140,
"repo_created_at": "2015-12-22T07:10: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": "9de0aa29... |
fa438a8c-8298-4137-9c0f-7abce4ea426b | Tharindu714/Smart-Cloth-Line-Simple-Project | Smart_Drayer.ino | // Smart Dryer: Blink-Idle + Wet/Dry Triggered 15s Motor Runs
// - Water sensor on D2 (INPUT_PULLUP: LOW = wet, HIGH = dry)
// - Built-in LED on D13: shows blink in idle, HIGH for CW, LOW for CCW
// - L298N driver: IN1→D7, IN2→D8, ENA→D9
// - CW run = 15 s, CCW run = 15 s, then back to idle blink
#include <Arduino.h>
... | TOOL | 0.986974 | 6.753995 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-06-12T09:07: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": "174daa779e5c... |
05c3c357-711d-4188-9710-80c0b78ad59a | YuriMZ-Nunes/aed2 | trabalhoFordFulkerson/src/main.cpp | #include <iostream>
#include <limits.h>
#include <queue>
#include <string.h>
using namespace std;
// Numero maximo de vertices
#define V 6
//busca em largura
bool search(int rGraph[V][V], int origin, int destiny, int parent[])
{
//Vetor de vértices visitados, marcado com true ou false se existe um caminho ... | ALGO | 0.999547 | 4.18526 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2023-06-20T20:19: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": "6ff625a36fd... |
f9865fa7-223c-4268-8ffb-a32f3b771b76 | HuuThoCSE/TH1220_Cautrucdulieuvagiaithuat | OnThi/24_25-12-2022/caynhiphan/caynhiphan.h | #include<iostream>
using namespace std;
// Khai báo c?u trúc d? li?u
typedef int Info;
struct BinT_Node {
Info Key;
BinT_Node* Left;
BinT_Node* Right;
};
typedef BinT_Node* BinT_Type;
//Kh?i t?o cây
void Initialize(BinT_Type &BTree) {
BTree = NULL;
}
//T?o m?i m?t nút
BinT_Type Create_Node(Info NewData) {
Bin... | ALGO | 0.999859 | 3.748096 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2022-11-23T06:29: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": "a2b64158bc6... |
18bf4adb-8b81-487a-90e1-d20526c398a7 | mishrabadal/data-structure-program | Binary TREE/2_Binary_tree_creation.cpp | #include <iostream>
using namespace std;
#include <queue>
class node
{
public:
int data;
node *left, *right;
node(int value)
{
data = value;
left = right = NULL;
}
};
// tree coding start using recursion t(n)=n ,s(n)=o(h) , wc s(n)=o(n)
node *binary_tree()
{
int x;
cin >> x... | ALGO | 0.99995 | 4.168836 | {
"github_metadata": {
"branch": "coder-army",
"commit_count": 182,
"repo_created_at": "2024-08-29T17:50:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0886... |
d676a2a5-d7fd-4101-a41f-0494c5adbda4 | aakashahpl/dsa2 | BST.cpp | #include<iostream>
using namespace std;
struct Node {
int key;
Node* left;
Node* right;
// Constructor
Node(int k) {
key = k;
left = right = NULL;
}
};
class BinarySearchTree {
Node* root;
public:
// Constructor
BinarySearchTree() {
root = NULL;
}
... | ALGO | 0.99999 | 6.203224 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-11-03T03:30: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": "5fe114017bf2... |
9839703c-6ea7-4b0e-b7f3-a1fcbd2e93ef | stardvst/hands-on-design-patterns-with-cpp | ch18-concurrency-patterns/10-lock-free-queue/lock-free-queue.cpp | #include <iostream>
#include <atomic>
#include <thread>
#include <vector>
#include <memory>
template <typename T, std::size_t N>
class lock_free_queue
{
public:
lock_free_queue() = default;
lock_free_queue(const lock_free_queue &) = delete;
lock_free_queue &operator=(const lock_free_queue &) = delete;
templat... | ALGO | 0.979511 | 5.529774 | {
"github_metadata": {
"branch": "main",
"commit_count": 104,
"repo_created_at": "2025-02-02T11:58: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": "694e84abb7... |
19049b18-e439-4f08-b6c3-f165963fc1e7 | ganeshGhode2002/DSA_CPP | 2DArray/minElement.cpp | #include <iostream>
using namespace std;
int main()
{
int arr[3][4] = {{10, 20, 32, 45}, {12, 13, 14, 14}, {32, 44, 20, 33}};
int row = 3;
int col = 4;
int minVal = INT8_MAX;
for (int i = 0; i < row; i++)
{
for (int j = 0; j < col; j++)
{
cout << arr[i][j] << " ";... | ALGO | 0.997028 | 3.419111 | {
"github_metadata": {
"branch": "main",
"commit_count": 68,
"repo_created_at": "2024-06-02T04:20: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": "8085694db59... |
607f5916-1663-4a8a-bb52-7e38e782759d | HyekyoungKim/SW_Expert_Academy | SW_Expert_Academy/Difficulty2/1859_백만_장자_프로젝트/main.cpp | #include<iostream>
#include<vector>
#include<cstdio>
using namespace std;
/* Problem #1895 백만 장자 프로젝트 */
int main(int argc, char** argv)
{
int test_case;
int T;
freopen("input.txt", "r", stdin);
cin >> T;
/*
여러 개의 테스트 케이스가 주어지므로, 각각을 처리합니다.
*/
for (test_case = 1; test_case <= T; ++test_case) {
int N;
... | ALGO | 0.999726 | 4.00471 | {
"github_metadata": {
"branch": "main",
"commit_count": 47,
"repo_created_at": "2020-10-10T01:43: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": "37f4c02b34a... |
14640cf7-76da-45cd-808e-2ea9d1386f47 | littlecaca/algorithms | daily/April/kth-ancestor-of-a-tree-node.cpp | #include <map>
#include <vector>
using namespace std;
class TreeAncestor {
public:
TreeAncestor(int n, vector<int>& parent) : memory(vector<vector<int>>(n, vector<int>(16))) {
for (int i = 0; i < n; ++i)
{
memory[i][0] = parent[i];
}
for (int j = 1; j < 16; ++j)
... | ALGO | 0.999981 | 5.526312 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2024-04-24T09:13: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": "d8fee7e32... |
3fc384fb-b815-4b75-83a2-9e68b28d1629 | zyz-2299mod10/ParallelProgramming | HW4/part1/pi_reduce.cc | #include <mpi.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <unistd.h>
long long int estimate_pi(int rank, int size, long long int tosses){
long long int chunk = tosses / size;
long long int start = chunk * rank;
long long int end = (rank == size - 1) ? tosses ... | ALGO | 0.999885 | 5.362769 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-01-16T13:56:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5f7803655422... |
b35ffa63-e4ac-425f-84c5-418b3e90190c | YAINGNGAH/cpp_examples | move/string-operations/string_operations.h | #pragma once
#include <string>
#include <vector>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <type_traits>
#include <cstring>
/*
`bool StartsWith(STR string, STR text)` — проверяет, что строка `string` начинается с `text`.
`bool EndsWith(STR string, STR text)` — прове... | TOOL | 0.965862 | 6.53169 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-01-13T08:40: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": "2085fddb1c1d... |
5983b405-14e8-468d-b829-a7e461a55ef6 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/06/0620/personal_submission/cf678d_lengnian.cpp | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
using i128 = __int128;
using ull = unsigned long long;
#define pll pair<ll, ll>
#define pii pair<int, int>
#define vi vector<int>
#define fir(i, a, b) for (int i = a; i <= b; i++)
#define pqi priority_queue<int> // 优先队列
#define all(x) x.begin(), x.... | ALGO | 0.999944 | 4.611432 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "f322... |
1099dcea-c67b-4867-93c3-b8ec24a7efe2 | LucaDantas/CP | simulados/2022/Set1/colors.cpp | #include <bits/stdc++.h>
using namespace std;
constexpr int maxn = 2e5+10;
struct DSU {
int pai[maxn], peso[maxn], t;
struct SV { int a, b, peso_a, peso_b; };
vector<SV> sv;
/* void init(int n) {
for(int i = 0; i <= n; i++)
pai[i] = i, peso[i] = 1;
sv.clear();
t = 0;
} */
DSU() { for(int i = 0; i < ... | ALGO | 0.999985 | 3.895036 | {
"github_metadata": {
"branch": "master",
"commit_count": 870,
"repo_created_at": "2019-11-28T16:12:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "639e1d2a... |
ca4b5bb7-4087-48dc-b654-a2837fac54c9 | liyupi/leetcode-c | easy/408.cpp | #include <iostream>
#include <vector>
#include <stack>
#include <cstring>
#include <set>
#include <map>
#include <algorithm>
#include <queue>
#include <sstream>
using namespace std;
class Solution {
public:
bool validWordAbbreviation(string word, string abbr) {
int len = abbr.length();
int num = 0... | ALGO | 0.998131 | 5.537899 | {
"github_metadata": {
"branch": "master",
"commit_count": 106,
"repo_created_at": "2019-05-17T01:07:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "38daac8d... |
4415604a-5ad6-452e-ab44-050637343592 | JosepHyv/Contest-Archive | fei/dp.cpp | #include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define sz(x) (int)x.size()
#define mcd(x,y) __gcd(x,y)
#define all(x) x.begin(), x.end()
#define mcm(x,y) ( (x*y) / mcd(x,y))
#define clr(x) memset(x, 0, sizeof(x))
#define press(x) setprecision(x)<<fixed
using namespace std;
typedef lo... | ALGO | 0.999907 | 3.626549 | {
"github_metadata": {
"branch": "master",
"commit_count": 107,
"repo_created_at": "2020-04-12T00:42: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": "0680db30... |
3c048c4e-6d03-4c09-abf8-cff8455bb358 | saneravi/Coding_Practice | two_pointer.cpp | //queue of vectors
#include<bits/stdc++.h>
using namespace std;
void solve();
void seed_rand(void)
{
time_t t;
int t_val = time(&t);
srand(t_val);
}
int main()
{
ios_base::sync_with_stdio(false);cin.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("error.txt", "w... | ALGO | 0.999993 | 3.662572 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-08-28T03:19: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": "5f2bc5306d... |
8611c030-d745-4606-bf92-5a69d4ea5560 | RobinKVH/Class-Work | CMPS 385: Data Structures/2.1.cpp | //Name: <NAME>
//Homework #: 2.1
//Course: CMPS 385
//Due Date: February 15, 2017
//Professor: <NAME>
//Purpose: Practice with <string> and <cstring>
//--------------------------------------------------------------------------
#include <iostream>
#include <iostream>
#include <string>
#include <cstring>
using namespace... | TOOL | 0.940282 | 3.597241 | {
"github_metadata": {
"branch": "master",
"commit_count": 168,
"repo_created_at": "2019-04-16T05:21:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "df27b4e9... |
ab3e6c59-1615-4c55-852e-358c5a7f303e | bartandrews/DiagHam_Stability | trunk/FQHE/src/HilbertSpace/FermionOnHyperCubicLatticeWithSpinMomentumSpace.cc | ////////////////////////////////////////////////////////////////////////////////
// //
// //
// DiagHam version 0.01 ... | TOOL | 0.985727 | 4.818291 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2022-07-12T10:41:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "77b2dfe7262... |
50bfd5c8-2b34-4267-b5c2-0fe4f6703901 | mirrorer/libbpg | jctvc/TLibCommon/TComRdCostWeightPrediction.cpp | /* 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-2014, ITU/ISO/IEC
* All rights reserve... | ALGO | 0.999715 | 6.565554 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2014-12-05T21:54:22.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 794,
"forks": 111,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c72596... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.