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
26907349-c126-486d-9294-9375ce8da8cc
salimmia/IUPC_Solved
KUET_IUPC_2019/C.cpp
///Creater by Salim_JnU #include<bits/stdc++.h> using namespace std; #define mx 200005 #define ll long long #define mod 1000000007 //998244353 int a[mx]; char ch[mx]; int n, m, tt, k; struct segtree { vector<ll>tree, lazy, a; void init(int x) { tree.resize(4 * (x + 5)); lazy.resize(4 * (x + ...
ALGO
0.999972
4.472963
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2022-06-19T19:21:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d9f569cb743...
863302e6-0ac1-4ea4-a74f-8d2c446a4cf3
jhonber/Programming-Contest
codeforces/Codeforces Round #227 (Div. 2)/A.cpp
// http://codeforces.com/contest/387/problem/A #include<bits/stdc++.h> using namespace std; #define __ ios_base::sync_with_stdio(0); cin.tie(0); #define fr(i,j,n) for(int i=j;i<n;i++) #define FR(i,n) fr(i,0,n) #define foreach(it, x) for(typeof (x).begin() it = (x).begin(); it != (x).end(); ++it) #define all(x) x.begi...
ALGO
0.999703
3.842296
{ "github_metadata": { "branch": "master", "commit_count": 861, "repo_created_at": "2014-02-05T00:06:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "668e1dac...
66e0599e-dd40-4f39-a712-0856a97d8554
Shreyatk09/LEET_CODE-70
Array/minTimeVisitAllPPoints.cpp
//BruteForce Approach int minTimeToVisitAllPoints(vector<vector<int>>& points) { int time = 0; for (int i = 0; i < points.size() - 1; i++) { int x1 = points[i][0], y1 = points[i][1]; int x2 = points[i+1][0], y2 = points[i+1][1]; while (x1 != x2 || y1 != y2) { if (x1 < x2) x...
ALGO
0.999972
5.381716
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-04-11T10:30: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": "acf1670578c3...
33fb08d0-cbce-41e0-9ced-656931e83ae5
Gencho-Zhilkov/fmi-ip-group-7-2023
08. Динамична памет/solutions/exercise_2.cpp
#include <iostream> #include <cmath> #include <limits> // Функция за изчисляване на разстоянието между две точки double calculateDistance(double point1[], double point2[]) { return sqrt(pow(point1[0] - point2[0], 2) + pow(point1[1] - point2[1], 2)); } int main() { size_t n; do { std::cout << "En...
ALGO
0.99991
5.344159
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2023-10-03T08:56:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7a02e1a145...
91b82b0d-4c6e-429c-9931-cc7cc5260c94
ZikXewen/Submissions
laptop/noi/firefighting_another.cpp
#include <bits/stdc++.h> #define long long long #define ii pair<int, int> #define bl pair<bool, long> #define me(u, v) ((u) = max((u), (v))) using namespace std; const int X = 3e5 + 5; int N; long K; vector<ii> g[X]; vector<int> an; bl dfs(int u, int p, long ds){ long ov = LLONG_MIN, un = 0; for(auto [v, w]: g[u]) i...
ALGO
0.99994
4.136509
{ "github_metadata": { "branch": "master", "commit_count": 104, "repo_created_at": "2019-11-09T11:34:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1b5d719...
84bec2cb-c36b-412f-a99b-6e297c747a0e
harukataro/atCoder
abc188/c/main.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() int main() { int N; cin >> N; int n = pow(N, 2); vector<int> x(n); vector<int> num(n); rep(i, n) { cin >> x[i]; num[i] = i + 1; } fo...
ALGO
0.999977
3.187407
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-06-26T06:27:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "a8eff9ed8...
5a98c117-174f-409a-ad2d-23a7952a921b
RIYANSHGARG/DSA
DSA1/8. Graph 2/Dijakstras.cpp
// Dijakstras Algorithm // Given a graph with no negative wights // It is used to find the min path between two vertices. // shortest dinstance of all vertices // Time Complexity : O(V^2) // OPTIMISING // Using Priority Queue and adjcancy list // Time complexity : O((V+E)log V) #include <bits/stdc++.h> using namespa...
ALGO
0.99999
4.968732
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2022-04-18T20:07:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "04c9fb37714...
f9636cab-90b1-4111-bd0f-7918582c12ac
niuxu18/logSurvey
data/crawl/squid/new_hunk_3708.cpp
ac->noteAnswer(answer==ACCESS_ALLOWED); } /// process the results of the ACL check void Adaptation::AccessCheck::noteAnswer(int answer) { Must(!candidates.empty()); // the candidate we were checking must be there debugs(93,5, HERE << topCandidate() << " answer=" << answer); if (answer) { // the rule m...
TOOL
0.991295
3.766819
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2018-02-25T03:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "716b7e4d7...
a9b57a32-d17c-4469-9a64-f238f9fccf42
frankkn/I2P2
exercise/final/final.cpp
#include <iostream> #include <vector> #include <map> #include <cstring> using namespace std; int G[103][103]; vector<int> visited; map<int, int> mp; int n; bool flag = false; void dfs(int now, int end){ visited[now] = 1; mp[now]++; if(now == end){ flag = true; return; } for(int i ...
ALGO
0.999856
4.091704
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2023-09-29T06:23: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": "f2129bb4e...
a89ae137-0723-45ff-b0c1-ff895a7033b4
raincross7/code-similarity
codes/train_code/problem329/problem329_122.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef pair<double,double> pdd; #define IOS ios_base::sync_with_stdio(0); cin.tie(0) #define ALL(a) a.begin(),a.end() #define SZ(a) ((int)a.size()) #define F first #define S second #define REP(i,n) f...
ALGO
0.999959
3.874563
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07: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": "56de1bee38fc...
e5c4011b-1fcd-40e5-aa1a-cd4f400ae6ae
percona/percona-server-mongodb
src/mongo/db/query/optimizer/partial_schema_requirements.h
/** * Copyright (C) 2022-present MongoDB, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the Server Side Public License, version 1, * as published by MongoDB, Inc. * * This program is distributed in the hope that it will be useful, * but W...
ALGO
0.978142
7.551825
{ "github_metadata": { "branch": "master", "commit_count": 84589, "repo_created_at": "2015-07-22T17:25:26.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "Tokutek/tokumxse", "stars": 223, "forks": 65, "issues": 0, "pull_requests": 2 }, "file_meta": { "conte...
f370a3ff-4ccb-4367-a30d-981be50e88c5
ECLvisltion/ArtificialIntelligenceForGame_CK2-2
Class/2019.11.14/MAXONE_GeneticAlgorithm/MAXONE_GeneticAlgorithm/Population.cpp
#include "Chromosome.h" #include "Population.h" #include <iostream> #include <cstdlib> #include <ctime> using namespace std; Population::Population(int pSize, int gSize, double cRate, double mRate) : popSize(pSize), chromSize(gSize), crossoverRate(cRate), mutationRate(mRate) { population.resize(pSize); oldPopulatio...
ALGO
0.999051
4.679553
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2019-09-05T00:06:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d3d989541...
0259fe9c-4424-4441-a7c9-6d3649ac69c8
mysql/mysql-server
extra/boost/boost_1_85_0/boost/geometry/strategies/cartesian/turn_in_ring_winding.hpp
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2020 <NAME>, Amsterdam, the Netherlands. // Copyright (c) 2023 <NAME>, Lodz, Poland. // This file was modified by Oracle on 2023. // Modifications copyright (c) 2023 Oracle and/or its affiliates. // Contributed and/or modified by <NAME>, on behalf...
ALGO
0.99948
7.689781
{ "github_metadata": { "branch": "trunk", "commit_count": 186679, "repo_created_at": "2014-09-26T09:31:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11540, "forks": 4072, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "...
e6b5c8a4-079c-4b88-8dbc-99945e84ac9c
RanadevVarma/CP
Codeforces/702/A [Maximum Increase].cpp
// Author - <NAME> // Codeforces Handle - Ranadev_CaptainR // Codechef Handle - ranadev #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include <iostream> #include <string> #include <cstring> #in...
ALGO
0.999907
3.571527
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-08-04T13:13: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": "73ed3596d2...
a8f3f651-662d-42b8-bfd0-6df92b06566b
hendersontrent/CompEngineR
src/histogram_mode.cpp
#include <Rcpp.h> using namespace Rcpp; //' Calculate mode of a data vector from software package \code{hctsa} //' //' @param x \code{numeric} vector //' @return \code{numeric} scalar //' @references <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME> (2022). _tsfeatures: Time Series Feature Extraction_. R package ...
ALGO
0.999158
7.072437
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-12-22T04:12:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "c6a701a07c0...
cdc300e8-b5ea-4df6-ac61-0a111da60de5
944568752/LeetCode-CPP
Simple/isPalindrom.cpp
// // Created by 94456 on 7/12/2022. // #include<iostream> using namespace std; class ListNode { public: int val; ListNode *next; // Function overload ListNode() { this->val = 0; this->next = nullptr; } ListNode(int x) { this->val = x; this->next = nullptr...
ALGO
0.996249
5.225439
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2022-07-21T11:52: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": "9394bafd8fc...
4bb26add-3f07-43cd-8d7a-0cf1963357ec
TinNguyen01600/codeforces
1744B_even-odd-increments.cpp
#include <iostream> #include <string> #include <algorithm> #include <cmath> #include <string.h> #include <vector> #include <conio.h> #include <list> #include <unordered_map> #include <stdlib.h> #include <set> #include <bits/stdc++.h> using namespace std; #define MAX_INPUT_LENGTH 100 #define ll long long int main(i...
ALGO
0.999535
3.840605
{ "github_metadata": { "branch": "master", "commit_count": 116, "repo_created_at": "2021-12-09T16:49: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": "b7928d98...
22b5f375-14d1-4a28-884e-255c5d4d94d3
tongliuzhu/1D-kalman-filter
src/kalman_filter.cpp
#include "kalman_filter.h" /** *@function: - 卡尔曼滤波器初始化 *@kalmanFilter:卡尔曼滤波器结构体 *@init_x:待测量的初始值 *@init_p:后验状态估计值误差协方差的初始值 */ void KalmanFilter::kalmanFilter_init(KalmanStructTypedef *kalmanFilter, float init_x, float init_p,float predict_q,float newMeasured_q) { kalmanFilter->x = init_x;//待测量的初始值,如有中值一般设成中值 ...
ALGO
0.985313
4.888314
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-03-06T11:26:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5accd43bd2...
d36aaf62-c8a1-48e2-b839-79c7ace19f54
petergottschling/discovering_modern_cpp
c++03/vector_unroll_test.cpp
#include <cassert> #include <iostream> #include <boost/timer.hpp> const unsigned rep= 500000; template <typename T> class vector { void check_size(int that_size) const { assert(my_size == that_size); } void check_index(int i) const { assert(i >= 0 && i < my_size); } public: explicit vector(int size) ...
ALGO
0.922819
6.015354
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-11-16T17:33:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 207, "forks": 85, "issues": 3, "pull_requests": 2 }, "file_meta": { "content_id": "23d78ca...
3b6b4316-156f-465d-a0c1-89bec4f13e8f
Abhishek-Sharma-1999/GeeksForGeeks-Solutions
Hard/Split Array Largest Sum/split-array-largest-sum.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: bool isValid(int arr[] ,int requiredSum, int K,int N) { int sum=0,count=1; for(int i=0;i<N;i++) { if(sum+arr[i]<=requiredSum) { sum+=arr[i]; ...
ALGO
0.999982
6.004901
{ "github_metadata": { "branch": "main", "commit_count": 422, "repo_created_at": "2023-05-13T11: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": "d0a21ac350...
0408fb87-18ea-4e93-b678-3a359730c47a
esmail1234/algorithms-problem-solving-level-3
Problem31.cpp
#include <string> #include <iostream> using namespace std; string ReadString() { string S1; cout << "Please Enter Your String?\n"; getline(cin, S1); return S1; } void PrintCountLetterInString(string S1) { char S2; int counter = 0; int counter1 = 0; cout << "\nPlease enter your characte...
TOOL
0.942731
3.574658
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-15T20:35: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": "efbe53dae9d9...
0918a1ab-13b0-4269-ab55-bde14b3025ff
Sumon670/DSA-Basic
BST/search_in_bst.cpp
/* Following is the Binary Tree node structure: class BinaryTreeNode { public : T data; BinaryTreeNode<T> *left; BinaryTreeNode<T> *right; BinaryTreeNode(T data) { this -> data = data; left = NULL; right = NULL; } }; */ bool ...
ALGO
0.999992
5.243113
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-01-21T17:37:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "102dcc1d9e1...
417e5079-c5a4-4dfa-8761-25e7baf22256
Chiki1601/Hackerearth-Solutions
Data Structures/Advanced data structures/Segment trees/Range of a query.cpp
#include<bits/stdc++.h> using namespace std; vector<long long> a(300005); struct data { long long pref, suff, left, right, ans; bool all_same; }; vector<data> t(1200020); void print(data x) { cout << x.pref << " " << x.suff << " " << x.left << " " << x.right << " " << x.ans << endl; } data make_data(lon...
ALGO
0.999909
4.679493
{ "github_metadata": { "branch": "main", "commit_count": 1808, "repo_created_at": "2022-09-09T09:13:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 2, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "dd401779...
8ce7eb82-1b16-4102-a65b-1687662eed18
lipskydan/OOOP-Exam-2019
OnlyC++Real/OnlyC++Real/Hashing.cpp
// // Hashing.cpp // OnlyC++Real // // Created by Danial on 6/16/19. // Copyright © 2019 Danial. All rights reserved. // #include "Hashing.hpp" #include <iomanip> void Hash::initTable() { hashtable.resize(ver); hashtable[0].resize(MAXN); hashtable[1].resize(MAXN); pos.resize(ver); for (in...
ALGO
0.999611
4.11815
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2019-06-14T18:36: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": "34852a4bc...
8c8b3c46-10d3-4ad5-a006-2dd9a0ac4ce0
Fluttery-Dev/CP
CF/B_Physics_Practical.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define int long long #define all(x) x.begin(), x.end() const int MOD = 1e9 + 7; const int INF = LLONG_MAX >> 1; void solve() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); int n; cin >> n; vector<int> arr(n); ...
ALGO
0.999825
4.151007
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2023-03-06T13:14: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": "8d77b172c91...
6c98c93d-407f-4b6e-882a-bc7458577ed6
DapengJin/LeetCode
489.扫地机器人.cpp
#include "pkgs.h" /* * @lc app=leetcode.cn id=489 lang=cpp * * [489] 扫地机器人 * 房间中的某个位置上有一个机器人,你需要控制它清扫房间。房间被建模为一个 m x n 的二进制网格,其中 0 表示单元格中有障碍物,1 表示空单元格。 机器人从一个未知的空单元格开始出发,并且你无法访问网格,但你可以使用给定的 API Robot 控制机器人。 你的任务是使用机器人清扫整个房间(即清理房间中的每个空单元格)。机器人具有四个给定的API,可以前进、向左转或向右转。每次转弯 90 度。 当机器人试图移动到一个存在障碍物的单元格时,它的碰撞传感器会检测到障碍物...
ALGO
0.999881
6.300412
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-06-22T22:27: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": "faeda6493927...
cf4cc70d-0a97-42aa-ae65-36c6ad956311
Itfly/leetcode
Remove Duplicates from Sorted List II.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode *deleteDuplicates(ListNode *head) { // Start typing your C/C++ solution below // DO NOT write int main() fu...
ALGO
0.999877
5.223515
{ "github_metadata": { "branch": "master", "commit_count": 355, "repo_created_at": "2014-10-28T01:07: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": "ccc03385...
b6579980-423c-423f-a19c-a2bcc79e34db
plotnikovgp/algorithms_mipt
semester3/C1_task2_1.cpp
/* Task: Даны два массива целых чисел одинаковой длины A[0..n-1] и B[0..n-1]. Необходимо найти первую пару индексов i0 и j0, такую что A[i0] + B[j0] = max {A[i] + B[j], где 0 <= i < n, 0 <= j < n, i <= j}. Время работы - O(n). n ≤ 100000. */ #include <iostream> #include <vector> std::pair<int, int> min_sum_ind(std...
ALGO
0.999995
5.14681
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-07-27T07:51: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": "b8c381e3a569...
46994b90-27b4-476b-81cb-5148477e6a6d
dominiqj/PJATK-PJAIT
PJC_INT/PD03.cpp
#include <iostream> #include <algorithm> void ord3(double& a, double& b, double& c) { if (a > b) { std::swap(a, b); } if (a > c) { std::swap(a, c); } if (b > c) { std::swap(b, c); } } void ord3(double* a, double* b, double* c) { if (*a > *b) { std::swap(*a, *...
ALGO
0.999806
4.925685
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-09-08T13:36: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": "fb18bce8957...
2e294fa0-7386-4544-a2f4-666411222685
ishandutta2007/codeforces-s
sohsoh/normal/1557/E.cpp
// Sohsoh84 :))) #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> pll; #define all(x) (x).begin(),(x).end() #define X first #define Y second #define sep ' ' #define debug(x) ...
ALGO
0.999525
3.752384
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "caa844431f32...
1d5b5f34-07e0-4b2a-8bd4-f06126570f75
Simon-L/synth303maker
src/WowFilter.h
#include "chowdsp_wdf/chowdsp_wdf.h" namespace wdft = chowdsp::wdft; struct WowFilter { float R = 0.0; wdft::ResistorT<double> Rpot { (1 - R) * 50.0e3 }; wdft::ResistorT<double> Rin { 47e3 + R * 50.0e3 }; wdft::CapacitorT<double> C1 { 1e-6 }; wdft::ResistorT<double> Rout { 102e3 }; wdft::WDFSeriesT<double, ...
ALGO
0.983203
5.232185
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2023-02-22T12:46: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": "1e2f46054a9...
8f9e5a2d-ea31-47ff-8f85-8bda00885ac6
kunasing/cs32
homework2/homework2.5/homework2.5/eval.cpp
#include "Set.h" // with ItemType being a type alias for char #include <iostream> #include <string> #include <stack> #include <cctype> #include <cassert> using namespace std; int evaluate(string infix, const Set& trueValues, const Set& falseValues, string& postfix, bool& result); bool validInfixExpression(string in...
ALGO
0.998536
4.795087
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-11-26T05:42: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": "b9eee651637d...
2dabc316-349d-428f-8af4-de516635deee
ichn-hu/dna-assembly-cpp
src/approx_match.cpp
#include <string> #include <algorithm> #include <vector> #include <cstdlib> #include <cstring> using namespace std; #ifndef __APPROX #define __APPROX // O(n^2) to compute the minimal edit distance between two strings int editDist(string a, string b) { int n = a.length(); int m = b.length(); int f[n + 1][m...
ALGO
0.999942
4.075854
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2019-06-16T05:07: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": "0cc025f11...
af79f013-615e-420f-b792-a8309ec4caa4
LiuJunjie0619/Plus
018_04_lambda0/main.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <ctime> const long Size1 = 39L; const long Size2 = 100 * Size1; const long Size3 = 100 * Size2; bool f3(int x){return x % 3 == 0;} bool f13(int x){return x % 13 == 0;} int main() { std::vector<int> numbers(Size1); std::srand...
ALGO
0.99295
4.379386
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2018-05-04T09:15: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": "dc442e66b...
73e22619-78b9-4f06-8234-187f1a4547f9
ZhNV2/AircraftConflictResolution
DomainData/ConflictManager/conflict_manager.cpp
#include <cmath> #include <cassert> #include <iostream> #include "conflict_manager.h" #include <algorithm> namespace { const double PREDICTION_TIME = 40; // s const double MIN_DIST = 1; const double EPS = 1e-9; double DetectConflict(Point p1, Point p2, Vector v1, Vector v2, double max_time) { ...
ALGO
0.995898
5.518911
{ "github_metadata": { "branch": "a_star_solver", "commit_count": 6, "repo_created_at": "2017-04-21T23:03:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ece...
0b1368e1-64c8-41c8-b3be-e33d1aeffbc4
ajabbar89/MOOC_Algorithm_Graphs_Coursera
week4/money_exchange_optimal.cpp
#include <iostream> #include <vector> #include <limits.h> #include <unordered_map> #include <queue> std::queue<int> q; std::vector<bool> shortest_nodes; std::unordered_map<int,std::vector<int>> adj_list; std::vector<bool> reachable_list; typedef long long int long_t; void relax(int u,int v, int w, std::vector<long...
ALGO
0.999943
3.928535
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-12-31T14:45:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d10794c646...
ad033195-42f9-4ef7-90ee-62de0520cbc4
Omkar-Najan/Algorithms
Course 1/Week 1/maxpairwiseProduct.cpp
#include<iostream> #include<queue> #include<vector> #include<typeinfo> using namespace std; int main(){ int n; cin >> n; vector<int> a(n); for(int i =0;i<n;i++){ cin >> a[i]; } // largest element int idx1 = -1; for(int i = 0 ; i<n;i++){ if((idx1 == -1) || (a[i]...
ALGO
0.999937
3.667526
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2021-10-09T03:48: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": "12111b7df...
1ad80cf3-5fd8-432c-8cf8-a42c4a626d54
AntonioShi/PalindromicQuenue
main.cpp
/** * 判断回文序列 */ #include <iostream> #include <string> using namespace std ; void JudgePalindromic(int length, char *p){ int m, n; if(length % 2 == 0){ m = length / 2 ; for (int i = 0; i < m; i++) { if(*(p + i) == *(p + length - 1 - i)){ continue ; }...
ALGO
0.999921
3.654337
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-10-05T01:41: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": "1224b4e759...
dacc0ee7-7d98-4579-a843-b43d97224b9d
litecoin-project/litecoin
src/libmw/include/mw/mmr/MMRUtil.h
#pragma once #include <mw/common/BitSet.h> #include <mw/mmr/Index.h> #include <mw/mmr/LeafIndex.h> class IMMR; class MMRUtil { public: static mw::Hash CalcParentHash(const mmr::Index& index, const mw::Hash& left_hash, const mw::Hash& right_hash); static std::vector<mmr::Index> CalcPeakIndices(const uint64_t ...
ALGO
0.937133
7.249966
{ "github_metadata": { "branch": "master", "commit_count": 26838, "repo_created_at": "2012-06-13T04:18:26.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "bitcoin/bitcoin", "stars": 4490, "forks": 3048, "issues": 71, "pull_requests": 8 }, "file_meta": { "co...
48640a7f-c913-4255-a75f-bb1b51f505bd
dDeepak26/MCA_SEM_1_DATA_STRUCTURE_PRACTICALS
7 Linked List/LLCIRCUL.CPP
#include<iostream.h> #include<conio.h> struct CircularNode { int data; struct CircularNode* next; }; typedef struct CircularNode* CircularLinkedList; CircularNode* createCircularNode(int value) { CircularNode* newNode = new CircularNode; newNode->data = value; newNode->next = NULL; return new...
ALGO
0.983139
5.501433
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-08-15T15:06: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": "c5f60eb01ae8...
6010f72d-c1ae-4f0f-bda3-6da601d92224
JonathanRaiman/shark-rb
ext/rb_SteepestDescent.cpp
#include "rb_SteepestDescent.h" extern VALUE rb_optimizer_steepestdescent_klass; // Datatypes: VALUE rb_SteepestDescent::rb_class() { return rb_optimizer_steepestdescent_klass; } rb_SteepestDescent::rb_SteepestDescent() {}; SteepestDescent& rb_SteepestDescent::algorithm() { return _algorithm; } #include "extras/ut...
ALGO
0.967576
6.105128
{ "github_metadata": { "branch": "master", "commit_count": 398, "repo_created_at": "2014-02-03T22:38:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c58d38f6...
2ea96b01-adae-4dc9-b3ce-a793bb1ee4bf
LihuaWu/codeForces
codeforce/c362_697/B/B.cpp
//#include <bits/stdc++.h> #include <iostream> #include <string> #include <sstream> using namespace std; int main(int argc, char **argv) { string ori; cin >> ori; int pos = ori.find('e'); string exp = ori.substr(pos+1); //cout << exp << "\n"; string base = ori.substr(0, pos); ////cout << ba...
ALGO
0.998667
3.210354
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2015-06-29T07:22: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": "50b0a499d...
58e90d21-87a8-46ed-ad66-eaf5f6afbe80
lumtis/react-native-caffe2
caffe2/caffe2/operators/softmax_op.cc
#include "caffe2/operators/softmax_op.h" #include "caffe2/operators/softmax_shared.h" namespace caffe2 { // Implementation for the CPU context. template <> bool SoftmaxOp<float, CPUContext>::RunOnDevice() { auto& X = Input(0); auto* Y = Output(0); const auto canonical_axis = X.canonical_axis_index(axis_); con...
TOOL
0.9195
7.557282
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-07-23T07:28:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 39, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "62858a1b...
a5de0bff-814f-4b98-a81e-b9d347660b65
nicohhle/CS
cs10/tictactoe.cpp
#include <vector> #include <iostream> using namespace std; const bool CLEAR_SCREEN = true; /// @brief Utilizes an escape character sequence to clear the screen void clearScreen() { cout << endl; if (CLEAR_SCREEN) { cout << "\033c"; } cout << endl; return; } /// @brief Draws the provi...
ALGO
0.98913
5.627527
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-09-18T03:41: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": "5da4f5628c...
cd44301b-1282-4005-8402-bbec515ea59d
Praveen005/DSA
CB/Notes-ref/q88.cpp
#include<iostream> using namespace std; #define ll long long //my aim is to find no of numbers less than n which is divided by any of the primes[] //we will use inclusion-exclusion principle //get all the possible combinations of the elements in prime[] int main() { #ifndef ONLINE_JUDGE freopen("input.txt" , "r" , std...
ALGO
0.99965
4.274403
{ "github_metadata": { "branch": "master", "commit_count": 174, "repo_created_at": "2020-07-26T01:49:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bb49b8ce...
7c2a9571-6b34-46e1-bb57-b73716de9c8a
Anshu1Gupta/Leetcode_-_GFG_Solved_Problems
0148-sort-list/0148-sort-list.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*merge(ListNo...
ALGO
0.999996
5.731845
{ "github_metadata": { "branch": "main", "commit_count": 2154, "repo_created_at": "2023-05-24T18:55:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d8038b63a...
e2816c20-3051-46c9-9886-798dd95e93b0
vikashkumr/Competitive-Programming
leetcode/992.subarrays-with-k-different-integers.cpp
/* * @lc app=leetcode id=992 lang=cpp * * [992] Subarrays with K Different Integers */ // @lc code=start class Solution { public: int no_of_subarr(vector<int> &A, int k) { if(k==0) return 0; int diff = 0; //different integer occoured till now int cnt[20002]={0}; //count of occurance of ...
ALGO
0.99989
6.588248
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2018-09-02T06:54:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ecd41620...
af09efce-d4e0-4509-9737-357a7969d740
Sulima30/C-_Demonstrations_PT-BR
Aulas/Aula-7-Operadores-Controles/OperadoresControles.cpp
/* Programa: Aula Estrutura de Repetição usando FOR, WHILE e DO...WHILE * Autor: <NAME> * Versão da Aula: 1.0 * Ano: 2024 * Linguagem C++. Versão 23 * Descrição: Esta aula visa iniciar os conceitos da linguagem C++ referentes a estrutura de repetição usando FOR, WHILE, DO...WHILE */ #include <iostream> // Bibli...
TOOL
0.993662
5.261123
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-09-08T17:22: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": "d4c4e7f9c35...
6992fa61-79b6-4db3-b390-8825bf7995b0
dingzh/leetcode
15_3Sum.cpp
class Solution { vector<vector<int>> ret; public: vector<vector<int>> threeSum(vector<int>& nums) { sort(nums.begin(), nums.end()); int size = nums.size(); if (size == 0 || nums[0] > 0) return ret; for (int begin = 0; begin < size - 2; ++begin) { helper(nums, begin);...
ALGO
0.999952
6.049129
{ "github_metadata": { "branch": "master", "commit_count": 214, "repo_created_at": "2018-07-27T08: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": "b7fce5af...
3d221aa9-c395-42c8-b958-22ab06cdfe54
ishandutta2007/codeforces-c
crackersamdjam/normal/653/D.cpp
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define gc getchar() #define pc(x) putchar(x) template<typename T> void scan(T &x){x = 0;bool _=0;T c=gc;_=c==45;c=_?gc:c;while(c<48||c>57)c=gc;for(;c<48||c>57;c=gc);for(;c>47&&c<58;c=gc)x=(x<<3)+(x<<1)+(c&15);x=_?-x:x;} template<typename T> void printn(T n...
ALGO
0.999893
4.289146
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fab1aea823b5...
aebb125b-8913-484b-95b3-c47822110e8b
DPR00/TC2038-Portafolio_Final-
ActInt2/Problema1.h
#include <iostream> #include <algorithm> #include <queue> #include <vector> #include <climits> #include <utility> using namespace std; typedef pair <int, int> iPair; struct Graph{ // V = cantidad de nodos (vertices) // E = cantidad de arcos (edges) int V, E; double costMSTKruskal; vector<pair<int...
ALGO
0.999495
5.153101
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2022-06-06T18:48: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": "0577b9c7eb...
7f9cf0b0-3417-4534-b90b-c275fa5c07f0
alexandraback/datacollection
solutions_1673486_1/C++/RainG/1.cpp
#include <iostream> #include <vector> #include <cmath> using namespace std; vector<double> prob; vector<double> c; int main() { int n; cin >> n; for (int i = 0; i < n; ++i) { prob.clear(); c.clear(); int curr, total; cin >> curr >> total; for (int j = 0; j < curr...
ALGO
0.999689
4.059834
{ "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": "36c0b14d1...
548e526c-fad1-48eb-bfff-0d04f1b68291
Patricio-Simoes/Algorithms-Data-Structures
TP_02_2016_2017/TP_02_2016_2017.cpp
#define _CRT_SECURE_NO_WARNINGS #include "stdio.h" #include "stdlib.h" #include "Windows.h" #define MAX_NAME 30 #define DIRETORIAS 15 int i = 1; typedef struct DIR { char nome[MAX_NAME]; // Nome Ficheiro int n_fich; // Nº Ficheiros int n_Kb; // Nº Kbytes }; typedef struct BTREE_NODE { void* data; ...
TOOL
0.968654
3.24944
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2022-04-07T14:34:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d78223a3390...
0c5fe963-a7ec-4caf-a152-619ed3ac0762
LeonLiur/CompetitiveProgramming
Problems/DmoJ/dmopc19c1p1.cpp
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define mp make_pair #define pb push_back #define boost() cin.tie(0), cin.sync_with_stdio(0) typedef long long ll; typedef vector<int> vi; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int maxi = 2147483647; const int mini = ~maxi; const ...
ALGO
0.999373
3.74066
{ "github_metadata": { "branch": "master", "commit_count": 60, "repo_created_at": "2020-07-22T16:51: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": "b0cff3d62...
1fdae958-42cb-44e5-bb32-51bc6f1667fa
josevaldes/my_challenges
Graph Theory/prim.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <list> #include <queue> #include <map> using namespace std; struct Node { unsigned int label; list<unsigned int> neighbors; map<unsigned int, unsigned int> costs; }; struct heapNode { unsigned int v...
ALGO
0.999869
3.934672
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-05-31T23:29: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": "a4fc2735e8...
e88798fd-7f49-4d94-8c25-cfc849754035
pilkch/task-tracker
src/web_server.cpp
#include <cctype> #include <cmath> #include <cstdio> #include <cstdint> #include <cstring> #include <algorithm> #include <atomic> #include <chrono> #include <condition_variable> #include <fstream> #include <iostream> #include <mutex> #include <sstream> #include <string> #include <string_view> #include <vector> #inclu...
WEB
0.916369
5.48363
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2025-02-12T12:59:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9efd017934d...
553abd07-b401-44c9-9e8e-e35773e9ecc1
Bharatgwl/DSA_for_interviews
All content/Dynamic Programming/House_robbery.cpp
#include <bits/stdc++.h> using namespace std; // int house_robbery(vector<int> &nums) // { // int n = nums.size(); // vector<int> dp(n, -1); // dp[0] = nums[0]; // dp[1] = max(nums[0], nums[1]); // for (int i = 2; i < n; i++) // { // int pick = nums[i] + dp[i - 2]; // int notpick...
ALGO
0.999945
4.837398
{ "github_metadata": { "branch": "main", "commit_count": 169, "repo_created_at": "2024-01-09T02:54:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cca81bf1e6...
c91b8502-ed79-4633-af47-7971a79fb400
MoyillaLaliteswari/leetcode
0082-remove-duplicates-from-sorted-list-ii/0082-remove-duplicates-from-sorted-list-ii.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* deleteDupli...
ALGO
0.999987
5.828089
{ "github_metadata": { "branch": "main", "commit_count": 987, "repo_created_at": "2024-07-01T11:22: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": "54d479b456...
2bcfce26-07ff-4e0b-9419-6b0f722ffcb9
henrywoo/Algo
Algo/DisjointSet.h
#include <list> #include <unordered_set> #include <map> #include <string> #include <vector> #include <algorithm> #include <iostream> namespace DisjointSet{ using namespace std; #if 0 template<class T1,class T2,class T3> T1<T2<T3>> ComputeDisjointSets_(const T1<T2<T3>>& vec_si){ #define TSI T2<T3> #define...
ALGO
0.999539
4.868145
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2013-07-14T07:02:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78d672a6a...
96f9f34e-6257-406f-a8af-9d5e0efca9c7
Wyxal/PA2
CConfig.h
#pragma once #include <iostream> #include <fstream> #include <string> #include <map> #include <set> #include <filesystem> /** * Represents a configuration file reader. */ class CConfig { public: /** * @return the singleton instance of CConfig */ static CConfig &getInstance(); /** * Sets ...
CONFIG
0.931732
6.984749
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-08-22T14:07:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c73f59e4225a...
8a88e152-4378-4bc2-b57e-279db23099a6
Liluan1/C_codes
Arr.cpp
//2017年10月5日 23:31:55 # include <stdio.h> # include <malloc.h> # include <stdlib.h> struct Arr { int *pBase; int len; int cnt; } ; void init_arr(struct Arr *pArr,int length); bool append_arr(struct Arr *pArr,int val); bool insert_arr(struct Arr *pArr, int pos, int val); bool delete_arr(struct Arr *pArr, int...
ALGO
0.999485
3.956822
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-02-11T12:03: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": "c818468455...
8a3dac51-b6b0-4b79-b09d-1c2a889e362f
RusyaDeWitt/ADS
Lab1/B.cpp
#include <bits/stdc++.h> using namespace std; struct Queue { int a[100000]; int start , end; Queue() { start = 0; end = 0; }; int size() { return max(0, end-start); }; int front() { return a[start]; }; int back() { return...
ALGO
0.995975
4.007807
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2021-09-13T08:48: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": "acd8b63dc3...
f41ecc25-326f-4409-8907-1bb35dd453fe
alexkats/Code
School/Wednesday/Day 09/Glue/Glue.cpp
#include <iostream> #include <string> #include <cmath> #include <cstdio> #include <cstdlib> #include <vector> #include <algorithm> #include <set> #include <map> using namespace std; string wa = "Wrong answer"; long long n, m, k, t, a [102][102], q [10001], c [10001][1001]; bool visited [102][102]; bool neighbor (lo...
ALGO
0.999948
3.659365
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-11-09T03:40: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": "e4c41a28f3...
a6940168-24ab-4f80-a0d7-eff2f496a590
fossgect/All-Algos
Graph/C++/graphadjacencylist.cc
// A simple representation of graph using STL #include<bits/stdc++.h> using namespace std; // A utility function to add an edge in an // undirected graph. // Driver code int main() { int x,y,i,n; vector< vector <int> > adj; vector<int>::iterator m; cout<<"Enter the no.of edges\n"; ...
ALGO
0.999725
4.689468
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2019-10-14T15:49:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11, "forks": 22, "issues": 2, "pull_requests": 6 }, "file_meta": { "content_id": "60b9a9b4...
4e53e05a-12c9-415c-a072-f9583ed5cccd
CodeWizard812/DSA
L 24 2D array/Search_in_sorted_2d_array.cpp
//Search in 2D sorted array. #include <iostream> using namespace std; bool search(int arr[3][4], int key) { int row = 3; int col = 4; int s = 0; int e = row*col - 1; int mid = s +(e-s)/2; while (s<=e) { int element = arr[mid/col][mid%col]; if (element == key) { ...
ALGO
0.999658
4.579402
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-16T00:58:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29e07195ed98...
ecb69d75-ef1f-404d-aa85-e4c0aee72042
arthurherbout/crypto_code_detection
data/code-jam/files/3264486_javelinsman_5719854539603968_0_extracted_d.cpp
#include <cstdio> #include <vector> #include <algorithm> #include <queue> using namespace std; // in: n, m, graph // out: match, matched // vertex cover: (reached[0][left_node] == 0) || (reached[1][right_node] == 1) struct BipartiteMatching { int n, m; vector<vector<int> > graph; vector<int> matched, match; ve...
ALGO
0.999054
3.668916
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2019-09-20T18:35:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "6c9eb71e...
60f8fbc3-ebb5-40ec-80bb-65b824d752e5
Shapooo/leetcode
853.车队.cpp
#include <algorithm> #include <vector> using namespace std; /* * @lc app=leetcode.cn id=853 lang=cpp * * [853] 车队 */ // @lc code=start class Solution { public: int carFleet(int target, vector<int>& position, vector<int>& speed) { int n = position.size(); vector<int> idx(n); for (int...
ALGO
0.994419
6.16993
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2024-04-01T16:11: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": "031b5a6e8...
ba270fdd-b6c9-421c-a4e5-fe987c445d64
Faizan-26/Cpp-University-TASKS-DATA-STRUCTURE-SEM-3
LABS/LAB_10/LAB_10/22F-3858_TASK-2.cpp
//#include<iostream> //using namespace std; //struct Building { // int id; // int floors; // Building() { // id = 0; // floors = 0; // } //}; //class Binary_heap { // Building* arrayOfBuildings; // int size; // int totalBuilding; //public: // Binary_heap(int size) { // this-...
ALGO
0.990611
3.72746
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2023-09-21T03:25: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": "ecbcd1f6d...
5c12abb2-591a-4dc6-bd9b-e940216940b2
ujunhwan/algorithms_cpp
HI-ARC/2021/study/week3/1238.cpp
// https://www.acmicpc.net/problem/1238 // 1238번 파티 #include <bits/stdc++.h> #define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define decimal cout << fixed; cout.precision(6) using namespace std; typedef long long ll; typedef pair<int, int> pii; static const int INF = 0x7f7f7f7f; const int d4x[4...
ALGO
0.999973
4.845449
{ "github_metadata": { "branch": "master", "commit_count": 374, "repo_created_at": "2020-02-26T12:18:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1719b2fd...
af833719-d7d2-44af-801f-84a03c524bed
Ark-Aak/code_repo
2025-02-04/stars.cpp
#ifdef ONLINE_JUDGE #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math") #pragma GCC target("sse,sse2,sse3,ssse3,sse4.1,sse4.2,avx,avx2,popcnt") #include <immintrin.h> #include <emmintrin.h> #endif #include <bits/stdc++.h> #define int ll #define rep(i, a, b) for(int i = (a), i##end = (b); i <= i##e...
ALGO
0.999935
4.321065
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2023-10-09T08:43:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a777c771e...
82b9fdce-2927-4c62-83ac-c74a5355865a
getmiranda/sistemas_itver
CAD/CAD_Verano/Actividad8_Ping_Pong/Actividad8_Ping_Pong.cpp
/* Relizar un programa, que envie un mensaje solamente entre dos procesos, simulando el juego de Ping Pong. Agregue un control temporal para poder detenerlos.*/ #include <stdio.h> #include "mpi.h" int main(int argc, char* arcv[]) { int nombre_proceso, total_procesos, flag = 0, origen, destino; //double inicio, term...
ALGO
0.962204
4.234588
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-08-24T10:58:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8803b50545...
b8b71209-1302-4992-a2df-a3b5820543f7
iTXCode/linuxpractice
Data_structure/cpp_Datastructure/DList/DLoopList/DLoopList.hpp
#include<iostream> #include<assert.h> template <class T> struct DListNode{ DListNode(T value=T()) :_value(value) ,_prev(nullptr) ,_next(nullptr) { } T _value; DListNode<T>* _prev; DListNode<T>* _next; }; template <class T> class DList{ public: DList() :_head(nullptr) {} ~DList(){ ...
ALGO
0.956875
4.704362
{ "github_metadata": { "branch": "master", "commit_count": 147, "repo_created_at": "2018-12-09T15:45:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "71c54065...
6e1e5c9f-6ed4-4247-9fb8-740685219ae0
isfahanUacm/UICPC
2023/UICPC Regional/Round #3/Submits/D/Maya/Accept/45046066_AC_Maya2_D.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define pi pair<int, int> #define pl pair<ll, ll> #define F first #define S second #define vi vector<int> #define vl vector<ll> #define pb push_back #define pf push_front #define nl '\n' #define MOD 1000000007 #define MOD1 9982443...
ALGO
0.999675
4.791446
{ "github_metadata": { "branch": "main", "commit_count": 113, "repo_created_at": "2021-09-15T16:29:50.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "079abec30f4...
5238d07f-a156-4d80-841b-eb0be8fd4474
2023-Coding-Test-Study/Coding-Test-Study
06-Greedy/uijeong/11501_주식.cpp
#include <bits/stdc++.h> using namespace std; int N; int money[1000001]; int main() { ios::sync_with_stdio(0); cin.tie(0); int T = 0; cin >> T; int sum = 0; for (int i = 0; i < T; i++) { cin >> N; for (int j = 0; j < N; j++) { cin >> money[j]; } ...
ALGO
0.99994
4.749393
{ "github_metadata": { "branch": "main", "commit_count": 574, "repo_created_at": "2023-10-01T08:33:05.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac502e0666a...
c61bdd37-7d04-438e-9ec2-ff2c65664ace
kubonits/atcoder
other/qupc/2018/b/main.cpp
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <utility> #include <vector> #define MOD 1000000007 using namespace std; typedef long long ll; int main() { int n; ll a, b, c, sum; cin >> n; for (int i = 0; i <...
ALGO
0.999893
4.042689
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2018-12-07T13:30: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": "61656885e...
d95f5a1f-0573-4cba-a2d5-c3f3a05d143c
turneja123/competitive-programming-library
Algorithm/Graph/Shortest Path K Edges.cpp
//solution for https://cses.fi/problemset/task/1724/ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; #define endl "\n" #define ll long long #define IOS ios_base::sync_with_stdio(false); cin.tie(nullptr); const long long INF = 2e18; vector<vector<lon...
ALGO
0.999959
4.235074
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2024-03-11T08:36:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "80a970650...
41fca76a-cc8b-44e7-ae2e-9ea95a1368f1
luqmanarifin/cp
Educational Codeforces Round 20/d.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; int a[N], lines, k; string str; bool can(int len) { int cur = 0; for (int i = 0; i < k; i++) { int now = a[i], j = i; while (j + 1 < k && now + a[j + 1] <= len) { now += a[j + 1]; j++; } cur++; if (cur > lines |...
ALGO
0.999129
3.636409
{ "github_metadata": { "branch": "master", "commit_count": 772, "repo_created_at": "2016-02-09T04:26:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2347c6dc...
99547024-04cd-410c-b355-ad62ccc67307
matheusmtta/Competitive-Programming
Codeforces/1328C.cpp
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 #define INF (int)0x3f3f3f3f #define LINF (long long)0x3f3f3f3f3f3f3f3fll #define MP make_pair #define PB push_back typedef long int int32; typedef unsigned long int uint32; typedef long long int int64; typedef unsigned long long int uint64; int m...
ALGO
0.999965
3.665775
{ "github_metadata": { "branch": "master", "commit_count": 301, "repo_created_at": "2019-11-23T14:54:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5dad40f...
ad5396bc-10d0-4f44-92f7-e6caad2c3dba
gvnee/dataStructures-Algorithm
codeforces/1945C.cpp
#include<bits/stdc++.h> using namespace std; #define all(x) x.begin(), x.end() #define sz(x) int((x).size()) typedef pair<int,int> pi; typedef long long ll; #define pb push_back #define S second #define F first void f(){ int n; cin>>n; char s[n+1]; for(int i = 1;i<=n;i++){ cin>>s[i]; } int left[n+1] =...
ALGO
0.999954
3.817677
{ "github_metadata": { "branch": "main", "commit_count": 181, "repo_created_at": "2022-11-06T07:36:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f307dbc06f...
17f732a1-23cc-4bac-bb5e-95ac1918f27a
Kishanp929/Maze-Solver-Bot
Meshmerize/Trail_2/Trail_2.ino
#include <SparkFun_TB6612.h> // driver library #define AIN1 4 #define BIN1 6 #define AIN2 3 #define BIN2 7 #define PWMA 9 #define PWMB 10 #define STBY 5 // these constants are used to allow you to make your motor configuration // line up with function names like forward. Value can be 1 or -1 const int offsetA = 1;...
ALGO
0.988446
4.117474
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-07T14:00: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": "ed2f5086eb8c...
a1595766-36c6-4082-aacd-3c1de5d500d0
yingchen0706/leetcode
threesum.cpp
class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { vector<vector<int>> res; int size = nums.size(); if (size < 3) { return res; } sort(nums.begin(), nums.end()); for (int i = 0; i < size-2; i++) { if (i == 0 || nums[i] !...
ALGO
0.999974
6.180195
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2015-08-02T10:59:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2aee12f7c...
f232dd6c-3ddc-4ca7-88ae-2b367319c275
vishukamble/CPlusPlusPractice
HackerRank/DataStructures/nodeAtLast.cpp
/* Author: <NAME> Practice Session C++ Programs Website: www.geekstarts.info , www.vishukamble.info Date: 3/5/2016 Program: Insert a Node at the Tail of a Linked List Desc: https://www.hackerrank.com/challenges/insert-a-node-at-the-tail-of-a-linked-list */ /* Insert Node at the end of a linked list head pointer i...
ALGO
0.990281
4.514057
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2015-12-20T03:43: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": "a2e7f9388...
dfc2ff7d-239d-459f-8350-d5c1458a2bfd
nathan-renner/cpe-390
CPE-390hw/hw07-asm-bignum-addition/hw7.cc
#include <iostream> #include <cstdint> using namespace std; void add128(uint32_t c[4], uint32_t a[4], uint32_t b[4]); void print(uint32_t x[4]) { cout << x[0] << ' ' << x[1] << ' ' << x[2] << ' ' << x[3] << '\n'; } int main() { uint32_t b1[4] = {0, 0, 0, 3}; uint32_t b2[4] = {0, 0, 0, 5}; uint32_t b3[4]; // BigN...
ALGO
0.988715
3.991014
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2020-11-14T19:56: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": "7b24968daa1d...
19ebc04e-91eb-4ce5-afb8-4400b59059f7
vdm370/partii-proj
code/src/gen/auto_gen.cpp
#include <bits/stdc++.h> using namespace std; mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); const int MAX = 1000000; int main(int argc, char *argv[]) { assert(argc == 2); int n; sscanf(argv[1], "%d", &n); printf("%d\n", n); vector<vector<int>> mat(n); for(int i = 0; i < n; i++) { ...
ALGO
0.999809
3.18693
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2019-11-22T20:03: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": "0eab5ac95...
ceb941e1-0e23-44e3-9351-7a8f2005f042
Amanhacker/Aman-Barnwal-Leetcode-Solutions
743-network-delay-time/743-network-delay-time.cpp
class Solution { public: void dijkstra(int node, unordered_map<int, vector<pair<int, int>>> &adj, vector<int> &dist) { // Use Min Heap - 1st arg : weight, 2nd arg : node priority_queue<pair<int, int>, vector<pair<int, int>>, greater<pair<int, int>>> pq; pq.push({0, nod...
ALGO
0.99999
5.499458
{ "github_metadata": { "branch": "master", "commit_count": 2521, "repo_created_at": "2021-12-24T16:13:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 441, "forks": 140, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b1...
f706dede-3509-4c97-804c-b0b16e2f9c31
y2k-shubham/dsa-in-cpp
Interview-Questions/directi-interview-experience-set-17-campus.cpp
// http://www.geeksforgeeks.org/directi-interview-experience-set-17-campus/ /* Given 2 arrays of integers of size m and n where m>n.You need to maximize the dot product by inserting zeros in the second array but we cannot disturb the order of original arrays. */ /* 12 5 10 0 1 2 8 1 3 7 4 2 9 5 9 5 2 8 2 8 9 0 4 5 1...
ALGO
0.999933
3.486269
{ "github_metadata": { "branch": "main", "commit_count": 2061, "repo_created_at": "2020-05-23T08:08:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "088b201a2...
4ad2563f-86df-43b7-98de-3f41c4a2f54f
drken1215/book_algorithm_solution
codes/chap05/code_5_8.cpp
#include <iostream> #include <string> #include <vector> using namespace std; template<class T> void chmin(T& a, T b) { if (a > b) { a = b; } } const int INF = 1 << 29; // 十分大きな値 (ここでは 2^29 とする) int main() { // 入力 string S, T; cin >> S >> T; // DP テーブル定義 vector<vector<int>> dp...
ALGO
0.999982
4.660156
{ "github_metadata": { "branch": "master", "commit_count": 77, "repo_created_at": "2019-11-21T04:57:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 858, "forks": 104, "issues": 6, "pull_requests": 1 }, "file_meta": { "content_id": "0267a...
6624140d-b438-4fce-86f3-95fcc8a962cf
codeboy47/Advanced-Data-Structures-And-Algorithms
1.Recursion/advancedKeypad.cpp
#include <iostream> #include <string.h> #include <vector> using namespace std; void solve(vector<string> & vs, vector<int> & arr, char * output, int i, vector<string> &ans){ if(i == arr.size()){ output[i] = '\0'; string s(output); ans.push_back(s); //cout<<output<<endl; return; } for(int j = 0; vs[arr[i]]...
ALGO
0.998951
3.322343
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-09-06T11:00:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5be309a8b...
cc493669-7b6a-4a86-b78c-1e349ee1f1cb
bgerc/BCT_AB_Assignment
080BCT042/01prob.cpp
#include <iostream> #include <string> class Person { public: std::string name; std::string dob; int a; // Add a default constructor Person() : name(""), dob("") {} Person(std::string n, std::string d) : name(n), dob(d) {} }; int main() { Person* persons = new Person[100]; // assume maximum...
TOOL
0.952982
5.38973
{ "github_metadata": { "branch": "main", "commit_count": 189, "repo_created_at": "2024-08-22T00:15:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 43, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b82c300b0...
dbf2c1d7-628a-422e-a328-47f9f6f81334
johnyejin/Algorithm
Algorithm/백준/벽부수고이동하기.cpp
#include<iostream> #include<vector> #include<queue> #include<string> using namespace std; int n, m; // n:행, m:열 vector<vector<int>> arr(n,vector<int>(m)); bool visit[1001][1001]; int dx[4] = { 0,0,-1,1 }, dy[4] = { -1,1,0,0 }; typedef struct wall { int x, y, w; // w: 벽이면 1 }; void bfs(int start, int w) { queue<wal...
ALGO
0.99994
3.711612
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2018-08-03T17:40:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a777fe87...
c8b4090d-7ed6-450b-af5c-300eb8e30929
hasibul-hasan-shuvo/Online-Judge-Problem-Solutions
UVA/Uva 11349.cpp
#include<cstdio> int main() { int test; scanf("%d", &test); for(int t = 1; t <= test; t++) { getchar(); int n; scanf("N = %d", &n); long long int matrix[n][n]; bool flag = true; for(int row = 0; row < n; row++) { for(int column = 0...
ALGO
0.966674
3.971355
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-06-15T17:24:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa7c764bbc...
4fcb218c-d65c-4155-b16d-e8536ba4b6a1
Sukarnapaul1893/My-Different-Online-Judges-Problem-Solutions
LightOJ/LightOJ - 1089.cpp
#pragma warning(disable:4786) #pragma warning(disable:4996) #include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/trie_policy.hpp> #include<ext/pb_ds/detail/standard_policies.hpp> #define pii pair<int,int> #define pll pair<long long ,long long> #define pli pair<long long , int> #define pi...
ALGO
0.999921
3.913116
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2019-11-26T10:31:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0cbc3b75...
deba0b8c-efe2-4b93-857b-24a0a18608d3
alexandraback/datacollection
solutions_2755486_0/C++/SometimesNaive/c.cpp
#include <stdio.h> #include <algorithm> #include <queue> #include <string> #include <string.h> #include <vector> #include <iostream> using namespace std; const int N = 11; const int L = 500; const int OFF = 250; int nattack[N]; int d[N]; int delta_d[N]; int w[N], e[N]; int delta_p[N]; int s[N], delta_s[N]; int he...
ALGO
0.999482
3.445376
{ "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": "44db25a92...
cb8f9a72-48ec-41d2-86e0-98b26b221377
kss418/Atcoder
ABC/300/350/353/G.cpp
#include <bits/stdc++.h> #define fastio cin.tie(0), cout.tie(0), ios::sync_with_stdio(0); #define all(x) (x).begin(), (x).end() #define x first #define y second using namespace std; typedef long long ll; using ull = unsigned long long; using pll = pair<ll, ll>; using tll = tuple<ll, ll, ll>; ll n, m, k; string s; con...
ALGO
0.999987
3.695478
{ "github_metadata": { "branch": "main", "commit_count": 1312, "repo_created_at": "2024-09-16T15:54: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": "0ecadae6a...
66c96735-a4c1-473a-9907-ca50924591e2
homeless-sushi/Thesis-Controller
controller/common/libs/Utils/src/Estimate.cc
#include <Utils/Estimation.h> #include <map> #include "AppRegisterServer/Frequency.h" namespace Estimation { float estimateThroughputCpu( float currThroughput, unsigned newUtilization, unsigned currUtilization, Frequency::CPU_FRQ newFreq, Frequency::CPU_FRQ currFreq, ...
ALGO
0.995992
6.501153
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2023-02-25T17:03: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": "7bc9d592106...
b99e072a-fe32-4e70-8ebe-17bb9c7e9feb
mave89/CPlusPlus_Random
LeetCode/longestPalindrome.cpp
#include <iostream> #include <map> int longest_Palindrome(std::string str){ int result = 0; // Palindromes can be of even length or odd length // If it would be of even length then the number of characters in the // palindrome would also be even in count // For odd palindromes, we can at most have 1 single letter...
ALGO
0.999391
4.925865
{ "github_metadata": { "branch": "master", "commit_count": 447, "repo_created_at": "2016-01-20T03:33: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": "047790d5...
45c5c59d-2e15-41f1-b0a7-7def6aa4ee40
EdwardLiuyc/StaticMapping
back_end/deprecated/map_gps_matcher.cc
// MIT License // Copyright (c) 2019 <NAME> // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, p...
ALGO
0.996663
5.955422
{ "github_metadata": { "branch": "master", "commit_count": 150, "repo_created_at": "2019-08-07T09:32:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 345, "forks": 68, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e8181...
d4bad7b0-8bc2-463f-aa3c-2a256df6aff3
zjkmxy/algo-problems
平成26年/Tarjan/POJ2723 2-SAT+二分层数.cpp
#include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<algorithm> #include<queue> using namespace std; #define MAXN 3010 #define MAXM 9000005 int DFN[MAXN], low[MAXN], vis[MAXN]; int oplst[MAXN], pos, now; int parset[MAXN], setcnt[MAXN]; int ehead[MAXN], edge[MAXM], enext[MAXM], ecnt; int n2, n...
ALGO
0.999577
3.942669
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-10-16T07:33: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": "18dcc3db81...
8f6db7a7-348d-4318-bc63-3621bfae6c9a
OP-DSL/OPS
apps/c/CloverLeaf_3D_HDF5/revert.cpp
/* Crown Copyright 2012 AWE. This file is part of CloverLeaf. CloverLeaf is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. CloverLeaf ...
ALGO
0.972744
3.766753
{ "github_metadata": { "branch": "develop", "commit_count": 2896, "repo_created_at": "2014-02-17T12:44:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 69, "forks": 43, "issues": 4, "pull_requests": 2 }, "file_meta": { "content_id": "dc990...
7e438500-09ff-4ce9-8079-605c8eae623d
RosettaCommons/rosetta
source/src/core/energy_methods/ImplicitMembraneElecEnergy.fwd.hh
// -*- 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.912751
7.086871
{ "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": "eaa6...