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
c475a3a3-eddc-4ede-8ebb-2b387817d0ca
trsteel/tools
codeforces/Global Round/7/E.cpp
#include <iostream> #include <vector> #include <set> using namespace std; const long maxn = 300001; struct node { long long sum, mssm; } segs[maxn*4]; node merge(node& a, node& b) { node res; res.sum = a.sum+b.sum; res.mssm = max(a.mssm+b.sum, b.mssm); return res; } void update(int v, int i, int...
ALGO
0.999946
3.862222
{ "github_metadata": { "branch": "master", "commit_count": 167, "repo_created_at": "2017-03-06T07: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": "de1d10ab...
a8886ab8-e84b-4c2d-aebc-7fccb1045d8c
sykzhong/VisionMethodRecord
VisionMethodRecord/Canny.cpp
// Canny.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include <stdlib.h> #include <stdio.h> using namespace cv; const int msfsp = 20; //作为meanshift filter的像素位置差值 const int msfsr = 10; //作为Meanshift filter的像素大小差值 /// 全局变量 Mat src, src_gr...
TOOL
0.921718
4.580385
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2017-03-06T11:48: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": "45c0f16c2...
82a5a6e9-8290-4f13-b20f-1581cbd96167
DavidSM64/Diddy-Kong-Racing
tools/dkr_assets_tool_src/helpers/fileHelper.h
#pragma once #include <string> #include <vector> #include <fstream> #include <iostream> #include <unordered_map> #include <optional> #include "stringHelper.h" #include "debugHelper.h" #include "libs/bytes_view.hpp" #include <filesystem> namespace fs = std::filesystem; namespace DkrAssetsTool { // Using path as a ...
TOOL
0.938943
7.172348
{ "github_metadata": { "branch": "master", "commit_count": 1825, "repo_created_at": "2020-05-28T00:18:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 299, "forks": 28, "issues": 2, "pull_requests": 6 }, "file_meta": { "content_id": "a078...
43dda849-b09d-4515-bdfb-651310302245
lggaray/dtnsim
dtnsim/src/node/dtn/routing/RoutingCgrModel350_Probabilistic.h
#ifndef SRC_NODE_DTN_ROUTINGCGRMODEL_PROBABILISTIC_H_ #define SRC_NODE_DTN_ROUTINGCGRMODEL_PROBABILISTIC_H_ #include <src/node/dtn/routing/CgrRoute.h> #include <src/node/dtn/routing/RoutingDeterministic.h> #include <src/node/dtn/SdrModel.h> class RoutingCgrModel350_Probabilistic: public RoutingDeterministic { public...
ALGO
0.988691
6.681661
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-05-06T09:30:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3db2b83eab29...
fd648fb5-addf-4e07-a02e-69eb4317fe17
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/04/0423/personal_submission/cf922d_Pdocw.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int n; cin >> n; vector<string> strs(n); vector<pair<int, int>> hs(n); for (int i = 0; i < n; i++) { cin >> strs[i]; hs[i].first = count(strs[i].begin(), strs[i].end(), 'h'); hs[i].second = co...
ALGO
0.99775
3.808942
{ "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": "b0ed...
2f18fdcf-d01c-4818-901d-dae2a1b000a7
Olat/CodeSamples
CodeTest_2/Test/Test.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> //linked list node definition typedef struct LinkNode { struct LinkNode *pPrev; struct LinkNode *pNext; int *pData; //dynamically allocated data. } LinkNode_t; //global pointer to head of linked list LinkNode_t *g_pLinkedList; typedef stru...
ALGO
0.975104
3.397387
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-10-14T15:03: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": "4fde11c3a0...
cfdfde66-66ba-44fb-8bad-b7e15937846c
Undergarun/FirestormWoD
dep/SFMT/SFMT.h
/***************************** sfmt.h *********************************** * Authors: * <NAME> (Hiroshima University) * <NAME> (Hiroshima University) * <NAME> (Technical University of Denmark) * Date created: 2006 * Last modified: 2009-02-08 * Project: randomc * Platform: This C++ version requires an x...
ALGO
0.96873
6.367549
{ "github_metadata": { "branch": "master", "commit_count": 16579, "repo_created_at": "2017-02-19T21:24:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 155, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "108...
f7a0597a-f1c5-4a6b-a399-ae01c74d4760
BarclayRkts/TXST-CS-2308
Pointers/assign3_dnb53.cpp
//File Name: assign3_dnb53.cpp // // Author: <NAME>, <NAME> // Date: 10/09/2019 // Assignment Number: 3 // CS 2308 Fall 2019 // Instructor: <NAME> #include <iostream> #include <iomanip> using namespace std; bool isSorted(int *arr , int); double pizza (int people, int *pizzas, int *slices); int *doubleReverse(int *ar...
TEST
0.956273
4.992147
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-07-20T06:24: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": "51bad7aa65...
1f7ce386-c7d5-495b-9f13-4f56bb3e13d6
networkit/networkit
networkit/cpp/centrality/GroupClosenessLocalSwaps.cpp
#include <algorithm> #include <cassert> #include <omp.h> #include <queue> #include <networkit/auxiliary/Random.hpp> #include <networkit/centrality/GroupClosenessLocalSwaps.hpp> namespace NetworKit { GroupClosenessLocalSwaps::GroupClosenessLocalSwaps(const Graph &G, const std::vector<node> &group, ...
ALGO
0.999928
6.12103
{ "github_metadata": { "branch": "master", "commit_count": 9146, "repo_created_at": "2017-02-04T13:04:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 811, "forks": 235, "issues": 23, "pull_requests": 24 }, "file_meta": { "content_id": "14...
529abd72-73b1-4fe9-9e96-4b1765a74438
TengFeiyang01/Algorithm
ACODE/cf/cf_edu_151/b.cpp
#include <bits/stdc++.h> const int inf = 0x3f3f3f3f; using i64 = long long; using PII = std::pair<int, int>; const int N = 1e5 + 13; void solve() { int x1, x2, x3, y1, y2, y3; std::cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; if (x1 >= x2 == x1 <= x3) { if (y1 <= y2 == y1 <= y3) { std::cout << 1 + ...
ALGO
0.999986
4.910984
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2024-07-12T15:01: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": "abf0e804f...
6589106c-457e-4c11-b92b-b21f1268863e
prateekmohanty63/LeetCode
Placement-Preparation/BST/ValidateBST.cpp
#include<iostream> using namespace std; // Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *l...
ALGO
0.999986
5.417737
{ "github_metadata": { "branch": "master", "commit_count": 1103, "repo_created_at": "2021-09-27T04:55:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d68aec0...
f058908b-7e3d-47d6-bc5f-c82245af4280
Mugashree/Data-Structures-Lab
Q11/solution.cpp
// Program to implement stack using array #include <cstdio> #include <cstdlib> class Stack{ char arr[5]; int top; public: Stack(){ top = -1; } void Push(char val); void Pop(); void Peek(); void Display(); }; int main(){ Stack obj; while(1){ printf("\n\n\nMENU:\n"); printf("1. Push\n2. Pop\n3. Peek\n"); prin...
ALGO
0.999355
3.948979
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2025-05-03T08:33: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": "c6a9f80c9d9...
eab4cee7-a34f-43e8-a5f2-7b4fcd76079c
hyeong3642/File_Process
avl/AVL_skeleton_cpp.cpp
/** * File processing, 2020 * AVL.cpp * implementation of AVL tree */ #include <stdio.h> /** * Node represents a single node in AVL tree. */ typedef struct Node { int key, bf; struct Node *left, *right; } Node; typedef Node *Tree; /** * getNode returns a new node. * @return a new node */ Node *...
ALGO
0.99993
5.587427
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-11-18T10:03:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5991f02746...
5d7a338d-71c9-4096-83b1-714b32f694df
passeriforma/ProgChal
2-Mathematics/Circumference.cpp
#include<stdlib.h> #include<stdio.h> #include<math.h> double calculateRadius(double p1, double p2, double m1, double midpoint1x, double midpoint1y, double m2, double midpoint2x, double midpoint2y); int main() { double p1, p2, q1, q2, r1, r2; double pi = 3.141592653589793; while(scanf("%lf %lf %lf %lf %lf %lf...
ALGO
0.999615
4.127136
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2015-05-16T15:04:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3bbe79e23...
ec7c669b-b110-44d3-8325-b0d0970b412f
taehyungz/Algorithm
acmicpc.net/01325.cpp
#include <iostream> #include <cstring> #include <vector> using namespace std; vector<int> trust[10001];//신뢰 배열 bool visit[10001];//방문 여부 int nums[10001]; //해킹 개수 vector<int> biggest[10001]; void DFS(int from) { visit[from] = true; for (int i = 0; i < trust[from].size(); i++) { if (!visit[trust[from][i]]) DFS(trust...
ALGO
0.999987
3.994838
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2021-05-11T18:03: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": "326883c4...
1f034126-f88d-4227-a922-0e3ee415f381
Domain-Cmap/assignments-day-1-to-day-9-TalibSiddiqi
Day 2/Very Hard/1.cpp
#include <vector> #include <algorithm> #include <climits> #include <iostream> using namespace std; class Solution { public: int minimumTimeRequired(vector<int>& jobs, int k) { const int n = jobs.size(); vector<int> sums(1 << n, 0); for (int b = 0; b < (1 << n); ++b) { f...
ALGO
0.999998
6.922551
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-12-30T16:23:53.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "920f7c2bf41d5...
5f2334b3-e4f2-4403-a10d-e1121bbb7756
final-venture/cp
orac/aiio/2009/52.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define EPS 1e-9 vector<vector<int>> adj; const int inf = 1e9; void solve() { int p, j; cin >> p >> j; int st_a, st_b; cin >> st_a >> st_b; adj.resize(p + 1); for (int i = 0; i < j; ++i) { int p1, p2; cin ...
ALGO
0.999886
3.574913
{ "github_metadata": { "branch": "main", "commit_count": 313, "repo_created_at": "2024-01-01T04:15: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": "b4e2ba25ce...
b0ae2057-c4df-4345-a21e-aef3a41b8234
kerberos-io/machinery
include/kerberos/machinery/algorithm/Algorithm.h
// // Class: Algorithm // Description: An algorithm to detect motion using a sequence of three images. // Created: 17/07/2014 // Author: <NAME> // Mail: <EMAIL> // Website: www.verstraeten.io // // The copyright to the computer program(s) herein // is the property of Verstraeten.io, Belgium....
ALGO
0.983471
5.928257
{ "github_metadata": { "branch": "master", "commit_count": 632, "repo_created_at": "2014-08-04T11:22:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 488, "forks": 101, "issues": 72, "pull_requests": 0 }, "file_meta": { "content_id": "1fa7...
002b354f-58ef-40d0-a5ed-6f94ce687bca
Codeisfuture/little-questions
无敌的二项式加法.cpp
// 多项式相加.cpp : 定义控制台应用程序的入口点。 // #include<iostream> #include<fstream> #define MAX 1000000 using namespace std; int num[100]; int main() { ifstream in("poly.in"); ofstream out("poly.out"); int _num=0; int n = 0; while (!in.eof()) { in >> _num; num[n++] = _num; } int N = n; for (int i = 1; i < N; i = i + 2...
ALGO
0.999964
3.650469
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-01-31T11:07: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": "6e54e91cd7...
e228cff9-21ff-4fad-8f96-c8768e31d536
isquicha/exercicios-logica-c
exercicios/029.cpp
/* As Organizações Tabajara resolveram dar um aumento de salário aos seus colaboradores e lhe contrataram para desenvolver o programa que calculará os reajustes. Faça um programa que recebe o salário de um colaborador e o reajuste segundo o seguinte critério, baseado no salário atual: salários até R$ 280,00 (incl...
TOOL
0.951133
3.445719
{ "github_metadata": { "branch": "main", "commit_count": 112, "repo_created_at": "2020-11-03T03:10:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 124, "forks": 32, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6268f6d...
be37c6b4-e23c-46a0-8a8a-c8f2daa3a1f2
amrsamy203/Algorithms
Trie.cpp
struct trie { static const int MAX_CHAR = 26; //if MAX_CHAR is big range but not all values are used, use a map instead of static array trie* child[MAX_CHAR]; bool isLeaf; trie() { memset(child, 0, sizeof(child)); isLeaf = 0; } void insert(char * str) { // reference to the current char in the char s...
ALGO
0.999453
3.86706
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2019-09-20T13:10:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d1fc31c51...
d2307f73-daa8-4caa-9cae-2e640659acc3
pramod10696/hacktoberFest-Contributions-2022
quicksort.cpp
#include <bits/stdc++.h> using namespace std; void swap(int* a, int* b) { int t = *a; *a = *b; *b = t; } int partition (int arr[], int low, int high) { int pivot = arr[low]; // pivot int i = (low ); int j=high; while(i<j) { do { i++; }while(arr[i]<=p...
ALGO
0.99998
4.592495
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2022-10-01T12:13:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 13, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "9bb7fc77b7...
f8f4c77c-3e6d-473c-b966-4728d8707c5a
Jak57/algorithms-implementation
GA-Conference Scheduling.cpp
#include<bits/stdc++.h> using namespace std; struct conf{ int id; int s; int f; }; bool cmp(conf a, conf b) { if(a.f <= b.f) return true; else return false; } int main() { conf arr[10000]; int n, i, j, s, f, cnt = 1, prev, id; vector<int> vi; cin>> n; for(i =...
ALGO
0.999978
4.038523
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2020-04-17T04:29:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da1ba1587...
58683014-a91b-4b9e-8fe8-dbf2a340f44c
saaras-io/yastack
ev/source/common/upstream/edf_scheduler.h
#include <cstdint> #include <queue> #include "common/common/assert.h" namespace Envoy { namespace Upstream { // It's not sufficient to use trace level logging, since it becomes far too noisy for a number of // tests, so we can kill trace debug here. #define EDF_DEBUG 0 #if EDF_DEBUG #define EDF_TRACE(fmt...) ENVOY_...
ALGO
0.995072
7.746956
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-11-21T01:41:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 103, "forks": 19, "issues": 7, "pull_requests": 4 }, "file_meta": { "content_id": "b4f8d33...
634e4938-e701-4347-b5e7-de1059f3b04e
SkyLoaderr/xray-engine-repo
xrAI/dijkstra_bidirectional_inline.h
//////////////////////////////////////////////////////////////////////////// // Module : dijkstra_bidirectional_inline.h // Created : 21.03.2002 // Modified : 08.06.2004 // Author : <NAME> // Description : Implementation of the Dijkstra algorithm (bidirectional, only for non-oriented graphs) inline functions ////...
ALGO
0.999639
4.359803
{ "github_metadata": { "branch": "master", "commit_count": 83977, "repo_created_at": "2021-04-21T18:03:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f62...
0f4fa3d8-e79c-4b02-a5ba-1ed1d9420b56
thirofoo/atcoder-archives
abc381/abc381_f_60082377_WA.cpp
/* * Author: through * Submission URL: https://atcoder.jp/contests/abc381/submissions/60082377 * Submitted at: 2024-11-22 22:29:54 * Problem URL: https://atcoder.jp/contests/abc381/tasks/abc381_f * Result: WA * Execution Time: 34 ms */ #include <bits/stdc++.h> #include <atcoder/all> using namespace std; using n...
ALGO
0.999956
4.311246
{ "github_metadata": { "branch": "main", "commit_count": 5513, "repo_created_at": "2022-12-17T09:45:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "d4538d141...
3e973fac-03c8-45b2-a2f7-bda316de0ecc
MostafaAshraf98/Problem-Solving
Linked List/LeetCode/426.ConvertBinarySearchTreetoSortedDoublyLinkedList.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> ii; typedef vector<ii> vii; typedef vector<int> vi; #define sf(n) scanf("%d", &n) #define sff(n, m) scanf("%d%d",&n,&m) #define sfl(n) scanf("%I64d", &n) #define sffl(n, m) scanf("%I64d%I64d",&n,&m) #define sfs(s) scanf("%s",s...
ALGO
0.999997
4.795758
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2021-08-27T15:54: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": "a40e3cfea...
82626aa5-3515-4537-b780-dc8982979cf2
yinghaoyu/LeetCodeInHardWay
src/Problem_2611_miceAndCheese.cc
#include <algorithm> #include <vector> #include "UnitTest.h" using namespace std; class Solution { public: int miceAndCheese(vector<int> &reward1, vector<int> &reward2, int k) { int ans = 0; int n = reward1.size(); vector<int> diffs(n); for (int i = 0; i < n; i++) { ans += reward2[i]; ...
ALGO
0.99985
6.051359
{ "github_metadata": { "branch": "master", "commit_count": 1326, "repo_created_at": "2022-08-08T13:33: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": "6036a96...
092d09ec-8752-4c96-adcb-000cc99f94c0
Aman-droid/CP_Essentials
CODES/DP/B_Find_the_Spruce.cpp
#include<bits/stdc++.h> #define ll long long #define int long long #define endl '\n' #define rep(i,a,b) for(int i=a;i<=b;i++) #define pll pair<ll,ll> #define pii pair<int,int> #define vpll vector<pll> #define SZ(x) ((int)x.size()) #define FIO ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL) #define watch(x)...
ALGO
0.999931
3.853586
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-06-28T19:31:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5cf0f7684a...
10f5d33b-ef7a-4d2c-8c72-4cda361680d8
DonLakeFlyer/matlab-coder-utils
coder-headers/ceres/custom_local_parameterization.hpp
// Copyright 2021-2022 The MathWorks, Inc. #include <vector> #include "ceres/ceres.h" #include <Eigen/Core> #ifdef BUILDING_LIBMWCERESCODEGEN #include "cerescodegen/group_utilities.hpp" #else /* To deal with the fact that PackNGo has no include file hierarchy */ #include "group_utilities.hpp" #endif usin...
ALGO
0.948792
3.156608
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2023-02-18T20:55:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "da4883e4f...
4f9ca1ee-7af0-46af-8c62-d9d14895f226
Voltline/ECNU_Online_Judge
2022.11新生挑战赛/4920粉刷矩形.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n{0}, m{0}, k{0}; cin >> n >> m >> k; char** matrix = new char*[n]; for (int i = 0; i < n; i++) { matrix[i] = new char[m]; } for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { matrix[i][j] = '.'; ...
ALGO
0.999805
4.693417
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2022-10-21T14:25:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a5d5d256e...
ad770645-9264-409f-aa1a-b41ae9fd1aa2
chengg04/4500_FE_programming
Assignment_4/Xiaojun/oldversion/HW4_GRB.cpp
#include <stdio.h> #include <stdlib.h> #include <gurobi_c++.h> int GurobiSolve(int n, int T, int pcNum, double *V, double *F, double *D, double *mu, double lambda, int nameLimit, double ubLimit, int constType) { int retcode = 0; GRBenv *env = NULL; GRBmodel *model = NULL; int j,m; double *obj = ...
ALGO
0.997771
3.786546
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-11-04T01:54: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": "c859da5290...
023a2c2b-e5c6-4d82-a451-6b57da03a8fc
TS2535824/StevensTyler_48102
Hw/Assignment_3/Gaddis_7thEd_Chap4_Prob4_AreaOfRectangle/main.cpp
/* * File: main.cpp * Author: <NAME> * Created on July 19, 2016, 9:07 AM * Purpose:Calculates area of a two separate rectangles */ //System Libraries Here #include <iostream> using namespace std; //User Libraries Here //Global Constants Only, No Global Variables //Like PI, e, Gravity, or conversions //Funct...
TOOL
0.998122
3.796179
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-09-21T03:05: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": "9b5f25c7e1...
e025125c-e34e-4d2e-90ea-b2cb50815038
monta-20/LeetCode
L1.1.min-distance.cpp
#include <bits/stdc++.h> #include <iostream> #include<string> using namespace std; int shortestDistance(vector<string>& s,string word1, string word2) { int ans =INT_MAX ; int d1 = -1,d2 = -1 ; for( int i =0 ; i < s.size() ; i++) { if(s[i] == word1){ d1 = i ; } if(s[i] =...
ALGO
0.999795
5.338145
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2024-10-21T21:36: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": "d19a583b65b...
e9df70cd-5629-45f9-bb52-5166e721515e
ishandutta2007/codeforces-r
ronnie007/normal/384/A.cpp
#include<iostream> #include<stdio.h> #include<string> #include<algorithm> #include<cmath> #include<map> #include<vector> #include<queue> using namespace std ; int n ; int ans[ 1007 ][ 1007 ] ; void input ( ) ; void solve ( ) ; int main ( ) { input ( ) ; solve ( ) ; return 0 ; } void input ( )...
ALGO
0.999636
3.086439
{ "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": "29852b7d51e1...
33e8d141-0246-4b87-ac8e-81a396e5c690
alexandraback/datacollection
solutions_5731331665297408_0/C++/3of7/main.cpp
#include <algorithm> #include <bitset> #include <functional> #include <iostream> #include <list> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; bool isless(string& a, string& b) { for(i...
ALGO
0.999975
3.932459
{ "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": "0d1de95b9...
d49fd997-e48e-4b41-8256-5a7a86225ef3
anishaga/Data-Structures-And-Algorithms
BST/checkBST.cpp
#include <bits/stdc++.h> using namespace std; template <typename T> class BinaryTreeNode { public: T data; BinaryTreeNode *left; BinaryTreeNode *right; BinaryTreeNode(T data) { this->data = data; right = NULL; left = NULL; } ~BinaryTreeNode() { delete r...
ALGO
0.999986
4.725477
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-03-03T11:45: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": "287e2b2c6f39...
8d7a14ab-b295-4161-ba00-89c3ec08cf82
silverwing-coder/CourseSubjects
CS111$Programming-2(C++)/AssignmentCodes/A0101.cpp
#include <iostream> using namespace std; int main(int argc, char *argv[]) { int num_low, num_high, p_count = 0; bool prm; if (stoi(argv[1]) > stoi(argv[2])) { num_low = stoi(argv[2]); num_high = stoi(argv[1]); } else { num_low = stoi(argv[1]); num_high = sto...
ALGO
0.998674
4.868958
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2024-08-12T17:24: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": "41046a9d1...
e0066e90-a337-4927-90c7-afbe5f38cdfe
ishandutta2007/codeforces-h
holidin/normal/1290/C.cpp
#include <bits/stdc++.h> #define int long long #define fi first #define se second #define double long double using namespace std; const int N = 3e5 + 1; const int mod = 1e9 + 7; vector <int> v[N], vt[N], vs[N]; int cnt[N][2], c[N], type[N], fix[N]; void uni1(int a, int b) { if (a == b) return; if (v[a...
ALGO
0.999918
4.052965
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5cf9b0e88eb0...
294297be-29fe-4d2e-a029-e72f41934aed
RosettaCommons/rosetta
source/src/core/energy_methods/DistanceChainbreakEnergy.cc
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- // vi: set ts=2 noet: // // (c) Copyright Rosetta Commons Member Institutions. // (c) This file is part of the Rosetta software suite and is made available under license. // (c) The Rosetta software is developed by the co...
TOOL
0.994043
6.862141
{ "github_metadata": { "branch": "main", "commit_count": 11737, "repo_created_at": "2023-11-17T16:42:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 296, "forks": 100, "issues": 27, "pull_requests": 9 }, "file_meta": { "content_id": "770d...
634c273a-f255-4219-a53a-6cc37af3d4fd
JorgeIba/Competitive-Programming-Problems
CodeForces/1869 - E.cpp
#include <bits/stdc++.h> #define endl '\n' #define lli long long int #define ld long double #define all(v) v.begin(), v.end() #define fastIO(); ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define SZ(s) int(s.size()) #define debugg(x) cerr << #x << " = " << x << endl; #define forn(i, n) for(int i = 0; i < (...
ALGO
0.999971
4.901774
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2020-04-16T06:16: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": "35f57a07f...
6de45e20-e0b3-42a9-b2b3-3fc4e3913f9e
DionysiosB/CodeForces
0200-0299/254B-JurySize.cpp
#include <cstdio> #include <iostream> #include <vector> #include <map> int main(){ const int mdays[] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; FILE * inputFile = fopen("input.txt","r"); int n; fscanf(inputFile, "%d\n", &n); std::map<int, long> countMap; while(n--){ int m, d...
ALGO
0.999399
4.277086
{ "github_metadata": { "branch": "master", "commit_count": 4487, "repo_created_at": "2013-06-27T18:15:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 690, "forks": 163, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e47...
6537fa87-c8ab-4a11-b8fe-f865bd2579de
kjauhari28/Lost-Found-System-using-OOPs-
code.cpp
#include <iostream> #include <vector> #include <string> #include <sstream> #include <fstream> #include <map> using namespace std; class Item { public: int itemID; string username; string description; string location; string status; string contactNumber; Item(int id, string user, string desc...
TOOL
0.962311
5.75554
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-17T15:11: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": "ed7ce4aae6b7...
5b783011-07b2-4ae6-adc2-22af71d79246
MoCCo329/algo_solving
programers/table_hash_function.cpp
// 테이블 해시 함수. 2023-08-26 #include <vector> using namespace std; vector<vector<int>>* table; int i_size; int j_size; int p; int sorted_t[2500][500]; void merge(int l, int m, int r); void merge_sort(int l, int r) { if (r <= l) return; int m = (l + r) / 2; merge_sort(l, m); merge_sort(m + 1, r)...
ALGO
0.999881
5.6925
{ "github_metadata": { "branch": "master", "commit_count": 466, "repo_created_at": "2022-04-04T14:59: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": "88938daf...
20e43311-6119-49e1-87c2-8ec0b55dd7a7
DylanGuedes/urinooby
1677.cpp
#include <iostream> #include <cstring> #include <queue> #include <vector> #include <set> using namespace std; int visited[5050]; vector<int> graph[5050]; void bfs(int idx) { queue<int> myq; myq.push(idx); while (not myq.empty()) { idx = myq.front(); myq.pop(); visited[idx] = 1; fo...
ALGO
0.999969
4.222127
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2016-03-27T19:38:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f347f7975...
752113e0-1056-4ca5-a0e9-44c7131167a9
ssugam10/leetcode-solutions
0010-regular-expression-matching/0010-regular-expression-matching.cpp
class Solution { public: bool find(int i, int j, string &s1, string &s2, vector<vector<int>> &dp) { if (i < 0 && j>0) { while(j >= 0 && s2[j] == '*') j -= 2; // while(s2[j] == '*') j--; // if(j == 0) return true; } if (i < 0 && j < 0) ...
ALGO
0.999966
4.783807
{ "github_metadata": { "branch": "main", "commit_count": 1370, "repo_created_at": "2024-06-30T04:18: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": "c3d763cd6...
57e5e408-ea6a-4b5e-b7b0-d6239702f661
GeoDTN/miscellaneous_algorithms
FloodDepth/binary_search.cpp
#include <stdexcept> #include <iostream> #include <queue> #include <list> class Node { public: Node(Node* leftChild, Node* rightChild) { this->leftChild = leftChild; this->rightChild = rightChild; } Node* getLeftChild() const { return this->leftChild; } Node* getRightChild() const { ...
ALGO
0.994607
5.743982
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-06-01T08:48: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": "de731948f4de...
aae70279-c32a-44b6-b22a-83453758e166
Liu-YT/LeetCode
cpp/38.Count_and_Say.cpp
// 1 class Solution { public: string countAndSay(int n) { if(n == 1) return "1"; else { string res = countAndSay(n-1), s = ""; int count = 1, i = 0; while(i < res.size()) { if(i < res.size() - 1 && res[i] == res[i+1]) { ++i; ++count; } else { ...
ALGO
0.999988
6.016124
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-06-05T14:27:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a905344c2...
411bda8a-6150-45f6-95cb-d4f4a580544f
gnueskob/PS
baekjoon/1966.cpp
// 프린터 큐 // https://www.acmicpc.net/problem/1966 #include<iostream> #include<cstring> using namespace std; int priCnt[11]; int pri[100*101/2]; int main() { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int T, N, M, max; cin >> T; while(T--) { memset(priCnt, 0, sizeof(priCnt)); max = 0; ...
ALGO
0.999978
3.899686
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2019-02-26T07:15: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": "c64d70dbb...
87a4fd33-5d7c-4779-b30a-65e34c0eb435
sdpkjc/training
S_tra/19-07-20/hh.cpp
#include <memory.h> #include <string.h> #include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> using namespace std; string NM[2000]; const long long MODA = 1000079; const long long MODB = 4951; const long long MODC =...
ALGO
0.999974
3.832502
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-05-03T18:52:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a8f0ed857...
99a8fbcc-76ba-4424-8af6-0af8b2087d47
acrazyczy/DS-Library
BinarySearchTree/AVLTree/AVLTree.h
// // Created by crazy_cloud on 2020/2/8. // #ifndef DSLIB_AVLTREE_H #define DSLIB_AVLTREE_H #include "Exception.h" #include "Iterator.h" #include <functional> #include <cstdlib> template <class keyType , class valueType , class compare = std::less<keyType> > class AVLTree { private: struct Node { keyType key; ...
ALGO
0.996976
6.144635
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-01-31T06:15: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": "ee4832495...
7efda6a3-f16c-4903-a71f-17a6fdd0db9e
Egahi/encryption
crypto.cpp
#include "crypto.h" #include <iostream> #include <cctype> #include <cstring> using namespace std; /** * Gets plaint text to be encrypted and key from user */ void Crypto::GetPlainTextnKey() { cout << "Plain Text: "; cin.getline(PlainText, 24); cout << "Key: "; cin >> key; cin.ignore(15, '\n'); } /** * Encip...
ALGO
0.998364
4.151369
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-05-13T01:24:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24e39fc18e...
03b0ceba-cd0e-46fa-a554-546341d304eb
favedit/MoCrossOld
Source/Cross/Common/MoCommon/MoCmList.h
#ifndef __MO_CM_LIST_H__ #define __MO_CM_LIST_H__ #ifndef __MO_CM_TYPE_H__ #include "MoCmType.h" #endif // __MO_CM_TYPE_H__ #define MO_COMPLIST_THRESHOLD 8 MO_NAMESPACE_BEGIN //============================================================ // <T>链表的节点定义。</T> // // @struct //===========================================...
ALGO
0.981628
5.739876
{ "github_metadata": { "branch": "master", "commit_count": 190, "repo_created_at": "2014-04-19T03:20:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb6a156c...
cc3b662c-7894-4e7a-ac64-305957a7aadc
KernelHC/graph-calculator
Graph.cpp
#include <iostream> #include <string> #include <set> #include <cctype> #include "Graph.h" #include "Edge.h" #include "Vertex.h" #include "Exceptions.h" #define SPACE ' ' #define SKIP_SPACES(str,it) while(*it==SPACE){++it;if(it==str.end())break;} using std::endl; using std::cin; using std::cout; using std::set; using ...
ALGO
0.996814
4.465905
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-12-12T02:46: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": "883b7648fedd...
0f9e05ec-3c51-48a0-b11e-8cd9037eae78
wsnewman/learning_ros
Part_5/irb120/irb120_planner/src/irb120_planner.cpp
//irb_120_planner.cpp // wsn, Dec, 2017 // try using generic planner code with virtual fncs to specialize for irb120 kinematics #include <irb120_fk_ik/irb120_kinematics.h> //in this case, choose irb120; change this for different robots #include <fk_ik_virtual/fk_ik_virtual.h> //defines the base class with virtual fncs...
ALGO
0.938587
5.491439
{ "github_metadata": { "branch": "noetic_devel", "commit_count": 305, "repo_created_at": "2016-01-06T18:12:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 356, "forks": 234, "issues": 8, "pull_requests": 1 }, "file_meta": { "content_id":...
4e65a41d-5e47-4cf7-b621-3af651889e4e
kalimbatrr/SnakeGame-G-old-days-
Snake Game/Snake Game/main.cpp
#include <iostream> #include <raylib.h> #include <deque> #include <raymath.h> using namespace std; Color green = {173, 204, 96, 255 }; Color darkGreen = { 43, 51, 24, 255 }; //Creating the grid int cellSize = 30; int cellCount = 25; int offset = 75; double lastUpdateTime = 0; bool ElementInDeque(Vector2 element, d...
ALGO
0.951345
5.951745
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-12-19T16:19: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": "1c02f816755d...
d363c549-ad65-4d65-826d-9689647c655a
dkali/algorithms
leetcode/617 Merge Two Binary Trees.cpp
// https://leetcode.com/problems/merge-two-binary-trees/description/ // Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not. // You need to merge them into a new binary tree. The merge rule is that if two nodes overla...
ALGO
0.999974
6.396453
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2017-08-25T21:23: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": "1e40934f...
8af917d5-cd90-4d17-a99b-fd18a18400df
smv1999/CompetitiveProgrammingQuestionBank
Dynamic Programming/Edit_distance.cpp
/* problem statement -> https://leetcode.com/problems/edit-distance/ Description -> Given two strings word1 and word2, return the minimum number of operations required to convert word1 to word2. You have the following three operations permitted on a word: Insert a character Delete a character Replace a character E...
ALGO
0.999997
5.457928
{ "github_metadata": { "branch": "master", "commit_count": 1413, "repo_created_at": "2020-04-15T13:06:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1251, "forks": 358, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88...
563e55b8-6f7f-49ab-a442-fb6fed684e69
SoinDosa/Algorithm-Solution
삼성SW역량테스트/모의/1949_등산로 조성.cpp
#include<iostream> #include <queue> using namespace std; int dx[4] = { 0, 1, 0, -1 }; int dy[4] = { 1, 0, -1, 0 }; int N, K; int board[9][9]; int maxHeight; bool OOB(const int& x, const int& y) { return (x < 0 || x >= N || y < 0 || y >= N); } int BFS(int copiedBoard[9][9]) { int maxDist = 0; int dist[9][9] = { };...
ALGO
0.999567
4.084845
{ "github_metadata": { "branch": "main", "commit_count": 316, "repo_created_at": "2022-12-26T07:32:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8877a9fbb8...
debdbc73-ea92-4a59-b511-56d9e5c6bd1b
JstMonika/VC
Virtual Contest/World_Final_2009_Stockholm/pI.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; template<typename T> using p = pair<T, T>; template<typename T> using vec = vector<T>; template<typename T> using deq = deque<T>; #define dbg #define yccc ios_base::sync_with_stdio(false), cin.tie(0) #define al(a) a.begin(),a.end() #define F first #...
ALGO
0.997464
3.587604
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-11-05T11:32: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": "60467b9feb...
f9cac386-8c09-4717-9415-e0b5146f56f0
allscale/allscale_runtime
allscale/components/localoptimizer.hpp
#ifndef ALLSCALE_COMPONENTS_LOCALOPTIMIZER_HPP #define ALLSCALE_COMPONENTS_LOCALOPTIMIZER_HPP #include <allscale/components/nmsimplex_bbincr.hpp> #if defined(ALLSCALE_HAVE_CPUFREQ) #include <allscale/util/hardware_reconf.hpp> #endif #include <deque> #include <vector> #include <stdlib.h> #include <time.h> #include <s...
ALGO
0.99644
4.577755
{ "github_metadata": { "branch": "master", "commit_count": 841, "repo_created_at": "2016-12-19T11:13:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 3, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "0021a6144...
f703c4d4-db05-4bdb-be8a-f3456ffb6ab2
gagandeepahuja09/Competitive-Programming-Contests
Codeforces/Round 653(Div. 3)/1347E1.cpp
#include<bits/stdc++.h> using namespace std; #define int long long int #define vi vector<int> #define vvi vector<vi> #define pb push_back // int power(int x, int y) { // if(y == 0) return 1; // if(y % 2) return x * power(y - 1); // int f = power(x, y / 2); // return f * f; // } const int MOD = 790...
ALGO
0.999956
4.153813
{ "github_metadata": { "branch": "master", "commit_count": 214, "repo_created_at": "2019-04-22T05:25:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61885da7...
961c4a24-e35f-4528-9eae-ffd66bf85b1c
sudhanshu-t/DSA
InterviewPrep/Practice/decodeString.cpp
#include <iostream> #include <string> #include <stack> using namespace std; string decodeString(string s) { stack<char> st; string ans; for(int i = 0; i < s.size(); i++){ char c = s[i]; if(c == '['){ st.push(c); } else if (c >= 48 && c <= 57){ st.push(c); ...
ALGO
0.998545
5.177355
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-07-09T11:48: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": "bfedd1f9d...
96638ea8-b5a5-402e-9069-d8169e0460ac
ishandutta2007/codeforces-m
mr_eight/normal/453/E.cpp
//#include <bits/stdc++.h> #include <iostream> #include <iomanip> #include <math.h> #include <cmath> #include <algorithm> #include <climits> #include <functional> #include <cstring> #include <string> #include <cstdlib> #include <ctime> #include <cstdio> #include <vector> #include <stack> #include <queue> #include <dequ...
ALGO
0.999383
3.607458
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03: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": "7a645c495a02...
888b6877-465c-4d1b-a978-caf5a6281a45
chmnchiang/bcw_codebook
Contest/WF2009/pH.cpp
#include<bits/stdc++.h> #include<unistd.h> using namespace std; #define FZ(n) memset((n),0,sizeof(n)) #define FMO(n) memset((n),-1,sizeof(n)) #define F first #define S second #define PB push_back #define ALL(x) begin(x),end(x) #define SZ(x) ((int)(x).size()) #define IOS ios_base::sync_with_stdio(0); cin.tie(0) #define ...
ALGO
0.999947
3.625535
{ "github_metadata": { "branch": "master", "commit_count": 361, "repo_created_at": "2014-06-03T11:38:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 111, "forks": 22, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93011...
3ddff900-c497-4f4f-a753-5bf115300ae9
pyst1g/Programming-Cplus
AtCoder/abc/121~150/abc129/C.cpp
// finish date: 2019/06/09 #include <bits/stdc++.h> using namespace std; #define FOR(i, a, b) for(int (i)=a;(i)<(b);(i)++) #define rep(i, n) FOR(i,0,n) typedef long long ll; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vector<vector<vector<int>>> vvvi; typedef vector<ll> vl; typedef vector<vecto...
ALGO
0.999996
3.518633
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2018-01-02T12:58: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": "ce55969fc...
e6ee945d-286d-410c-83c6-f3c6907e8059
LuisFilipeDias/FizzBuzz_2
fizzBuzzer.cpp
#include "fizzBuzzer.h" static int counter[] = {0, 0, 0, 0, 0}; const static string keywords[5] = {"fizz", "buzz" , "fizzbuzz", "lucky", "integer"}; fizzBuzzer::fizzBuzzer() { } void fizzBuzzer::fizzBuzzerCountPrinter() { for( int i = 0; i < 5; i++) cout << keywords[i] << ": " << counter[i] << en...
TOOL
0.95831
4.365067
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-04-20T12:13: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": "f8a32509b0...
3f033ef6-9cfe-4a61-91d8-fc6f4d984519
eli-mezon/aoc2022
day01/main.cc
#include <iostream> #include <fstream> #include <streambuf> #include <vector> #include <list> #include <memory> #include <algorithm> #include <numeric> class Elf { public: void PutIntoBag(const std::string& aFood) { if (!aFood.empty()) { iBag.push_back(aFood); } } in...
TOOL
0.920569
4.484442
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-12-01T06:57: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": "68739350709...
2f5ec9d9-97db-46d7-b48b-eb4423146813
andy-thomason/range_coder
suffix_array.hpp
//////////////////////////////////////////////////////////////////////////////// // // Suffix array // // A sorted array of substrings finishing at the end of the string. // // eg. "dabec" -> ["abec", "bec", "c", "dabec", "ec"] // // (C) <NAME> 2017 // // MIT License // /////////////////////////////////////////////////...
ALGO
0.983768
5.741377
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2017-01-26T23:40:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24ac6b6ef...
c6d58af3-2db7-417c-b3f9-c27982c5cca8
Yaaasminnn/NEAT-learning
demo/nn_models/network.cpp
// // Created by loona on 16/10/23. // #include "network.h" nn::Network::Network(int inputs, int outputs, int layer_size, int hidden_layers) :inputs(inputs), outputs(outputs), layer_size(layer_size), hidden_layers(hidden_layers) { // creates a neural network std::vector<Node> flayer, llayer; for (int in...
ALGO
0.921845
3.852798
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2023-02-26T07:39:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f928402578...
42c7a19e-1ae0-440f-b805-f08070b7f2c2
qir-alliance/qcor
examples/qcor_demos/aide_qc_2021_demo/qasm3/qpe_qcor.cpp
#include <qcor_qft> // QPE Problem // In this example, we demonstrate a simple QPE algorithm, i.e. // i.e. Oracle(|State>) = exp(i*Phase)*|State> // and we need to estimate that Phase value. // The Oracle in this case is a T gate and the eigenstate is |1> // i.e. T|1> = exp(i*pi/4)|1> // We use 3 counting bits => tota...
ALGO
0.98317
4.685472
{ "github_metadata": { "branch": "master", "commit_count": 1435, "repo_created_at": "2019-05-13T14:26:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 100, "forks": 42, "issues": 33, "pull_requests": 2 }, "file_meta": { "content_id": "5a2f...
a5972438-5832-4915-9d41-b2d9c8e4eb56
amiradridi/Job-Resume-Matching
venv/Lib/site-packages/torch/include/torch/csrc/api/include/torch/special.h
#pragma once #include <ATen/ATen.h> namespace torch { namespace special { /// Computes the natural logarithm of the absolute value of the gamma function /// See https://pytorch.org/docs/master/special.html#torch.special.gammaln. /// /// Example: /// ``` /// auto t = torch::randn(128, dtype=kDouble); /// torch::speci...
ALGO
0.940874
6.896644
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2022-08-05T15:27:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 122, "forks": 34, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id": "21aa05...
d20e51f8-e2a4-4827-be6b-d09babdf61b6
MaGaroo/Competitive-Programming
cf/733/B.cpp
//sobskdrbhvk //remember the flying, the bird dies ):( #include <bits/stdc++.h> using namespace std; typedef long long int LL; typedef pair<int, int> pii; typedef pair<LL, LL> pll; #define PB push_back #define MP make_pair #define L first #define R second #define sz(x) ((int)(x).size()) #define smax(x, y) ((x) = max...
ALGO
0.999994
3.468664
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-09-26T19:23:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "56f3e1869...
a86cb738-6b89-40b2-a459-1899aa288fca
AnybiousArey/Andriy
Desktop/Gith/Laba_4/C++/Helper.cpp
#include<vector> #include "Helper.h" namespace Laba_4 { void Helper::Initializ()//Ініціалізація за замовчуванням { this->str.push_back('\0'); length = 0; } void Helper::Str_Length(std::vector<char> str)//Для знаходження довжини { this->length = str.size(); } Helper::H...
TOOL
0.914869
3.157123
{ "github_metadata": { "branch": "Kot", "commit_count": 32, "repo_created_at": "2019-10-24T05:38: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": "7f9adf81bee6...
a204e1b4-e457-4348-a00e-c632f84e32ca
SunTzw/segment-tree-vjudge
I.cpp
#include<bits/stdc++.h> using namespace std; #define mems(a, v) memset(a, v, sizeof(a)) #define all(v) v.begin(), v.end() #define f first #define sc second #define pb push_back #define mp make_pair #define speed() ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define pi 3.14159265358979323846 #define BFS_BLA...
ALGO
0.999873
4.011762
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-02-08T02:32: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": "a690f91a7b05...
447d2d92-4512-4e9d-9822-97577666a144
aliciacilmora/dsa_solutions
cses/Number_Spiral.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; for (int i = 0; i < n; i++) { long long row, col; cin >> row >> col; long long diag = max(row, col); long long base = diag * diag - diag + 1; if (diag % 2 == 1) { if (col > row...
ALGO
0.99994
4.184237
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-12-03T13:58: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": "5713c69d19b...
3c750ba4-64b7-432f-a094-70f212d1a4e2
HanYouyang/Computer
数据结构与算法/PKU-CS/PastClasses/@1/1. 计算导论与C语言基础/9.数组应用练习/编程题#8:校门外的树/编程题#8:校门外的树/main.cpp
// // main.cpp // 编程题#8:校门外的树 // // Created by CYC on 8/8/15. // Copyright © 2015 CYC. All rights reserved. // #include <iostream> using namespace std; int main() { int L = 0; int M = 0; cin >> L >> M; int move[10001]= {}; for( int i = 0; i < M; i++){ int begin = 0; i...
ALGO
0.999972
3.329578
{ "github_metadata": { "branch": "master", "commit_count": 133, "repo_created_at": "2017-03-19T03:43:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "993de1fa...
19b96d92-4ef1-44c1-a0ef-ba685d03be5f
high-performace-source/high-performance-source-classroom-hse-spring-2025-04-hse-spring-2025-actor-system-07-ydb-actor-syste
ydb/core/driver_lib/version/version.cpp
#include <library/cpp/svnversion/svnversion.h> #include <ydb/core/util/yverify_stream.h> #include "version.h" using TCurrent = NKikimrConfig::TCurrentCompatibilityInfo; using TStored = NKikimrConfig::TStoredCompatibilityInfo; ///////////////////////////////////////////////////////////// // Global definitions ///////...
TOOL
0.923151
6.854097
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-02-23T11:51:58.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "221d16e82397e...
61321262-a703-4c91-9b89-99f083ce17ca
sidvarun/dsa
DFSnew/489. Robot Room Cleaner.cpp
// Very good explaination https://leetcode.com/problems/robot-room-cleaner/discuss/1028277/C%2B%2B-Algorithm-walk-through-and-code-with-detailed-comments. /** * // This is the robot's control interface. * // You should not implement it, or speculate about its implementation * class Robot { * public: * // R...
ALGO
0.999835
6.316362
{ "github_metadata": { "branch": "main", "commit_count": 366, "repo_created_at": "2021-07-08T08:33: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": "79b293635a...
46ac449f-1c4a-4af0-af86-b7e48821d4c0
Beck-MN/CSCI_301-Projects-Spring-2023
CSCI 301/kSmall.cpp
/* @Project 3 kSmallest @author <NAME> @starID rg6291gh @duedate 2.13.2022 @instructor <NAME> */ #include <iostream> using namespace std; int partition(int *a, int start, int end) { int pivot = a[start], p1 = start + 1, i, temp; for (i = start + 1; i <= end; i++) { if (a[i] < pivot) { if (i != p1) { temp = a[p...
ALGO
0.999974
5.570288
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2023-04-25T21:28: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": "38062447483...
907c6af6-4520-4bd2-a8c5-cbce8dfe8085
mini-soda-uwisc/competition-code
ICPC/rcpc2021/i.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define pb push_back const ld pi = 3.14159265358979323846; const int mod = 998244353; const ll INF = 1e18; template <typename T> T chmax(T a, T b) { return a > b ? a : b; } template <typename T> T chmin(T a, T b) { r...
ALGO
0.999951
3.69884
{ "github_metadata": { "branch": "main", "commit_count": 105, "repo_created_at": "2024-10-13T02:55:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c11564952d...
67069008-5312-4926-aadd-d69a8e95c6ae
TheUltimateOptimist/aoc2023
util.cpp
#include <vector> #include <string> #include "util.hpp" using namespace std; vector<string> split(const string& text, const string& delimiter) { size_t last = 0; size_t next = 0; vector<string> parts; while ((next = text.find(delimiter, last)) != string::npos) { parts.push_back( text.substr(...
ALGO
0.993212
4.429345
{ "github_metadata": { "branch": "master", "commit_count": 130, "repo_created_at": "2023-12-02T09:31: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": "9b701346...
26a7f712-7c87-4c06-bd22-0f2b669ac204
ggcrunchy/solar2d-plugins
Blend2D/shared/blend2d/math.cpp
// Blend2D - 2D Vector Graphics Powered by a JIT Compiler // // * Official Blend2D Home Page: https://blend2d.com // * Official Github Repository: https://github.com/blend2d/blend2d // // Copyright (c) 2017-2020 The Blend2D Authors // // This software is provided 'as-is', without any express or implied // warranty. I...
ALGO
0.926099
7.055641
{ "github_metadata": { "branch": "master", "commit_count": 205, "repo_created_at": "2020-05-02T02:52:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 5, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "45ae1bd...
6e732085-32cd-4900-85be-b10cc1423376
yohstone/programming-practice
leetcode/leetcode-107-binary tree level order traversal II.cpp
#include<iostream> #include<queue> #include<vector> #include<algorithm> #include<stack> using namespace std; //给定一个二叉树,返回其节点值自底向上的层次遍历。 (即按从叶子节点所在层到根节点所在的层,逐层从左向右遍历) // //例如: //给定二叉树 [3,9,20,null,null,15,7], // // 3 // / \ // 9 20 // / \ // 15 7 //返回其自底向上的层次遍历为: // //[ // [15,7], // [9,20], // [3] //...
ALGO
0.999973
5.542791
{ "github_metadata": { "branch": "master", "commit_count": 256, "repo_created_at": "2019-02-21T15:12: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": "dbd0c0cc...
86a6559f-40dc-4377-bf97-c0f8431a7be9
Leapense/problems
8600번: Pociąg/Pociąg.cpp
#include <iostream> #include <vector> #include <unordered_map> using namespace std; int main() { int n; scanf("%d", &n); vector<int> wagons(n); for (int i = 0; i < n; ++i) { scanf("%d", &wagons[i]); } vector<int> cities(n); unordered_map<int, int> m_pos; // resource -> position i...
ALGO
0.99999
4.334427
{ "github_metadata": { "branch": "master", "commit_count": 2661, "repo_created_at": "2024-10-12T10:53: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": "9c0f8f9...
d7c824bb-2fee-47bd-99f9-a7b1958633d9
arjunsakthi/leetcode_questions
3721-count-mentions-per-user/3721-count-mentions-per-user.cpp
class Solution { public: vector<int> countMentions(int numberOfUsers, vector<vector<string>>& events) { vector<int> mentions(numberOfUsers, 0); vector<int> activeTime(numberOfUsers, -1); sort(events.begin(), events.end(), [](vector<string>& s1, vect...
ALGO
0.989227
4.945448
{ "github_metadata": { "branch": "main", "commit_count": 1663, "repo_created_at": "2024-08-05T05:21: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": "e553dbddf...
89d3bfc9-61d1-41e6-b870-a4f6216f3025
AndyFernandes/programming-lab
QuickSort/BFPRT.cpp
// By <NAME>, april/2019 #include <iostream> #include "Funcoes.cpp" #include<tuple> using namespace std; Funcoes func; void QuickSort_BFPRT(int *inicio, int *fim){ if(inicio < fim) { int *pivo = func.escolher_pivo2(inicio, fim); func.BFPRT(inicio, fim, pivo); if(pivo > inicio) ...
ALGO
0.999883
5.061932
{ "github_metadata": { "branch": "master", "commit_count": 128, "repo_created_at": "2019-02-21T19:44:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "450edcc9...
7c55f5dc-b42f-48ea-8a8b-fe1c653d8e23
yangfengzzz/DigitalFundamental
src.tracing/hittable_list.cpp
// // hittable_list.cpp // src.common // // Created by 杨丰 on 2020/11/2. // #include "hittable_list.h" bool hittable_list::hit(const ray& r, double t_min, double t_max, hit_record& rec) const { hit_record temp_rec; auto hit_anything = false; auto closest_so_far = t_max; ...
ALGO
0.97713
5.44893
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2020-11-10T07:13:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "36c329ad519...
74a3f59e-9c28-4184-91fd-99f236b5b271
KasperskyLab/knp
knp/backends/cpu/cpu-library/include/knp/backends/cpu-library/impl/altai_lif_population_impl.h
/** * @file altai_lif_population_impl.h * @kaspersky_support <NAME>. * @date 07.04.2025 * @license Apache 2.0 * @copyright © 2024 AO Kaspersky Lab * * 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 th...
ALGO
0.959808
7.281524
{ "github_metadata": { "branch": "master", "commit_count": 1851, "repo_created_at": "2024-11-05T16:33:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 31, "forks": 14, "issues": 27, "pull_requests": 1 }, "file_meta": { "content_id": "1fbde...
366f4cc6-cec6-4a51-b1c6-7414a1abdab5
dougshidong/PHiLiP
src/deprecated/spatial.cpp
#include <deal.II/base/parameter_handler.h> #include <deal.II/base/tensor.h> #include <deal.II/grid/grid_generator.h> #include <deal.II/grid/grid_refinement.h> #include <deal.II/dofs/dof_handler.h> #include <deal.II/dofs/dof_tools.h> #include <deal.II/lac/vector.h> #include <deal.II/lac/dynamic_sparsity_pattern.h> #...
ALGO
0.999715
5.933127
{ "github_metadata": { "branch": "master", "commit_count": 1502, "repo_created_at": "2018-12-17T20:30:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 49, "forks": 40, "issues": 80, "pull_requests": 14 }, "file_meta": { "content_id": "032...
c55f412d-2bc2-4187-b9c2-ba49959b31fb
uniyalsarthak/ADA
21_march/all_pair_shortest_path.cpp
#include<bits/stdc++.h> using namespace std; #define INF INT_MAX #define V 4 void APSP(vector<vector<int>>& cost) { vector<vector<int>> A = cost; for (int k = 0; k < V; k++) { for (int i = 0; i < V; i++) { for (int j = 0; j < V; j++) { if (A[i]...
ALGO
0.99988
4.135483
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2025-01-23T19:12: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": "229c0b2956f...
599c2c24-6762-442c-8c4f-063bd95da081
ishandutta2007/codeforces-a
ashishgup/normal/1569/D.cpp
#include <bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define endl "\n" #define int long long const int N = 3e5 + 5; struct BIT { int N; vector<int> bit; void init(int n) { N = n; bit.assign(n + 1, 0); } void update(int idx, int val) { while(idx ...
ALGO
0.999861
3.735381
{ "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": "49fd91fab5f5...
55c13b17-2be5-491d-a16e-2976437ff5f6
betoxxD/CompetitiveProgramming
Onlinejudge/Others/793/793.cpp
#include <bits/stdc++.h> #include <cstddef> #include <cstdio> #include <vector> using namespace std; class UnionFind{ private: vector<int> parent, rank; public: UnionFind(int N) { N++; rank.assign(N, 0); parent.assign(N, 0); for(int i = 0; i < N; i++) { parent[i] = i; } } int findSet(in...
ALGO
0.999768
3.605248
{ "github_metadata": { "branch": "main", "commit_count": 119, "repo_created_at": "2022-11-27T23:29:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "69dd34c071...
78aa1389-c944-4590-8fd1-7db2c04225ec
tch0/CppTemplateProgramming
08CompileTimeProgramming/P124.CompileTimePrime.cpp
#include <iostream> template<unsigned p, unsigned d> struct DoIsPrime { static constexpr bool value = (p%d != 0) && DoIsPrime<p, d-1>::value; }; // partial sepcialization, the end point of recursion template<unsigned p> struct DoIsPrime<p, 2> { static constexpr bool value = (p%2 != 0); }; template<unsigned p...
ALGO
0.996674
6.459682
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2022-09-05T13:31: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": "08c822df2...
6a4fb25d-e17b-4510-aa4c-5155afc296d6
purvasingh96/My-Leetcode-Solutions
0934-shortest-bridge/0934-shortest-bridge.cpp
class Solution { private: int dx[4] = {0, 1, 0, -1}; int dy[4] = {1, 0, -1, 0}; bool isValid(int x, int y, vector<vector<int>>& grid){ return x>=0 && y>=0 && x<grid.size() && y<grid[0].size(); } void dfs(int x, int y, vector<vector<int>>& grid, queue<vector<int>>& q){ if(gr...
ALGO
0.999987
5.842299
{ "github_metadata": { "branch": "main", "commit_count": 5768, "repo_created_at": "2021-12-24T13:59:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d623dd94a...
3d1e9fc1-90b2-43d8-89d0-d9d33d019283
ammardab3an/ACM
problems/done/codeforces/C. Number of Minimums on a Segment.cpp
// Problem: C. Number of Minimums on a Segment // Contest: Codeforces - ITMO Academy: pilot course - Segment Tree, part 1 - Step 1 // URL: https://codeforces.com/edu/course/2/lesson/4/1/practice/contest/273169/problem/C // Memory Limit: 1024 MB // Time Limit: 1000 ms // // Powered by CP Editor (https://cpeditor.org) ...
ALGO
0.999901
4.752113
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2021-10-06T07:54:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33cb276f0f5...
7f1d5130-b9a9-4d7e-b8e5-e4ccce3f0895
railgin/numerical-methods
Splain.cpp
#include <iostream> #include <vector> #include <math.h> #define PI 3.1415926535 using namespace std; double Function(double m) { return exp(-m * m); } double Splain(const vector<double>& Vx, const vector<double>& Vy, double x, int n, double m[], double h) { double S = 0; double x1, x2; for (int i = 1; i <= n; i+...
ALGO
0.999955
4.060197
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-09-24T23:25: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": "318dbc640054...
0cda37d0-0389-471a-95a5-f78a98b1e3f0
natasablagojevic/asp_review
DOMACI/03/3.cpp
#include <iostream> #include <vector> #include <climits> #include <algorithm> using namespace std; int min_skok(vector<int>& nums) { int n = nums.size(); vector<int> dp(n, 0); // dp čuva minimalan broj skokova za svako polje // Iteracija unazad for (int i = n - 2; i >= 0; --i) { int minJumps =...
ALGO
0.99999
5.208141
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2022-11-07T14:20: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": "b8f7e99c72e...
55bce2d3-f3e1-4b39-8053-e1c6ebed7739
nya3jp/icpc
uva/solved/6/688.cc
#include <iostream> #include <algorithm> #include <vector> #include <utility> #include <cstdio> using namespace std; typedef pair<double,double> Pt; typedef pair<double,double> Range; typedef pair<double,int> Event; struct Antenna { double x, y, r; }; double calc_area(vector<Range>& ranges) { double sum = ...
ALGO
0.999238
3.780465
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2012-05-15T15:59:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3612291d5d...
f59d2a6f-f972-47f5-bf5b-d44a3dd4e708
IgnAMS/ICPC
Ejercicios/UV/Data Structures/Non Linear/Maps/11860-2_Nano.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; getchar(); int doc=0; while(t--){ doc++; string linea; vector<string> palabras; map<string,int> mapa; map<string,int> conts; map<string,int> conts2; int cont=0; while(getline(cin,linea)){ if(linea=="E...
ALGO
0.998925
3.187454
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2021-05-19T20:12:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82dae8817...