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
e06af744-50c3-4f84-a20b-56fbef87cc0e
Kennylixinran/cs225
POTD/findInbst30/main.cpp
#include <iostream> using namespace std; // Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *right; }; TreeNode* findInBST(TreeNode* root, int val) { // your code here if(root == NULL) return NULL; while(root->val!= val){ if(val < root->val) root...
ALGO
0.99999
5.801624
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-10-26T13:40: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": "627f38413f...
a457dc71-f95b-46cb-854a-c27444d14e3f
gefeng/cp
codeforces/er161div2/A.cpp
#include <iostream> #include <utility> #include <cassert> #include <algorithm> #include <cmath> #include <array> #include <string> #include <vector> void run_case() { int N; std::cin >> N; std::string A, B, C; std::cin >> A >> B >> C; auto is_upper = [](char c) { return c >= 'A' && c <= '...
ALGO
0.999924
5.694989
{ "github_metadata": { "branch": "main", "commit_count": 980, "repo_created_at": "2022-07-19T19: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": "3bcc236d2b...
cbe5ae02-48f2-4594-8872-ed4c3473ffc4
sunny8080/Algorithm
099-Kadanes-Max-SubArray-Sum.cpp
#include<bits/stdc++.h> // #include<ext/pb_ds/assoc_container.hpp> // #include<ext/pb_ds/tree_policy.hpp> using namespace std; // using namespace __gnu_pbds; #define ll long long // #define int long long #define ull unsigned long long #define ff first #define ss ...
ALGO
0.999983
4.642292
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2022-04-09T19:22: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": "eef5c545173...
d31e5fba-6fe6-433e-8496-b1c70e630b8b
tarn1902/AIE-Bootstrap-Projects
Fuzzy Logic/Source/Complex_FuzzyLogic/FuzzyLogicEngine.cpp
/*---------------------------------------- File Name: FuzzyLogicEngine.h Purpose: Runs Fuzzy Logic system Author: <NAME> Modified: 07 June 2020 ------------------------------------------ Copyright 2020 <NAME>. -----------------------------------*/ #include "FuzzyLogicEngine.h" //---------------------------------------...
ALGO
0.991664
5.302045
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-11-22T02:56:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d967b27c4...
8c1f2892-0f17-4ca0-aa32-1f6f316ab4c0
MijaelTola/icpc
TopCoder/TwoRobots.cpp
#include <bits/stdc++.h> using namespace std; class TwoRobots { public: int move(vector <string>); }; int dx[] = {1,-1,0,0}; int dy[] = {0,0,1,-1}; int vis[41][41][41][41]; int TwoRobots::move(vector <string> plan) { memset(vis, -1, sizeof vis); queue<pair<pair<int,int>, pair<int,int> > > q; int a...
ALGO
0.999961
4.101071
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-08-28T22:47:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6776f19c83...
fa332123-c5c3-4f03-b605-5548ad95ac4a
StarPolygen/Code_Library
比赛/2019寒假集训CPP代码/Day5D.cpp
#include<bits/stdc++.h> #include<tr1/unordered_map> #define N 5001000 #define mod 1000000007 #define ll long long using namespace std; template<typename T>inline void read(T &x) { x=0; static int p;p=1; static char c;c=getchar(); while(!isdigit(c)){if(c=='-')p=-1;c=getchar();} while(isdigit(c)) {x=(...
ALGO
0.999908
3.887118
{ "github_metadata": { "branch": "master", "commit_count": 243, "repo_created_at": "2019-04-30T17:38:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f06c4b7...
870ad76e-c2cd-4915-9409-a64b4372c932
mlz000/Algorithms
spoj/1811(LCS).cpp
#include <bits/stdc++.h>//SAM using namespace std; const int N = 250005; int tot, last, step[N << 1], son[N << 1][26], par[N << 1]; char a[N], b[N]; void insert(int x, int l) { int p = last, np = ++tot; step[np] = step[p] + 1, last = np; for (; !son[p][x] && p != -1; p = par[p]) son[p][x] = np; if (p == -1) return;...
ALGO
0.999971
3.975127
{ "github_metadata": { "branch": "master", "commit_count": 110, "repo_created_at": "2017-08-23T03:57:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ce17e893...
641006be-e206-487a-9e61-f7a33892ed90
Sergio471/spoj_problems
COUNT.cpp
#include <iostream> #include <vector> #include <map> #include <unordered_map> #include <list> #include <string> #include <algorithm> #include <chrono> using ull = unsigned long long; static const ull empty = 0; std::vector<std::vector<ull>> mem(5001, std::vector<ull>(5001, empty)); ull ff(ull n, ull k) { if (n =...
ALGO
0.999932
4.045983
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-10-09T21:00:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "db3768ab97...
beaca69e-fccb-4975-8bbd-27d995698380
byte4byte/desmume_arm_jit
arm64_emit.cpp
/* Copyright (C) 2022 <NAME> - https://byte4byte.com Copyright (C) 2022 DeSmuME team This file 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.905996
3.357366
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2022-04-23T19:04: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": "c2de934ea...
7957eecc-189d-4af4-a340-ec1e1002f7bb
volterra-luo/z-afepack
AFEPack/library/mpi/include/MPI_PeriodHandler.h
/** * @file MPI_PeriodHandler.h * @author <NAME> <<EMAIL>> * @date Thu Mar 11 16:02:25 2010 * * @brief 处理周期区域的工具 * * 面对周期区域,我们需要处理的事情包括如下几项: * * 1. 在进行自适应的时候,几何体的匹配方式需要修改,具有周期对应性质的 * 几何体要进行匹配; * * 2. 在进行了负载平衡操作以后,匹配了的几何体因为只存储了一个备份,因 * 此几何体的坐标可能出错,我们需要对其做一个校正; * * 3. 在进行自由度匹配的时候,也要对具有周期对应性质的自由...
TOOL
0.954218
3.744314
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2012-01-04T14:03:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05e815779...
df8599d1-8bae-4c2f-9d86-1750e486d9eb
Imlay16/codetree-TILs
240124/계속 중첩되는 사각형/continuously-overlapping-squares.cpp
#include <iostream> #include <string.h> using namespace std; #define MAX_N 1000 #define OFF_SET 100 #define N 10 int cord[MAX_N + 1][MAX_N + 1]; int x1[N]; int x2[N]; int y1[N]; int y2[N]; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { cin >> x1[i] >> y1[i] >> x2[i] >> y2[i]...
ALGO
0.99954
4.121767
{ "github_metadata": { "branch": "main", "commit_count": 173, "repo_created_at": "2024-01-23T07:11: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": "35ad69902a...
bb504197-1520-4f44-af71-53ff732a6c64
Junhaodada/mopt
src/algo/admm.cpp
#include <iostream> #include "algo/admm.h" #include "utils.h" admm::admm(float64 tau, float64 gamma, float64 epsilon, int64 maxIter, int64 logInter) : tau(tau), gamma(gamma), epsilon(epsilon), ...
ALGO
0.999858
4.988285
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-05-05T05:48:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57fc20ac6996...
edf3d385-f56f-43b7-b0a2-c7b24f8e43bd
parallelcodefoundry/ParEval
drivers/cpp/benchmarks/transform/58_transform_squaring/kokkos.cc
// Driver for 55_transform_squaring // /* Replace every element of x with the square of its value. // Use Kokkos to compute in parallel. Assume Kokkos has already been initialized. // Example: // // input: [5, 1, 2, -4, 8] // output: [25, 1, 4, 16, 64] // */ // void squareEach(Kokkos::View<int*> &x) { #in...
TEST
0.99612
5.887659
{ "github_metadata": { "branch": "develop", "commit_count": 41, "repo_created_at": "2023-10-06T17:25:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 35, "forks": 10, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "c9f9518...
62bcac79-0330-49e2-bdab-0636dffd13c8
Wild-Donkey/Code
Luogu/P1300-P1499/P1447_Power_Collecting.cpp
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <unordered_map> #include <vector> #define Wild_Donkey 0 using namespace std; inline unsigned RD()...
ALGO
0.999997
3.92295
{ "github_metadata": { "branch": "main", "commit_count": 182, "repo_created_at": "2021-02-23T08:38:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff8e3a708d...
3d6aea5a-3244-4a36-b3c7-7d1acfd7645a
RicardoHPReis/Listas-Estrutura-de-Dados-2
Lista 7 - Grafos/main.cpp
#include "grafoAdj.hpp" #include "grafoMat.hpp" int main() { int vertices_A = 6; int vertices_M = 6; GrafoAdjacente* grafo_Adj = criar_grafo_adjacente(vertices_A); GrafoMatriz* grafo_Mat = criar_grafo_matriz(vertices_M); //Exercício 1 printf("\nGrafos Matriz:\n"); adicionar_aresta_grafo_matriz (grafo_Mat, 0...
ALGO
0.955372
4.170177
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-03-07T21:48: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": "9a0ed2d9193...
ed5c8d46-2ba4-47d0-9bce-82a9f7400d51
seiber/SortingAlgoComparisons
finalprojectedit/Source.cpp
#include <iostream> #include <fstream> #include <time.h> #include <algorithm> #include <vector> #include<string> using namespace std; class Sort { public: const int ar_size = 1000000; int *dataSet = new int[ar_size]; int size() { int size = 0; while (dataSet[size] > 0) size++; return size; } void ins...
ALGO
0.999318
3.85855
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-05-11T23:59: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": "182cb78402...
59f8ac13-c824-4257-8e3c-1ae3aa103f59
vomar3/ilya_labs
laba5/task6/task6.cpp
#include <iostream> #include <cmath> #include <vector> #include <iterator> #include <initializer_list> class vector final { private: double *arr; int capacity, size; void resize(int newcapacity) { double *resize; resize = new double[newcapacity]; auto count = std::min(size, newcapa...
TOOL
0.961411
5.303583
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2024-09-14T11:17:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8850ed9e3...
20cceaf3-d421-4bd1-9e97-72ba1e5cd602
HusseinYoussef/Interview-Preparation
leetcode/Hard/Wildcard Matching.cpp
#include <iostream> #include <cstring> using namespace std; int dp[2002][2002]; // Top-Down TLE int solve(string &s, string &p, int sidx, int pidx) { if(sidx == s.size() && pidx == p.size()) return 1; if(pidx == p.size()) return 0; int &ret = dp[sidx][pidx]; if(~ret) retu...
ALGO
0.999975
3.991743
{ "github_metadata": { "branch": "master", "commit_count": 914, "repo_created_at": "2021-11-06T22:07: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": "01333245...
4f273feb-b024-4228-91ba-96ce05fa2a14
wt-l00/atcoder
ABC077/abc077c.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; const ll inf = 1LL<<60; const double eps = 1e-9; typedef pair<ll, ll> P; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b)...
ALGO
0.999956
3.970306
{ "github_metadata": { "branch": "master", "commit_count": 248, "repo_created_at": "2019-03-29T13:18:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "17da2573...
b45c12b4-29f5-4592-a7ef-22f9f08b0f61
RenchuSong/leetcode
Multiply Strings/Multiply Strings/main.cpp
// // main.cpp // Multiply Strings // // Created by <NAME> on 14/7/14. // Copyright (c) 2014 <NAME>. All rights reserved. // #include <iostream> using namespace std; class Solution { public: string multiply(string num1, string num2) { int n = (int)num1.length(), m = (int)num2.length(); int a[n + 1]...
ALGO
0.999901
5.889175
{ "github_metadata": { "branch": "master", "commit_count": 155, "repo_created_at": "2014-07-03T00:53:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "98a17a00...
4153686b-ff54-49b9-a369-aeea4b621820
alexandraback/datacollection
solutions_2453486_0/C++/Takuma/A.cpp
// a.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include <iostream> #include <cstdio> using namespace std; const int n=4; char s[n+2][n+2]; bool empty; void init(){ int i, j; empty = false; for ( i = 1; i <= n; i ++ ){ for ( j = 1; j <= n; j ++ ){ scanf( "%c", &s[i][j] ); if ( s[i][j] == '.' ) empty...
ALGO
0.999856
3.899261
{ "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": "07b979d0b...
43dceb94-2a8c-47d9-9648-b659ebb24272
Seeneed/OAIP_1sem
lab9/zad3/zad3.cpp
#include <iostream>//подключение библиотеки using namespace std;//чтобы не писать каждый раз std //объявление функции func(x), которая представляет уравнение для поиска корня double func(double x) { return pow(x, 3) + x - 3; }//уравнение, для которого ищется корень int main() { setlocale(LC_ALL, "RU");//подключаем к...
ALGO
0.999936
4.403121
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-02-08T17:51: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": "017e8fa2ca85...
129b1eeb-5181-4feb-a52a-538f8e6fbeaf
PrennerProducts/Algorithmen_und_Datenstrukturenn
Exercise5/Exercise_Sheet_5_2/backpack.cpp
#include "backpack.h" /* Optimized insertion sort algorithm utilizing the Item's getRatio() function */ void Backpack::sortAvailableItems() { int i = 0; while(i<(int)this->availableItems.size()) { Item x = this->availableItems[i]; int j = i-1; while(j >= 0 && this->availableItems[j].get...
ALGO
0.999857
5.201396
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-05-24T03:18:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "95a53fa0b1e...
94d8030b-d70b-4ba5-9aa6-b9ba6dae3852
broomrun/LAB-AP-5
Pertemuan2_operator/Tugas/tugas1.cpp
#include <iostream> using namespace std; int main(){ system("CLS"); int I = 2, K = 7, L = 1, C = 9, U = 5, S = 6, d; bool a,b,c; /* a. 3 - 1 < I OR K - 5 < 8 + 2 AND L +7 >= 9 + 3 a. (2<2) or (2 < 10) and (8 >= 12) false or (true and false) false or false false */ ...
ALGO
0.927552
3.300448
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-03-07T13:33: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": "415a8826068...
2cb84b93-c6cc-4a88-93c3-9f746c1c1547
rol2005hun/DE-IK
1. félév/diszmat/pp2.cpp
// Online C++ compiler to run C++ program online #include <iostream> using namespace std; int lnko(int a, int b) { // ez az euklédiszi algoritmus, amely a legnagyobb közös osztót keresi if(b == 0) { return a; } else { return lnko(b, a % b); } } int x, k= 0; int main() { int c = 0; ...
ALGO
0.999138
3.601549
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2023-09-21T08:59:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fc0cfacc83...
d99e42ae-8e55-4fa4-999a-b92ffb806e84
nerdesign/Draft
parser.cpp
/* * Copyright (C) <NAME>, 2020 * * Do not share this file with anyone * * Do not post this file or derivatives of * of this file online * */ // Name: <NAME> // ID: 1226405754 // Course: CSE 340 #include <iostream> #include <cstdlib> #include "parser.h" using namespace std; // this syntax error function need...
ALGO
0.96767
5.585418
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-02-13T03:51: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": "7cab7c473bd5...
faa7fc48-eff2-4f88-a932-e471c3fdff38
svistok04/college-CS
semester-3/Algorithms 2/Binary_Heap/main.cpp
//ALGO2 IS1 223A LAB05 //<NAME> //<EMAIL> #include <iostream> #include <sstream> #include <random> #include "DynamicArray.hpp" template<typename T> class BinaryHeap { DynamicArray<T>* da; int mode; public: explicit BinaryHeap(int _mode) : da(new DynamicArray<T>()), mode(_mode) {} ...
ALGO
0.997054
4.412539
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2023-03-28T20: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": "01d6557d...
3dc326b2-75ef-4d3f-8402-e7383699f286
kent-200/RSP
LinkedList.h
#include <iostream> #include <string> #include <vector> class LinkedList { private: class Node { public: int value; Node * next; Node(int value){ this->value = value; this->next = nullptr; } }; Node * head; Node * tail; // store last node...
ALGO
0.999429
4.956616
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-11-30T04:54:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "814ee789655d...
0799c6a6-fa58-481e-b6cc-44797ba443a5
dev-morsalin-islam/Leetcode
stack_implement_from_queue.cpp
//program to implement stack from queue //problem link: https://leetcode.com/problems/implement-stack-using-queues class MyStack { public: MyStack() { } queue<int>myQ; queue<int>duplicate; int tp; int last,size=0; void push(int x) { myQ.push(x); tp=x; size++...
ALGO
0.998794
5.388384
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2023-07-11T06:38:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0fd868fbe82...
8961e313-7b78-4e49-bab7-131cd70b843a
tbharathchandra/LawnBot
build/cgal_catkin/cgal-prefix/src/cgal/Nef_3/archive/Minkowski/include/CGAL/Nef_S2/gaussian_map_to_polyhedron_3.h
#include <CGAL/Modifier_base.h> #include <CGAL/Polyhedron_incremental_builder_3.h> template <class Kernel, class HDS> class gausian_map_to_polyhedron_3 : public CGAL::Modifier_base<HDS> { typedef CGAL::Gausian_map<Kernel> Gausian_map; typedef typename Gausian_map::SFace_const_iterator SFace_const_iterator; type...
ALGO
0.973634
5.716552
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-05-07T16:00:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "99e225a131...
d41248cb-f126-4efd-be57-3d83c404fe25
JialongShi/pplsd_mubqp_sequential
problem.cpp
#include "problem.h" using namespace std; bool problem::readProblem(const char* filename) { problemName = filename; FILE *fp = fopen(filename, "r"); if (fp == NULL) return false; char key[256]; if (fscanf(fp, "%s", &key) != 1) { fclose(fp); return false; } while (strlen(key)>1 || strncmp(key, "p", 1)...
ALGO
0.97339
3.756656
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-08-11T02:57: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": "e7ed9286e79...
82139dbb-5eeb-4bdf-81b6-4df645a68dd0
liangzhenduo/ACM
TOJ/1002.Maya Calendar.cpp
#include <iostream> #include <cstring> using namespace std; int main() { int day=0,month=0,year=0,days=0; int T,D,Y; string haabDay,haabMonth,tzolkinDay; int n; cin >>n; cout <<n<<endl; for(int i=0;i<n;i++) { cin >>haabDay; if(haabDay=="0.") day=0; els...
ALGO
0.995572
3.302672
{ "github_metadata": { "branch": "master", "commit_count": 174, "repo_created_at": "2015-05-15T14:10:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc5e5170...
30f2e7ed-dafb-4f57-8412-9a373709e9b2
arpitjp/temp
Inorder Tree Traversal without recursion and without stack!.cpp
#include<bits/stdc++.h> using namespace std; #define null NULL class node { public: int data; node *left; node *right; }; node *makenode(int val) { node *n = new node(); n->data = val; n->left = NULL; n->right = NULL; return n; } void morris(node* root) { node *temp;...
ALGO
0.999994
4.854458
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2020-03-18T11:44: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": "6d71c65b1...
5523954c-d76b-411b-923a-bf9624656bc6
markirch/sat-modulo-symmetries
src/graphPropagators/subgraphIsomorphism.cpp
#include "subgraphIsomorphism.hpp" #include <math.h> // currently only if target is also fully defined and non-induced std::pair<cnf_t, vector<vector<int>>> createEncoding(const adjacency_matrix_t &pattern, const int nt) { // target will be given as assumptions int np = (int)pattern.size(); int varCount ...
ALGO
0.991085
4.958436
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2023-05-17T08:17:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 4, "issues": 20, "pull_requests": 0 }, "file_meta": { "content_id": "e5e878dd9b...
4e7cd10c-1ca7-4e68-b78b-5789a26e2544
zhanglidada/code
cpp/addBinary.cpp
#include <algorithm> #include <iostream> #include <vector> using namespace std; /* // 采用模拟的方法 class Solution { public: string addBinary(string a, string b) { string ans; reverse(a.begin(), a.end()); reverse(b.begin(), b.end()); int carry = 0; int maxSize = max(a.size(), b.size()); for (int i...
ALGO
0.999986
5.242214
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2021-08-06T01:12: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": "b84971753...
1bb33e1d-569c-4e88-96e9-82857ee910a6
eyasir329/CP_Archive
09_number_theory/3_modular_arithmetic/3_binaryExpo_mulmod_aLike/codechef_JAN221B_RIFFLES_Chef and Riffles.cpp
#include <iostream> #include <vector> using namespace std; // solution 1 -> got TLE // Function to perform one riffle shuffle vector<int> riffleShuffle(const vector<int>& perm) { int N = perm.size(); vector<int> shuffled(N); for (int i = 0; i < N / 2; ++i) { shuffled[i] = perm[2 * i]; // Odd in...
ALGO
0.999993
5.676232
{ "github_metadata": { "branch": "main", "commit_count": 97, "repo_created_at": "2023-09-06T01:32:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00e3dc6e332...
d2a90d04-96e9-4147-af8e-39da92424a22
karaketir16/competitive
karaketir16/HackerRank/inzva 04 Graph-1 Onsite 2018/Yasin'in Arkadaşları Gülçin Nurçin ve Yalçın.cpp
#include <bits/stdc++.h> #define pb push_back #define fi first #define sc second #define inf 1000000000000000LL #define MP make_pair #define min3(a,b,c) min(a,min(b,c)) #define max3(a,b,c) max(a,max(b,c)) #define dbg(x) cerr<<#x<<":"<<x<<endl #define N 100005 #define MOD 1000000007 #define orta ((a+b)/2) using names...
ALGO
0.999931
3.522812
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2018-07-02T05:57: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": "73f8fd93...
a85e51e8-cc13-42dc-a041-6e460da3eef5
koth/elements-of-programming-interviews
Merge_two_BSTs.cpp
// Copyright (c) 2013 Elements of Programming Interviews. All rights reserved. #include <cassert> #include <iostream> #include <limits> #include <memory> #include "./BST_prototype_shared_ptr.h" using std::cout; using std::endl; using std::make_shared; using std::numeric_limits; using std::shared_ptr; shared_ptr<BST...
ALGO
0.999854
6.312816
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2016-03-30T01:43:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 14, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "f53feac...
5aaa9dda-354c-4355-9d6d-7dfe581af2a2
BinomialSheep/CompetitiveC--
SandBox/codejam2022/Rd1B/ ControlledInflation2.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; //#include <atcoder/all> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define MAX 10000 #define INFTY (1 << 29) // 浮動小数点の誤差を考慮した等式 #define EPS (1e-10) #define equal(a, b) (fabs((a) - (b)) < EPS) ll llMax(ll x, ll y) { return (x >= y) ? x : y; }...
ALGO
0.999875
3.705432
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2023-12-12T17:45: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": "228777ca4...
338214e7-70c4-459a-97a9-d0217f718814
myurtoglu/cudaforengineers
sharpen_npp/main.cpp
#define cimg_display 0 #include "CImg.h" #include <cuda_runtime.h> #include <npp.h> #include <stdlib.h> #define kNumCh 3 void sharpenNPP(Npp8u *arr, int w, int h) { Npp8u *d_in = 0, *d_out = 0; Npp32f *d_filter = 0; const Npp32f filter[9] = {-1.0, -1.0, -1.0, -1.0, 9.0, -1.0, ...
ALGO
0.984869
5.606593
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2015-10-20T20:22:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 131, "forks": 74, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "696042...
2799421b-2e65-4378-a484-87d4215070f8
Surfacerobot/crs_application_sizen
src/trajopt_ros/trajopt_ifopt/src/inverse_kinematics_constraint.cpp
/** * @file inverse_kinematics_constraint.cpp * @brief The cartesian position constraint * * @author <NAME> * @date May 18, 2020 * @version TODO * @bug No known bugs * * @copyright Copyright (c) 2020, Southwest Research Institute * * @par License * Software License Agreement (Apache License) * @par * Lice...
ALGO
0.933396
7.107611
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2021-10-12T07:03:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29a4154c3e...
adb7391a-5311-46e2-a6dd-26d404ffa087
ogulcan0/Numerical-Computing-CPP
matrix_inverse.cpp
#include<iostream> #include<iomanip> #include<math.h> #include<stdlib.h> #define SIZE 10 using namespace std; int main() { float a[SIZE][SIZE], x[SIZE], ratio,res[SIZE][SIZE],inv[SIZE][SIZE],b[SIZE][SIZE]; int i,j,k,n; cout<< setprecision(3)<< fixed; cout<<"Enter order of matrix: "; cin>>n; c...
ALGO
0.999606
3.139961
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2022-12-01T17:33: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": "e016b2fd1b8...
cc66c9b9-2215-4d5b-9c96-e9053b3360b3
hrydgard/ppsspp
UI/RetroAchievementScreens.cpp
#include "Common/System/OSD.h" #include "Common/System/Request.h" #include "Common/UI/View.h" #include "Common/UI/ViewGroup.h" #include "Common/UI/Context.h" #include "Common/Data/Text/I18n.h" #include "Common/UI/IconCache.h" #include "Common/StringUtils.h" #include "Core/Config.h" #include "Core/RetroAchievements.h" ...
TOOL
0.949958
5.471028
{ "github_metadata": { "branch": "master", "commit_count": 43652, "repo_created_at": "2012-11-01T08:41:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12551, "forks": 2311, "issues": 1275, "pull_requests": 37 }, "file_meta": { "content_i...
7b8ae632-540a-4ae9-bfb1-19570b0e6898
pafabri/DijkstraMeetsUndirectedGraphs
ShortestPath.h
// // Created by peterfab on 7/28/20. // #ifndef ADJLISTSEX_SHORTESTPATH_H #define ADJLISTSEX_SHORTESTPATH_H #include "UndirectedGraph.h" #include "NodeMinCost.h" #include <tuple> #include <utility> // if you're curious, https://en.cppreference.com/w/cpp/utility/pair/pair using namespace std; /* vertices(List): list ...
ALGO
0.99943
5.735384
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-08-04T04:31: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": "37ceb65d3b...
0a548545-8e61-43a9-9124-491b7808213f
lballabio/QuantLib
ql/time/daycounters/business252.hpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2006 <NAME> Copyright (C) 2011 StatPro Italia srl This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free softwar...
ALGO
0.960337
7.173669
{ "github_metadata": { "branch": "master", "commit_count": 17543, "repo_created_at": "2015-12-17T16:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6151, "forks": 1964, "issues": 51, "pull_requests": 11 }, "file_meta": { "content_id":...
449d94b2-3958-4500-8301-669bd0633749
intel/libxcam
xcore/vec_mat.h
/* * vec_mat.h - vector and matrix defination & calculation * * Copyright (c) 2017 Intel Corporation * * 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/l...
TOOL
0.984815
6.034125
{ "github_metadata": { "branch": "master", "commit_count": 1242, "repo_created_at": "2015-01-15T07:37:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 601, "forks": 234, "issues": 14, "pull_requests": 1 }, "file_meta": { "content_id": "d96...
b07f59f7-c6f0-44d4-8fb4-cf729c836fae
griglb/euler
ProjectEuler0700/ProjectEuler0700.cpp
// <NAME> was born on 15 April 1707. // // Consider the sequence 1504170715041707n mod 4503599627370517. // // An element of this sequence is defined to be an Eulercoin if it is strictly // smaller than all previously found Eulercoins. // // For example, the first term is 1504170715041707 which is the first Eulercoin. ...
ALGO
0.999533
5.528299
{ "github_metadata": { "branch": "main", "commit_count": 255, "repo_created_at": "2022-12-15T16:02:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b2402715c...
08144f13-868f-46d8-b50a-1513b873e74a
ElvaYe/Tracking-Error-and-Portfolio-Optimization
weight.cpp
/* Consider n risky assets, use Markoviz mean - variance to calculate global minimum portfolio weight for the benchmark. Instead of minimizing portfolio variance, find optimial weight for the portfolio return minus the weighted benchmark return to minimize tracking error. */ #pragma warning(disable: 4819) #include <ql...
ALGO
0.999863
4.733065
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-07-31T15:15: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": "f2d038bed6...
7e9c2954-4e6f-4769-bd9f-6f3687536377
EliorDechter/software_renderer
handmade_601/code/handmade_png.cpp
/* ======================================================================== $File: $ $Date: $ $Revision: $ $Creator: <NAME> $ $Notice: (C) Copyright 2015 by Molly Rocket, Inc. All Rights Reserved. $ ======================================================================== */ global u32 GlobalCRCTable[...
TOOL
0.998947
5.707598
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2020-10-07T13:08: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": "44dbe59c4b8...
fc63a6ad-fceb-4ff1-8a0b-c312ab4e1a71
Kamini8707/OOPs-Projects
TicTacToe/TicTacToe.cpp
#include <iostream> #include <vector> #include <string> #include <sstream> using namespace std; class Board { public: int size; vector<vector<char>> matrix; Board(int size, char defaultSymbol) : size(size), matrix(size, vector<char>(size, defaultSymbol)) {} void setDefaultSymbol(char symbol) { ...
ALGO
0.974141
5.815432
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-07-09T07:56: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": "bbd7c13a8cf6...
d5447388-a7e5-430c-9873-84009832fe13
ishandutta2007/codeforces-t
tdpencil/normal/1443/D.cpp
//Solution By SlavicG #include "bits/stdc++.h" using namespace std; #define ll long long #define forn(i,n) for(int i=0;i<n;i++) #define all(v) v.begin(), v.end() #define rall(v) v.rbegin(),v.rend() #define pb ...
ALGO
0.99969
4.642978
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "f4264fd8cd64...
3b20ddac-620e-40f9-ad35-2f27215b7840
Nabzs/S2_Prog
TDS/src/TD5/main.cpp
#include <iostream> #include <unordered_map> #include <iomanip> #include <vector> #include <cstdlib> #include <ctime> #include <functional> #include "hache.hpp" int main() { // Exercice 1 std::cout << "Exercice 1" << std::endl; std::string test_string = "Bonjour"; size_t max = 1024; // Test de fol...
ALGO
0.930946
5.071427
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2025-03-19T10:57:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9953f502eb6...
45caca37-4475-4543-b47a-9f92efd84043
lisallah20/gr-cemmse
lib/demod_refsignals_impl.cc
/* -*- c++ -*- */ /* * Copyright 2024 Lisallah. * * SPDX-License-Identifier: GPL-3.0-or-later */ #include "demod_refsignals_impl.h" #include <gnuradio/io_signature.h> namespace gr { namespace cemmse { // #pragma message("set the following appropriately and remove this warning") // using input_type = float; // #p...
ALGO
0.968947
6.970672
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-06-19T06:00: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": "6155237d42...
dd9d6603-fe20-4901-bb14-1e66831758e4
mindspore-ai/mindspore
mindspore/ccsrc/plugin/device/ascend/kernel/aicpu/aicpu_ops/cpu_kernel/ms_kernel/index_put.h
/** * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved. * * 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 * * U...
ALGO
0.961531
6.66094
{ "github_metadata": { "branch": "master", "commit_count": 83896, "repo_created_at": "2020-02-11T08:43:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4559, "forks": 740, "issues": 181, "pull_requests": 20 }, "file_meta": { "content_id": ...
78f7b796-0660-489e-bd99-163f93d7ffac
WilliamZhaoz/leetcode
C++/21.merge-two-sorted-lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: /* ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) { ListNode *dummy = new ListNode(0); ListNode *tmp = dumm...
ALGO
0.999986
6.044158
{ "github_metadata": { "branch": "master", "commit_count": 154, "repo_created_at": "2018-03-06T03:27:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "41f52058...
9fa6ecae-d5c9-44ad-a17a-b7741ab1df3f
Jeirs/DeAnzaCIS22A
inventoryproble.cpp
/*Using the products.txt file, write a function to input the info into parallel arrays. Output the entire inventory to the screen. · Add to this program a selection sort to output the products from the lowest to the highest. Output the result from main(). · Add a function that will output the quantity on hand and the...
TOOL
0.998716
4.603685
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-12-05T02:51: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": "bf223c823c36...
057c385b-6e47-419e-83a3-b9fe21816ea6
noah-ftnx/rpl
dcp/051/064_.cpp
#include <vector> #include <utility> #include <algorithm> using namespace std; void solve(vector<vector<int>>& grid, int& visit_num, int& cnt,int row, int col) { const int N = (int) grid.size(); auto is_pos_valid = [&] (int i, int j) { return (i>=0 && i<N) && (j>=0 && j<N); }; auto get_valid_m...
ALGO
0.999959
5.438591
{ "github_metadata": { "branch": "main", "commit_count": 459, "repo_created_at": "2021-12-12T21:22: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": "c0b424c10d...
be39f08f-61be-4c8d-bde4-589603ff8404
prajwal1721/Competitve-Programming
SJ/SOLDIER.cpp
#include<bits/stdc++.h> using namespace std; #define mod 1000000007 #define gcd(a,b) __gcd(a,b) #define lcm(a,b) (a*b)/gcd(a,b) #define bits(x) __builtin_popcountll(x) typedef long long int ll; int dp[7][1005]; int p[7][103], q[7][103], n[7]; int main(){ int N, t; cin >> N >> t; for(int i=0;i<7;++i){ ...
ALGO
0.999966
4.032422
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2019-12-12T07:51: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": "39ad0f30...
0e72d504-7a21-4d60-af24-f36879795f1d
mtsveta/cpp-courses
LeetCode/ZigZagConversion.cpp
// // Created by <NAME> on 03/09/2017. // // // Created by <NAME> on 03/09/2017. // #include<list> #include<map> #include<vector> #include<iostream> using namespace std; class ZigZagConversion{ vector<int> v1, v2; public: void print_zigzag(string& str, int len_num, map<pair<int, int>, int> mult, int last_...
ALGO
0.999965
5.044993
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-07-25T13:09:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94b45eb7b5...
c62b8ec8-dc5c-4249-864c-3aa08a7d7a95
camclean/ZprimeCombo13TeV
theta/interface/asimov-utils.hpp
#ifndef ASIMOV_UTILS_HPP #define ASIMOV_UTILS_HPP #include "interface/decls.hpp" #include "interface/data.hpp" #include "interface/phys.hpp" #include <boost/shared_ptr.hpp> namespace theta{ /** \brief The negative log-likelihood function for Asimov data */ class asimov_data_nll: public Function{ public: ...
ALGO
0.990443
7.17289
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2016-06-27T12:03:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 5, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "917d68180...
df6c7d11-6463-4188-9d21-30b8d0bc7c88
efeslab/ada-portathon
CortexSuite/vision/common/toolbox/lagrcv/calcTextureMex.cc
/* compile with rm liblagrcv.a gcc -c lagrcv.cpp ar rc liblagrcv.a lagrcv.o ranlib liblagrcv.a mex7 calcTextureMex.cc -L/home/ikkjin/LagrMatlab/opencv/matlab -llagrcv -I/home/ikkjin/LagrMatlab/opencv/matlab/ */ #include "mex.h" #include "lagrcv.h" #include <stdio.h> #include <math.h> // TODO: add number of corners ...
ALGO
0.986055
5.88114
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2018-03-01T20:36:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 3, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "0947ca3107...
f64a98ac-3542-4964-8b34-e5843f85fc14
wdjpng/soi
Camp/Binary Search/Drying/main.cpp
#include <bits/stdc++.h> #define int long long using namespace std; int n, r; bool canDo(vector<vector<int>> &v, int curTime, bool shouldPrint) { int timeGone = 0; string output; for (int i = 0; i < v.size(); ++i) { int timeToDry = max((int) ceil((v[i][1] - v[i][0]) / (r - 1.0)), (int) 0); ...
ALGO
0.999961
4.045826
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2019-02-17T10:35: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": "24c5ca50c...
be4b9b9e-e015-4354-8261-72669ece829b
kluka029/1D-Schroedinger
GeneticArray.hpp
#include <iostream> #include <stdlib.h> #include <cmath> #include "NeuralNetwork.hpp" using namespace std; #ifndef GENETICARRAY_H #define GENETICARRAY_H class GeneticArray{ public: //constructor initializes binary array randomly, calculates double array GeneticArray(); //construct...
ALGO
0.992597
4.305706
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-03-09T17:58:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "41fbd523f5fe...
7ecc867e-125f-49eb-b41e-366dcf98c97d
miguelbeltran/reconocimiento-facial-opencv
reconocer.cpp
#include "opencv2/contrib/contrib.hpp" #include "opencv2/objdetect/objdetect.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <iterator> #include <stdio.h> using namespace std; using namespace cv; /* Detección y recorte de una cara humana. Recibe una im...
ALGO
0.954914
4.565817
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-04-21T02:35:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d993ff1d9e...
8ad19b42-1dbb-489a-9b11-3157bcee96a8
Piyushdana/C-
practice/ReverseAnArray.cpp
#include <iostream> #include <bits/stdc++.h> #include <algorithm> using namespace std; // reversing an array using different Methods // bool func(int i , string &s){ // if(i >=s.size()/2) return true; // if(s[i] != s[s.size()-i-1]) return false; // return func(i+1,s); // } // int main(){ // string...
ALGO
0.999982
4.465395
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-27T11:31:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1e489f89028...
3d78e2a0-3704-4c69-97cd-7edac9ca881c
sammkkit/codeforces_practice
B_Collecting_Game.cpp
#include <bits/stdc++.h> #include <math.h> #define fastio() ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) #define f(i, x, y) for(ll i = x; i < y; i++) #define rf(i, x, y) for(ll i = x; i > y; i--) #define enl "\n" #define YES cout << "YES" << enl #define NO cout << "NO" << enl #define pb push_back #defi...
ALGO
0.999968
3.783532
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-01-07T15:45: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": "122f474f1d7...
8d77cdec-445e-4fce-9758-07537692afbe
binhvu2005/Csession-15
bai4ss15.cpp
#include <stdio.h> #include <string.h> struct Book { int id; char bookName[20]; char authorName[50]; int price; char bookCategory[50]; }; typedef struct Book bk; void input(bk *a) { printf("nhap ma sach:"); scanf("%d", &a->id); printf("nhap ten sach:"); getchar(); gets(a->bookNam...
TOOL
0.99798
3.294563
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-12-04T07:24: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": "2ffcb65d3530...
26b36786-9e89-40d6-acd9-58b4ae2a9e80
Taku78U/contests
abc/167/c.cpp
#include <bits/stdc++.h> using namespace std; int n, m; int x; int cnt = 0; int ans = INT_MAX; vector <int> c; vector <vector<int> > a; int mymin(int k, int l){ return (k < l) ? k : l; } // pnt: ポイント // num:番号 bool pos = false; void dfs(vector<int> pnt, int num, int sum){ cout << "num " << num << " sum " << s...
ALGO
0.99995
3.543798
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2017-05-15T12:34:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "843a77121...
46e98540-9c26-45f0-863c-4d43581d86ec
zzhawk/rrt_r
include/rrt_base.hpp
// Copyright 2023 watson.wang // https://github.com/zzhawk #ifndef RRT_BASE_HPP_ #define RRT_BASE_HPP_ #include <memory> #include <vector> #include <random> struct pos { double x; double y; }; struct area { pos min; pos max; }; struct obstacle { pos p; double radius; }; struct node; using nodeSharedPtr = st...
ALGO
0.996058
6.537643
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-10-05T01:35:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "39f3f79da1d3...
b0541474-b1d9-4440-9263-135e3cf9c9f3
toufique-imam/SOLVED-PROBLEMS
UVA/UVA 11888.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>; template <typename T> using ordered_set_rev = tre...
ALGO
0.999942
4.219803
{ "github_metadata": { "branch": "master", "commit_count": 286, "repo_created_at": "2017-10-28T13:52:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48fadbd8...
ad762448-c681-4e1c-979f-f2aeef822307
feranco/coding-challenges
search/integer_square_root/integer_square_root.cpp
//algorithm to compute the largest integer whose square is less than //or equal to a given integer k //assumptions: //1) use of sqrt is not allowed //O(log(n)) time O(1)space #include <iostream> long squareRoot (long k) { int l = 0, r = k, res = 0; //saving the result in res is not necessary because if m is the s...
ALGO
0.999697
4.158279
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2017-04-16T21:39:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "553837bb...
63f3d924-12fe-40c2-aad7-a74be9f5a976
136155330/my_acwing
AcWing107超快速排序.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <queue> using namespace std; /** 逆序对的定义: 对于一个序列a,若 i < j 且 a[i] > a[j], 则称a[i] 与 a[j]构成逆序对 先科普下归并排序求逆序对 归并排序可以在O(nlogn)的时间复杂度 里面求出数组的逆序对 归并排序是每次把序列进行二分 递归左右两半排序,然后合并两个有序序列 那么在进行归并排序的时候考虑 把左右两边各自内部的逆序对数作为子问题...
ALGO
0.999806
3.758442
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-07-17T02:58: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": "f202386448...
0c9cc04e-b993-46ea-8ce9-704e8e097b1e
ShaileshIshere/Graphs
graphs_class_4.cpp
#include<bits/stdc++.h> using namespace std; class Graph{ unordered_map<int, list<pair<int, int> > > adjList; bool vis; void print() { for(auto i : adjList) { cout << i.first << " -> [ "; for(auto j : i.second) cout << "[ " << j.first << ", " << j.second <...
ALGO
0.999951
4.887524
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-03-15T09:36:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75bdb104f7e2...
2b610cf1-bb76-48ec-9b09-d2ab96c8f086
joshivaibhavii/Technical-Training
exp3.cpp
#include <iostream> #include <vector> #include <algorithm> #include <numeric> using namespace std; int equalStacks(vector<int>& h1, vector<int>& h2, vector<int>& h3) { // Reverse the stacks to simplify popping from the top reverse(h1.begin(), h1.end()); reverse(h2.begin(), h2.end()); reverse(h3.begin(...
ALGO
0.999977
5.769051
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-02-29T09:26:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "36a8295a5fe3...
411fd3b9-f2a2-4af3-b80e-7d6f640daea9
KhosrovOzbalik/SchoolProjects
BBM203/Assignment2/src/DoubleDynamicLinkedList.cpp
#include "DoubleDynamicLinkedList.h" using namespace std; DoubleDynamicLinkedList::~DoubleDynamicLinkedList() { Node* temp = head; if (isEmpty()) {} else { while (temp->next != nullptr) { temp = temp->next; delete temp->prev->data; delete temp->prev; } ...
TOOL
0.945122
3.611546
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2022-03-19T14:21: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": "92de2b6927a...
fc2eb9b2-414f-4de1-b811-9ca917dc5d06
erikcrossdev/C-HowToProgramStudy
5thEdition/Chapter7/c6-ex7.10/main.cpp
#include <iostream> using std::cout; using std::endl; using std::cin; void showTabularStars(int [], int, int, int ); int main() { const int arrayRanges = 9; const int initRange = 200; const int incRange = 99; const int employees = 13; //int salariesAndCommissions[employees] = { 300, 500, 900, 700, 233, 580, 1000...
ALGO
0.994804
4.680236
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2024-09-04T13:39: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": "52ca31fc59a...
92d24f01-43a7-472c-83be-49f407bbe139
j0sht/csci160
c-programming/primer/c06/exercises/e12.cpp
/* * Consider these two infinite series: * * 1.0 + 1.0/2.0 + 1.0/3.0 + 1.0/4.0 + ... * 1.0 - 1.0/2.0 + 1.0/3.0 - 1.0/4.0 + ... * * Write a program that evaluates running totals of these two series up * to some limit number of terms. * * Hint: -1 times itself an odd number of times is -1, and -1 times itself...
ALGO
0.999015
4.007658
{ "github_metadata": { "branch": "master", "commit_count": 125, "repo_created_at": "2017-09-18T05:20:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73970064...
e67b7189-9497-4575-9e39-50136cf813ab
rkb0019/MS-FLUKSS-multifluid
MHDAM-3.2.4/src/limiter1D.H
#ifndef _LIMITER_1D_H_ #define _LIMITER_1D_H_ #include "FArrayBox.H" #include "Box.H" class CoordinateSystemHandler; //////////////////////////////////////////////////////////////////////////////// /// Base class for 1D slope limiting. /** */ class limiter1D { public: enum eLimiters{ eUnlimitedCD = 0, ...
ALGO
0.997634
5.594996
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-11-22T02:33:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c00c7bae070c...
11ad1c70-1457-44bc-b3c9-74be785089f9
ssk4988/Coding
AdventOfCode/2022/d3p1.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; using pi = pair<int, int>; using pl = pair<ll, ll>; using pd = pair<ld, ld>; using vi = vector<int>; using vl = vector<ll>; using vd = vector<ld>; using vpi = vector<pi>; using vpl = vector<pl>; using vpd = vector<pd>; using vv...
ALGO
0.999479
3.54751
{ "github_metadata": { "branch": "main", "commit_count": 189, "repo_created_at": "2021-11-02T23:44:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2668a635cd...
7979efac-cb54-44fd-a011-d65ad8491500
mbert/mulberry-main
Sources_Common/HTTP/WebDAVClient/CWebDAVPropFindParser.h
/* Copyright (c) 2007 <NAME>. All rights reserved. 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 require...
TOOL
0.917537
6.938768
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2011-12-05T13:10:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 13, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "cca1f1...
30c16d1c-9963-4bfc-be3d-06a487d0c25b
ryanlockman333/UCDenver_School_Projects
DataStructHW/hw4/node.h
/* <NAME>: 101430670 CSCI 2421:001 Fall 2013 node.h Description: Node class prototypes. Pre/Post Conditions: // Typedefs typedef std::string value_type; Pre: none Post: Creates a typedef for std::string to store the data // Constructors Node(); // Default Pre: none Post: Initializes the data and the Node l...
TOOL
0.929548
6.018334
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-10-15T18:30:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c09543fd2...
bf114bd6-a679-41af-b0db-52415cf08835
windrew/Baekjoon_ac_codes
15967.cpp
#include <stdio.h> long long int s[4200000],l[4200000]; void r(long long int nod) { if(nod==1)return; if(nod%2==1)nod--; s[nod]+=l[nod]; s[nod+1]+=l[nod+1]; l[nod*2]+=l[nod]/2; l[nod*2+1]+=l[nod]/2; l[nod*2+2]+=l[nod+1]/2; l[nod*2+3]+=l[nod+1]/2; l[nod]=0; l[nod+1]=0; s[nod...
ALGO
0.999921
3.554558
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-06-06T20:07:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f82343ab67e...
b7f23822-9c4b-41ab-9d4d-51fcb33abcec
Orion545/OI-Record
Grade 10-12/2018 autumn/NOIP/NOIP2018提高组Day1程序包/GD-Senior/answers/GD-0442/money/money.cpp
#include<cstdio> #include<cstring> #include<algorithm> const int maxn = 1005; int a[maxn], b[maxn]; int aa[maxn], tot; bool no[maxn]; int x[maxn]; int pre[maxn]; int n, m; bool can[50005]; int makeit(int *A, int i, int lim) { pre[0] = 0; if(lim == 1) { for(x[1] = 0; x[1] * A[1] <= i; x[1]++) { if(x[1] * A[1...
ALGO
0.999885
3.740915
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-05-26T05:47:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c5298bbca7...
d16ea373-08d7-43ff-a9f3-acc8e1215611
smv1999/CompetitiveProgrammingQuestionBank
Arrays/trapping_rain_water_extra_space.cpp
// Trapping Rain Water //Approach 2 // O(n) O(2n) //i/p: 3 0 1 2 5 //o/p: 6 //Use 2 extra arrays #include<bits/stdc++.h> using namespace std; int getwater(int arr[],int n) { int res=0; int lmax[n],rmax[n]; //left max lmax[0]=arr[0]; for(int i=1;i<n;i++) lmax[i]=max(arr[i],lmax[i-1]); //s...
ALGO
0.999986
5.988478
{ "github_metadata": { "branch": "master", "commit_count": 1413, "repo_created_at": "2020-04-15T13:06:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1251, "forks": 358, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "79...
837ca964-0837-487a-9d26-5fe093969807
Chris-plusplus/differential_equations_project
include/equation.hpp
#pragma once #include <type_traits> namespace equation { /// @brief finite element count inline std::size_t n; /// @brief integration iterations inline std::size_t integral_n = 10000; /// @brief Interval start constexpr const double a = 0; /// @brief Interval end constexpr const double b = 2; /// @brief E(x), as des...
ALGO
0.924425
3.691895
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2024-01-13T13:24: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": "8e7cef6ccd6...
e219b9f3-f172-47ed-98ea-738ca5777b55
taehun2123/BaekJoon-Resolved
백준/Gold/9205. 맥주 마시면서 걸어가기/맥주 마시면서 걸어가기.cc
#include <bits/stdc++.h> #define pii pair<int,int> #define X first #define Y second using namespace std; int board[105][105]; int vis[105]; bool flag; struct pos{ int x; int y; }; pos saved[102]; int main() { ios::sync_with_stdio(0); cin.tie(0); int t; cin >> t; while(t--){ int n; ...
ALGO
0.999944
4.182345
{ "github_metadata": { "branch": "main", "commit_count": 443, "repo_created_at": "2023-11-11T14:52:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5b77baac2...
d7cb4983-31ce-4e53-94ea-0c0158f36fc2
2019331043-Zakaria/Codes
CB/C_Almost_All_Multiples.cpp
/* * @Author: Zakaria * @Date: 2022-11-25 22:37:40 * @Last Modified time: 2022-11-26 00:39:47 */ #include <bits/stdc++.h> #define pb push_back #define f first #define s second #define pi acos(-1.0) #define LCM(a,b) a*b/__gcd(a,b) #define GCD(a,b) __gcd(a,b) #define ...
ALGO
0.999977
4.615601
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-05-09T16:22: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": "5ce0c2415ff7...
6f85aa01-ffe4-4ddf-a609-b02ae3ba05a7
anmolgera/Codeforces_Solutions
CodeForces/GNU C++17/1409C | Yet Another Array Restoration/91937080.cpp
#include <bits/stdc++.h> using namespace std; const int N = 200005; int n, t, x, y; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cin >> t; while (t--) { cin >> n >> x >> y; int d = y - x, s; for (int i = 1; i <= d; i++) { if (d % i == 0 && d ...
ALGO
0.999826
3.644881
{ "github_metadata": { "branch": "main", "commit_count": 1267, "repo_created_at": "2022-11-24T19:09:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b01a9a632...
955d199c-ad4d-4b88-9b51-32ba15685987
rgeorgiev583/dsp-practicum-2015-16
hw/1/81153/grafNeighborList.cpp
#include<iostream> #include<vector> #include<list> #include<iterator> using namespace std; /// for commentaries i use bulgarian and encoding is UTF - 8 /// връх в граф template <typename T> struct graphNode { T data; graphNode(T data = T()) { this->data = data; } bool operator==(graphNo...
ALGO
0.999364
4.589492
{ "github_metadata": { "branch": "master", "commit_count": 171, "repo_created_at": "2015-10-13T12:38:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 10, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70b8eba...
c9dca933-d3b7-4571-94c0-423b5b2c1c14
serbantasss/Competitive-Programming
Infoarena/Insule/insule.cpp
#include <bits/stdc++.h> using namespace std; queue<pair<int,int> >q; int n,m,v[101][101],f[101][101],l[101][101],ins[4],ma=999999999; int dx[] = {1, 0 , -1, 0}; int dy[] = {0, 1, 0, -1}; bool ok1(int x, int y, int z) { if(x<1 || y<1 || x>n || y>m) return false; if(f[x][y]==z) return false; ...
ALGO
0.99983
3.69319
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-05-13T22:12: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": "8a6e1e2188c5...
9572592a-1a86-42da-a890-b9b8026752ec
bblackyyyy/Algorithms2024-25
zadanie9.cpp
#include <iostream> #include <string> #include <iomanip> #define t 10000 #define kk 1000 using namespace std; string s256 = "2be3f3aa3af1f3304884d6a4fbb2cd66982b1ab0a7851c0d96e9eaa9c786c9e6"; //long long int counting_sort(long long int *A, long long int *B, long long int n, long long int min, long long int max) ...
ALGO
0.999118
3.602171
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2025-02-15T18:22: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": "9ac9f5cf955...
97222090-d024-4fc6-95dc-0a07d4fe4919
sarmentoreis/CPlusPlus
Exercicios/Exercicios2/Principal.cpp
#include <iostream> #include "Metodos.h" int main() { /*Ex 1: Crie um programa capaz de ler os dados de uma matriz quadrada de inteiros. Ao final da leitura o programa deverá imprimir o número da linha que contém o menor dentre todos os números lidos. */ int Matriz[3][3]; int Tamanho = std::size(Matriz); int...
ALGO
0.979429
3.255735
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-01-21T11:19: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": "bb99707a5ab...
8e3d1c97-2f1b-48b2-9b84-b579da70419f
lbarroqueiro/exercicioC2
main.cpp
/************************************************************ * programa : exercicio2 * * autor : <NAME> dt 31/05/2016 * * objetivo : fazer uma função que dada uma lista encadeada * verificar se o valor está dentro dela * *************************************************************/ #include <stdio.h>...
ALGO
0.999927
4.482944
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-06-01T22:40: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": "a559461419...
0a6e3089-909b-478b-b465-9307d94647db
danielfrascarelli/esys-particle
Foundation/cube_eq.cpp
///////////////////////////////////////////////////////////// // // // Copyright (c) 2003-2017 by The University of Queensland // // Centre for Geoscience Computing // // http://earth.uq.edu.au/centre-geoscience-computing // // ...
ALGO
0.999191
4.928069
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2020-12-20T18:28:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b33cbe16998...
c0fd8ba8-2c35-485f-b624-82975e3d05ed
manjavacas/aoc-2023
day1/part2.cpp
#include <iostream> #include <fstream> #include <list> #include <map> #include <limits> using namespace std; struct Digit { int value; int position; Digit(int v, int p) : value(v), position(p) {} }; int main() { const string filename = "input2.dat"; ifstream file(filename); string line; ...
ALGO
0.999477
5.613039
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-12-03T14:47: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": "3402035e32dc...
2d5b9967-2e34-472f-8b57-726dca2fc1ea
VictorEijkhout/diff2d_benchmark
code/diff2d/split/diff2d.cpp
/**************************************************************** **** **** This file belongs with the course **** Parallel Programming in MPI and OpenMP **** copyright 2019-2024 <NAME> <EMAIL> **** **** diff2d.cpp : 2D diffusion in parallel through OpenMP **** **************************************************...
ALGO
0.985583
5.801585
{ "github_metadata": { "branch": "main", "commit_count": 487, "repo_created_at": "2024-03-27T19:40:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "3f911d2ad9...
ab2c0af5-c70a-4ad3-8e9b-562597db49d8
Gonzalo-Mier/coding_problems
HackerRank/minimaxsum.cpp
/////////////////////////////////////////////////////////////////// // // // https://www.hackerrank.com/challenges/mini-max-sum/problem // // // ////////////////////////////////////////////////...
ALGO
0.999915
4.496486
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-09-07T11:18: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": "8cee3f4b11...
e2080f2a-7848-45f0-af2f-e5fec165155e
daishengdong/Algorithm
动态规划+/01 背包问题/1.cpp
#include <iostream> using namespace std; // 有 4 个物品 const int cnt = 4; // 背包有 5 个单位容积 const int h = 5; const int weight[cnt] = { 2, 1, 3, 2 }; const int value[cnt] = { 12, 10, 20, 15 }; // v(i, j) 表示将第 i 个物品放入容量为 j 的背包中所能获得的最大价值 // 则: // v(i, j) = v(i - 1, j) if (w(i) > j) // = v(i - 1, j - w(i)) + v(i) if ...
ALGO
0.999956
3.961967
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2014-06-19T09:39:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d0d052fd...
fe905031-22f6-4b3b-956d-c4ee672a54d3
manoflearning/cp-codes
AtCoder/AtCoder Beginner Contest 294/E.cpp
//#pragma GCC optimize("O3") //#pragma GCC optimize("Ofast") //#pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <cassert> using namespace std; #define ll long long #define ull unsigned long long #define ld long double #define pii pair<int, int> #define pll pair<ll, ll> #define fr first #define sc...
ALGO
0.99993
3.785094
{ "github_metadata": { "branch": "main", "commit_count": 1899, "repo_created_at": "2020-08-06T14:38: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": "0a752d355...
87540f09-ed82-4659-a16f-0f7bc1de1539
anveshi/Competitive-Programming
codeforces/476-A/476-A-12421409.cpp
/* If you think you are beaten, you are. If you think you dare not, you don't! If you like to win, but think you can't, It's almost a cinch you won't. you think you'll lose, you're lost; For out in the world we find Success begins with a fellow's will; It's all in the state of mind. If you think you are outclassed, you...
ALGO
0.99999
3.135191
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-02-12T06:24: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": "6ee2792009...