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 |
|---|---|---|---|---|---|---|---|
6732b8b3-e4bd-406f-9a18-db2408249742 | LukasAnell/AdventOfCodeCpp | Year2024/Day18/DayEighteen.cpp | //
// Created by Lukas on 12/9/2024.
//
#include "DayEighteen.h"
#include <iostream>
#include <queue>
#include "../../Utils/utils.h"
#include <string>
#include <unordered_set>
namespace Year2024 {
DayEighteen::DayEighteen(const std::string& fileName, const bool isSample) {
fileContents = utils::readFile... | ALGO | 0.999881 | 6.148003 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2024-08-29T00:07: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": "84e3e9629... |
7d1901d4-5117-4501-9bdb-ce0035591d40 | congminh1809/HoleshotDevice | fisHoleShotDevice.ino | #include "fis_header.h"
// Number of inputs to the fuzzy inference system
const int fis_gcI = 4;
// Number of outputs to the fuzzy inference system
const int fis_gcO = 1;
// Number of rules to the fuzzy inference system
const int fis_gcR = 10;
FIS_TYPE g_fisInput[fis_gcI];
FIS_TYPE g_fisOutput[fis_gcO];
// Setup rou... | ALGO | 0.991833 | 3.607905 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2021-12-03T02:59: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": "e4ae101eda97... |
d9e4540b-1239-4eed-9601-87a3510d5bbc | afzalansari12/coding-blocks | lecture - 11/lecture - 12/arrays_rainwtertimefficient.cpp | #include<iostream>
using namespace std;
int rainwateroptimised(int h[], int n){
int l[100];
l[0]= h[0];
for (int i = 1; i <= n-1; i++){
l[i] = max(h[i], l[i- 1]);
}
int r[100];
r[n-1] = h[n -1];
for(int i = n-2; i >= 0; i--){
r[i... | ALGO | 0.999915 | 5.373129 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-02-08T04:20: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": "d7f688808b45... |
08da335c-9d9f-452e-a5c6-71159fccc395 | Mohamed-Elbhairy/Competitive-Programming | MostafaSaadSheet Solutions/B/Kuriyama Mirai's Stones.cpp | #include <bits/stdc++.h>
#include <algorithm>
//#include <ext/pb_ds/assoc_container.hpp>
//#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
//using namespace __gnu_pbds;
//typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
//typedef tree<int, null_type, less_e... | ALGO | 0.999896 | 4.773146 | {
"github_metadata": {
"branch": "temp",
"commit_count": 7,
"repo_created_at": "2024-09-10T16:13: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": "63677b6ae397... |
5c9773e1-30d2-41b7-bacf-e1ffed969ba3 | badouralix/adventofcode-2018 | day-05/part-2/ayoub.cpp | #include <iostream>
#include <string>
#include <ctime>
using namespace std;
struct Stack {
struct Stack *prev;
char val;
};
typedef struct Stack Stack;
bool react(char a, char b) {
if (a >= 'a' && b < 'a') return a - ('a'-'A') == b;
if (a < 'a' && b >= 'a') return b - ('a'-'A') == a;
return fals... | ALGO | 0.999774 | 4.407138 | {
"github_metadata": {
"branch": "master",
"commit_count": 629,
"repo_created_at": "2018-11-30T23:33:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 29,
"forks": 6,
"issues": 3,
"pull_requests": 2
},
"file_meta": {
"content_id": "4975b64... |
175bcf17-927b-405b-88e3-d43c8f6a6f5a | Rurril/IT-DA-3rd | study/Ace/Week2/BOJ_17135_이정혁.cpp | #include<iostream>
#include<queue>
#include<vector>
#include<algorithm>
using namespace std;
int arr[17][17];
int N, M, D,idx, result, maximum;
vector<int> n;
vector<int> ind;
vector<int> archer[455];
queue<pair<int, int>> q;
void Combi() {
for (int i = 1; i <= N; i++) {
n.push_back(i);
}
int k = 3;
for (int i... | ALGO | 0.999782 | 3.842492 | {
"github_metadata": {
"branch": "master",
"commit_count": 1611,
"repo_created_at": "2020-08-20T10:49:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "76d1f8... |
0a5ee5a1-4380-47e1-94ae-f8cf67aaf3ae | zyjking/Transmission-modified | libtransmission/cache.cc | // This file Copyright 2010-2022 Mnemosyne LLC.
// It may be used under GPLv2 (SPDX: GPL-2.0-only), GPLv3 (SPDX: GPL-3.0-only),
// or any future license endorsed by Mnemosyne LLC.
// License text can be found in the licenses/ folder.
#include <algorithm>
#include <cstdlib> // std::lldiv()
#include <iterator> // std::d... | TOOL | 0.964053 | 7.47719 | {
"github_metadata": {
"branch": "4.0.6",
"commit_count": 25,
"repo_created_at": "2023-12-16T09:04:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "735fb530e1... |
6d2cba6b-8552-4e0d-8a77-ed98c7195818 | forestsol/Problem-Solving | kmu_practical_programming/004_kpp_treasure_hunt_schoolfellow_code.cpp | #include <iostream>
using namespace std;
int main(){
int t;
cin >> t;
while(t--){
int n;
bool visited[52][52][4] = {false};
char posit[52][52][4];
cin >> n;
for(int i=0; i<n; i++){
for (int j=0; j<n; j++){
cin >> posit[i][j];
... | ALGO | 0.999914 | 3.72012 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2025-03-28T10:34:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "05a9f676bcb... |
00bfb882-d272-414a-93cc-e3b5f9ba0be5 | breno-helf/TAPA.EXE | contests/bangkok2016/L.cpp | #include <bits/stdc++.h>
using namespace std;
#define debug(args...) fprintf (stderr, args)
const int maxn = 1e5 + 10;
int n, m;
struct pii
{
int to, dx, dy;
pii (int to, int dx, int dy) : to(to), dx(dx), dy(dy) {}
};
vector <pii> adj[maxn];
typedef pair <long long, long long> pares;
pares p[maxn];
bool mrk[ma... | ALGO | 0.999942 | 3.653949 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2017-02-16T23:36: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": "a7584c408... |
0b870ab4-f8c2-467b-9b97-aae65e08cb3d | lewiswolf/kac_core | src/physics/modes/rectangular_modes.hpp | /*
Functions for calculating the linear approximation of the 2-Dimensional
rectangular wave equation.
*/
#pragma once
// core
#include <math.h>
#include <numbers>
#include <vector>
using namespace std::numbers;
// src
#include "../../types.hpp"
namespace T = kac_core::types;
namespace kac_core::physics {
inline T... | ALGO | 0.998564 | 6.322889 | {
"github_metadata": {
"branch": "master",
"commit_count": 217,
"repo_created_at": "2022-03-22T15:48:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2423c3e7... |
e70d36f2-1673-488b-9957-7e7de9b1f320 | king-yyf/cpcode | google/codejam/2008/round1a/2.cpp | #include <bits/stdc++.h>
using namespace std;
#define all(c) (c).begin(), (c).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x).size()
#define sor(x) sort(all(x))
#define f0(e) for(int i=0;i<(e);++i)
#define f1(e) for(int i=1;i<=(e);++i)
#define f2(i,e) for(int i=0;i<(e);++i)
#define f3(i,e) for(i... | ALGO | 0.99993 | 4.700703 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-11-26T03:35: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": "050e4446fbe4... |
b29579b3-b707-4eb7-8cb2-5e1c881897fd | Harshit-Vashisth/Leetcode | 0025-reverse-nodes-in-k-group/0025-reverse-nodes-in-k-group.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 {
public:
int length(ListNode* ... | ALGO | 0.999955 | 5.536567 | {
"github_metadata": {
"branch": "main",
"commit_count": 833,
"repo_created_at": "2023-03-21T18:52:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c9bca775d2... |
dfccc15f-5b02-4fee-867d-b2b64560ebc8 | dheerujilagam/leetcode | Subset Sum Problem - GFG/subset-sum-problem.cpp | //{ Driver Code Starts
//Initial template for C++
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function template for C++
class Solution{
public:
bool solve(int id, int sum, vector<int> &arr, vector<vector<int>> &dp) {
if(sum == 0) return 1;
if(id == arr.size()) r... | ALGO | 0.999316 | 5.531327 | {
"github_metadata": {
"branch": "main",
"commit_count": 1998,
"repo_created_at": "2022-07-27T09:15: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": "febe002a2... |
ebb75b10-de90-43d1-9bb3-d7c983f20f42 | apassi99/LeetCode | word_search.cpp | class Solution {
public:
bool exist(vector<vector<char>>& board, string word) {
set<pair<int,int>> visitedNodes;
for (int i = 0; i < board.size(); i++) {
for (int j = 0; j < board[0].size(); j++) {
if (dfs(make_pair(i,j), board, visitedNodes, word, 0)) {
... | ALGO | 0.999919 | 6.406496 | {
"github_metadata": {
"branch": "master",
"commit_count": 285,
"repo_created_at": "2015-10-22T21:10:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3642610b... |
c7e15245-c12e-4931-b4e2-63dd669baced | ConanNobita/leetcode-myanswer | algorithm/622.Design_Circular_Queue.cpp | #include "common.h"
USESTD
class MyCircularQueue {
public:
MyCircularQueue(int k)
: array(new int[k]),
front(0),
rear(-1),
capacity(k),
size(0)
{
}
~MyCircularQueue() {
delete[] array;
array = nullptr;
}
/** Insert an ... | ALGO | 0.978894 | 5.441873 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-03-08T05:17:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c15c0ecd84... |
6264977d-7abc-4b44-ac8e-8ea5f2128282 | cppnuts-yt/CppNuts | C++ Programming/STL/STL Algorithms/10 copy and copy_if.cpp | // TOPIC: STL ALGORITHM copy and copy_if
// NOTES:
// 0. copy Copies the elements in the range, defined by [first, last), to another range beginning at d_first.
// 1. copy_if only copies if predicate returns true.
// 2. if source and destination range are overlapping then the behavior is undefined.
#include <algorith... | ALGO | 0.998354 | 5.824234 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2020-07-01T14:03:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 65,
"forks": 40,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b1e3350... |
73a9e0e7-6ee9-485c-a7e2-ab5193b26e0a | dreyus95/AVSP_SourceQualityPrediction | CodeJamCrawler/dataset/08_19428_15.cpp | #include <iostream>
#include <sstream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <set>
#include <map>
#include <cmath>
#include <deque>
using namespace std;
#define LET(x,a) typeof(a) x(a)
#define FOR(i,a,b) for(LET(i,a);i!=(b);++i)
#define... | ALGO | 0.999073 | 3.30498 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2017-06-08T21:00: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": "b5d0e9193... |
5446402e-6f7b-4972-bef7-e88130344711 | sarvesh821/DSA | STL/01_find.cpp | #include <bits/stdc++.h>
// #include<algorithm>
using namespace std;
int main()
{
int arr[12] = {1, 2, 3, 4, 4, 4, 5, 6, 7, 8, 9, 10};
int n = sizeof(arr) / sizeof(int);
int key;
cin >> key;
// int *it = find(arr, arr + n, key);
// int index = it - arr;
// if (index == n)
// {
// ... | ALGO | 0.999884 | 4.442461 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2022-12-27T04:40: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": "40250c3ec... |
8da3acf4-ebd6-4aa3-9dc2-d051e41a036a | putdata/algorithm-problem-solving | NOJAM/1969.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int cnt[50][26] = {};
int n, m; cin >> n >> m;
for (int i = 0; i < n; i++) {
string s; cin >> s;
for (int j = 0; j < m; j++)
cnt[j][s[j] - 'A']++;
}
int correct = 0;
for (int i = 0; i < m; i++) {
int maxi = -1e9, idx;
for (int... | ALGO | 0.999985 | 3.43955 | {
"github_metadata": {
"branch": "master",
"commit_count": 751,
"repo_created_at": "2019-07-09T11:18: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": "c407996b... |
4aabe76e-440d-4b48-8a5d-790d4d3b5d0e | RishabhGoyal888/Neetcode150 | 2pointers/74-search-a-2d-matrix/search-a-2d-matrix.cpp | class Solution {
public:
bool searchMatrix(vector<vector<int>>& matrix, int target) {
int n = matrix.size() - 1;
int m = matrix[0].size() - 1;
int lowrow = 0;
int highrow = n;
// Binary search to find the row
while(lowrow < highrow){
int midrow = lowrow ... | ALGO | 0.999874 | 6.363097 | {
"github_metadata": {
"branch": "main",
"commit_count": 316,
"repo_created_at": "2024-02-05T19:59: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": "38882a22ce... |
5f67d5d6-b7d8-406a-bfaf-c6ff65daad42 | inf0craw1/algorithm | 백준/Gold/1753. 최단경로/최단경로.cc | #include <bits/stdc++.h>
#define debug if constexpr (local) std::cout
#define endl '\n'
#define fi first
#define se second
#define INF 0x7fffffff
#define LINF 0x7fffffffffffffff
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
using namespace std;
#ifdef LOCAL
constexpr bool local = true;
#else
... | ALGO | 0.999942 | 3.897333 | {
"github_metadata": {
"branch": "master",
"commit_count": 441,
"repo_created_at": "2022-08-30T02:51:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2067e676... |
9354b0ba-7502-4461-a948-864c17d23369 | nigel-bruce-khan/Hpc_Turbulence_code | Source/Stencils/ViscosityStencil.cpp | #include "ViscosityStencil.hpp"
#include "StencilFunctions.hpp"
namespace NSEOF::Stencils {
FLOAT getReynoldsXPow(const Parameters& parameters) {
const int turbulenceModel = parameters.turbulence.model;
if (turbulenceModel == 1) { // Boundary layer thickness of a laminar flat plate
return 0.5;
}... | TOOL | 0.965689 | 6.520965 | {
"github_metadata": {
"branch": "master",
"commit_count": 320,
"repo_created_at": "2022-08-17T11:48: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": "a3d3ab3d... |
36facbee-98ad-486d-ba00-ae54ed141c90 | 192111053/CSA0424 | Exp 23.cpp | #include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main() {
int n = 5; // number of tracks
int tracks[5] = {55, 58, 60, 70, 18}; // track positions
int head_position = 50; // initial head position
int direction = 1; // 1 for moving right, -1 for moving left
int total_head_movement = 0;
... | ALGO | 0.999999 | 5.431423 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-04-28T07:53:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8961b8de1eaa... |
fdf16b08-3a2a-4dcc-a9b7-647341d43196 | michaelmcphee/MTE140Assignments | a3/avl-tree.cpp | #include "avl-tree.h";
#include <iostream>
bool AVLTree::insert(DataType val){
bool result = BinarySearchTree::insert(val);
if(result == false) return false;
Node* root = *getRootNodeAddress();
if(root->val == val) return true;
Node *temp;
temp = root;
Node *temp_parent;
Node *a... | ALGO | 0.987214 | 4.242119 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-07-18T04:17: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": "0a76a8be4379... |
78ecdda7-0dc1-4dcf-be2b-bc62b4b02724 | cchanmi/algorithm | seorin/Algorithm/Algorithm/BAEKJOON/Practice/1916.cpp | #include<bits/stdc++.h>
using namespace std;
#define FAST ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
#define MAX 100001
int charge[1001][1001];
int result[1001];
int start, dest, moveCharge;
bool visited[1001];
int n, m;
void input() {
memset(visited, false, sizeof(visited));
cin >> n >> m;
for(int i=... | ALGO | 0.999959 | 4.025224 | {
"github_metadata": {
"branch": "develop",
"commit_count": 256,
"repo_created_at": "2023-01-21T14:22:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1482eaf... |
b8a51b4f-f802-402f-875b-478cc3af7914 | CaDe27/Coding | CodingRush/CrearProblema/chocolatesPython/solution.cpp | #include <iostream>
using namespace std;
typedef int64_t ll;
const int maxN = 1e5 + 5;
int n;
ll paga[maxN];
bool sePuede(ll dieta){
//para cada dia
//recibir los chocolates
// y comer
//si despues de comer tengo una cantidad negativa, no tenia suficientes
ll totalChocolates = 0;
bool resp... | ALGO | 0.999986 | 3.967931 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2023-02-23T17:53:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cab420ef3be... |
d0173794-ac61-44c1-8c53-f8abd56ea4db | mzandri/braccio_VAMC | braccio_VAMC.cpp | #include "Energia.h"
void setup();
void loop();
/// inizializza il pwm per i motori in continua.
void enablePWMTimer0(void);
/// inizializza il pwm pwr im otori passo passo
void initENstepper(void);
/// inizializza i fine corsa
void initFC();
/// solleva la pinza
void pinzaSu();
/// abbassa la pinza
void pinzaGiu();
/... | TOOL | 0.984116 | 4.847084 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2015-06-20T15:35:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e797e0a812... |
179ebb8b-f9be-4144-9990-21ad62d48f28 | ishandutta2007/codeforces-b | bilibilitdasc/normal/771/D.cpp | #include <bits/stdc++.h>
#define rep(i,n) for(int i=0,_##i##__end=(n);i<_##i##__end;++i)
#define per(i,n) for(int i=(n)-1;i>=0;--i)
#define rep1(i,n) for(int i=1,_##i##__end=(n);i<=_##i##__end;++i)
#define per1(i,n) for(int i=(n);i>=1;--i)
#define repk(i,a,b) for(int i=(a),_##i##__end=(b);i<=_##i##__end;++i)
#define pe... | ALGO | 0.999362 | 3.291389 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-04-11T01:05:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9824eb9d4f15... |
618108f9-6a60-4a0a-aa57-e56ba84a4a93 | Tonyavall/cppfun2 | src/Encrypt.cpp | // Encrypt.cpp
// Encrypt member-function definitions. This file contains
// implementations of the member functions prototyped in Encrypt.h.
#include <iostream>
#include <string> // Include string library for string manipulation functions to be used later
#include "../headers/Encrypt.h"
Encrypt::Encrypt( int userNum... | ALGO | 0.974101 | 5.610216 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2023-02-09T21:34: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": "7ff64ae44a... |
6daac1be-f8d5-4bd3-986d-a411f1b737f1 | en30/online-judge | atcoder/dp_n.cpp | #include <bits/stdc++.h>
#include "../include/template"
const ll INF = 1e18;
int N;
vector<int> a;
vector<ll> S;
vector<vector<ll>> memo;
// [l, r]
ll minCost(int l, int r) {
assert(0 <= l && l <= N - 1);
assert(0 <= r && r <= N - 1);
assert(l <= r);
if (l == r) return 0;
if (memo[l][r] != -1) return memo[... | ALGO | 0.999907 | 3.868384 | {
"github_metadata": {
"branch": "master",
"commit_count": 330,
"repo_created_at": "2019-06-07T02:18: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": "07dce418... |
d056933c-62ce-41cf-8299-27eec6b5fbfb | SCRAPPYDOO/northrend | Sunwell Plateu/boss_felmyst.cpp | /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
* 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... | TOOL | 0.936431 | 5.691013 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2009-08-29T01:28: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": "90485821f... |
e06c668d-252f-4561-91aa-fc62c0d2f3c5 | Pigeon-Holder/template | MXY/mf.cpp | struct DINIC
{
const ll INF=1LL<<60;
struct edge
{
int to;
ll v;
int nxt;
}e[20005];
int head[20005];
int dep[20005];
int sz;
void init()
{
mem(head,-1);
sz=0;
}
void ae(int u,int v,ll w)
{
e[sz]={v,w,head[u]};
head[... | ALGO | 0.999729 | 3.657957 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2019-09-11T14:20:40.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fff4702428... |
691bdf7c-c642-4180-9206-20ad21c5c182 | Al791ex/Practicas-simples-C | Metodos de ordenamiento/Burbuja.cpp | #include <iostream>
#include <conio.h>
using namespace std;
int main (void) {
float Arreglo [5];
float x = 0;
// El programa pide datos al usuario
for (int i = 0 ; i<5 ; i++)
{
cout<<"Digita un numero: ";
cin>> Arreglo [i];
}
// Metodo burbuja
for (int i = 0 ; i<5; i++){
for (int j = 0 ;... | ALGO | 0.9994 | 4.245657 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-06-07T19:28:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "611306a827a5... |
b83ea254-8fe6-47d9-b7e9-11996898e0a3 | akshita2703/DSA | recursionBasic/Question/02_Subset2.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Solution {
private:
void function(int index, vector<int>& nums, vector<int>& ds, vector<vector<int>>& ans) {
ans.push_back(ds);
for (int i = index; i < nums.size(); i++) {
if (i != index && nums[i] =... | ALGO | 0.999935 | 6.578105 | {
"github_metadata": {
"branch": "main",
"commit_count": 74,
"repo_created_at": "2023-09-08T05:52: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": "49f00e1ec59... |
98e2086a-6a71-4fc6-9734-da59848cf62b | Amel-CYDF/BOJ | BOJ_19540.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pii> vpii;
#define pb push_back
#define ff first
#define ss second
#define MOD 1000000007
#define N 100010
#define M 3010
#define SOURCE 5... | ALGO | 0.999873 | 3.461965 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2019-12-21T03:28: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": "04242e834... |
bfc5fc57-8656-4955-b364-ba5bef02328a | samuka7abr/IDP | 3_semestre/TPAA-IDP/A1/listas_casa/lista3/07/G.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N, M, Q;
cin >> N >> M >> Q;
unordered_map<int, pair<int, int>> pos;
pos.reserve(N * M);
for (int i = 0; i < N; i++) {
for (int j = 0; j < M; j++) {
int x;
... | ALGO | 0.999798 | 4.13435 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-07-01T12:45:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "42255e60f84c... |
f16ab5a2-cfa5-4010-b1a0-2322e12c2e7a | MohdYasser1/XML-Editor | PostSearch.cpp | #include "PostSearch.h"
using namespace std;
vector<Node*> pushPostsIntoVector(Node* root) {
vector<Node*> posts;
for (Node* user : root->getChildren()) {
if (user == nullptr) throw invalid_argument("Not a valid Social network tree");
for (Node* userTag : user->getChildren()) {
if... | ALGO | 0.965924 | 4.526681 | {
"github_metadata": {
"branch": "main",
"commit_count": 149,
"repo_created_at": "2023-12-03T21:20: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": "697766096b... |
1dc86126-0b67-43bc-861e-bf7aae5638bb | QuanQiuTong/algorithm-contest | Data_Structure/Splay_Sequence.cpp | // 刘汝佳
#include <algorithm>
#include <cstdio>
#include <vector>
using namespace std;
struct Node {
Node* ch[2];
int s, flip, v;
int cmp(int k) const {
int d = k - ch[0]->s;
if (d == 1) return -1;
return d <= 0 ? 0 : 1;
}
void maintain() { s = ch[0]->s + ch[1]->s + 1; }
void pushdown() {
if ... | ALGO | 0.999998 | 3.686695 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2020-03-27T14:42:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "75cd370b7... |
5b8fb31e-f20a-4839-b02a-a812d3452cdd | htaunay/opposites | src/CornerTable.cpp | #include <stdio.h>
#include <stdlib.h>
#include <map>
#include <vector>
#include <string>
#include <CornerTable.h>
#include <Node.h>
#include <Edge.h>
#define MAX_CHARS_PER_LINE 512
std::vector<int>
CornerTable::BuildOpposites(Method method, std::string fileName)
{
std::vector<unsigned int> vertices = loadIndex... | ALGO | 0.998927 | 4.323693 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2015-05-14T12:48:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e70db28a5... |
7c1dc315-4ede-4bc5-a4dd-e97294d6d5ed | hi-ogawa/practice | codeforces/edu89/b/main.cpp | // AC
#include <bits/stdc++.h>
using namespace std;
// Utility
#define ALL(X) (X).begin(), (X).end()
#define FOR(I, X, Y) for (int I = (X); I < (Y); I++)
using ll = int64_t;
using ull = uint64_t;
template<typename T> struct is_container {
template<typename C> static char test(typename C::const_iterator*); template<ty... | ALGO | 0.999801 | 5.002008 | {
"github_metadata": {
"branch": "main",
"commit_count": 888,
"repo_created_at": "2020-07-14T04:24:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9e60bc5f1e... |
acfa0140-1d27-4fc2-9161-4ce20e061a4c | AnkurRam2002/AnkurRam-Tandemloop | Problem-4.cpp | #include <iostream>
#include <vector>
#include <map>
using namespace std;
int main() {
int n, value;
vector<int> numbers;
map<int, int> multiple;
for (int i = 1; i <= 9; i++) {
multiple[i] = 0;
}
cout << "Enter the number of elements: ";
cin >> n;
cout << "Enter the elements:... | ALGO | 0.99759 | 4.70414 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2025-04-25T05:40: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": "9f4377dd1652... |
4ce67a75-558b-4e77-98af-401aa9518fcc | rafaelcsva/CompetitiveProgramming | code/uva/11380.cpp | #include <bits/stdc++.h>
using namespace std;
int DEBUG = 1;
const int N = 40 * 40 * 2;
char tab[N][N];
int adj[N][N];
int n, m;
int vi[] = {0, 0, -1, 1}, vj[] = {1, -1, 0, 0};
int source, sink, INF = (int) 1e9;
int dis[N], p[N];
bool ok(int i, int j){
return i < n && i >= 0 && j < m && j >= 0 && tab[i][j] != '~';
... | ALGO | 0.999852 | 3.944908 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2017-08-30T23:18:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "97a35fa3c... |
18774357-b48b-460f-bc7a-5fcc5b224ecf | DollarAkshay/Competitive-Coding | HackerRank/HackerRank_BotClean_Large.cpp | /*~~~~~~~~~~~~~~~~~~*
* *
* $<NAME>$ *
* *
*~~~~~~~~~~~~~~~~~~*/
//https://www.hackerrank.com/challenges/botcleanlarge
#include <math.h>
#include <time.h>
#include <ctype.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <map>
#include <s... | ALGO | 0.999902 | 3.290889 | {
"github_metadata": {
"branch": "master",
"commit_count": 570,
"repo_created_at": "2018-01-31T16:03:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae096d72... |
078df603-9cda-4d21-89bb-0763200d5f7c | 0xbitcoin/0xbitcoin-miner | cpp/cpuminer/solver.cpp | #include "solver.h"
#include "sha3.h"
#include <assert.h>
static const char* const ascii[] = {
"00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f",
"10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f",
"20","21","22","23","24","25","26","27","28","29","2a"... | ALGO | 0.966514 | 6.019161 | {
"github_metadata": {
"branch": "master",
"commit_count": 274,
"repo_created_at": "2018-02-02T02:56:15.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 83,
"forks": 66,
"issues": 18,
"pull_requests": 10
},
"file_meta": {
"content_id": "8faae... |
5f9e0097-ae4b-4bf4-a1a9-eeed32609fa6 | yairthfc/Portfolio | C & C++/neural network based number identifier/MlpNetwork.cpp | //
// Created by yairt on 05/09/2023.
//
#include "MlpNetwork.h"
#define NUM_OF_DIGITS 10
#include "iostream"
MlpNetwork ::MlpNetwork(Matrix wheights_arr[MLP_SIZE], Matrix biases_arr[MLP_SIZE])
{
if (wheights_arr[0].get_cols() != weights_dims[0].cols ||
wheights_arr[0].get_rows() !=
weights_dims[0].rows
... | ALGO | 0.99263 | 3.28988 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-03-11T16:09: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": "7aa8d3fe02a3... |
0b2e67cb-4807-4615-ab2c-d4a2c7b675d9 | RohanKhatua/CPPCode | lex_analysis.cpp | #include <iostream>
#include <fstream>
#include <string>
#include <sstream>
#include <cctype>
using namespace std;
bool isOperator(char c)
{
return (c == '+' || c == '-' || c == '*' || c == '/' || c == '='|| c=='>'|| c=='<');
}
bool isDelimiter(char c)
{
return (c == ',' || c == ';' || c == '(' || c == ')' |... | ALGO | 0.985834 | 4.156198 | {
"github_metadata": {
"branch": "master",
"commit_count": 56,
"repo_created_at": "2022-08-31T12:43:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "16578ae05... |
69b7eb14-a087-4f14-b47a-4d3feaaec79a | Evalir/Algorithms | Problems/UVA/11547.cpp | #include <iostream>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <cmath>
#include <algorithm>
#include <sstream>
#include <bitset>
#include <list>
#define INF (int)1e9
using namespace std;
typedef long long llong;
typedef unsigned long long uint64;
typedef vector<int> VI;
t... | ALGO | 0.998835 | 3.437044 | {
"github_metadata": {
"branch": "master",
"commit_count": 318,
"repo_created_at": "2017-08-06T15:20: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": "74511c3b... |
c527706d-e491-4f8f-9a65-5d85be59b86f | Shivam-TyagiG/LeetCode-Solutions | Find Common Nodes in two BSTs - GFG/find-common-nodes-in-two-bsts.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// Tree Node
struct Node {
int data;
Node *left;
Node *right;
Node(int val) {
data = val;
left = right = NULL;
}
};
// Function to Build Tree
Node* buildTree(string str)
{
// Corner Case
if(str.length(... | ALGO | 0.99996 | 6.35706 | {
"github_metadata": {
"branch": "main",
"commit_count": 1994,
"repo_created_at": "2022-10-02T15:33: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": "b04068c00... |
37f879a5-e2b2-482e-85de-f7e99a044aba | AsafeSilva/Protheus-Drone | SOFTWARE/FlightController/FlightController - Fuzzy/FlightController - mpu9250/FlightController/FlightController.ino | /*************************************************************
--- Protheus Drone ---
> Link do projeto no GitHub:
github.com/AsafeSilva/Protheus-Drone
> Autores:
.<NAME>
.<NAME>
.<NAME>
> Data de Criação: 18/08/2017
> Última modificação: 05/03/2018
> Descrição do projeto:
<> Hardware
- Arduino DUE [ARM Cor... | ALGO | 0.945029 | 5.691341 | {
"github_metadata": {
"branch": "board_v1.0",
"commit_count": 40,
"repo_created_at": "2018-04-05T03:30:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dcc0a... |
f05d3611-f112-4b17-b8e3-338488fbde3b | Haribala-09/hyprdots | User/History/441bb1a0/ba1I.cpp | #include <bits/stdc++.h>
using namespace std;
#define rev(ans) reverse(ans.begin(), ans.end())
#define mems(a, n) memset(a, n, sizeof(a))
#define pb push_back
#define fst first
#define scd second
using ll = long long;
using pii = pair<int, int>;
using pci = pair<char, int>;
void dbg_out() { cerr << endl; }
template ... | ALGO | 0.999832 | 4.611815 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-04-17T14:25: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": "0c88683e0b4d... |
58c50e8e-1ed1-4d6a-84ca-92fa3ff4311f | Benik800/GuessNumberCGI | ЛР № 2/ЛР № 2/ЛР № 2.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <string>
#include <ctime>
#include <cmath>
#include <sstream>
#include <map>
#include <cstdlib>
#include "encrypt.h"
#include "Base64.h"
using namespace std;
string keyWord = "i1want2to3pass4cgi";
string create_encryption_data(const string& data)
{
st... | ALGO | 0.995612 | 3.29359 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-10-07T04:07: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": "83a8689ce264... |
45c8a1bf-fca7-4626-9c61-39642b69f330 | OmeletWithoutEgg/CompetitiveProgramming | TIOJ/1495.cpp | #include <bits/stdc++.h>
#define pb emplace_back
using namespace std;
const int N = 500001, MOD = 1000000007;
int pa[N],rk[N];
int anc(int x) {return x==pa[x] ? x : (pa[x] = anc(pa[x]));}
bool uni(int x,int y) {
if((x=anc(x)) == (y=anc(y))) return false;
if(rk[x] < rk[y]) swap(x,y);
return pa[y] = x, rk[x]... | ALGO | 0.999925 | 4.197917 | {
"github_metadata": {
"branch": "master",
"commit_count": 262,
"repo_created_at": "2020-08-18T02:18:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec5f76fd... |
3b1525c1-08a0-4d38-b072-5e05c506353a | dmsquf03/codetree-TILs | 240915/특정 구간의 원소 평균값/elemental-mean-value-for-a-particular-interval.cpp | #include <iostream>
#include <vector>
using namespace std;
int n, result = 0;
vector<int> nums;
void FindMeanExistCnt(){
int sum, m;
for(int i = 0; i < n; i++){// 구간 시작 인덱스
for(int j = i; j < n; j++){// 구간 끝 인덱스
sum = 0;
for(int k = i; k < j + 1; k++){
sum += nu... | ALGO | 0.99982 | 4.57118 | {
"github_metadata": {
"branch": "main",
"commit_count": 259,
"repo_created_at": "2024-07-31T05:43: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": "c37f473063... |
e96a6988-7bb2-4575-b2b6-bae4b386c22d | alexandraback/datacollection | solutions_5658282861527040_1/C++/culaucon/new_lottery_game.cpp | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <c... | ALGO | 0.999892 | 4.006254 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a40a6e137... |
3168f578-5eca-4c80-830c-6d5948b750c5 | emuikernel/BaijieCppUILib | AggRender/Graphin/src/agg/include/agg_bezier_arc.h | //----------------------------------------------------------------------------
// Anti-Grain Geometry - Version 2.4
// Copyright (C) 2002-2005 <NAME> (http://www.antigrain.com)
//
// Permission to copy, use, modify, sell and distribute this software
// is granted provided this copyright notice appears in all copies.
... | TOOL | 0.975366 | 6.504765 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2015-12-01T02:50:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 6,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d7a4e60168... |
4487871e-1b98-437a-96b4-c7698bb63b82 | LeonardoBarbosa247/Techniken-Watcher | main.cpp |
#include "Path.hpp"
#include <cstdio>
#include <unistd.h>
#include <vector>
#include <map>
#include <list>
int main(int argc, char** argv)
{
if(argc!=2)
{
cout << "Techniken Watcher requer diretório como parâmetro" << endl;
cout << "Techniken Watcher finalizado" << endl;
return 0;
... | TOOL | 0.9269 | 4.277962 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-05-23T01:11: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": "add97b47ff... |
94ab151b-f1f6-4083-b78e-d1e226a70881 | osamahatem/CompetitiveProgramming | Live Archive/7094 - Happy Happy Prime Prime.cpp | /*
* 7094 - Happy Happy Prime Prime.cpp
*
* Created on: Sep 16, 2015
* Author: <NAME>
*/
#include <bits/stdtr1c++.h>
#include <ext/numeric>
using namespace std;
bool vis[10005];
bool isPrime(int x) {
if (x == 1)
return false;
for (int i = 2; i * i <= x; i++)
if (x % i == 0)
return false;
return... | ALGO | 0.998241 | 4.41596 | {
"github_metadata": {
"branch": "master",
"commit_count": 125,
"repo_created_at": "2017-12-09T14:02:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "52fd7ca8... |
7499cfa4-e7b0-4ac5-a3e2-530807655a87 | THOTH0101/c_plus_plus_projects | Multidimensional_Arrays/All_closest_pairs/main.cpp | #include <iostream>
#include <cmath>
using namespace std;
double getDistance(double x1, double y1, double x2, double y2); //compute the distance between two points (x1, y1) and (x2, y2)
int main()
{
const int NUMBER_OF_POINTS = 8;
//each row in points represents a point
double points[NUMBER_OF_POINTS][2... | ALGO | 0.999883 | 4.531168 | {
"github_metadata": {
"branch": "master",
"commit_count": 56,
"repo_created_at": "2022-07-16T16:53: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": "50009c00e... |
ff111628-665f-4304-8c12-4d1f83a18b5a | pengchant/myds | chp08/idx_search.cpp | #include <stdio.h>
#include <stdlib.h>
#define MAX_SIZE 40
// KeyType 关键字的数据类型
typedef int KeyType;
// SqType 学生成绩表数据类型
typedef struct {
int no;
char name[10];
int score;
} SqType;
// IdxType 索引元素
typedef struct {
KeyType key; // 存放关键字
int pos; // 存放当前关键字在主元素表中的物理序号
} IdxType;
// binSearch 二分查... | ALGO | 0.999716 | 3.617975 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2024-12-16T06:23: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": "84767de19... |
fa152219-8dea-4f9b-bf1a-7dff58cd5596 | memset0/OI-Code | 洛谷/CF633H Fibonacci-ish II.cpp | // =================================
// author: memset0
// date: 2018.12.27 20:26:57
// website: https://memset0.cn/
// =================================
#include <bits/stdc++.h>
#define pb push_back
#define rep(i, l, r) for (register int i = l; i <= r; i++)
namespace ringo {
typedef long long ll;
typedef unsign... | ALGO | 0.999981 | 3.976946 | {
"github_metadata": {
"branch": "master",
"commit_count": 294,
"repo_created_at": "2018-07-31T14:56:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "758ae0a... |
488f6622-e377-442a-bf28-9f1e348cd720 | sharkoo0/DS-2022-2023 | dopylnitelno-07-11/task6.cpp | #include <iostream>
struct Node {
int data;
Node* next;
};
void printList(Node* first) {
while (first) {
std::cout << first->data << " -> ";
first = first->next;
}
std::cout << "nullptr\n";
}
Node* createSequence(int n) {
if (n == 1) {
return new Node{1, nullptr};
... | ALGO | 0.982535 | 5.362101 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2022-10-03T06:45:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "55eca8a31... |
964ea804-4a43-47a3-a70a-dc04878ad9e8 | phs7646/codingtest | CPP/div4_SWprobs/17143/sol.cpp | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
typedef struct {
int r;
int c;
int speed;
int dir;
int size;
} shark;
int R,C,M;
bool died[10000];
shark sharks[10000];
int map[100][100];
pair<int, int> move(shark& s) {
if(s.dir == 1) s.r -= s.speed;
else if... | ALGO | 0.999924 | 4.026002 | {
"github_metadata": {
"branch": "main",
"commit_count": 146,
"repo_created_at": "2024-03-13T09:22:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8646eb957a... |
3c76cf53-93dc-45f1-8109-64677e0c1144 | kksshh525/Algorithm | ALGORITHM/ALGORITHM/algospot_jumpgame.cpp | #include <iostream>
#include <string.h>
using namespace std;
#define BOARD_SIZE 100
int cache[BOARD_SIZE][BOARD_SIZE];
int board[BOARD_SIZE][BOARD_SIZE];
int N;
bool dfs(int x, int y) {
int boardXY = board[x][y];
bool test=false;
if (boardXY == 0)
return true;
if ((x ==0 && y == 0) && (cache[boardXY][0] == 0 &... | ALGO | 0.999821 | 4.706956 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-12-20T02:08: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": "0ce058acef... |
9e4e114a-8ef3-42f3-b602-681943d77332 | shubhammandlas/BTP | carrom_double.cpp | // #include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <GL/glut.h>
#include <GL/glu.h>
#include <GL/gl.h>
#include<cmath>
// #include <gl/Gl.h>
// #include <gl/Glu.h>
// #include <gl/glut.h>
#include <math.h>
#include <iostream>
// #include <fstream.h>
using namespace std;
void myIdle();
void myDisplay... | ALGO | 0.993749 | 3.004877 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-03-26T14:03: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": "413494110c... |
0e77287f-f1a0-4e12-9215-fc523f9b9626 | schmaedech/eyemine | source/NoseTrack.cpp | /*
* File: NoseTrack.cpp
* Author: diego
*
* Created on May 25, 2010, 3:16 PM
*/
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you... | ALGO | 0.902799 | 4.923433 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2015-05-20T05:55:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "d42a8a851... |
3a64c3d5-05d6-448d-943d-acd96d17d455 | xingshengao/algoModule | XCPC/xcpc_常用在线模板汇总/02 - 图、树、网络流/03 - HLD.cpp | struct HLD {
int n, idx;
vector<vector<int>> ver;
vector<int> siz, dep;
vector<int> top, son, parent;
vector<int> in, id, val;
Segt segt;
HLD(int n) {
this->n = n;
ver.resize(n + 1);
siz.resize(n + 1);
dep.resize(n + 1);
top.resize(n + 1);
so... | ALGO | 0.999932 | 4.505858 | {
"github_metadata": {
"branch": "main",
"commit_count": 323,
"repo_created_at": "2023-11-13T06:36:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "55f4e2590f... |
a487c30b-f077-4297-9ae7-7324965b1889 | Musfiqshohan/Competitive-Programming | topics wise codes/Graph Theory/MaxFlow/BMP/Loj 1198 - Karate Competition .cpp | #include<bits/stdc++.h>
#define pb push_back
#define ms(a,b) memset((a),(b),sizeof(a))
//#define clear(v,n) for(_typeof (n) i=0;i< (n) ; i++) { v.clear(); }
#define ll long long
#define pii pair<int,int>
#define inf 100000000000
#define in(a) freopen(a,"r", stdin)
#define out(a) freopen(a,"w",stdout)
#define rep(i,n) ... | ALGO | 0.999826 | 3.453567 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2018-01-04T10:50: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": "8f376a316a... |
a3d71a5a-b3e9-4cda-8257-8991f6dbffdd | tel23a-inf/inf2-material | src/lecture/2024-05-10/sorting/bubblesort.cpp | #include "bubblesort.h"
#include<iostream>
#include<algorithm>
int main () {
std::vector<int> list{42,23,15,103,37,38};
// bubble_up(list); // 23 15 42 37 38 103
// bubble_up(list); // 23 15 42 37 38 103
// bubble_up(list); // 23 15 42 37 38 103
// bubble_up(list); // 23 15 42 37 38 103
// bu... | ALGO | 0.9981 | 4.975074 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-04-19T14:56:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "204852226a10... |
8922904f-d764-43ae-81ca-886103ea4e72 | FIFIto21/JustCode | ReverseLinkedList.cpp | #include <iostream>
class node{
public:
int data;
node *next;
};
void printLinkedList(node *nd)
{
int i = 1;
while (nd != NULL){
std::cout<<"Node "<< i <<" = "<<nd-> data<<"\n";
nd = nd-> next;
i++;
}
}
void reverseLinkedList(node *nd)
{
node *p, *c, *n; /... | ALGO | 0.999848 | 5.249505 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2023-02-01T13:34:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "14848160d59... |
e49d54b3-502b-4417-9cab-63f45933a813 | leafyoung/FN6806 | 22-operator/main.cpp | // https://replit.com/@YeKunlun/22-operator?v=1
#include <algorithm>
#include <array>
#include <iostream>
#include <numeric> // for std::accumulate
using namespace std;
struct Multiply {
int operator()(int a, int b) const { return a * b; }
};
// Enable C++17
struct KeepAdd {
inline static int sum = 0;
void ope... | ALGO | 0.99844 | 6.124398 | {
"github_metadata": {
"branch": "main",
"commit_count": 115,
"repo_created_at": "2024-07-05T02:47: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": "02169eec93... |
025519fd-0170-4915-acaf-a6828a0a7711 | Worthy-Wang/DataStructure | Tree/RBT/main.cpp | #include <iostream>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <queue>
#include <set>
#include <vector>
#include <fstream>
#include <sstream>
#include <string.h>
#include <memory>
#include <limits>
#include <list>
#include <regex>
#include <functional>
#include <math.h>
#include <unordered_se... | ALGO | 0.999307 | 4.005893 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2020-04-27T01:56: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": "e4362a23d0... |
a559f9e2-1b9f-45cb-bd28-a8090cdf1735 | Ropaca/ED_UFBA | Lista 1/EX3.cpp | #include <stdio.h>
#include <stdlib.h>
int maior_3 (int a, int b, int c)
{
int t;
if(a==b && a==c)
return 1;
else
if(b>a && b>c)
if(a>c)
printf ("O valores ordenados são = %d, %d, %d", c, a, b);
else
printf ("O valores ordenados são = %d, %d, %d", a, c, b);
else
if(c>a && c>b)
if(a>b)
... | ALGO | 0.999684 | 3.639818 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2014-09-02T19:26: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": "c99da09262... |
b8ecfc2e-235f-402e-bd64-9c04f269a588 | joshleeb/huffman | src/encoder.cc | #include <iostream>
#include <unordered_map>
#include <vector>
#include <gsl/gsl>
#include "huffman.h"
#include "interface.h"
#include "minqueue.h"
huffman_encoder::huffman_encoder() {
this->encoding = std::unordered_map<char, std::vector<int>>();
this->stats = statistics();
}
std::vector<int> huffman_encod... | ALGO | 0.98187 | 5.198383 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2017-06-09T10:21: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": "812b4c55b... |
d288a933-aa33-4339-902c-aa3bb6f185ee | tanxchong/CTMAP | cost_calculation.cpp | #include"cost.h"
#include"Param.h"
int * census_cost(int width, int height, cv::Mat &imL,cv::Mat& imR,int W, int H,int dis_level,int T){
int * census_cost = (int *)malloc(sizeof(int)*width*height*dis_level);
int * census_L = (int *)malloc(sizeof(int)*width*height*W*H);
int * census_R = (int *)malloc(sizeof(int)*wi... | ALGO | 0.998946 | 4.377382 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-11-02T09: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": "7c944126ab... |
c325e8b8-eda8-49b3-99fd-db94e48b1ddd | AhmedQassemDev2004/CP-Training | contests/div4-952/F_Final_Boss.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template<typename T>
using ordered_set =
tree <T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// clang-format off
#define FAST_IO io... | ALGO | 0.999989 | 3.894811 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2024-06-05T17:38:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "87634d3e48... |
f47bda3a-0424-40dc-b6d3-023fa19fe32d | unibook1283/algorithm | 백준/1368.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
int parent[301];
int get_parent(int x) {
if (parent[x] == x) return x;
return parent[x] = get_parent(parent[x]);
}
void union_parent(int x, int y) {
x = get_parent(x);
y = get_parent(y);
if (x < y) parent[y] = x;
else parent[x] = y;
}... | ALGO | 0.999984 | 3.86662 | {
"github_metadata": {
"branch": "main",
"commit_count": 351,
"repo_created_at": "2022-03-20T12:28: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": "2cd85305ac... |
d8205220-451a-43cd-9dcf-4fc1d785b3bc | ishandutta2007/codeforces-p | pranjal.ssh/normal/1089/G.cpp | #include <bits/stdc++.h>
using namespace std;
#define cerr cout
#define F first
#define S second
#define FOR(i,a,b) for (auto i = (a); i <= (b); ++i)
#define NFOR(i,a,b) for(auto i = (a); i >= (b); --i)
#define all(x) (x).begin(), (x).end()
#define sz(x) int(x.size())
typedef long long ll; typedef pair <int, int> ii;... | ALGO | 0.999351 | 3.462912 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:49:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d747f34a9ed1... |
f536be0a-79e3-4e9d-bc11-b2e2c87810f6 | Qipu1220/BaiTapMang1Chieu | 23520493_23521082_23521462_23521604_23521672_BT03/Bai155/Bai155.cpp | #include <iostream>
#include <iomanip>
#include <cstdlib>
#include <ctime>
using namespace std;
void nhap(int a[], int& n);
void xuat(int a[], int n);
void DaoMang(int a[], int n);
void DaoChan(int a[], int n);
int main()
{
int b[100];
int k;
nhap(b, k);
cout << "Mang ban dau: \n";
xuat(b, k);
DaoChan(b, k);
co... | ALGO | 0.997134 | 3.866824 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2023-10-04T12:45: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": "fbabec9a943... |
3ac0c6b2-b34a-4630-9c01-859cfc1620ad | hqdem/hlimds | src/gate/optimizer/synthesis/abc_npn4.cpp | //===----------------------------------------------------------------------===//
//
// Part of the Utopia EDA Project, under the Apache License v2.0
// SPDX-License-Identifier: Apache-2.0
// Copyright 2023 ISP RAS (http://www.ispras.ru)
//
//===----------------------------------------------------------------------===//... | ALGO | 0.992066 | 5.667344 | {
"github_metadata": {
"branch": "master",
"commit_count": 2677,
"repo_created_at": "2024-10-20T11:16:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0eb066f... |
46ab2d38-28cc-4472-8ff0-94ae156c24fe | haeun9634/algorithm | 백준/Gold/24461. 그래프의 줄기/그래프의 줄기.cc | #include <bits/stdc++.h>
#define fastio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
using namespace std;
typedef long long ll;
typedef __int128 xll;
int main() {
fastio;
int n;
cin >> n;
vector<vector<int>> edges(n);
vector<bool> exc(n); // 정점의 제거 여부를 저장
vector<int> neigh(n)... | ALGO | 0.999912 | 4.307014 | {
"github_metadata": {
"branch": "main",
"commit_count": 62,
"repo_created_at": "2024-12-25T12:13: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": "845d2ccc5d0... |
ef902c5f-aaa0-44ed-8837-4112c9b32c8f | fsps60312/old-C-code | C++ code/Uva Online Judge/Q1355(11).cpp | #include<bits/stdc++.h>
using namespace std;
const int INF=2147483647;
int P,M,S[4][4][4],KASE=0;
int NOW[4][4],CNT[4][10],VIS[100];
void Tag(const int &v,const int &d)
{
if(d==1)
{
assert(VIS[v]!=KASE);
VIS[v]=KASE;
}
else if(d==-1)
{
assert(VIS[v]==KASE);
VIS[v]=0;
}
else assert(0);
for(int i=0;i<P;i+... | ALGO | 0.99994 | 3.751846 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-06-03T16:13: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": "d932df9849... |
4d7c2d79-532a-4d4d-9ad7-bd0eaf7d1019 | averymortenson/CSS-343 | Program4_SudokuSolver/SudokuFitness.cpp | /*
* Program 4: Implement a Genetic Algorithm Solver for Sudoku Puzzle
* Purpose of SudokuFitness class : Asset the fitness of a sudoku puzzle
* @author <NAME>, CSSE Junior at the University of Washington Bothell
* March 11th, 2017
* @version 1.1
*/
#include <set>
#include "SudokuFitness.h"
#include "Sudoku.h"
... | ALGO | 0.999754 | 4.397104 | {
"github_metadata": {
"branch": "master",
"commit_count": 132,
"repo_created_at": "2019-06-08T03:57: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": "4074f76e... |
0bddd8dd-a0d8-4893-a641-f4e998c3752c | skempken/interverdikom | src/libivk/utility/l_IMatrixUtils.cpp | #include "l_IMatrixUtils.h"
#include <stdexcept>
#include "Logging.hpp"
namespace ivk
{
l_imatrix l_IMatrixUtils::zeros(const int lb1, const int ub1, const int lb2, const int ub2)
{
l_imatrix B(lb1, ub1, lb2, ub2);
for(int r = Lb(B,1); r<=Ub(B,1); ++r)
{
for(int c = Lb(B,2); c <=Ub(B,2); ++c)
{
B[r][c] =... | ALGO | 0.991492 | 5.607863 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2013-12-26T15:56:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "332eec03da... |
33c8d4ee-007a-456a-8479-33c11f0753bb | DataDog/dd-trace-php | appsec/src/helper/remote_config/config.hpp | // Unless explicitly stated otherwise all files in this repository are
// dual-licensed under the Apache-2.0 License or BSD-3-Clause License.
//
// This product includes software developed at Datadog
// (https://www.datadoghq.com/). Copyright 2021 Datadog, Inc.
#pragma once
#include "../utils.hpp"
#include "product.hp... | TOOL | 0.970605 | 7.170059 | {
"github_metadata": {
"branch": "master",
"commit_count": 5937,
"repo_created_at": "2018-02-02T14:21:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 526,
"forks": 167,
"issues": 91,
"pull_requests": 55
},
"file_meta": {
"content_id": "3b... |
f5f48cfd-d844-4005-8d63-0fe2b568af24 | wangchen/Programming-Game-AI-by-Example-src | Common/2D/C2DMatrix.h | #ifndef C2DMATRIX_H
#define C2DMATRIX_H
//------------------------------------------------------------------------
//
// Name: C2DMatrix.h
//
// Author: <NAME> 2002
//
// Desc: 2D Matrix class
//
//------------------------------------------------------------------------
#include <math.h>
#include <vector>
#inc... | ALGO | 0.972992 | 5.632503 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2014-08-28T06:19:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 452,
"forks": 193,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "4a738b... |
fa20a917-b725-4ace-96f1-15b3f34008f4 | ssrg-vt/hermitux | apps/parsec/parsec-canneal/netlist_elem.cpp | // netlist_elem.cpp
//
// Created by <NAME> on 14/04/07.
//
// Copyright 2007 Princeton University
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must ... | TOOL | 0.96634 | 5.611494 | {
"github_metadata": {
"branch": "master",
"commit_count": 588,
"repo_created_at": "2017-10-13T15:44:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 395,
"forks": 27,
"issues": 16,
"pull_requests": 0
},
"file_meta": {
"content_id": "889bf... |
2ce609c7-eb84-4945-b640-999913f3b2dc | kanhaiyabaranwal/my-programs-old | CPP_source_programs-Fiserv/DijkstraShortestPath.cpp | //Dijkstra's algorithm to find shortest path from source vertex to every other vertex.
//using adjacency matrix
#include<iostream>
#include<iomanip>
#include<vector>
using namespace std;
#define NBR_OF_VERTICES 5
int matrix[NBR_OF_VERTICES][NBR_OF_VERTICES];
//maintain a vector of vertex and shortest distance from so... | ALGO | 0.999981 | 4.30957 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-10-26T08:57: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": "032706dfe9... |
5f43ac24-d2e6-4b00-9ac2-306d5abcc421 | Shikhar-S/Analysis-of-Competitive-Codebase | Data/Contest1245/Standings3/29596286_64005010.cpp | #include <bits/stdc++.h>
#define all(x) begin(x), end(x)
#define dbg(x) cerr << #x << " = " << x << endl
#define _ << ' ' <<
using namespace std;
using ll = long long;
using vi = vector<int>;
const int mod = 1000000007;
int add(int a, int b) { return (a += b) < mod? a : a - mod; }
int sub(int a, int b) { return (a -= ... | ALGO | 0.999933 | 3.573293 | {
"github_metadata": {
"branch": "master",
"commit_count": 74,
"repo_created_at": "2019-11-22T14:40: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": "e8a8722f1... |
258ae5bf-b927-4034-9408-45353dfea46c | mirinta/leet_code | graph/shortest_path/1514_path_with_maximum_probability.cpp | #include <queue>
#include <vector>
/**
* You are given an undirected weighted graph of "n" nodes (0-indexed), represented by an edge list
* where edges[i] = [a, b] is an undirected edge connecting the nodes a and b with a probability of
* success of traversing that edge succProb[i].
*
* Given two nodes start and ... | ALGO | 0.999934 | 6.635188 | {
"github_metadata": {
"branch": "master",
"commit_count": 1725,
"repo_created_at": "2023-04-09T12:48:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "31e5897... |
76618935-de88-4d79-9fc2-e2f6a8ff25b4 | nedlecky/ScoutingPhD | Research/ScoutMotion/FFNN/main.cpp | #include "stdafx.h"
#include <stdlib.h>
#include <math.h>
#include "ffnn.h"
struct Situation
{
double theta;
double omega;
double t;
};
struct Action
{
double dinput;
double input;
double dt;
};
int integrationsPerStep=8;
double MLLinv=0.1;
double B=1.;
double MGL=10.;
void NextSituation(Situation& s,Action& a... | ALGO | 0.999522 | 4.551135 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-12-07T15:56: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": "0397aef494e9... |
4b866166-98b0-4445-a845-6e5b3e8d4ca0 | VishnuOjha/Data-Structure-And-Algo-Using-CPP | Stack Program/peekOpertaion.cpp | #include <iostream>
using namespace std;
struct Stack
{
int size;
int top;
int *arr;
};
int isEmpty(struct Stack *ptr)
{
if (ptr->top == -1)
{
return 1;
}
else
{
return 0;
}
}
int isFull(struct Stack *ptr)
{
if (ptr->top == ptr->size - 1)
{
return... | ALGO | 0.998933 | 4.135946 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2021-08-02T08:06:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f4c40617... |
a6f77d72-cddc-46cb-a6b9-4ac96d93d555 | YueLinHo/WinMerge | Tools/diff2winmerge/diff2winmerge.cpp | // diff2winmerge.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "diff2winmerge.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
// Local functions
static int ProcessAndCall(int argc, TCHAR* argv[]);
static HANDLE RunIt(LPC... | TOOL | 0.942156 | 5.23153 | {
"github_metadata": {
"branch": "master",
"commit_count": 6585,
"repo_created_at": "2014-03-06T00:51:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6d0fc1d... |
40249057-b89c-4498-928a-aec3b74371a2 | KSP-07/LeetCode-Questions | Maximize sum after K negations - GFG/maximize-sum-after-k-negations.cpp | //{ Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution{
public:
long long int maximizeSum(long long int a[], int n, int k)
{
// Your code goes here
//greedy sochke...sort kr rhee..taaki jo max value de ske neg v=number wo phle aajay... | ALGO | 0.999945 | 5.178061 | {
"github_metadata": {
"branch": "main",
"commit_count": 1717,
"repo_created_at": "2023-01-10T10:07: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": "1ffec5182... |
6549fe5c-6d13-4533-8651-5b55ea8c7cf7 | praat/praat.github.io | dwsys/NUMselect.h | #ifndef _NUMselect_h_
#define _NUMselect_h_
/* NUMselect.h
*
* Copyright (C) 2025 <NAME>
*
* This code 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 opti... | ALGO | 0.990629 | 5.723208 | {
"github_metadata": {
"branch": "master",
"commit_count": 9387,
"repo_created_at": "2014-04-11T18:36:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1717,
"forks": 256,
"issues": 57,
"pull_requests": 7
},
"file_meta": {
"content_id": "a8... |
4af1b0ff-084e-4127-8a25-c16432df7e43 | vitoriaoliferreira/ccp | inf 213/pratica 3/buscaBinariaFuncoes3.cpp | #include <algorithm>
#include <iostream>
#include <chrono>
#include <iomanip>
#include <cmath>
#include <vector>
#include <string>
using namespace std;
int taxaVideo, taxaDownload, tamanho;
bool consigoAssistirSemPausas(long long tempoCarregamento)
{
bool resposta = true;
long long tempoCarregado = taxaDownlo... | ALGO | 0.997533 | 3.37631 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2024-02-19T01:08: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": "22e823b019c... |
e01eeec2-ebcc-412f-aa6e-1dbc20861f85 | abysmalocean/LeetCode | problem/levelOrder.cpp | //class TreeNode {
// public:
// int value;
// TreeNode* left;
// TreeNode* right;
// TreeNode(int v) : value(v), left(NULL), right(NULL) {}
//};
class Solution {
private:
TreeNode* reconstruct(vector<int> levelOrder,
unordered_map<int, int>& map)
{
if (levelOrder.size() == 0) ret... | ALGO | 0.999997 | 6.340041 | {
"github_metadata": {
"branch": "master",
"commit_count": 56,
"repo_created_at": "2019-11-19T03:58: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": "0705887a8... |
1bedad3c-6b6c-48a0-9c94-2efefcba5ccb | duguseo1213/algorithm-problems | 백준/Silver/1927. 최소 힙/최소 힙.cc | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <set>
#include <vector>
#include <queue>
#include <map>
#include <string>
#include <unordered_map>
using namespace std;
int minheap[100010];
int hn;
void push(int num)
{
hn++;
minheap[hn] = num;
int temp;
for (register int i = hn; i > 1; i = i / 2)
{
... | ALGO | 0.999989 | 3.9223 | {
"github_metadata": {
"branch": "main",
"commit_count": 313,
"repo_created_at": "2024-02-13T14:39: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": "032c9d674e... |
ab32d27c-aafb-41a1-b582-54e4351ba509 | kchung1995/baekjoonHub | 백준/Silver/19637. IF문 좀 대신 써줘/IF문 좀 대신 써줘.cc | // 문제 링크: https://www.acmicpc.net/problem/19637
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int n, m;
vector<pair<pair<int, int>, string> > ranks;
void init() {
ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
cin >> n >> m;
int to;
string rankName;
cin >> rankName >... | ALGO | 0.999952 | 4.300209 | {
"github_metadata": {
"branch": "main",
"commit_count": 107,
"repo_created_at": "2022-09-28T14:25: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": "c24ed496c5... |
3e6ff111-9bbf-4d9a-bf1a-c61dc721935f | shivankar-p/real-no-arithmatic | integrate.cpp | #include<bits/stdc++.h>
using namespace std;
pair<vector<int>, int> RemovePaddingFromStart(pair<vector<int>, int> num)
{
if(num.first.size() == 0) return num;
int scale_num = num.first.size() - num.second;
//cout << "scale: " << scale << endl;
vector<int>::iterator it = num.first.begin();
w... | ALGO | 0.99769 | 3.78329 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-04-13T18:29:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e267f61822... |
da793062-675d-4517-ac8e-433d5e8871d3 | harshbhar0629/cppRepository | cpp/codeforces/contest_945/b.cpp | #include <bits/stdc++.h>
using namespace std;
// https://codeforces.com/contest/1973/problem/B
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
auto solve = [&]()
{
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++)
{
... | ALGO | 0.999668 | 5.135705 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2024-03-30T09:16:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2943f2f6ff0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.