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
9024423a-3da9-46c2-a892-629e2a22ac4e
Arom1a/competitive-programming
cses/tasks_and_deadlines.cpp
// https://cses.fi/problemset/task/1630 // greedy algorithm #include "bits/stdc++.h" typedef long long ll; using namespace std; template <typename T> void print_vector(const vector<T> &my_vec) { for (const T &i : my_vec) cout << i << ' '; cout << endl; } int main() { // input int n; cin ...
ALGO
0.999945
4.396625
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2023-12-26T05:59: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": "2cc55f74b32...
d8eab8e6-29c1-4172-8bf6-47b1274056bd
amanprasad2707/CPP
Leetcode/2596.check-knight-tour-configuration.cpp
/* * @lc app=leetcode id=2596 lang=cpp * * [2596] Check Knight Tour Configuration */ #include <iostream> #include <vector> using namespace std; int main() { return 0; } // @lc code=start // time complexity: O(8ⁿ)² // space complexity: O(n²) class Solution { public: bool isPossible(vector<vector<int>> &grid,...
ALGO
0.999832
6.705751
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2024-09-11T16:06:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50efeb06f57...
9c353368-86eb-413b-a68f-40184cbc59c8
mousebird-consulting-inc/WhirlyGlobe
common/local_libs/aaplus/AAInterpolate.h
/* Module : AAINTERPOLATE.H Purpose: Implementation for the algorithms for Interpolation Created: PJN / 29-12-2003 Copyright (c) 2003 - 2015 by <NAME> (Web: www.naughter.com, Email: <EMAIL>) All rights reserved. Copyright / Usage Details: You are allowed to include the source code in any product (commercial, sharew...
ALGO
0.914999
5.75335
{ "github_metadata": { "branch": "main", "commit_count": 11831, "repo_created_at": "2012-01-09T18:51:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 835, "forks": 261, "issues": 115, "pull_requests": 2 }, "file_meta": { "content_id": "35a...
8fd684b4-2836-40ed-9eba-ac5fdf72e639
shRamim13/geeksFORgeeks
Count Inversions.cpp
class Solution { public: int cnt = 0; void merge(vector<int> &arr, int i, int mid, int j) { vector<int> v; int lft = i; int rgt = mid + 1; while (lft <= mid && rgt <= j) { if (arr[lft] <= arr[rgt]) { v.push_back(arr[lft++]); ...
ALGO
0.999977
5.384064
{ "github_metadata": { "branch": "main", "commit_count": 108, "repo_created_at": "2025-01-06T13:49: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": "90cffd15ee...
cfaf62e8-0bc2-4ba4-a378-7f0c9dd77290
Enemy89/21.3
untitled12/main.cpp
#include <iostream> #include <cmath> enum command { add, subtract, scale, length, normalize }; struct vector { double x; double y; }; void add_C(double* x1, double* y1) { std::cout<<"Enter the coordinates of the second vector (x, y):"<<std::endl; double x2,y2; std::cin>>x2>>y2; *x1+=x2; ...
TOOL
0.984089
3.41378
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-09-10T10:15: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": "9b4c22162004...
124934db-af95-463c-bfb0-652014904aed
yuzhu2019/hg_l1
subset_sum_closest.cpp
#include <math.h> #include <stdio.h> #include <string> #include <random> #include <iostream> #include "mex.h" unsigned int count_nonzeros(unsigned int * arr, unsigned int n){ unsigned int count = 0; for (unsigned int i=0; i<n; i++) { if (arr[i] != 0) count++; } return count; } void...
ALGO
0.999984
4.639626
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-09-30T16:43:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3bd98f71bfc1...
278b2277-1ada-4a36-9477-03c8db0ec81d
Nahyeonnnn/Algorithm
백준/Gold/1106. 호텔/호텔.cc
#include <iostream> #include <vector> using namespace std; #define INT_MAX 2147483647 int main() { int c, n; cin >> c >> n; // c: 확보할 호텔의 고객 // n: 홍보할 수 있는 도시의 개수 vector<pair<int, int>> city(n); vector<int> dp(c+101, INT_MAX); for (int i=0; i<n; i++) { int temp1, temp2; c...
ALGO
0.99986
3.350231
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2024-11-22T13:53: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": "bb708fda3c0...
b208fb01-053b-40c3-b3cc-58d6e509647d
xtensor-stack/xtensor-blas
include/xflens/cxxlapack/interface/gtsvx.h
/* * Copyright (c) 2012, <NAME>, <NAME> * * 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 retain the above copyright * notic...
ALGO
0.994183
6.742596
{ "github_metadata": { "branch": "master", "commit_count": 366, "repo_created_at": "2017-03-31T08:48:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 168, "forks": 63, "issues": 50, "pull_requests": 6 }, "file_meta": { "content_id": "832c1...
f5e30cb2-2b08-4a92-a5f0-878803043884
ErandBizati/project3
DblLink.h
/** * file DblLink.h * author <NAME> * date 21 October 2023 * * brief Doubly-linked list in C++. * * details this file contains the doubly linked definition and iterator for traversal */ #ifndef DBLLINK_H #define DBLLINK_H #include "Node.h" // headerfile inclusion template <class eltType...
TOOL
0.900074
5.780448
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-11-01T16:27:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "eecadec21641...
fb7e56af-bb19-4bd8-8de9-53e186ea2762
khalilia2000/Car-ND-Unscented-Kalman-Filter
src/tools.cpp
#include "tools.h" using Eigen::VectorXd; using Eigen::MatrixXd; using std::vector; Tools::Tools() {} Tools::~Tools() {} VectorXd Tools::CalculateRMSE(const vector<VectorXd> &estimations, const vector<VectorXd> &ground_truth) { /** * Calculate the RMSE here. */ VectorXd rmse(...
ALGO
0.993968
6.136934
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2017-03-22T18:30: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": "5e78521c7...
c2d43363-54c5-4a59-a7ef-e98baf40734e
zeyuanxy/hacker-rank
practice/algorithms/warmup/sherlock-and-queries/sherlock-and-queries.cpp
#include <iostream> #include <vector> #include <map> using namespace std; int main() { int N, M; cin >> N >> M; vector<long long> A, B, C; map<int, int> factor; for (int i = 0; i < N; ++i) { int ele; cin >> ele; A.push_back(ele); } for (int i = 0; i < M; ++i) { in...
ALGO
0.99999
4.21264
{ "github_metadata": { "branch": "master", "commit_count": 273, "repo_created_at": "2014-08-20T04:16:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad3b9f03...
7cbbc547-ff5a-4208-addc-640dae9c7085
Aleksandra204/Metody-numeryczne
Sprawozdania/sprawozdanie2/zad2/10/sor.cpp
#include <iostream> #include <fstream> #include <cmath> const int n = 10; // const int n = 20; int main() { double eps[2] = {0.01, 0.0001}; double omega_start = 0.10; double omega_end = 1.90; double omega_step = 0.05; double a[n][n], b[n], x[n] = {0}, prev_x[n]; double sum1 = 0, sum2 = 0, norm...
ALGO
0.999864
4.965559
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-03-06T18:14: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": "412660093908...
b5dcc594-d40d-4eec-9622-bcf52a713a5a
JeongbinPark/ProblemSolving_BOJ
11066_mergeFiles.cpp
#include <iostream> #include <algorithm> #include <string.h> using namespace std; int getMin(int, int); int t, k, mini; int file[501]; int preSum[501]; int dp[501][501]; int main() { cin >> t; while (t--) { memset(dp, 0, sizeof(dp)); cin >> k; for (int i = 1; i <= k; i++) { cin >> file[i]; preSum[i] =...
ALGO
0.99986
3.370508
{ "github_metadata": { "branch": "main", "commit_count": 143, "repo_created_at": "2021-01-21T11:34: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": "cd7bc9d59a...
911428dc-a793-440a-9000-7604c5a93dde
weeebdev/contests
898/D.cpp
// <NAME> // chrono::system_clock::now().time_since_epoch().count() #include <bits/stdc++.h> #include <iostream> #define pb push_back #define eb emplace_back #define mp make_pair #define fi first #define se second #define all(x) (x).begin(), (x).end() #define sz(x) (int)(x).size() #define rep(i, a, b) for (int i = (a);...
ALGO
0.999804
3.812358
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2023-12-12T12:22: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": "e99ae040be...
75c7fc3f-7807-4848-ac48-edd0c3ff5f2c
akhikolla/testpackages
fuzzedpackages/slopeOP/src/op2d.h
// MIT License // Copyright (c) 2019 <NAME> #include "linalg.h" #include <algorithm> #include <assert.h> #include <cmath> #include <iostream> #include <numeric> #include <vector> template <typename Tx, typename Ty> struct Point { Tx x; Ty y; Point(); Point(Tx x, Ty y) : x(x), y(y){}; Point(Point<Tx, Ty> &p)...
ALGO
0.995943
5.309207
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-01-15T17:42:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "707300a312...
259d1a48-4243-4353-9deb-71615410be6f
BigSecret1/leetcode
2024/Sep/Split Linked List in Parts.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: vector<ListNode*> spl...
ALGO
0.99994
5.790129
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2022-10-02T08:21: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": "c95259abf...
d7029922-be1a-4a09-94a7-0651c0af6c23
Petro2806/Notebook
builder/content/data-structures/convex-hull-trick.hpp
/** * Description: $\text{add}(a, b)$ adds a straight line $y = a x + b$. * \texttt{getMaxY(p)} finds the maximum $y$ at $x = p$. **/ struct Line { LL a, b, xLast; Line() {} Line(LL _a, LL _b): a(_a), b(_b) {} bool operator<(const Line& l) const { return MP(a, b) < MP(l.a, l.b); } bool operator<(int x) c...
ALGO
0.999233
4.121552
{ "github_metadata": { "branch": "main", "commit_count": 375, "repo_created_at": "2023-08-07T12:08:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "e6fba0cfff...
f8c0b346-f6bf-4ce9-9dd7-80940c7293a0
doanminh1709/ALGORITHM-APPLICATION
BaiTapVeMang/SlidingWindown.cpp
#include<iostream> using namespace std; //Tinh tong lon nhat cua day con co k phan tu lien tiep int main(){ int t;cin>>t; while(t--){ int n , k; cin>>n>>k; int a[1001]; for(int i = 0 ; i < n ; i++)cin>>a[i]; int sum = 0, id; //tinh cua so dau tien for(int i = 0 ; i < k ; i++){ sum+=a[i];...
ALGO
0.999946
3.771018
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2023-10-30T03:10:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a9ff142b56...
bd238a6e-b7d7-4473-8831-ff53e956192e
sulav063/6th-Sem-23081003
Compiler Design and Construction/Lab 1/dfd_1010.cpp
#include <iostream> #include <string> using namespace std; struct Node { string name; bool final; Node* zero; Node* one; Node() { name = ""; final = false; zero = NULL; one = NULL; } void set(string n, bool f) { name = n; final = f; ...
ALGO
0.999947
6.256008
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-06-11T11:42: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": "9914ff909fba...
ea918317-5359-4c18-8775-f041826f15ba
YaeSaraki/OI
Algorithms/Nowcoder/Contest/2023河南萌新联赛第(二)场:河南工业大学/爬山.cpp
/** * @problem: * @link: * @category: * @date: * @Author: YaeSaraki **/ #include <algorithm> #include <iostream> #include <unordered_map> using namespace std; using ll = long long; #define int long long inline void solve() { int n, p; cin >> n >> p; int maxx = 0; int sum = 0; unordered_map<int, int> m; ...
ALGO
0.999858
3.647623
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2022-11-25T08:48:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f5805c538f...
cc6ff241-52ae-4d20-9c7b-2cfa127c0970
Angellopp/CodeForces-Problems
B_A_Balanced_Problemset.cpp
#include <bits/stdc++.h> #define endl '\n' #define dd(x) cerr << #x << "= " << x << "." << endl; #define ll long long #define all(x) x.begin(), x.end() #define rall(x) x.rbegin(), x.rend() #define fastio ios_base::sync_with_stdio(false); cin.tie (NULL) using namespace std; void solve() { int n, x; cin >> n >> ...
ALGO
0.999974
4.860489
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-02-28T04:36: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": "e2b9c7d6e9f...
89e4f2e3-ad94-470e-9bc0-fc85745f37e7
simonnguyen175/cp-repo
training/thaydong/DDT/lesson 22/tab.cpp
#include<bits/stdc++.h> #define pi pair<int,int> #define fi first #define se second #define pb push_back using namespace std; const int N = 55; int t, m, n; int a[N][N], ans[N][N]; struct tt{ int u, v, s, t; }; void solve(){ cin >> m >> n; int col[N]; memset(col, 0, sizeof col); for (int i = 1; ...
ALGO
0.999954
3.083651
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-11-16T14:21: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": "cad72a5b02...
75a5ff29-1643-4e83-bb16-c556b1c73801
seyone22/dev
Random/array_DataTable.cpp
//Author: S.G.Seyone (2019/ICT/46) //This program will accept user input to create an array of given size, and then largest, smallest, and total of it. #include <iostream> #include <sstream> #include <cstring> using namespace std; //returns user input as integer int sanitizedInputs() { string input; int out...
ALGO
0.994005
4.135279
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2021-07-08T09:23:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4a1ffb2...
17342c21-5f1e-404b-8265-9b87928813ec
Lamiiine/Competitive-Programming-1
Solutions/CodeForces/A2OJ ladder 16/225C.cpp
#include <bits/stdc++.h> #define MAX 1024 #define OO 100000000 using namespace std; int n, m, x, y; char arr[MAX][MAX]; int count_black_in_col[MAX] = { 0 }; int memo[MAX][MAX][2]; inline int blackening_cost(const int c) { return n - count_black_in_col[c]; } inline int whitening_cost(const int c) { return count_black_...
ALGO
0.999762
4.354209
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2019-09-23T14:40:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c26f6be6...
1e131447-0bf4-4d2a-9e7d-8b7ccb4c6a1a
abhi-biswas/spoj-solutions
BALLOT.cpp
/* <NAME> CSE (2017-2021) <NAME> */ #include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define INF 1e15 #define ll long long #define ld long double #define int ll #define pii pair<int,int> #define pli pair<long long,int> #define pll pair<long long,long long> #define MAX 1000009 #define pb push_back #...
ALGO
0.999991
3.356442
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2019-04-04T19:58:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c28768db...
a2630582-e902-4af6-bc8f-586b8f6e1ff6
Ali-Elshorpagi/algorithms
backtracking/LeetCode_797.cpp
#include <iostream> #include <vector> using namespace std; typedef vector<int> vi; typedef vector<vi> vvi; #define _CRT_SECURE_NO_DEPRECATE #define __elshorpagi__ (ios_base::sync_with_stdio(false), cin.tie(NULL)) #define sz(v) ((int)((v).size())) #define edl '\n' #define fc(it, v) for (auto &(it) : (v)) class Solut...
ALGO
0.999809
5.361712
{ "github_metadata": { "branch": "main", "commit_count": 396, "repo_created_at": "2022-10-02T12:38:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dba72ea672...
1df21581-6e77-4de7-bb34-04a1573fb4c1
athallahyoga11/Strukdat-B
Persiapan fp/graphlist.cpp
#include <iostream> #include <list> #include <iterator> #include <queue> using namespace std; class Graph{ private: int V; vector<list<int>> adj; public: Graph(int V){ this->V = V; adj.resize(V); } void addEdge(int v, int w){ adj[v].push_back(w); } void showV...
ALGO
0.999066
4.324692
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-11-09T03:29: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": "21bd0ad7ff95...
cbf724a3-d422-438c-9e1a-da9415b9a825
ishandutta2007/codeforces-d
demon1999/normal/734/C.cpp
#include <bits/stdc++.h> #define forn(i, n) for (int i = 0; i < n; i++) #define re return #define sz(a) (int)a.size() #define mp(a, b) make_pair(a, b) #define fi first #define se second using namespace std; typedef long long ll; typedef pair<int, int> pii; ll n, m, k; ll x, s; ll ans; vector<pair<ll, ll> >...
ALGO
0.999307
3.628937
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31: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": "66a21c394632...
f57c96ad-4ec6-49e3-949d-476d3cba09f3
arif-z04/Competitive-Programming
Maths/Number-theory/Primes/prime-test.cpp
#include <bits/stdc++.h> using namespace std; using namespace std::chrono; using i64 = long long int; using uInt = unsigned int; using ui64 = unsigned long long int; using vi = vector<int>; using vii = vector<i64>; using vc = vector<char>; using udouble = long double; using vd = vector<double>; using vs = vector<stri...
ALGO
0.999845
5.035818
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2024-12-09T13:16: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": "51432873876...
7c65bfc0-484f-4b47-96ad-b03a2fbaf7a7
ishandutta2007/codeforces-t
tabasz/normal/883/B.cpp
#include<bits/stdc++.h> #define PII pair<int,int> #define f first #define s second #define VI vector<int> #define LL long long #define MP make_pair #define LD long double #define PB push_back #define ALL(V) V.begin(),V.end() #define abs(x) max((x),-(x)) #define PDD pair<LD,LD> #define VPII vector< PII > #define siz(V...
ALGO
0.999957
3.416348
{ "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": "1995a97186b6...
2a991ab1-8b4f-4bd0-9f7d-fb108acaebf9
RajputSumitSingh/Practice-Data-Structure-Algorithm
Session 37/createTree.cpp
#include<iostream> #include<queue> using namespace std; class Node{ public: int data; Node *left; Node *right; Node(int data){ this->data = data; this->left = NULL; this->right = NULL; } }; Node *buildTree(){ int data; cout << "Enter the data : "; cin >> data; if(data == -1){ re...
ALGO
0.999531
4.268488
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-11-09T17:20:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ef642a3c3...
caf1d4b7-f303-4006-9b75-422885fe77c4
vipin2909/dsa-topicwise-solutions
2d-arrays/sub-matrix-sum-queries.cpp
#include<bits/stdc++.h> #define mp make_pair #define mt make_tuple #define fi first #define se second #define pb push_back #define sz(x) (int)((x).size()) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define forn(i, n) for(int i = 0; i < (int)(n); i++) #define for1(i, n) for(int i = 1...
ALGO
0.9999
4.721377
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2024-01-02T05:53: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": "63c79db5b...
a07c3f97-0f18-4309-8088-ea388c291865
DarkImpact1/DSA_DPP
Lec9/OddEven.cpp
#include <iostream> using namespace std; struct Node { int data; Node* next; }; Node* insertNode(Node* head, int data) { Node* newNode = new Node; newNode->data = data; newNode->next = head; return newNode; } Node* rearrangeLinkedList(Node* head) { Node* evenHead = nullptr; Node* even...
ALGO
0.999986
5.797681
{ "github_metadata": { "branch": "main", "commit_count": 46, "repo_created_at": "2023-09-23T18:18: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": "653c73a143b...
ff7c870c-f9cc-45e6-8c1c-46c93eb9c1a5
feliciajcln/socs-binus-2021
OLQ-9/Jawaban_Problem_4_Desperate_Horse.cpp
#include <stdio.h> int sum = 0, tile[8][8]; int convert (char a){ switch (a) { case 'A': return 0; case 'B': return 1; case 'C': return 2; case 'D': return 3; case 'E': return 4; case 'F': return 5; case 'G': return 6; case 'H': return 7; case '1': return 7; case '2': ...
ALGO
0.999385
4.033612
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-09-23T15:15:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d63efa0d4c23...
a1bca6ee-3d11-4b7d-ac0d-203ec4964a07
nikhilij/data-structure-apna-college
ds/robotbounded.cpp
#include <iostream> #include <vector> using namespace std; class Solution { public: bool isRobotBounded(string &s) { int x = 0, y = 0; // basicall there could be 4 directions // north // west // south // east vector<vector<int>> directions = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}}; ...
ALGO
0.999823
5.244943
{ "github_metadata": { "branch": "master", "commit_count": 199, "repo_created_at": "2024-06-23T16:37: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": "ebd3b33c...
4e3958d7-59b9-40a2-a4c9-9994b2d7ec83
BellaLiu112/c-
week10/proj_9.cpp
#include <iostream> #include <set> #include <iterator> #include <algorithm> using namespace std; // 在此处补充你的代码 class A{ public: int m_age; char m_species; A(int k):m_age(k),m_species('A'){ } }; class B: public A{ public: B(int k):A(k){A::m_species = 'B';} }; struct Comp { bool operator() (A *l...
ALGO
0.997733
3.5926
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-10-28T08:44: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": "048b2348d0...
8ffd867e-b7af-486a-9288-1c6f625c8853
CSUwangj/LeetCode
909.snakes-and-ladders.2.cpp
/* * @lc app=leetcode id=909 lang=cpp * * [909] Snakes and Ladders */ // @lc code=start class Solution { pair<int, int> getCoordinate(int n, int pos) { int rowOffset = (pos - 1) / n; int colOffset = (pos - 1) % n; int row = n - 1 - rowOffset; int col = rowOffset % 2 ? n - 1 - colOffset : colOffs...
ALGO
0.999949
6.582294
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2020-10-10T01:43: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": "916ac063b...
a3c7e822-56ef-457e-8bcb-a4abb94da7a7
Junaid-D/labproj
Grad/LSR_siggen_with_filtering_alt/LSR_siggen_with_filtering_alt.ino
#include <TimeLib.h> #include <LiquidCrystal.h> unsigned long previousMillis = 0; // will store last time ADC queried int ADCpin = A0; byte flag = 0; const byte numStamps = 5; //n const byte averagePeriod = 10; //t // constants won't change: const int sampleRate = 120; const float slowRate = 0.1; const long in...
ALGO
0.923138
4.424229
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2019-07-14T18:34:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "70ecca3a...
3bd63a08-98da-4eea-9602-35ee29cae21a
RickyChiang2003/MyCode
sophomore/ADA/HW4/P19.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> using namespace std; # define ll long long # define Q_MAX 500001 # define y_MAX 500000000000001 # define y_MIN 0 vector<ll> kiwibuf(Q_MAX); multiset<ll> set_l, set_r; ll mid_l, mid_r = y_MAX, mid_real; ll len_l, len_r, len_real, tol_l, tol_r; ...
ALGO
0.999532
4.339976
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2024-02-20T08:45:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c51083c55...
83c998ae-4c5c-4af7-88b3-e7c328c7330d
etweaver/HD163296-CO-Fit
modelEval.cpp
//modelEval.cpp //given a set of parameters, make and evaluate a model disk #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <cstdlib> #include <fstream> #include <iostream> #include <ostream> #include <random> #include <utility> #include <vector> #include "vcl/vectorclass.h" #include ...
ALGO
0.976956
4.871471
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2020-12-11T00:22:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c3eac48fefa...
363c581c-c85b-489b-8d28-d1dc0ab035bd
Deepsavani/DES-Decryption-Implemented-in-Vivado-HLS
DES_DEC_Vivado_HLS/DES_DEC/unroll_loop1_2/syn/systemc/des_dec_IP.h
// ============================================================== // Vivado(TM) HLS - High-Level Synthesis from C, C++ and SystemC v2019.1 (64-bit) // Copyright 1986-2019 Xilinx, Inc. All Rights Reserved. // ============================================================== #ifndef __des_dec_IP_H__ #define __des_dec_IP_H__...
ALGO
0.929966
4.754381
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-02-23T05:58: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": "9eb67c9a08...
ac774c33-f6a0-4f71-bf0b-f9737cafb9c3
PEAK-UPV/HLSinf
src/direct_convolution.cpp
/* * HLSinf accelerator * Version: 1.0 * copyright (c) 2020, Universidad Politécnica de Valencia (UPV), GAP research group * Date: December 2021 * Author: GAP Research Group (UPV), contact: <EMAIL> * All rights reserved */ #include "conv2D.h" // ------------------------------------------------------------------------...
ALGO
0.939987
3.522903
{ "github_metadata": { "branch": "main", "commit_count": 126, "repo_created_at": "2021-03-12T07:27:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6308b653770...
4264f1b3-ea3e-4808-9c72-0bc37031953f
YestHar/DesignPatterns
ChainOfResponsibility/chainOfResponsibility.cpp
#include <iostream> #include <memory> #include <string> class IssueHandler { protected: std::shared_ptr<IssueHandler> successor_; public: void setSuccessor(std::shared_ptr<IssueHandler> handler) { successor_ = handler; } virtual void resolveIssue(const std::string& issueType) = 0; virtual...
TOOL
0.981353
7.56631
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-10-22T17:07: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": "265e2c66ce5c...
707bfa96-d874-4b61-84a5-42d0e62874d5
Gagneja1512/Cpp-problems
Codeforces/1200/differentialSorting.cpp
#include "bits/stdc++.h" using namespace std; #define max(a, b) (a < b ? b : a) #define min(a, b) ((a > b) ? b : a) #define mod 1e9 + 7 #define FOR(a, c) for (int(a) = 0; (a) < (c); (a)++) #define FORL(a, b, c) for (int(a) = (b); (a) <= (c); (a)++) #define FORR(a, b, c) for (int(a) = (b); (a) >= (c); (a)--) typedef lon...
ALGO
0.999109
3.560438
{ "github_metadata": { "branch": "master", "commit_count": 137, "repo_created_at": "2022-06-25T17:53:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2663b170...
a9f02ff1-d1c6-40c2-84a5-eab183ab482a
hhraymond/apple
algorithm/sort/MergeSort.cpp
/// MergeSort.cpp: /// CopyRight (c) 2012 xxx Inc. All Rights Reserved. /// Author: Allen <<EMAIL>> /// Created: 2012-11-21 #include<vector> using namespace std; /** * Mergesort algorithm (driver). */ template <typename Comparable> void MergeSort( vector<Comparable> & a ) { vector<Comparable> tmpArray( a.siz...
ALGO
0.999989
6.370938
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2013-03-18T13:07: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": "6a357708e...
76c8f8d2-cfb1-4b23-a84f-45ac45f29279
lazywaterpig/BOJ_Problems
Platinum+/Ruby/17379.cpp
#include <bits/stdc++.h> using namespace std; int N, M, r1, r2, c1, c2; char tmp_board[102][102], ans[102][102]; int bcnt=0, clockwise=0; void PrintBoard(){ cout << "YES" << endl; for(int i=1; i<=N; i++){ for(int j=1; j<=M; j++){ cout << ans[i][j]; } cout << endl; } } ...
ALGO
0.999985
3.42598
{ "github_metadata": { "branch": "master", "commit_count": 198, "repo_created_at": "2021-02-20T06:00: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": "8d76f4bf...
49e32c67-47b4-47dd-b336-b0fe9872bb56
hooman96/csma_ca_wlan
simulator.cpp
#include <iostream> #include <list> #include <cmath> #include <math.h> #include <algorithm> // max using namespace std; // randomly calculates negative-exponenetially-distributed-time double nedt(double rate); double pareto(double rate); class Event { double eventTime; bool isArrival; // type 0 public: Event(d...
ALGO
0.996123
4.734414
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2017-03-07T07:00:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 10, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "4c37af0...
4fe7c5ed-19ee-44c3-810d-aad74de54f28
TheBitBiscuit/Course-Work
CS400/Homework/HW5/palindrome.cpp
/** AlligatorTaffy Homework #5 - Palindrome March 29, 2019 **/ #include <iostream> #include <string> #include <stack> #include <algorithm> // Create an empty STL stack globally std::stack<char> reverser; // Function Declarations void isPalindrome(std::string x); // Main Program int main() { // Grab user expression...
ALGO
0.999698
5.45738
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-05-29T19:15:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b60232cb4d0c...
361ed6b6-cc7f-4499-9a51-4640c8c4b461
JacobianDet/CompeteUp
596/D.cpp
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define INF (1LL<<57) #define MV 200001 #define LMV 21 #define ff first #define ss second #define pb push_back #define eb emplace_back #define emp emplace #define whoami(x) cerr<<#x<<" "<<x<<"\n"; #define mp make_pair #define ins insert #define sz siz...
ALGO
0.999887
3.933424
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-08-04T16:37:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "5886b6527e...
b405534e-84ae-44ff-a540-878724369309
JungMinAn/Cpp_assignment
assignment/2nd_assignment/diamond.cpp
#include <iostream> #include <fstream> #include <cstdlib> using namespace std; int main() { ifstream inStream; int numTestCases; inStream.open("input.txt"); if(inStream.fail()) { cerr << "Input file opening failed.\n"; exit(1); } inStream >> numTestCases; ...
ALGO
0.998671
4.167344
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-05-08T04:06: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": "c325ab4f4...
2eba5b28-d235-437c-87ba-a52981ec72ad
Sabuj-Kumar/MyCodes
Spoj Online/BFS_DFS/ELEVTRBL - Elevator Trouble.cpp
#include<bits/stdc++.h> #define pi acos(-1) #define ll long long #define ull unsigned long long #define db double #define ldb long double #define pii pair< int,int > #define pll pair< ll,ll > #define ft first #define sd second #define pb push_back #define pf push_front #define sc( n ) scanf("%d",&n) #define sl( n ) sca...
ALGO
0.999958
3.470971
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-07-13T16:40:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4eed970b6299...
263db68c-3aaf-440e-a897-0ede2ee145e2
azhan3/Competitive_Code
Template/debug.h
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; vector<string> split_args(const string &s) { int f = 0, q = 0; vector<string> args = {""}; for (int i = 0; i < (int)s.size(); i++) { if (s[i] == ',' && !q && !f) { ...
ALGO
0.961466
4.245428
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2022-01-26T18:24:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "764b136b4...
1dbf95d5-451f-45f9-8e90-7f9d71d4d128
tjdphd/coronos
src/cls_lcsolve.cpp
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * * CORONOS||SONOROC - Version 0.1 * * (S)ynthesized (O)bject-based (N)umerical (O)bservatory for (R)HMHD [also RMHD and IRHMD] with (O)ptional (C)UDA-acceleration * * AUTHOR: <NAM...
ALGO
0.995055
4.200335
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2016-03-01T00:11: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": "c9fae6a3...
6c703265-2dfa-42d6-a74c-d766b21fee3f
tsung-wei-huang/ece5960
icp/20200116/solution/hanoi.cpp
#include <iostream> #include <cstring> #include <cassert> // without tabular method int hanoi_naive(int n) { if(n == 1) return 1; return hanoi_naive(n-1) + hanoi_naive(n-1) + 1; } // TODO int memo[31]; int hanoi(int n) { if(n == 1) return 1; if(memo[n] != 0) return memo[n]; memo[n] = hanoi(n-1) + hanoi(n-1...
ALGO
0.999969
4.367643
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2020-01-06T21:01:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba2b135e...
b7b70053-b621-4fae-be50-d77fabe1d2a6
anshuman008/leetcode
Subarray with 0 sum - GFG/subarray-with-0-sum.cpp
//{ Driver Code Starts // A C++ program to find if there is a zero sum // subarray #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution{ public: //Complete this function //Function to check whether there is a subarray present with 0-sum or not. bool subArrayExists(int ar...
ALGO
0.999529
6.228581
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-03-09T13:45: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": "0368faa8ffca...
73125584-c10d-4df2-ae15-4538a9a40be6
ParadoxZW/ANNS
graph_search_sse.cpp
#include <chrono> #include <cstddef> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <cmath> #include <vector> #include <immintrin.h> #include <set> #include <map> #include <utility> #include <algorithm> #include <iostream> #define MAXN 1000100 typedef std::vector<...
ALGO
0.986774
4.646149
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-08-04T13:33: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": "031771a82...
b7aee42d-e23b-448e-a4eb-cb36cc5b50c8
AhmedFathy16019/Search-Engine
Source.cpp
#include <iostream> #include <string.h> #include <sstream> #include <fstream> #include <vector> #include <map> #include <set> #include <list> #include <algorithm> using namespace std; bool helper_sort(pair<string, double> p1, pair<string, double> p2) { return (p1.second > p2.second); } bool helper_unique(pair<string...
ALGO
0.995292
3.34823
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-06-23T17:13: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": "9ac9338f5332...
161a21b3-44f7-43d0-878b-02835cfde825
Themaister/Granite
audio/dsp/dsp.cpp
/* Copyright (c) 2017-2024 <NAME> * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, copy, modify, merge, publish, ...
ALGO
0.993442
6.666609
{ "github_metadata": { "branch": "master", "commit_count": 3919, "repo_created_at": "2017-08-13T16:36:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1715, "forks": 141, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "37...
01bf3c89-ce69-4059-8b47-d07c7c85d378
SSAFYSHYSHY/codetree-TILs
231201/기울어진 직사각형의 회전/rotate-slanted-rectangle.cpp
#include <iostream> #include <vector> using namespace std; int arr[101][101]; int temp[101][101]; int n; using namespace std; void Calc(int x, int y, int k, int l, int dir) { vector<int> dx, dy, nums; if (dir == 0) { dx = { -1, -1,1,1 }; dy = { 1,-1,-1,1 }; nums = { k , l , k , l }; } else { dx = { -1,...
ALGO
0.999432
4.367204
{ "github_metadata": { "branch": "main", "commit_count": 1386, "repo_created_at": "2023-11-28T06:53: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": "8d0fd1b42...
c0485311-82d4-4ed6-b4db-567f989504a6
sxs-collaboration/spectre
src/Domain/Amr/UpdateAmrDecision.cpp
// Distributed under the MIT License. // See LICENSE.txt for details. #include "Domain/Amr/UpdateAmrDecision.hpp" #include "Domain/Amr/Flag.hpp" #include "Domain/Amr/Helpers.hpp" #include "Domain/Structure/Direction.hpp" #include "Domain/Structure/Element.hpp" #include "Domain/Structure/ElementId.hpp" #include "Domai...
ALGO
0.998397
6.425088
{ "github_metadata": { "branch": "develop", "commit_count": 17103, "repo_created_at": "2017-04-07T17:28:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 168, "forks": 202, "issues": 530, "pull_requests": 57 }, "file_meta": { "content_id": ...
7847cf65-69b7-40b7-9ce8-fbdaed32e7d3
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/05/0508/personal_submission/cf721d_tsreaper.cpp
#include <bits/stdc++.h> #define MAXN ((int) 2e5) using namespace std; typedef pair<long long, int> pli; long long ans[MAXN + 10]; int main() { int n, K, X; scanf("%d%d%d", &n, &K, &X); vector<pli> pos, neg; int flag = 1; for (int i = 1; i <= n; i++) { int x; scanf("%d", &x); if (x >= ...
ALGO
0.999897
3.793497
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "5c4a...
a6398abb-8f84-4356-b0aa-78ecfaf91b96
OkenBarrel/compiler
task3/3ACgen.cpp
#include <iostream> int tempCount = 1; std::string generateTemp() { return "t" + std::to_string(tempCount++); } void generateThreeAddressCode(const std::string& op, const std::string& arg1, const std::string& arg2, const std::string& result) { std::cout << result << " = " << arg1 << " " << op << " " << arg2 ...
ALGO
0.999886
6.035901
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2024-04-21T09:58: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": "657883802fb...
b1781ed5-f3af-4cc8-a530-f7bac4a9a77e
mongodb/mongo
src/third_party/boost/libs/algorithm/include/boost/algorithm/cxx11/partition_copy.hpp
/* Copyright (c) <NAME> 2011-2012. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) */ /// \file partition_copy.hpp /// \brief Copy a subset of a sequence to a new sequence /// \author <NAME> #ifndef BOOST_AL...
ALGO
0.993689
6.938262
{ "github_metadata": { "branch": "master", "commit_count": 90314, "repo_created_at": "2009-01-15T16:15:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 27329, "forks": 5655, "issues": 0, "pull_requests": 82 }, "file_meta": { "content_id": ...
9a976e5c-bcc5-454c-b1cb-309d1072f6ec
topology-tool-kit/ttk
core/base/boundingVolumeHierarchy/BoundingVolumeHierarchy.h
/// \ingroup base /// \class ttk::BoundingVolumeHierarchy /// \author <NAME> <<EMAIL>> /// \date 10.11.2020 /// /// \brief Acceleration structure for native ray tracer. /// Based on implementation described in Physically Based Rendering: /// From Theory to Implementation by <NAME>, <NAME> and /// <NAME>. #pragma once ...
ALGO
0.999597
6.223155
{ "github_metadata": { "branch": "dev", "commit_count": 8465, "repo_created_at": "2017-03-05T07:41:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 447, "forks": 129, "issues": 18, "pull_requests": 12 }, "file_meta": { "content_id": "bdac...
9719bae9-46a7-4d98-a9cb-2ab465bfcb60
hyetae/Algorithm
백준/Gold/14567. 선수과목 (Prerequisite)/선수과목 (Prerequisite).cc
#include <iostream> #include <vector> #define PII pair<int, int> using namespace std; int graph[1001]; bool cmp(PII a, PII b) { if (a.first == b.first) return a.second < b.second; return a.first < b.first; } int main(){ int N, M; cin >> N >> M; for (int i = 1; i <= N; i++) graph[...
ALGO
0.999996
3.537807
{ "github_metadata": { "branch": "main", "commit_count": 350, "repo_created_at": "2023-01-31T03:14: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": "5fd2ea8045...
38252444-cf6a-44fd-a00f-e34f48a7258b
yashgaherwar/Leetcode_Codes
974_Subarray_Sums_Divisible_by_K.cpp
/* Given an integer array nums and an integer k, return the number of non-empty subarrays that have a sum divisible by k. A subarray is a contiguous part of an array. Example 1: Input: nums = [4,5,0,-2,-3,1], k = 5 Output: 7 Explanation: There are 7 subarrays with a sum divisible by k = 5: [4, 5, 0, -2, -3, 1], [5]...
ALGO
0.999898
6.341072
{ "github_metadata": { "branch": "main", "commit_count": 468, "repo_created_at": "2022-04-14T16:27:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e3b7e33b47...
39787cc0-a593-4d0f-b896-b332d89ead32
saminouidri/SpaceRLD
FctAntirebond.ino
/******************************************************************************* * Fonctions projet : FctAntirebond.ino * Nom et classe : Fonction anti-rebond utilisant une temporisation de boucle. * Date de creation : <NAME> & <NAME>, février 2016 ********************************************************************...
TOOL
0.994833
5.114236
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-06-05T12:08: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": "8c5739aed6...
3396e98d-62b8-4466-a8a1-0445737c262e
yenthanh132/Codes
Codeforces/Mashup 001/D.cpp
#include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <vector> #include <cstring> #include <string> #include <cmath> #include <ctime> #include <utility> #include <map> #include <set> #include <queue> #include <stack> #include <sstream> #define pb push_back #define sz(a) int(a.size()) #d...
ALGO
0.999542
3.521576
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-11-24T09:41:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9cf39c9a8...
77b7d2e6-e688-4a42-b817-cfa192ed1036
ConcordiaNAVlab/early_wildfire_perception
m300_depth_filter/src/test_SegmentLocationFinder.cpp
/******************************************************************************* * Copyright (C) 2022 Concordia NAVlab. All rights reserved. * * @Filename: test_SegmentLocationFinder.cpp * * @Author: <NAME> * * @Email: <EMAIL> * * @Date: 2022-05-16 * * @Description: * **************************...
ALGO
0.986407
5.052144
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-06-28T19:33:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82677f35f42a...
e60656eb-2ff9-4809-8f2c-1d45fb0951d6
GuThree/GZsubway_sys
file.cpp
#include <iostream> #include <fstream> #include <QDebug> #include "algraph.h" #include "process_Data.h" using namespace std; int Abscissa[MaxSize]; //横坐标 int Ordinate[MaxSize]; //纵坐标 float Weight[MaxSize]; //两个顶点之间的权值 int Weight2[MaxSize]; // int VertexNum; //顶点的数目...
DATA
0.949386
3.279092
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-03-21T08:56:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8141eaa411...
1d31217c-50f0-48d0-b13d-28b53233bbdd
kaitou-1412/Practice
DSA-CP/Codechef-Starters-122/D.cpp
#include<bits/stdc++.h> using namespace std; bool noMatchingBitValues(int i, int j, vector<long long> &a) { for(int digit=0; digit<32; digit++) { int count = 0; for(int index = i; index<=j; index++) { if(a[index] & (1ll << digit)){ count++; } if(c...
ALGO
0.999971
5.047681
{ "github_metadata": { "branch": "main", "commit_count": 97, "repo_created_at": "2023-07-11T04:07:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b217f712c78...
a3f2b6c0-caff-4b1b-8862-cb4deed6fdfd
kingsman142/CS1645
Project2/project2.cpp
#include <iostream> #include <vector> #include <cmath> #include <iomanip> #include <mpi.h> // NOTE: If you want to create the contour map, or .vtk file, uncomment this line when the vtk.c file is in your directory #include "vtk.c" using namespace std; #define CONVERGENCE .000000000001 #define ROOT 0 #define HEAP_SIZE ...
ALGO
0.999925
4.924408
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-09-14T12:45: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": "c5573fc98...
74ab40ca-39f5-4e8f-bfdd-738af3fb6960
apple/turicreate
src/external/boost/boost_1_68_0/boost/geometry/strategies/spherical/point_in_poly_winding.hpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 <NAME>, Amsterdam, the Netherlands. // Copyright (c) 2013-2017 <NAME>, Lodz, Poland. // This file was modified by Oracle on 2013, 2014, 2016, 2017. // Modifications copyright (c) 2013-2017 Oracle and/or its affiliates. // Contributed and...
ALGO
0.999696
7.379567
{ "github_metadata": { "branch": "main", "commit_count": 1571, "repo_created_at": "2017-12-01T00:42:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11198, "forks": 1137, "issues": 502, "pull_requests": 21 }, "file_meta": { "content_id": "...
c2018ed5-a1c6-4bbd-b444-f75bc8bed51a
dtlavendar/DStructuresNAlgos
merge_sort_tree.cpp
struct merge_sort_tree { vector<vector<int>> data; vector<int> a; merge_sort_tree(int T, vector<int> avx) { data.resize(T << 1); // apparently if doesn't work if T is a power of 2, but honestly i have no idea how true / false this is a = avx; } vector<int> combine(vector<int> a, vector<int> b) { vector<i...
ALGO
0.999975
5.162841
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2020-12-05T03:19: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": "da6bd0f8930...
0019d0f4-5158-4667-9b72-843a7ef20803
sachinaggarwal18/DSA
leetcode/array/slidingWindow/longestRepeatingCharReplacement.cpp
#include <iostream> #include <string> #include <unordered_map> #include <algorithm> class Solution { public: int characterReplacement(std::string s, int k) { std::unordered_map<char, int> mp; int n = s.length(), l = 0, r = 0, maxFreq = 0, ans = 0; while (r < n) { mp...
ALGO
0.999944
6.79001
{ "github_metadata": { "branch": "main", "commit_count": 84, "repo_created_at": "2024-05-23T13:12: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": "e192e9fe888...
5c75279d-4b12-41a6-8cca-ba5bdf0c48d9
HYDRO2070/Love-Babbar-DSA
Tree/Binary Tree/burning_tree.cpp
#include<bits/stdc++.h> using namespace std; class Node{ public: int val; Node *left,*right; Node(int val){ this->val = val; this->left = this->right = NULL; } }; void inoder(Node *root){ if(root != NULL){ inoder(root->left); cout<<root->val<<" "; inoder(...
ALGO
0.999955
3.846684
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-09-19T16:47:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90bc9bec1df...
27c2690c-d1cd-4a46-824c-9895dc23aa0e
Usman-B-Faisal/Programming-Fundamentals
PF Lab/Lab 2/Program 2.cpp
#include<iostream> #include<ctime> #include<cstdlib> using namespace std; int main() { srand(time(0)); int lottery[5], user[5], i = 0; cout << "Random numbers generated between 0 and 9" << endl;; for (i = 0; i < 10; i++) { lottery[i] = rand() % ((9 + 1) - 1) + 1; } cout << "Ent...
ALGO
0.991931
3.653558
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2023-06-21T10:35: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": "b115bd07739...
5ffd160e-9c7f-476a-9e98-3e14fae4aa06
lukazsdev/Solutions
CSES/Sorting and Searching/SumOfTwoValues.cpp
#include <bits/stdc++.h> using namespace std; // create map to store difference between each element and target // each entry in the map should have key=difference, value=index of element // if we find an element in the array that is equal to one of they keys // in the map, then we have found a solution int main()...
ALGO
0.999983
4.416321
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2022-05-21T09:25: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": "9ffd0b8d4...
de3f4a6a-ac49-4442-8f4e-ab966aabaa70
Dev-XYS/Code
other/2017.04.03-ha.cpp
#include <cstdio> #include <algorithm> #define INF 1e9 using namespace std; struct raw_edge { int u, v, w; }R[5010]; int ivc, iec, q, dis[160][160][160]; inline bool _raw_edge_cmp_(const raw_edge &x, const raw_edge &y) { return x.w < y.w; } void init() { for (int i = 1; i <= ivc; i++) { for (int j = 1; j <=...
ALGO
0.99996
3.968219
{ "github_metadata": { "branch": "master", "commit_count": 496, "repo_created_at": "2016-11-27T05:35:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4e25b80...
e0405bb0-44f8-4bbb-86dc-74cb7b014236
tensorflow/tensorflow
third_party/xla/xla/tools/hlo_extractor.cc
/* Copyright 2018 The OpenXLA Authors. 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 writing, sof...
TOOL
0.917459
3.50219
{ "github_metadata": { "branch": "master", "commit_count": 182413, "repo_created_at": "2015-11-07T01:19:20.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 190773, "forks": 74758, "issues": 873, "pull_requests": 553 }, "file_meta": { "content...
8d14578b-577c-4754-83fb-48dbd5d76832
samiulsami/Competitive-programming
Math/LightOJ - LCM Extreme (Euler Totient, LCM SUM Formula).cpp
#include<bits/stdc++.h> using namespace std; typedef int64_t ll; typedef array<int,2> pii; #define sf scanf #define pf printf #define nl printf("\n"); #define sz(x) (int)x.size() #define all(x) x.begin(),x.end() #define dbug(x) cerr<<"value of "<<#x<<" = "<<x<<"\n" #define si(x) scanf("%d",&x); #define sii(x,y) scanf(...
ALGO
0.999509
3.82025
{ "github_metadata": { "branch": "master", "commit_count": 81, "repo_created_at": "2019-08-27T02:42:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a16c8c77...
7906c3e6-9498-4788-91e8-fba6e101d3d8
Cope-Ali/cplus
project06.cpp
/*********************************************************************** * Program: * Project 06, Calendar * <NAME>, CS124 * Author: * <NAME> * Summary: * fix validate month year, doesnt prompt again after invalid entry. * create isLeapYear, failtestBed on leap year display, found a new way * to...
TOOL
0.910763
3.948417
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-09-30T18:43:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c26e027dd...
32460ed9-9fcf-43db-8175-6fef77ec3eac
gitcseme/tjip-w-ss
week_04/Construct_Binary_Tree_from_Preorder_and_Inorder_Traversal.cpp
// TC: O(N) where N is the size of inorder or preorder array // MC: O(N) tree nodes + O(N) recursive stack space + O(N) for mapping class Solution { private: unordered_map<int, int> inMap; int preRootIdx = 0; TreeNode* construct(vector<int>& inorder, vector<int>& preorder, int inStart, int inEnd) { ...
ALGO
0.999988
6.864832
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2024-10-20T07:44: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": "54609a82305...
e5d8261b-c260-452b-b67b-07540868bf41
LinkedInLearning/cpp-code-challenges-3096958
src/04/Challenge/ch4_bitonic.cpp
// C++ Code Challenges, LinkedIn Learning // Challenge #4: Checking for Bitonic Sequences // Write a function to check if a vector of integers is bitonic or not. // Bitonic sequences have an ascending segment followed by a descending segment (sort of). // Circular shifts of these sequences are also bitonic. // Formal...
ALGO
0.999799
6.861394
{ "github_metadata": { "branch": "main", "commit_count": 60, "repo_created_at": "2022-11-01T21:24:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25, "forks": 216, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "bcbb0e052...
292cde0f-bc6c-4a7b-a852-150744d3cd0a
Paul-St-Young/fs_qmcpack
src/QMCDrivers/QMCCostFunctionBase.cpp
////////////////////////////////////////////////////////////////////////////////////// // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // // Copyright (c) 2016 <NAME> and QMCPACK developers. // // File developed by: <NAME>, <EMAIL>...
ALGO
0.951668
5.352874
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-04-28T03:37: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": "258d63e137...
e0cb09be-7ba7-41be-8749-dfc762e28579
nvkuy/CompetitiveProgramming
CodeForces/EducationalCodeforcesRound106(RatedforDiv.2)/C/main.cpp
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("O3,unroll-loops") #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt") int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); long long t, n; cin >> t; while (t--) { cin >> n; vector<long long> c(n)...
ALGO
0.999982
4.311449
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2022-01-21T04:40: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": "aac87120...
b1821400-26fa-40c4-a68a-db78e692eb06
Nocte-/rhea
rhea/symbolic_weight.hpp
//--------------------------------------------------------------------------- /// \file symbolic_weight.hpp /// \brief A 3-tuple weight for constraints // // Copyright 2012-2014, <EMAIL> Released under the MIT License. //--------------------------------------------------------------------------- #pragma once ...
TOOL
0.979171
7.254271
{ "github_metadata": { "branch": "master", "commit_count": 151, "repo_created_at": "2012-09-26T14:44:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 200, "forks": 19, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "d0805...
e32a8d11-2d76-4886-a1b8-06c1c93a3374
jerry0339/Study_Note
Algorithm/BackJun_PS/DP/Knapsack/BOJ_7579.cpp
// <앱> BOJ_7579 // DP - 냅색 #include<bits/stdc++.h> using namespace std; int N,M,sum=0; int m[101]{}, c[101]{}; int dp[2][10001]{}; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cin>>N>>M; for(int i=0; i<N; i++) cin>>m[i]; for(int i=0; i<N; i++) { cin>>c[i]; sum+=c[i]; ...
ALGO
0.999998
3.920699
{ "github_metadata": { "branch": "master", "commit_count": 553, "repo_created_at": "2020-01-04T10:31: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": "e4ad8c46...
308442ed-67b0-4537-aa92-b0a3d2071fcd
Chinesezjc/Solved-Problems
CodeForces/CF1399F.cpp
//This Code was made by Chinese_zjc_. #include <iostream> #include <fstream> #include <iomanip> #include <algorithm> #include <vector> #include <bitset> #include <cmath> #include <queue> #include <stack> #include <list> #include <string> #include <cstring> #include <cstdio> #include <cstdlib> #include <cctype> #include...
ALGO
0.999921
3.802057
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2020-12-29T10:37: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": "b1e74e758...
03b79671-582e-4a89-8c09-508c3c10437c
kmorgan24/CST407MatrixMultiply
mpimmult.cpp
#include <mpi.h> #define _POSIX_C_SOURCE 2 #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include "matrix.h" #ifndef _POSIX_C_SOURCE #error "No POSIX C source" #endif #if _POSIX_C_SOURCE < 2 #error "old POSIX" #endif void MMult(double *a, double *b, double *c, int a_cols, int a_rows, int b_cols); sta...
ALGO
0.998903
4.208895
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-02-18T00:09: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": "f9722d322...
0ea84c6a-0a59-44cb-b752-8027dec9a2d4
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/04/0416/personal_submission/cf813c_Ayanami.cpp
#include <iostream> #include <algorithm> #include <cstring> #include <vector> using namespace std; const int N = 2e5 + 10, M = N << 1, INF = 0x3f3f3f3f; int n, t; int head[N], ed[M], ne[M], idx; int d1[N], d2[N]; void add(int u, int v) { ed[idx] = v, ne[idx] = head[u], head[u] = idx++; } void dfs(int u, int fa, i...
ALGO
0.999249
3.75054
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "90ad...
e02027b6-da04-49e7-8a54-e0a9e823e3ec
kranthikumar786/leetcode-dsa
1460-number-of-substrings-containing-all-three-characters/1460-number-of-substrings-containing-all-three-characters.cpp
class Solution { public: int numberOfSubstrings(string s) { unordered_map<int,int>Um; int n = s.length(); int ans = 0; int left = 0; for(int right = 0; s[right] ; right++) { Um[s[right]]++; while(Um['a'] > 0 && Um['b'] > 0 && Um['c'] > 0) { ans += (n-right); ...
ALGO
0.999938
5.010311
{ "github_metadata": { "branch": "main", "commit_count": 2930, "repo_created_at": "2022-12-01T07:05: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": "cf326c1ab...
d3fc5098-6201-4550-8ba1-13ddbdd29e30
ytsaurus/ytsaurus
contrib/python/scipy/py3/scipy/_lib/highs/extern/filereaderlp/reader.cpp
#include "reader.hpp" #include "builder.hpp" #include <cassert> #include <iostream> #include <fstream> #include <limits> #include <map> #include <memory> #include <vector> #include "def.hpp" #include "HConfig.h" // for ZLIB_FOUND #ifdef ZLIB_FOUND #include "zstr.hpp" #endif enum class RawTokenType { NONE, S...
TOOL
0.96441
5.542412
{ "github_metadata": { "branch": "main", "commit_count": 83261, "repo_created_at": "2022-12-05T16:32:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2063, "forks": 164, "issues": 335, "pull_requests": 38 }, "file_meta": { "content_id": "2...
81d5c954-9df3-4c67-8ed6-2b773852158a
manonaamo/kyopro
cmon/agc002_a.cpp
#include<bits/stdc++.h> #include <iostream> using namespace std; #define rep(i, n) for(int i = 0; i < (n); ++i) using ll = long long; using Graph = vector<vector<int>>; using Graphstr = vector<vector<string> >; using Pint = pair<int, int>; using Pstr = pair<int, string>; using Pll = pair<long long, long long>; int ma...
ALGO
0.999952
3.978561
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-11-11T10:15: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": "d55f854baed6...
8929c71c-6573-44c9-bb00-f0fb76b935b8
JoaoVitorDio/Undergraduation-projects
Warthog/task1/Divisao_por_subtracao.cpp
/* Implemente um programa em C que leia dois números A e B e imprima em linhas separadas, o resultado da divisão a/b e seu resto, utilizando apenas a operação de SUBTRAÇÃO para isso. */ #include <stdio.h> int main() { int numerador, denominador, quociente = 0, resto; printf ("Digite o numerador:"); scanf ("%d...
ALGO
0.989832
3.463101
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2020-06-05T00:38:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cdf3484be...
954ed0fb-96f4-4ce0-9e62-e19ef32888a5
mmorri22/f21-cse20312
Lec23_Code/inc/LinearProbe4.h
#ifndef LINEARPROBE4_H #define LINEARPROBE4_H #include <iostream> #include <vector> template<class Key, class Value> class HashTable{ private: // Private Struct Hash Entry struct HashEntry{ Key key; Value value; HashEntry() : key(), value() {} HashEntry( std::pair< Key, Value > thePai...
ALGO
0.962118
5.070038
{ "github_metadata": { "branch": "main", "commit_count": 138, "repo_created_at": "2021-07-28T21:02:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b4419220b5...
55bfbc6f-2dff-439e-a362-b6cde87d3699
FelippeVelosoMarinho/TPs_ED
Pratica8/Felippe_Marinho_2021072260/TP/src/conversao.cpp
#include "../include/conversao.hpp" #include "../include/memlog.hpp" /** * @brief Função que converte uma expressão infixa para posfixa * * @param infixa * @param posfixa */ void Conversao::converteInfToPos(char infixa[], char posfixa[]) { Pilha pilha; int j = 0; for (int i = 0; infixa[i] != '\0'; i+...
ALGO
0.990976
4.144349
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-03-30T22:17:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2efca3d6411...
1c9ce944-40bb-4b5b-a939-5341cde53a0c
nforay/adventofcode
2021/day15/part1.cpp
#include <iostream> #include <limits> #include <vector> #include <queue> typedef struct coords { int x; int y; } coords; const coords dirs[4] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; auto comp = [](const std::pair<int, int> &a, const std::pair<int, int> &b) { return a.second > b.second; }; int main() { std::string ...
ALGO
0.999883
4.516383
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2021-12-05T00: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": "08faa23c2...
be613a46-9cf2-4a85-a42c-f147107bbde0
daehoon12/algorithm
C++/오답 노트/성곽 (2234).cpp
#include <iostream> #include <algorithm> #include <queue> #include <cstring> using namespace std; int n, m; int answer1, answer2, answer3; int dx[] = { -1,0,1,0 }; int dy[] = { 0,-1,0,1 }; int map[51][51]; bool visit[51][51]; void input() { cin >> m >> n; for (int y = 0; y < n; y++) { for (int x = 0; x < m; x+...
ALGO
0.999974
3.462483
{ "github_metadata": { "branch": "master", "commit_count": 332, "repo_created_at": "2020-04-12T11:17: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": "61bc50f0...
054a5736-ff48-400f-857b-e425a2448b4f
Kamna16/DSA-codes
Graphs/ConnectingCitiesMinCost.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: // dsu + krushkal's algo unordered_map<int, int> parent, size; int findParent(int child) { if (parent[child] == child) return child; return parent[child] = findParent(parent[child]); } bool unionSet(int a, in...
ALGO
0.999613
4.414658
{ "github_metadata": { "branch": "main", "commit_count": 128, "repo_created_at": "2023-08-13T10:20:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2eb9c3f39c...