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
a7d42fb8-b4f3-4e4c-aeb6-11a6ed2ad176
georgiee/lip-sync-lpc
sources/praat/dwtools/praat_HMM_init.cpp
/* praat_HMM_init.cpp * * Copyright (C) 2010-2011 <NAME> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * ...
TOOL
0.902902
5.773801
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2012-09-12T12:44:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91c66e8ce...
a940d57e-08fc-4927-aee8-076a0911dba0
byuri1356/algorithm
백준/Gold/1520. 내리막 길/내리막 길.cc
#include<iostream> #include<vector> #include<algorithm> #define fastio cin.tie(0)->ios::sync_with_stdio(0); cout.tie(0); setvbuf(stdout, nullptr, _IOFBF, BUFSIZ); using namespace std; using ll = long long; int n, m; int arr[501][501], dp[501][501]; int dx[4] = { -1, 0, 1, 0 }, dy[4] = { 0, 1, 0, -1 }; bool isValid(in...
ALGO
0.999982
3.565379
{ "github_metadata": { "branch": "main", "commit_count": 850, "repo_created_at": "2022-01-10T01:54:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "506a1bafd3...
c7fe64e6-b180-4759-86c6-753a3226dee0
theonlynexus/quokka3d
Renderer/polygon3D.cpp
#include "vector3d.h" #include "polygon3D.h" #include "transform3D.h" #include "viewwindow.h" using namespace Quokka3D; using namespace std; //************************************************************************ // // Polygon3D members // //***********************************************************************...
TOOL
0.95789
6.647857
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2015-08-26T06:17:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70eb8e532...
a5172b55-f3c4-4f31-baee-50ddf62e00a2
Pavithra269/CSA14-COMPILER-DESIGN
c program for identifers.cpp
#include <stdio.h> #include <ctype.h> int main() { char input[1000]; int charCount = 0, wordCount = 0, lineCount = 0; char prevChar = '\0'; printf("Enter text (Press Ctrl+D to end):\n"); while (fgets(input, sizeof(input), stdin) != NULL) { for (int i = 0; input[i] != '\0'; i++) { ...
ALGO
0.992479
4.760019
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2024-02-21T03:44: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": "dd068ad6ec0...
658ceb37-a2b0-47cb-a607-ef17d0d81b64
Eppie/euler
3/Euler38.cpp
/* * ===================================================================================== * * Filename: Euler38.cpp * * Description: Solution to Project Euler, Problem 38 * * Version: 1.0 * Created: 5/12/2016 8:23:58 PM * Revision: none * Compiler: g++ * * A...
ALGO
0.999559
5.684202
{ "github_metadata": { "branch": "master", "commit_count": 208, "repo_created_at": "2015-07-31T20:47: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": "ffd43e35...
7402f971-3a42-4480-a7e5-de03203252b1
LeeJungHwi/Algorithm
백준/Silver/3060. 욕심쟁이 돼지/욕심쟁이 돼지.cc
#include <bits/stdc++.h> using namespace std; #define home 0 #ifdef ONLINE_JUDGE #define init ios_base::sync_with_stdio(home); cin.tie(home) #else #define init ios_base::sync_with_stdio(home); cin.tie(home); ifstream cin("input.txt") #endif #define ll long long #define ld long double #define pii pair<int, int> #def...
ALGO
0.9999
3.531566
{ "github_metadata": { "branch": "master", "commit_count": 1326, "repo_created_at": "2024-01-24T18:58: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": "41530d0...
3f1a8d16-747e-402e-aa25-475b92fc8964
knight7024/BOJ-Algorithm
16234/인구 이동.cpp
#include <iostream> #include <vector> #include <queue> #include <cstring> #include <algorithm> using namespace std; int dx[] = {-1, 1, 0, 0}; int dy[] = {0, 0, -1, 1}; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n, l, r; cin >> n >> l >> r; int ground[50][50]; for (int i = 0; i < n; i++) { fo...
ALGO
0.999836
3.97057
{ "github_metadata": { "branch": "master", "commit_count": 341, "repo_created_at": "2020-08-08T13:51:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "046481b3...
91fc623a-d858-4bce-9a9b-ac88e34af92d
ajungren/sum-primes
sum-primes.cc
/* * Copyright 2013 <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 in wr...
ALGO
0.999961
5.165405
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2013-02-01T14:42: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": "eb94e59e5...
d9305788-2c97-4d79-ade5-eec0ccfc95d8
connornguyxn/competitive-programming
archive/cpp/todo_ntuc_mario3.cpp
#ifdef local_debug #include "include/debugging.h" #define init_ofs() ofstream cout("output.out") #else #include <bits/stdc++.h> #define init_ifs() #define init_ofs() #define vdb(...) #define db(...) #endif using namespace std; #define ll long long #define ull unsigned long long #define ld long double #define str strin...
ALGO
0.999931
4.070108
{ "github_metadata": { "branch": "main", "commit_count": 151, "repo_created_at": "2021-08-26T07:42: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": "c03f2a101c...
1278a1a9-af57-4ecc-94da-dd907b5dd3fb
nanishaheed/CSA1422_compiler-design_shaheed-192211296-
identifyer.cpp
#include <stdio.h> #include <string.h> #include <ctype.h> #define MAX_ID_LEN 30 // 1. Lexical Analyzer to identify identifiers, constants, and operators void lexicalAnalyzer(char *str) { printf("Lexical Analysis:\n"); for (int i = 0; str[i] != '\0'; i++) { if (isalpha(str[i])) { printf("Id...
ALGO
0.999513
3.471788
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-02-11T08:27: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": "6026c989a9f3...
106fbd40-9b79-4646-b53d-79fd6d2ef05b
davidgregoriom/Programacion
C++/Programación 1/Programación Funcional5.cpp
#include <iostream> #include <vector> #include <string> #include <array> #include <set> #include <functional> #include <complex> using namespace std; int main(){ auto forEach = [](function<void(int)> g, vector<int> const & v){ for(auto elem: v) g (elem); }; auto transform = [](vector<int>const...
ALGO
0.997663
5.23558
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-03-16T18:56: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": "a1996318692...
97edee61-1097-44cd-a0d4-65d8572e2a27
TanmayThaker/Love-Babbar-450-DSA
Heaps/Convert min Heap to max Heap.cpp
//Convert min Heap to max Heap #include<bits/stdc++.h> using namespace std; void maxHeapify(int arr[],int i,int n) { int l = 2*i+1; int r=2*i+2; int largest = i; if(l<n and arr[l]>arr[i]) { largest=l; } if(r<n and arr[r]>arr[i]) { largest=r; } if(largest!=i) ...
ALGO
0.999814
4.472702
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2021-04-17T13:18:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4169425f2...
c20742a7-1bad-4454-b0b7-cda471bd6c92
keywet06/code
CF/CF710F.cpp
// oct code title CF/CF706E.cpp #ifndef OCT_CODE_INSERT_PREx2dDOCUMENT // oct code insert pre-document #define OCT_CODE_INSERT_PREx2dDOCUMENT #ifdef ONLINE_JUDGE #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #endif #i...
ALGO
0.999891
4.081666
{ "github_metadata": { "branch": "master", "commit_count": 702, "repo_created_at": "2019-04-21T10:13: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": "ce548f93...
dbb096aa-8a3b-4d7b-934a-475ac67d7456
itsnitish22/CrackYourInternshipChallange
RootToNodePath.cpp
#include <bits/stdc++.h> using namespace std; class TreeNode { public: TreeNode *left, *right; int val; } * root; void createTreeNode() { root = new TreeNode; queue<TreeNode *> addr; int val; cout << "Enter root node\n"; cin >> val; root->val = val; root->left = NULL; root->r...
ALGO
0.999942
4.803145
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2022-06-12T12:23:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15aab9f3f...
7690e94d-815a-407a-b199-076f14d20f3a
yooyoo9/AlgoLabETH2022
week2/BurningCoins.cpp
#include <bits/stdc++.h> using namespace std; #define int long #define vc vector void solve(){ int n; cin >> n; vc<int> a(n); for(int i=0; i<n; i++) cin >> a[i]; vc<vc<int>> dp(n, vc<int>(n)); for(int i=0; i<n; i++){ dp[i][i] = a[i]; if(i==n-1) continue; dp[i][i+1] = max(a[i], a...
ALGO
0.999484
4.365652
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-02-03T13:17: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": "d2fbe0d049af...
5dbaa4d3-20d9-469a-926e-424ed25c060a
prateekmohanty63/LeetCode
Placement-Preparation/DPALL/Knapsack/frogJump.cpp
#include<iostream> #include<vector> #include<unordered_map> using namespace std; // Time complexity: 48ms Beats 94.95%of users with C++ // Space complexity: 235.19MB Beats 16.16%of users with C++ class Solution { public: bool solve(vector<int>&stones,int ind,int prevJump,unordered_map<int,int>&stonePos,vector<vect...
ALGO
0.999843
5.357599
{ "github_metadata": { "branch": "master", "commit_count": 1103, "repo_created_at": "2021-09-27T04:55: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": "9ab9cad...
b7f8099e-a839-4cba-90fb-1f97ad8079ab
UCR-CS203/BranchPredictor-Template
main.cpp
#include <ctype.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <iostream> #include "trace.h" #include "predictor.h" using namespace std; int main(int argc, char ** argv){ int opt; unsigned int m = 6; //Global branch history (up to 12) unsigned int n = 1; //n-bit predictor ( 1 or 2...
ALGO
0.964383
5.776743
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2021-01-24T07:38:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "664f25b8c823...
5aa2ff9e-db78-4b54-9207-533705d30f82
GPC-UNI/Programacion-Competitiva
uni-no-fiis/clase-07/soluciones/L.cpp
/** problem : http://codeforces.com/contest/549/problem/H approach: binary search, math solution: como queremos hallar el minimo podemos hacer nuestro predicado p(x) : x es mayor o igual al minimo, aqui ocurre algo interesante sucede que si abs(a - b) <= x con b la mejor matriz posible, entonces b[i][j] pertene...
ALGO
0.999789
3.574116
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2017-12-21T19:12:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 29, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e9a663...
b9fe65d5-b53a-4bdb-ab7b-19f6c56cff76
Asti22/0217_Doublelinkedlist
dll.cpp
#include <iostream> #include <string> using namespace std; struct Node { int noMhs; string name; Node*next; Node*prev; }; Node*START=NULL; void addNode(){ Node* newNode = new Node(); // step 1: create a new node cout <<"\nEnter the roll number of the student: "; cin>> newNode->noMhs; //...
ALGO
0.997685
3.449235
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2024-05-02T08:28:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e21ab306a2...
3b262e7f-ae3a-4dd6-b6d4-a9b5ffe9dfa9
Yeonjae37/Algorithm
BOJ_4949.cpp
#include <bits/stdc++.h> using namespace std; int main(void){ string line; //입력용 vector<string> ans; while (true){ getline(cin, line); if (line == ".") break; stack<char> S; bool truth = true; for (auto a : line){ if (a == '(' || a == '['){ S.push(a); } else if (a ...
ALGO
0.999569
4.633545
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2024-04-01T10:59:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca0bb53df35...
20c7c558-04c8-4da6-8ab4-096bfa44bc39
mimibetty/CP-Training-
COMPETITION/DUT PC/DUTPC 2021/Round 1/C/1.cpp
#include<bits/stdc++.h> using namespace std; #define f first #define s second #define pb push_back const double PI = 3.14159265389793238462643383279502884197169; const long long MOD = 1e6 + 3; const int MAXN = 1e6; const int oo = 1e9; vector<string> ans; vector<pair<string,string> > ldk; map<string, int> dem; int main(...
ALGO
0.999914
3.30717
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-04-12T06:16: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": "d5b7be89cbc...
e8d033d1-dc6f-4646-a692-bb7542836d7f
tianbiandeshenghuo/OI-Code
CodeForces/cf1899/B_250_Thousand_Tons_of_TNT.cpp
#include<bits/stdc++.h> #define int long long using namespace std; const int MAXN = 1.5e5 + 5; int n, a[MAXN], qz[MAXN]; int get(int l, int r){ return qz[r] - qz[l - 1]; } void Solve(){ cin >> n; for (int i = 1; i <= n; i++){ cin >> a[i]; qz[i] = qz[i - 1] + a[i]; } int ans = -1; for (int i = 1; i ...
ALGO
0.999664
4.039585
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2023-12-30T06:39: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": "3438d9aa1da...
85be6e83-f4e5-4540-81a3-8cd281b2e4dc
intelpro/SLAM_practice
src/Tracker.cc
#include<Tracker.h> #include<opencv2/opencv.hpp> using namespace std; using namespace cv; namespace MY_SLAM{ Tracker::Tracker(const string& strSettingPath) { cv::FileStorage slam_settings(strSettingPath, cv::FileStorage::READ); float fx = slam_settings["Camera.fx"]; float fy = slam_s...
TOOL
0.974952
5.170129
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-12-23T12:13: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": "f8e034599e...
dedfb748-12f7-4837-95bb-0d3394e1a543
VowpalWabbit/vowpal_wabbit
vowpalwabbit/core/src/reductions/oaa.cc
// Copyright (c) by respective owners including Yahoo!, Microsoft, and // individual contributors. All rights reserved. Released under a BSD (revised) // license as described in the file LICENSE. #include "vw/core/reductions/oaa.h" #include "vw/common/random.h" #include "vw/common/vw_exception.h" #include "vw/config/o...
ALGO
0.939715
7.66066
{ "github_metadata": { "branch": "master", "commit_count": 10421, "repo_created_at": "2009-07-31T19:36:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8581, "forks": 1934, "issues": 138, "pull_requests": 5 }, "file_meta": { "content_id": ...
989ac732-e5ab-47b5-a47d-1a193c0679a4
MostafaOmar98/competitive-programming
UVA/10199-UVA-TouristGuide-ArticulationPoints.cpp
#include<bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> // Common file //#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update using namespace std; //using namespace __gnu_pbds; //typedef tree< // pair<int, int>, // change type // null_type, // less<pair<in...
ALGO
0.999976
4.176834
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2019-03-12T02:04: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": "7a48108ec...
b44e2fe5-e054-4883-af63-ccdddf284ae2
rafaelcsva/CompetitiveProgramming
code/CodeForces/457/b.cpp
#include <bits/stdc++.h> using namespace std; ll one = 1; void makeN(ll n, int c){ if(n == 0){ return; } for(ll j = n ; j >= -64 ; j--){ ll tmp = one << (n - j); if(tmp > c){ tmp -= one << (n - (j - 1)); } } } int main (){ ll n, k; ios::sync_with_stdio(false); cin >> n >> k; bits...
ALGO
0.999986
3.629447
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-08-30T23:18:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b09cd7299...
2afd4406-29ce-4b31-ad12-6bb0ed017125
zL1nX/LeetCode
sortString.cpp
/* 给你一个字符串 s ,请你根据下面的算法重新构造字符串: 从 s 中选出 最小 的字符,将它 接在 结果字符串的后面。 从 s 剩余字符中选出 最小 的字符,且该字符比上一个添加的字符大,将它 接在 结果字符串后面。 重复步骤 2 ,直到你没法从 s 中选择字符。 从 s 中选出 最大 的字符,将它 接在 结果字符串的后面。 从 s 剩余字符中选出 最大 的字符,且该字符比上一个添加的字符小,将它 接在 结果字符串后面。 重复步骤 5 ,直到你没法从 s 中选择字符。 重复步骤 1 到 6 ,直到 s 中所有字符都已经被选过。 在任何一步中,如果最小或者最大字符不止一个 ,你可以选择其中任意一个,并将其添加到结果字符串。 ...
ALGO
0.999899
5.452477
{ "github_metadata": { "branch": "main", "commit_count": 779, "repo_created_at": "2020-10-07T12:23: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": "b6af1dcb64...
cefcd69a-6ce6-463b-87fc-cb1283652748
ivanruski/DSA18-19
homework-11/dijkstra.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <queue> #include <map> #include <limits> using namespace std; typedef unsigned long ulong; const ulong INF = numeric_limits<ulong>::max(); struct edge; struct vertex { int key; ulong d; vector<edge*> ed...
ALGO
0.999893
3.903517
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-02-01T04:55: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": "1a61c626a...
b32290ce-cd76-4b11-b22b-817d703a56cd
rubengrandia/free_gait_trajectory_optimization
src/SolveTrajectoryOptimization.cpp
// // Created by ruben on 30.10.17. // #include <free_gait_trajectory_optimization/SolveTrajectoryOptimization.hpp> using namespace DirectTrajectoryOptimization; struct Phasecontainer { int phasecode; int num_nodes; LRD::ContactConfiguration_t contactconfiguration; std::shared_ptr<AnymalProjectedDyna...
ALGO
0.999851
3.890458
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-11-09T12:54:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05664fdb6a...
a8a95323-8a86-4f6c-9091-a6616f290d6f
NicolasAndreiDev/CompetitivePrograming
Codeforces/Problems/ConsecutiveSubsequence/sol.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define MOD 1000000007 #define INF 0x3f3f3f3f typedef long long ll; typedef pair<int, int> ii; void solve() { int n; cin >> n; vector<int> m(n+1); map<int, int> dp; int ans = 0, last = 0; for(int i=1;i<=n;i++) { cin >> m[i]...
ALGO
0.999974
4.450521
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2024-03-22T15:16: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": "a8c6a0c8955...
ccf6482d-31fc-4e0f-9952-bae95b8f8b24
lookskyblue/Backjoon
백준/Gold/1240. 노드사이의 거리/노드사이의 거리.cc
#include <iostream> #include <algorithm> #include <string> #include <queue> #include <deque> #include <stack> #include <set> #include <vector> #include <map> #include <cstring> using namespace std; vector<pair<int, int>> v[1001]; bool visit[1001]; void BFS(int a, int b) { queue<pair<int, int>> q; visit[a] = true...
ALGO
0.99999
4.234873
{ "github_metadata": { "branch": "main", "commit_count": 327, "repo_created_at": "2022-03-10T09:27:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "848ffe2481...
ecb14d86-38f6-42d5-a2f4-8a966af6b3c2
yashpaneliya/InterviewBit-Solutions
Tree/Construxt BT from inorder and preorder.cpp
// https://www.interviewbit.com/problems/construct-binary-tree-from-inorder-and-preorder/ // Approach: // Use preorder to find root and use inorder to find left and right subtrees // Recursively call for left and right subtrees TreeNode* generateTree(int prestart, int preend,int instart, int inend, vector<int>& preor...
ALGO
0.999988
6.377
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-06-05T19:02: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": "a5a5eb458e4...
02482a1d-912c-4abc-8c00-cad39e856a3f
nohajc/vendor-adb-patched
vendor/core/fs_mgr/libsnapshot/estimate_cow_from_nonab_ota.cpp
// // Copyright (C) 2020 The Android Open Source Project // // 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 app...
TOOL
0.953431
4.803329
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2022-12-20T15:40:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 39, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00b1b46c...
1f42ca8f-6334-4616-be6d-df7aa185debd
wolverinezgit/cpsolutions
Positive_Prefixes.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; typedef long long ll; #define mp make_pair #define pb push_back #define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NULL...
ALGO
0.999983
4.764296
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2021-01-26T17:20:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8e1f8704194...
be684c85-24cd-4829-bab9-c6491a410c90
Yasminnovaisvieira/C--_Exercicies
Maior_Menor_Numero.c++
#include <stdio.h> #include <stdlib.h> #include <locale.h> int main(){ setlocale(LC_ALL, "portuguese"); printf("Programa que mostra o maior e o menor número digitado.\nDigite um número negativo para interromper a execução do programa.\n\n"); int vcont = 0, vnum = 0, vmaior = 0, vmenor = 0; while(true){...
ALGO
0.999131
3.671239
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-22T23:43: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": "f0e91fd7bd87...
b4600e70-fa6d-49f2-994b-6d3a60cdbd24
j-nary/my_BOJ
2504.cpp
//BOJ_2504 괄호의 값 [골드 5] #include <bits/stdc++.h> #include <iostream> #include <stack> using namespace std; bool isNumber(string s) { if (s.empty()) return false; for (char c : s) { if (!isdigit(c)) return false; } return true; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ...
ALGO
0.999949
4.732597
{ "github_metadata": { "branch": "main", "commit_count": 291, "repo_created_at": "2022-07-10T14:46: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": "ee5e41ca04...
8ffb78a4-b1f0-424a-86b1-6089cbbcc9ae
ArsenyPogosov/olympiad_programs
lksh/Игра.cpp
#include <iostream> #include <vector> //#include <queue> //#include <list> //#include <map> #include <algorithm> //#include <math> //#include <string> using namespace std; int main() { int n; cin >> n; vector<int> mass(n); for (auto&i : mass) cin >> i; vector<vector<int>> dp(n, vector<int>(n, 0)); for (int r =...
ALGO
0.999945
3.796296
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-04-24T16:00: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": "866512e116...
23e1a699-a791-4279-874e-bf2634f59758
T-recks/cppCGR
cpp_cgr/cpp_cgr_lib/example.cpp
#include "libcgr.cpp" #include <vector> #include <iostream> using namespace cgr; /* * A simple tutorial/example program */ int main() { // std::vector<Contact> contact_plan = cp_load("cgrTutorial.json", MAX_SIZE); std::vector<Contact> contact_plan = cp_load("contactPlan_RoutingTest.json", MAX_SIZE); st...
ALGO
0.994272
3.976274
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2022-06-28T18:50:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7266ac46...
08789064-345b-495b-ade1-cad2384dec7e
YanzZhang/COGENT
src/time/TiRK.H
#ifndef _TiRK_H_ #define _TiRK_H_ #include <iostream> #include <string> #include "TimeIntegrator.H" #include "ExplicitStageFunction.H" #include "ExplicitStageJacobian.H" #include "NewtonSolver.H" #define _TI_RK_ "rk" #include "NamespaceHeader.H" template <class Vector, class Ops> class TiRK : public TimeIntegrator...
ALGO
0.997231
4.463371
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-12-03T22:58:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e240411ad...
2da11bb3-bd3b-4c03-abeb-f15b40b10651
hansx7/LeetCode
21_Merge_Two_Sorted_Lists.cpp
#include <iostream> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {}; //注意链表给定的构造方式 }; class Solution { private: ListNode *ans; public: Solution() { ans = NULL; } void setAns(ListNode* p) { ans = p; } ListNode* getAns() { return ans; } ...
ALGO
0.999973
4.22559
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-03-04T08:54: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": "3c82859b1a...
a34674b7-0de5-4279-9f90-12bc034c4bd6
luliyucoordinate/Leetcode
src/1604-Alert-Using-Same-Key-Card-Three-or-More-Times-in-a-One-Hour-Period/1604.cpp
class Solution { public: vector<string> alertNames(vector<string>& keyName, vector<string>& keyTime) { unordered_map<string, vector<int>> cnt; for (int i = 0; i < keyName.size(); i++) { auto& name = keyName[i]; auto& time = keyTime[i]; auto hour = (time[0] - '0') * 10 + (time[1] - '0'); ...
ALGO
0.999409
5.501939
{ "github_metadata": { "branch": "master", "commit_count": 1055, "repo_created_at": "2018-05-09T12:30:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1490, "forks": 481, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97...
c3b0bce1-59be-40dd-832d-423d419695c6
rahulranjan96/Algorithms
bfs.cpp
#include<iostream> using namespace std; typedef struct Node{ int v; struct Node* next; struct Node* prev; }node; void insert(node *s,int v) { node *s1 = new node[1]; s1->v=v; s1->prev=s; s1->next=s->next; if(s->next!=NULL) s->next->prev=s1; s->next=s1; } void print(node *g) { while(g!=NULL) { cout<<g-...
ALGO
0.999956
4.537797
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-04-22T10:01:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2903cdfa3d...
582f4095-ee2f-48ce-a6bb-c9b5d7a3e0dd
autowarefoundation/spconv_cpp
spconv/include/spconvlib/cumm/conv/main/cpTuring_f16f16f16f16f16tnt_m64n128k32m32n64k32A1T1688_200_C301LLL_SK/iterb_p/WeightOptParams.h
#pragma once #include <spconvlib/cumm/common/TensorViewMath.h> #include <spconvlib/cumm/conv/main/cpTuring_f16f16f16f16f16tnt_m64n128k32m32n64k32A1T1688_200_C301LLL_SK/lb/TensorGeneric.h> #include <spconvlib/cumm/conv/main/cpTuring_f16f16f16f16f16tnt_m64n128k32m32n64k32A1T1688_200_C301LLL_SK/cp/ConvProblem.h> namespace...
TOOL
0.932994
5.959838
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-22T16:10:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11, "forks": 2, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "ecf02d4d3949...
70572d43-bc3b-4b16-bfc0-578e582aaff4
roman-ellerbrock/QuTree
contrib/Hamiltonians/Operators/UnsupervisedLearning/PictureInterface.cpp
// // Created by <NAME> on 16/10/2019. // #include <Operators/SumOfProductsOperator.h> #include "PictureInterface.h" #include "MNISTdata.h" namespace PictureInterface { SOP DatasetOperator(const MNISTdata& dataset, float threshold, bool adjungate) { SOP DatasetOps; for (const Picture& Pic : dataset) { // G...
TOOL
0.943287
4.517833
{ "github_metadata": { "branch": "master", "commit_count": 547, "repo_created_at": "2019-11-14T23:21:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0e039e4...
ccb76327-3d04-4e14-bfa7-d7b73f95ff95
SaminRahman1/DSA
Basic Data Structures/Assignment-04/Print_Outer_Tree.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int val; Node* left; Node* right; Node(int val) { this->val = val; this->left = NULL; this->right = NULL; } }; Node* input_tree() { int val; cin >> val; Node* root; if(val == -1...
ALGO
0.999891
4.408979
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-20T17:51: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": "f39d053f1795...
13bcd980-5c6f-4cfe-8e67-b3fc50e1c362
ayushrakesh/Data-Structures-and-Algorithms
binary search/answers/nth_root.cpp
#include <bits/stdc++.h> using namespace std; int func(int mid, int n, int m) { // return 1 if ans==m // return 0 if ans<m // return 2 if ans >m long long ans = 1; for (int i = 1; i <= n; i++) { /* code */ ans = ans * mid; if (ans > m) return 2; } if (ans == m) return 1; els...
ALGO
0.999954
4.101415
{ "github_metadata": { "branch": "main", "commit_count": 601, "repo_created_at": "2024-01-16T05:09: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": "5037431347...
fd915a18-f801-49ab-b243-801c7ef49e0d
TaoSama/ICPC-Code-Library
OJ - HihoCoder/1514.cpp
// // Created by TaoSama on 2017-04-26 // Copyright (c) 2017 TaoSama. All rights reserved. // #pragma comment(linker, "/STACK:102400000,102400000") #include <bits/stdc++.h> using namespace std; #define pr(x) cerr << #x << " = " << x << " " #define prln(x) cerr << #x << " = " << x << endl const int N = 1e5 + 10, INF...
ALGO
0.999981
4.263393
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2016-03-24T05:56: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": "759a2d79...
741f033a-9258-478c-8e6d-d9f1eeeb2d67
ROVI2-SDU-GROUP1/ROVI2
code/src/rovi2_development/headers/RT_RRTNode.hpp
#pragma once #include <rw/pathplanning/PlannerConstraint.hpp> #include <rw/pathplanning/QSampler.hpp> #include <rw/math/Q.hpp> #include <rwlibs/pathplanners/rrt/RRTQToQPlanner.hpp> #include <rwlibs/pathplanners/rrt/RRTTree.hpp> #include <rw/pathplanning/QToQPlanner.hpp> #include <rw/math/Metric.hpp> #include <chrono> #...
ALGO
0.99703
4.114509
{ "github_metadata": { "branch": "master", "commit_count": 274, "repo_created_at": "2017-03-09T10:08:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8102042a3...
f20cfca4-6c3b-4050-a070-9c197b6f0ea3
Algorithm-zh/algorithm
acwing/Base/PrefixSum-matrix.cc
#include <iostream> using namespace std; const int N = 1e3 + 10; int main() { int n, m, q, a[N][N], b[N][N]; cin >> n >> m >> q; for (int i = 1; i <= n; i++) for(int j = 1; j <= m; j ++) cin >> a[i][j]; for (int i = 1; i <= n; i++) for(int j = 1; j <= m; j ++) b[i][j] = b[i - 1][j] + b[i][...
ALGO
0.999184
3.921733
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2025-03-14T12:29: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": "a5bbc3b29...
9af3b613-6bba-4ff5-a333-12cef3f1dbeb
21B031174/ADS
example/ex4.cpp
#include <iostream> using namespace std; struct node{ int val; int cnt=1; node * next; node * prev; node(int val){ this -> val = val; this -> next = NULL; this -> prev = NULL; } }; class LinkedL{ node * head; node * tail; public: LinkedL(){ head =...
ALGO
0.99998
3.508368
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-04-20T12:36: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": "9c7cc645aa6e...
f5c5dd09-f9d7-46d7-86f5-e1af0955ac02
m-dayani/nav24
core/operators/mapInit/OP_2ViewReconstruction.hpp
/** * This file is part of ORB-SLAM3 * * Copyright (C) 2017-2020 <NAME>, <NAME>, <NAME>, <NAME> and <NAME>, University of Zaragoza. * Copyright (C) 2014-2016 <NAME>, <NAME> and <NAME>, University of Zaragoza. * * ORB-SLAM3 is free software: you can redistribute it and/or modify it under the terms of the GNU General Pub...
ALGO
0.995185
6.898382
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2023-12-22T15:16:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7aff6e9d7c3...
ab2aaf22-2beb-4df3-b980-c840fa73be89
berkalparslan0/Rock-Paper-Scissors
tempCodeRunnerFile.cpp
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; string rock = " _______\n" "---' ____)\n" " (_____)\n" " (_____)\n" " (____)\n" "---.__(___)\n" ; string paper = " _______\n" "---' ____)____\n" " ______)\n" " _______)\n" " _______)\n" ...
TOOL
0.948002
3.536558
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-10-11T19:37: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": "3347784cdf42...
4017d633-23df-4716-a1d2-4b71669b62eb
SachinBore/codes
Basics/sorting/bubble_sort_algo.cpp
#include <bits/stdc++.h> using namespace std; void bubble_sort(vector<int>& arr, int n) { bool swapp = true; for (int i = n - 1; i >= 1 && swapp; i--) { swapp = false; for (int j = 0; j < i; j++) { if (arr[j] > arr[j + 1]) { swapp = true; swap(arr[j], arr[j + 1]); } } } } void bubble_sort_2(ve...
ALGO
0.999967
5.377137
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-02-22T19:23: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": "83069a7dfc25...
b1074e67-c015-4edd-8fd3-ebd9bcb555e2
toRatnesh/Learning_Code_Practice
books/Nicolai_M_Josuttis_CPP17_The_Complete_Guide/Part_4_Library_Extensions_and_Modifications/Ch_22_Parallel_STL_Algorithms/22_01_Using_Parallel_Algorithms/using_parallel_algorithms.cpp
/********** References C++17 - The Complete Guide | <NAME> https://en.cppreference.com/w/cpp/header/execution Chapter 22 Parallel STL Algorithms C++17 allow STL standard algorithms to run using multiple threads to deal with different elements in parallel 22.1 Using Parallel Algorithms 22.1.1 ...
ALGO
0.999318
7.082533
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2022-02-06T16:03: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": "6c90efe4aca...
a96af0bf-a119-4f36-bbe9-da8a360a12c1
iamnotnader/usaco_problems
dualpal.cpp
#include <stdio.h> #include <string.h> #include <assert.h> #include <vector> #include <algorithm> #include <iostream> #include <stdlib.h> #include <math.h> using namespace std; /* ID: iamnotnad1 LANG: C++ TASK: dualpal */ #define MAX_ARRAY_LEN 50 int new_digits_array[MAX_ARRAY_LEN]; int convert_to_diff_ba...
ALGO
0.999569
3.530168
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-04-14T04:12: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": "1ac702a198...
5c7315a4-9787-419e-b7e5-39e388994530
zstuACM22/ICPC-useful-template
数据结构/线段树/线段树(区间加法).cpp
#include <bits/stdc++.h> #define ll long long using namespace std; #define int long long const int N = 1e5 + 10; // 线段树(只有区间加法) struct segment_tree_add { struct Node { int l, r, v, add; } tr[N << 1]; int n = 0, st[N], tot; inline int ls(const int &x) { return tr[x].l; } inline int rs(const ...
ALGO
0.999633
5.332554
{ "github_metadata": { "branch": "main", "commit_count": 103, "repo_created_at": "2023-01-08T06:39:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 21, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3fd779ac13...
4630cc80-679f-4b33-bed9-51415a356a57
tetat/Codeforces-Problems-Sol
Difficulty1300/900B.cpp
/// Problem Name: Position in Fraction /// Problem Link: https://codeforces.com/problemset/problem/900/B /** * winners never quit **/ #include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair typedef long long Long; const int N = 1e5; int main() { ios::sync_with_stdio(0); cin.t...
ALGO
0.999893
3.62009
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2021-05-21T17:12: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": "6a3a5bf0993...
a74ed978-0524-43f0-8b20-187d128089e7
ishandutta2007/codeforces-c
cookiedoth/normal/1381/B.cpp
/* Code for problem B by cookiedoth Generated 21 Jul 2020 at 05.54 PM 10% 30% 50% 70% 100% z_z =_= \_()_/ */ #include <iostream> #include <fstream> #include <vector> #include <set> #include <map> #include <bitset> #include <algorithm> #include <iomanip> #include <cmath> #include <ctime> #include <functional>...
ALGO
0.999367
4.583401
{ "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": "b04e6c3639d6...
3246bd67-43f9-442e-8820-2bb3ab9d3f9a
PearsonDai/LeetCode
452. 用最少数量的箭引爆气球.cpp
452. 用最少数量的箭引爆气球 在二维空间中有许多球形的气球。对于每个气球,提供的输入是水平方向上,气球直径的开始和结束坐标。由于它是水平的,所以纵坐标并不重要,因此只要知道开始和结束的横坐标就足够了。开始坐标总是小于结束坐标。 一支弓箭可以沿着 x 轴从不同点完全垂直地射出。在坐标 x 处射出一支箭,若有一个气球的直径的开始和结束坐标为 xstart,xend, 且满足 xstart ≤ x ≤ xend,则该气球会被引爆。可以射出的弓箭的数量没有限制。 弓箭一旦被射出之后,可以无限地前进。我们想找到使得所有气球全部被引爆,所需的弓箭的最小数量。 给你一个数组 points ,其中 points [i] = [xstart...
ALGO
0.999983
5.768209
{ "github_metadata": { "branch": "main", "commit_count": 231, "repo_created_at": "2021-07-23T03: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": "8726e2b8c5...
ac0205ef-c0a0-4b85-9857-f757e5af5e84
star-bnl/star-mcgen
StRoot/StarGenerator/Pythia8_1_62/src/SigmaCompositeness.cc
// SigmaCompositeness.cc is a part of the PYTHIA event generator. // Copyright (C) 2012 <NAME>. // PYTHIA is licenced under the GNU GPL version 2, see COPYING for details. // Please respect the MCnet Guidelines, see GUIDELINES for details. // Function definitions (not found in the header) for the // compositeness sim...
ALGO
0.994824
5.717846
{ "github_metadata": { "branch": "main", "commit_count": 388, "repo_created_at": "2020-11-09T19:27:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 6, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4a5c561d9e0...
8cdf971f-90dc-48a1-bcdb-4594a04e799f
contact-discovery/mobile_psi_cpp
droidCrypto/psi/OPRFAESPSIServer.cpp
#include <assert.h> #include <droidCrypto/AES.h> #include <droidCrypto/ChannelWrapper.h> #include <droidCrypto/gc/circuits/AESCircuit.h> #include <droidCrypto/psi/OPRFAESPSIServer.h> #include <droidCrypto/utils/Log.h> #include <endian.h> #include <thread> #include "cuckoofilter/cuckoofilter.h" namespace droidCrypto { ...
ALGO
0.943922
6.787936
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-08-11T22:37:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 27, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c00b053d...
c0eceb8b-d1d5-43d2-ad0d-3702dc31a735
mfadli26/pegawai_departemen_cplusplus
doublelink_List.cpp
#include <cstdlib> #include <iostream> #include <conio.h> #include "doublelink_List.h" #include "relasi.h" void CreatePegawai(list_pegawai &Lpegawai){ first(Lpegawai) = NULL; last(Lpegawai) = NULL; }; void CreateDepartemen(list_departemen &Ldepartement){ first(Ldepartement) = NULL; last(Ldepartement)...
TOOL
0.988279
3.055529
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-11-22T17:33:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fbaa72170...
9befbe86-56c7-4c5a-9581-1f7f351fe0e1
KeyFramesOfVi/MPGAAstar
main.cpp
// // main.cpp // MPGAAstar // // Created by <NAME> on 8/18/15. // Copyright (c) 2015 <NAME>. All rights reserved. // #include <iostream> #include "MPGAAstar.h" #include <ctime> const int DEFAULT_BUFFER_SIZE = 30; int main(int argc, const char * argv[]) { std::clock_t timer; Map * dynamicMap, *unknownMap...
ALGO
0.931006
3.475936
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-09-20T20:50:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fbfbd151d9...
b2dd5c98-2b28-4321-b771-46fcc097ec17
cea-trust-platform/trust-code
src/IJK/Multigrille/Matrice_Grossiere.tpp
/**************************************************************************** * Copyright (c) 2025, CEA * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retai...
ALGO
0.971983
4.409304
{ "github_metadata": { "branch": "master", "commit_count": 9704, "repo_created_at": "2021-03-29T11:57:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 59, "forks": 19, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "9676b9...
520428d2-02f7-41e1-a92f-5b0a72ddcda4
asarcar/cpp_for_c_programmers_course
src/utils/graph_iter.h
// Copyright 2014 asarcar Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to i...
ALGO
0.904508
6.373993
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-06-16T19:12:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5e9b15d59...
1d1f3774-4cb8-4065-a66b-a4d59c5c9db0
jerryxu20/kattis
roomevacuation.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll,ll> pl; typedef pair<ld,ld> pd; typedef vector<int> vi; typedef vector<ld> vld; typedef vector<ll> vl; typedef vector<pi> vpi; typedef vector<pl> vpl; typedef...
ALGO
0.999473
4.771825
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2023-01-10T02:04: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": "dfcc87bf5fd...
c7a1d0a7-2403-4c08-8b50-2f57e4bf4063
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/12/65/2.cc
// another fine solution by misof // #includes {{{ #include <algorithm> #include <numeric> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <stack> #include <cstdio> #include <cstdlib> #include <cstring> #include <cctype> #include <cass...
ALGO
0.999942
3.568829
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e94bb34d...
42021993-901f-4aa5-9bd5-c60788d709cc
sagpant/PDAL
filters/PMFFilter.cpp
/****************************************************************************** * Copyright (c) 2015-2017, 2020 <NAME> (<EMAIL>) * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following * conditions are met: * * ...
ALGO
0.959936
6.543662
{ "github_metadata": { "branch": "master", "commit_count": 9127, "repo_created_at": "2020-06-18T10:38: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": "e642da9...
2b50846f-a257-484b-83ad-00968aae2532
zakariya-sab/Cpp_Practice_Exercises
exe_11.c++
//check Average of 3 Mark #include <iostream> #include <cmath> #include <string> using namespace std ; enum enMark{fail , pass }; void read_Mark(float & Mark1,float &Mark2,float &Mark3){ cout << "Enter Mark1 = "; cin >> Mark1; cout << "Enter Mark2 = "; cin >> Mark2; cout << "Enter Mark3 = "; ...
ALGO
0.997568
3.093796
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2025-02-11T14:27: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": "07608ec4653...
3616c51d-10bf-497a-9384-4d1fe7c995cb
JericaLiu6642/IC1
HW4_E24116071/HW4_E24116071/HW4_E24116071.cpp
// HW4_E24116071 #include <iostream> // allows program to output data to the screen #include <cstdlib> // for displaying random number #include <ctime> // for generate random number using namespace std; int AnswerGenerator() { int a1, a2, a3, a4; // the four digits of answer int answer; do { srand(time(0)); ...
ALGO
0.99512
3.150381
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-02-17T06:26: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": "67b3ad2995e0...
7e833618-8f81-4273-98d0-92b203f411e1
its-yogesh-v/DSALeetCode
0733-flood-fill/0733-flood-fill.cpp
class Solution { public: vector<vector<int>> floodFill(vector<vector<int>>& image, int sr, int sc, int color) { vector<vector<int>> floodFilledImage = image; vector<vector<bool>> vis(image.size(), vector<bool>(image[0].size(), false)); dfs(floodFilledImage, ...
ALGO
0.998427
6.589456
{ "github_metadata": { "branch": "main", "commit_count": 1319, "repo_created_at": "2022-05-20T03:24:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "417d81486...
e1fbb4a2-48dc-4b9b-aee8-7a92da703c44
ishandutta2007/codeforces-b
baba/normal/906/A.cpp
//TooWeakTooSlow #include<bits/stdc++.h> using namespace std; typedef pair<int,int> II; typedef vector< II > VII; typedef vector<int> VI; typedef vector< VI > VVI; typedef long long int LL; #define PB push_back #define MP make_pair #define F first #define S second #define SZ(a) (int)(a.size()) #define A...
ALGO
0.999511
3.40792
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f4e1ac4fd97e...
520b447d-5f38-4d4a-b18b-b8222322ee93
suyeoniii/baekjoon
2309-일곱난쟁이.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { vector <int> v; int sum = 0; int one = 0; int two = 0; for (int i = 0; i < 9; i++) { int a; cin >> a; v.push_back(a); } sort(v.begin(), v.end()); for (int i = 0; i < v.size(); i++) { for (int j = i + 1; j <...
ALGO
0.999707
3.835045
{ "github_metadata": { "branch": "master", "commit_count": 281, "repo_created_at": "2020-08-22T03:02:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "191ce729...
38bab989-2220-4faf-8a87-a9c4ec888df1
VhahahaV/AlgorithmPactice
code/4_April/04-12/luogu_P3366_prim.cpp
// // Created by CZQ on 2024/4/12. // #include "bits/stdc++.h" using namespace std; //prim算法,需要维护一个最小堆储存 已经构成最小生成树的节点所延伸出去的边,每次pop出最小的一条边 //https://blog.csdn.net/LOOKQAQ/article/details/81304637 //参考链式前向星来存图: //基本概念: //维护一个 weight(边权重),end(边的尾节点),next(下一条同样起始点的边索引) // 维护head数组来储存 i为起点的边再数组edge中所存的第一个位置, struct Graph...
ALGO
0.999957
4.356735
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2024-04-02T08:17:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8c1d39f7eb...
d9370050-22d3-454d-a543-ff40647c0b3e
akshat-shethia/Competitive-Coding-In-Cpp
Dp For Cp Udemy ( Coding Minutes )/Section 6 ( 1-D DP )/Questions From Course/rodCuttingProblem.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define mod 1000000007 #define inf 1e18 #define endl "\n" #define pb emplace_back #define vi vector<ll> #define vs vector<string> #define pii pair<ll, ll> #define ump unordered_map #define mp map #define pq_max priority_queue...
ALGO
0.999925
4.483881
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2024-01-05T11:35: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": "dc77371ab88...
8d5b4a99-f137-4cd6-90f7-3e6ddfb7f041
zuselegacy/leetcode
61-rotate-linked-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* rotateRight(ListNode* head, int k) { ListNode* end =NULL; ListNode* ptr = head; int length = 0; ...
ALGO
0.999954
5.764523
{ "github_metadata": { "branch": "master", "commit_count": 145, "repo_created_at": "2019-12-27T07:46:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7476aab9...
92a988ca-b8ab-4fbe-865a-90e47fe8e324
HiImDarwin/LeetCodePraticing
0126-word-ladder-ii/0126-word-ladder-ii.cpp
class Solution { public: vector<vector<string>> findLadders(string beginWord, string endWord, vector<string>& wordList) { unordered_set<string> dict(wordList.begin(), wordList.end()); if (!dict.count(endWord)) return {}; unordered_map<string, vector<string>> patternMap; for(string word : ...
ALGO
0.999907
5.911661
{ "github_metadata": { "branch": "main", "commit_count": 2145, "repo_created_at": "2025-05-25T06:16: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": "b1e79da63...
22b2373e-f676-4476-9b4e-ba6008ab6a77
Darpan-2002/Template
modular.cpp
// <NAME> // 2112041 // <NAME> // <NAME> // <NAME> // INDIA // Real Madrid #include<bits/stdc++.h> using namespace std; #define raftaar ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); #define ll long long #define fr(x,y) for(ll x=0; x<y; x++) #define fr1(x,t,y) for(ll x=t; x<y; x++) #define fr3(x,t,y) for...
ALGO
0.999849
3.905994
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-01-31T07:22: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": "e0f30f737a13...
63d1e3c6-fca2-4189-a1f3-54820c4ec332
marfra99x/AoC
2021/08/task-2.cpp
#include <fstream> #include <iostream> #include <vector> #include <algorithm> #include <utility> #include <limits> using namespace std; bool isSubsetOf(string subset,string set){ for(int i=0; i<subset.length(); i++) if (set.find(subset[i]) == string::npos){ return false; } return true; } bool ...
ALGO
0.999436
3.816019
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-11-27T14:48:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bbeac17f88e...
e066e004-490b-4e17-826e-cd806ba6921e
isanchez-aguilar/UVa-Solutions
337 - Interpreting Control Sequences.cpp
/* * User: Isanchez_Aguilar * Problem: UVA 337 - Interpreting Control Sequences */ #include <bits/stdc++.h> #define x first #define y second using namespace std; typedef pair<int, int> ii; ii cursor; bool insertMode; char terminal[10][10]; inline void writeOnTerminal(char c) { if (insertMode) { for (int i = 9;...
ALGO
0.989571
3.494256
{ "github_metadata": { "branch": "master", "commit_count": 464, "repo_created_at": "2017-05-23T02:35:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 11, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "d901a0...
af94dc5a-34d5-44d3-93be-2fa6668ff70f
HandongProblemSolvers/Problem-Solving
problems/Shortest Path/BOJ 11562/유한영.cpp
// Created by <NAME> on 16/07/2019. // Copyright © 2019 <NAME>. All rights reserved. #include <iostream> #include <algorithm> using namespace std; const int INF = 999; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int n,m; int map[252][252]; cin>>n>>m; for(int i=0;i<=n;i++){ ...
ALGO
0.999906
4.249122
{ "github_metadata": { "branch": "master", "commit_count": 1140, "repo_created_at": "2019-02-26T03:13:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2234b63...
6a4673f1-a258-4af4-b906-dc0ae152bf54
Master-cai/image_retrieval_demo
query.cpp
#include <iostream> #include <fstream> #include <vector> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <opencv2/features2d/features2d.hpp> #include <DBoW3/DBoW3.h> #include <experimental/filesystem> #include <regex> using namespace std; using namespace cv; vector<string> getFilesInD...
TEST
0.941449
5.481252
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-05-12T14:37:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d91fd66c3c41...
c5b1322e-8bbe-447d-ae3a-ae6a04d53028
Khalil002/miosix-buddy-allocator
miosix/kernel/scheduler/edf/edf_scheduler.cpp
/*************************************************************************** * Copyright (C) 2010-2025 by <NAME> * * * * This program is free software; you can redistribute it and/or modify * * it under the terms...
TOOL
0.979387
6.656478
{ "github_metadata": { "branch": "buddyalloc", "commit_count": 2279, "repo_created_at": "2025-05-29T12:09: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": "7c9...
99edb352-8b16-4f7f-9826-6955d43ef8fe
pmatsinopoulos/cpp-tutorials
async example/main.cpp
// // main.cpp // async example // // Created by <NAME> on 16/5/21. // #include <iostream> #include <numeric> #include <future> #include <vector> using namespace std; double accum(double* beg, double* end, double init) { return accumulate(beg, end, init); } double comp4(vector<double>& v) { if (v.size() < 10...
ALGO
0.998272
6.094186
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2021-03-14T06:31: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": "5e3d81d1e98...
749b0136-4d2d-46bf-ab22-9f802dafb26f
iorch/AmiGo
include/engine.h
#ifndef __ENGINE_H__ #define __ENGINE_H__ #include "amigo.h" #include <array> namespace amigo { class engine { policy policy_; gut value_; struct node_; using shared_node_ = std::shared_ptr<node_>; // It seems that is better to have dinamic allocation (at least for size ) // the price is...
ALGO
0.995799
5.752228
{ "github_metadata": { "branch": "master", "commit_count": 51, "repo_created_at": "2016-03-22T21:14:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "7285bb47e...
7f431adc-598f-4ca1-864b-5d110f04daa3
JoannaKang/cpp-practice
main.cpp
#include "stdio.h" #include "stdlib.h" #include <vector> #include <iostream> namespace Joanna { template <class T> class Queue { public: void push(T item) { data.push_back(item); } T pop() { if(!empty()) { T returnValue = data[0]; data.erase(data.begin())...
TOOL
0.971246
3.924999
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-01-06T22:22: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": "e7c52528b9be...
27606e9c-9283-4fb2-bcea-d8aeeccfa10d
WizardPenguin/competative-programming
upsolving/1644D.cpp
#pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef pair<double,double> p...
ALGO
0.999926
5.387302
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2022-10-06T16:10: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": "e9959a120...
1125d6ed-5672-46d8-8fee-d61da99248c3
Stymphalian/AOC24
include/day11.hpp
#pragma once #include "utils.hpp" class Day11 { public: list<std::string> _nums; Day11() {} virtual ~Day11() {} void ReadInput(bool readTest = false) { std::ifstream file(readTest ? "res/Day11/test.txt" : "res/Day11/input.txt"...
ALGO
0.989192
5.257402
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2024-12-14T06:16: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": "f9568c2085b...
0747193f-93a9-4986-b2d1-0d10ee3aebb6
Jason0803/Algorithm_ProblemSolving
Algorithm_cpp/1654/main.cpp
#include <iostream> #include <vector> using namespace std; int k, n; long long result; bool check(const vector<long long> &list, long long length) { int ret = 0; for(long long a : list) { ret += a/length; } return ret >= n; } int main() { ios_base::sync_with_stdio(false); cin.tie(); cout...
ALGO
0.999972
4.095686
{ "github_metadata": { "branch": "master", "commit_count": 112, "repo_created_at": "2017-11-03T00:26:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e615d8a6...
d4427d1b-90ea-4fa2-abfc-2f0513654730
Hitesh-s0lanki/DSALeetcode
Binary Search Tree/Validate_BST.cpp
#include<iostream> #include<vector> #include<climits> using namespace std; class TreeNode{ public: int val; TreeNode* left; TreeNode* right; TreeNode(int val){ this->val=val; this->left=NULL; this->right=NULL; } }; void print(TreeNode* root){ if(root==NULL) re...
ALGO
0.999991
4.856938
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2023-05-21T08:01:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c8a5654f...
0de3679c-4c41-4876-b4bc-43c8486e0eb5
saad-deshmukh/Daily-DSA-Practice
STRING/leetcode1859.cpp
#include <bits/stdc++.h> using namespace std; string sort_sentence(string s) { vector<string> words(10); // assuming sentence has max 9 words string temp; for (int i = 0; i < s.size(); ++i) { if (s[i] != ' ') { temp += s[i]; } else { int pos = temp.back() - '0'; ...
ALGO
0.999839
4.763869
{ "github_metadata": { "branch": "main", "commit_count": 112, "repo_created_at": "2024-09-13T04:59: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": "ead714d548...
a02bc227-ab02-4ae6-bfc9-916ec58214ac
UltraProton/PlacementPrep
BackTracking/firsttime/permutations.cpp
#include<bits/stdc++.h> using namespace std; void permuteStanford(string &str,string chosen); void permuteBest(string str,int l,int r); void permuteMy(string &str, int idx, string chosen); void tab(int n); int main(){ string str="abc"; //permuteStanford(str,""); //permuteMy(str,0,""); permuteBest(str,...
ALGO
0.99992
4.256485
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2019-09-30T20:44: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": "476507272...
0e9f2edd-c023-4927-9b41-b9e7e43d69ba
purwar2016/PreciseMovement-library
src/CatmullRom.cpp
#include "CatmullRom.h" #include <Arduino.h> CatmullRom::CatmullRom() { } // Constructor CatmullRom::CatmullRom(float* pathX, float* pathY, int numPoints) { setPoints(pathX, pathY, numPoints); } // Set the data points. void CatmullRom::setPoints(float* pathX, float* pathY, int numPoints) { _pathX = pathX; ...
ALGO
0.961821
5.32397
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2018-11-11T03:25:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 9, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "6f03d4fd0...
ff4f1727-33b3-432e-87fd-3464398ba0c5
Mostafa229Gh/N-Queens-Problem-Solver
N-Queens.cpp
#include <iostream> #include <vector> #include <string> #include <cmath> using namespace std; bool isSafe(const vector<int> &board, int row, int col) { for (int i = 0; i < row; i++) { if (board[i] == col || abs(board[i] - col) == abs(i - row)) { return false; } } ret...
ALGO
0.999978
5.77563
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-01-06T18:31: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": "c0b84f1c02...
a62e2b0a-f74c-4bc6-ad13-3b61c3b18221
giriraj761/DSA
4th_sem/SCHOOL/#3rd sem/oops/lab 10/q1.cpp
#include <iostream> using namespace std; template <class t1, class t2> void add(t1 **a, t2 **b, int m, int n) { cout << "Sum is:" << endl; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { cout << a[i][j] + b[i][j] << " "; } cout << endl; } } int m...
ALGO
0.997073
4.121866
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-02-16T18:44: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": "c34ea93b2638...
d197dc51-5105-4477-86de-6fbc7bd3f787
ANKerD/competitive-programming-constests
training/pomba-1/b/code.cpp
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define ii pair<int, int> #define ld long double #define ll long long #define vi vector<int> #define vll vector<ll> #define vii vector<ii> #define sc scanf #define maxn -1982979 struct pt { ld x, y; pt operator - (pt o) { return {...
ALGO
0.999829
3.614937
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2018-05-14T01:24:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b00c54225...
8fa0bc09-3367-4004-a8bf-5c8f73630f05
abhimanyu891998/AdventOfCode2021
day02/day2.cpp
#include <iostream> using namespace std; void firstWayToSteer(const string &instruction, int &val, int &x, int &y) { if(instruction == "forward") x+= val; else if(instruction == "down") y+=val; else if(instruction == "up") y-=val; return; } void...
ALGO
0.999911
4.569098
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2021-12-04T15:46:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48333411f...
6c090695-0869-45d1-9a0c-43b2a0dfaa82
sky-full-of-stars/competitive-programming
Solutions/Codforces/1294C.cpp
#include "bits/stdc++.h" #ifndef ONLINE_JUDGE #include <bits/headerfile.hpp> #else #define dbg (...) #endif //---------------------------------------------------------------------------------------------------------// using namespace std; #define int long long int #define cont continue; #define ff first #define ss s...
ALGO
0.999825
4.388736
{ "github_metadata": { "branch": "master", "commit_count": 252, "repo_created_at": "2022-01-21T09:07: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": "d293d5c2...
66550941-69de-41d9-b56b-255af85d72a5
maharshi6864/college_programs
Sem3/OOPs/cpp_class_assignmnets(80programs)/with_return_with_argument/min_from_3_numbers_using_ternary.cpp
#include <iostream> using namespace std; class MinFrom3NumbersUsingTernary { public: int minFrom3NumbersUsingTernary(int a, int b, int c) { return (a < b) ? ((a < c) ? 1 : 3) : ((b < c) ? 2 : 3); } }; int main() { MinFrom3NumbersUsingTernary ter; int a, b, c; cout << "enter value of a : "; cin >> ...
ALGO
0.999852
4.715535
{ "github_metadata": { "branch": "master", "commit_count": 144, "repo_created_at": "2023-07-30T13:17: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": "d243fb6a...
8ba73088-63d1-43bb-b924-cb7117894dc6
brun-no/AtividadesCpp
Contador de Caracteres.cpp
/* Nome: Contador de Caracteres Autor: @brunno_u Data: 1X de maio de 20XX Descricao: Programa para contar a quantidade de números, vogais, consoantes e símbolos em um arquivo. */ #include <string.h> // Biblioteca para manipulação de strings #include <stdio.h> // Biblioteca padrão de entrada e saída in...
TOOL
0.977388
3.802955
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-06-19T20:38: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": "a9894ab42f4d...