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
6f37d305-caa6-4fed-a621-b280b53c29b5
ammardab3an/ACM
problems/done/codeforces/F - leeing Sunlight.cpp
// // https://codeforces.com/gym/103061/submit/F // By AmmarDab3an #include "bits/stdc++.h" using namespace std; #define int int64_t #define ll int64_t // typedef unsigned int uint; // typedef long long int ll; // typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> ...
ALGO
0.999933
4.315855
{ "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": "8ef81e84bb4...
51e7ca51-bd27-45d5-99da-ca6b22b0caf1
avcopan/MPACK
mlapack/library/Cgehd2.cpp
/* * Copyright (c) 2008-2010 * <NAME> * All rights reserved. * * $Id: Cgehd2.cpp,v 1.9 2010/08/07 04:48:32 nakatamaho Exp $ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of...
ALGO
0.996668
3.237259
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-12-18T18:49:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "408953fed...
6dfe6790-e3d3-4e31-8135-364ac6e61cb8
AlexSun1995/PAT
1043_Is_it_a_Bianry_search_tree.cpp
/* patId 1043 is it a Bianry search tree */ // Running for PAT! 2016-7-8 22:09 /* AC TIME:2016-7-12 10:48 */ /* you must know your shortage, the pointer and the recursion */ #include<iostream> #include<queue> #define ElemType int #define BinarySearchTree Node* #define nullptr NULL using namespace std; typedef struct No...
ALGO
0.999998
3.974821
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-02-21T02:13: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": "6d06e695f8...
63374280-1cca-4c59-804c-d816f5a00d24
toropippi/HSPFLUID
source/main.cpp
#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include <windows.h> #include <cmath> #include <stdio.h> #include <stdlib.h> #include "hsp3plugin.h" #include "hsp3struct.h" void FluidProcess(void); void GetSpeedPoints(void); int poissonloop = 8; int bufsize = 128 * 128; double* vx_aft...
ALGO
0.994992
3.131526
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-07-14T17: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": "9191ee87a83e...
36f6250a-f43d-48b7-9cfb-a5ee06d534a8
JudyHsiao/codejam
uva/array/1586.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; int main(){ char A[5][6]; char op; int kase = 1; while (gets(&A[0][0])) { if (strcmp(A[0], "Z") ==0) return 0; for (int i = 1; i < 5; i++) { gets(&A[i][0]); if (strlen(A[i]...
ALGO
0.999286
3.404849
{ "github_metadata": { "branch": "master", "commit_count": 156, "repo_created_at": "2018-05-07T00:56:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6359486a...
aa9bc054-1045-4429-a1e4-99bd3a9e3489
SevdanurGENC/HistogramCalculationByParallelProgramming
HistogramParallel.cpp
#include <stdlib.h> #include <stdio.h> #include <time.h> #include <float.h> #include <conio.h> #include <string.h> #include <iostream> #include <math.h> #include <omp.h> using namespace std; int main(int argc, char *argv[]) { // int dizi[1000]={1000,15,18,2,5,7,10,10,12,12,7,1000,19,14,8,6,18,13,19,11}; int sa...
ALGO
0.998807
3.553838
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-05-16T19:50:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d5c99703d...
f97c1449-1229-49fa-9b2f-fe8dd08234fe
Deep-patra/leetcode_solutions
medium/find_elements_in_contaminated_binary_tree/main.cpp
#include <assert.h> #include <iostream> #include <set> #include <vector> using namespace std; typedef struct TreeNode { public: 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...
ALGO
0.999819
5.552837
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-12-19T07:04: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": "1c5aa9bd083...
cf463888-34d0-44a6-be57-718de07924f4
PigGao/leetcode
23-MergeKLists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solution { public: ListNode* mergeKLists(vector<ListNode*>& lists) { int num = lists.size(); if(num==0) return NULL; ...
ALGO
0.999838
6.009659
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-01-11T12:08:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c5fea289...
d4a85c56-8795-4fe2-a9b9-a203470b97b1
keisuke-kanao/my-UVa-solutions
Contest Volumes/Volume 106 (10600-10699)/UVa_10681_Teobaldos_Trip.cpp
/* UVa 10681 - Teobaldo's Trip To build using Visual Studio 2012: cl -EHsc -O2 UVa_10681_Teobaldos_Trip.cpp */ #include <iostream> using namespace std; const int c_max = 100, d_max = 200; bool links[c_max + 1][c_max + 1]; bool travel[d_max + 1][c_max + 1]; // travel[k][i] is true if Teobaldo can travel to i in...
ALGO
0.999926
3.964602
{ "github_metadata": { "branch": "master", "commit_count": 106, "repo_created_at": "2018-01-06T01:59:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e9aa764...
03771ffd-6b3d-4f14-b3dd-4974f563efc1
milador/LipSyncConnect
Arduino/LipSync_Macro_Firmware/LipSync_Macro_Firmware.ino
/* // // +++ .+++: /++++++++/:. .:/+++++/: .+++/` .+++/ ++++. ++++. `-/++++++/: // oooo .ooo: +ooo:--:+ooo/ :ooo/:::/+/ -ooo+` .ooo+` ooooo: .o-o` `/ooo+//://+: // ooo...
TOOL
0.940256
5.081408
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2020-06-13T06:10:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "339335ffe...
ebdb7b26-a09f-4814-8537-eadebbada62a
AussieSeaweed/index-librorum-prohibitorum
dmoj/nccc3s5/main.cpp
#include <iostream> #include <cmath> using namespace std; const int N = 2000001; const unsigned int len = (unsigned int) (2.0 * pow(2.0, floor(log((double) (N + 1)) / log(2.0)) + 1)); long long size[len]; long long cost[len]; long long add_lazy[len]; bool buy_lazy[len]; long long range_sum(long long a, long long b) {...
ALGO
0.998539
4.423539
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2021-10-17T05:11:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1af3c80463a...
efd3a07c-7bc4-4f9c-9c59-3da773a3c036
aaSHEESH2001/cplusplus_codes
queue ds/doubly ended queue/using linked list/code.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node* next; Node* prev; Node(int d){ this->data = d; this->next = NULL; this->prev = NULL; } }; class doublyQueue{ Node* front; Node* rear; doublyQueue(){...
ALGO
0.99935
4.053452
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-08-18T04:34: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": "36664269d395...
c7a08e8e-5b90-4035-a0be-3b80df9ac789
ChrisCGH/factor-by-gnfs
gnfs/AlgebraicNumber.cpp
#include "NumberField.h" #include "AlgebraicNumber.h" #include "Ideal.h" #include "pow.h" #include "discriminant.h" #include <iomanip> #include <algorithm> #include <stdexcept> #include "MPFloat.h" #include <fstream> #include <float.h> #include "timings.h" #ifdef WIN32 #define isnan(x) _isnan(x) #define isinf(x) !_fini...
ALGO
0.97692
3.937189
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2019-07-18T11:37:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "422598a6d...
a0e640aa-317f-44a4-a534-08915f8aecb4
nikhilsourav/Data-Structures-and-Algorithms
19. Graph/14. SSSP/sssp_bfs.cpp
#include <bits/stdc++.h> using namespace std; #define MAX 10001 // Global vars vector<int> gr[MAX]; bool vis[MAX]; int dist[MAX]; // BFS void bfs(int src) { vis[src] = 1; dist[src] = 0; queue<int> qu; qu.push(src); while (!qu.empty()) { int curr = qu.front(); qu.pop(); ...
ALGO
0.999828
4.401438
{ "github_metadata": { "branch": "master", "commit_count": 181, "repo_created_at": "2021-07-09T05:37:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 70, "forks": 19, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51add0...
2881d12c-6414-4be0-9fb8-9691c76f8420
yamate11/compprog
zCodeForces/er134/c/cans.cc
#include <bits/stdc++.h> #include <cassert> using namespace std; using ll = long long int; using pll = pair<ll, ll>; // #include <atcoder/all> // using namespace atcoder; #define REP(i, a, b) for (ll i = (a); i < (b); i++) #define REPrev(i, a, b) for (ll i = (a); i >= (b); i--) #define ALL(coll) (coll).begin(), (coll)....
ALGO
0.999922
4.09158
{ "github_metadata": { "branch": "main", "commit_count": 219, "repo_created_at": "2021-03-11T06:12:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca7e6ae968...
4668672e-65e7-4cc5-92ad-32808fa902a4
blender/blender
source/blender/render/intern/zbuf.cc
/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved. * * SPDX-License-Identifier: GPL-2.0-or-later */ /** \file * \ingroup render * * \note Some of this logic has been duplicated in `COM_VectorBlurOperation.cc` * changes here may also apply also apply to that file. */ /*-------------------...
ALGO
0.983929
6.533247
{ "github_metadata": { "branch": "main", "commit_count": 152123, "repo_created_at": "2019-10-09T12:47:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15670, "forks": 2395, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2...
762cce39-8444-4b01-8c34-129cf2a2ec26
380676003925/Labb
Source.cpp
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; /* template<typename T1> T1 SA(int x, int* mass) { T1 S = 0; for (int i = 0; i < x; i++) { S += mass[i]; } S /= x; cout << endl << endl; return S; } template<typename T1> T1 amax(int *mass, int size) { T1 max; max = (T1)*mass; for (...
ALGO
0.997414
3.395701
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-11-12T20:56: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": "f55a2ca662...
281ddc88-0765-445b-a542-6ab59c35e775
code2lrn/cpp
careercup/ternarytree.cpp
// // Created by Ranga on 5/7/17. // #include <string> #include <stack> #include <iostream> #include <sstream> class TernaryTree { public: TernaryTree( const std::string &expr ) { int curr = 0; head = ContructTreeRecursive( expr, curr ); Print( head ); std::cout << std::endl; }...
ALGO
0.992351
5.557426
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2016-05-07T20:58: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": "1b51700dd...
5aa93fd4-c289-4f05-86a2-4c668bd04d9d
Haoran-Zhao/Jerk-continuous-online-trajectory-generator-with-constraints
ROS/robot_controller/src/PathComputation.h
#pragma once #include <Eigen/Core> #include <Eigen/Geometry> #include <geometry_msgs/Pose.h> #include <ros/node_handle.h> #include "GazeboModelState.h" #include "GazeboMarker.h" class PathComputation { public: /** * Constructor */ PathComputation(); /** * Destructor */ ~PathComputatio...
TOOL
0.971275
5.580101
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2022-02-02T17:57:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "475fa93099...
8f7576cc-d2c4-47fb-97e6-8d10f04e7f2d
manas221/Let-s-do-CSES
Introductory_Problems/apple_division.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; long int minimum_difference(vector<int> values ,long int sum_of_values){ //basic idea : we divide the values vector in different subsequences and //then calculating it's sum and then subtract it from the other sum long int prevsum = sum_of_va...
ALGO
0.999759
3.795859
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-05-31T05:47: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": "a11168c108b...
7d42a76c-0161-4355-9f1e-388f19ac3e76
liuchang0812/leetcode
src/p127.cpp
class Solution { public: vector<vector<string>> ans; int ladderLength(string beginWord, string endWord, vector<string>& wordList) { unordered_map<string, bool> wordMap; for (auto w : wordList) wordMap[w] = true; queue<string> qs; queue<int> qi; int min_depth = INT_MAX;...
ALGO
0.999961
5.406293
{ "github_metadata": { "branch": "master", "commit_count": 458, "repo_created_at": "2014-06-11T07:03:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "831559bb...
d3108a4c-a946-49d2-a351-921a41c153c3
ray42/CppStudyPublic
CppPrimer/srcEd5/ch17SpecializedLibraryFacilities/exer17-11-12-13.cpp
/* * ========================================================================= * Copyright (c) 2017, <NAME> - All Rights Reserved * Author: <NAME> (ray), <EMAIL> AT <EMAIL> * ========================================================================= */ #include<iostream> using std::cout; using std::endl; #include<...
ALGO
0.984392
4.949515
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2018-03-07T12:09:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "565bd7b10...
fffef36e-21ee-42e4-aa1a-0df50e26b33e
Nipun4338/Solved-Programming-Problems
CodeForces/1348/a/78691065.cpp
#include<bits/stdc++.h> #define rep0(i,n) for(i=0;i<n;i++) #define rep(i,n) for(i=1;i<=n;i++) #define reps(i,a,n) for(i=a;i<=n;i++) #define mem(ara,n) memset(ara,n,sizeof(ara)) #define memb(ara) memset(ara,false,sizeof(ara)) #define all(x) (x).begin(),(x).end() #define fast ios_base:: sync_with_stdio( false ); cin.tie(...
ALGO
0.999744
3.362142
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-07-29T12:52: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": "a85fe7ddd...
67bea1c8-1129-4342-aa51-56775176616f
LukianovVS/rinex_change_meas
satellite.cpp
#include "satellite.h" #include <fstream> #include <cmath> ALM_GPS almGps[_MAX_GPS_SAT_]; int LS = 0; using namespace std; void read_almanac (char fname_alm_gps[], char fname_alm_gln[]) { for (int k = 0; k < _MAX_GPS_SAT_; k++) { almGps[k].read_alm(fname_alm_gps, k + 1); } return; } void utc2gps(...
ALGO
0.965948
4.166842
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2019-03-17T17:45: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": "8272ff454...
61aade61-6e7f-4e91-a6fb-64656ac762b8
hoshinon57/Algorithm
AtCoder/ABC401-500/ABC401-410/ABC403-E.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <iomanip> #include <cassert> using namespace std; typedef long long ll; // const ll INF64 = 1LL << 60; const ll INF64 = ((1LL<<62)-(1LL<<31)); // 10^18より大きく、かつ2倍しても負にならない数 const int INF32 = 0x3FFFFFFF; // =(2^30)-1 10^9より大きく、かつ2倍しても負...
ALGO
0.999542
4.300575
{ "github_metadata": { "branch": "master", "commit_count": 2016, "repo_created_at": "2022-04-21T13:54: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": "c7e191f...
55d133d7-f317-447a-85a7-7427240b8441
shas9/codehub
Self Marathon/Practice/October 2020/Start/E.cpp
// God put a smile upon your face <3 #include <bits/stdc++.h> #define slld(longvalue) scanf("%lld", &longvalue) #define ll long long #define ull unsigned long long #define pll pair < long long, long long > #define fastio ios_base:: sync_with_stdio(false); cin.tie(0); cout.tie(0) #define pb push_back #define bug p...
ALGO
0.999735
3.076811
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-07-25T17:32: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": "d4f54def6e...
4db70fcd-17d2-41d3-aba4-95ba4a530010
cho-hm02123/Algorithm_Study
Beakjoon/재귀/17478.cpp
#include <iostream> #include <cmath> #include <algorithm> using namespace std; int n; void recu(int a) { for (int i = 0; i < 5; i++) { if (i == 0) { for (int j = 0; j < a * 4; j++) cout << "_"; cout << "\"재귀함수가 뭔가요?\"\n"; } if (i == 1 && a!=n) { for (int j = 0; j < a * 4; j++) cout << "_"; ...
ALGO
0.999509
3.809071
{ "github_metadata": { "branch": "main", "commit_count": 537, "repo_created_at": "2024-01-10T04:53:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ac019ed41...
3077c3de-aa9f-4f1e-991b-27384c954532
akhikolla/testpackages
fuzzedpackages/IOHexperimenter/src/Headers/f_rastrigin_rotated.hpp
/// \file f_rastrigin_rotated.hpp /// \brief cpp file for class Rastrigin_Rotated. /// /// A detailed file description. /// Refer "https://github.com/numbbo/coco/blob/master/code-experiments/src/f_rastrigin.c" /// /// \author <NAME> /// \date 2019-09-12 #ifndef _F_RASTRIGIN_ROTATED_HPP #define _F_RASTRIGIN_ROTATED_HPP...
ALGO
0.918599
6.068339
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2021-01-15T17:42:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b7f3c0da9d...
6f20f95b-25f9-4a32-95bd-2beef6b9759a
SayanBanerjee-007/All_DSA_Learning
3-DSA-CPP-Apna-College/1_Maximum_arithmetic_SubArray.c++
// Arithmetic Array // An arithmetic array is an array that contains at least two integers and the differneces // between consecutive integers are equal. For example, [9,10], [3,3,3], [9,7,5,3] are // arithmetic arrays, while [1,3,3,7] and [1,2,4] are not arithmetic arrays. // Maximum Arithmetic Subarrays - #include <...
ALGO
0.993896
5.0155
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-03-19T07:30:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d01b8028e7f...
c202947e-c1cb-4622-b6bd-0e3e0ff24c3b
suyogyarmj/CS313_HW2_Spring21
HW2_Q2.cpp
/* @<NAME> @CSCI-313 @Date: 04/11/21 Homework 2 Program 6 Write a prefix stack and show how it works (in main). */ #include <iostream> #include <stack> using namespace std; bool check (char); double calc (string); int main () { string exp = "++69+*42/42"; // testing the work in main cout << calc ...
ALGO
0.991054
5.437446
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-05-09T13:23: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": "e6aa2da900f5...
6530f478-20ee-4420-9e68-af9cf37f52a6
KomiMoe/Arkari
libcxx/include/__cxx03/__algorithm/ranges_lexicographical_compare.h
//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
ALGO
0.994686
7.089781
{ "github_metadata": { "branch": "llvm-20.x", "commit_count": 525994, "repo_created_at": "2022-04-24T13:42:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 595, "forks": 111, "issues": 2, "pull_requests": 2 }, "file_meta": { "content_id":...
b890a54d-852d-4833-92cd-fb33dff64ff9
cbates8/SCU-Coursework
CSCI 181 - Applied Cryptography/Homework 1/kasiski.cpp
/* CSCI 181 Homework 1 Author: <NAME> kasiski.cpp - Creating Histograms of letter frequency using the Kasiski method */ #include <iostream> #include <string> using namespace std; //Function that creates simple histograms of the frequency of each letter, following the kasiski method //Will create amount of histograms e...
ALGO
0.999716
4.725272
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2020-01-19T18:16:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "682b81ca4...
f1ef9042-34ff-4b64-8364-9c6e4d8effb4
artium59/algo_study
BOJ/1956.cpp
#include <cstdio> inline int min(int a, int b) { return a < b ? a : b; } int v, e, a, b, c, ans=1e9, dist[400][400]; int main() { for (int i = 0; i < 400; ++i) { for (int k = 0; k < 400; ++k) dist[i][k] = 1e9; } scanf("%d %d", &v, &e); while (e--) { scanf("%d %d %d", &a, ...
ALGO
0.999884
3.938791
{ "github_metadata": { "branch": "master", "commit_count": 695, "repo_created_at": "2018-11-04T15:14:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e90f7369...
d27388b9-8783-4213-94de-dbaf2c94608a
spaceandtimefdn/blitzar
sxt/multiexp/pippenger/multiexponentiation.cc
/** Proofs GPU - Space and Time's cryptographic proof algorithms on the CPU and GPU. * * Copyright 2023-present Space and Time Labs, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at...
ALGO
0.999611
7.25327
{ "github_metadata": { "branch": "main", "commit_count": 559, "repo_created_at": "2023-06-12T18:27:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5010, "forks": 153, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e784e0...
ccaee40b-5b47-464a-acb7-7b71d7c09888
Mulab11/cntt2016-hw1
TC-SRM-591-div1-275/czgj.cpp
/* Some features of the diameter of a tree. There must be a node of depth D on the diameter. So for every depth i find another longest path. */ #include <bits/stdc++.h> using namespace std; class TheTree { public: int maximumDiameter(vector <int> cnt) { int f[64], n = cnt.size(), ret = 0; memset(f, 0, sizeof ...
ALGO
0.999775
4.359447
{ "github_metadata": { "branch": "master", "commit_count": 4450, "repo_created_at": "2016-09-28T13:04:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 28, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "2450f...
e8668457-9f59-4ab4-bfe8-a0df52115dbe
RemilRLs/CesarDecode
decodeCesar.cpp
#include <iostream> #include <sstream> bool userInputVerif(std::string userInput); std::string askUserString(std::string userInput); std::string stringDecodeCesar(std::string inputUserValidate, int shift); int checkAnswerBruteForce(char inputUser); void CesarBruteforce(std::string inputUserValidate); std::string as...
TOOL
0.975347
3.816055
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-06-26T22:41:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0737204775...
ebff5ad6-aae3-428f-b4fe-baf0ca2171a8
jombaek/Rucode_6.5
Qualifying_round/G.cpp
#include <iostream> #include <vector> using namespace std; void dfs(int v, vector<bool>& visited, vector<vector<int>>& graph, int& componentSize) { visited[v] = true; ++componentSize; for (const auto& to : graph[v]) { if (!visited[to]) dfs(to, visited, graph, componentSize); } } int...
ALGO
0.999708
4.696002
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2023-05-11T14:54: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": "60b6f94ac8b...
0bc13a30-6163-4399-841a-53ad2df8fa97
caoahn/CodePTIT-DSA
case452.cpp
#include<bits/stdc++.h> using namespace std ; const long long du = 1e9+7 ; int main() { int t ; cin >> t; while(t--) { long long n; cin >> n ; long long a[n] ; long long res = 0 ; for(int i=0; i < n ; i++) { cin >> a[i] ; } sort(a,a+n) ; for(...
ALGO
0.999883
4.359252
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-08-23T13:43: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": "1c5ae277a17a...
7dec9baf-cf0d-463b-914a-402b4257e657
ixu42/webserv
srcs/config/ConfigValidator.hpp
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ConfigValidator.hpp :+: :+: :+: ...
CONFIG
0.971335
6.037269
{ "github_metadata": { "branch": "main", "commit_count": 329, "repo_created_at": "2024-06-19T07:58:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "299f625f84...
ae783955-614c-4e5b-93c0-edc3f64eaa3c
over-fitted/CP
Kattis/success/lostlineup/lostlineup.cpp
#include <bits/stdc++.h> using namespace std; #define ar array #define ll long long #define ld long double typedef vector<int> vi; typedef pair<int,int> pi; #define sza(x) ((int)x.size()) #define all(a) (a).begin(), (a).end() #define REP(i,a,b) for (int i = a; i < b; i++) #define elif else if const int MAX_N = 1e5 +...
ALGO
0.999771
3.623821
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2021-03-16T11:35: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": "0e919d0bffd...
4f82168a-47a2-4c39-ad0c-b6287a7847eb
dwferrer/SPaRTAN
KDTree2/Median_CPU.cpp
/*----------------------------------------------------------------------------- File: Median_CPU.cpp Desc: -----------------------------------------------------------------------------*/ /*------------------------------------- Includes -------------------------------------*/ // Standard Includes #ifndef _INC_S...
ALGO
0.999996
5.832376
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2013-04-03T19:54: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": "b05f39ed6...
0ed552bd-41ce-4aef-850b-5564798833d8
Jeant1k/NM
LR1/4/rotation.cpp
#include "rotation.hpp" void Rotation::solve(double eps) { double accuracy = 0; do { Matrix A_tmp = A; int m = 0, n = 0; double max_el = 0; for (int i = 0; i < size; ++i) { for (int j = 0; j < size; ++j) { if (i != j && std::abs(A_tmp[i][j]) > max_e...
ALGO
0.999884
5.112973
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-12T16: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": "16ce02661261...
682189ba-fc4a-4e26-acc7-e12a686084a4
quattervals/aocpp22
app/day_4.cpp
#include <stdint.h> #include <stdbool.h> #include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> #include "day_4.hpp" #include "utils.hpp" void day_4_executor(const std::string& filename) { std::cout << "this is day four" << std::endl; int count_fully_containing{ 0 }; int ...
ALGO
0.972415
4.850821
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2022-12-15T12:58: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": "6c5a4c39d00...
a6127111-a531-4f90-9ba3-5232444a7369
fjy666/Code
Luogu/Dynamic Rankings - 树套树.cpp
#include <bits/stdc++.h> using namespace std; #define _rep(i_,a_,b_) for(int i_ = a_; i_ <= b_; ++i_) #define mid ((L+R) >> 1) #define get(x) (((x) - 1) / kb + 1) typedef long long ll; int in(void) { int x; scanf("%d",&x); return x; } ll inl(void) { ll x; scanf("%lld",&x); return x; } const int kN = 100500; int val[kN ...
ALGO
0.999979
3.891763
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2022-05-18T04:49: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": "0fa1fc1927b...
04cf2ede-49cf-4e79-9238-fb18945ab205
HEltim7/cpcode
NowCoder/暑假/2022/contest4/D.cpp
#include <vector> #include <iostream> #include <algorithm> #include <random> #include <bitset> using namespace std; #define endl '\n' using LL=long long; const LL mod=998244353; // #define ONLINE_JUDGE #ifndef ONLINE_JUDGE #include<heltim7/debug> #else #define debug(...) #endif LL qpow(LL a,LL b) { LL res=1; ...
ALGO
0.998338
4.226345
{ "github_metadata": { "branch": "master", "commit_count": 249, "repo_created_at": "2022-06-06T13:55: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": "f73a0faa...
1f668ea3-81c1-4d6f-a899-dec55dbf8662
wangfanstar/dsa
src/list/List_search.h
/****************************************************************************************** * Data Structures in C++ * ISBN: 7-302-33064-6 & 7-302-33065-3 & 7-302-29652-2 & 7-302-26883-3 * <NAME>, <EMAIL> * Computer Science & Technology, Tsinghua University * Copyright (c) 2003-2019. All rights reserved. ********...
ALGO
0.999608
5.134141
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-03-08T05:23:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7fb5a2409c...
bdc04200-4c4b-4dd3-a90f-66500490755f
akashb2003/dsa-questions
Recursion/19.cpp
// Find all valid combinations of k numbers that sum up to n such that the following conditions are true: // Only numbers 1 through 9 are used. // Each number is used at most once. // Return a list of all possible valid combinations. The list must not contain the same combination twice, and the combinations may be ret...
ALGO
0.999973
6.428693
{ "github_metadata": { "branch": "main", "commit_count": 499, "repo_created_at": "2023-08-08T07:42:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a0a679390...
c2ece918-c6e3-419c-85d5-d716b79fbccd
helloucas/CommunityAnalysis
CommunityAnalysis/BruteForceClique.h
// 实现Brute-Force Clique Identification 算法 #ifndef BRUTEFORCECLIQUE_H #define BRUTEFORCECLIQUE_H #include "utility.h" vector<int> neighborVertex(int vertexId, MatrixXd & m) { //assert(m.rows() == m.cols()); int c = m.cols(); vector<int> neighbors; for (int i = 0; i < c; i++) { if (m(vertexId, i) == 1) { ne...
ALGO
0.998511
4.141962
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-08-15T14: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": "e1eb9c768a...
bf21c8fe-5f0e-4472-8713-fa8e2ed913c0
Dwawawawa/baekjoon
백준/Silver/10828. 스택/스택.cc
#include <iostream> using namespace std; class Stack { int* arr; int capacity; int top; public: Stack(int size = 10000) { arr = new int[size]; capacity = size; top = -1; } ~Stack() { delete[] arr; } bool isFull() { if (top == cap...
ALGO
0.997596
4.481829
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2025-04-13T09:42: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": "77623f29a4b...
d4bd96d9-2f2d-4952-ae47-dc94db4e3199
ChangJun1/CodeWarsCpp
Fundamental/ReplaceWithAlphabetPosition.cpp
/* In this kata you are required to, given a string, replace every letter with its position in the alphabet. If anything in the text isn't a letter, ignore it and don't return it. "a" = 1, "b" = 2, etc. Example alphabet_position("The sunset sets at twelve o' clock.") Should return "20 8 5 19 21 14 19 5 20 19 5 20 19...
ALGO
0.970336
5.616966
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2023-02-02T14:44: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": "4dbdceca8ea...
4c26d65f-9392-4b61-9ab0-0d62df3f2c6e
ishandutta2007/codeforces-c
cheissmart/normal/1433/B.cpp
#include <bits/stdc++.h> #define IO_OP std::ios::sync_with_stdio(0); std::cin.tie(0); #define F first #define S second #define V vector #define PB push_back #define MP make_pair #define EB emplace_back #define ALL(v) (v).begin(), (v).end() #define debug(x) cerr << "Line(" << __LINE__ << ") -> " << #x << " is " << (x) <...
ALGO
0.999848
4.099027
{ "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": "b978988a3745...
df4f2da5-e8d0-484a-b619-447184d3663b
hoanganh-2k5/DSA
daysovohan.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; const int MOD = 1e9 + 7; ll n; void nhan(ll a[2][2], ll b[2][2]) { ll res[2][2] = {0}; for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { res[i][j] = 0; for (int l = 0; l < 2; l++) { res...
ALGO
0.999984
4.556912
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-25T07:35: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": "a7960f0bab88...
3c522fa9-cff2-431d-a8d0-ce0db6ba4083
omuses/hqp
odc/Prg_Bio.h
/* * Prg_Bio.h -- * - Hqp/Omuses example: bio-technological process * * Adapted from: * @PhdThesis{Pfaff:91, * author = {<NAME>.}, * title = {Entwurf optimaler {S}teuerstrategien ausgew{\"a}hlter * biotechnologischer {P}rozesse anhand aggregierter * kinetisc...
TOOL
0.996768
5.310327
{ "github_metadata": { "branch": "master", "commit_count": 424, "repo_created_at": "2014-01-09T09:51:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 30, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "549574d...
328fd9f8-899f-4369-87ba-fa9c22fad8ac
piyushshakya/target-placement
3rd_June/mergeSort.cpp
#include "../LL_functions.cpp" node* middle(node* head){ if(head == NULL || head->next == NULL) return head; node* slow = head, *fast = head->next; while(fast != NULL && fast->next != NULL){ slow = slow->next; fast = fast->next->next; } return slow; } node* merge(node* h1...
ALGO
0.999997
5.211884
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-06-01T18:50:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "110f0a02113...
84e4fc77-847d-4382-9994-0d6927c42e98
gcallah/OOP2
code/misc/recursion.cpp
/* * Let's work some *recursion* problems! * * */ #include <iostream> #include <vector> #include <climits> #include "base_conv.h" using namespace std; /* * Test max stack depth with infinite recursion. * */ int recurse(int n) { cout << "In call #: " << n << endl; return recurse(n + 1); } /* * The n...
ALGO
0.99188
6.247226
{ "github_metadata": { "branch": "master", "commit_count": 447, "repo_created_at": "2019-01-28T17:14:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c25e2bd2...
b3732718-dea0-400a-a76a-174852f781e4
iamvikasht/algo_problems
onp_problem.cpp
#include<iostream> #include<stack> using namespace std; void PrintStack(stack<char> s) { // If stack is empty then return if (s.empty()) return; char x = s.top(); // Pop the top element of the stack s.pop(); // Recursively call the function PrintStack PrintStack(s); ...
ALGO
0.999975
4.268086
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-03-02T14:16:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11a6884ba93c...
1d2c9550-875d-4265-af56-2f27a952d7aa
shani34/DSA
cpp/udemy/backtracking/patition.cpp
#include <iostream> #include <vector> using namespace std; bool isPalindrome(const string& s, int start, int end) { while (start < end) { if (s[start] != s[end]) { return false; } start++; end--; } return true; } void backtrack(vector<vector<string> >& result, ...
ALGO
0.999842
5.897171
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2023-07-17T13:13: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": "e3b31e4ad7a...
08a76c14-0340-4368-94b7-23999881e809
bugybon/HuffmansAlgorithm-
src/algorithms/include/generateHuffmanTree.hpp
#pragma once /** @file generateHuffmanTree.hpp * @brief A class for generating a Huffman tree, encoding and decoding a text with it * @author <NAME>, 5MI0800232, Group 3 */ #include "../../structures/include/binaryTree.hpp" #include "../../structures/include/linkedQueue.hpp" //! Chooses the smallest tree from bo...
ALGO
0.997768
4.806963
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2023-12-27T23: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": "3ed897cdcb7...
bff45028-2128-4531-8df5-dacde533cc6d
Ayush7614/Daily-Coding-DS-ALGO-Practice
Data Structures/Tree/C++/countNodesgreaterthanX.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; using namespace std; template <typename T> class TreeNode{ public: T data; vector<TreeNode<T>*> children; //constructor TreeNode(T data){ this->data=data; } }; TreeNode<int>* takeInputLevelWise(){ i...
ALGO
0.999945
4.824097
{ "github_metadata": { "branch": "main", "commit_count": 2968, "repo_created_at": "2020-12-28T05:34:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 322, "forks": 474, "issues": 335, "pull_requests": 20 }, "file_meta": { "content_id": "e9...
c648e663-8bee-496d-94e5-e430b38512b0
Plume-SPH/plume-sph
src/datstr/meteo.cc
/* * meteo.cc * * Created on: Feb 28, 2016 * Author: zhixuanc */ #include <stdlib.h> /* exit, EXIT_FAILURE */ #include <algorithm> // std::lower_bound, std::upper_bound, std::find #include "meteo.h" using namespace std; //construction Meteo::Meteo() { number_of_data = 0; number_of_props = 0; ...
TOOL
0.955523
4.870039
{ "github_metadata": { "branch": "master", "commit_count": 304, "repo_created_at": "2016-09-23T23:32:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8782cb24...
e1e4ebc6-0296-4747-bbc5-c5ae17cdd76a
saarang123/Competitive-Programming
usaco/angry_bronze.cpp
#include<bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define f first #define s second typedef long long ll; int main() { ios::sync_with_stdio(0); cin.tie(0);cout.tie(0); //freopen("input.txt", "r", stdin); ifstream fin("angry.in"); ofstream fout("angry.out"); i...
ALGO
0.999963
3.626107
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2021-05-13T07:29:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00d457a8...
d149b3ef-fe22-42d6-9550-e6b18dece14f
ishandutta2007/codeforces-s
serotonin/normal/1359/E.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll sz = 5e5+7, mod = 998244353; ll fac[sz], finv[sz], inv[sz]; void prec() { inv[0] = inv[1] = 1; for(int i=2; i<sz; i++) inv[i] = mod - mod / i * inv[mod % i] % mod; fac[0] = finv[0] = 1; for(int i=1; i<sz; i++) { ...
ALGO
0.99998
4.891049
{ "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": "e86cce30ba39...
0a080c31-ac04-4ad7-885c-2d2d3e80094c
lagoproject/easy
src/interp.cc
/* 3D interpolation code */ /* la idea es trabajar con álgebra vectorial, extendiendo lo que se hace en 2D a un vector de dimension n */ #include <vector> #include <algorithm> #include <iostream> #include <fstream> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <time.h> using namespace std; // co...
ALGO
0.998366
3.519668
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2017-07-18T22:55:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14bcd6ffec...
7d0d2f82-7d1b-44b7-b31f-756333e594b8
HARSHVARDHAN-BARETH/C-DSA
C-DSA/GFG C++/Arrays/Easy/Arrays/Easy/medium/Find All triplet sum is o, Approach2.cpp
#include <iostream> #include<bits/stdc++.h> using namespace std; void FindTriplet(int arr[], int n) { bool found = false; sort(arr, arr+n); for(int i=0;i<n-1;i++) { int l = i+1; int r = n-1; int x = arr[i]; while(l<r) { if(x + arr[l] + arr[r] == ...
ALGO
0.999894
5.057176
{ "github_metadata": { "branch": "main", "commit_count": 147, "repo_created_at": "2024-01-29T13:34: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": "cd50aabde4...
7c90d329-e2ac-4cf9-b547-16b8161388fc
HowardKiat/HOTEL-REVIEWS-SENTIMENT-ANALYSIS-WITH-ARRAYS-AND-LINKED-LISTS
Final Version 4.0 Data Structures/Array/WordFrequency.cpp
#pragma comment(linker, "/STACK:100000000") // Set the stack size to 100 MB #include "WordFrequency.hpp" #include "DynamicArray.hpp" #include <iostream> #include <chrono> WordFrequency::WordFrequency() {} void WordFrequency::addWord(const std::string& word) { for (int i = 0; i < words.getSize(); ++i) { if...
ALGO
0.999905
6.140903
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2024-09-26T07:51: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": "647b85178...
37c4c1f6-edec-4d84-85eb-9f34f47da1f2
Dup4/competitive-programming
codeforces/gym/102028/i.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5 + 10; int n, a[N]; inline int dis(int x, int y) { if (x > y) swap(x, y); return a[y - 1] - a[x - 1]; } int main() { int T; scanf("%d", &T); while (T--) { scanf("%d", &n); for (int i = 1; i...
ALGO
0.9996
3.451936
{ "github_metadata": { "branch": "main", "commit_count": 838, "repo_created_at": "2019-04-07T01:16:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "45b39b76e7...
610009fe-67bc-4c18-bc5e-2255e6712e3f
ishandutta2007/codeforces-e
emiso/normal/981/F.cpp
#include <bits/stdc++.h> #define MN 200020 using namespace std; int n, L, a[MN], b[2*MN]; vector<pair<int, int> > interv, tmp1, tmp2; int main() { scanf("%d %d", &n, &L); for(int i = 0; i < n; i++) { scanf("%d", &a[i]); } sort(a, a + n); for(int i = 0; i < n; i++) { scanf("%d", &b...
ALGO
0.999913
3.532451
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34: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": "5005de5ac79d...
be1eea25-2b91-4953-be68-a13f90c2970e
skyellen/robwork-mirror
RobWork/src/rw/trajectory/InterpolatorTrajectoryIterator.hpp
/******************************************************************************** * Copyright 2009 The Robotics Group, The <NAME>-Kinney Moller Institute, * Faculty of Engineering, University of Southern Denmark * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file exce...
TOOL
0.952331
7.711114
{ "github_metadata": { "branch": "master", "commit_count": 5380, "repo_created_at": "2019-01-12T02:01:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a73dd39...
9cadbee7-4c9e-4346-ad1a-cbda64bd1473
Charles-T-T/Algorithm-Practice
Dynamic-program/509-fib/509.cpp
#include <iostream> #include <vector> using namespace std; /* 斐波那契数 (通常用 F(n) 表示)形成的序列称为 斐波那契数列 。该数列由 0 和 1 开始,后面的每一项数字都是前面两项数字的和。也就是: F(0) = 0,F(1) = 1 F(n) = F(n - 1) + F(n - 2),其中 n > 1 给定 n ,请计算 F(n) 。 示例 1: 输入:n = 2 输出:1 解释:F(2) = F(1) + F(0) = 1 + 0 = 1 示例 2: 输入:n = 3 输出:2 解释:F(3) = F(2) + F(1) = 1 + 1 = 2 ...
ALGO
0.999947
5.063017
{ "github_metadata": { "branch": "master", "commit_count": 316, "repo_created_at": "2024-02-25T02:39: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": "3a8d8cbc...
b12bf20f-c049-405a-976e-82fe99a3b628
Dzeddy/QTCole
main.cpp
#include <iomanip> #include <iostream> /*import time def get_data() -> tuple: string_data_set = ["."] * (26**5) temp_set = [".", ".", ".", ".", "."] alphabet = "abcdefghijklmnopqrstuvwxyz" index = 0 for i in range(len(alphabet)): temp_set[4] = alphabet[i] for j in range(len(alphabet)...
ALGO
0.999605
5.340962
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-10-05T22:47:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9706b8a1a0ab...
a084b6dd-d616-4e5c-9a03-df723c983acd
Devansh-G/Leetcode-Solved-Questions
Max Sum without Adjacents - GFG/max-sum-without-adjacents.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //User function template for C++ class Solution{ public: // calculate the maximum sum with out adjacent //Memoization // int fun(int *arr, vector<int> &dp, int n) // { // if(n==0) // return arr...
ALGO
0.999731
5.681256
{ "github_metadata": { "branch": "main", "commit_count": 578, "repo_created_at": "2023-04-08T20:54: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": "a449b3b2a6...
6b0f84be-63cb-4670-830e-b591da56b4cd
pallabcodes/c-or-c-plus-plus
oop/oop.cpp
#include <iostream> #include <string> #include <vector> using namespace std; // Abstract Base class class Vehicle { protected: string make; string model; int year; public: Vehicle(string make, string model, int year) : make(make), model(model), year(year) {} virtual void displayInfo() const = 0;...
TOOL
0.949079
6.876152
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2025-01-27T17:53: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": "8cb04a7c41b...
dc3fe564-6a7b-426d-bbd6-1c6ae980fc21
re1yun/Algorithm_Study
Programmers/Level2/배달/배달.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; int solution(int N, vector<vector<int>> road, int K) { // init int answer = 0; // map: road info in 2D vector vector<vector<int>> map(N, vector<int>(N, 0)); for(vector<int> road_info : road){ int vil1 = road_info[0...
ALGO
0.999938
5.349056
{ "github_metadata": { "branch": "main", "commit_count": 162, "repo_created_at": "2023-02-20T07:37: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": "c856685d15...
e8d79fcb-eaf7-44b4-8e39-9b917f6a567c
wenxueliu/data_structure
datastruct/Tree/CBinTree.cpp
/*--------------------------------------------- FileName : CBinTree.cpp Version : 0.10 Author : <NAME> Date : 09-19-2012 Time : 16:05 Comment : --------------------------------------------*/ #include <iostream> #include "BinTree.h" using namespace std; typedef char ElemType; // the visit() = PrintE...
ALGO
0.997493
3.779106
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2013-01-16T15:00: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": "f19ef3d12e...
19583611-e805-4b6b-b661-812af7f3b18e
square-cylinder/kattis-solutions
compoundwords/compoundwords.cpp
#include <bits/stdc++.h> /* Don't want to type std:: everywhere */ using namespace std; /* Less verbose names for common types */ #define umap unordered_map #define uset unordered_set /* More convenient integer types */ using i8 = int8_t; using u8 = uint8_t; using i16 = int16_t; using u16 = uint16_t; using i32 = i...
ALGO
0.999945
4.16832
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2024-02-15T16:03:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "944995e1732...
04c352b0-5ed8-45f6-ad6d-7d4ebbc98b2e
NerdyBird0/cpp-primer-plus
ch7/编程练习/7.7.cpp
#include <iostream> double *Fill_array(double[], int len); void Show_array(double[], double *); void Reverse_array(double[], double *); const int SIZE = 10; int main() { double numbers[SIZE]; double *ep = Fill_array(numbers, SIZE); Show_array(numbers, ep); Reverse_array(numbers, ep); Show_array(numbers, ep...
ALGO
0.99548
4.62385
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2023-01-11T06:07:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23e359ca4...
b6eeecfd-7dd0-4e58-b902-068f8498e5d4
bhanuprakash2004/DSA0166-C-programming
Swap private data using friend function.cpp
#include <iostream> class class_2; class class_1 { private: int data_1; public: class_1(int d) : data_1(d) {} friend void swap(class_1&, class_2&); int getData1() const { return data_1; } }; class class_2 { private: int data_2; public: class_2(int d) : data_2(d) {} friend void swap(class_1&...
TOOL
0.962051
5.587122
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-07-28T15:50: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": "8881fb43322e...
f5a66007-ad29-43aa-be52-45be9fa24ce3
bgwines/project-euler
src/almost/primesieve-5.6.0/src/primesieve/PrimeSieve.cpp
/// /// @file PrimeSieve.cpp /// @brief The PrimeSieve class provides an easy API for prime /// sieving (single-threaded). /// /// Copyright (C) 2015 <NAME>, <<EMAIL>> /// /// This file is distributed under the BSD License. See the COPYING /// file in the top level directory. /// #include <primesieve/config...
ALGO
0.989431
6.561749
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2013-12-03T10:50: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": "3d148cf5...
fe90bac2-9520-4f2b-99d7-c8f9b46e1eb0
Twinparadox/AlgorithmProblem
Before_2023/Baekjoon/1012.cpp
#include <iostream> #include <queue> #include <vector> using namespace std; int M, N, K; vector<vector<int> > ground; vector<vector<bool> > check; int dir[4][2] = { {1,0},{-1,0},{0,1},{0,-1} }; void bfs(int x, int y) { queue<pair<int, int> > q; q.push(make_pair(x, y)); check[x][y] = true; while (!q.empty()) { ...
ALGO
0.999859
4.33966
{ "github_metadata": { "branch": "master", "commit_count": 475, "repo_created_at": "2016-09-26T07:51: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": "3d87ee2a...
f7971ed8-ab7c-44f5-8f87-0130dcd8473d
MadhurendraTripathy/LeetCode_May_2020_30_Day_Challenge
Day-14_ImplementTriePrefixTree.cpp
using namespace std; #define FAST_IO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); class Trie { struct TrieNode{ char c; TrieNode * childernPointers[26]; bool endsHere; }; TrieNode * root = new TrieNode(); public: Trie() { root->c = '/'; root->en...
ALGO
0.998065
4.033101
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2020-05-01T10:35: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": "9973d377a...
c54152d5-1bca-4bb3-86c9-f534a5eba142
MarhesLab/NeeleyThesisCode
opt/InteriorFeasibilitySearchPR.cpp
#include <stdlib.h> #include <stdio.h> #include <iostream> #include <fstream> #include <glpk.h> #include "PitchRollLimiter.h" #include "../thread/LoggerThread.h" #include "../functions/Timer.h" #include "../quad/parameters.h" string loc = "Results/"; string name = "interiorPR"; string currentsys = "_cmp"; string expe...
ALGO
0.996596
5.200957
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2015-08-02T20:18:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9a831d192...
e18c0d28-1ad9-4eba-a308-0241caef0b93
JinwooJeon1024/problem-solving
boj/cpp/1717.cpp
#include<bits/stdc++.h> using namespace std; int n, m, k, a, b; int parent[1000002]; int Find(int x) { if (x == parent[x]) return x; return parent[x] = Find(parent[x]); } void Union(int x, int y) { x = Find(x); y = Find(y); if (x == y) return; if (x < y) parent[y] = x; else parent[x] = y; } void solve(int...
ALGO
0.999993
4.846723
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2024-02-05T09:59:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98451a66bac...
23eebc42-907e-422c-a611-c3d2d567a5aa
peacepiece7/cpp-playground
algorithm/1523_hacking(vertex)/main.cpp
/* 해커 김지민은 잘 알려진 어느 회사를 해킹하려고 한다. 이 회사는 N개의 컴퓨터로 이루어져 있다. 김지민은 귀찮기 때문에, 한 번의 해킹으로 여러 개의 컴퓨터를 해킹 할 수 있는 컴퓨터를 해킹하려고 한다. 이 회사의 컴퓨터는 신뢰하는 관계와, 신뢰하지 않는 관계로 이루어져 있는데, A가 B를 신뢰하는 경우에는 B를 해킹하면, A도 해킹할 수 있다는 소리다. 이 회사의 컴퓨터의 신뢰하는 관계가 주어졌을 때, 한 번에 가장 많은 컴퓨터를 해킹할 수 있는 컴퓨터의 번호를 출력하는 프로그램을 작성하시오. 첫째 줄에, N과 M이 들어온다. N은 10,000보다 작거나 같...
ALGO
0.99999
4.144119
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2022-06-20T13:01: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": "161afd2bcdd...
346692a6-b421-431e-8f96-1eb9ecca3978
Zainab-Ayoub/PF
Post Mid-Term/Func to Struct Ptr/timeDiffPtr.cpp
#include<iostream> using namespace std; struct Time { int hour; int min; int sec; }; void subTime(Time t1, Time t2, Time* sub) { if (t2.sec > t1.sec) { t1.min--; t1.sec += 60; } sub->sec = t1.sec - t2.sec; if (t2.min > t1.min) { t1.hour--; t1.min += 60; ...
ALGO
0.99871
4.575204
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-11-29T18:47: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": "e1b5bab00b...
5e5c7565-3d4b-4b35-99b2-b32b0a2b5503
sahil078/Hacktoberfest2024_jh
cpp/PatternQuestions/HollowRect.cpp
#include <iostream> using namespace std; int main() { int row, col; cout << "Enter the value of row: "; cin >> row; cout << "Enter the value of col: "; cin >> col; for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { if (i == 0 || i == row - 1) { ...
ALGO
0.996332
4.941696
{ "github_metadata": { "branch": "main", "commit_count": 99, "repo_created_at": "2024-10-04T13:46:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 35, "issues": 5, "pull_requests": 9 }, "file_meta": { "content_id": "32312541f4...
33917e02-88c8-4c62-b328-25f3baaff70d
zhaoweigg/RST
Report.cpp
// <NAME> <<EMAIL>>, <NAME> <<EMAIL>> #include <stdlib.h> #include <assert.h> #include <iostream> #include <vector> // Globals, shared by all threads // DO NOT change these declarations as we rely on them to grade your assignment // // Candidate primes extern std::vector<int64_t> candidates; // Identify which number(s...
ALGO
0.951496
4.250331
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-10-15T02:19: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": "bd69cfe240...
14ea61a8-90e1-417e-bd50-51c9fa53fa99
NewUU-CS111-Fall2023/week-7-merge-sort-and-binary-search-SadBaxodirov
src/tasks.h
#include <iostream> #include <vector> #include <algorithm> using namespace std; const int MAX_N = 105; int task1(vector<int>& arr) { int n = arr.size(); for (int i = 0; i < n - 2; ++i) { vector<int> subarray(arr.begin() + i, arr.begin() + i + 3); sort(subarray.begin(), subarray.end());//let's sa...
ALGO
0.999837
4.255325
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2023-12-04T16:20:37.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf941bbf510...
df7e9478-aca4-48f3-8920-d663328d789a
ImageEngine/cortex
include/IECore/KDTree.inl
////////////////////////////////////////////////////////////////////////// // // Copyright (c) 2007-2010, Image Engine Design Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // ...
ALGO
0.999052
7.147319
{ "github_metadata": { "branch": "main", "commit_count": 9917, "repo_created_at": "2013-06-12T23:12:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 541, "forks": 126, "issues": 41, "pull_requests": 11 }, "file_meta": { "content_id": "de67...
b9081221-12a4-4b76-9ff4-41ef9e575d8b
Swarajballal/DSA-Folder
Week-4-Sorting/Supreme-Batch-Debug-Exercise-C++ (Week-4)/4.cpp
// # Supreme-Batch-Debug-Exercise-C++ (Week-4) // **NOTE: The code snippet given may be incomplete or have compile time, runtime or logical errors.** // **How to attempt Debugging Exercise?** // 1. Copy the code to your code editor (e.g. VS Code). // 2. Add relevant header files like “#include <iostream>” etc. // 3....
ALGO
0.99786
5.121311
{ "github_metadata": { "branch": "master", "commit_count": 169, "repo_created_at": "2023-02-08T15:07: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": "5be8a5a5...
15b6d642-73c0-452c-9934-aaf2b8ad8501
wfgu-git/Solve
HDU/Multi-University Training Contest - Team 9/1002.cpp
/* 教练我要打ACM! */ #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; const int inf = 0x3f3f3f3f; const int maxn = 100000 + 20; #define lson o << 1 #define rson o << 1 | 1 int n, q; ll w[maxn]; vector<int> G[maxn]; void add_edge(int u, int v) { G[u].push_back(v); G[v].push_b...
ALGO
0.999928
4.151227
{ "github_metadata": { "branch": "master", "commit_count": 401, "repo_created_at": "2017-01-02T14:23:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1651bfe7...
5a4c37bd-b2e3-441c-8d5a-2a039da9d942
rbnelr/3d_lib
mylibs/intersect.hpp
#pragma once #include "vector.hpp" #include "float_precision.hpp" namespace intersect { using namespace vector; using namespace float_precision; bool intersect (v2 point, v2 rect_a, v2 rect_b, v2* hit_uv=0) { v2 uv = map(point, rect_a, rect_b); *hit_uv = uv; return all(uv >= 0 && uv <= 1); } bool raycast...
ALGO
0.978764
6.785328
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2018-09-15T04:09: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": "13b8df213...
2199b213-2484-4114-b298-ced3d8c520e3
hvdieren/manseglib
benchmarks/local_pagerank/cpp/quicksort.h
#pragma once template<typename T> int partition(T* a, int lo, int hi) { int pivot = a[(hi+lo) / 2]; int i = lo-1; int j = hi+1; while(true) { while(a[++i] < pivot); while(a[--j] > pivot); if(i >= j) return j; std::swap(a[i], a[j]); } } template<typename T> void...
ALGO
0.999981
5.518853
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2020-06-09T18:48: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": "823f0bef1...
0753ec8a-293e-4537-b375-ddc967b1f13d
EdgarEspinozaPE/Voxel-Volumetric-Models-Optimization
optimization.cpp
#define VOX_IMPLEMENTATION #include "vox.h" #if defined(_MSC_VER) #include <io.h> #endif #include <stdio.h> #include <ctime> #include <algorithm> #include <numeric> #include <vector> const vox_scene* load_vox_scene(const char* filename, uint32_t scene_read_flags = 0) { #if defined(_MSC_VER) && _MSC_VER >= 1400 ...
ALGO
0.991829
5.006576
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-02-16T14:42: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": "78a22f9ee8d2...
295d52ca-1771-4c9e-b382-6b7b0765fd55
Jian-Zhe/Competitive-programing
cpp/group/w2-sweepLine/SmallestBoundingRectangle.cpp
#include <bits/stdc++.h> #define _ cin.tie(0) -> sync_with_stdio(false); #define X first #define Y second // #define double long double using namespace std; using ll = long long int; const double eps = numeric_limits<double>().epsilon(); struct Point{ double x, y; double operator * (Point q) { return x * q.x...
ALGO
0.999747
4.491499
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2023-01-05T02:41:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "115dfc57e...
2b177ee2-e407-44ec-8ed4-51b55c0255e5
IntelLabs/hexl
hexl/eltwise/eltwise-fma-mod.cpp
// Copyright (C) 2020 Intel Corporation // SPDX-License-Identifier: Apache-2.0 #include "hexl/eltwise/eltwise-fma-mod.hpp" #include <algorithm> #include "eltwise/eltwise-fma-mod-avx512.hpp" #include "eltwise/eltwise-fma-mod-internal.hpp" #include "hexl/logging/logging.hpp" #include "hexl/number-theory/number-theory....
ALGO
0.986857
7.338683
{ "github_metadata": { "branch": "development", "commit_count": 174, "repo_created_at": "2021-03-26T00:01:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 238, "forks": 53, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c...
e45ff15b-b97b-4612-a2e2-4d7c05903601
karan-pawar-09/codeforces
G_Orray.cpp
/* author:Karan created:13.10.2022 20:40:20 */ #if true #pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") #include<bits/stdc++.h> using namespace std; #define ll long long #define all(ar) ar.begin(),ar.end() #define endl '\n' #define mset(a,x) memset(a,x,sizeo...
ALGO
0.999947
4.61951
{ "github_metadata": { "branch": "main", "commit_count": 62, "repo_created_at": "2021-09-07T15:42: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": "44ed62c7f0f...
a1387215-79c2-40f6-870e-5d07a68d4581
Jenesix/ACS-KMUTT-PATH
css121/Hwmain1.cpp
#include <iostream> #include <vector> #include <cmath> #include <algorithm> // Define a structure to represent a person's attributes struct Person { std::string Name; std::string Sex; double Ne; double Ni; double Te; double Ti; double Se; double Si; double Fe; double Fi; std::string Type; std...
ALGO
0.998845
5.951677
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-11-10T17:43:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "adc802af3133...
e2cc5716-57c6-47c0-91db-388d7aaf02a2
DDenis93/LessonsC
2-4/4.cpp
#include <iostream> #define _USE_MATH_DEFINES #include <math.h> using namespace std; enum class weekdays{ Monday, Tuestay, Wednesday, Thursday, Friday, Saturday, Sunday }; int main(){ int n; cout << "All digits after your digit: "; cin >> n; switch(n){ case 0: std::cout << "0" << endl; case 1: cout << "1" <<...
ALGO
0.999191
3.242958
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-04-27T20:44: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": "8cd2d059d449...
8a02c2d9-9fb6-4f32-b3f6-561f80a7b0fa
chensun11/dtfv
src/alglib/statistics.cpp
/************************************************************************* Copyright (c) <NAME> (ALGLIB project). >>> SOURCE LICENSE >>> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation (www.fsf.org); ...
ALGO
0.998044
3.763
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2014-03-13T17:10:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 80, "forks": 28, "issues": 3, "pull_requests": 1 }, "file_meta": { "content_id": "9fea49ff...
4f649b37-aab6-46cd-b2e0-d356ba0a6510
slabbster/GFanPortProject
app_symmetries.cpp
#include "vektor.h" #include "printer.h" #include "parser.h" #include "gfanapplication.h" #include "minkowskisum.h" #include "newtonpolytope.h" #include "buchberger.h" #include "wallideal.h" #include "lp.h" #include "tropical.h" #include "division.h" #include "bergman.h" #include "tropical2.h" #include "dimension.h" #i...
ALGO
0.990128
5.051387
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2016-08-16T16:46:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10ed1c19af...