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
60d1b95a-d842-4200-af9b-5f33058f2ce8
DrawZeroPoint/CURI-Walker
ubt_sim_ws/src/walker_movement/src/control_utils.cpp
#include "control_utils.hpp" #include <moveit/move_group_interface/move_group_interface.h> #include <moveit/planning_scene_interface/planning_scene_interface.h> #include <tf/tf.h> #include <control_msgs/FollowJointTrajectoryAction.h> #include <trajectory_msgs/JointTrajectory.h> std::vector<control_msgs::JointToler...
TOOL
0.993292
5.663294
{ "github_metadata": { "branch": "master", "commit_count": 174, "repo_created_at": "2020-06-05T01:45:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4bb09aff...
b3245aa6-aca1-46fa-9f51-94e1ec1f7d32
BenWeber42/acm-lab
03/shelves.trivial.cpp
#include <iostream> #include <cmath> #include <limits> using namespace std; int gcd(int a, int b) { int c; while (b) { c = b; b = a%b; a = c; } return a; } int main() { int testcases; cin >> testcases; for (int i = 0; i < testcases; ++i) { // we will work with a*m + b*n -> l, maximizing b int best...
ALGO
0.999936
4.166121
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-07-19T11:51: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": "6b322e38c5...
6847641b-c8af-4d18-ac6c-266c040ad04f
alexandraback/datacollection
solutions_5634947029139456_0/C++/rockwyc992/pA.cpp
/************************************************************************* > File Name: pA.cpp > Author: rockwyc992 > Mail: <EMAIL> > Created Time: 西元2014年04月26日 (週六) 09時24分38秒 ************************************************************************/ #include <stdio.h> #include <string.h> #include <m...
ALGO
0.99985
3.550209
{ "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": "598b2af8b...
6736e730-4187-4237-8d8e-5def23462eca
bryanSME/hipparchus-_cpp
core/linear/PreconditionedIterativeLinearSolver.h
#pragma once /* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "Licens...
ALGO
0.988026
3.939274
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-08-15T23:45:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55243540ee2...
f47389da-8895-49d7-8943-f2d0f3d9d8f5
ningning621/cplus-projects
22A_Huang_Lesley_H3/22A_Huang_Lesley_Hw3_B.cpp
/** PART B Write a program that will do the following steps (pseudo-code): 1. Display a welcome message and a title, such as “Working with random numbers and simple mathematical functions”. Then display the name of the library functions you are going to use in this program and the header files needed for each func...
ALGO
0.998504
4.387512
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-01-11T03:49:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c0f87fdbd...
b0eb165d-0e95-48ff-abfc-e4943a29231a
clarautu/CS4431HW7
HW7_Clark.cpp
// HW 7 // <NAME> // Numerical integration with trapezoid rule and Simpson's rule // Done using class Function -- shoud be doen using pass-by-function #include <iostream> #include <vector> #include "FunctionClass.h" // Method that performs numerical intergration by the trapezoid rule // a and b are the start and ...
ALGO
0.995659
5.926779
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-01-29T21:45: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": "e40f6d057d8d...
26fa90de-a808-4cf7-bdbc-b75fd89bd6a9
ishandutta2007/codeforces-w
wasa855/normal/1304/E.cpp
#include<bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define Fast_IO ios::sync_with_stdio(false); #define fir first #define sec second #define mod 998244353 #define ll long long inline int read() { char ch=getchar(); int nega=1; while(!isdigit(ch)) {if(ch=='-') nega=-1; ch=getchar();}...
ALGO
0.999929
4.713968
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:34: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": "a2126d3c424b...
1e372433-feb9-4920-9d89-6cba13270f88
juangonzalez22/tareas-programacion-2
Taller de Vectores/Ejercicio15.cpp
#include <iostream> #include <vector> using namespace std; int main() { int n; int m; cout << "EJERCICIO 15" << endl; cout << "Crea un vector y modifica su tamaño con resize. Imprime su tamaño y capacidad antes y después de la modificacion para observar los cambios." << endl; cout << "Ingresa el ...
ALGO
0.911957
3.952018
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-08-21T22:44:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a534e6b521...
7e7c008a-c05b-472b-a621-75c96dcb54df
dbdbais/Solved_Problem_Storage
백준/Gold/9205. 맥주 마시면서 걸어가기/맥주 마시면서 걸어가기.cc
// // Created by newbi on 2024-03-26. // #include <iostream> #include <vector> #include <algorithm> #define endl '\n' #define For(i,a,b) for(int i=a;i<b;i++) #define fastIO() ios::sync_with_stdio(0),cin.tie(0),cout.tie(0) using namespace std; int startX, startY; const int INF = 32767 * 102; int getDistance(pair<int,...
ALGO
0.999756
4.95654
{ "github_metadata": { "branch": "main", "commit_count": 666, "repo_created_at": "2023-10-29T07:08: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": "a263ac315c...
71a5e06e-ec71-4751-a14e-096b591aeb9c
Hirosora/flann_simplified_v2
flann/util/lsh_index.h
// // Created by 张浩天 on 2016/8/22. // #ifndef FLANN_LSH_INDEX_H #define FLANN_LSH_INDEX_H #include <algorithm> #include <cassert> #include <cstring> #include <map> #include <vector> #include <string> #include <iostream> #include <fstream> #include "../general.h" #include "dynamic_bitset.h" #include "matrix.h" #inclu...
ALGO
0.964529
5.412887
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-09-03T09:57: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": "6b5f477005...
656ba478-39dc-4120-bcd7-dfbfd05f0fe9
HarryNguyen2662/codeKingToan
other/coicode.cpp
#include<bits/stdc++.h> using namespace std; #define fi first #define se second #define pb push_back #define log 18 #define getbit1(x) __builtin_popcount(x) #define mask(i) (1ll << (i)) #define setp(x) setprecision(x) const double PI = 3.14159265389793238462643383279502884197169; const long long MOD = 1e9 + 7; const lo...
ALGO
0.999885
4.132987
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-12-20T15:17: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": "ffcc18cf5ec2...
931184e9-7fab-4889-a7af-4c0484e66bb6
chergalieva05/404_pp1
lab 1/2.cpp
#include <iostream> using namespace std; int main(){ int n,m; cin>>n>>m; char a[n][m]; for (int i=0;i<n;i++){ for (int j=0;j<m;j++){ cin>>a[i][j]; } } int a2[n][m]; for (int i=0;i<n;i++){ for (int j=0;j<m;j++){ cin>>a[i][j]; } } bool boolka=true; for (int i=0;i<n;i++){ for (int j=0;j<m;j++){ ...
ALGO
0.999676
3.350184
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-11-01T14:40: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": "bc2365d83e31...
e15bb08e-a19c-4676-ae00-cb431c07c303
in-silico/Maratones-src
UVA/2008/Waterloo/Rocket.cpp
#include <cstdio> #include <algorithm> #include <cmath> using namespace std; struct Stage { long long s; long long l; double t; double c; }; Stage stages[1010]; double dp1[1010][10010]; double ln[12000]; double velStage(int stage, long long masa) { Stage &t = stages[st...
ALGO
0.999625
3.375096
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2012-07-30T00:42:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5bdd5c817a7...
a50c66ec-652b-4833-96e1-d2d3e6a23168
71mehedi/Mid-Point-Circle-Drawing-Algorithm-1
main.cpp
#include <windows.h> #include <GL/glut.h> #include <stdio.h> #include <GL/gl.h> #include <math.h> int r, pk; int x = 0, y; void init(void) { glClearColor(0.0, 0.0, 0.0, 0.0); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(-100.0, 100.0, -100.0, 100.0, -1.0, 1.0); } void drawMidpointCircle(GLi...
ALGO
0.972685
5.562155
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-09-09T05:10: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": "1f3a6210c6d1...
e7a28914-815a-4481-8c11-b80fd3ab74bf
PaddlePaddle/Paddle
paddle/phi/kernels/binomial_kernel.h
// Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required...
TOOL
0.904339
6.41
{ "github_metadata": { "branch": "develop", "commit_count": 54743, "repo_created_at": "2016-08-15T06:59:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 23037, "forks": 5770, "issues": 1009, "pull_requests": 823 }, "file_meta": { "content_...
d2a7d400-9fbc-4bab-8ff0-f9b7f5501bcd
E-M-Bailey/competitive_programming
kattis/solved/polymul2.cpp
#include <bits/stdc++.h> using namespace std; int rup2(int n) { n--; for (int i = 1; i < 32; i *= 2) n |= n >> i; return n + 1; } typedef long double F; template<typename T> const T PI2 = atan((T)1) * 8; template<typename T> inline void dft(vector<complex<T>> &X) { int n = (int)X.size(); if (n <= 1) retur...
ALGO
0.999909
3.89589
{ "github_metadata": { "branch": "main", "commit_count": 548, "repo_created_at": "2022-12-09T02:31:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1bbbc70568...
b3986a1e-6391-4afc-b6a7-e7993bbd5c81
zkx349113864/c-_primer_5th
chapter_nine/practise9-20.cpp
#include <iostream> #include <deque> #include <vector> #include <string> #include <list> using std::cin; using std::cout; using std::endl; using std::vector; using std::string; using std::deque; using std::list; int main() { list<int> ilist{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; deque<int> evendeq, odddeq; for (a...
ALGO
0.987186
4.991982
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2019-06-15T15:39: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": "f4b1ed91b...
a4362cc9-920d-4f64-852e-113af8dc5efa
AlgoCpper/Algorithms
week3/240417_BOJ_2512/cherry-go-round/2512.cpp
#include <bits/stdc++.h> using namespace std; int a[10005]; int main() { cin.tie(0); ios::sync_with_stdio(0); int n; cin >> n; int mn = 0; for (int i = 0; i < n; i++) { cin >> a[i]; mn = max(mn, a[i]); } int m; cin >> m; int l = 1; int r = mn; w...
ALGO
0.99994
4.250327
{ "github_metadata": { "branch": "main", "commit_count": 424, "repo_created_at": "2024-03-26T01:26:22.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "08d76ad5923...
a28e95b2-fee2-4dce-b842-7e192b18cc73
ishandutta2007/codeforces-r
radewoosh/normal/1450/C2.cpp
//~ while (clock()<=69*CLOCKS_PER_SEC) //~ #pragma comment(linker, "/stack:200000000") #pragma GCC optimize("O3") //~ #pragma GCC target ("avx2") //~ #pragma GCC optimize("Ofast") //~ #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") //~ #pragma GCC optimize("unroll-loops") #include <bits/st...
ALGO
0.999918
4.102368
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "37c65b3f8627...
66ea0def-dfac-451c-9803-1bb10297f9e6
ankitwest/DSA
CSES/DP/8.array-description.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i=a;i<b;++i) #define lpri(n) printf("%lld ", n) #define lscn(n) scanf("%lld", &n) #define pri(n) printf("%d ", n) #define scn(n) scanf("%d", &n) #define ln cout<<"\n"; #define debug0(x) cout<<(x)<<" " #define debug(x) cout<<(x)<<endl #define deb...
ALGO
0.999994
3.699097
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-08-14T15:24:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "577cf284c12d...
4f8153eb-ddea-41ad-96fb-bf014e65d5f2
KevinJYLee/2K24_VEDA_algoStudy
백준/Silver/28278. 스택 2/스택 2.cc
#include <iostream> using namespace std; class MyStack{ private: //new 를 활용해 공간을 동적할당 할 것 int* data; //데이터 개수 저장합니다. 생성시 초기값 0 int len; //top 을 가리키는 포인터를 만들까요 말까요. 아마 top 포지션은 인덱스 len 으로 접근하면 됩니다. public: //최대 명령수대로 힙에 할당을 합니다. MyStack(int N){ data = new int[N];...
ALGO
0.999388
4.285761
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-07-26T09:02: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": "3e89b78e3de...
2b68d3bc-7bea-4caf-a8ca-d8830edbdf3f
ParAlg/ParClusterers
clusterers/cluster-in-memory-metric_main.cc
#include <chrono> #include <iomanip> #include <memory> #include <string> #include <vector> #include "absl/flags/flag.h" #include "absl/flags/parse.h" #include "absl/status/status.h" #include "absl/status/statusor.h" #include "absl/strings/str_format.h" #include "absl/strings/string_view.h" #include "clusterers/metri...
DATA
0.939606
7.449431
{ "github_metadata": { "branch": "master", "commit_count": 575, "repo_created_at": "2021-07-27T22:35:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 3, "issues": 2, "pull_requests": 5 }, "file_meta": { "content_id": "ff5928a46...
78efc095-3b1a-4e78-80e9-c45909348bd6
danielsamfdo/RL_CS687
cpp_source_v3/src/experimental/CMPSCI687/HW1.cpp
#include <stdafx.h> #include <experimental/CMPSCI687/HW1.hpp> #include <environments/Gridworld687.hpp> #include <environments/Pendulum.hpp> #include <agents/CrossEntropyMethod.hpp> using namespace std; using namespace Eigen; void HW1() { // RNG mt19937_64 generator(0); // Set maxThreads int maxThreads = 32; //...
ALGO
0.997977
5.996436
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2017-10-17T04:53: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": "56f1af4c8...
73537dce-59df-4540-b90e-a422040557af
wpilibsuite/allwpilib
wpimath/src/main/native/include/frc/filter/LinearFilter.h
// Copyright (c) FIRST and other WPILib contributors. // Open Source Software; you can modify and/or share it under the terms of // the WPILib BSD license file in the root directory of this project. #pragma once #include <algorithm> #include <initializer_list> #include <span> #include <stdexcept> #include <type_trait...
TOOL
0.950278
7.55624
{ "github_metadata": { "branch": "main", "commit_count": 7447, "repo_created_at": "2014-09-30T20:51:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1185, "forks": 658, "issues": 433, "pull_requests": 134 }, "file_meta": { "content_id": "1...
939edfea-7ae6-45d4-9c3a-3de35145cc42
tmwtml/algo_grader
ex05e3_catapult.cpp
#include <iostream> #include <stdio.h> #include <vector> #include <algorithm> using namespace std; vector<vector<int>> g(1001), p(1001); vector<int> ans; bool del[1001] = {}; void dfsp(int v, int *c, vector<int> &ts){ c[v] = 1; for(int u : p[v]){ if(!del[u] && c[u] == 0) dfsp(u, c, ts); ...
ALGO
0.999943
3.390689
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-11-05T15:20:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "41740c1e38...
235a0ead-5a55-46c9-9f7f-c679d805f942
kazeuwu/Akira-CP
Online_Judge/Le_Quy_Don_OJ/CNT00.cpp
/** * author: akira * created: 19/06/2023 00:29:58 **/ #include <bits/stdc++.h> using namespace std; /**--------MACROS--------**/ #define all(x) x.begin(), x.end() #define sz(x) (int)x.size() #define pb push_back #define fi first #define se second #define llll pair<long long, long long> typedef long long ll;...
ALGO
0.999961
4.724172
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-06-20T16:17: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": "7bb61f46720...
ff09b720-93ab-478d-9c37-f6f3cd3c9fae
dinesh-2020-code/LeetCode
0199-binary-tree-right-side-view/0199-binary-tree-right-side-view.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999905
6.147337
{ "github_metadata": { "branch": "main", "commit_count": 572, "repo_created_at": "2022-10-09T06:06: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": "794a8aa11e...
8ac0ec9b-f384-47b3-86f5-b89d1d2605c7
Sadiajaved-113/Sadiajaved-113
LAB TASK 1/circular ll.cpp
#include<iostream> using namespace std; class Node{ public: int data; Node *next,*head,*p; // Node(int n){ // data=n; // next=NULL; // } Node() { head=NULL; } void insert(int n) { Node* p = new Node(); p->data=n; if (head == NULL) { head = p; head->next = ...
ALGO
0.998323
3.718917
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2023-09-10T11:26: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": "e9aeffba7e7...
eb7317d2-44a4-49a5-ab2c-a5fddbb96f2a
riya200208/Competitive-Programming
Spread Spree.cpp
#include <bits/stdc++.h> #define int long long int using namespace std; int mod = 998244353; int mul(int x,int y){ return ((x%mod)*(y%mod))%mod; } int powers(int x,int p){ x=x%mod; if(p==0) return 1; if(p==1) return x%mod; int z=powers(x,p/2); if(p%2>0) return mul(x,mul(z,z)); retur...
ALGO
0.999988
5.71267
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2022-11-15T02:17:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f999e8f53fd...
effe56c7-1151-404a-a378-1f3cb3c50f22
TosakaUCW/CompetitiveProgramming
Old/Codeforces/Gym/[Codeforces 104768I] Barkley II.cpp
#include <stdio.h> #include <algorithm> #include <iostream> #include <vector> #include <set> #include <string.h> int read(int x = 0, int f = 0, char ch = getchar()) { while (ch < 48 or 57 < ch) f = ch == 45, ch = getchar(); while(48 <= ch and ch <= 57) x = x * 10 + ch - 48, ch = getchar(); return f ? -x : x...
ALGO
0.999657
3.717628
{ "github_metadata": { "branch": "master", "commit_count": 506, "repo_created_at": "2018-09-23T04:02:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "672ab2ba...
150c1a48-138d-4a43-b210-1419c7159448
dreyus95/AVSP_SourceQualityPrediction
CodeJamCrawler/dataset/11_19023_28.cpp
#include <cstdlib> #include <cctype> #include <cstring> #include <cstdio> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <iostream> #include <sstream> #include <set> #include <map> #include <queue> #include <stack> #include <fstream> #include <strstream> using namespace std; char ma...
ALGO
0.998851
3.608801
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-06-08T21:00:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "076275b5c...
c12c12cd-54af-43a3-8c5b-93a1524222ac
casmith789/AdventOfCode
AdventOfCode2023/Day10_2023.h
#pragma once #include <string> #include <iostream> #include <set> #include "input_day10_2023.h" #include "Util.h" class Day10_2023 { public: Day10_2023() = default; ~Day10_2023() = default; static const int SQUARE_SIZE = 145; bool canLink(int x1, int y1, int x2, int y2, std::vector<std::vector<char>>...
ALGO
0.999481
3.830924
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2023-12-08T08:37: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": "bdbd9c156...
ceaa46df-4c08-4f98-b5b3-821d05a4e2aa
jeremykvlim/kattis
open/fairbandwidthsharing.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n, t; cin >> n >> t; vector<double> a(n), b(n), d(n); for (int i = 0; i < n; i++) cin >> a[i] >> b[i] >> d[i]; double l = 0, r = 1e6, m; while (l + 1e-12 < r && l + l * 1e-12...
ALGO
0.999983
3.708542
{ "github_metadata": { "branch": "main", "commit_count": 4387, "repo_created_at": "2023-11-17T12:14:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b17bafe74...
56263d23-b80f-46c0-bf21-602bed729823
dev4guru/TechDeTest
TP1/Exercice1/TP1.cpp
#include <iostream> #include <string> using namespace std; string constructeurTriangle(float long1,float long2,float long3){ if ((long1 <= 0) | (long2 <= 0) | (long3 <= 0)){ return "impossible"; //Cas impossible } else if ((long1 >= long2 + long3) | (long2 >= long1 + long3) | (long3 >= long2 + long1)){ return ...
ALGO
0.999237
3.943746
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-06-05T20:34: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": "df8c09be5b...
83d8039f-2477-446f-8dfb-fe4c1819a1b1
PedroDariva36/Desktop
atCoder/abc368/a/a.cpp
#include <algorithm> #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <vector> struct custom_hash {static uint64_t splitmix64(uint64_t x) {x += 0x9e3779b97f4a7c15; x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9; x = (x ^ (x >> 27)) * 0x94d049bb133111eb; return x ^ (x >> 31); } size_t operator()(uint...
ALGO
0.999977
3.897987
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-03-30T23:55: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": "ada5e7d2372...
58446028-f001-4f22-a81b-3df662707bea
Eng-Gamal-megahed/Problem_Solving
Array Coloring.cpp
// "ولا تقولن لشيء إني فاعل ذلك غدا" // "إلا أن يشاء الله واذكر ربك إذا نسيت وقل عسى أن يهديني ربي لأقرب من هذا رشدا" // LINK : https://codeforces.com/contest/1857/problem/A #include <bits/stdc++.h> #define ll long long #define nl '\n' #define sp ' ' #define all(a) a.begin(),a.end() #define allr(a) a.rbegin(),a.rend()...
ALGO
0.99985
4.31328
{ "github_metadata": { "branch": "main", "commit_count": 73, "repo_created_at": "2024-02-24T00:07: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": "c0b02c43a89...
80c98d2c-f962-4b65-b3bb-d2d5dec31662
ClickHouse/ClickHouse
src/Processors/QueryPlan/Optimizations/removeRedundantSorting.cpp
#include <AggregateFunctions/AggregateFunctionFactory.h> #include <Interpreters/FullSortingMergeJoin.h> #include <Processors/QueryPlan/AggregatingStep.h> #include <Processors/QueryPlan/ExpressionStep.h> #include <Processors/QueryPlan/FillingStep.h> #include <Processors/QueryPlan/FilterStep.h> #include <Processors/Query...
ALGO
0.968958
6.292753
{ "github_metadata": { "branch": "master", "commit_count": 183246, "repo_created_at": "2016-06-02T08:28:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 41764, "forks": 7471, "issues": 4250, "pull_requests": 622 }, "file_meta": { "content_...
ee19454b-c842-4b67-9a01-106b7905e77f
Kiids/OJ_Practice
自除数.cpp
/* 自除数 是指可以被它包含的每一位数除尽的数。 例如,128 是一个自除数,因为?128 % 1 == 0,128 % 2 == 0,128 % 8 == 0。 还有,自除数不允许包含 0 。 给定上边界和下边界数字,输出一个列表,列表的元素是边界(含边界)内所有的自除数。 示例 1: 输入: 上边界left = 1, 下边界right = 22 输出: [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 15, 22] 注意: 每个输入参数的边界满足 1 <= left <= right <= 10000。 */ class Solution { public: bool Is(int n) ...
ALGO
0.999744
5.434294
{ "github_metadata": { "branch": "master", "commit_count": 1531, "repo_created_at": "2019-10-23T13:47: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": "28ed9fe...
dbda036f-0f44-49c8-a500-dab0a90553a7
FuChaolei/leetcode_ago
1662.检查两个字符串数组是否相等.cpp
/* * @lc app=leetcode.cn id=1662 lang=cpp * * [1662] 检查两个字符串数组是否相等 * * https://leetcode-cn.com/problems/check-if-two-string-arrays-are-equivalent/description/ * * algorithms * Easy (81.29%) * Likes: 13 * Dislikes: 0 * Total Accepted: 18.7K * Total Submissions: 23K * Testcase Example: '["ab", "c"]\n[...
ALGO
0.999695
6.480393
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2021-04-26T15:26:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "967ee4126f7...
ecd4e7a9-fc22-49a2-bec9-e7107a2207a0
SuMayaBee/Computer-Optimization
CSE301-main/prim.cpp
#include<bits/stdc++.h> using namespace std; #define mx 100 vector<vector<int>> graph; int pre[mx]; int keys[mx]; int visited[mx]; void prim(int V, int s) { for(int i=0; i<V; i++) { keys[i] = INT_MAX; pre[i] = -1; visited[i]=0; } keys[s] = 0; priority_queue<pair<int, int>, ...
ALGO
0.999996
4.05154
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-11-18T00:21:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ae83e1abeb9...
e3a47391-c6ba-496e-99ce-694b56c8d1a0
Brikaa/problem-solving
contests/assignment-6-dynamic-programming/e/main.cpp
#include <cmath> #include <cstdio> #include <algorithm> #include <unordered_map> #include <cstring> typedef unsigned int ui; typedef unsigned long long ull; const int N = 105; const int D = 1e3 + 5; int n; int total_coins; int coins[N]; std::unordered_map<int, std::unordered_map<int, int>> memo; /* difference = (ri...
ALGO
0.999647
4.021801
{ "github_metadata": { "branch": "main", "commit_count": 132, "repo_created_at": "2024-01-13T16:09: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": "f6de0dfa5c...
ab833855-d6ee-4181-9b57-38e294819260
realharshgautam/Leetcode
925-construct-binary-tree-from-preorder-and-postorder-traversal/construct-binary-tree-from-preorder-and-postorder-traversal.cpp
class Solution { public: TreeNode* constructFromPrePost(vector<int>& preorder, vector<int>& postorder) { int numOfNodes = preorder.size(); return constructTree(0, numOfNodes - 1, 0, preorder, postorder); } private: // Helper function to construct the tree ...
ALGO
0.99994
6.867374
{ "github_metadata": { "branch": "main", "commit_count": 770, "repo_created_at": "2024-03-19T01:18:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4b401eba3...
59d86956-abb2-429d-8921-5274a9bab244
DevPatel3547/CSCE121
Week5/LW/password.cpp
#include <iostream> #include <string> using namespace std; string reverseStr(string str) { int n = str.length(); for (int i = 0; i < n / 2; i++) swap(str[i], str[n - i - 1]); return str; } int main() { string userinput; cout << "Please enter your text input: "; cin >> userinput; ...
ALGO
0.98236
4.361397
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-03-09T07:09:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ac6d3c376daa...
7ab6fc54-3838-4302-9be1-438612524f11
irshadkhan589/gfgSelfPacedDSASolutions
arrays/sortedandRotated.cpp
#include<iostream> #include<climits> using namespace std; bool isIncreasing(int a[], int n){ int minimumGuy=INT_MAX; int indexOfMinimumGuy=0; for(int i=0;i<n;i++){ if(a[i]<minimumGuy){ minimumGuy=a[i]; indexOfMinimumGuy=i; } } bool flag1=true; for(int i=1;...
ALGO
0.999995
4.288111
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2021-07-13T08:56:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4eac81e88d...
02dbc8d6-b384-47a4-b8c6-80a3524fd4f7
gatieme/LeetCode
022-GenerateParentheses/genpare.cpp
#include <iostream> #include <vector> using namespace std; #define __tmain main class Solution { public : vector<string> generateParenthesis(int n) { vector<string> v; generateParenthesis(v, "", n, n); return v; } void generateParenthesis(vector<string> &v, string s, int l...
ALGO
0.999979
5.334049
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2016-01-27T08:11:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc5796d62...
c9430fef-7a46-40d3-99a5-5030cbf82868
ForgotDream/Problemset
Contest/Codeforces/1822/A.cpp
#include <bits/stdc++.h> using i64 = long long; void solve() { int n, t; std::cin >> n >> t; std::vector<int> a(n), b(n); for (int i = 0; i < n; i++) { std::cin >> a[i]; } for (int i = 0; i < n; i++) { std::cin >> b[i]; } int ans = -1, pivot = -1; for (int i = 0; i < n; i++) { if (a[i]...
ALGO
0.999961
5.185705
{ "github_metadata": { "branch": "main", "commit_count": 286, "repo_created_at": "2023-04-20T07:00:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3a9ad76e1...
f8a44a96-a48d-4523-b078-35172414f278
sdpkjc/training
S_tra/19-08-08/a.cpp
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <map> #include <vector> using namespace std; int gcd(int a, int b) { return !b ? a : gcd(b, a % b); } int isp(int n) { if (n < 2) return false; for (int i = 2; i <= sqrt(n); i++) { if (n % i == 0) return false; } return tr...
ALGO
0.999937
4.056181
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-05-03T18:52:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "baf5a5b0a0...
66f2c3d7-c773-47c5-9a33-3ec28931b110
SakibulMowla/competitive-programming-solutions
Root/LOJ/Min Max Roads.cpp
using namespace std; #include "stdio.h" #include "string.h" #include "vector" #include "iostream" #define SZ 101000 typedef long long ll; const ll inf = (1LL<<28); ll n , col[SZ] , par[SZ][20] , L[SZ] , choto[SZ][20] , boro[SZ][20]; struct data { ll to,cost; data(ll p,ll q) { to = p; cost ...
ALGO
0.999557
3.662752
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2020-05-24T23:22:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61adb9e8f...
a139418b-c2fe-4897-a77a-a8c341861b79
Shadowfacts1272/Snek
src/main.cpp
#include <bitset> #include <fstream> #include <stdio.h> #include <utility> #include "uci.h" #include "timer.h" #include "hash.h" #include "history.h" #include "see.h" //g++ -pthread -std=c++17 -Ofast -DNDEBUG -m64 -mpopcnt -flto -static -o C:\Users\kyley\OneDrive\Documents\chess\engines\snek-dev.exe C:\Users\kyley\One...
ALGO
0.999606
4.494356
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-06-23T02:28: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": "bfaa37aadc9...
757372a3-86b2-49f1-8b6f-6c4c15515dad
Sabrina-Akter/All-My-Codes
GeeksforGeeks/Find H-Index.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class Solution { public: // Function to find hIndex int hIndex(vector<int>& citations) { sort(citations.begin(), citations.end()); int mx = 0, n = citations.size...
ALGO
0.996163
5.62698
{ "github_metadata": { "branch": "main", "commit_count": 786, "repo_created_at": "2023-06-28T07:43: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": "ef29027525...
a0f0efd3-fa33-4ba1-9b92-9408d03b0c3e
cms-sw/cmssw
FWCore/Concurrency/test/TestTBB.cc
#include <iostream> #include <stdlib.h> #include "oneapi/tbb/global_control.h" #include "oneapi/tbb/parallel_for.h" #include "oneapi/tbb/blocked_range.h" using namespace tbb; using namespace std; class ArraySummer { int* p_array_a; int* p_array_b; int* p_array_sum; public: // This empty constructor with an i...
ALGO
0.998266
6.129635
{ "github_metadata": { "branch": "master", "commit_count": 251237, "repo_created_at": "2013-06-26T14:09:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1144, "forks": 4480, "issues": 947, "pull_requests": 108 }, "file_meta": { "content_id...
0c2121ab-7b72-45be-9857-24a74f8245ba
DONXUX/algorithm-study
Algorithm/Brainfuck 인터프리터/main.cpp
#include <iostream> #include <cmath> #include <string> #include <algorithm> using namespace std; unsigned char memory[100001]; int stack[4097], loop[4097]; const int MAX = 50000000; int m, c, i; string sc, si; // 점프 포인트를 생성합니다. void setLoop() { int top = -1; for (int i = 0; i < c; i++) { if (sc[i] == '[') sta...
ALGO
0.999931
3.477157
{ "github_metadata": { "branch": "master", "commit_count": 102, "repo_created_at": "2019-10-02T07:53: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": "3253bf7c...
8f4261b2-ebf5-4931-ad3a-c5bca963417e
walker1239/estructura
UVAS/10986uva.cpp
#include <cstring> #include <cstdio> #include <vector> #include <queue> #include <iostream> using namespace std; typedef pair< int, int > pii; const int MAX = 20010; const int INF = 0x3f3f3f3f; vector< pii > G[MAX]; int d[MAX]; void dijkstra(int inicio){ int u, v, i, c, w; priority_queue< pii, vector< pii >...
ALGO
0.99997
3.617514
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2018-12-12T17:47: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": "ef4ddbcd7...
5cb45e5f-1a5e-4e22-b258-838636e9f78f
mongodb/mongo
src/third_party/boost/libs/graph/include/boost/graph/vector_as_graph.hpp
//======================================================================= // Copyright 1997, 1998, 1999, 2000 University of Notre Dame. // Copyright 2006 The Trustees of Indiana University. // Copyright (C) 2001 <NAME> <<EMAIL>> // Authors: <NAME>, <NAME>, <NAME>, <NAME> // // Distributed under the Boost Software Licen...
ALGO
0.988359
6.934311
{ "github_metadata": { "branch": "master", "commit_count": 90314, "repo_created_at": "2009-01-15T16:15:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 27329, "forks": 5655, "issues": 0, "pull_requests": 82 }, "file_meta": { "content_id": ...
d0538144-20ea-499a-a973-321445872a59
Subedi-Nimesh/CS124
a35.cpp
/*********************************************************************** * Program: * Assignment 35, Calculate Grade * <NAME>, CS124 * Author: * <NAME> * Summary: * The following prompts the user for his grades and calculates * the grades and its sign. ****************************************************...
ALGO
0.99002
4.302195
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-07-18T20:39: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": "48405f8bad...
a44b60b6-1b35-4ce8-8e90-19858856a1e6
rohankumardubey/deeplearning4j
libnd4j/include/ops/declarable/helpers/cross.h
/* ****************************************************************************** * * * This program and the accompanying materials are made available under the * terms of the Apache License, Version 2.0 which is available at * https://www.apache.org/licenses/LICENSE-2.0. * * See the NOTICE file distributed wit...
ALGO
0.980869
5.925732
{ "github_metadata": { "branch": "master", "commit_count": 2306, "repo_created_at": "2021-11-28T09:12:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "597c35a...
e5ffac04-8b97-489c-8df7-9478254afb63
mortal123/code-jam
Online Judge/codechef/2013-7/GALACTIK.cpp
#include <cstdio> #include <cstdlib> #include <algorithm> #include <iostream> using namespace std; const int MAXN = 100005; const int inf = 1000000000; int fa[MAXN], Min[MAXN], n, m; int find(int x) { int p = x; while(fa[p] != p) p = fa[p]; while(x != p) { int t = fa[x]; fa[x] = p; x = t; } return p; } ...
ALGO
0.999939
3.384078
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2014-11-28T09:12:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f6221f6d59...
6e81127c-f56f-45ef-aca5-d462b915f826
yorickr/Shiro-Bougyo
Project/HeadTracking.cpp
// // Created by <NAME> on 2016/06/08. // #include "Util.h" #include <thread> #include "HeadTracking.h" using namespace cv; /* Function Headers */ std::vector<Rect> detectFace(Mat frame); CascadeClassifier face_cascade; unsigned int times_updated = 0; HeadTracking::~HeadTracking() { } HeadTracking::HeadTracking...
TOOL
0.914046
4.108662
{ "github_metadata": { "branch": "dev", "commit_count": 418, "repo_created_at": "2016-04-25T19:39:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d5df1da7f68...
b081317b-a8c1-46a0-9a21-b22b46127ce7
RitikTiwary519/Data-Structure-Algorithms-and-Competitive-Programming
contest/cf 1000 div 3/B_Skibidus_and_Ohio.cpp
#include <bits/stdc++.h> #define ll long long #define rsrt sort(v.rbegin(), v.rend()); #define input \ for (ll i = 0; i < n; i++) \ { \ ll x; \ cin >> x; \ v.push_back(x); \ } #define mp make_pair #define ...
ALGO
0.999918
3.944905
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2025-01-11T10:14: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": "897c9fc5289...
70e5b56a-91a2-45f1-bdf9-741fed5a6f55
llvm-mirror/llvm
lib/Support/xxhash.cpp
/* * xxHash - Fast Hash algorithm * Copyright (C) 2012-2016, <NAME> * * BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php) * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistribu...
ALGO
0.954123
6.191824
{ "github_metadata": { "branch": "master", "commit_count": 186941, "repo_created_at": "2012-01-27T23:49:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4612, "forks": 2086, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "...
b37b640b-3b10-425e-a60c-bfc3a3d98be2
felipethome/coding-interview-solutions
src/cpp/binary-tree-symmetry/bst.cpp
/** * Given a binary tree, check whether it is a mirror of itself (ie, symmetric * around its center). * * Example: * 1 * / \ * 2 2 * / \ / \ * 3 4 4 3 * * The above binary tree is symmetric. * But the following is not: * 1 * / \ * 2 2 * \ \ * 3 3 * * Time complex...
ALGO
0.999894
6.420866
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2019-06-09T17:50:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d46b1e6e5...
d9e9dd13-10bc-4cba-8564-2c535c404cbe
sajib21/Competitive-Programming
UVa/1252 - Twenty Questions.cpp
#include<bits/stdc++.h> #define vii vector<int> #define pb push_back using namespace std; int setBit(int mask, int pos) { return mask | (1 << pos) ; } int togBit(int mask, int pos) { return mask ^ (1 << pos) ; } int chkBit(int mask, int pos) { return mask & (1 << pos) ; } void printBin(int n) { if(!n) {cout << 0 ; r...
ALGO
0.999971
3.542944
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2018-07-20T08:27:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ca4667d5...
6d3e24f9-e8e8-4748-b99d-1c49e769a6cb
simonpintarelli/2dBoltzmann
src/grid/grid_tools.cpp
#include "grid_tools.hpp" #include <deal.II/base/exceptions.h> #include <deal.II/grid/grid_tools.h> #include <deal.II/grid/tria.h> #include <deal.II/grid/tria_iterator.h> #include <deal.II/lac/sparsity_pattern.h> #include <boost/lexical_cast.hpp> extern "C" { #include <metis.h> } #include <map> #include <vector> u...
ALGO
0.994296
6.205322
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-03-21T13:28: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": "bcb7c34099...
744870d7-b464-4f45-b617-520a6d42ee7d
pn1137/LeetCode-Exercises
fizz_buzz.cpp
/* Fizz Buzz Write a program that outputs the string representation of numbers from 1 to n. But for multiples of three it should output “Fizz” instead of the number and for the multiples of five output “Buzz”. For numbers which are multiples of both three and five output “FizzBuzz”. Example: n = 15, Re...
ALGO
0.999803
6.764562
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-03-10T22:05: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": "52ed3f520d7e...
444c91b7-09eb-4580-af70-4b22e81aea03
jvm-coder/Hacktoberfest2022_aakash
Python/Roulette/lib/utils/create_combos.cpp
#include<iostream> #include <fstream> // Function to print the output void printTheArray(int arr[], int n, std::ofstream* out) { for (int i = 0; i < n; i++) { *out << arr[i] << ","; } *out << std::endl; } // Function to generate all binary strings void generateAllBinaryStrings(int n, in...
ALGO
0.992145
5.459547
{ "github_metadata": { "branch": "master", "commit_count": 820, "repo_created_at": "2022-09-30T19:07:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 46, "forks": 223, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "de7a3...
78a43818-dfce-4431-9953-b09ae67fe792
WeRiano/Anwill
Anwill/src/physics/collision/PolygonCollider.cpp
#include <limits> #include "PolygonCollider.h" #include "CircleCollider.h" namespace Anwill { PolygonCollider::PolygonCollider(std::vector<Math::Vec2f> vertices) : m_Vertices(std::move(vertices)) {} PolygonCollider::PolygonCollider(const std::vector<Math::Vec3f>& vertices) { for(unsi...
ALGO
0.97379
7.019199
{ "github_metadata": { "branch": "master", "commit_count": 100, "repo_created_at": "2021-06-23T19:23:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "b3a24283...
e5b91cb7-daf5-409b-a480-4564df05522e
RayVeal/C-
string/main.cpp
// ____ __ __ // / / \ / \ // / / / // / \___/ \___/ // // Date: // Name: // Project Description: // Inputs: // Outputs: //************************************************************* #include <iostream> #include <string> #include <fstream> using namespace std; //intro...
TOOL
0.964891
3.772217
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2025-03-27T18:49:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": "212f2c6a3f1a...
3ba1a0e1-4923-45af-b879-3f128dec3dbd
Ruslan749/lab_works_kurse_4
lab_5/C++Lab5/Cryptography.cpp
#include "Cryptography.h" using namespace std; string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя1234567890–-=`~!@#$%^&*()_+<>\"№;%:?*()/|.,«»…\n\f\t "; int keycode(char s) { for (int i = 0; i < alphabet.length(); i++) { if (s ...
TOOL
0.991833
3.668041
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2024-02-13T17:23: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": "c63b1cb3da...
6111075f-da5e-45fd-b385-464bdcf1015a
versenyi98/programming-contests
UVa Online Judge/11835 - Formula 1/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { int G, P; while (cin >> G >> P, G || P) { int results[G][P]; for (int i = 0; i < G; i++) { for (int j = 0; j < P; j++) { cin >> results[i][j]; } } int S; cin >> S; ...
ALGO
0.999828
3.58401
{ "github_metadata": { "branch": "master", "commit_count": 972, "repo_created_at": "2019-04-25T16:11:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28de0757...
87996fcd-0e67-447e-837b-f4808dea2269
KEHyeon/Baekjoon-Algorithm
17485.cpp
#include <bits/stdc++.h> #define ll long long #define X first #define Y second #define pii pair<int,int> using namespace std; int dx[3] = {-1, 0, 1}; int n, m, arr[1001][1001], memo[1001][1001][3]; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cin >> n >> m; for(int i = 1; i <= n; i++) { ...
ALGO
0.999986
3.776192
{ "github_metadata": { "branch": "master", "commit_count": 140, "repo_created_at": "2022-05-18T11:07: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": "8c376601...
1a870c76-7c29-42e7-8064-e4a058aecba6
sdmhans/SnakePk
AIs/OADSnakeAI.cpp
/************************************************************************** Author : <NAME> Date : 2016-08-27 File Name : OADSnakeAI.cpp **************************************************************************/ #include "OADSnakeAI.h" #include "GameStarter.h" #include<memory.h> using namespace std; OADSnakeAI...
ALGO
0.999953
4.571231
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2016-08-28T15:06: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": "db96496c7b...
9b332b95-57a2-4da2-9be5-c9f3c420d1cc
JoshiPrabin/CPP_LEC
Chapter_5_Operator_overloading/binary_op.cpp
#include<iostream> using namespace std; class binary{ private: int a,b; public: binary(){ a=0; b=0; } binary(int x, int y){ a=x; b=y; } binary operator + (binary bin){ binary b1; cout<<"Val...
ALGO
0.983725
5.475342
{ "github_metadata": { "branch": "main", "commit_count": 161, "repo_created_at": "2022-05-04T07:12: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": "65e5545e67...
d508bd18-8a01-4a8e-947a-ef4fa4d4ac22
rajanmalhotra/Code-Samples
C++ Code Samples/Useful Codes/4-1 BalanceTree.cpp
#include <iostream> using namespace std; // Step 1: declare a struct node for tree typedef struct node{ int data; node *left; node *right; }node; // Step 2: create a node for tree node* createnode(int val) { node* newnode = (node*)malloc(sizeof(node)); newnode->data = val; newnode->left = NULL; newnode->righ...
ALGO
0.99979
4.799284
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2012-11-30T00:13:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 17, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "95663fb6c...
ca35a971-a25c-4091-ac4f-0ec55e09232d
Yudha29/Algorithm
Tugas/Tugas-Algo/Tugas-Algo-master/Main.cpp
#include <iostream> using namespace std; //READ ME // case 1 input jumlah element: syarat user harus belum input jumlah element baru bisa input tapi jika user udah input maka tampilkan jumlah elementnya // case 2 input data tiap element: syarat user harus sudah input jumlah element dan belum input tiap data dalam ele...
TOOL
0.986432
4.331682
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-02-24T08:22:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7de8fc751b...
d6f97669-8765-4d3e-a97f-988157d1b6db
texaszn/CS-2315
lab45.cpp
// <NAME> // CS 2315 // Lab 45 #include <cstdlib> #include <cmath> #include <cctype> #include <lab45.h> using namespace std; const bool DEBUG = false; void printDebug(const BigInt&); BigInt::BigInt() { // constructor digits = 0 this->sign = ZERO; this->digits.push_back('0'); ...
ALGO
0.986636
4.265589
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-01-20T03:31:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55553bef95...
ef3716d0-aef7-48e7-9151-04e470b070fd
Sameer-choudhary-git/CPU_scheduling
2K23CS373_CPU.cpp
#include <bits/stdc++.h> #include <fstream> #include <deque> #include <algorithm> #include <iomanip> using namespace std; ofstream outputfile("output.txt"); class Process{ public: string ID; int AT; int Burst; int CT; int TAT; int WT; int Priority; int OriginalBurst; Process(s...
ALGO
0.999822
4.403837
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-11-14T11:34: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": "f0e9d8ac8493...
0c49e8d6-82ae-45ff-9add-202b6da66acd
MLChinoo/mhypbase
src/config.hpp
#pragma once #include "pch.h" #include <SimpleIni.h> #include "util.hpp" namespace config { static CSimpleIni ini; static const char* client_version; static const char* config_channel; static const char* config_base_url; static const char* public_rsa_key; static const char* rsa_encrypt_key; static const char...
CONFIG
0.908911
5.803784
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2023-05-01T18:28:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75d80e2647...
4a325ac3-db00-4e5c-9e1c-58cbc28092e4
shubh11am/Project_Arbeit
WIR/optimizations/constprop/wirconstprop.h
/* This header file belongs to the Hamburg University of Technology (TUHH) WCC Intermediate Representation Framework and is property of its respective copyright holder. It must neither be used nor published even in parts without explicit written permission. Copyright 2015 - 202...
ALGO
0.963538
7.386435
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-03-21T16:27: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": "0e14ffcdf20e...
6df5254c-5b63-4ad6-b53e-2d213ab6cbca
OnComputable/Code-Snippets
14.Interview_Ques/1.Arrays/3/MyTry.cpp
//https://www.geeksforgeeks.org/find-the-number-occurring-odd-number-of-times/ // Find the number occuring odd number of times #include <iostream> // for input output using namespace std; int main(void) { int arr[] = { 5, 7, 2, 7, 5, 2, 5 }; int count = 0, index; int arr_size = sizeof(arr) / sizeof(arr[0]); /...
ALGO
0.999967
5.033581
{ "github_metadata": { "branch": "master", "commit_count": 236, "repo_created_at": "2019-10-27T19:00:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2e3f322...
9408208a-9327-4d99-a966-48b0d62cb0c1
kunal-1908/DSA
CHAR_ARRAY/ReverseWord.cpp
#include<iostream> using namespace std; // Function to reverse individual words in the string void reverseWords(string &s, int n) { int i = 0; // Start index of the word while (i < n) { int start = i; // Mark the start of a word // Move 'i' to the end of the word (until space or end of string...
ALGO
0.999962
5.676838
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-26T16: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": "c9fabd42b7b2...
80a5d03f-9fc5-4aba-8146-c6600c9e9dc0
Millsy242/GeneticRaceAI
Genetic Race/Genetic Algorithm/Chromosome.cpp
// // Chromosome.cpp // // Created by <NAME> on 21/02/2019. // #include "Chromosome.hpp" #include "Helper.hpp" Chromosome::Chromosome() { } void Chromosome::AddGene(int NumberOfGenes, int maxValue, int minValue) { for(int i{0}; i<NumberOfGenes; i++) { dnaLength++; maxvalues.push_back(maxValu...
TOOL
0.953286
4.391938
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-04-17T22:59: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": "8825e357c...
68159158-70e2-4833-a4df-6416faba6709
zcy421593/co_proxy
dns.cc
#include <errno.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <arpa/inet.h> #include <sys/types.h> #include <sys/socket.h> #include <unistd.h> #include "event.h" #include "dns.h" #include "list.h" #include "coroutine.h" #include <assert.h> #include "co_base.h" #include "ut...
WEB
0.909539
3.802977
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2015-12-01T09:30:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed8b0c0a3...
9db216bb-c885-46b4-b323-b1b1fc3a6060
amankumar23429/Data-Structures-and-Algorithm
Graphs/bfs_snakes.cpp
#include<iostream> #include<list> #include<map> #include<queue> #include<climits> using namespace std; template<typename T> class Graph{ map<T, list<T>> l; public: void addEdge(T x, T y){ l[x].push_back(y); } int bfs(T src, T dest){ map<T, int> dist; queue<T> q; ma...
ALGO
0.999851
4.425205
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2020-11-19T17:24:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc7e7a8a2...
d2b96108-a716-4d7f-afa6-8c231e2b2a49
mohsendb7008/Online-Judge-Solutions
Kattis/nineknights.cpp
// Nine Knights #include <bits/stdc++.h> using namespace std; vector<pair<int, int>> v; int main(){ for(int i = 0; i < 5; i++) for(int j = 0; j < 5; j++){ char c; cin >> c; if(c == 'k') v.push_back({i, j}); } if (v.size() != 9){ cout...
ALGO
0.999753
4.240313
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2020-10-07T18:13:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d15f39025...
78f76e55-140d-46a9-bf5d-a7e4b3efbb8d
yhhh777/Graduation-Design
1.h
#ifndef _D #define _D #include <iostream> #include <vector> #include <cstdio> #include <cstdlib> #include <cstring> #include <cassert> #include <ctime> #include <sys/timeb.h> #include <cerrno> #include <unistd.h> #include <csignal> #include <cmath> #include <algorithm> using namespace std; const int MAX_LINE_LEN...
ALGO
0.997994
3.314249
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-03-27T07:38:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0318eb3e39...
c83783db-489a-4ce2-b201-a3e7a30d55e3
Mayank50001/Leetcode-Solved-Questions
Array/Prefix Sum/findPivot-724.cpp
/* Given an array of integers nums, calculate the pivot index of this array. The pivot index is the index where the sum of all the numbers strictly to the left of the index is equal to the sum of all the numbers strictly to the index's right. If the index is on the left edge of the array, then the left sum is 0 because...
ALGO
0.999981
6.565203
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2025-06-24T18:45: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": "171b18c51...
9989908c-4228-4555-8b71-d704f08a77c9
DishenMakwana/competitive-programming
Striver Tree/Check_for_Children_Sum_Property_in_Binary_Tree.cpp
#include "bits/stdc++.h" using namespace std; // Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} TreeNode(int x, TreeNode *left, TreeNo...
ALGO
0.999956
6.150509
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2021-08-19T05:18:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4078337004...
e21b9948-0ab5-47d3-8e46-9eef2b7c7d0f
bhavya-sharma26/300daysofcode
letterCasePermutation.cpp
class Solution { public: void solve(string s,int i,vector<string>&v,string o){ if(i>=s.length()){v.push_back(o);return;} if((s[i]>=65&& s[i]<=91)||(s[i]>=97 && s[i]<=122 )){ solve(s,i+1,v,o+(char)toupper(s[i])); solve(s,i+1,v,o+(char)tolower(s[i])); } ...
ALGO
0.999533
5.44011
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2022-09-14T17:41:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "efa73c4c5d2...
cf19a674-9571-4a1c-bfd5-e046a2533b33
bejphil/Tiger-Acquire
ModeTracker/modetrack.h
#ifndef MODETRACK_H #define MODETRACK_H //C System-Headers // //C++ System headers #include <tuple> #include <vector> #include <map> //Qt Headers // //OpenCV Headers // //Boost Headers // //Project specific headers #include "../Generics/generics.h" #include "mode_track_failure.h" /*! * \brief Base Class for mode tra...
ALGO
0.997318
6.455114
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2017-05-26T01:21: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": "0ea73a38b...
2bae3705-35f2-40e7-9edf-ce2a0c69d57e
Cutecatttt/Data_structure_and_Algorithm
Data structure/Map.cpp
#include <bits/stdc++.h> using namespace std; /* map<key_data_type, value_data_type> map_name Các key trong map là <NAME>, không có 2 key trùng nhau Map duy trì thứ tự các phần tử theo giá trị key tăng dần Map tìm kiếm giá trị key với độ phức tạp O(logN) Map không hỗ trợ truy cập thông qua chỉ số như mảng hay vector,...
ALGO
0.988744
4.628037
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-06-04T06:50: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": "36b07fe02e2...
80c15d2e-82cc-45a6-8e6e-707dfca6b08c
Hinski2/CP
strukturyPrefiksowoSuksowe/BBB/cpp150.cpp
#include <bits/stdc++.h> using namespace std; const int mak = 1e6 + 15; int n; int p, q; int x, y; int wyciag[mak]; int m[mak], s; int pre[mak], pre_min[mak], suf[mak] ; void sufikso_prefiksy() { pre[0] = p; pre_min[0] = INT_MAX; for(int i = 1; i <= n; i++) { pre[i] = pre[i - 1] + wyciag[i]...
ALGO
0.999918
4.160659
{ "github_metadata": { "branch": "main", "commit_count": 799, "repo_created_at": "2023-06-07T17:30: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": "f615833a83...
9aa21b1e-231b-4238-b707-875cd2b86d8b
abeaumont/competitive-programming
kattis/greetingcard.cc
// https://open.kattis.com/problems/greetingcard #include <iostream> #include <unordered_set> using namespace std; typedef long long ll; typedef unordered_set<ll> sl; const ll P = 2147483648LL; int X[12] = {0, 0, 2018, -2018, 1118, 1118, -1118, -1118, 1680, 1680, -1680, -1680}; int Y[12] = {2018, -2018, 0, 0, 1680, ...
ALGO
0.999787
4.487401
{ "github_metadata": { "branch": "master", "commit_count": 2070, "repo_created_at": "2018-01-15T20:00:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 568, "forks": 185, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "cd6...
0b214beb-819c-48d7-8087-78a1e602e228
fmurat17/ITU-Assignments
Assignments/BLG351E-Microcomputer-Lab/exp5/p3.ino
// arr_d and arr_b for the displaying the number on displayers int arr_d[] = {B00010000, B11110000, B00100000, B01100000, B11000000, B01000000, B00000000, B11110000, B00000000, B11000000}; int arr_b[] = {B000, B100, B001, B000, B100, B010, B010, B000, B000, B000}; int co...
ALGO
0.993212
4.561409
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-07-04T23:46:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "f09558dc97...
a632e56b-3c57-4e7a-a622-3763ae7c0339
Mlordx/Maratona
Desafios/Matt/aval1/Codeforces/283-2/D/tennis.cpp
#define INF 1 << 30 #include<algorithm> #include<vector> #include<iostream> #include<cstdio> #include<cstdlib> #include<utility> using namespace std; int N,s,t; int points[100000]; int sum1[100000],sum2[100000],serve1[200010],serve2[200010]; vector< pair<int,int> > matches; int compare2(const void* a, const void* ...
ALGO
0.999873
3.119486
{ "github_metadata": { "branch": "master", "commit_count": 76, "repo_created_at": "2014-04-10T22:05: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": "b001d62fb...
af301e90-b448-478e-9afb-8e775d0cb564
Armaan100/DAA-Lab-Temp
Practice Backtracking Assignment/mcoloring_sol2.cpp
#include<iostream> #include<vector> #include<string> using namespace std; bool find(int node, bool graph[4][4], int m, int n, vector<int> &color){ //base condition if(node == n) return true; // color the node with m color for(int i=0; i<m; i++){ // check if adjacent nodes doesn't ...
ALGO
0.999873
3.868979
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-05-21T09:22: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": "6a2b1a302d1b...
61c6e9c0-d7e9-49ef-9fdd-2b521d586710
microsoft/ALEX
src/benchmark/utils.h
// Copyright (c) Microsoft Corporation. // Licensed under the MIT license. #include "zipf.h" template <class T> bool load_binary_data(T data[], int length, const std::string& file_path) { std::ifstream is(file_path.c_str(), std::ios::binary | std::ios::in); if (!is.is_open()) { return false; } is.read(rei...
ALGO
0.970327
5.214863
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2020-04-03T04:04:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 683, "forks": 125, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "1a833f...
523a62c7-d37c-4687-9dfc-7e1fc565eb80
abhinayh56/Custom-libraries
Diff_drive_unicycle/Diff_drive_unicycle.cpp
#include "Diff_drive_unicycle.h" Diff_drive_unicycle::Diff_drive_unicycle(){ } void Diff_drive_unicycle::set_param(float r_, float L_){ r = r_; L = L_; } void Diff_drive_unicycle::set_v_max(float V_max_){ V_max = V_max_; w_lr_max = V_max/r; W_max = 2.0*V_max/L; } void Diff_drive_unicycle::set_w_...
ALGO
0.998428
5.73914
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-02-14T18:39:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb7775c7b49...
ff395c18-6bcb-4dd3-bc52-dc06b8400ae8
antoniorueda9/SCOTS2FPGA
examples/models/dcdc_bdd/dcdc.cc
/* * dcdc.cc * * created: Jan 2017 * author: <NAME> */ /* information about this example is given in the readme file */ #include <iostream> #include <array> #include <cmath> /* SCOTS header */ #include "scots.hh" /* ode solver */ #include "RungeKutta4.hh" /* time profiling */ #include "TicToc.hh" /* memory...
ALGO
0.999315
6.122678
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-06-03T16:57:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5530d1d71...
849ad5a7-3079-4452-a357-9e698ac607ec
RoCampos/doutorado
sttree/steinertree.h
#ifndef _STEINER_TREE_H_ #define _STEINER_TREE_H_ #include <vector> #include <fstream> #include <iomanip> #include "linkedlist.h" #include "steinernode.h" #include "edge.h" /** * @deprecated * Esta classe representa uma árvore de Steiner. * * * @author <NAME> * @date 07/25/2014 * @version 0.2 */ class Stei...
ALGO
0.92484
3.074538
{ "github_metadata": { "branch": "master", "commit_count": 1318, "repo_created_at": "2018-08-05T14:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c140996...
c11549a4-3f6c-4ad0-b559-52efd4662fc9
jsuisjuan/data-structures-and-algorithms
Faculdade/Computing Algorithm Project/return/chac.cpp
#include <iostream> using namespace std; void imprimeComuns(int v1[], int n1, int v2[], int n2) { int i, j; cout << "Os elementos simultaneos sao: " << endl; for (i = 0; i < n1; i++) { for (j = 0; j < n2; j++) { if (v1[i] == v2[j]) { ...
ALGO
0.997858
5.187428
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2022-04-03T13:17:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a98790f3f...