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 |
|---|---|---|---|---|---|---|---|
221f4daa-d030-4dee-a673-70d7e7354534 | yasminebs99/Robot-Suiveur | code_robot_suiveur__comp_tition_.ino | // Moteur A
int IN1=4;
int IN2=5;
int enb=9;
//Moteur B
int IN3=6;
int IN4=7;
int ena=3;
//capteur infrarouge gauche
int outg=12;
//capteur infrarouge milieu
int outm=8;
//capteur infrarouge droite
int outd=2;
//capteur ultrason
int trig =10;
int echo=11;
long duration;
long cm;//distance
void setup() {
pinMode(IN1,... | TOOL | 0.980827 | 4.980769 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-02-24T01:14: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": "c4c87eee5171... |
65a5d05b-da0b-4533-a879-254dd305603d | mashroormamun/leetcode | 380. Insert Delete GetRandom O(1)/main.cpp | #include <iostream>
using namespace std;
#include <unordered_map>
class RandomizedSet {
public:
unordered_map<int, bool> *u;
RandomizedSet() {
u = new unordered_map<int, bool>();
}
bool insert(int val) {
auto success = u->insert({val, true});
return success.second;
}
... | ALGO | 0.982091 | 5.428658 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2021-02-15T05:53: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": "18b867e7e2a... |
76edd315-571e-4357-806e-a7e2ed7c76e6 | StrongPC123/Far-Cry-1-Source-Full | CryPhysics/heightfieldbv.cpp | #include "stdafx.h"
#include "utils.h"
#include "primitives.h"
#include "bvtree.h"
#include "geometry.h"
#include "trimesh.h"
#include "heightfieldbv.h"
BVheightfield CHeightfieldBV::g_BVhf;
struct InitHeightfieldGlobals {
InitHeightfieldGlobals() {
CHeightfieldBV::g_BVhf.iNode = 0;
CHeightfieldBV::g_BVhf.type ... | ALGO | 0.932926 | 6.067423 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2023-06-30T17:20:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 931,
"forks": 279,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec9bc8c... |
a3276e4f-34d4-4cb5-899f-aca6329ec652 | themickster268/cpp_notes | 6_flow_control/4_ternary_operator/main.cpp | #include <iostream>
int main(){
int max {};
int a {35};
int b {20};
std::cout << std::endl;
std::cout << "using regular if" << std::endl;
if (a > b)
{
max = a;
} else {
max = b;
}
std::cout << "max: " << max << std::endl;
a = 4;
b = 15;
std::c... | ALGO | 0.987829 | 4.914094 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2022-07-31T20:26: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": "aaf3dcca56aa... |
7dcfd963-ffa2-4000-8917-cdd11f06a495 | SunYoung-p/C_PLUS_PLUS_VS | C_PLUS_PLUS_VS/BACKJUN/BackJun_09.cpp | #include <iostream>
using namespace std;
void No1_0814()
{
int arr[6] = { 0 };
int re = 1;
for (int i = 0; i < 6; i++)
{
cin >> arr[i];
}
for (int i = 0; i < 6; i++)
{
if (i > 1)
re = 2;
if (i > 4)
re = 8;
cout << re - arr[i] << " ";
}
}
void No2_0814()
{
ios::sync_with_stdio(false);
cin.t... | ALGO | 0.999928 | 3.739722 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2022-07-13T16:11: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": "9062ce00a... |
67f777f3-3e52-492e-b6c5-c44a4c3833f0 | Park-jung-ho/algorithm | 백준/Gold/11054. 가장 긴 바이토닉 부분 수열/가장 긴 바이토닉 부분 수열.cc | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ip = pair<int, int>;
using ld = long double;
using lp = pair<ll, ll>;
#define all(v) (v).begin(), (v).end()
#define f first
#define s second
#define mp make_pair
#define pb push_back
#ifndef ONLINE_JUDGE
#include... | ALGO | 0.999957 | 4.068425 | {
"github_metadata": {
"branch": "main",
"commit_count": 453,
"repo_created_at": "2023-02-03T08:23: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": "2a33582842... |
a397f34e-5e99-4ecd-a48f-78a404f298d5 | meooow25/competitive-programming | HLD.cpp | // Heavy-light decomposition
// Decompose a tree such that a path from root to any node
// is split into at most lg n pieces.
namespace HLD {
vector<int> par, dep, heavy, head, pos;
int cur_pos;
int dfs(int u, vector<int> g[]) {
int sz = 1, mx_sz = 0;
for (int v : g[u]) if (v != par[u]) {... | ALGO | 0.99986 | 4.228631 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2019-03-04T21:16:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "460107563... |
9d997a4a-dc8b-4f12-ab43-84bfdce14484 | 30stomercury/unigram-tokenization | src/decode.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <tuple>
#include <map>
#include <stack>
#include <cmath>
#include <algorithm>
#include <limits>
#include "unigram.h"
using namespace std;
std::map<vector<string>, long> decodeFile(const string& inputFilename, const string& outputFi... | ALGO | 0.985925 | 5.06961 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2025-04-14T14:44:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6e8e76af4ea... |
7009a9ee-e041-4cda-bd19-240b14838428 | gt-retro-computing/llvm-I8080 | llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | //===- IndVarSimplify.cpp - Induction Variable Elimination ----------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | TOOL | 0.941983 | 6.208602 | {
"github_metadata": {
"branch": "i8080-MCLayer",
"commit_count": 326412,
"repo_created_at": "2019-04-23T21:35:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13,
"forks": 3,
"issues": 1,
"pull_requests": 3
},
"file_meta": {
"content_id":... |
0380e095-2ded-44cd-a53c-e3e8b707be44 | oba315/reduction | crossing_judgment.cpp | #include "crossing_judgment.h"
#include <math.h>
#include <cmath>
#include <Eigen/Core>
namespace ren
{
void inflection_crossing_judgement(
Colorub& pixel_color, //return
RTCRayHit& prev_ray,
RTCScene& scene, MyScene& myscene,
int prev_obj_id);
Colorub calc_color_with_texture(RTCRayHit& rayhit, MyScene& ... | ALGO | 0.997485 | 4.227436 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2020-01-13T08:59: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": "f4ef72148c... |
65fc68ca-311c-4f95-915e-8b7d04db7c38 | gabrielnov/c-cpp | estrutura de dados 1/semana 2/ex05.cpp | #include <iostream>
using namespace std;
class Complexo{
public:
float real;
float imaginario;
Complexo(){};
Complexo(float real, float imaginario);
~Complexo(){cout << "Número destruído." << endl;};
Complexo soma(Complexo c2);
Complexo subtracao(Complexo c2... | TOOL | 0.963972 | 4.801622 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2022-08-16T14:37: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": "2cc56882c... |
b7029607-8d93-480e-9b0a-6d74aedc04d3 | CS284-Final-Project/Volumetric-scattering | src/pathtracer/pathtracer.cpp | #include "pathtracer.h"
#include "scene/light.h"
#include "scene/sphere.h"
#include "scene/triangle.h"
using namespace CGL::SceneObjects;
namespace CGL {
PathTracer::PathTracer() {
gridSampler = new UniformGridSampler2D();
hemisphereSampler = new UniformHemisphereSampler3D();
tm_gamma = 2.2f;
tm_level = 1... | ALGO | 0.9968 | 6.167808 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2020-04-10T02:13:50.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2de3343e94... |
c0de59e9-7621-4df7-83f8-96033e845fb4 | JakubSapko/Programming_and_numerical_analysis | Exercises_from_webpage/week4/exercise4.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
//----Functions for arrays----//
bool allDiff(const int arr[], size_t sz){
for (int i = 0; i<sz; i++){
int value = arr[i];
for (int k = i+1; k<sz; k++){
if (value == arr[k]){return false;}
}
}
return true;
}
int numDiff(int... | ALGO | 0.999314 | 4.677877 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2020-03-03T19:09: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": "30618d84b... |
68543405-7abd-4e1b-a7ee-87dc32c4cf8a | cam179-uwf/dsa-project-3 | tsp-brute-force.hpp | #ifndef TSP_BRUTE_FORCE
#define TSP_BRUTE_FORCE
#include "matrix.hpp"
/**
* <NAME>
* COP4534 Project 3
* 10/20/2024
*
* This class is used for running
* the brute force algorithm.
*/
class TspBruteForce
{
Matrix<double>* _matrix;
double get_total_distance(int* path, int length);
public:
TspBrute... | ALGO | 0.998944 | 4.186656 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-11-08T01:25: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": "83f7f3386cf7... |
4e4033d5-2145-40cc-a17f-5186b60d0fe7 | piyushrawat369/GeeksForGeeks | Daily Challenge/Asteroid Collision/code.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
vector<int> asteroidCollision(int N, vector<int> &asteroids) {
stack<int> s;
vector<int> ans;
for(int a: asteroids){
if(a > 0)
s.push(a);
... | ALGO | 0.999961 | 5.680248 | {
"github_metadata": {
"branch": "main",
"commit_count": 165,
"repo_created_at": "2022-12-27T13:56:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0827f9ed0b... |
ad97864c-3864-4db7-84e5-9754bc642c47 | leanhduc0104/train3 | M.cpp | #include <bits/stdc++.h>
using namespace std;
#define HNT ios_base::sync_with_stdio(false); cin.tie(0);
int x[8];
int N, cnt = 0;
bool check (int v, int k) {
for (int i = 1; i < k; i++) {
if(x[i] == v) return false;
}
return true;
}
TRY (int k) {
for (int v = 1; v < 10; v++){
if (... | ALGO | 0.996242 | 3.271997 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-11-01T17:14: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": "9d6f940a16... |
07e821b6-00de-4ba9-a098-008eeb11838d | SmritiSanya/DSACPP | DSA C++/74_smallestRangeInKList.cpp | #include <iostream>
#include <queue>
#include <vector>
#include <limits.h> // For INT_MAX and INT_MIN
using namespace std;
pair<int, int> findSmallestRange(vector<vector<int>>& arrays) {
int k = arrays.size(); // Number of arrays
priority_queue<pair<int, pair<int, int>>, vector<pair<int, pair<int, int>>>, g... | ALGO | 0.999982 | 6.012823 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2024-09-06T09: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": "19f5baab082e... |
547c667e-d8e1-4b8d-a85a-58b9986c8a7c | kallemov/EBAMRWatershed | srcWatershed/EBWatershedUtils.H | #ifdef CH_LANG_CC
/*
* _______ __
* / ___/ / ___ __ _ / / ___
* / /__/ _ \/ _ \/ V \/ _ \/ _ \
* \___/_//_/\___/_/_/_/_.__/\___/
* Please refer to Copyright.txt, in Chombo's root directory.
*/
#endif
#ifndef _EBWATERSHEDUTILS_H_
#define _EBWATERSHEDUTILS_H_
#include "EBIndexS... | TOOL | 0.960447 | 6.049913 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-04-16T17:01: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": "3d69b31850... |
ec1bb096-9ef4-4d9f-af00-1ed4b12fea64 | johnpaulguzman/MINLP-Solve | solvers/CoinAll-1.6.0-win64-intel11.1/include/coin/CouenneGlobalCutOff.hpp | /* $Id: CouenneGlobalCutOff.hpp 490 2011-01-14 16:07:12Z pbelotti $
*
* Name: CouenneGlobalCutOff.hpp
* Author: <NAME>, Lehigh University
* <NAME>, IBM
* Purpose: a cutoff that replicates itself
*
* (C) Carnegie-Mellon University, 2010.
* This file is licensed under the Eclipse Public License (EPL)... | ALGO | 0.982374 | 4.616189 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2017-06-11T08:54: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": "bf6b62d79... |
dba6a195-d23a-4bb2-9353-29d8ccf7dd81 | woshiluo/algorithm_competition | cf/contest/1891/b/b.cpp | /*
* b.cpp 2023-10-30
* Copyright (C) 2023 <NAME> <<EMAIL>>
*
* 「Two roads diverged in a wood,and I—
* I took the one less traveled by,
* And that has made all the difference.」
*
* Distributed under terms of the GNU GNU AGPLv3+ license.
*/
#include <cmath>
#include <cstdio>
#include <cstdint>
#include <cstrin... | ALGO | 0.999898 | 4.258969 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2019-01-06T05:21: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": "8887bb9b6... |
2b6f0ee2-5f6b-4546-a69c-e7bec09be704 | AdarshNandanwar/DSA-and-Competitive-Programming | DSA BITS/Tut 10 Heap/heap_tree.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll arr[1000];
ll heap_size = 0;
void heapify_up(ll i){
if(i == 1){
return;
}
ll parent = i/2;
if(arr[parent] < arr[i]){
swap(arr[parent], arr[i]);
heapify_up(parent);
}
}
void insert(ll x){
heap_size++... | ALGO | 0.999979 | 4.564452 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2020-04-05T22:00:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "71d10c885... |
3553403f-aa5b-4c2f-bbee-17445fb8f11b | raincross7/code-similarity | codes/train_code/problem168/problem168_33.cpp | #include <bits/stdc++.h>
using namespace std;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
using ll = long long;
using P = pair<int,int>;
using graph = vector<vector<int>>;
const int dx[... | ALGO | 0.999951 | 3.921596 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d3e8d2101b27... |
99705f63-b72a-47ad-b15a-b226819762e2 | Liyus9123/examples_learn | li_test02.cpp | #include <iostream>
using namespace std;
// 给你一个非负整数 x ,计算并返回 x 的 算术平方根 。
// 由于返回类型是整数,结果只保留 整数部分 ,小数部分将被 舍去 。
// 注意:不允许使用任何内置指数函数和算符,例如 pow(x, 0.5) 或者 x ** 0.5 。
int sqrtself(int x);
/*
思路:二分枚举
从该数值的二分之一开始向下枚举直到x*x的值小于等于该数
返回整数x
*/
int main(int argc, char const *argv[])
{
/* code */
int num = 0;
... | ALGO | 0.999575 | 4.236403 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2024-05-15T02:59: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": "5d6897faf82... |
5164d7e0-e9f0-47b1-9a2e-a0caa47698f4 | ecto0310/procon_submission | atcoder/abc085/abc085_d/4632896.cpp | // Date: Tue, 19 Mar 2019 11:53:32 +0000
// Language: C++14 (GCC 5.4.1)
#include <bits/stdc++.h>
#include <assert.h>
using namespace std;
const int MOD = 1e9 + 7;
int main()
{
int n, h;
cin >> n >> h;
vector<int> a(n), b(n);
for (int i = 0; i < n; i++)
cin >> a[i] >> b[i];
int ans = 0, damage = 0;
in... | ALGO | 0.999887 | 3.83933 | {
"github_metadata": {
"branch": "main",
"commit_count": 2101,
"repo_created_at": "2022-12-07T13:10: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": "ec2f4fab1... |
9b6b98e4-88fc-446d-bc02-1cd88c947d52 | sbashett/ctci | q16.10.cpp | #include <algorithm>
#include <assert.h>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
bool isKeyExists(int key, const map<int, int> &hashmap) {
if (hashmap.find(key) == hashmap.end())
return false;
else
return true;
}
void getMaxPopulation_v1(vector<int> &birthYears, vector<i... | ALGO | 0.999903 | 5.220255 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2019-06-16T04:01: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": "9af5d5794... |
53d85684-a1e0-4221-8ada-8d1cf6486056 | magdyhasan/competitive-programming | uva-/uva 10094 - Place the Guards.cpp | #include<stdlib.h>
#include<stdio.h>
#include<cstring>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;
bool r[5005], c[5005], rd[5005], ld[5005];
int n;
bool done;
vector<int> rcs;
void rec(int j){
if (done) return;
if (j == n+1){
for (int t = 0; t < rcs.size(); t++)
printf("%d%s", r... | ALGO | 0.999866 | 3.217154 | {
"github_metadata": {
"branch": "master",
"commit_count": 222,
"repo_created_at": "2017-01-29T00:35:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "cef8e110... |
d00dd0e0-c182-486f-8579-809372fd62bc | byungwook-min/Algorithm | BOJ/13305 - 주유소.cpp | //
// 13305 - 주유소.cpp
// cpp
//
// Created by 민병욱 on 2023/11/28.
//
#include <iostream>
#include <vector>
using namespace std;
#define FASTIO ios::sync_with_stdio(0); cin.tie(0);
typedef long long ll;
int N;
ll ans;
int main() {
FASTIO
cin >> N;
vector<ll> dist(N, 0);
for (int i = 1; i < N; i++)... | ALGO | 0.999983 | 3.895635 | {
"github_metadata": {
"branch": "main",
"commit_count": 672,
"repo_created_at": "2021-08-24T15:05:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "63fb91e9a0... |
b5bd8a9b-2c02-4e65-b701-280d1e45250b | wgoni/BOJ | BOJ/sources/0/3000/3003.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
using namespace std;
int main() {
freopen("./resources/0/3000/3003.txt", "r", stdin);
cin.tie(0), ios::sync_with_stdio(0);
int num;
int ch_std[6] = {1, 1, 2, 2, 2, 8};
for (int i = 0; i < 6; i++) {
cin >> num;
cout << ch_std[i]... | ALGO | 0.999291 | 3.477156 | {
"github_metadata": {
"branch": "master",
"commit_count": 154,
"repo_created_at": "2020-09-16T00:31:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5525248f... |
2f90345d-e780-4e67-98bf-9f1d3824f70b | harshjoeyit/CP | STL.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long int
// custom comparison function
bool customComp(const pair<int, int> &a, const pair<int, int> &b) {
return a.second < b.second;
}
void solve() {
// Some important constructors
vector<int> v = {5, 2, 3, 3, 3, 4, 2, 4, 5, 5, 4, 3... | ALGO | 0.999885 | 4.205609 | {
"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": "1a299a89... |
52d98338-a972-401b-9102-f4ecf739a78a | Pascualex/competitive-programming | independent/Problem192.cpp | #include <stdio.h>
#define TAM 20001
// U = UNKNONW, Y = YES, N = NO
char valores[TAM];
bool comprobarValor(int valorAct) {
if (valores[valorAct] == 'Y') {
return true;
} else if (valores[valorAct] == 'N') {
return false;
} else {
if (valorAct-5 >= 1) {
if (valorAct%3 ... | ALGO | 0.99952 | 3.552528 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2019-03-10T12: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": "6720a0847... |
f4e79ce4-1518-4301-894c-d612b1feb1b2 | okrischer/mastering-algorithms | applications/hanoi.cpp | #include <SFML/Graphics.hpp>
#include <iostream>
#include "list.hpp"
using namespace list;
auto* moves = new List<std::pair<char, char>>;
auto* start = new List<int>;
auto* temp = new List<int>;
auto* goal = new List<int>;
// solve the towers of hanoi puzzle with recursion
void solve(int n, char s, char t, char g) {
... | ALGO | 0.994205 | 5.525692 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2024-01-16T20:36: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": "f907a09c51f... |
f612cc0f-5e18-44ce-b2d4-72f46f0c5d39 | mutharibayub/Competitive_Programming | codeForces/round753div3/8.cpp | #include <iostream>
#include <vector>
#include <array>
#include <set>
#include <algorithm>
using namespace std;
const int N = 2e6+1;
vector<array<int,3>> rngs[N];
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
set<int> toClear;
int t;
cin>>t;
while(t--)
{
int n;
... | ALGO | 0.999841 | 3.506836 | {
"github_metadata": {
"branch": "main",
"commit_count": 279,
"repo_created_at": "2022-08-05T04:49:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7c0e0425f8... |
a7096f68-3a85-4d12-9782-6b587df4d28d | ishandutta2007/codeforces-f | farhod_farmon/normal/723/E.cpp | #include <bits/stdc++.h>
#include <windows.h>
#define fi first
#define se second
#define sc scanf
#define pr printf
#define pb push_back
#define mp make_pair
#define fin(s) freopen( s, "r", stdin );
#define fout(s) freopen( s, "w", stdout );
const int N = 202;
using namespace std;
vector < int > v[N];
int n, m;
boo... | ALGO | 0.999708 | 3.480563 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:43:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ed0038cf73fe... |
db02ef34-4778-4d12-9873-69f39ec83c23 | VasisthaPrakhar/LC_Questions | 0382-linked-list-random-node/0382-linked-list-random-node.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
private: int n=0;
public:
... | ALGO | 0.999763 | 5.269004 | {
"github_metadata": {
"branch": "main",
"commit_count": 5771,
"repo_created_at": "2021-12-26T12:18:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f66cd1205... |
9c43673b-1c1d-4049-9343-3b4f8ca12c64 | sitRyo/templateCpp_atcoder | AOJ/Lesson/Library/DSL_2_A.cpp | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <functional>
#include <queue>
#include <string>
#include <cstring>
#include <numeric>
#include <cstdlib>
#include <cmath>
#include <limits.h>
using namespace std;
typedef long long ll;
#define INF 10e10
#define rep(i,n) for(int i=0;... | ALGO | 0.999891 | 3.637842 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2018-07-25T15:35: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": "ebf8137ec... |
bb0df0be-341f-48bd-8c85-616bdbd1f502 | chinoxyz/Spoj | EXPRESS.cpp | #include <cstdio>
#include <algorithm>
#include<iostream>
#include<vector>
#include<climits>
#include <complex>
#include <iostream>
#include <valarray>
#include<cstring>
#include<queue>
#include<bitset>
#include<map>
#include<set>
#include<sstream>
#include<ctime>
#include <stack>
#include <iomanip>
#include <cassert>
... | ALGO | 0.999988 | 3.518773 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2015-02-07T15:39: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": "dcddb790b... |
25ea9f00-5632-43e7-9ac5-ff873092ca79 | Nil0ofar/UVa_Solutions | 10604 - Chemical Reaction.cpp | #include<bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define fi first
#define se second
#define ll long long
#define pll pair<ll , ll>
#define pii pair<int , int>
#define... | ALGO | 0.999857 | 3.588637 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-01-20T16:04: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": "754d19c236... |
115fb521-3034-47ae-acfa-a3dd2df66e56 | rishiVC20/competitive_programming | Starters 137/spellSplice.cpp | // <NAME>
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define onebit(x) __builtin_popcountll(x)
#define vi vector<ll>
const ll mod = 1e9+7;
ll mul (ll a, ll b, ll m=mod)
{
a = a % m;
b = b % m;
return (((a * b) % m) + m) % m;
}
ll power(ll base, ll exponent)
... | ALGO | 0.99996 | 3.575491 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2024-07-24T05:22: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": "0fa43a1a526... |
8f90bb68-06eb-483e-af78-44985e81e240 | Successful-coders/Inf-lab1 | Inf-lab1/Source.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string>
FILE* fileInput1, * fileInput2, * fileInput3, * fileInput4, * fileOutput1, * fileOutput2, * fileOutput3, * fileOutput4;
using namespace std;
struct Stack {
char data[200];
int size = 0;
};
void push(Stack* st... | ALGO | 0.998269 | 3.478105 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2019-09-14T06:54:37.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "55a2efa5c9... |
f8f894f9-5e59-4d74-9098-18732cbd7815 | mostafa-saad/MyCompetitiveProgramming | Olympiad/POI/official/2008/code/klo/prog/klob3.cpp | /*************************************************************************
* *
* XV Olimpiada Informatyczna *
* *
* Zadanie: Klock... | ALGO | 0.999924 | 3.398587 | {
"github_metadata": {
"branch": "master",
"commit_count": 439,
"repo_created_at": "2017-02-05T22:26:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 415,
"forks": 85,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "32d5a... |
48baa47c-d598-41c1-9817-098f6964556d | esa/pagmo2 | include/pagmo/algorithms/de.hpp | /* Copyright 2017-2021 PaGMO development team
This file is part of the PaGMO library.
The PaGMO library is free software; you can redistribute it and/or modify
it under the terms of either:
* the GNU Lesser General Public License as published by the Free
Software Foundation; either version 3 of the License, or... | ALGO | 0.999462 | 6.397954 | {
"github_metadata": {
"branch": "master",
"commit_count": 4643,
"repo_created_at": "2017-01-08T21:53:43.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 880,
"forks": 167,
"issues": 47,
"pull_requests": 8
},
"file_meta": {
"content_id": "b9a... |
f7ff03ea-90ef-46c5-9c1e-78dfad0344cc | adiIspas/Procedural-Programming | Matrix2/main.cpp | #include <iostream>
using namespace std;
int main()
{
int M, N, P;
M = 5;
N = 7;
P = 3;
//int A[2][2] = {1,2,3,4}, B[2][2] = {5,6,7,8}, C[2][2] = {0,0,0,0};
int A[M][P], B[P][N], C[M][N] = {0};
int x = 1;
int operatii1, operatii2, operatii3;
operatii1 = operatii2 = operatii3 = 0;
... | ALGO | 0.999803 | 3.314434 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2016-02-27T14:09: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": "94f1873226... |
2d1da763-9c6c-4ff1-ace0-19d1411bd6a6 | wisehead/mysql_tools | stonedb/arm_1.0.3/bin_tools.h | /* Copyright (c) 2022 StoneAtom, Inc. All rights reserved.
Use is subject to license terms
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is di... | TOOL | 0.965002 | 6.183324 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2017-09-27T06:03:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d9b8e51c2... |
3628abac-3596-48a2-8b3a-d08bb55b1cf6 | thgjm/fundamentalsOOP | 2_semester/3_lab/headers/SequentialMultiplier.h | #pragma once
#include "MatrixMultiplier.h"
#include <stdexcept>
/**
* @brief Sequential implementation of matrix multiplication
*
* This class implements matrix multiplication using a standard sequential
* algorithm. It serves as a baseline for comparing performance with
* parallel implementations.
*/
class Sequ... | ALGO | 0.996029 | 7.057979 | {
"github_metadata": {
"branch": "main",
"commit_count": 79,
"repo_created_at": "2024-09-20T16:06:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b6b7b1422dd... |
0ef3bb65-7b8c-4b32-816e-b7e3349a3654 | evargashe/Programacion-Competitiva | PrimeraUnidad/Aula04/ThreePointerSumEqual.cpp |
/* https://cses.fi/problemset/task/1640/ */
#include <bits/stdc++.h>
#include <vector>
#include <map>
using namespace std;
#define ln '\n';
typedef long long ll;
int SumThreeValues(vector<pair<int,int>> a,long int len,int suma)
{
vector<pair<int,int>> aux;
for( auto i=a.begin();i!=a.end();i++)
{
... | ALGO | 0.99998 | 3.794281 | {
"github_metadata": {
"branch": "main",
"commit_count": 79,
"repo_created_at": "2021-09-20T15:29:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "d619904f724... |
baf6604c-6edc-4e7b-9a4b-8f2af896be86 | migeee8/DigitalVideoProcess2023Spring | labs/lab1/watershed.cpp | #include <iostream>
#include <opencv2/opencv.hpp>
#include "threshold.h"
using namespace cv;
using namespace std;
Vec3b RandomColor(int value)
{
value = value % 255;
RNG rng;
int aa = rng.uniform(0, value);
int bb = rng.uniform(0, value);
int cc = rng.uniform(0, value);
return Vec3b(aa, bb, cc);
}
Mat waters... | ALGO | 0.991075 | 4.759447 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-05-24T12:27: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": "96ba1877947c... |
ef0fd6e2-e912-473f-8873-8ca2ec56c658 | kripken/ammo.js | bullet/Extras/CDTestFramework/Opcode/OPC_BoxPruning.cpp | /*
* OPCODE - Optimized Collision Detection
* http://www.codercorner.com/Opcode.htm
*
* Copyright (c) 2001-2008 <NAME>, <EMAIL>
This software is provided 'as-is', without any express or implied warranty.
In no event will the authors be held liable for any damages arising from the use of this software.
Permission... | ALGO | 0.999907 | 3.703904 | {
"github_metadata": {
"branch": "main",
"commit_count": 434,
"repo_created_at": "2011-05-28T23:08:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4355,
"forks": 574,
"issues": 161,
"pull_requests": 14
},
"file_meta": {
"content_id": "f1... |
14bb6517-cbe5-4a60-9e95-aeac34c07e95 | Hazurl/awesome-matrix | include/awm/Operations/OpInverse.hpp | #pragma once
#include <awm/Operations/OpDeterminant.hpp>
namespace awm {
template<template<typename, unsigned int, unsigned int> typename M, typename T, unsigned int R, unsigned int C, bool = (
// Has an inverse ?
R == C
)>
class OpInverse {
using this_t = M<T, R, C>*;
using cthis_t = const M<T, R, ... | ALGO | 0.983468 | 6.932847 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2017-12-10T15:14:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c0f03fe04... |
4396c13e-8ede-431f-8ba6-b2f82f4f0b77 | KilimiaoSix/PID | mymath.cpp | #include <iostream>
#include "mymath.hpp"
using namespace std;
//三角隶属度函数
double trimf(double x, double a, double b, double c)
{
double u;
if (x >= a && x <= b)
{
u = (x - a) / (b - a);
}
else if (x > b && x <= c)
{
u = (c - x) / (c - b);
}
else
u = 0.0;
return u;
}
//正态隶属度函数
double gaussmf(double x, doub... | ALGO | 0.999727 | 3.463151 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-08-01T14:59:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c463c4c196... |
147c9cec-0b0f-4229-8df7-f203607588c5 | ng8165/USACO | CSES/Graph/FlightRoutesCheck.cpp | // Flight Routes Check
// CSES Graph Algorithms: https://cses.fi/problemset/task/1682/
// Passed 17/18 test cases
#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> adjList[100001];
bitset<100001> visited;
bitset<100001> visitAll;
bool dfs(int src) {
visited[src] = true;
if (visitAll[src])... | ALGO | 0.999988 | 3.861494 | {
"github_metadata": {
"branch": "main",
"commit_count": 153,
"repo_created_at": "2022-06-17T06:57: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": "7f008f2bc5... |
7ae46bfa-2b6f-4e67-b266-5b9ac04a852a | tbriand/inverse_compositional | mInverseCompositional_1.00/output.cpp | // This program is free software: you can use, modify and/or redistribute it
// under the terms of the simplified BSD License. You should have received a
// copy of this license along this program. If not, see
// <http://www.opensource.org/licenses/bsd-license.html>.
//
// Copyright (C) 2018, <NAME> <<EMAIL>>
// Copyri... | ALGO | 0.990332 | 5.503743 | {
"github_metadata": {
"branch": "master",
"commit_count": 77,
"repo_created_at": "2017-07-21T19:40:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9f193148... |
8474e6b2-0b8c-49c8-bad2-ddf1a8e7b81e | sara-mohamd/ICPC-Assiut-Sheets | Prctice-JuniorsPhase1/STL1/J.M-Island.cpp | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
typedef long long ll;
using namespace std;
void speed() { ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr); }
int main()
{
speed();
ll n, ctr = 0;
cin >> n;
vector<pair<ll, ll>> v(n);
vector<ll> ans(n);
for (int i = 0; i < n... | ALGO | 0.999942 | 3.679483 | {
"github_metadata": {
"branch": "master",
"commit_count": 220,
"repo_created_at": "2023-11-07T18:27:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "212bc421... |
daa2cbe5-86eb-4b77-9010-3f6938e9024e | SusmoyBarman1/Simulation-And-Modeling | 4. Runs UP and Down/RandGenerator.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
cout<<"Working on Segment 1: Random Number Generator......"<<endl<<endl;
int n, a, c, x=0, controller;
double r;
int m = 1000;
cout<<"Enter the value of N: ";
cin>>n;
cout << "\nEnter 1 to use LCM, 2 to use C builtin library: ";
cin >> controll... | ALGO | 0.997533 | 3.561573 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-09-12T09:55: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": "6b0b9cd168... |
03578a62-32f3-46cb-a7a1-7e8779f8d71a | Benjamin-taro/Atcoder | abc240/abc240_d/main.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <queue>
#include <array>
#include <climits>
#include <cmath>
#include <set>
#include <map>
#include <bitset>
#include <deque>
#include <numeric>
#include <asse... | ALGO | 0.999253 | 3.845059 | {
"github_metadata": {
"branch": "main",
"commit_count": 126,
"repo_created_at": "2024-02-28T17:03: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": "6182866c24... |
f7d509bb-3b51-41ad-bddc-c73cf85fb55c | vboboeva/FreeRecall | SimpleLR/main/input/generate_pattern_ortho.cpp | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include <cstdlib> // For srand() and rand()
//#include <mpi.h>
/*----------------------------------------------------------------------*
* Generate Random Patterns written by Vizhe *
* ------------------------------... | ALGO | 0.996251 | 3.583631 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-10-21T09:34: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": "7a4c7957cdb6... |
40ec6b90-463d-40fc-96f7-ec1621e57423 | thirofoo/atcoder-archives | abc172/abc172_d_37273942_AC.cpp | /*
* Author: through
* Submission URL: https://atcoder.jp/contests/abc172/submissions/37273942
* Submitted at: 2022-12-15 00:49:41
* Problem URL: https://atcoder.jp/contests/abc172/tasks/abc172_d
* Result: AC
* Execution Time: 96 ms
*/
#include <bits/stdc++.h>
using namespace std;
#if __has_include(<atcoder/all... | ALGO | 0.999946 | 4.286534 | {
"github_metadata": {
"branch": "main",
"commit_count": 5513,
"repo_created_at": "2022-12-17T09:45:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "b31106725... |
60a3d161-e416-475c-b1b9-6c19ea1fed52 | Polladin/AOC | 2019/src/day_11/painting_robots.cpp |
#include "painting_robots.h"
#include "day_2/computer.h"
#include <iostream>
#include <array>
#include <fstream>
int PaintingRobots::run_part_1( const std::string & fileName )
{
// Robot brain
Computer comp;
// Initialize brain
comp.prepare_day_7_part_1( fileName );
// Input / Output
std::queue< lon... | ALGO | 0.998553 | 5.154598 | {
"github_metadata": {
"branch": "master",
"commit_count": 83,
"repo_created_at": "2018-12-12T21:52: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": "2fcc80742... |
40da37cb-7b18-458b-8cdb-5dfdefab2bdb | ruifshi/LeetCode | LeetCode/ConstructBinaryTreeFromPreorderAndInorderTraversal.cpp | #include "stdafx.h"
#include "ConstructBinaryTreeFromPreorderAndInorderTraversal.h"
TreeNode* buildTreeHelper(vector<int>& preorder, vector<int>& inorder, int& rootIdx, int left, int right) {
if (left > right) return NULL;
int mid = left; // find the root from inorder
// search for this root node rom preorder ... | ALGO | 0.999988 | 6.524821 | {
"github_metadata": {
"branch": "master",
"commit_count": 89,
"repo_created_at": "2018-11-21T08:10: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": "bc8d9df49... |
42afa062-4508-4924-abeb-f4c15fb9b0e8 | RedFoxMain/EBrainFuck | src/BrainFuck.cpp | #include "BrainFuck.h"
#include "Optimizer.h"
BrainFuck::BrainFuck() {}
BrainFuck::~BrainFuck() {}
void BrainFuck::eval(const std::string& code) {
vector_of_pairs vec = Optimizer::getBraces(code);
for (size_t i = 0; i < code.size(); ++i) {
if (std::isspace(code[i])) continue;
if (code[i] == '#') memory_.pushTo... | ALGO | 0.909328 | 4.802901 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2025-04-02T11:34:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8adc42fa9... |
2c181727-6e7f-4db5-96e1-3bfad431877f | VinhTungg/PTIT_C_PLUS_PLUS | CPP0441 - Tim Kiem Tuan Tu.cpp | #include <bits/stdc++.h>
#define ll long long
#define foru(i,a,b) for(int i = a; i <= b; ++i)
#define ford(i,a,b) for(int i = a; i >= b; --i)
#define boost ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define pb push_back
#define mk make_pair
#define fi first
#define se second
#define endl "\n"
#define sz size
#de... | ALGO | 0.999971 | 4.010175 | {
"github_metadata": {
"branch": "main",
"commit_count": 40,
"repo_created_at": "2024-08-11T12:39:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ab51c12f471... |
7dd549ec-6ee1-478d-bcd7-c3a10fce725e | isl-org/Open3D | cpp/open3d/core/linalg/LeastSquaresCUDA.cpp | // ----------------------------------------------------------------------------
// - Open3D: www.open3d.org -
// ----------------------------------------------------------------------------
// Copyright (c) 2018-2024 www.open3d.org
// SPDX-License-Identifier: MIT
// ---... | ALGO | 0.971235 | 6.696029 | {
"github_metadata": {
"branch": "main",
"commit_count": 4194,
"repo_created_at": "2016-12-02T16:40:38.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 12555,
"forks": 2448,
"issues": 1245,
"pull_requests": 37
},
"file_meta": {
"content_id": ... |
36ad9c5f-b2b2-4e03-8e1c-d64517fe7a6c | TimeDA/TimeDA | dataset/28cpp_12_18/gcj2015/Seyaua/6224486_5686275109552128_Seyaua_solutionb.cpp | #include <iostream>
#include <string>
#include <cstring>
#include <cstdio>
#include <set>
#include <map>
#include <vector>
#include <algorithm>
#include <queue>
#include <bitset>
#include <cmath>
#include <ctime>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
map<int, int> mvs;
in... | ALGO | 0.999906 | 4.021916 | {
"github_metadata": {
"branch": "main",
"commit_count": 70,
"repo_created_at": "2022-10-24T06:47: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": "33a6bf7dc7f... |
0d2ce247-cc99-4c18-816c-6d38a3da461d | anushkaa-ambuj/DSA | Problem Bank/Array Leaders/naive.cpp | #include <bits/stdc++.h>
using namespace std;
// Function to find the leaders in an array
vector<int> leaders(vector<int>& arr) {
vector<int> res;
int n = arr.size();
for (int i = 0; i < n; i++) {
int j;
// Check elements to the right
// of the current element
for (j =... | ALGO | 0.999969 | 5.080431 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2023-03-04T10:30: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": "11f131aab... |
d00c5cf4-3500-4214-858b-807be4ecada4 | lailanelkoussy/Assembly_Project1 | Sim.cpp | //
// Created by <NAME> 900160812 on 7/4/18.
//
#include "Sim.h"
Sim::Sim(char a[], int &size) {
this->size = size;
memory = a; // passed memory by reference
pc = 0;
for (auto element : regs)
element = 0; //initializing array with all zeros
}
Sim::Instruction::Instruction() {
... | ALGO | 0.963938 | 3.37332 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2018-07-03T16:47:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "24124fa80... |
9d79b171-4a06-4add-b8a3-f04c22470657 | cyoq/LinkedList | LinkedList/levenshtein_distance.h | #pragma once
#include "pch.h"
#include <string>
#include <algorithm>
static int matrix[100][100];
int levenshteinDistance(const std::string &s1, const std::string &s2) {
const int len1 = strlen(s1.c_str());
const int len2 = strlen(s2.c_str());
if (len1 == 0) { return 0; }
if (len2 == 0) { return 0; }
/*int ... | ALGO | 0.994465 | 4.72209 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2019-03-02T18:42: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": "c3bb67c6b... |
3cfc738e-3599-42b7-a232-d8a808dde21d | vickyguptaa7/DSA-Practice | 18.Dynamic Programming/4.Longest_Common_Subseq/Print_LC_Subsequence.cpp | #include <iostream>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std;
vector<vector<int>> LCS(string x, string y, int n, int m)
{
vector<vector<int>> dp(n + 1, vector<int>(m + 1, 0));
for (int i = 0; i <= n; i++)
dp[i][0] = 0;
for (int j = 0; j <= m; j++)
dp[0][j... | ALGO | 0.999989 | 4.656638 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2022-02-07T07:12: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": "279e8c785... |
1619bdc6-0b1f-4af6-b527-4cc22785e48c | pavel-ryzhov/global_vars | runs/003644.cpp | /*
* файл Floyd-Vorshell.cpp
* Задача 2: Расстояние в дереве
*/
#include <stdio.h>
#include <memory.h>
#define MAX_SIZE 100 // максимальное число вершин в графе
#define INF 100000000 // "бесконечность"(число много большее длинны любого из отрезков)
int i = 0, j = 0, k = 0, x = 0, y =0,
dist = 0, N = 0, M ... | ALGO | 0.999986 | 4.248831 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-07-04T20: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": "0999ba1f0c56... |
fee325d3-cb8a-49f7-99f1-4ab045657d6d | ReNginx/LRAstar | c++-version/dijk.cpp | #include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <queue>
using namespace std;
const int maxn = 2e5 + 10, maxm = 4e5 + 10, inf = 0x3f3f3f3f;
int cnt;
struct edge{
int from, to, nxt, wgt, shw; //wgt is real, shw is temp
bool flag = true;
edge *par;
edge() {}
edge (int _f... | ALGO | 0.999943 | 3.792271 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2018-10-31T19:04: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": "37db92a60... |
40da1b60-11a1-4249-9dab-240a6df5449b | willyistaken/Competitive-Programming | codeforce/1562E.cpp | #include <bits/stdc++.h>
static struct FASTIO {
char READ_CHARACTER; bool REMAINING_CHARACTER = false;
inline void ignore(); inline void flush();
template <typename T> inline bool READ_INT(T &x); template <typename T> inline bool READ_STRING(T &x);
/* ... | ALGO | 0.999619 | 3.964424 | {
"github_metadata": {
"branch": "main",
"commit_count": 386,
"repo_created_at": "2021-12-08T13:26:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8a9a1e2a9f... |
185fac64-c261-4277-bca5-cb19e087b101 | Roshanbarnwal/cpp | STL/listSTL.cpp | /*
List class supports a bidirectional, linear list.
Vector supports random access but a list can be accessed sequentially only.
List can be accessed front to back or back to front.
*/
#include <iostream>
#include <list>
using namespace std;
int main(void){
// list <int> l1;
list <int> l1{11,22,22,44,77,55,33};... | TOOL | 0.91822 | 4.421235 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2022-10-25T19:00: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": "526de598cb6... |
81d2432e-71c3-4580-97fd-d6546618c619 | weirande2009/Leetcode | US/Sort/88. Merge Sorted Array/ver1.cpp | #include <vector>
using namespace std;
// Algorithm: O(n). From back to front, set i=m-1, j=n-1, and l=0. Set the larger one to
// the back of nums1 array, and judge the next.
class Solution {
public:
void merge(vector<int>& nums1, int m, vector<int>& nums2, int n) {
int i = m-1;
int j = n-1;
... | ALGO | 0.999995 | 5.46893 | {
"github_metadata": {
"branch": "main",
"commit_count": 120,
"repo_created_at": "2022-09-22T19:01: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": "6f84c018cc... |
e5c09a38-546a-4321-b2c2-44a4e5d8be38 | InsightSoftwareConsortium/ITK | Examples/Statistics/SampleStatistics.cxx | /*=========================================================================
*
* Copyright NumFOCUS
*
* 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
*
* https://www.apache.o... | ALGO | 0.935971 | 6.474379 | {
"github_metadata": {
"branch": "main",
"commit_count": 57165,
"repo_created_at": "2010-07-27T15:48:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1517,
"forks": 701,
"issues": 268,
"pull_requests": 49
},
"file_meta": {
"content_id": "a... |
d43fc4b4-fb1a-4b29-b9fe-ae53748cd3ce | knowgaurav/interview-prep | Striver/A2Z DSA/DynamicProgramming/frogJump.cpp | #include "bits/stdc++.h"
using namespace std;
#include <bits/stdc++.h>
int solve(int idx, vector<int> &heights, vector<int> &dp){
/*
Time Complexity : O(n)
Space Complexity : O(n) + O(n)
*/
if(idx == 0) return 0;
if(dp[idx]!=-1) return dp[idx];
int jumpOf1 = solve(idx-1, heigh... | ALGO | 0.999971 | 4.811857 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-08-04T04:54: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": "6090781fb7cb... |
2800fe43-8ddc-40a8-b53e-a5d9e968c26f | veenits123/SDE-Sheet | 2022/130. Surrounded Regions.cpp | /**
* तस्मात्सर्वेषु कालेषु मामनुस्मर युध्य च ।
* मय्यर्पितमनोबुद्धिर्मामेवैष्यस्यसंशय: ॥
*
* <NAME>ṣṇa <NAME>ṣṇa
* Kṛṣṇa Kṛṣṇa <NAME>
* <NAME>
* <NAME>
**/
#include <iostream>
#include <cstdio>
#include <cmath>
#include <set>
#include <algorithm>
#include <vector>
#include <map>
#include <iomanip>
#include <c... | ALGO | 0.999876 | 4.035283 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2021-07-01T12:18: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": "cf54f56b9b1... |
8de236a2-74f0-4d09-b438-054e3a21901e | ankiiitraj/questionsSolved | UWCOI21D.cpp | #include <bits/stdc++.h>
#include <time.h>
#define int long long int
#define pb push_back
#define mem(a, x) memset(a, x, sizeof a)
#define all(a) a.begin(), a.end()
#define scnarr(a, n) for (int i = 0; i < n; ++i) cin >> a[i]
#define vi vector<int>
#define si set<int>
#define pii pair <int, int>
#define sii set<pii>
#d... | ALGO | 0.998633 | 3.905615 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2020-02-19T18:09:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "aca8e42aa... |
3a9c130f-9cf7-4891-b112-e13a88e85259 | C-2023-4-6/8209230519xuhongbin | lab4.5/lab4.5/4.5.cpp | #include <iostream>
#include <cstring>
#include <string>
using namespace std;
int indexOf(const char s1[], const char s2[]) {
int a, b, index, j, k;
a = strlen(s1);
b = strlen(s2);
bool* s3 = new bool[a];
for (int i = 0; i < a; i++) {
s3[i] = false;
}
for (int i = 0; i < b - a + 1; i++) {
for (j = 0, k = i; ... | ALGO | 0.999194 | 3.960067 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2023-11-18T07:12:56.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e1906fa56ab6... |
4932b26a-10cf-423a-88de-0315e363fbc1 | greatsharma/Cpp-Mess | dijkstra.cpp | #include <iostream>
using namespace std;
int *findShortest(int **adj_mat, int start, int end)
{
}
int main()
{
cout << "\nenter no of vertices : ";
int v;
cin >> v;
cout << "\nenter no of edges : ";
int e;
cin >> e;
int **adj_mat = new int *[v];
for (int i = 0; i < v; i++)
{
... | ALGO | 0.999962 | 4.884254 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-07-22T12:24: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": "df138dea51... |
0a9ddf59-93cf-41e3-abaf-7f7611b3f506 | noe/gene | include/gene/algorithm_impl.hpp | // Copyright (c) 2013, <NAME> (<EMAIL>).
// Distributed under New BSD License.
// (see accompanying file COPYING)
#include <map>
#include <utility>
#include "gene/algorithm.hpp"
namespace gene {
///////////////////////////////////////////////////////////////////////////////
template<typename Phenotype, typename Geno... | ALGO | 0.999923 | 6.596066 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2013-09-01T21:26: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": "c7c3c86bd... |
4cdcaa17-44c6-45cf-ae1f-7c4b96c3a67a | Sanket-09/striver_sde_sheet | day1/search_in_2d_matrix.cpp | #include <bits/stdc++.h>
using namespace std;
bool searchMatrix(vector<vector<int>>& mat, int target)
{
int rows = mat.size();
int columns = mat[0].size();
int left = 0;
int right = rows * columns - 1;
while (left <= right) {
int mid = left + (right - left) / 2;
int midElement =... | ALGO | 0.999794 | 5.75586 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2023-06-25T17:26:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c9726e0c1da... |
0db01f1a-0f02-431b-bff5-4fe6c2253d9a | hiteshv01/6Companies30Days | Walmart/12. Generate Random Point in a Circle.cpp | class Solution {
public:
double r,x,y ;
Solution(double radius, double x_center, double y_center) {
r = radius ;
x = x_center ;
y = y_center ;
}
vector<double> randPoint() {
vector<double> v ;
double length ;
double theta ;
... | ALGO | 0.997365 | 5.36068 | {
"github_metadata": {
"branch": "main",
"commit_count": 68,
"repo_created_at": "2022-01-05T11:41:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7b620d6a60... |
d211325a-0af1-4b67-baff-5ccd11365d2d | AbhishekRaj-droid/Coding-Archive | Algorithms/big_factorials.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution {
public:
vector<int> multiply(vector<int> res, int x) {
long long temp = 0;
long long carry = 0;
vector<int> result;
for (int i = res.size() - 1; i >= 0; i--) {
temp = res[i] * x;
temp += carry;
carry = temp / 10;
result.push_back(tem... | ALGO | 0.999968 | 5.165938 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2019-06-08T09:40: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": "20e64900d... |
a754fe2e-03b9-4980-acd0-32a81fa458fd | Codeshows/100DaysOfCode | ashishburdak/Day28/B. Verse For Santa.cpp | #include <bits/stdc++.h>
using namespace std;
#define mod 1000000007
#define ld long double
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(x) x.begin(), x.end()
#define mp map<long, long>
#define um unordered_map<long, long>
#define s... | ALGO | 0.999974 | 3.557379 | {
"github_metadata": {
"branch": "master",
"commit_count": 359,
"repo_created_at": "2019-12-16T11:59:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 24,
"forks": 63,
"issues": 4,
"pull_requests": 1
},
"file_meta": {
"content_id": "51a7a5b... |
f9b9d12c-aca2-4813-b567-eb64c8a03cb1 | XYXBlAcG/cppcode_backup | 高斯消元_template.cpp | #include <cstdio>
#include <algorithm>
#include <vector>
#include <cmath>
#define EPS 1e-6
const int N = 105;
typedef double d;
int n;
d a[N][N], ans[N];
int main(){
scanf("%d", &n);
for (int i = 1; i <= n; i++){
for (int j = 1; j <= n + 1; j++){
scanf("%lf", &a[i][j]);
}
}
f... | ALGO | 0.999977 | 3.357469 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2023-07-22T12:36:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "55e65aba6ee... |
8ff7f6ae-0b76-426d-9a6c-149b75987e76 | aau-ros/aau_multi_robot | explorer/src/src/adapters/std_2d_array.h | /*
* Copyright (c) 2007 <NAME>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is... | TOOL | 0.925218 | 3.461464 | {
"github_metadata": {
"branch": "master",
"commit_count": 102,
"repo_created_at": "2014-09-24T08:07:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 53,
"forks": 37,
"issues": 6,
"pull_requests": 1
},
"file_meta": {
"content_id": "1e4a5b... |
d9445905-fb5e-4024-84db-8ba83a9afd00 | Tophat360/SeanBaslerCodingProjects | cs1510/hw3/arraylist.hpp | //Name: <NAME> Section: B
#include<iostream>
using namespace std;
template <typename T>
ArrayList<T>::~ArrayList()
{
m_size = 0;
m_max = 0;
delete [] m_data;
m_data = NULL;
}
template <typename T>
ArrayList<T>& ArrayList<T>::operator=(const ArrayList<T>& rhs)
{
if(this != &rhs)
{
m_size = rhs.m_size;
m_m... | TOOL | 0.93292 | 3.560914 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-05-17T21:47: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": "037ae050d3... |
3bdfb4a7-84a0-4fe4-9549-fad1ddbd18aa | kwierman/ORCAnalysis | Core/LinearAlgebra/Matrix.hh | #ifndef ORCA_Matrix_hh_
#define ORCA_Matrix_hh_
#include "ORCA/LinearAlgebra/Vector.hh"
#include <vector>
#include <cmath>
namespace ORCA{
namespace LinearAlgebra{
//! Implements matrix addition, subtraction, multiplication
template<typename T, int n, int m>
class Matrix;
//! Helper template to get subma... | TOOL | 0.976098 | 6.860011 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2015-01-29T16:18:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e06b712e5... |
405a4c6b-9b5a-4e75-a83d-d02657285916 | A1-mamun/CP-Problem | B_Customising_the_Track.cpp | #include <bits/stdc++.h>
using namespace std;
#define fr(m) for (int i = 0; i < m; i++)
#define fro(m) for (int i = 1; i < m; i++)
#define frj(m) for (int j = 0; j < m; j++)
#define frr(n) for (int i = n; i >= 0; i--)
#define ll long long
#define vi vector<int>
#define vl vector<long long>
#define pb push_back
#define ... | ALGO | 0.999972 | 3.963762 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-05-01T09:42: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": "e102a2862970... |
03a2ea71-c588-4c24-9638-a44de5971a5d | Prasad-264/SdeSheetChallenge | Day6_Array/4_sum.cpp | /*
Given an array nums of n integers, return an array of all the unique quadruplets [nums[a], nums[b], nums[c], nums[d]] such that:
-> 0 <= a, b, c, d < n
-> a, b, c, and d are distinct.
-> nums[a] + nums[b] + nums[c] + nums[d] == target
-> You may return the answer in any order.
Example 1:
Input: nums = [1,0,-1... | ALGO | 0.99999 | 6.220407 | {
"github_metadata": {
"branch": "main",
"commit_count": 60,
"repo_created_at": "2022-06-05T15:39: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": "1e862fb98b8... |
0e692fef-e7af-4725-9bed-d6ece9b3b5f6 | dongguosheng/learn_dssm | cpp/w2v.h | #ifndef W2V_H
#define W2V_H
#include <tr1/unordered_map>
#include <tr1/unordered_set>
#include "mat.h"
#include <string>
#include <cstdio>
#include <vector>
#include <fstream>
#include <sstream>
class W2V {
public:
W2V() {}
bool LoadModel(const char *vocab_file, const char *syn0_file, const char *... | DATA | 0.962759 | 5.478274 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2016-01-23T09:19:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7af04c819... |
591d86d8-2175-41ab-83fb-d808110cdb5e | bamboohiko/problemSolve | lightOJ/p1058.cpp | #include<iostream>
#include<cstdio>
#include<map>
#include<set>
#include<vector>
#include<stack>
#include<queue>
#include<string>
#include<cstring>
#include<sstream>
#include<algorithm>
#include<cmath>
using namespace std;
const double eps = 1e-6;
struct point {
double x,y;
};
point a[1010],b[1000100];
bool same(po... | ALGO | 0.99979 | 3.69199 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2015-12-13T17:03: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": "97ff7a06d... |
f6b5d82a-511b-4fba-bd70-37eb453ec433 | Reset02/Leetcode | 0368-largest-divisible-subset/0368-largest-divisible-subset.cpp | class Solution {
public:
vector<int> largestDivisibleSubset(vector<int>& nums) {
if (nums.empty()) return {};
sort(nums.begin(), nums.end()); // 先排序
int n = nums.size();
vector<int> dp(n, 1); // 每個元素最長長度初始為 1
vector<int> prev(n, -1); // 前一個元素索引,預設為 -1
int max_len =... | ALGO | 0.999966 | 5.293115 | {
"github_metadata": {
"branch": "main",
"commit_count": 613,
"repo_created_at": "2024-05-30T12:30: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": "f607da75cc... |
f9647998-6f5d-4902-a8f8-fed172bb43fd | katie0809/Algorithm | 진법변환_2.cpp | #include <stdio.h>
#include <string.h>
#include <string>
#include <stdlib.h>
#include <stack>
using namespace std;
stack<int> ret;
char num[11];
int B;
long long int pow(int B, int j){
if(j == 0) return 1;
int ret = 1;
while(j--){
ret *= B;
}
return ret;
}
long long int _atoi(int len){
long long int ... | ALGO | 0.999969 | 3.47205 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-01-08T06:48:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c417cfa86d... |
3fbee918-8e25-420b-9018-bc5894abcd4c | its-S1mple/DSA-course--By-Love-Babbar | linked_list/remove_dupes_unsortedLL.cpp | #include <iostream>
using namespace std;
class Node
{
public:
int data;
Node *next;
// constructor
Node(int d)
{
this->data = d;
this->next = NULL;
}
// destructor
~Node()
{
// // int val = this->data;
// if (this->next != NULL)
// {
... | ALGO | 0.999582 | 4.890508 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-07-04T17:16: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": "9f8d8ea8cda9... |
7f9e60e3-ae7f-4327-8c6c-5d308cf6d76d | Akanksha2403/codes | D_First_element_at_least_X_-_2.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
// Uncomment them for optimisations
//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx,avx2,fma")
// for segment tree
#define mid (start+end)/2
#define lnode (node*2+1)
#define rnode (node*2+2)
#define popcount(x) __builtin_popcount(x)
#define GE... | ALGO | 0.99996 | 5.070804 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2021-09-24T22:26: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": "e0805d0fa... |
0099cca2-04ec-48c6-a285-d3ef887839ad | 1004Jumto/Cpp_Lecture | MultiOfMatrix.cpp | #include<iostream>
#include<vector>
using namespace std;
class Matrix
{
public:
Matrix(vector<vector<int>> v);
Matrix operator*(Matrix& m);
friend ostream& operator<<(ostream& os, const Matrix& m);
private:
vector<vector<int>> values;
int getInnerProduct(Matrix& m, int i, int j);
protected:
};
Matrix::Matrix... | ALGO | 0.999983 | 4.87187 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2022-09-13T18:07: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": "e4ddf3567... |
7606d13f-f220-4328-b64c-654de5c568c5 | kks227/BOJ | 13000/13068.cpp | #include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
const double UNDEF = -1e9;
const double INF = 1e18;
struct Game{
int A, L, P;
Game(): Game(0, 0, 0){}
Game(int A1, int L1, int P1): A(A1), L(L1), P(P1){}
bool operator <(const Game& O)const{ return P*A*O.L*(100-O.P) > O.P*O.A*L*(100-P); }... | ALGO | 0.998616 | 4.056908 | {
"github_metadata": {
"branch": "master",
"commit_count": 531,
"repo_created_at": "2016-07-26T12:54:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 66,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c488fac... |
cbf14464-e0fc-4670-924a-5c5c6d7da81b | dddql/cpp | Algorithm/Sort/Quick_sort(extra_mem).cpp | #include <cstdio>
#include <cstdlib>
using namespace std;
//TODO 快速排序模板
int a[1001];
int t[1001];
int n;
//*生成一个[l, r]以内的随机数
int getRand(int l, int r)
{
return rand() % (r - l + 1) + l;
}
//* 把[l,r]排序
void Quick_sort(int l, int r)
{
if (l >= r) // 空区间或只有一个元素的区间
return;
int flag = a[getRand(l, r... | ALGO | 0.999938 | 4.354367 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-09-25T14:20:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "244ec9c4db... |
00414cbd-004d-429d-b1d6-3be6ccf526ff | riishapKumar/cpp-Algorithm-Examples | src/BinarySearchTreeMain.cpp | //
// algorithms - some algorithms in "Introduction to Algorithms", third edition
// Copyright (C) 2018 lxylxy123456
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either ver... | ALGO | 0.999084 | 4.255075 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-07-25T23:56:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c91b672da4b8... |
6f02ce81-f180-4448-8865-334fb6e30666 | Franco1010/competitive-programming | codeforces/1392/B.cpp | /*
© 2020-08-16 09:35:02 Franco1010 All Rights Reserved
*/
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math")
#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
#define f first
#define s second
#define fore(i,a,b) for(int i = (a), ThxMK = (b); i < ThxMK; ++i)
#define pb push_back
#define... | ALGO | 0.999963 | 4.304955 | {
"github_metadata": {
"branch": "master",
"commit_count": 745,
"repo_created_at": "2020-12-23T19:19: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": "9cd31cec... |
d0e4aa34-69ad-4d7c-a776-cd9d4893ee76 | NVIDIA/OpenSeq2Seq | decoders/decoder_utils.cpp | #include "decoder_utils.h"
#include <algorithm>
#include <cmath>
#include <limits>
std::vector<std::pair<size_t, float>> get_pruned_log_probs(
const std::vector<double> &prob_step,
double cutoff_prob,
size_t cutoff_top_n) {
std::vector<std::pair<int, double>> prob_idx;
for (size_t i = 0; i < prob_step... | ALGO | 0.99878 | 6.924291 | {
"github_metadata": {
"branch": "master",
"commit_count": 1695,
"repo_created_at": "2017-09-08T20:53:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1561,
"forks": 371,
"issues": 80,
"pull_requests": 7
},
"file_meta": {
"content_id": "c1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.