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
ee66c46a-0cd1-4c99-ba54-d2d07a19644a
ishandutta2007/codeforces-a
abc864197532/normal/1335/B.cpp
#include <bits/stdc++.h> using namespace std; #define lli long long int #define fop(i,m,n) for (int i=(m);i<(n);i++) #define FOP(i,m,n) for (int i=(m)-1;i>=(n);--i) #define test(x) cout << #x << ' ' << x << endl; #define eb emplace_back #define pb push_back #define mp make_pair #define pii pair<lli,lli> #define X firs...
ALGO
0.999171
3.931113
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51: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": "3278207aca6a...
f1ea7eba-be3d-434a-9e2d-4bf61231da20
iglosiggio/algo3-tp2
cheapest-path/main.cpp
#include <chrono> #include <iostream> #include "algos/algos.h" string floydWarshallDir = "algos/floyd-warshall.cpp"; ListaDeVecinos gVecinos; Matriz matriz; void generarMatriz(uint32_t n) { std::vector<uint32_t> fila(n, INFINITO); matriz.resize(n, fila); } void generarVecinos(uint32_t n) { vector<pair<uint32_...
ALGO
0.99987
4.0744
{ "github_metadata": { "branch": "master", "commit_count": 164, "repo_created_at": "2019-10-14T22:49: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": "7bcaf2ed...
f457dbdb-c709-4a08-bc36-53340ccd13d3
myeongseob1/Algorithm
백준/20057 - 마법사 상어와 토네이도(2).cpp
#include <iostream> using namespace std; int n; int map[501][501]; int answer; int dx[4] = { 0,1,0,-1}; int dy[4] = {-1,0,1, 0}; int tx[4][9] = {{ 0,-1, 1,-2,-1,1,2,-1,1},{2, 1,1, 0, 0,0,0,-1,-1},{0,-1,1,-2,-1,1,2,-1, 1},{-2,-1,-1, 0, 0,0,0, 1,1}}; int ty[4][9] = {{-2,-1,-1, 0, 0,0,0, 1,1},{0,-1,1,-2,-1,1,2,-1, 1},{2...
ALGO
0.999905
3.58823
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-08-28T07:53: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": "b3471600f2...
481565dc-caa0-4c36-a6a5-79913124bf12
kamyu104/LeetCode-Solutions
C++/number-of-ways-to-reorder-array-to-get-same-bst.cpp
// Time: O(n^2) // Space: O(n^2) static vector<vector<int>> dp; class Solution { public: int numOfWays(vector<int>& nums) { static const int MAX_N = 1000; if (dp.empty()) { dp = vector<vector<int>>(MAX_N, vector<int>(MAX_N)); for (int i = 0; i < dp.size(); ++i) { ...
ALGO
0.999998
5.686852
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
6cf33a89-d8b0-4233-93f2-320a01ea7568
ssavi-ict/LeetCode-Submission
find-leaves-of-binary-tree/Accepted/8-8-2022, 1_47_22 AM/Solution.cpp
// https://leetcode.com/problems/find-leaves-of-binary-tree /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * ...
ALGO
0.999982
6.248472
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2022-12-03T11:51:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e6b8968b61...
4157acde-2c24-46c2-82a2-3f6f11e24053
willyflyingsheep/leetcode_solution
小飞羊Leetcode1381.cpp
class CustomStack { private: vector<int> vc; int maxSize; public: CustomStack(int maxSize_) { maxSize = maxSize_; vc.clear(); vc.reserve(maxSize); } void push(int x) { if (vc.size() == maxSize) { return; } vc.push_back(x); } ...
ALGO
0.999329
5.949984
{ "github_metadata": { "branch": "master", "commit_count": 65, "repo_created_at": "2020-05-26T05:37:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b03ae14b1...
2f639f2d-a8df-495b-95de-f7ce8e57715e
AbhinavKumar-Jha/CPP
If Else/sidesofTriangle.cpp
// #include<iostream> // using namespace std; // int main(){ // int a; // cout<<"Enter the number of a :"; // cin>>a; // int b; // cout<<"Enter the number of b :"; // cin>>b; // int c; // cout<<"Enter the number of c : "; // cin>>c; // if(a+b>c && b+c>a && a+c>b){ // // co...
ALGO
0.988288
3.49728
{ "github_metadata": { "branch": "main", "commit_count": 417, "repo_created_at": "2024-08-19T12:47:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "631795a50a...
c021066b-e258-45f2-912b-343bb33030d1
rapidsai/cudf
cpp/src/groupby/hash/compute_global_memory_aggs.hpp
/* * Copyright (c) 2024, NVIDIA CORPORATION. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law ...
TOOL
0.993168
6.247325
{ "github_metadata": { "branch": "branch-25.08", "commit_count": 41228, "repo_created_at": "2017-05-07T03:43:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9049, "forks": 958, "issues": 999, "pull_requests": 95 }, "file_meta": { "content...
c4c8e0e0-0b3a-43b7-b759-cc6e69a16518
doyubkim/fluid-engine-dev
include/jet/svd.h
// Copyright (c) 2018 <NAME> // // I am making my contributions/submissions to this project solely in my // personal capacity and am not conveying any rights to any intellectual // property of any third parties. #ifndef INCLUDE_JET_SVD_H_ #define INCLUDE_JET_SVD_H_ #include <jet/matrix2x2.h> #include <jet/matrix3x3.h...
ALGO
0.99947
7.034632
{ "github_metadata": { "branch": "main", "commit_count": 279, "repo_created_at": "2016-05-08T06:05:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2018, "forks": 277, "issues": 60, "pull_requests": 0 }, "file_meta": { "content_id": "3f6c...
49269642-f8c2-4048-9852-c06a933254a7
alexandraback/datacollection
solutions_5766201229705216_1/C++/mukel/btree.cpp
#include <bits/stdc++.h> using namespace std; const int MAXV = 1 << 10; int V; int stSize[MAXV]; vector< int > G[MAXV]; int dp[MAXV]; void dfs(int u, int from = -1) { stSize[u] = 1; vector< int > childs; for (auto v : G[u]) if (v != from) { dfs(v, u); stSize[u] += stSize[v]; childs.push_back(dp[v]); } ...
ALGO
0.99926
4.771948
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f64b92b2a...
32836ae0-5c6f-462f-8ccb-9b9ae88d5281
jon-bogert/XephTools
XephTools/src/Math.cpp
/*======================================================== Originally Created for "REngine" by <NAME>. Edited and adaped by <NAME> XephTools - Math This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this ...
ALGO
0.999343
6.809899
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2023-02-28T23:19: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": "7563c6bc286...
850a3ae1-d578-4ea5-963e-6acc8f6582a3
hy-huang20/ray-tracing
deps/vecmath/include/Matrix3f.hpp
#ifndef MATRIX3F_HPP #define MATRIX3F_HPP #include <cstdio> #include "Matrix2f.hpp" #include "Vector3f.hpp" #include "Quat4f.hpp" class Matrix3f { public: Matrix3f(double fill = 0); Matrix3f(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22); // set...
ALGO
0.986781
6.25688
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2023-07-09T07:30: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": "ee4e6198a...
7b48341f-8947-4386-bdc3-6dd6afc365fc
rainbow-auto/rainbow-codes
Luogu/CF1307D.cpp
#include <bits/stdc++.h> // #pragma GCC optimize(2) using i64 = long long; using f64 = long double; #define fastread std::ios::sync_with_stdio (false); std::cin.tie(nullptr); #define rep(QWQ, qwq, qaq) for (i64 QWQ = (qwq); (QWQ) <= (qaq); QWQ++) #define per(QWQ, qwq, qaq) for (i64 QWQ = (qwq); (QWQ) >= (qaq); QWQ--...
ALGO
0.999969
3.939389
{ "github_metadata": { "branch": "master", "commit_count": 749, "repo_created_at": "2024-09-07T02:10:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "42d510e5...
4764145d-b7fd-43a6-a140-141bb2404281
paragonjh/algoBasic
78/78.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class DATA { public: DATA(int _indexA, int _indexB, int _value) : indexA(_indexA), indexB(_indexB), value(_value) {}; int indexA; int indexB; int value; }; bool cmp(DATA a, DATA b) { return a.value < b.value ? true:false; } int ma...
ALGO
0.999994
4.825714
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2020-03-19T14:10: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": "8db345d5e...
f9c4404a-8bba-427a-b39d-5e4c48dc2952
jhu-cisst/cisst
cisstNumerical/nmrInverseSPD.h
/*-*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /*ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab:*/ /* $Id: nmrInverseSPD.h 3921 2013-01-14 21:07:15Z sleonar7 $ Author(s): <NAME> Created on: 2013-08-20 (C) Copyright 2006-2013 Johns Hopkins Univer...
ALGO
0.996025
4.841696
{ "github_metadata": { "branch": "main", "commit_count": 4711, "repo_created_at": "2014-03-12T21:45:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 69, "forks": 45, "issues": 22, "pull_requests": 1 }, "file_meta": { "content_id": "ea7b95e...
46a1f13c-b5c5-496b-8394-5f8be3a34b09
GGrzesiek/Alghorithms
List/laby_11.cpp
#include <iostream> #include <ctime> using namespace std; struct element { int number; element *next; element *prev; }; struct single_list { element *head; element *tail; int counter; }; void add_tail(single_list &l,int value) { element* el= new element; el-> number = value; el-> ...
TOOL
0.973384
4.649015
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-05-29T14:09:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f68416242aa...
0499742c-7417-4469-ac4c-37798b8478e6
sabbir211/Cpp_Programs
A_Submission_Bait.cpp
#include <iostream> using namespace std; #include <vector> #include <algorithm> int main() { int t; cin >> t; while (t--) { int n; cin >> n; vector<int> arr(n); int count = 0; bool alice = false; int mx = 0; for (int i = 0; i < n; i++) { ...
ALGO
0.999958
4.187069
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-02-28T13:27: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": "db438cde8e8...
b4a0e35b-2242-4550-9f7a-6104631e3a48
paVlaDog/Labs
Alg/lab1sem/3bCutTheGraph.cpp
#include <iostream> #include <vector> #include <utility> #include <string> #include <algorithm> using namespace std; vector <int> parent; int find_parent(int number){ int ans = number; if (number != parent[number]) { ans = find_parent(parent[number]); parent[number] = ans; } return ans; } int main() { ...
ALGO
0.999958
4.05277
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-01-01T20:25: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": "61c4777cfc...
b9b4c8db-af2b-4182-9102-5345f5d8e1fc
go2usman/leetcode-striver-sde
Arrays Part-III/reverse_pairs_leetcode.cpp
#include <bits/stdc++.h> using namespace std; int merge(vector<int> &nums, int low, int mid, int high) { int cnt = 0; int j = mid + 1; int i = low; while (i <= mid) { while ((j <= high) && (nums[i] > static_cast<long long>(2) * nums[j])) { j++; } cnt += ...
ALGO
0.999967
4.702584
{ "github_metadata": { "branch": "master", "commit_count": 63, "repo_created_at": "2022-12-25T11:22: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": "e918c9424...
a35d100e-4cab-4acc-ade4-623daea832ab
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/12/1226/personal_submission/cf1042c_6_1.cpp
#include <bits/stdc++.h> #define int long long #define IOS ios::sync_with_stdio(false);cin.tie(0);cout.tie(0); using namespace std; const int N = 2e5+10,INF = 0x3f3f3f3f3f3f3f3f; int a[N],st[N]; void solve() { int n;cin >> n; int num = 0,num0 = 0,mi = INF,mii = -1,i0 = -1; for(int i = 1;i<=n;i++) { ...
ALGO
0.999527
3.467577
{ "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": "027b...
1d2fc481-3454-43cd-985e-9da070364cf0
kaldi-asr/kaldi
src/nnet3/nnet-chain-diagnostics2.h
// nnet3/nnet-chain-diagnostics.h // Copyright 2015 Johns Hopkins University (author: <NAME>) // 2019 Idiap Research Institute (author: <NAME>) // See ../../COPYING for clarification regarding multiple authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use t...
ALGO
0.954713
7.503145
{ "github_metadata": { "branch": "master", "commit_count": 9405, "repo_created_at": "2015-04-20T17:23:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14986, "forks": 5368, "issues": 189, "pull_requests": 63 }, "file_meta": { "content_id":...
20e149b3-dcd2-45af-b940-fd9691ae3ed0
ashib11/Sub_Zero_
luv_graph/dfs_ep_70.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define pi acos(-1.0) #define ull unsigned long long #define endl "\n" void fastIO() { ios_base::sync_with_stdio(false); cin.tie(NULL); } const int N = 1e5 + 10; vector<int> g[N]; bool vis[N]; void dfs(int vertex) { /** Take action on verte...
ALGO
0.999904
4.191705
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2022-11-09T13:19: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": "073e41ceee5...
901a63a3-dc35-4f98-a56f-6baba7c51af4
happenslol/batchtool
src/batchtool.cpp
#define DEBUG 0 #include <iostream> #include <sstream> #include <fstream> #include <iterator> #include <string> #include <algorithm> #include <unistd.h> #include <image.h> #include <xmlwriter.h> #include <jsonwriter.h> #include <base64.h> using namespace std; unsigned int nextPow2(unsigned int n) { --n; n...
TOOL
0.943117
5.477982
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2015-01-06T02:57:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c0d1732f...
60f193c9-bfbd-47d3-9025-7f66af19f4fe
Nikitiwe/Leetcode
0417-pacific-atlantic-water-flow/0417-pacific-atlantic-water-flow.cpp
class Solution { public: vector<vector<int>> pacificAtlantic(vector<vector<int>>& g) { vector<vector<int>> ans (g.size(), vector<int> (g[0].size(), 0)); queue<pair<int, int>> m; for (int i=0; i!=g.size(); i++) { m.push({i, 0}); ans[i][0]=1; } f...
ALGO
0.999888
6.380777
{ "github_metadata": { "branch": "main", "commit_count": 8532, "repo_created_at": "2024-06-21T17:36: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": "d9f31f9dc...
bf651d86-6840-4e93-822c-1a1e3095ae6e
Vedantjn/neetcode-150
Linked List/MergeKSortedLinkedLists.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: ListNode* mergeKLists...
ALGO
0.999922
6.217999
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2024-07-06T14:31: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": "029b2f98a36...
50068b12-1972-4462-a804-18483de9c61c
ankiiitraj/questionsSolved
1474-C.cpp
#include <bits/stdc++.h> #include <time.h> #define int long long int #define pb push_back #define mem(a, x) memset(a, x, sizeof a) #define all(a) a.begin(), a.end() #define scnarr(a, n) for (int i = 0; i < n; ++i) cin >> a[i] #define vi vector<int> #define si set<int> #define pii pair <int, int> #define sii set<pii> #d...
ALGO
0.999897
4.256815
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2020-02-19T18:09:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ed8fd19a1...
96fe8ab8-adbd-41b3-8653-0f1b9abac1fe
gitqwerty777/Online-Judge-Code
categorized/[DP] 00976-Bridge-Building.cpp
#include <stdio.h> #include <string.h> char s[1000][1004]; int R, C, B, S; int len[1004]; struct col{ int n, s; }; struct col bound[1000]; void find_terror(int r, int c){ if(r >= R || c >= C || r < 0 || c < 0){ return; } if(s[r][c] == '#'){ s[r][c] = '@'; find_terror(r+1, c); find_terror(r-1,...
ALGO
0.999237
3.520468
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2014-02-19T06:55: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": "cc119031f...
07c8d9fe-6ac6-478f-ade2-05edb65929e9
nhoangkiet35/cpp-workspace
recursion/TH7.cpp
#include <iostream> using namespace std; int resultEven = 0; int resultOdd = 0; void sumEvenOdd(int n) { if (n < 10) { if (n % 2 == 0) resultEven += n; else resultOdd += n; } else { int temp = n % 10; if (temp % 2 == 0) resultEven...
ALGO
0.999366
4.693615
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2022-03-04T01:48: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": "b198e7126fe...
b8698650-12e4-4ddb-a6bd-274458fe4fd8
TechSir3n/LeetCode
Algorithms/С++/Medium/MaximumNumberOfIntegersToChooseFromRange.cpp
/* You are given an integer array banned and two integers n and maxSum. You are choosing some number of integers following the below rules: The chosen integers have to be in the range [1, n]. Each integer can be chosen at most once. The chosen integers should not be in the array banned. The sum of the chosen integ...
ALGO
0.999928
5.732899
{ "github_metadata": { "branch": "main", "commit_count": 99, "repo_created_at": "2022-12-30T10:09: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": "1712c011ae7...
814a5fa5-93c0-4bc1-84e7-c2ea7a9f14e7
wuyuhang05/My-OI-Code
TopCoder/SRM663/C.cpp
/* * Author: RainAir * Time: 2019-10-08 14:35:20 */ #include <algorithm> #include <iostream> #include <cstring> #include <climits> #include <cstdlib> #include <cstdio> #include <bitset> #include <vector> #include <cmath> #include <ctime> #include <queue> #include <stack> #include <map> #include <set> #define fi fir...
ALGO
0.999976
3.504424
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2018-06-03T12:18:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0cbc5528...
bb6533ff-a3e6-41f5-8d88-d0bdbe72e170
codefmz/code
arithmetic/src/algorithm/iterate/iterate.cpp
#include "iterate.h" #include <cmath> #include <iostream> using namespace std; Queue::Queue() : arr {0}, count {0} { set(0); } bool Queue::judge(int n) { for (int i = 0; i < n; i++) { if (arr[i] == arr[n] || abs(i - n) == abs(arr[i] - arr[n])) { return false; } } return t...
ALGO
0.999124
3.848519
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2025-03-10T22:54: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": "7f5d4b6a2...
d5197cfe-597e-45db-addf-81d9d53f17d1
KyleGospo/City-17-Episode-One-Source
src-2007/HLLib/HLLib.h
/* * HLLib * Copyright (C) 2006-2010 <NAME> * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later * version. */ #ifn...
CONFIG
0.932139
5.506598
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-04-22T22:53:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "528664a8...
1ec99e95-1733-4c56-819a-856ed3ec293d
mantielero/vtk.nim
src/wrapper/all/vtkTemporalStatistics.nim
## -*- c++ -*- ## ========================================================================= ## ## Program: Visualization Toolkit ## Module: vtkTemporalStatistics.h ## ## Copyright (c) <NAME>, <NAME>, <NAME> ## All rights reserved. ## See Copyright.txt or http://www.kitware.com/Copyright.htm for details....
TOOL
0.944115
6.365056
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-03-25T23:07:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6dfba695aca...
d6a5a003-f24d-425d-b454-b09005052117
ishandutta2007/codeforces-o
oleh1421/normal/1464/D.cpp
//#pragma GCC optimize("Ofast") //#pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> typedef long long ll; using namespace std; #define endl '\n' const int N=1000010; const ll mod=1000000007; int cnt[6]; int p[N]; bool used[N]; int calc(){ int ans=0; ans+=cnt[4]; if (cnt[1]+cnt[4]<cnt[2]){ ...
ALGO
0.999834
3.791097
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:45:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b36a91e04682...
16befb45-2be6-4869-9a8e-cdc471702d32
YGJH/competitveShit
src/lca/lca_c.cpp
#include <bits/stdc++.h> using namespace std; using ll=long long; #define int long long #define pb push_back constexpr int MXN = 2e5 + 5; int anc[MXN][25]; int ancsum[MXN][25]; int t = 0; vector<pair<int,int>> edges[MXN]; int in[MXN] , out[MXN]; bool isanc(int u , int v) { return ((in[u] <= in[v]) && (out[v] <= ou...
ALGO
0.999923
4.283376
{ "github_metadata": { "branch": "main", "commit_count": 116, "repo_created_at": "2024-02-14T12:24:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5bfb62387...
95e27558-d6e9-4028-a7ce-9e3c7af53386
anhquan075/UIT-homework
Introduction to Programming/Exercise 5/408.cpp
#include <iostream> using namespace std; void Import_Matrix(int arr[][100],int &n,int &m) { for (int i = 0; i < n;i++) { for (int j = 0; j < m;j++) { cout<<"Nhap phan tu a["<<i<<"]["<<j<<"]:"<<endl; cin>>arr[i][j]; } } } void Export_Matrix(int arr[][100],int &n,int &m) { for (int i = 0; i < n; i++)...
ALGO
0.99976
3.451765
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2019-12-22T16:00:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e1cb1afc...
bf2fbefe-81ba-485d-b4c8-3f3e748e0172
leafspace/Learn.Study
Leetcode/#0514.自由之路【UNFINISH】.cpp
/* 视频游戏“辐射4”中,任务“通向自由”要求玩家到达名为“Freedom Trail Ring”的金属表盘,并使用表盘拼写特定关键词才能开门。 给定一个字符串 ring,表示刻在外环上的编码;给定另一个字符串 key,表示需要拼写的关键词。您需要算出能够拼写关键词中所有字符的最少步数。 最初,ring 的第一个字符与12:00方向对齐。您需要顺时针或逆时针旋转 ring 以使 key 的一个字符在 12:00 方向对齐,然后按下中心按钮,以此逐个拼写完 key 中的所有字符。 旋转 ring 拼出 key 字符 key[i] 的阶段中: 您可以将 ring 顺时针或逆时针旋转一个位置,计为1步。旋转的最终目的是将字符串 ...
ALGO
0.999995
6.034197
{ "github_metadata": { "branch": "master", "commit_count": 197, "repo_created_at": "2018-07-30T06:28:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 5 }, "file_meta": { "content_id": "e5454b34...
c0f92d31-aaa5-485a-a747-daef0f5f9938
anggarapangestu/VPM_LSMPS
src/LSMPS/LSMPSb.hpp
#ifndef INCLUDED_LSMPSb #define INCLUDED_LSMPSb #include <iostream> #include <vector> #include <fstream> #include <omp.h> /** * @brief A particle derivative function of Least Square Moving Particle * Semi-Implitit Type B. The Type B provide a calculation from the zero * derivative level. This method can be uti...
ALGO
0.998363
5.807699
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-06-06T03:26:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "826306171477...
68db7b6f-8f01-4d72-a69d-7bd45458a9d0
tsugitta/atcoder
contests/practice2/practice2_d/main.cpp
// https://atcoder.jp/contests/practice2/tasks/practice2_d #include <atcoder/all> #include "algorithm" #include "bitset" #include "cmath" #include "functional" #include "iomanip" #include "iostream" #include "map" #include "numeric" #include "queue" #include "set" #include "string" #include "vector" #define rep(i, to...
ALGO
0.999979
3.833879
{ "github_metadata": { "branch": "master", "commit_count": 522, "repo_created_at": "2019-06-13T19:12:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 0, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "3b3916d...
f9cd4a80-2d38-42d4-830c-648f23a6fbfc
baactree/PS
BOJ/5656/5656.cpp14.cpp
///////////////////////////////////////////////////// #ifdef _DEBUG #include "bits_stdc++.h" #else #include "bits/stdc++.h" #endif using namespace std; typedef pair<int, int> pii; typedef vector<vector<pii > > Edge; typedef unsigned long long llu; typedef long long ll; typedef priority_queue<pii > Pq; typedef vector<in...
ALGO
0.997144
3.438475
{ "github_metadata": { "branch": "master", "commit_count": 224, "repo_created_at": "2017-01-14T14:53:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee98ee3c...
09c28a77-fb4c-43ae-a05b-9f9c40aa6d07
Shubham0599/Code-60
tree/traversal/sol.cpp
#include <iostream> #include <stack> using namespace std; class node{ public: int data; node * left; node* right; node(int d){ data=d; left=NULL; right=NULL; } }; //inorder void inorderrec(node* tree){ if(tree==NULL)return; inorderrec(tree->left); ...
ALGO
0.999975
5.591748
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2020-11-04T04:13:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "1ebc68ae7...
61cff556-c202-46a9-8bc9-b47e48cd895b
traubenzucker3001/CV_AnSim_source
src/executables/Exercise_1/main.cpp
//#include <CVK_2/CVK_Framework.h> // //#include <CVK_AnSim/CVK_AS_ShaderLineRender.h> //#include <CVK_AnSim/CVK_AS_Line.h> //#include <CVK_AnSim/CVK_AS_LineStrip.h> //#include <CVK_AnSim/CVK_AS_CoordinateSystem.h> //#include <CVK_AnSim/CVK_AS_HermiteSpline.h> //#include <CVK_AnSim/CVK_AS_LineStrip.h> //#include <time....
TOOL
0.959519
3.911363
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2015-06-26T12:14:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "c4ac4b674...
9f04e541-a0ea-45df-a9ef-680f984077c7
BodhiDog/OJCode
Luogu/P4114_将边权映射为点权的思想_注意树剖细节.cpp
#include <bits/stdc++.h> using namespace std; const int R = 1e5 + 10; int a[R], sz[R], top[R], son[R], dep[R], fa[R], dfn[R], tme, val[R]; class Segment { public: struct { int l, r, val; // lr是时间戳 } t[R * 4]; #define lc(k) (k << 1) #define rc(k) (k << 1 | 1) #define pushup(k) t[k].val = max(t[lc(k)].val, t[rc(k)]...
ALGO
0.99993
4.79686
{ "github_metadata": { "branch": "master", "commit_count": 594, "repo_created_at": "2023-05-21T11: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": "9f5249f7...
2f8ba317-cebd-4e65-afc3-22d0d9931bfc
boissierflorian/Exercice-4-C-Session-1
main.cpp
#include <iostream> #include <vector> #include "Noeud.hpp" using namespace std; int main() { /* Position actuelle dans le vecteur */ int pos = 0; /* Vecteur contenant les informations sur les noeuds {valeur, nombre de fils} */ vector<int> v {1,3, 2,2, 5,0, 6,1, 11,0, 3,1, 7,1, 12,0, 4,3, 8,1, 13,...
ALGO
0.986281
3.366196
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-06-16T14:00:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d0f458fb6...
4bb3712c-11d3-4a86-8419-a71af92290e2
kejpmdt/backpack
Static/Workspace/CODES/Problems/ZR/NOIP/day2/T1/ans_2.cpp
#include <bits/stdc++.h> #define lowbit(x) (x & -(x)) using namespace std; int n, m; int inp[1000006]; struct node { const int l; mutable int r, x; node(int L, int R, int X) : l(L), r(R), x(X) {} bool operator<(const node &oth) const { return l < oth.l; } }; set<node> odt; set<node>::iterator split(int ...
ALGO
0.999968
4.225726
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-11-06T05:30:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b47592b3c95...
77323b5a-49c6-4f29-af80-2d3509b13107
Sirivasv/ProgrammingChallenges
ACMLiveArchive/magicalb.cpp
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> pii; const int MAXN = 500; int Adj[MAXN][MAXN]; set<pii> Edif[MAXN]; int main() { cin.tie(0); ios_base::sync_with_stdio(0); int T; cin >> T; for (int nc = 0; nc < T; ++nc) { int N, F, M, Nc = 1; cin >> N >> F >> M; for (int i = ...
ALGO
0.999808
4.664104
{ "github_metadata": { "branch": "master", "commit_count": 145, "repo_created_at": "2016-12-18T07:02: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": "10e5f311...
5b487d0c-b59d-4558-97cd-59c20651d417
kavya2357/LeetCode
51.n-queens.cpp
/* * @lc app=leetcode id=51 lang=cpp * * [51] N-Queens */ // @lc code=start class Solution { public: bool issafe(vector<string>&board,int r,int c,int n){ for(int row=0;row<r;row++){ if(board[row][c]=='Q') return false; } int row=r; int col=c; //only check in...
ALGO
0.999946
6.551028
{ "github_metadata": { "branch": "main", "commit_count": 188, "repo_created_at": "2023-06-16T07:47: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": "35096fb4f4...
5b459c90-f6ff-4314-8819-511f30835abd
devgraphy/Algorithm
baekjoon/알고리즘기초1/자료구조1/10799-쇠막대기.cpp
/* ----------<문제 정의>---------- 문제: 괄호 처리와 괄호 영역간에 별도 계산을 위한 스택 자료구조 이용 입력: 괄호 문자열 출력: 괄호 영역별로 계산한 잘려진 쇠막대기 조각 개수 시간 제한: 1초 주의 사항: 구현 패턴화 */ /* ----------<시간초과 알고리즘>---------- 처음 스택 연산 과정을 구체화함. 결국 괄호가 얼마나 열려있는지 개수를 파악해야 종료 시점을 알 수 있음. 그러면 괄호의 종류도 하나이니까, 애초에 변수를 이용해보자. 변수로 하면 영역안의 영역을 표현하기 어려워짐. 예를 들어, ((())) (())) 에서 ...
ALGO
0.999931
4.231974
{ "github_metadata": { "branch": "main", "commit_count": 300, "repo_created_at": "2021-06-07T10:47:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 55, "pull_requests": 0 }, "file_meta": { "content_id": "25354b081...
bd1ebb3a-8088-49e6-851b-c6b0ba3d29b1
ShinoharaYuuyoru/In-Class_Projects
Data Structure/19. 堆排序/19. 堆排序/Source.cpp
#include "stdio.h" int PrintCounter = 2; void Swap(int *X, int *Y); void BuildBigHeap(int *L, int All); void HeapAdjust(int *L, int s, int m); int WhichIsBigger(int x, int y); void HeapSort(int *L, int All); int main() { int N = 0; int Line[1000] = { 0 }; int NC = 0; scanf("%d", &N); for (NC = 1;NC <= N;NC++)...
ALGO
0.999991
4.049949
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2017-12-27T05:40:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "af19b391f...
b3d9e4bc-81ca-428a-901f-6cf207ab1243
xamarin/XobotOS
external/icu4c/i18n/unicode/sortkey.h
/* ***************************************************************************** * Copyright (C) 1996-2006, International Business Machines Corporation and others. * All Rights Reserved. ***************************************************************************** * * File sortkey.h * * Created by: <NAME> * *...
TOOL
0.983035
5.08576
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2012-04-30T21:53:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1246, "forks": 247, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "94a5d3...
2fb99fe4-d109-4a40-b3f8-670e17560d68
Shell-Wataru/AtCoder
Codeforces/ECR83/D.cpp
#include <iostream> #include <algorithm> #include <vector> #include <deque> #include <queue> #include <set> #include <map> #include <iomanip> #include <cmath> using namespace std; using ll = long long; ll BASE_NUM = 998244353; vector<ll> inverse_array(ll n){ vector<ll> inverse(n,-1); inverse[1] = 1; for(in...
ALGO
0.99999
4.71892
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2017-04-23T13:44: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": "bad812f17...
0efc7203-5f81-496a-a0f1-cd522a324093
yanyiss/SurfaceQuadMesh
src/Algorithm/crossField.h
#pragma once #include "..\MeshViewer\MeshDefinition.h" #include <Eigen\Sparse> #include "..\Toolbox\mathFunctions.h" #include "..\Toolbox\dprint.h" #include "..\Toolbox\filesOperator.h" #include "..\Toolbox\BoolVector.h" //#include "LoopDef.h" #include "StatisticsMostValues.h" /* generate crossfield for quad layout sh...
ALGO
0.983628
3.804239
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2022-03-23T03:14:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa99891679b...
3d5ad8b6-eb53-4001-854f-03cf125f04ba
faisal1025/CP
Codeforces ProblemSet/B/double_string.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 #define ll long long #define vvi vector<vector<int>> #define vvll vector<vector<long long>> #define vvb vector<vector<bool>> #define FAST_IO ios_base::sync...
ALGO
0.999963
4.420713
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2023-07-25T05:16: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": "3c23c903e0...
cc32638c-ae12-4015-b2e3-161bf77a6971
fernandanavamoya/greedyAlgorithms
boyerMoore.cpp
/* BOYER MOORE Pattern searching algorith within a string. <NAME> - A01023896 10/09/2021 */ #include <iostream> #include <bits/stdc++.h> #include <vector> #include <string> using namespace std; // function to get maximum of the two intergers // it is used to make sure that we get a positive shift int findMax(int a,...
ALGO
0.999974
5.859957
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-08-14T01:04: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": "30944e2689...
c30294e0-a3c2-421d-80ac-331f42371cbc
ArcherSore/atcoder
AtCoder Beginner Contest 399/E_Replace.cpp
#include <bits/stdc++.h> using namespace std; struct DSU { vector<int> parent, s; DSU(int n) : parent(n), s(n, 1) { iota(parent.begin(), parent.end(), 0); } int find(int x) { while (x != parent[x]) x = parent[x] = parent[parent[x]]; return x; } void...
ALGO
0.999996
4.020501
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2024-02-15T14:14:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d15c8bffe8...
7af8ddb5-a7be-41ad-9b74-0ae7e304826d
AMReX-Microelectronics/artemis
Source/Particles/Collision/BinaryCollision/ShuffleFisherYates.H
/* Copyright 2019 <NAME> * * This file is part of WarpX. * * License: BSD-3-Clause-LBNL */ #ifndef WARPX_PARTICLES_COLLISION_SHUFFLE_FISHER_YATES_H_ #define WARPX_PARTICLES_COLLISION_SHUFFLE_FISHER_YATES_H_ #include <AMReX_Random.H> /* \brief Shuffle array according to Fisher-Yates algorithm. * Only shuf...
ALGO
0.998743
6.868519
{ "github_metadata": { "branch": "development", "commit_count": 8653, "repo_created_at": "2021-03-22T20:57:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 20, "forks": 16, "issues": 9, "pull_requests": 4 }, "file_meta": { "content_id": "1...
1982188b-8e20-46cc-bf45-3b83d7f62c4f
chengxueming/leranardunio
small_project/snake/snake.ino
const int gXcount = 4; const int gYcount = 4; int gXs[gXcount] = { 2,3,4,5 }; int gYs[gYcount] = { 10,11,12,13 }; struct node { int m_x; int m_y; node *m_pnext; node(int x,int y,node* p):m_x(x),m_y(y),m_pnext(p){ } }; class snake { node* mHead; public: snake():mHead(0){ } public: void in...
TOOL
0.905396
5.406768
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-10-30T09:39: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": "657150ac78...
33ef791f-d029-4d92-80b3-17b0069428bb
swadheen01/CF-Solutions
B_Farmer_John_s_Card_Game.cpp
/* *Copyright (c) <NAME> (SIR01) *Created on Sun Jan 19 2025 9:22:49 PM */ #include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define pie 2*(acos(0.0)) #define yes cout<<"YES\n" #define no cout<<"NO\n" #define pb push_back #define endl "\n" #define lcm(a,b) (a*b)/(__gcd<ll>(a,b...
ALGO
0.999625
4.338226
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-04-17T18:41: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": "46e51eccd5c7...
7ed244ad-573b-47d5-9b33-f8b7d8fedbd8
joaoaugustopc/LightBot
src/models.cpp
#include <vector> #include "../include/models.hpp" vector<No*> gerarSucessores(const No* noAtual,const Board& board){ vector<No*> sucessores; // Operação para baixo No* down = moveDown(noAtual, board); if (down != nullptr){ sucessores.push_back(down); } // Operação para direita ...
ALGO
0.999423
5.270959
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2024-12-04T23:21: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": "44f12a90414...
633dbf29-f78a-4413-92f2-31a64fd466c8
Asevenx174/CP-source-code-
02_OJ_solution/At coder/beg 261/c.cpp
#include<bits/stdc++.h> #define pf printf #define ff first #define ss second #define sef second.first #define ses second.second #define ms(a,b) memset(a, b, sizeof(a)) #define pii pair <int,int> ///%I64d %Lf /// ios::sync_with_stdio(0); cin.tie(0); /// ar.resize(n+10, vector<int>(m+10)); ...
ALGO
0.999987
4.929245
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-05-12T16:42: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": "b52124dbbef2...
30e14a4d-bfe9-4391-a4d8-8fe458ce84bc
AmirOfir/SeparableFundamentalMatrix
line_homography.hpp
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html. #ifndef _OPENCV_LINE_HOMOGRAPHY_H_ #define _OPENCV_LINE_HOMOGRAPHY_H_ #include "precomp.hpp" #include "np_cv_imp.hpp" #incl...
ALGO
0.994971
5.981919
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2020-07-08T12:24: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": "d988356f3...
57586102-7baf-48a1-848c-eb5d42edebce
ayanami98/leetcode
hard/502_IPO.cpp
/****************************************************************************** * Suppose LeetCode will start its IPO soon. In order to sell a good price of * its shares to Venture Capital, LeetCode would like to work on some projects * to increase its capital before the IPO. Since it has limited resources, it * ca...
ALGO
0.999994
5.893209
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2017-08-10T02:03: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": "eba728b1c...
36cc0021-de75-46b4-a4a1-8ce4aab83cc4
paulhjkelly/taskgraph-metaprogramming
suif/lib/dependence/lin_fm_hook.cc
#include <cstdlib> #include <cstring> #include <cmath> #include <suif1.h> #include <suifmath.h> #include "dependence.h" boolean dependence_library_no_integer_result(const integer_matrix & mat, boolean * res) { exact ex; int fail; ex.T_constr.init(mat.m(),m...
ALGO
0.999302
3.200394
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-04-11T18:16:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 3, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "858ad04fac...
a329ba65-6a14-47c9-8fe8-d8887c82edff
Mahirhasan25/XPSC
week5/Day2/A_Download_More_RAM.cpp
/* || <NAME> || */ #include <bits/stdc++.h> #define ll long long int #define vpair vector<pair<ll, ll>> #define PI 3.14159265359 #define cyes cout << "YES" << '\n' #define cno cout << "NO" << '\n' #define print(x) cout << x << '\n' #define minus cout << "-1" << '\n' #define pub push_back #define pob pop_back #d...
ALGO
0.999956
3.799508
{ "github_metadata": { "branch": "main", "commit_count": 88, "repo_created_at": "2023-06-16T09:35: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": "c55ef83bee0...
595d662a-56e5-4d3b-975f-44bd3bb3b294
LalitDhane/DSA
DataStructures/LinkedList.cpp
#include<iostream> using namespace std; class Node { public: int data; Node* next; Node() { data = 0; next = NULL; } Node(int d) { this->data = d; this->next = NULL; } Node(int d, Node* next) { this->data = d; this->next = next; } }; ...
ALGO
0.997887
4.999578
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-08-27T12:52: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": "56ea30d52e95...
36255a00-59c1-4141-8a7e-9ee23070d1ec
APCVSRepo/hmi_sdl_core_androidport
sdl_core/src/LibVrMsp/resample.cc
#ifdef MODIFY_FUNCTION_SIGN #include <global_first.h> #endif #include "resample.h" #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <memory.h> #define MAXV(a, b) (((a) > (b)) ? (a) : (b)) #define MINV(a, b) (((a) < (b)) ? (a) : (b)) typedef struct _fa_resample_filter_t { int L; ...
ALGO
0.997461
5.047094
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2015-12-09T02:27:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 9, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "e21ca45de3...
c7634159-3290-4e69-a1fb-a5d1f6fdd0ea
ltf0501/NoName
Contest/2019 Hong Kong/pC.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; #define F first #define S second const int kN = 4e5 + 10; vector<int> g[kN]; ll a[kN]; int n; bool vis[kN]; int sz[kN], mx[kN]; ll sum[kN], mx_val[kN]; vector<int> now; int bit[kN]; ll ans; void add(int x, int m, int d) { f...
ALGO
0.999929
3.969698
{ "github_metadata": { "branch": "master", "commit_count": 136, "repo_created_at": "2019-05-19T15:55:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed01d9c9...
4399bceb-a137-4438-ac60-d93411d41869
AradhyaKamlakar/Learn-c-
Learn c++ 03/Day 06/Exercies/Source09.cpp
//Write a program to count the number of vowelsand consonants in a string using a pointer. //Sample Output : //Input a string : <NAME> //Number of vowels : 3 //Number of consonants : 7 #include<iostream> #include<string> using namespace std; void consonants(char* p) { int count = 0, length = 0; while (*p != '\0') {...
ALGO
0.999619
3.691319
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-02-04T05:38: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": "b1f9eb8b2d...
9bd0f70e-e805-440c-a41f-0c29e53393b0
zmeadows/AdventOfCode
solutions/2021/day13.ixx
module; #include <cassert> export module day13; import parse; import types; import utils; import <algorithm>; import <string>; import <tuple>; import <unordered_set>; import <utility>; import <vector>; import <iostream>; constexpr U16 VERTICAL = 1; constexpr U16 HORIZONTAL = 2; constexpr bool PRINT_PART_TWO = false...
ALGO
0.999731
5.548553
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2021-12-01T05:43:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7751f8ec4...
7c06d8c8-ec59-4ed2-a397-5f417c2594a9
franky90237/LeetCode
Medium_2536. Increment Submatrices by One.cpp
//2023-01-15 //slower class Solution { public: vector<vector<int>> rangeAddQueries(int n, vector<vector<int>>& queries) { vector<vector<int>> ans(n, vector<int>(n, 0)); vector<vector<pair<int, int>>> rows(n); for(auto& q: queries) { int r1=q[0]; i...
ALGO
0.999503
6.224586
{ "github_metadata": { "branch": "main", "commit_count": 1265, "repo_created_at": "2021-11-09T02:29: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": "a01973e6d...
4cf95914-842b-4362-85dc-4a153ca4375a
msameerfarooq/Hacktoberfest2022
05. Arrays/4Sum.cpp
class Solution { public: vector<vector<int>> fourSum(vector<int>& nums, int target) { sort(nums.begin(), nums.end()); int n = nums.size(); vector<vector<int>> ans; for (int i = 0; i < n; ++i) { for (int j = i + 1; j < n; ++j) { int l = j + 1, r = n - 1; ...
ALGO
0.999978
6.083973
{ "github_metadata": { "branch": "main", "commit_count": 483, "repo_created_at": "2022-09-28T09:40:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 141, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e4846d7...
f2684c03-4217-4933-b0f4-16eb8bd5cf55
yahyasemih/Competitive-Programming
codeforces/522A.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NULL); int q; cin >> q; map<string, string> mp, mp2; vector<string> repost; for (int i = 0; i < q; i++) { string a, b; cin >> a >> b >> b; for_each(a.begin(), a.end(), [](char ...
ALGO
0.999951
3.810103
{ "github_metadata": { "branch": "master", "commit_count": 277, "repo_created_at": "2019-10-14T12:06: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": "c008ba6d...
774ac977-a8d7-4519-806f-da17a8a209c3
daniel-ankit/Leetcode
Next Greater Element - GFG/next-greater-element.cpp
//{ Driver Code Starts #include<bits/stdc++.h> using namespace std; // } Driver Code Ends // User Function Template for C++ solution class Solution { public: vector<long long> nextLargerElement(vector<long long> &arr, int n){ stack<long long>stack; vector<long long>ans(n, -1); for(int i...
ALGO
0.999887
6.194307
{ "github_metadata": { "branch": "master", "commit_count": 1616, "repo_created_at": "2021-12-12T14:53:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "32bbf9e...
d7710e52-c136-4e0c-a749-8e2d314de084
QwantResearch/auto-complete
src/sparsetable.cpp
#include "sparsetable.h" void SparseTable::initialize(vui_t const& elems) { this->data = elems; this->len = elems.size(); this->repr.clear(); DCERR("len: "<<this->len<<endl); const size_t ntables = log2(this->len) + 1; this->repr.resize(ntables); DCERR("ntables: "<<ntables<<endl); ...
ALGO
0.996452
5.613578
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2019-11-26T14:38:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b8ad6bac24...
5e08b260-2636-4a46-b5c2-7c4283f4c075
Hermera/OI
Code/BZOJ/1691.cpp
#include <cstdio> #include <algorithm> #define mid ((l+r)>>1) #define lc o<<1, l, mid #define rc o<<1|1, mid+1, r using namespace std; inline int read() { char ch = getchar(); int sum = 0; while(ch < '0' || ch > '9') ch = getchar(); while(ch >= '0' && ch <= '9') sum = sum*10+ch-'0', ch = getchar(); return sum; } co...
ALGO
0.999945
3.234416
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-06-07T14:16: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": "b0c9061bc...
609d8650-8b4e-4085-abce-259936a9c88b
powerLEO101/Work
Code/LOJ/LOJ6354/code.cpp
/************************** * Author : Leo101 * Problem : * Tags : **************************/ #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #define gi get_int() #define _FILE(s) freopen(#s".in", "r", stdin); freopen(#s".out", "w", stdout) const int MAXN = 6e6; int get_int() { int...
ALGO
0.999947
3.935606
{ "github_metadata": { "branch": "master", "commit_count": 658, "repo_created_at": "2019-03-09T07:16: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": "da887b2f...
9b68df22-bcb9-41a8-a842-e09a26e1fe6b
VictorMisyutin/CPP-Data-Structures
Exercises/Exercise 3 (Linked Queue)/LinkedQueueType.cpp
#include "LinkedQueueType.h" #include <iostream> using namespace std; LinkedQueueType::LinkedQueueType (){ rear = nullptr; length = 0; } LinkedQueueType::LinkedQueueType(const LinkedQueueType& qt){ rear = nullptr; length = 0; NodeType* cur = qt.rear->next; int count = qt.length; while (co...
TOOL
0.908032
4.473435
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2023-08-31T21:53:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f6e08fcebb6...
6ef2d75a-a0ad-45b1-8e15-e48f563c43f5
HKAgrwl/Leetcode
0909-snakes-and-ladders/0909-snakes-and-ladders.cpp
class Solution { public: int snakesAndLadders(vector<vector<int>>& board) { int n = board.size(); int square; int moves; queue<pair<int,int>> q; unordered_map<int,int> visited; q.push(make_pair(1,0)); while(!q.empty()){ square = (q.front()).first; ...
ALGO
0.999905
5.210653
{ "github_metadata": { "branch": "main", "commit_count": 664, "repo_created_at": "2022-03-11T13:08: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": "a981c85c7c...
ee52891c-de33-4596-8e1b-014e23e6dfb9
KoslickiLab/afsampling
src/alphaAffirmativeSketch.cpp
# include "alphaAffirmativeSketch.h" // Getter implementation std::vector<hash_t> AlphaAffirmativeSketch::get() const { std::vector<hash_t> vec; for (auto it = data_.begin(); it != data_.end(); it++) { vec.push_back(*it); } return vec; } // Adds a single element to the vector void AlphaAffirma...
ALGO
0.97481
5.745629
{ "github_metadata": { "branch": "main", "commit_count": 72, "repo_created_at": "2024-10-25T13:59:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "124a22b4f412...
8bf2e890-9de9-4e7c-a78c-953e9e30eff4
rahul27kr/Practice-DSA
LeetCode/Strings/Break a Palindrome.cpp
// https://leetcode.com/problems/break-a-palindrome/ /*Given a palindromic string of lowercase English letters palindrome, replace exactly one character with any lowercase English letter so that the resulting string is not a palindrome and that it is the lexicographically smallest one possible. Return the resulting s...
ALGO
0.999781
5.603069
{ "github_metadata": { "branch": "main", "commit_count": 450, "repo_created_at": "2022-05-29T10:15: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": "cfd16e5755...
c5500122-69f2-4d8b-9ca4-026ce3776546
sinkap/AlgosAndDS
sort/quicksort.cc
#include <iostream> #include <algorithm> template <class T, size_t N> class QuickSort { public: static void sort( T arr[] ); private: static void _sort(T arr[], int start, int end); static int partition(T arr[], int start, int end); }; template <class T, size_t N> void QuickSort<T,N>::sort( T arr[]) { _...
ALGO
0.999931
5.606721
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2015-01-12T23:17: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": "bb851a6e6...
99e67078-28a9-4074-9c03-1a40c5db2f17
iskang5532/PS
Programmers/부족한_금액_계산하기.cpp
/* 부족한 금액 계산하기 (코딩테스트 연습 > 위클리 챌린지 > 부족한 금액 계산하기(1주차)) 시간 복잡도: ? 문제: https://programmers.co.kr/learn/courses/30/lessons/82612 풀이) 놀이기구를 탄 이후, 지불해야 할 요금이 부족할 상황이 있을 것이며, 그 상황에서 부족한 금액을 구해야 함. 1) count번 탔을 때의 비용(= used)을 구함. - 횟수가 증가함에 따라 비용 또한 증가하므로, 가격과 횟수를 연관지어 수식을 완성시킴. 2) 소지중인 금액과 비교...
ALGO
0.99968
4.481543
{ "github_metadata": { "branch": "master", "commit_count": 330, "repo_created_at": "2021-07-29T10:17:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c1a1b27...
519dcc1b-19d5-4723-8605-4bba5d8931bb
xirc/cp-algorithm
lib/main/ds/main-implicit-treap.cpp
#include <iostream> #include <algorithm> #include <numeric> #include "cpalgo/ds/implicit-treap.hpp" #include "template/template-main.hpp" using namespace std; struct Data { int value, minimum; Data() {} Data(int value): value(value), minimum(value) {} }; struct Query { const Data id = Data(numeric_lim...
ALGO
0.999871
5.73113
{ "github_metadata": { "branch": "main", "commit_count": 2676, "repo_created_at": "2019-12-07T23:53:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8cce9260...
ec56e22e-876d-419e-ad93-cec1f3fc2fce
Vinayak-Bhardwaj/DSA-Problem-Solving
online Coding Blocks/RainWaterTrapping.cpp
// Approach is the we'll calculate the water stored on each building seperately and then take the summation of all // Now water is stored on a building only in condition when the neighbour buildings are taller than the given building // Now how to take the water out = minimum of(left most tallest building, right most t...
ALGO
0.999907
5.276075
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2022-05-07T13:27: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": "b27caf7c2...
7002e595-201c-4455-976f-25cf7d3fb2d9
ykkimhgu/NumericalProg-student
tutorial/TU_SystemNonlinear/TU_SystemNonLinear_Student_2023.cpp
/*------------------------------------------------------------------------------------------\ @ Numerical Methods by <NAME> - Handong Global University Author : <NAME> Created : 01-04-2019 Modified : 11-27-2023 Language/ver : C in MSVS2017 Course : Numerical Programming Description : TU...
ALGO
0.999985
3.622087
{ "github_metadata": { "branch": "main", "commit_count": 146, "repo_created_at": "2021-09-03T04:12:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8db540635...
09ec8417-812a-49b3-b386-ee735a4688ad
pmtejas/Placement_Prep
Day1/SlidingWindow And TwoPointer/3.cpp
#include <bits/stdc++.h> using namespace std; // fruit in to basket problem // Given an array of fruits where each fruit is represented by an integer, // find the maximum number of fruits that can be collected in two baskets. // Each basket can only hold one type of fruit, and you can switch the type of fruit in a bask...
ALGO
0.999795
6.093681
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2025-06-15T20:54:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "77ef02f7e7f...
e6564e20-1c58-4a95-9eb0-e870377be0b0
aleoleorl/cpp_AmauterPoker
baseProject/AnalyzerSmart.h
#pragma once #include <conio.h> #include "Player.h" #include "Analyzer.h" class AnalyzerSmart :public Analyzer { double risker; int sum(int money, int curMaxBet, int myBet); //проверяем, хватает ли денег на ставку int mult(int money, int curMaxBet, int myBet, int roundStartBet, rules gameRules, int res); //провер...
ALGO
0.996545
3.178962
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-07-09T20:57:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fab37fc7b327...
5751773c-e9b2-4db9-a983-ba1fed7f5201
cofls6581/hongjangal
코드트리/chaerin/싸움땅.cpp
#include <bits/stdc++.h> using namespace std; int n, m, k; int dx[] = {-1, 0, 1, 0}; int dy[] = {0, 1, 0, -1}; vector<int> gun[22][22]; int isPlayer[22][22][2]; int scores[32]; struct player { int x, y; int d; // 방향 int s; // 초기 능력치 int g; // 총 공격력 }; int main() { ios::sync_with_stdio(0); cin...
ALGO
0.999957
3.483309
{ "github_metadata": { "branch": "main", "commit_count": 716, "repo_created_at": "2022-01-09T06:48:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9082e7fce...
5d54d05f-07fc-4792-9f15-3ed57d93ba85
netpipe/emscripten-projects
tesseract/src/arch/dotproductfma.cpp
/////////////////////////////////////////////////////////////////////// // File: dotproductfma.cpp // Description: Architecture-specific dot-product function. // Author: <NAME> // // (C) Copyright 2015, Google Inc. // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this fi...
ALGO
0.997425
7.230831
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2019-12-08T22:25:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "491d5261...
cf83fb08-3b89-452f-b9f1-0fb27973ecf6
saurus2/acmicpcStudy
boj_15686_치킨배달.cpp
#include <iostream> using namespace std; int N,M,minV,cnt,cnt2; int mp[51][51]; int ck[101] = {0,}; int building[101][2]; int start[101][2]; void dfs(int idx, int build){ if(idx > cnt2){ return; } if(build == M){ int minSum = 0; int minValue; for(int i=0; i<cnt; i++){ ...
ALGO
0.999928
3.566078
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2017-02-14T02:21:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ba7336b66...
999e1b22-30ea-4821-bc1d-adf6c477035b
deepakantony/competitive_programming
project_euler/p1_to_p67/p58_spiral_anticlockwise.cpp
#include <iostream> #include <cstdlib> #include <cmath> using namespace std; typedef long long unsigned int vlong; bool is_prime(vlong n) { if(n == 2 || n == 3 || n == 5 || n == 7) return true; if(n < 11) return false; if(n%2 == 0 || n%3 == 0) return false; vlong sqrt_n = ceil(sqrt(n)); for(vlong i = ...
ALGO
0.997225
3.334048
{ "github_metadata": { "branch": "master", "commit_count": 785, "repo_created_at": "2011-12-16T19:45:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2647c76...
8e2dcd75-f8b7-44a9-b22b-5b20fe437f75
ishandutta2007/codeforces-r
rajat1603/normal/414/C.cpp
#include "bits/stdc++.h" using namespace std; const int N = 20; int n , p; int arr[1 << N]; int q; int inp; long long val[N]; long long rev[N]; int tmp[1 << N]; long long ans; inline void put(long long x){ if(x < 10){ putchar('0' + x); } else{ put(x / 10); putchar('0' + (x % 10)); ...
ALGO
0.998583
3.622131
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58: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": "357d149fd751...
90660e4f-a243-4d80-abb2-1ed147c6dc16
ishandutta2007/codeforces-p
pwild/normal/526/A.cpp
#include <list> #include <map> #include <set> #include <stack> #include <queue> #include <algorithm> #include <sstream> #include <iostream> #include <cstdio> #include <cmath> #include <cstdlib> #include <cstring> #include <climits> #include <cfloat> #include <numeric> #include <iomanip> #include <cassert> #include <uno...
ALGO
0.999843
3.56485
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:49:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4751a7f4ec83...
97a3201f-0843-4046-89e7-23389a9ca77d
fextivity/codeforces-submissions
codeforces/294/A.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define double long double #define fi first #define se second #define pb push_back #define pob pop_back #define mp make_pair #define pque priority_queue #define endl '\n' #define For(i, a, b) for (int i = a; i < b; i++) #define ForE(i, a, b) for (int i...
ALGO
0.999963
4.308992
{ "github_metadata": { "branch": "master", "commit_count": 1484, "repo_created_at": "2020-12-21T15:42:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbd6da9...
cf54ad10-3ce6-491d-9f06-cab6707a3b2e
IRMV-Manipulation-Group/SpherizedURDFGenerator
third_party/header_only/igl/shapeup.h
// This file is part of libigl, a simple c++ geometry processing library. // // Copyright (C) 2017 <NAME> <<EMAIL>> // // This Source Code Form is subject to the terms of the Mozilla Public License // v. 2.0. If a copy of the MPL was not distributed with this file, You can // obtain one at http://mozilla.org/MPL/2.0/. ...
ALGO
0.998694
6.563468
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2024-11-01T15:33:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 23, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8c4625e990...
8c452da1-8dbd-4f38-a369-048884090994
codesniper99/Coding-Competitions
Practice/Hoof, paper , scissor/main.cpp
#include <iostream> #include<bits/stdc++.h> #define ll long long int using namespace std; int main() { ios_base::sync_with_stdio(false); freopen("hps.in", "r", stdin); ll n; cin>>n; vector<char> a(n); vector<vector<ll>> prefix(n+1, vector<ll>(3,0)); for(ll i=0;i<n;i++){ cin>>a[i]; ...
ALGO
0.999019
3.598808
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2019-02-20T11:01:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4be952864...
71ee30ec-c626-4c7b-8e90-18163175d39e
BoChenYS/satellite-pose-estimation
pose_refinement/SA-LMPE/ba/openMVG/multiview/triangulation_nview.cpp
// This file is part of OpenMVG, an Open Multiple View Geometry C++ library. // Copyright (c) 2016 <NAME>. // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. #include...
ALGO
0.986034
5.980628
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2019-07-09T14:39:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 55, "forks": 13, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "cbaaef2...
8940631e-c87b-4211-b691-c131179f9fff
likhithpodugu/backupcodes
OOPS/practiseset3.cpp
#include<iostream> #include<iomanip> using namespace std; int main() { int n,qty[100],tot_qty=0; float sale_price[100],total_sale=0;//variables declaration float avg;//variables declaration cout<<"Enter the number of items: ";//printing the statement cin>>n;//reading the input n if(n<=100)//If cond...
TOOL
0.955238
3.898463
{ "github_metadata": { "branch": "main", "commit_count": 81, "repo_created_at": "2022-08-08T05:04: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": "cbd7ced5a17...
a6df8c2f-3fb2-4460-9ba2-0a49cd1e11c2
certemmo/studia
semestr-v/grafika-jacek/spr_lab7/code/phong.cpp
void Phong(float * v, int which) { float light_vec[3]; float reflection_vector[3]; float viewer_v[3] = {-v[0], -v[1], -v[2]}; float n_dot_l, v_dot_r; for(int i=0; i<3; i++) { inters_c[i] = 0.0; } for(int i=0; i<sourceCount; i++) { for(int j=0; j<3; j++) ...
ALGO
0.999346
3.894168
{ "github_metadata": { "branch": "master", "commit_count": 797, "repo_created_at": "2014-01-08T21:36:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 22, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50b9aca...
79693fdd-3e13-4147-a692-f7888f854de7
Abdulkadir-Mirza/CPP_Practice
STL/listsort.cpp
//Lists sort() #include<iostream> #include<list> using namespace std; int main(){ list<int> li; int i; for(int i=0;i<10;i++){ li.push_back(i+20); } cout << "Size: " << li.size() << endl; cout << "contents: " << endl; list<int>::iterator p = li.begin(); while(p!=li.end()){ ...
TOOL
0.976301
4.745305
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-02-21T06:22: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": "8f5257633ee...