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
7462d9cc-7180-4e16-89be-545e9b842142
faterazer/LeetCode
0248. Strobogrammatic Number III/Solution.cpp
#include <string> #include <vector> using namespace std; class Solution { public: int strobogrammaticInRange(string low, string high) { int res = 0; helper(low, high, high.size(), true, res); helper(low, high, high.size() - 1, true, res); return res; } private: vector<s...
ALGO
0.999864
5.601758
{ "github_metadata": { "branch": "master", "commit_count": 2063, "repo_created_at": "2018-04-10T01:40:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2edf1bf...
1874078b-e303-40e0-82c4-15a282323e87
Serin511/Problem-Solving
BOJ/15001-20000/17711.cpp
#include <bits/stdc++.h> #define fi first #define se second #define em emplace #define eb emplace_back #define all(V) (V).begin(), (V).end() using namespace std; typedef vector<int> vim; typedef pair<int, int> pii; const int sz = 700; int N, M, Q, X[400010]; priority_queue<int> S[1010], R[1010]; inline void upd(int...
ALGO
0.999977
4.426002
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2020-02-19T06:52:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b440ec0a9...
114d56c5-6bb6-4d23-a1a8-e25f0480bab8
arilbernhard/saddlebags-hpc-framework
saddlebags/src/pagerank/pagerank.cpp
#include <iostream> #include <fstream> #include <string> #include "../include/saddlebags.hpp" template<class Tk, class Ok, class Mt> class SiteObject : public saddlebags::Item<Tk, Ok, Mt> { public: float page_rank = 1; float new_page_rank = 0; std::vector<int> links; void add_link(int new_link...
ALGO
0.996018
4.192679
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2020-05-14T11:52: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": "eaa038715...
21c49bfc-5e37-4c67-813a-39810139e668
bewuethr/stroustrup-ppp
chapter10/chapter10_ex01.cpp
// Chaper 10, exercise 01: produce sum of numbers in file of whitespace- // separated integers // Use pics_and_txt/chapter10_ex01_in.txt for input #include "../lib_files/std_lib_facilities.h" // read whitespace-separated integers from file void read_ints(vector<int>& ints, const string& name) { ifstream ist(name....
ALGO
0.963994
5.475089
{ "github_metadata": { "branch": "main", "commit_count": 222, "repo_created_at": "2014-08-28T01:21:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 328, "forks": 126, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "be0ce5...
bd2b7614-8c23-4c33-a22a-d98759c7f2c2
yuxincb/snake
源.cpp
#include <stdio.h> #include <conio.h> #include <time.h> #include <stdlib.h> #include <graphics.h> #include <mmstream.h> #pragma comment(lib, "winmm.lib") #define NUM 200 #define SIZE 10 enum Ch { up = 72, down = 80, left = 75, right = 77 }; // 坐标结构 struct Coor { int x; int y; }; struct Snake { int n; // 蛇的节数 C...
TOOL
0.989967
4.265633
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-03-27T11:31: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": "bc715cc471...
3fd93683-0d9f-42df-8b5e-9b944a728ebc
chitranshp/DSA
Array/SubarrayWithGivenSum.cpp
//https://practice.geeksforgeeks.org/problems/subarray-with-given-sum-1587115621/1 #include <bits/stdc++.h> using namespace std; class Solution { public: //Function to find a continuous sub-array which adds up to a given number. vector<int> subarraySum(int arr[], int n, long long s) { int curre...
ALGO
0.998906
4.614429
{ "github_metadata": { "branch": "main", "commit_count": 552, "repo_created_at": "2022-08-06T14:20:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0899854d65...
b3931f05-285e-4cbf-8aca-7ccf38de4298
tamim-18/Graphics-lab
explaineDDA.cpp
#include <GL/glut.h> #include <stdio.h> #include <math.h> #ifdef _WIN32 #include <windows.h> // For Sleep() on Windows #define SLEEP(ms) Sleep(ms) // Windows sleep function #else #include <unistd.h> // For usleep() on Linux #define SLEEP(ms) usleep(ms * 1000) // Linux sleep function #endif // Define w...
ALGO
0.999645
6.098607
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-01-29T16: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": "d7e19b9dab41...
43692377-fce1-4ba6-8170-0dec6e4f4a6e
animeshbarole/DSA-Baiscs-Questions-
Trees/creatingnodelevel.cpp
#include<iostream> #include<queue> using namespace std; class Node { public: int data; Node *left; Node *right; Node(int data) { this->data = data; this->left = this->right = NULL; } }; void leveOrderCreate(Node * &root) //We have to pass it with address if we want to p...
ALGO
0.999763
4.137467
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-07-12T03:48: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": "196ec8f5d1...
1425ea3f-f8b2-492c-b7c2-cff653bf4978
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/07/0712/personal_submission/cf992b_deckedge.cpp
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define ve vector #define all(x) (x).begin(), (x).end() #define rep(i, a, b) for (int i = a; i < b; i++) #define per(i, a, b) for (int i = a; i >= b; i--) using pi = pair<int, int>; inline int read() { int x; cin >> x; return...
ALGO
0.999868
4.760192
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "759c...
1763b845-46a1-4c17-b62a-d7802c94eb4c
leonidasrangel/Algoritmos
AEDS 1/Prova3.1/questao05.cpp
#include <iostream> #include <cmath> using namespace std; // Estrutura para armazenar um ponto 2D struct Ponto2D { double x; // Coordenada x double y; // Coordenada y }; // Estrutura para armazenar um quadrilátero struct Quadrilatero { Ponto2D A, B, C, D; // Quatro pontos do quadrilátero }; // Sub-rotina...
ALGO
0.999676
4.755473
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-04-25T15:18: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": "9870d4c997ed...
10eed545-90f9-4caf-9a49-bd2ce3d6b156
HarounH/iitd_csl333
Assignment 1/suboptimal3/io.cpp
#ifndef IO_CPP #define IO_CPP #include <iostream> #include <vector> #include <limits> #include <cmath> #define NODE_EXPANSION_RATE 2000000 using namespace std; void input() { cin >> timeLimit; timeLimit *= 60; // In seconds. cin >> aSize; string s; idxToChar.resize(aSize); charToIdx.resize(256); for(int i = 0...
ALGO
0.995996
3.481395
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-03-15T17:58: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": "7e7f74a7a9...
391ab5ac-b4ed-429e-b983-9ea9de9bed2d
SniKuz/CoadingTest
백준/Silver/11723. 집합/집합.cc
#include <bits/stdc++.h> using namespace std; string m; vector<bool> s(21, false); vector<string> Split(const string& str, char target = ' ') { istringstream iss(str); string buf; vector<string> ret; while(getline(iss, buf, target)) { ret.push_back(buf); } return ret; } int mai...
ALGO
0.997927
4.975639
{ "github_metadata": { "branch": "main", "commit_count": 325, "repo_created_at": "2023-08-24T09: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": "6cd1eed66c...
bfce3c0e-87ec-413b-9b95-c82e61dbfbaa
linkumokunn/code_la
TIOJ/2232.cpp
/* ============================================================================= /\ \ / /\ |\ /| |=========== / \ \ / / \ | \ / | | / \ \ / / \ | \ / | | / \ | / \ | \...
ALGO
0.999944
3.948537
{ "github_metadata": { "branch": "main", "commit_count": 104, "repo_created_at": "2021-11-23T02:23:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83b81f5236...
fca4675e-05d0-494f-bf61-cf0519ee1d07
mrdrivingduck/leet-code
132.PalindromePartitioningII.cpp
/** * @author <NAME>. * @version 2021/03/08 */ /* Given a string s, partition s such that every substring of the partition is a palindrome. Return the minimum cuts needed for a palindrome partitioning of s.  Example 1: Input: s = "aab" Output: 1 Explanation: The...
ALGO
0.999959
6.019758
{ "github_metadata": { "branch": "master", "commit_count": 195, "repo_created_at": "2019-08-01T14:06: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": "47d4d55b...
8bb6dbe7-dc1c-4799-8d14-357fcfa9ca94
sk1fO/progNstu
ASVT/LR3/lab1.cpp
#include <iostream> #include <vector> #include <random> #include <chrono> #include <iomanip> #include <immintrin.h> // Для AVX инструкций // Базовая реализация DGEMM void DGEMM(const std::vector<std::vector<double>>& A, const std::vector<std::vector<double>>& B, std::vector<std::vector<double>>...
ALGO
0.997722
6.704147
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-10-05T02:48: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": "c306809dc4e...
0dd647c0-ffa6-4e71-ba4e-1f070fcf7071
wassimalharaki/Codeforces
1300/CreatingaCharacter.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define INF LONG_LONG_MAX #define nl << '\n' #define v vector #define pb push_back #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(), v.rend() #define mp make_pair #define F first #define S second using pii = pair<int, int>; using vi = v<...
ALGO
0.999887
4.543923
{ "github_metadata": { "branch": "main", "commit_count": 160, "repo_created_at": "2023-09-19T17:56: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": "fabd68e1fa...
a4261471-da1b-4514-9386-24d37b980a41
SonK4m3/Data-Structure-Algorithm
Data Structures II/Linked_list_Operations.cpp
/** Linked List Operations **/ /* - Basic linked list operations: 1. Traversal 2. Insertion 3. Deletion 4. Search 5. Sort */ #include<iostream> #include<stdlib.h> using namespace std; //Creating a node struct Node { int data; struct Node * next; }; typedef struct Node node; void insertAtBeg...
ALGO
0.999977
5.120347
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2021-11-14T15:38: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": "b98e252fa45...
f3d3863b-ed3c-4a38-bc51-e58a182ce002
Algorithmonaut/advent-of-code
2015/03/part-2/main.cpp
#include <cstdlib> #include <fstream> #include <iostream> #include <iterator> #include <string> #include <unordered_set> #include <utility> #include <vector> struct pair_hash { template <class T1, class T2> std::size_t operator()(const std::pair<T1, T2> &p) const { auto h1 = std::hash<T1>{}(p.first); auto ...
ALGO
0.999921
4.554279
{ "github_metadata": { "branch": "main", "commit_count": 51, "repo_created_at": "2023-10-26T10:11: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": "b55861fc30c...
84c00c65-34e7-46d7-b43c-ded8f7a12a0e
vrnimje/DSA
QuickSort.cpp
#include <iostream> using namespace std; void swap(int *a, int *b){ int t = *a; *a = *b; *b = t; } int partition(int arr[], int lidx, int ridx){ int pivot = arr[ridx]; int temp = lidx-1; for (int i=lidx; i<ridx; i++){ if (arr[i] <= pivot){ temp++; swap(&arr[temp...
ALGO
0.999983
5.901412
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-03-29T18:44:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "362cb087ac58...
4153f2ce-4c42-43a6-8af3-4fe92f743b86
yooniversal/SWMaestro-coding-test
yooniversal/1439.cpp
// 1439 #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<pair<int, int>> vii; typedef pair<int, int> ii; const int MAX = 100005, INF = 1000000001, MOD = 1000000000; int cnt[2]; int check(string &s, int start) { for ( i...
ALGO
0.999954
3.970034
{ "github_metadata": { "branch": "main", "commit_count": 198, "repo_created_at": "2023-01-09T07:47:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a94007e14...
8c7fd97c-7d44-48fe-867d-5a10a5870f06
av-novikov/diffusion_solver
model/3D/GasOil_3D/GasOil3DSolver.cpp
#include "model/3D/GasOil_3D/GasOil3DSolver.h" using namespace std; using namespace gasOil_3d; GasOil3DSolver::GasOil3DSolver(GasOil_3D* _model) : AbstractSolver<GasOil_3D>(_model) { Initialize(model->cellsNum_r+2, 2*(model->cellsNum_z+2)*model->cellsNum_phi); plot_Pdyn.open("snaps/P_dyn.dat", ofstream::out); plo...
ALGO
0.999359
3.609415
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2015-12-18T08:07:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "031b35590...
73f50aac-1e92-408e-93d2-a5770e7c85f7
mnpham2101/ProgrammingPractice
3. DP_IntegerArray/SlidingWindows_Backtracking_2DArrapMap_Clearance/Backtracking_2DArray_Clearance_sol3.cpp
#include <iostream> using namespace std; #define MAX 100001 int numbers[MAX][10]; // Lưu trữ số phần tử từ đầu mảng gốc của từng vị trí. bool mark[10]; int occurance[10], order[10]; int n,m, answer; // For each permumation config of product types, perform sliding windows int calculate() { int result = 0; int ...
ALGO
0.999894
3.521176
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2022-07-07T02:57: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": "0f35d754ada...
f6900665-760c-491f-9a5d-003e333d5c51
didw/coding
algospot/algosrc/problems/nerd2/nerd2.cpp
#include<cstdio> #include<map> #include<iostream> #include<string> #include<vector> using namespace std; // 현재 다른 점에 지배당하지 않는 점들의 목록을 저장한다 // coords[x] = y map<int,int> coords; // 새로운 점 (x,y) 가 기존의 다른 점들에 지배당하는지 확인한다 bool isDominated(int x, int y) { // x 보다 오른쪽에 있는 점 중 가장 왼쪽에 있는 점을 찾는다 map<int,int>::iterator it = c...
ALGO
0.999453
4.082617
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2015-12-01T04:53:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33b6d0e05...
b48fe259-713e-4b5c-8c13-fb68fe2296a3
thirofoo/atcoder-archives
ahc014/ahc014_a_35005457_AC.cpp
/* * Author: through * Submission URL: https://atcoder.jp/contests/ahc014/submissions/35005457 * Submitted at: 2022-09-20 10:23:20 * Problem URL: https://atcoder.jp/contests/ahc014/tasks/ahc014_a * Result: AC * Execution Time: 4909 ms */ #include <bits/stdc++.h> using namespace std; typedef pair<int, int> P; ty...
ALGO
0.999919
3.516737
{ "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": "120349edc...
074253ad-aa37-4036-af55-3deed944c90f
jayakanth45/Data-structures-and-Algorithms
3152-special-array-ii/3152-special-array-ii.cpp
class Solution { public: vector<bool> isArraySpecial(vector<int>& nums, vector<vector<int>>& queries) { vector<int> sum(nums.size(),0); int sum1 = 0; for(int i = 0; i < nums.size() - 1; i++) { if(nums[i] % 2 == nums[i + 1] % 2) { nums[i] = 1; } else { num...
ALGO
0.999866
5.364986
{ "github_metadata": { "branch": "main", "commit_count": 1145, "repo_created_at": "2024-07-01T17:41: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": "8fd7095a9...
79c9100c-e71c-447d-8c78-bb8c5642b1be
xuxinyang/leetcode
622.设计循环队列.cpp
/* * @lc app=leetcode.cn id=622 lang=cpp * * [622] 设计循环队列 */ // @lc code=start class MyCircularQueue { private: int front; int rear; int capacity; vector<int> elements; public: MyCircularQueue(int k) { this->capacity = k + 1; this->elements = vector<int>(capacity); ...
ALGO
0.996081
5.853875
{ "github_metadata": { "branch": "master", "commit_count": 475, "repo_created_at": "2020-10-28T09:23:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e1b40aa...
e60e6af9-3494-4f1a-acc0-d1b5fc6348a9
ryeryeryeZ/mindspore
mindspore/ccsrc/plugin/res_manager/ascend/op_adapter/op_declare/cluster_ops_declare.cc
/** * Copyright 2022-2022 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicabl...
ALGO
0.995812
6.127759
{ "github_metadata": { "branch": "main", "commit_count": 94587, "repo_created_at": "2025-05-08T14:19:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a57017cc...
59b6f2cc-7013-4022-a76e-d65b4374ff41
bukanyohandi/personal-website
static/archive/Competitive-Programming/CodeForces - 135A.cpp
#include <bits/stdc++.h> /* Karya anak bangsa yang paling agung Author : Yohandi or... bukan.. */ #define fs first #define sc second #define pb push_back #define eb emplace_back #define all(a) a.begin(), a.end() #define lb(a, x) (lower_bound(all(a), x) - a.begin()) #define ub(a, x) (upper_bound(all(a)...
ALGO
0.999975
3.858646
{ "github_metadata": { "branch": "main", "commit_count": 235, "repo_created_at": "2023-07-23T03:48:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "03885bd4b3...
1c141b22-94da-4088-8716-4cc4625d53e1
robotix/image-processing-wws-2014
Phase 2/Phase 2 Codes/Day 6/raghav_agarwal_problemstatement.cpp
#include "stdafx.h" #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" #include <stdio.h> #include<iostream> #include<math.h> #include<algorithm> #include<opencv2/imgproc/imgproc.hpp> #include<queue> using namespace std; using namespace cv; # define pi 3.1414 int detectcolor(Mat image, int hue, int...
ALGO
0.999136
5.196859
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2014-12-06T21:39:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd6df35b3b...
751e44a5-48c2-42eb-a85a-6215482c78d2
yplusplus/OnlineJudge
sgu/sgu 536 Berland Chess - 状态压缩 + bfs.cpp
#include "iostream" #include "cstdio" #include "cstring" #include "queue" using namespace std; int r, c, sx, sy; int cnt; char maz[20][20]; int maze[20][20]; bool visit[20][20][40000]; int dir[][2] = {0, 1, 1, 0, -1, 0, 0, -1, 1, -1, -1, 1, 1, 1, -1, -1}; int kdir[][2] = {-2, -1, -2, 1, 2, 1, 2, -1, 1, 2, 1, -2, -1, 2,...
ALGO
0.999789
3.562926
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-23T18:32:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e9e9f333cbc...
f40ae0c8-b8e1-41bd-87fa-1f7dbf2fa1d5
ylkky/PreparePAT
1086.cpp
#include<iostream> #include<stack> #include<vector> #include<cstring> using namespace std; #define PUSH 0 #define POP 1 //typedef struct treeNodes* Node; struct treeNodes { int l, r; }T[31]; typedef struct treeNodes tNode; int N; //Node T; stack<int> s; int ins[31], pre[31]; int buildTree(int *in, int *p, int num) {...
ALGO
0.999942
4.018865
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2017-01-29T15: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": "44e512a92...
b766e1e6-4c6b-45cd-af93-5023e181c4cb
jiiink/DataStructure
DS_2023_STL_Part_1_1a/STL_1100___Coding_Tech_1c/Tech_400__Function_passing_2021_1a/functional___100_5_times_1a.cpp
// vector 구조의 수행시간 측정하는 함수 O( f(N) )를 살펴보는 코드 // 2020년 추석 전전날 아침에 조환규가 만듬. // 2021년 5월 6일, 롯데가 어린이날 시합에서 개망신 당한 다음 날. /* 2021.5.6 comments STL에서 사용하는 sorting algorithm은 IntroSort 알고리즘이다. 이것은 3개의 알고리즘, QuickSort, HeapSort and InsertionSort이다. 기본적으로는 QuickSort이 사용되는데 pivot은 median-of-3를 사용해서 뽑는다. 만일 QuickS...
ALGO
0.998984
5.183341
{ "github_metadata": { "branch": "main", "commit_count": 159, "repo_created_at": "2023-08-23T07:47: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": "08ac5749f5...
2051db4d-dfb7-4441-b772-dfb1b4ff1db1
ishandutta2007/codeforces-c
cchao/normal/766/E.cpp
#include <bits/stdc++.h> using namespace std; #define REP(i, n) for (int i = 0; i < int(n); ++i) #define REPE(i, a, b) for (int i = (a); i <= int(b); ++i) #define SZ(x) ((int)(x).size()) #define ALL(x) x.begin(), x.end() #define PB push_back #define EB emplace_back using LL = long long; using PII = pair<int, int>; #def...
ALGO
0.999579
4.057585
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa7d9b5371ff...
383e6f87-1439-4569-97d5-ead0d07a8478
ikk5515/cpp
programmers/Lv.1/삼총사.cpp
// programmers_Lv.1_삼총사 #include <string> #include <vector> #include <algorithm> using namespace std; int solution(vector<int> number) { int answer = 0; vector<int> temp; int k = 3; for (int i = 0; i < k; i++) { temp.push_back(1); } for (int i = 0; i < number.size()-k; i++) { t...
ALGO
0.999944
4.697875
{ "github_metadata": { "branch": "master", "commit_count": 269, "repo_created_at": "2022-07-02T15:28: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": "e90fb690...
ea9937e3-b225-4b50-8af1-8a0f75c8c12d
linyirun/CompetitiveProgramming
Previous/AtCoder/ABC328/B.cpp
#include <bits/stdc++.h> #define ll long long #define ld long double #define pii pair<int, int> #define pll pair<ll, ll> using namespace std; #define int ll //const int MOD = 998244353; const int MOD = 1000000007; const int INF = 1e15; bool same(string s) { for (int i = 0; i < s.size(); i++) { if (s[i] !=...
ALGO
0.999835
4.379522
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2023-12-07T05:43: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": "8199c91e1a8...
e780269b-a6ac-432e-8411-b7063edaf671
AWaterColorPen/Template
acm.library/tries.h
// // Created by slyao on 5/13/2018. // #ifndef INC_05132_TRIES_H #define INC_05132_TRIES_H #include <bits/stdc++.h> template <typename T, size_t size> struct TRIE { T _value[size]; int _ch[size][26]; int _ID[128]; int _count; TRIE() { for (int i = 0; i < 26; i++) _ID[i + 'a'...
ALGO
0.998978
4.771242
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2014-08-07T11:15: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": "670d30ceb...
63e659d2-600a-4019-88d3-9ba675d57c65
project-tsurugi/shakujo
analyzer/src/optimize/SelectScan.cpp
/* * Copyright 2018-2024 <NAME>. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to...
ALGO
0.990911
7.074676
{ "github_metadata": { "branch": "master", "commit_count": 239, "repo_created_at": "2019-01-18T09:35:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd8295f68...
8468c557-3bc8-4316-a8ea-32c04c153d7d
jayulkim/BOJ
백준/Silver/14651. 걷다보니 신천역 삼 (Large)/걷다보니 신천역 삼 (Large).cc
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll n = 0, m = 0, k = 0; ll addmod(ll x, ll y, ll num) { if (x >= num - y) { return x - (num - y); } return x + y; } ll mulmod(ll x, ll y, ll num) { ll result = 0; while (y > 0) { if (y % 2) { result = add...
ALGO
0.999992
4.402249
{ "github_metadata": { "branch": "main", "commit_count": 1983, "repo_created_at": "2023-09-19T10:22: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": "ba52b7058...
b9c19d2e-fad7-4856-beef-e40a34bb300c
Axtal/spolytope-dem
dem/cone.cpp
/************************************************************************ * MechSys - Open Library for Mechanical Systems * * Copyright (C) 2009 <NAME> * * * * This program is free softwar...
ALGO
0.950788
5.36567
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2015-05-13T05:07: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": "6fc32d337...
c6dcfde3-b730-4cd6-8273-8a955915ff00
yuyilei/LeetCode
conTest/197-week/Path-with-Maximum-Probability.cpp
/* 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 end, find the path with the maximum probability of su...
ALGO
0.999978
5.87075
{ "github_metadata": { "branch": "master", "commit_count": 372, "repo_created_at": "2017-08-24T07:13:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2a7ae59...
e1cff54b-714f-441f-8ec0-4dc21201ccf7
faisal1025/Data-Structure-Algorithm
Binary_Search_Tree/Replace_every_element_with_the_least_greater_element/replace_every_element_with_the_least_greater_element.cpp
#include<bits/stdc++.h> using namespace std; struct Node{ int data; Node* left; Node* right; Node(int val){ data = val; left = right = NULL; } }; Node* createBst(Node* root, int val, int ans[], Node* suc, int n){ static int i = n-1; if(!root) { if(suc){ ...
ALGO
0.999997
4.563011
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2021-10-17T18:16:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f132d73af...
18a96230-9376-4da1-a05e-9f6d9cfb654a
Cikuozzo/LearningCPlusPlus
Esercizio 006/main.cpp
#include <iostream> using namespace std; int main() { int anno, mese, giorno, x = 0; bool isbisestile = false; cout << "Inserire l'anno: "; cin >> anno; if(anno%400==0 || (anno%100!=0 && anno%4==0)){ isbisestile = true; } do{ cout << "Inserire il mese: "; cin >> mese; }while(mese...
ALGO
0.998058
3.487206
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2022-11-22T20:45: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": "c0b266c9ecc...
72e8f2ad-3463-41f6-86c1-233d98ebacd8
krishnas76/CPP_Projects
TicTacToe.cpp
/*This program creates a game of tic-tac-toe between two players *Author: <NAME> *Date: 10/6/22 */ #include <iostream> #include <cstring> #include <ctype.h> using namespace std; //set functions void printBoard(int board[3][3]); void makeBoard(int board[3][3]); bool checkWin(int board[3][3], int player); bool chec...
ALGO
0.994669
4.661549
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2022-09-12T21:18: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": "84072a9fb2a...
d36f7384-ff11-41b7-8ef4-14f94af82b7a
AkshatSahay72/Cpp-DSA-Journey
05-Linked List/circularDoublyLinkedList.cpp
#include <iostream> using namespace std; class Node { public: int val; Node *next; Node *prev; Node(int val) { this->val = val; this->next = NULL; this->prev = NULL; } }; class CircularDoublyLinkedList { private: Node *head = NULL; public: int getLength() ...
ALGO
0.998982
5.139284
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2024-11-12T11:49: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": "4de7c453436...
230b8a2e-96c3-4c84-b4b8-105535781e75
deepakdhaked/Recursion-Backtracking
get_stairs_path.cpp
#include <iostream> #include <vector> using namespace std; vector<string> getPath(int n) { if (n == 0) { vector<string> x; x.push_back(""); return x; } else if (n < 0) { vector<string> x; return x; } vector<string> p1 = getPath(n - 1); vector<str...
ALGO
0.999952
4.814473
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2022-07-24T00:18:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb0c924075a...
ce90891c-e1bb-480d-a019-5002f209e604
hieu-ln/IT82-06
CodeC2/QNhu b2c2.cpp
#include <stdio.h> #include <iostream> using namespace std; #define MAX 100 //cau 2.1 int a[MAX]; int n; //Cau 2.2: them phan tu vao danh sach void swap (int &a, int &b) { int t = a; a = b; b = t; } void quickSort(int a[], int left, int right) { int x = a[(left + right)/2]; int i = left; int j = right; while ...
ALGO
0.999686
3.92364
{ "github_metadata": { "branch": "master", "commit_count": 120, "repo_created_at": "2019-06-26T10:14:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db7e5afb...
e6942572-6566-459e-8c96-e41ee4e6ae42
restrepo/SM-Toolbox
madgraph/madgraph/iolibs/template_files/loop_optimized/loop_matrix_standalone.inc
C --=========================================-- C Main subroutine C --=========================================-- SUBROUTINE %(proc_prefix)sSLOOPMATRIX(P_USER,ANS) C %(info_lines)s C C Returns amplitude squared summed/avg over colors c and helicities for the point in phase space P(0:3,NEXTERNAL) c and external ...
ALGO
0.976024
3.986477
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-05-20T00:40:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf8ea2a57...
646a85b4-48c4-4fb3-b1de-6b7e4d121baa
stevenhalim/cpbook-code
ch8/UVa10243.cpp
// Fire! Fire!! Fire!!! #include <bits/stdc++.h> using namespace std; typedef vector<int> vi; int memo[1010][2]; vector<vi> AL; // undirected version vector<vi> Children; // directed version vi vis; void dfs(int u) { vis[u] = true; for (auto &v : AL[...
ALGO
0.999729
3.776342
{ "github_metadata": { "branch": "master", "commit_count": 392, "repo_created_at": "2018-11-27T05:30:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2175, "forks": 515, "issues": 22, "pull_requests": 14 }, "file_meta": { "content_id": "0...
1da6bfaa-fc9c-4100-9e94-22c3553ad564
alexandraback/datacollection
solutions_5738606668808192_0/C++/IX103/C.cpp
#include <iostream> #include <cassert> #include <gmpxx.h> //-lgmpxx -lgmp using namespace std; pair<bool,mpz_class> isprime(mpz_class num) { //only support numbers >= 3 mpz_class div_max; mpz_sqrt(div_max.get_mpz_t(), num.get_mpz_t()); for (mpz_class div = 2; div <= div_max ; div++) { if (num % div...
ALGO
0.999747
4.258023
{ "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": "eeff675bb...
89e84533-ba1d-4ac2-83e8-f96c766503d2
Tora416/MultiCodeEmbed
dataset/dataset_raw/gcj_cpp/Plypy/5304486_5760761888505856_Plypy.cpp
#include <bits/stdc++.h> using namespace std; int R, C; char mat[30][30]; int main() { int T; scanf("%d", &T); for (int cas = 1; cas <= T; ++cas) { printf("Case #%d: \n", cas); scanf("%d%d", &R, &C); for (int i = 0; i < R; ++i) { scanf("%s", mat[i]); mat[i][C] = 0; } for (int i ...
ALGO
0.999894
3.83088
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2025-07-10T08:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fd5b22fcf...
f4f99085-3707-48a0-a423-b2de8d379d80
ishandutta2007/codeforces-h
hir180/normal/1305/D.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; typedef long long ll; typedef pair<int,int> P; type...
ALGO
0.999934
3.669373
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01: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": "fb7a5eb9eca1...
77d44453-d0fa-4d4c-94da-9d293c5303d8
ScienceLi1125/CQU-Study
大二下/算法分析与设计/代码/10.dfs_bfs/11.深入虎穴.cpp
/*深入虎穴: 题目:著名的王牌间谍007需要执行一次任务,获取敌方的机密情报。已知情报藏在一个地下迷宫里,迷宫只 有一个入口,里面有很多条通路,每条路通向一扇门。每一扇门背后或者是一个房间,或者又有很多条 路,同样是每条路通向一扇门......他的手里有一张表格,是其他间谍帮他收集到的情报,他们记下了 每扇门的编号,以及这扇门背后的每一条通路所到达的门的编号。007 发现不存在两条路通向同一扇门。 内线告诉他,情报就藏在迷宫的最深处。但是这个迷宫太大了,他需要你的帮助————请编程帮他找出距 离入口最远的那扇门。 输入:首先在一行中给出正整数N(<100000),是门的数量。最后N行,第i行...
ALGO
0.999817
3.93628
{ "github_metadata": { "branch": "main", "commit_count": 57, "repo_created_at": "2022-08-14T11:14:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 183, "forks": 22, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "ab497678...
9975165b-82df-42f7-b64d-97454b54d771
CodinGuy25/cpp-exercises
Part 6 - Functions/Es6.cpp
#include <iostream> #include <cmath> using namespace std; struct Point { int x; int y; }; struct Triangle { Point v1; Point v2; Point v3; float perimetro; float area; }; const float TOLL = 1e-6; int main() { Triangle t; cout << "Enter the integer coordinates of three vertices:"...
ALGO
0.998166
5.178409
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-05-29T19:42: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": "b574aeeade4b...
ce0adfb5-8e82-424d-867c-7abf83735404
ishassan/ProblemSolving
TopCoder/Div 2/TheTournamentDivTwo.cpp
//453-D2-1 #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #include <math.h> #include <algorithm> #include <functional> #include <vector> #include <string> #include <iostream> #include <sstream> using namespace std; #define fo(i,n) for(int i=0;i<(n);++i) typedef vector<int> vi ; typedef ...
ALGO
0.999931
4.217915
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-03-11T10:04:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a92094b40...
7992dc41-d010-4b5f-ba9e-4a50c5302076
DDK1127/Advanced_Cplusplus
Week-13&14/ex02a.cpp
#include<bits/stdc++.h> using namespace std; vector<vector<long long int> > vv(100, vector<long long int>(100, 0)); long long int Binomial(int n, int m){ if(vv[n][m]) return vv[n][m]; if(m == 1) return n; if(m == 0 || n == m) return 1; return Binomial(n-1, m-1)+Binomial(n-1, m)...
ALGO
0.999927
4.563406
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2024-03-01T10:39: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": "0a2e823512e...
eedfb6ce-291b-4b52-8421-92517968c287
dishtam/Striver-DSA-Sheet
d5_1.cpp
#include<bits/stdc++.h> using namespace std; class node{ public: int data; node* next; node(int val){ data = val; next = NULL; } }; void insertAtEnd(node* &head,int val){ node* n = new node(val); if(head==NULL){ head = n; return; } node* temp = head;...
ALGO
0.999973
5.341397
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2022-06-15T10:33:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75c61e7052a...
961a3a3a-e3f5-4f9a-81c4-65d2421f75bc
ZaidMushtaq921/leetcode
1008-construct-binary-search-tree-from-preorder-traversal/1008-construct-binary-search-tree-from-preorder-traversal.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.99999
6.441678
{ "github_metadata": { "branch": "main", "commit_count": 1889, "repo_created_at": "2023-08-22T06:54:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7fd9a9786...
4d134cd6-5d35-4997-a1b2-57e5c96e7bf9
ankeshbanerjee/cpp-and-dsa
30 Dynamic Programming/21_targetSum.cpp
#include <bits/stdc++.h> using namespace std; // this problem is same as the dp-18 (count subsets with given difference), just written in another language // coz, +1 +2 +4 -3 -1 = (1+2+4) - (3+1) = 3 // s1 - s2 = d int findWays(vector<int>& arr, int k) { // Write your code here. int n = arr.size(); vector<int> p...
ALGO
0.999943
4.862327
{ "github_metadata": { "branch": "main", "commit_count": 135, "repo_created_at": "2022-06-21T12:04: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": "0274252316...
49a78a49-d504-42ca-a899-d71685e7cbfc
Hachimori/onlinejudge
uva/10300-/10361.cc
#include<iostream> #include<string> using namespace std; string source; string source2; void read(){ getline(cin,source); getline(cin,source2); } void work(){ int cursor=0; string s1, s2, s3, s4, s5; while(cursor<source.length() && source[cursor]!='<'){ s1+=source[cursor]; cursor++; } cursor...
ALGO
0.973826
3.205945
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2016-02-27T08:30: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": "9c7326da...
979ff4a9-c698-481f-a3f7-4f310d88dcde
mgovers/Snake
Snake/DeepLearningCore/FullyConnectedLayer.cpp
#include "FullyConnectedLayer.h" #include <iostream> #include <exception> std::string VecToString(Eigen::VectorXd &mat) { std::stringstream s; s << mat; return s.str(); } void FullyConnectedLayer::initWeights() { switch (this->weightInitialization) { // Random between [-1,1] case RandUniform: w.se...
ALGO
0.900452
7.060383
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2018-11-09T21:31: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": "b529c9cfe...
232cc4a4-47bf-4fbe-88c7-628c78e2d6c8
Andrew53O/NSYSU
Freshman/Spring 下/Cpp/BOOK homework/Chapter 9/testing/4_coba.cpp
#include <iostream> #include <string> #include <cctype> using namespace std; int main(void) { // string s; // getline(cin, s); // int length = s.size(); // or size(); // string output, temp; // output = ""; // temp = ""; // bool capital = false; // int count = 0; // for (int i =...
ALGO
0.999749
3.652502
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2023-05-04T10:08: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": "0fa5b85227b...
c01ceb65-1445-409b-904c-75b858727d86
ornfelt/azerothcore_lua_scripts
lua/WowEmulationScriptPack/C++/HungerGames/HungerGamesMidFightLogic.cpp
#include "GameTime.h" #include "Player.h" #include "Map.h" #include "HungerGamesStore.h" bool HungerGameStore::IsPlayerInsideEventArea(Player *p) { if (p->FindMap() == NULL) return false; if (p->IsBeingTeleported() == true || p->IsInWorld() == false || p->IsLoading() == true) return true; ...
TOOL
0.915081
4.298163
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2023-08-15T22:48:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebf6611...
4879a6a8-5b10-456e-92bc-d28931edc20c
Gecode/gecode
examples/perfect-square.cpp
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* * Main authors: * <NAME> <<EMAIL>> * <NAME> <<EMAIL>> * * Copyright: * <NAME>, 2003 * <NAME>, 2005 * * This file is part of Gecode, the generic constraint * development environment: * http://www.gecode.org * * Per...
ALGO
0.99884
6.025734
{ "github_metadata": { "branch": "master", "commit_count": 5620, "repo_created_at": "2015-11-06T07:33:39.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 309, "forks": 77, "issues": 40, "pull_requests": 9 }, "file_meta": { "content_id": "7fea...
7795bd12-4c3a-4153-9c1f-73eb6d32bb6f
nhatrongbp/DSA_codePTIT
dichuyentrenbangso.cpp
#include <bits/stdc++.h> using namespace std; #define pii pair<int,int> #define f first #define s second #define pb push_back #define ll long long int n, m; vector< vector<int> > cost, A; vector<pii> E = {{-1,0},{1,0},{0,-1},{0,1}}; int dijkstra(){ priority_queue< pair<int, pii>, vector< pair<int, pii> >, greate...
ALGO
0.999945
4.292773
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-12-18T12:24:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3a31d2fb31...
952e75cc-0d0b-4eed-acc8-bb59ff630b42
eugeniatate/Binary
Binary.cpp
//---------------------------------------------------------------------------- //Binary.cpp //Author: <NAME> CSS 343 Winter 2015 UWB //---------------------------------------------------------------------------- //DESCRIPTION: Class Binary implements an abstract data type for binary numbers // of arbitrary ...
TOOL
0.971625
5.22181
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-10-18T04:57: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": "c8b5778e08...
30659670-b0fa-4cd3-bfcc-bb82ffc8e0ac
secretflow/psi
psi/legacy/dp_psi/dp_psi.h
// Copyright 2021 Ant Group Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed ...
TOOL
0.971389
7.033637
{ "github_metadata": { "branch": "main", "commit_count": 181, "repo_created_at": "2022-04-19T02:48:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 35, "forks": 43, "issues": 13, "pull_requests": 11 }, "file_meta": { "content_id": "2ff8ff2...
61e23fd0-f75b-47bf-8d4d-dae125fe553f
naotaka0608/node-cplus-test
CalcTest/SortLib.cpp
#include "./SortLib.h" SortLib::SortLib() { } SortLib::~SortLib() { } /* クイックソートを行う */ void SortLib::QuickSort(int x[], int left, int right) { int i, j; int pivot; i = left; /* ソートする配列の一番小さい要素の添字 */ j = right; /* ソートする配列の一番大きい要素の添字 */ pivot = x[(...
ALGO
0.999818
4.873777
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-04-05T00:11:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ef47aeb0b...
bc65c3fc-242f-4235-a2fb-abbc9832a866
Elssky/KVCC-ENUM
KVCC_Algorithm.h
#include<Snap.h> class MyTUNGraph; typedef TVec<TInt> TIntV; typedef TVec<PUNGraph> TUNGraV; typedef TPt<MyTUNGraph> MyPUNGraph; class MyTUNGraph : TUNGraph { TIntV SSV; }; class VCCE { public: int* vertex_map_; double _time = 0; double _time2 = 0; double _time3 = 0; double _time4 = 0; int m = 0; int m2 = 0...
ALGO
0.997534
4.061411
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2022-01-23T06:59: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": "6d6be071660...
f4206d6c-9b4b-421a-a48b-cb54c5c14d15
Trollbump/TP_algs
1_module/n6_4.cpp
// Copyright 2021 <NAME>' Orletskiy /* Даны неотрицательные целые числа n,k и массив целых чисел из [0..10^9] размера n. Требуется найти k-ю порядковую статистику, т.е. напечатать число, которое бы стояло на позиции с индексом k (0..n-1) в отсортированном массиве. Требования: К дополнительной памяти:...
ALGO
0.99999
6.140639
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-09-07T08:02:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "54f315acbd...
c30eba15-8325-442d-8f0b-6397b275928f
eTakazawa/procon-archive
atcoder.jp/agc003/agc003_c/Main.cpp
#include <bits/stdc++.h> using namespace std; long long data[400001],n; long long sum(int i){ long long s = 0; while(i > 0){ s += data[i]; i -= i & -i; } return s; } void add(int i, long long x){ while(i <= n){ data[i] += x; i += i & -i; } } map<int,int> zip; int unzip[100001]; int compress(vector<int> ...
ALGO
0.99998
3.77445
{ "github_metadata": { "branch": "master", "commit_count": 613, "repo_created_at": "2020-03-24T15: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": "7f1751d4...
5afc8d41-de1a-4b35-bd7f-93279728ecb9
mmalicki2/compacttrie
libcompacttrie/detail/CompactTrie.h
#ifndef COMPACTTREE_H_ #define COMPACTTREE_H_ #include <ChunkManager.h> template<class _N> class NodeFactory; template <class Char, class Value, class ChunkManager, class BasePoinerType> class Node; template<class C, class V, class BT = size_t> class CompactTrieBase { public: class Citerator; typedef C ...
ALGO
0.961117
6.30695
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-07-23T22:12:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ff4b11a19b...
0c2e5bcf-4594-4072-9a41-232ae6295c45
rohanraja/TornPaper_Mosaic
Canny/MatBoundary.h
class RoughEdge { public : int roughness_scores ; pair<Point,Point> roughpair ; int is_used ; RoughEdge(pair<Point,Point> rp, int rs, int is) { roughpair = rp; roughness_scores = rs; is_used = is; } }; class MatBoundary { Mat src; Ma...
ALGO
0.99368
4.065411
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2014-03-23T14:53:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b91fcce5...
a934b2d9-b6f8-46e7-8f80-43d8f344c6b6
Abhinav200207/Codeforces-Practice
arrayop.cpp
#include<bits/stdc++.h> using namespace std; int main(){ // int t; // cin >> t; // while (t--){ int n = 6,k = 2; // cin >> n >> k; vector<int> v{1,3,3,7,2,2}; for (int i = 0; i < n; i++){ cin >> v[i]; } int i = 0; int sizearr = v.size(); ...
ALGO
0.999968
3.131818
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-05-20T19:49:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "574c098e519...
cae1c3a0-19d9-485a-b32f-ebbd6f98f9d0
ishandutta2007/codeforces-k
krk/normal/264/D.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int Maxn = 1000005; const string RBG = "RBG"; const int Maxm = 3; string A; string B; ll res; int sum[Maxn][Maxm][Maxm]; int main() { cin >> A; cin >> B; for (int i = 1; i < B.length(); i++) { for (int a = 0; a < Maxm; ...
ALGO
0.999738
3.993395
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc587ec13887...
894ee2f9-18bd-488f-b680-8534c288e992
anneharun3/Shaders
parsing.h
#ifndef __parsing_h__ #define __parsing_h__ // Some helper functions for parsing common classes from JSON. // Forward declarations of the types to be filled. #include "glfwd.h" // For parsing JSON. #include "json.hpp" using json = nlohmann::json; #include <string> #include <unordered_set> #include <functional> name...
TOOL
0.933911
5.353159
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-02-06T07:17: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": "4240051e94...
775b63bd-1e58-4c84-9470-9b7ca65509c3
sampritipanda/IOI_Repository
Codechef/SNCKPA16/SUBSEG2.cpp
#include <cstdio> #include <algorithm> #include <vector> #include <climits> #include <set> using namespace std; const int MAX_LOG = 17; const int MAX = 100000; vector<pair<int, int> > temp; vector<pair<int, int> > A; int dp[MAX_LOG][MAX + 2]; bool compare(pair<int, int> A, pair<int, int> B) { if(A.second == B.sec...
ALGO
0.999699
3.770938
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2014-12-27T14:42:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5c47d9...
bcf68e8b-ec7c-4a24-9049-7532883d1a2e
aoapc-book/aoapc-bac2nd
ch8/UVa12265.cpp
// UVa12265 Selling Land // <NAME> // This code implements the algorithm described in the book // Another way is: still use a stack to maintain the "staircase" shape // But don't eliminate non-optimal rectangles in the stairecase. // instead, let maxp[c] be the maximal half-perimeter whose rightmost column is c, which ...
ALGO
0.999806
3.336299
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2014-06-01T16:48:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2739, "forks": 998, "issues": 44, "pull_requests": 7 }, "file_meta": { "content_id": "910...
0ec77ec6-a617-43ad-ae5b-8bdc99261dd3
danknessdra/codeforces
1200/436A.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; void fast() { cin.tie(0); cout.tie(0); } int main() { fast(); int n, x; vector<pair<int, int>> caramel; vector<pair<int,int>> fruit_drop; cin>>n>>x; for (int i = 0; i < n; ++i) { int t, h, m; cin>>t>>h>>m;...
ALGO
0.999389
3.87809
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-01-31T05:11:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c13c9a130f30...
b69fc85a-d079-46dd-a568-647d0b7b173c
shiwaditya/Sem-4
ADS/4_tbt.cpp
#include<iostream> using namespace std; class tbtnode { char data; int rbit; int lbit; tbtnode *rightc; tbtnode *leftc; friend class tbt; public: tbtnode(); }; tbtnode::tbtnode() { lbit=1; rbit=1; } class tbt { tbtnode *head; tbtnode *temp; public: tbtnode *s; int flag; void create(); void p...
ALGO
0.999894
3.242791
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2023-08-30T18:46: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": "052bf3c376...
26b1a1f7-a3ab-42fc-80f6-e8e3d50ca2da
bzhaocaltech/Math-Dot-Random
run_time_svdpp.cpp
/* Runs a Time SVDPP */ #include "time_svdpp.hpp" #include "serialize.hpp" #include "output.hpp" #include <stdlib.h> int main(int argc, char *argv[]) { if (argc != 5) { printf("USAGE: ./run_time_svdpp #latent_factors eta regularization #epochs\n"); exit(1); } // Get command line arguments int latent_f...
DATA
0.987588
5.689998
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2018-04-06T02:47:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db0ba6d97...
19d10905-ff96-4909-a60e-c48dc791e7d0
davidepatti/noxim
src/Router.cpp
/* * Noxim - the NoC Simulator * * (C) 2005-2018 by the University of Catania * For the complete list of authors refer to file ../doc/AUTHORS.txt * For the license applied to these sources refer to file ../doc/LICENSE.txt * * This file contains the implementation of the router */ #include "Router.h" inline i...
ALGO
0.992389
3.046647
{ "github_metadata": { "branch": "master", "commit_count": 682, "repo_created_at": "2015-03-23T11:41:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 282, "forks": 139, "issues": 17, "pull_requests": 1 }, "file_meta": { "content_id": "589...
2e235a90-8da0-4f20-9351-4a5dfc783709
theprince29/Leetcode-Solution
0494-target-sum/0494-target-sum.cpp
class Solution { public: int findTargetSumWays(vector<int>& nums, int d) { int ts = 0; for(int i : nums) ts += i; int n = nums.size(); if(ts - d < 0 || (ts - d) % 2 != 0) return 0; int target = (ts - d) / 2; vector<vector<int>> dp(n, vector<int>(target + 1, 0)); v...
ALGO
0.999976
5.740795
{ "github_metadata": { "branch": "main", "commit_count": 480, "repo_created_at": "2023-10-22T10:01: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": "579204e89b...
633cab38-f96f-4f35-8288-aaaf61fe40c3
singhkunal9442/dsa-assigment-
DSA_WT-master/stringFuncs.cpp
// implement string functions using pointers #include <iostream> using namespace std; int strlen(char *s) { int count = 0; for (int i = 0;; i++) if (*(s + i) == '\0') break; else count++; return count; } string substr(char *s, int startIdx, int endIdx) { strin...
TOOL
0.963254
3.75057
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-12-15T19:40: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": "fbe8ea45cf54...
13c0c703-00a4-4143-96a7-545a600dada0
nishiys/CFDbasics
03_heatDiffuion2d/heatdiffusion2d/src/HeatDiffusion2d.cpp
#include "HeatDiffusion2d.hpp" #include <fstream> #include <iostream> #include <vector> namespace heatdiff { HeatDiffusion2d::HeatDiffusion2d() {} HeatDiffusion2d::~HeatDiffusion2d() {} void HeatDiffusion2d::SetMeshConfiguration(std::string meshfilename) { meshfilename_ = meshfilename; } void HeatDiffusion2d::...
ALGO
0.992705
5.645077
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2020-03-31T17:05:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "340f89add...
fe6874d5-4e3c-4053-88a1-2a30746a1145
chunyuema/leetcode
q2462/q2462.cpp
#include <vector> #include <queue> using namespace std; class Solution { public: long long totalCost(vector<int> &costs, int k, int candidates) { priority_queue<int, vector<int>, greater<int>> p1; priority_queue<int, vector<int>, greater<int>> p2; for (int i = 0; i < candidates; i++) ...
ALGO
0.999867
5.893455
{ "github_metadata": { "branch": "main", "commit_count": 696, "repo_created_at": "2023-06-11T16:07:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "690ce1c002...
ebe8b355-6fe9-4ced-abf6-4a1f6436090b
Edith-mounting/Competitive_programming_problems_solution
B_Farewell_Party.cpp
#include <iostream> #include <algorithm> #include <cmath> #include <vector> #include <set> #include <map> using namespace std; #define ff first #define ss second #define int long long #define pb push_back #define mp make_pair #define mt make_...
ALGO
0.999972
3.259628
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-06-25T18:23: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": "d2a1803c3baf...
6b0d9955-b6db-4dc1-9611-acbfed3a39cf
trinhminhtriet/leetcode
solutions/3400-3499/3444.minimum-increments-for-target-multiples-in-an-array/Solution.cpp
class Solution { long long lcm(long long a, long long b) { return a / __gcd(a, b) * b; } public: int minimumIncrements(vector<int> &nums, vector<int> &target) { long long k = target.size(); unordered_map<long long, long long> mpp; for (long long mask = 1; mask < (1 << k); mask++) { ...
ALGO
0.999918
5.471639
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2024-12-09T17:55:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "913b13...
2806706c-6e31-4f41-9368-4d6e4389cb9c
FlyingCheburek/linked-lists-2
src/main/linked_list/singly_linked.hpp
#include <vector> #include <functional> #include <stdexcept> #ifndef SINGLY_LINKED_HPP #define SINGLY_LINKED_HPP template<class T> struct SinglyNode { T data; SinglyNode<T>* next = nullptr; SinglyNode() noexcept { } SinglyNode(const T data, SinglyNode<T>* next = nullptr) noexcept : data(data), next(n...
TOOL
0.996726
6.262535
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2024-11-09T01:55:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6226a72600...
32fdf052-73c0-442c-b371-aa21348b1856
LutzGross/esys-escript.github.io
trilinos_source15/packages/rol/example/PinT/Van_der_Pol/example_01.cpp
// @HEADER // ************************************************************************ // // Rapid Optimization Library (ROL) Package // Copyright (2014) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by or on be...
ALGO
0.946318
5.578976
{ "github_metadata": { "branch": "master", "commit_count": 5724, "repo_created_at": "2020-08-10T02:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 63, "pull_requests": 0 }, "file_meta": { "content_id": "9230...
79b7a5d2-14aa-44e6-8097-ef74acbc8a0a
eXascaleInfolab/CDTool
shared/SharedLibFunctions.cpp
// // Created by zakhar on 01/11/18. // #include <cassert> #include "SharedLibFunctions.h" #include "../Algebra/MissingValueRecovery.h" extern "C" { void centroidDecomposition( double *matrixNative, size_t dimN, size_t dimM, double *loadContainer, double *relContainer ) { centroidDecompositionTr...
ALGO
0.989255
6.369312
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2018-11-19T09:51:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d8c2e8f1b...
51ab168d-61a9-4377-8a8f-4bff17347f01
ddnet/ddnet
src/engine/client/serverbrowser_http.cpp
#include "serverbrowser_http.h" #include <engine/console.h> #include <engine/engine.h> #include <engine/external/json-parser/json.h> #include <engine/serverbrowser.h> #include <engine/shared/http.h> #include <engine/shared/jobs.h> #include <engine/shared/linereader.h> #include <engine/shared/serverinfo.h> #include <en...
WEB
0.982141
6.731031
{ "github_metadata": { "branch": "master", "commit_count": 22506, "repo_created_at": "2014-08-11T00:03:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 687, "forks": 501, "issues": 749, "pull_requests": 101 }, "file_meta": { "content_id": ...
7bc68af5-e277-494d-b90a-d7df3b3896cb
amitazadi/codesignal-codes
Graph/4. Financial Crisis.cpp
// Once upon a time, in a kingdom far, far away, there lived a King Byteasar IV. His kingdom in the middle of // a financial crisis, Byteasar was struggling to keep the economy out of a recession. Unfortunately there was // not much he could do, and after much agonizing he came to the only solution: one of his cities...
ALGO
0.998104
5.033243
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2021-12-28T06:17:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04085fe36...
06ed55a5-6046-4432-89ce-0fce69bfa2ab
Terpodia/Competitive-Programming
Problems Solved/Codeforces/Constructive Algorithms/Funny Game.cpp
#pragma GCC optimize("O3,unroll-loops") #include "bits/stdc++.h" using namespace std; #define fst first #define snd second #define pb push_back #define len(x) (int)x.size() #define all(x) begin(x), end(x) #define fore(i, a, b) for (auto i = a; i < b; i++) #define forn(i, n) fore(i, 0, n) #define dfor(i, n) for (auto ...
ALGO
0.999926
4.167844
{ "github_metadata": { "branch": "main", "commit_count": 170, "repo_created_at": "2021-12-10T22:43: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": "5af8ec12b0...
93aa0e67-ca3b-4c1d-956d-72f344f2e33f
sonitmehr/sde_sheet_grind
4_Sum.cpp
class Solution { public: // Use 2 for loops for first 2 and then 2 Sum + Sort. vector<pair<int,int>> twoSum(vector<int>& v, long long target,int l) { int n = v.size(); vector<pair<int,int>> p; int i =l, r = n-1; while(l < r){ if(v[l] + v[r] == target){ ...
ALGO
0.999971
5.826009
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2023-06-08T09:30:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7878af4eba0...
ff81906e-8c3f-4ea6-8902-fdcdb2609a40
echuu/varbdr
code/cpp_code/test_funcs.cpp
// [[Rcpp::depends(RcppArmadillo, RcppEigen)]] #include <RcppArmadillo.h> #include <RcppEigen.h> #include <Rcpp.h> #include <numeric> using namespace Rcpp; using Eigen::MatrixXd; using Eigen::VectorXd; #define VEC_TYPE VectorXd #define MAT_TYPE MatrixXd #define MAP_MAT Eigen::Map<Eigen::MatrixXd> #define MAP_...
ALGO
0.998264
5.448412
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2018-10-16T13:57: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": "190ff262...
ad48112e-5020-45a7-bc9d-1d2075595f34
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p03288/s289265447.cpp
#include <bits/stdc++.h> using namespace std; #define repr(i,a,b) for (int i=a; i<b; i++) #define rep(i,n) for (int i=0; i< n; i++) template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true;...
ALGO
0.998562
3.973796
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-06-06T16:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "fa0d20280b...
0c235f1b-c21f-441b-b957-697e308513e1
SmallPeanutPark/Softeer
practice/장애물 인식 프로그램.cpp
#include <iostream> #include <algorithm> #include <queue> #include <utility> using namespace std; int board[26][26]; bool visited[26][26]; int dx[4] = {1, 0, -1, 0}; int dy[4] = {0, 1, 0, -1}; int main(int argc, char** argv) { int N; cin >> N; for(int i = 0; i < N; ++i) { fill(visited[i], visited[i] + 26, false)...
ALGO
0.999979
3.810827
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-08-13T15:54: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": "35672c9bbb4c...
d6f7f688-75a1-4b8e-940a-ba4e92a07b4c
Rockstatata/Numerical
Lab 2/bisection.cpp
#include<bits/stdc++.h> using namespace std; #define max_iteration 100 double equation(double x,double y, double z, double i){ return ((i*i*x) + (y*i) + z); } void bisection(double a, double b,double x,double y, double z){ double x0 = (a+b)/2.0; double fx0,fa,xold; int count = 0; while(true){ ...
ALGO
0.999915
3.507975
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-28T08:07: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": "d304aaa990cd...
5b08bc2f-0be5-48b8-8654-248a37162b97
NaSchkafu/cxsc-docker
src/fi_lib/q_log.cpp
/* ** CXSC is a C++ library for eXtended Scientific Computing (V 2.5.4) ** ** Copyright (C) 1990-2000 Institut fuer Angewandte Mathematik, ** Universitaet Karlsruhe, Germany ** (C) 2000-2014 <NAME>/Softwaretechnologie ** Universitaet Wuppertal, Germany *...
ALGO
0.996346
4.938543
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-03-08T19:26: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": "c3edfe171d...
43af7803-384f-49a4-98a6-eeae0a9ad99a
lonelyhentxi/workspace
cpp/cppcia/algorithm/parallel_partial_sum.hpp
#pragma once #include <future> #include <algorithm> #include <vector> #include <numeric> #include "../utility/join_threads.hpp" #include "../utility/barrier.hpp" namespace eevent { using std::promise; using std::future; using std::thread; using std::current_exception; using std::ref; using...
ALGO
0.990748
6.472779
{ "github_metadata": { "branch": "master", "commit_count": 768, "repo_created_at": "2021-04-26T16:22:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a9cac84...