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
cf069552-e78f-45f8-9c1b-6430f2ca548a
fmejbah/Solve
SPOJ/MST.cpp
/* * Biborno * fb.com/mfmejbah * <EMAIL> * * Graph: Kruskal */ #include <bits/stdc++.h> using namespace std; struct edge { int u, v; long long int weight; bool operator<( const edge& e ) const { return weight < e.weight; } }E[100001]; int id[10001], sz[10001], n, e; void MakeSet( int x...
ALGO
0.99999
4.509511
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-03-08T17:38:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5aa409ae9d...
f7b65060-55d0-4c89-8d60-776a547802dc
prateekgupta2024/Practice-Questions
Palindrome_Pain.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1e9 + 7 int main() { // your code goes here ios_base::sync_with_stdio(false); cin.tie(NULL); int t; cin >> t; while (t--) { ll x, y, d, i, k; cin >> x >> y; if (x % 2 =...
ALGO
0.999924
3.666185
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-07-18T07:39: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": "3d0b3ec10c88...
41b64480-60d8-4fde-9688-1a8544355ed1
AStruthers2000/Computational-Science-Graduate-School
Classes/CS 557 - Computational Intelligence/Project Three/Magic Square/Magic Square/Magic Square.cpp
/* @author: <NAME> @honor-code: I pledge that I have neither given nor received help from anyone other than the instructor or the TAs for all program components included here. */ #include <iostream> #include <vector> #include <algorithm> #include <random> using namespace std; const double...
ALGO
0.999998
6.116696
{ "github_metadata": { "branch": "main", "commit_count": 124, "repo_created_at": "2023-01-19T02:18: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": "6ae111e7df...
90456512-4bff-4471-95ff-d19642dbbb96
TimeDA/TimeDA
dataset/cpp_12_18/gcj2013/Zlobober/2433487_2860486_Zlobober_c.cpp
#include <cstdio> #include <vector> #include <cassert> using namespace std; const int N = 20; vector<int> E[N], iE[N]; int BIT(int msk, int i) { return (msk >> i) & 1; } int L[N]; int A[N], B[N]; int P[N], Q[N]; int DD[2][N]; int fl[N]; int to(int e, int x) { return A[e] ^ B[e] ^ x; ...
ALGO
0.999749
3.924839
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2022-10-24T06:47: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": "2fd6bbe7b1e...
eed01229-4216-4e27-a7c4-3411a3997863
taufique71/sports-programming
uva/11030 - Predator II.cpp
#include <iostream> #include <vector> using namespace std; struct Point { double x; double y; }; vector<Point> compartment; vector < vector<Point> > room; bool insideCompartment(int a, Point p) { int n_vertex = room[a].size(); int j = n_vertex-1; int i; bool result = false; for(i = 0 ; i...
ALGO
0.999307
4.368292
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2018-08-03T09:55: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": "d63d9ea5c...
d9f79dd3-2cb9-48b6-a21a-eb5860457e2d
phuongpham145/codecpp
MangMotChieu/20_TangMang.cpp
/* Bạn được cung cấp một mảng n số nguyên. Bạn muốn sửa đổi mảng để nó tăng lên, tức là mọi phần tử đều lớn ít nhất bằng phần tử trước đó. Trên mỗi lần di chuyển, bạn có thể tăng giá trị của bất kỳ phần tử nào lên một. Số lần di chuyển tối thiểu cần thiết là bao nhiêu? */ #include <bits/stdc++.h> using namespace std;...
ALGO
0.999905
4.637313
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-04-15T14:30: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": "7101d79695fe...
a89f7322-03b6-4209-96b1-b41871c46715
Caspar-Chen-hku/C-practices
score.cpp
/*This program prompts the user to enter a series quiz scores (integer-valued between 0 and 100) and -1 to terminate. After the user enters -1, display the highest score, the lowest score and the average of the scores*/ #include <iostream> using namespace std; int main() { int score=0,count=0; int max=0,min=100...
ALGO
0.970443
3.907376
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2018-01-16T11:26: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": "a417aea5d...
61c2c0d7-d848-4865-b41d-40ba2110ada1
AyVeeKay/ScientificWork
Pandore/pandore/src/operatorsP0/transformation/convolution.h
/* -*- c-basic-offset: 3; mode: c++ -*- * * Copyright (c), GREYC. * All rights reserved * * You may use this file under the terms of the BSD license as follows: * * "Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met...
ALGO
0.966099
6.598599
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2018-12-13T12:43: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": "37052cfb4...
35ab03d0-bf9b-4fcf-b7a0-a92f82aaca6c
R-Cramer4/AdventOfCode
Advent2022/day5/main.cpp
#include <iostream> #include <fstream> #include <iostream> #include <string> #include <vector> int main(){ std::ifstream infile("input.txt"); if(!infile){ return 1; } std::vector<std::vector<char> > crates(9); std::string temp; // input time while(std::getline(infile, temp)){ if(!infile){ std::cout ...
ALGO
0.999795
4.27818
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2023-12-01T16:45: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": "6420258cbb3...
37702950-7765-48d2-8047-2ed610169a9d
codemistic/Data-Structures-and-Algorithms
CPP/String/angramSearch.cpp
#include <bits/stdc++.h> using namespace std; const int CHAR = 256; bool isSame(int a[], int b[]) { for (int i = 0; i < CHAR; i++) { if (a[i] != b[i]) return false; } return true; } bool anagramSeach(string txt, string pat) { int n = txt.length(); int m = pat.length(); ...
ALGO
0.999989
4.801289
{ "github_metadata": { "branch": "main", "commit_count": 1337, "repo_created_at": "2022-09-30T20:57:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 513, "forks": 380, "issues": 51, "pull_requests": 65 }, "file_meta": { "content_id": "a42c...
6f86a3d7-16cf-434d-9ba9-690185121084
MarcelRaschke/pytorch-1
aten/src/ATen/native/GridSampler.cpp
#include "ATen/native/GridSampler.h" #include "ATen/ATen.h" #include "ATen/Device.h" #include "ATen/NativeFunctions.h" #include "ATen/core/Layout.h" #include "ATen/cpu/vml.h" #include "ATen/native/cpu/GridSamplerKernel.h" #include "c10/util/Exception.h" #ifdef _OPENMP #include <omp.h> #endif namespace at { namespace ...
ALGO
0.989188
7.045631
{ "github_metadata": { "branch": "master", "commit_count": 15039, "repo_created_at": "2018-11-16T14:41:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 10 }, "file_meta": { "content_id": "4f67e...
6013baf2-1ead-4350-b52f-810deb6404b2
eunji-lee22/fantastic-telegram
Programmers/20201201~20201206/[HJ]62048.cpp
using namespace std; int getGcd(int w, int h) { if(h > w) w ? getGcd(w, h%w) : h; return h ? getGcd(h, w%h) : w; } long long solution(int w,int h) { long long answer = 1; int gcd = getGcd(w, h); int sw = w / gcd; int sh = h / gcd; int broken = (sw+sh-1) * gcd; answer = (long long)...
ALGO
0.999942
4.405586
{ "github_metadata": { "branch": "master", "commit_count": 116, "repo_created_at": "2020-11-02T13:23:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19df0c55...
cb7daf3a-c04c-4e4c-a406-ba3b338957e5
Xelemental69/McSupreme
Shall_I_Give_You_Dis_Pear/T4_10.cpp
/* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/cppFiles/file.cc to edit this template */ #include <iostream> #include <array> using namespace std; const int PT = 690; typedef array<int, PT> TLista; int main(...
ALGO
0.995362
3.556881
{ "github_metadata": { "branch": "master", "commit_count": 294, "repo_created_at": "2021-10-25T06:49: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": "ce7e842b...
ff6d64ac-7cf4-41a3-b23e-6b41158a17d8
leonard-stormbreaker/leonard-stormbreaker
RungeKuttaSolver.cpp
// // Created by devilox on 11/27/21. // //-----------------------------// #include "RungeKuttaSolver.h" #include <iomanip> //-----------------------------// RungeKuttaSolver::RungeKuttaSolver( uint32_t tDimX, uint32_t tDimY, uint32_t tDimZ, double tDeltaX, double tDelta...
ALGO
0.997681
4.423346
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2021-06-12T14:15:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "f2b95631846...
9c13089a-f617-40c8-a902-d0915fcaff6e
imxood/LearnBase
ccxx/test_compare.cpp
#include <iostream> using namespace std; int main() { string str1("green apple"); string str2("red apple"); string str3("apple"); if (str3.compare("apple") == 0) cout << str3 << " is an apple!" << endl; if (str1.compare(str2) != 0) cout << str1 << " is not " << str2 << endl; ...
TOOL
0.913716
3.354013
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-08-28T02:21: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": "5bcb49fcf4...
276a1035-2649-4cb4-9ae1-d6230cc75b4b
S-Puranik/Experiment-2b
task_4_numswap.cpp
#include <iostream> using namespace std; int main(){ int x,y,z; // Assuming the values of x, y and z to be 1, 2 and 3 respectively. x = 1; y = 2; z = 3; // Using a temporary variable to store values of x, y and z. int x1,y1,z1; x1 = x; y1 = y; z1 = z; /...
ALGO
0.999357
4.774824
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-08-06T07:16: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": "1279750a483...
a24b65fc-72b4-48a8-b666-370f0e82bb66
red23495/UVa-solutions
574_Sum_It_Up.cpp
#include<set> #include<iostream> #include<vector> #include<algorithm> using namespace std; auto comp = [](vector<int> a, vector<int> b){ for(int i = 0; i < a.size() && i < b.size(); i++){ if(a[i] > b[i]) return true; else if(a[i] < b[i]) return false; } if(a.size() < b.size()) return false...
ALGO
0.999703
4.743163
{ "github_metadata": { "branch": "master", "commit_count": 378, "repo_created_at": "2016-10-21T14:23:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0934d2d1...
2deeecdd-ace5-471a-905f-9d97b01ab919
ndt080/UNIVER
semestr 5/Distributed systems [Kondrat'eva, C, C++]/lab2/lab2/Project1/Source1.cpp
#include <windows.h> #include <process.h> #include <stdio.h> #define p 8 // количество дочерних потоков int n = 10000000; // тип параметра, передаваемого функции потока struct SThreadParam { int k; double sum; }; DWORD WINAPI ThreadFunction(LPVOID pvParam) { SThreadParam* param = (SThreadParam*)pvParam; int i, star...
ALGO
0.998889
4.508869
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2021-09-20T18:58:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "350830be24c...
249b1758-ebff-471f-a991-088a167dc002
AshrafShuvo022/red-coder1
B_Burning_Midnight_Oil.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define YES cout << "YES" << endl; #define NO cout << "NO" << endl; #define pb push_back void solve() { ll n, k, ans; cin >> n >> k; ll low = 0, high = n; while (low <= high) { ll divider = 1, total = 0; ll mid = (low + high) / 2; ...
ALGO
0.999948
3.589597
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2025-03-17T01:02:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "055e02ccd47...
b0a263f4-1d45-43af-84e4-d00b0b206181
raincross7/code-similarity
codes/train_code/problem055/problem055_372.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for(int i = 0; i < n; i++) #define rep2(i, x, n) for(int i = x; i <= n; i++) #define rep3(i, x, n) for(int i = x; i >= n; i--) #define elif else if #define sp setprecision #define pb(x) push_back(x) typedef long long ll; typedef long double ld; typedef pai...
ALGO
0.999882
3.833688
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "54655ce6e363...
8654f854-462e-4388-b63a-9b4c3ca22aad
anikxt/DS_Templates_Blaze
Segment Tree/application4.cpp
#include <bits/stdc++.h> #define endl '\n' #define blaze ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0); //======================= using namespace std; //======================= int n; int h[100100], p[100100]; const int N = 1e5; int t[400400]; int merge(int a, int b) { return a + b; } void build(int inde...
ALGO
0.999996
3.700677
{ "github_metadata": { "branch": "main", "commit_count": 75, "repo_created_at": "2021-03-07T10:58:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbe918564b1...
6490e3a2-1cee-4398-8327-696ad6ac3ba8
AndreiDaniDev/Informatica
1794_Aint.cpp
#include <fstream> using namespace std; ifstream in("aint.in"); ofstream out("aint.out"); int n, t, x, q, qx, qy, nods[400002]; ///https://www.pbinfo.ro/probleme/1794/aint ///https://www.pbinfo.ro/detalii-evaluare/51534347 ///https://www.pbinfo.ro/probleme/2090/actualizare-element-minim-interval ///https://www.pbinfo.r...
ALGO
0.999837
4.331858
{ "github_metadata": { "branch": "main", "commit_count": 100, "repo_created_at": "2024-06-17T13:12: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": "b5f0b87cfe...
b3f943aa-056e-4eac-820c-43e72c17fd9c
swetanjal/Competitive-Programming
Codeforces/Solved Problems/1084B.cpp
#include "bits/stdc++.h" using namespace std; long long A[1005]; int N; long long int S; bool chk(long long K) { long long sum = 0; for(int i = 0; i < N; ++i) { if(A[i] < K) return false; else sum = sum + abs(A[i] - K); } if(sum >= S) return true; ret...
ALGO
0.999975
3.881663
{ "github_metadata": { "branch": "master", "commit_count": 177, "repo_created_at": "2018-04-06T10:31:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fbf62ab...
1f7f633d-82bb-45cd-879a-d81ee4e85e5a
jacob-corletto/Sorting_by_pointers
sortpointers.cpp
//===========================License======================================================================== //Program name = "Sort by Pointers". This program will take in an array and store them in malloc. The program will then sort the array of pointers by value. //Copyright (C) 2023 <NAME> // //This file is part of ...
ALGO
0.999386
4.35461
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-10-02T21:05:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "086366a7713...
8c4139a5-8da4-457c-a4de-1f566cfcfcca
BahadirAydin/advent-of-code-2021
day18/day18_B.cpp
#include <fstream> #include <vector> #include <algorithm> #include <iostream> #include <stack> #include <cmath> typedef std::vector<std::pair<int,int>> vectorOfPairs; void print(const vectorOfPairs &v ){ for(std::pair<int,int> pair : v){ std::cout << pair.first << ", depth: " << pair.second << std::endl; } }...
ALGO
0.999781
5.060544
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2022-07-15T21:44: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": "96e7e3335ca...
d6968071-4534-4190-b647-6052e698c5b6
Ysofun/LeetCode
LeetCode/0975.h
#pragma once #include <vector> #include <stack> #include <algorithm> using namespace std; class Solution { public: struct NumData { int idx; int val; NumData(int _idx, int _val) : idx(_idx), val(_val) {} }; void JumpNext(vector<int>& next, vector<NumData>& arr) { s...
ALGO
0.999931
4.651659
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2022-04-15T08:14: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": "35bda659a...
1ecd2cc5-07c1-427e-91c4-e94c8cbe978a
mirror12k/my-project-euler-stuff
vectored_bigint.cpp
#include "vectored_bigint.hpp" vectored_bigint::vectored_bigint() : vector<char>() {} // creates a biging from the given integer vectored_bigint::vectored_bigint(int value) : vector<char>() { while (value > 0) { this->push_back(value % 10); value /= 10; } } // reads a string of digits a...
ALGO
0.921046
5.350649
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2017-02-15T22:40: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": "99dce0514...
7891eec8-18e7-4d5b-95a6-a6beec922289
ZhouYuantian/ZhouYuantian_CIS5_40137
Hmwk/Assignment_2/2Bproj5/main.cpp
/* * File: main.cpp * Author: Dr. <NAME> * Created on January 2, 2019, 12:36 PM * Purpose: Creation of Template to be used for all * future projects */ //System Libraries #include <iostream> //Input/Output Library #include <iomanip> #include <math.h> using namespace std; //User Libraries //Globa...
ALGO
0.910899
5.25203
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-01-04T03:55: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": "c2e69b6574...
dbe8d037-51c4-4a0e-b357-c2e8f124fcf0
jcastaneda30/ExerciseAlgorithms
Guide/2/2_2_1.cpp
//Subset de un supuesto gran vector en el cual se generan todos los posibles. #include <iostream> #include <vector> using namespace std; vector<int> subset; // Vector para almacenar los elementos del subconjunto vector<vector<int>> sett; // Vector para almacenar los elementos del subconjunto void printVectorOfVectors...
ALGO
0.998954
5.467191
{ "github_metadata": { "branch": "main", "commit_count": 82, "repo_created_at": "2023-03-16T13:57: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": "5635b47b6db...
e3417218-ec07-49d5-bd3d-77871282b375
dodouwang/leetcode
24.swap-nodes-in-pairs.cpp
/* * [24] Swap Nodes in Pairs * * https://leetcode.com/problems/swap-nodes-in-pairs/description/ * * algorithms * Medium (39.07%) * Total Accepted: 210.5K * Total Submissions: 538.5K * Testcase Example: '[]' * * * Given a linked list, swap every two adjacent nodes and return its head. * * * * Fo...
ALGO
0.999952
6.098497
{ "github_metadata": { "branch": "master", "commit_count": 323, "repo_created_at": "2018-03-20T04:46: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": "deccecdc...
20138975-4cab-4678-9343-3c62d366214a
SahithKonakalla/Velocity-Control
Velocity_Control_Test1/src/Commands/DriveForward.cpp
#include "DriveForward.h" #include <iostream> #include <cmath> #include <ctime> using namespace std; DriveForward::DriveForward(double _setpoint) : setpoint(_setpoint), velocityCont(new VelocityController(setpoint)){ time1 = 0; time2 = 0; velocity = 0; position_avg=0; Requires(drive); } void DriveForward::In...
TOOL
0.987143
5.063333
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-11-28T00:21: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": "3425a2e7c6...
46aa36ea-d2bb-4810-b19a-de6f3e2491dc
skysumitkumar/DSA_Codes
91_Tree_implementatinon.cpp
#include<iostream> using namespace std; class Node { public: int data; Node* left; Node* right; Node(int data) { this->data=data; left=NULL; right=NULL; } }; //make a node pointer function to return the root node Node* makeTree() { //make varible to store the data...
ALGO
0.998847
3.834503
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-06-11T11:30:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e422d5b8549...
c9891864-465c-41ec-b214-e5b953176fdd
autodyne/dusk
test/hpmm/hpmm.plot.cpp
/********************************************************************* * dusk - lightweight workstealing scheduler * * Copyright (C) 2015 http://pafelog.net. * All rights reserved. * * See LICENSE for details. *********************************************************************/ #include <cmath> #include <cst...
ALGO
0.910043
3.976824
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-04-11T12:51:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ec3c642eed...
aa6efbe9-0999-4d88-a2d0-6c4338293117
Suwren/chess
src/move.cpp
#include "move.h" #include "picture.h" int missionFlag = 0;//串口屏给的任务编号 int missionChess = -1;//从串口屏获得的要移动棋子的编号0-9 int rect_code = -1;//从串口屏获得的要移动到的位置编号0-8 int ischessput = 0;//从串口屏获得的人是否落子 int exitinput = 0; int calx=0; int caly=0; char board[COL][ROW]={0}; Point chessposition[10]= { Point(1899,1905),//0 Point(1899,...
TOOL
0.963178
3.726601
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-07-30T14:48: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": "a9abb729c3...
40d219ca-192c-4e76-a4d7-94ddb498b9f5
rahmaabdelhamid6/EmbeddedLinux
02-C++Tasks/12 -Even and Odd Numbers Finder/main.cpp
#include <iostream> #include <vector> #include <valarray> #include <algorithm> void findEvenOdd(std::valarray<int> arr, int size, std::vector<int>& evenNumbers, std::vector<int>& oddNumbers) { for (int i = 0; i < size; ++i) { if (arr[i] % 2 == 0) { evenNumbers.push_back(arr[i]); } else...
ALGO
0.997288
5.631482
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-12-30T13:16: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": "ec0a5a8e971...
52e07de4-4820-4a08-becf-3e1717269643
eagarcao/Repositorio-Informe-Algoco
Sorting/QuickSortRandom.cpp
// REFERENCIA : https://www.geeksforgeeks.org/cpp-program-for-quicksort/ #include <iostream> #include <vector> #include <chrono> #include <fstream> #include <random> using namespace std; // Inicializa generadores de números aleatorios random_device rd; mt19937 gen(rd()); // Función que realiza la partición del vecto...
ALGO
0.999897
5.865832
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-11T00:04: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": "4cd2806ea704...
2e2709d0-1cce-4840-9e6b-2bef63779b05
arangodb/arangodb
3rdParty/boost/1.78.0/boost/msm/mpl_graph/breadth_first_search.hpp
// Copyright 2008-2010 <NAME> // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_MSM_MPL_GRAPH_BREADTH_FIRST_SEARCH_HPP_INCLUDED #define BOOST_MSM_MPL_GRAPH_BREADTH_FIRST_SEARCH_HPP_INCLUDED #include <...
ALGO
0.992148
6.543282
{ "github_metadata": { "branch": "devel", "commit_count": 51986, "repo_created_at": "2011-10-26T06:42:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13878, "forks": 857, "issues": 743, "pull_requests": 38 }, "file_meta": { "content_id": ...
b58a7b5a-9af9-4c5b-bb75-22ac1efc5e49
ethanChou/demo
src/CLR-CPP/EfficiencyNativeCPPDLL/EfficiencyNativeCPPDLL.cpp
// EfficiencyNativeCPPDLL.cpp : 定义 DLL 应用程序的导出函数。 // #include "stdafx.h" #include "EfficiencyNativeCPPDLL.h" #define WIN32_LEAN_AND_MEAN // 从 Windows 头文件中排除极少使用的信息 #include <windows.h> #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> EfficiencyNativeCppDll::Eff...
ALGO
0.997231
5.458967
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-01-13T09:48:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d20702e7...
ba601ef9-8bc7-4092-a67b-7fdc70b84f23
Bungmint/competitiveprogramming
contest/codeforces/1659/1659D.cpp
// Problem: Reverse Sort Sum // Contest: Codeforces // URL: https://m1.codeforces.com/contest/1659/problem/D // Memory Limit: 256 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://cpeditor.org) //Copyright © 2022 <NAME>. All rights reserved. #pragma GCC optimize("O3") #pragma GCC target("avx2") #include <...
ALGO
0.999988
3.837574
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2021-02-28T11:36: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": "143aaaa6d...
ef226715-2865-4d9f-ac98-9ca4b4ef7c7b
SudShekhar/Programming
codeforces/ToCheckPaka.cpp
//Template //Question - D of round 179 Div 2 - greg and graph // By Anudeep :) //Includes #include <vector> #include <queue> #include <map> #include <set> #include <utility> //Pair #include <algorithm> #include <sstream> // istringstream>> ostring stream<< #include <iostream> #include <iomanip> //setbase - cout << ...
ALGO
0.999816
3.131336
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2014-12-12T16:36: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": "28653bb2f0...
d3cbb7f4-dcea-4708-9d08-2fc24ea7ccca
ngthanhtrung23/CompetitiveProgramming
codeforces/100482/E.cpp
#include <bits/stdc++.h> using namespace std; #define FOR(i,a,b) for(int i=(a),_b=(b); i<=_b; i++) #define FORD(i,a,b) for(int i=(a),_b=(b); i>=_b; i--) #define REP(i,a) for(int i=0,_a=(a); i<_a; i++) #define EACH(it,a) for(__typeof(a.begin()) it = a.begin(); it != a.end(); ++it) #define SZ(S) ((int) ((S).size())) #d...
ALGO
0.999983
3.785574
{ "github_metadata": { "branch": "master", "commit_count": 4554, "repo_created_at": "2019-04-04T14:21:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 90, "forks": 17, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05e0a...
78793efb-428e-4790-abee-4ef08ab0530a
rasyid1003/Codingan-Cpp
Menubitswise.cpp
#include <iostream> using namespace std; int main() { //farisrasyid //50421483 int pilihan; int a, b, temp1, temp2, temp3, temp4; int i, j, baris; cout<<"Menu Nama kalian"<<endl; cout<<"1. Operasi Bitwise"<<endl; cout<<"2. Segitiga Siku - Siku "<<endl; cout<<"Masukan Pilihan ...
TOOL
0.932691
3.379518
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2022-11-13T14:44:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bbca82d908c...
52cfdf48-c2ac-4512-a9e0-79ffde9702ea
gracygulati7/Codes
linked list/delete_at_k.cpp
//! updation at kth positio in singly linked list #include <iostream> using namespace std; class node{ public: int val; node* next; node(int data){ val=data; next=NULL; } }; void insertathead(node* &head,int val){ node* new_node=new node(val); new_node->next=head; head...
ALGO
0.999877
5.405073
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2023-09-19T03:50: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": "544e9bc0ff7...
6a606345-fe9f-456c-ae06-f039659b9060
gurcks8989/CodingTest
BaekJoon/P02475.cpp
/* 검증수 문제 출처: https://www.acmicpc.net/problem/2475 컴퓨터를 제조하는 회사인 KOI 전자에서는 제조하는 컴퓨터마다 6자리의 고유번호를 매긴다. 고유번호의 처음 5자리에는 00000부터 99999까지의 수 중 하나가 주어지며 6번째 자리에는 검증수가 들어간다. 검증수는 고유번호의 처음 5자리에 들어가는 5개의 숫자를 각각 제곱한 수의 합을 10으로 나눈 나머지이다. 예를 들어 고유번호의 처음 5자리의 숫자들이 04256이면, 각 숫자를 제곱한 수들의 합 0+16+4+25+36 = 81 을 10으로 나눈 나머지인 1이 검증수이...
ALGO
0.999765
5.0761
{ "github_metadata": { "branch": "master", "commit_count": 199, "repo_created_at": "2020-07-31T02:42: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": "e388302f...
578c8d1c-0617-4190-8056-9dc5650c645d
vbonnici/grafe-sim
analysis/data/p01140/s614881299.cpp
#include <iostream> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define vec vector int main(void) { while(1) { int n, m; cin >> n >> m; if (n == 0) break; vec<int> h(n + 1), w(m + 1); h[0] = 0; w[0] = 0; rep(i, n) { int l; cin >> l; h[i + 1] = h[i] + l...
ALGO
0.999922
3.006372
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-07-10T13:21: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": "75a8e6f3d0a...
c7ec9cc2-7c82-4c7d-8511-15eb74da91a4
Hume-Fogg-Science-Olympiad/Electric-Vehicle
Demo4/Demo4.ino
#include <avr/wdt.h> #include "DeviceDriverSet_xxx0.h" #include "ApplicationFunctionSet_xxx0.cpp" DeviceDriverSet_Motor AppMotor; Application_xxx Application_ConquerorCarxxx0; MPU6050_getdata AppMPU6050getdata; int time1 = 0; int time2 = 0; ConquerorCarMotionControl status = Forward; int distance = 850; //IN CENTIMET...
TOOL
0.958991
5.515287
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-28T02:37:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5f5826cd0c96e...
799e434e-3f97-4622-8840-9a2fd660e416
byandell-sysgen/qtl2ggplot
src/arrange_genes.cpp
// arrange_genes, helper function for plot_genes // // take vectors (start, stop) and return y values in {1, 2, ...} // so that the genes won't overlap #include "arrange_genes.h" #include <Rcpp.h> using namespace Rcpp; // [[Rcpp::export]] IntegerVector arrange_genes(const NumericVector& start, ...
ALGO
0.969769
5.067431
{ "github_metadata": { "branch": "master", "commit_count": 299, "repo_created_at": "2016-10-28T18:06:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "446947ccd...
07683b5f-eb16-4344-8cd2-465044422ad9
smv1999/CompetitiveProgrammingQuestionBank
Arrays/Rotate Array (LeetCode)-Top Interview Que-Easy Level.cpp
class Solution //Solution Class { public: void rotate(vector<int>& nums, int k) //function for shifting the elements { int n = nums.size(); //assign size of array int start = n - k % n; //starting from first element int remainder = k % n; //to move to next index ...
ALGO
0.99993
5.780759
{ "github_metadata": { "branch": "master", "commit_count": 1413, "repo_created_at": "2020-04-15T13:06:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1251, "forks": 358, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd...
55877361-eac8-4e85-8ffc-2b78a081a8bf
mun9769/CodingTest
백준/Gold/12100. 2048 (Easy)/2048 (Easy).cc
#include <iostream> #include <algorithm> #include <vector> #include <queue> #include <iomanip> using namespace std; #define ii pair<int, int> #define INF 987654321 int n; int ans; vector<vector<int>> board; // 0 UP // 1 DOWN // 2 LEFT // 3 RIGHT void move(vector<vector<int>>& b, int dir) { // RIGHT if(dir == 3)...
ALGO
0.999963
4.268097
{ "github_metadata": { "branch": "main", "commit_count": 563, "repo_created_at": "2022-04-21T03:31: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": "0a21104c80...
57acd669-ee34-4439-a5c9-792528f74260
johnathan79717/competitive-programming
CodeChef/JULY15/EASYEX/main.cc
#include <string> #include <vector> #include <climits> #include <cstring> #include <map> #include <queue> #include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <set> #include <deque> #include <stack> #include <cassert> using namespace std; #define FOR(i,c) for(__typeof((c).begin()) i=(c)....
ALGO
0.999871
3.557542
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2016-04-07T07:50:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "021964208...
f4466326-28ba-482c-9e3b-f21ad3cfabdf
Simandhar14/LeetCode-Daily
2594.c++
class Solution { public: long long result = LLONG_MAX; bool check(vector<int>& rank, int totalcars, long long minutes) { int repairedcars = 0; for (int i = 0; i < rank.size(); i++) { int cars = sqrt(minutes / rank[i]); repairedcars += cars; if (repairedcars >=...
ALGO
0.999976
5.466045
{ "github_metadata": { "branch": "main", "commit_count": 193, "repo_created_at": "2024-10-20T07:58: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": "96c016b355...
27f4a13a-2028-412a-99ab-1eb4aa04416e
reddyp4/GeneralCoding
Embedded/Problems/Q2_Assignment_Embedded.cpp
/* Define a pointer to an int, pointer to a pointer to an int, an array of 10 int pointers, pointer to an array of 10 ints, pointer to a function which returns an int and takes an int as an argument. Consider the following: Associativity and precedence rules Storing addresses of data locations with an index Impleme...
ALGO
0.952521
3.565998
{ "github_metadata": { "branch": "main", "commit_count": 556, "repo_created_at": "2022-02-12T15:12: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": "7cb72d5d82...
ebc083a0-9746-456b-b0b9-64ccd4a0bc06
akhikolla/ClusterTests
Bioi/src/find_min_dists_cpp.cpp
#include <Rcpp.h> using namespace Rcpp; #include<cmath> //' @title For all points in matrix 1, return the distance to and index of the //' nearest point in matrix 2. //' //' @description //' Find the shortest distance between each point in one data set and the points //' in a second set. //' //' This function determi...
ALGO
0.999839
6.116655
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-09-14T19:09:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5628cdf041...
16b6805a-bd30-4983-8476-daf0e5201f2b
PaShampusik/BSUIR
1-3 sem/C++ 1 sem/Lab 2/Lab_2/task_12/task_12.cpp
#include <iostream> #include <cmath> using namespace std; int main() { double x1, x2, y1, y2, r, R; cout << "enter coordinate x1: "; cin >> x1; cout << "enter coordinate y1: "; cin >> y1; cout << "enter radius r: "; cin >> r; cout << "enter coordinate x2: "; cin >> x2; cout << "enter coordinate y2: "; ci...
ALGO
0.998855
3.704719
{ "github_metadata": { "branch": "main", "commit_count": 199, "repo_created_at": "2022-02-24T05:50:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "249bc00349...
eed7a6b1-bba0-4029-a844-23719cddad31
ishandutta2007/codeforces-x
xyf007/normal/256/E.cpp
#include <algorithm> #include <cstring> #include <iomanip> #include <iostream> #include <numeric> constexpr int kMod = 777777777; int add(int a, int b) { return (a + b) % kMod; } template <typename... Args> int add(int a, int b, Args... args) { return add(add(a, b), args...); } int sub(int a, int b) { return (a + kMo...
ALGO
0.999938
4.011095
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:38: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": "7234fcce744f...
aac21f3c-3701-4cca-88b6-606b0bbf15dd
kekesh/Algorithms
USACO/Training_Pages/Chapter_1/palsquare.cpp
/* ID: ekfrmd1 LANG: C++ TASK: palsquare */ #include <math.h> #include <string.h> #include <algorithm> #include <fstream> #include <iostream> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typedef long long ll; typedef pair<int, int> pi; void init(); void solve(); vecto...
ALGO
0.999875
3.333258
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2019-01-02T00:36: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": "d1912465b...
09c666cc-6c2a-47c2-9557-bee981f8e945
vfolunin/archives-solutions
Kattis/secretchamber.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> using namespace std; int main() { freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); int edgeCount, queryCount; cin >> edgeCount >> queryCount; vector<vector<int>> reachab...
ALGO
0.999993
5.097786
{ "github_metadata": { "branch": "master", "commit_count": 2367, "repo_created_at": "2017-11-27T10:19:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 5 }, "file_meta": { "content_id": "b4fd5fb...
9bc78ea8-6bce-46a9-8a6b-87f2cbda7bf6
lcrowder/spheroidal_cpp
include/yawg/fft.h
#ifndef YAWG_FFT_H_ #define YAWG_FFT_H_ #include <yawg/core.h> namespace gsl { //! \brief Compute in-place fft of a gsl::(c)vector gsl::cvector fft(gsl::cvector &&x); //! \brief Compute fft of a gsl::(c)vector gsl::cvector fft(const gsl::cvector &x); //! \brief Compute in-place inverse fft of a ...
ALGO
0.993222
6.859339
{ "github_metadata": { "branch": "main", "commit_count": 191, "repo_created_at": "2023-03-28T02:44:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7f4ef1457...
5ec7e661-1ca7-4613-90c9-99da69d1e5d4
ishandutta2007/codeforces-a
aarr/normal/741/B.cpp
#include <iostream> #include <vector> using namespace std; vector<int> adj[1005]; pair<int, int> a[1005]; int mark[1005]; vector<int> part[1005]; int nparts = 1; int dp[1005][1005]; void dfs(int v) { if(mark[v] != 0) { return ; } mark[v] = nparts; for(int i = 0; i < adj[v].size(); i ++) { dfs(adj[v][i]); ...
ALGO
0.999985
3.626906
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e883fa0ddc69...
ab0123a3-a11f-47f3-b7c5-723292505812
ishandutta2007/codeforces-t
tzc_wk/normal/1375/G.cpp
#include <bits/stdc++.h> using namespace std; #define fi first #define se second #define fill0(a) memset(a,0,sizeof(a)) #define fill1(a) memset(a,-1,sizeof(a)) #define fillbig(a) memset(a,63,sizeof(a)) #define pb push_back #define ppb pop_back #define mp make_pair #define mt make_tuple #define eprintf(...) fprintf(stde...
ALGO
0.998497
3.814082
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86b5f0129e10...
4b803273-e2cd-4b33-aa73-db98bb5354a0
MAHASIN1999/Memory-Management-Technique
main.cpp
#include <chrono> #include <iostream> #include "data_generator.h" #include "paging_system.h" #include "non_paging_system.h" using namespace std::chrono; struct Stats{ int numHits; int numPageFaults; long long duration; double hit_ratio; double page_fault_rate; }; void simulate(Stats &stats,int numRe...
ALGO
0.994154
6.306419
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-05-03T06:19: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": "d08004e4dab5...
b9b4a9dc-7008-46fb-9318-d267bae33001
waka-lab/IMathLib
example/main.cpp
/*#include <IMathLib/IMathLib.hpp> //ローレンツ方程式の定義 static double p = 10, r = 28, b = 1; double __f1(double t, double x, double y, double z) { return -p * x + p * y; } double __f2(double t, double x, double y, double z) { return -x * z + r * x - y; } double __f3(double t, double x, double y, double z) { return x * y - b...
ALGO
0.96612
3.505055
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2019-07-17T07:34: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": "c7610910a...
088fab98-0acc-46de-b32c-a8bdb5a95161
martbudr/Olimpiada-Informatyczna
14oi_meg.cpp
#include <bits/stdc++.h> using namespace std; const int N_MAX = 250001; const int p = 19, LISC = 1 << (p-1); int n; vector<int> sas[N_MAX]; // synowie kazdego z wierzcholkow w drzewie wejsciowym int pre_ord[N_MAX], // numer wierzcholka w preorderze pod[N_MAX], // ile potomkow kazdego z wierzcholkow gleb[N_MAX...
ALGO
0.999958
4.027494
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-11-27T01:17: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": "27a382d90ce...
1e1ff7ee-c064-462a-a6ad-6cb2fa1267cb
Boyle-Lab/SEMpl
src/findMaximumAverageSignalWrapper.cpp
#include "iterativeSEM.hpp" #include "common.hpp" #include <cstdlib> #include <string> #include <vector> #include <cmath> #include <sstream> using namespace std; // REQUIRES: appropriate accumSummary_data is filled in // corresponding to type // EFFECTS: Reads in the data from filterDnaseWrapper // ...
ALGO
0.988709
4.855467
{ "github_metadata": { "branch": "master", "commit_count": 497, "repo_created_at": "2016-11-09T18:51:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4a0583a...
100ea625-051a-4fda-a389-2744adb16fb2
dhirajpatil2346/compitative
cf 1600/the_morning_star.cpp
#include <bits/stdc++.h> using namespace std; #define LL long long #define endl "\n" void solve() { LL n; cin >> n; map<LL, LL> diff, x, y; vector<pair<LL, LL>> vp[4]; LL z = 0, eq = 0; for (int i = 0; i < n; i++) { int a, b; cin >> a >> b; if (a == 0 && b == 0) ...
ALGO
0.999724
3.968021
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2022-09-28T12:31: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": "c60e9b35e3b...
581e4b69-b6a2-49e8-b712-f073e854fe33
kamyu104/LeetCode-Solutions
C++/array-transformation.cpp
// Time: O(n^2) // Space: O(n) class Solution { public: vector<int> transformArray(vector<int>& arr) { while (is_changable(arr)) { auto new_arr = arr; for (int i = 1; i + 1 < arr.size(); ++i) { new_arr[i] += int(arr[i - 1] > arr[i] && arr[i] < arr[i + 1]); ...
ALGO
0.999997
5.687609
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
9aef3e00-346d-4f67-bb0f-41b8144cc870
brunob45/INF1995
commun/projet/exec_projet/projet.cpp
/************************* BRANCHEMENTS ************************** * * * ROUES ENABLE -> PORTD 5,6 DIRECTION -> PORTD 3,4 * * PIEZO PORTD7,8 * * DEL (+) -> PORTA1 (-) -> PORTA2 * * ProgEn VCC -> PINA8 * *****************************************************************/ #include "projet.h" ...
TOOL
0.963081
4.382993
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-02-28T14:23: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": "c1c2108bc1...
4f020d70-9589-4874-bc26-e2b8758980c0
amsword/gkmeans
c_code/utilitydll/utility_math_matrix.h
#pragma once #include <string> #include "utility_macro.h" #include "utility_math_vector.h" #include "utility_math_imatrix.h" #include "utility_math_basic.h" using namespace std; namespace utility { template < class T > class Matrix : public IMatrix<T> { public: Matrix() :IMatrix<T>(), m_ppData(NULL), m_isOwnDat...
TOOL
0.984867
4.254023
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2015-04-08T06:53:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "120a5bd961...
e0d3c48f-10ef-47b9-a6b8-81500616c938
adalbertwallace/CppTools
Graph/src/graph.cpp
#include <optional> #include "common.hpp" #include "node.hpp" #include "edge.hpp" #include "graph.hpp" #include <unordered_map> #include <memory> #include <vector> #include <functional> #include <iostream> #include <algorithm> #include <sstream> #include <stack> Graph::Graph(){ currentNode = 1; } ...
ALGO
0.99052
5.695084
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2025-05-02T22:29:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "34c644bd18e...
7d6a125f-f615-41be-8fe4-3538eaf0503e
moondemon68/cp
Codeforces/PastContests/1348/C.cpp
#include <bits/stdc++.h> #define fi first #define se second #define pb push_back #define mp make_pair #define MOD 1000000007 #define INF 1234567890 #define pii pair<int,int> #define LL long long using namespace std; int main () { //clock_t start = clock(); ios_base::sync_with_stdio(false); cin.tie(NULL); ...
ALGO
0.999997
3.791169
{ "github_metadata": { "branch": "master", "commit_count": 184, "repo_created_at": "2018-09-17T12:29: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": "58427d72...
a7fe7e15-1bc0-4b22-9b76-77246093d8e5
rajesh-1920/Competitive_Programming_Problem_Solve
Codeforces/A_Strange_Splitting.cpp
// Author: <NAME> // Date : 09.06.2024 #include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef unsigned long long int ull; //----------------------------(definition section)------------------------------------- #define N 2000009 #define MOD 1000000009 #define fi first #define sc second #defi...
ALGO
0.999904
3.823533
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2024-02-29T16:35: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": "eb194139099...
9797a6e1-7076-4bb7-8e53-09c63d505e80
jarusified/Incremental-aff-cpd
ipca_aff_cpd.cpp
#include "ipca_aff_cpd.hpp" #include <iostream> IPCAAFFCPD::IPCAAFFCPD(double const alpha, double const eta, int const burnInLength, double incPCAForgettingFactor) : AFFChangeDetector(alpha, eta, burnInLength) { incPCA = IncPCA(1, incPCAForgettingFactor); signFlips = Eigen::VectorXd::Cons...
ALGO
0.981809
6.673627
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-05-06T05:07:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9342dd0045...
caf23f26-34c3-43a3-acad-4e065d7059e3
Anathapindika/fermant
Ant_ii/Ant.cpp
#include "Fermant.h" Ant::Ant(void) { x = 5; y = 5; temp_x = 5; temp_y = 5; dir_x = 0; dir_y = 0; time_walk= 0; time_reach = 0; food = false; length = 0; manh_x = 0; manh_y = 0; } Ant::~Ant(void) { } void Ant::show_coordinates(){ cout<<"X-Value: "<<x<<endl<<"Y-Value: "<<y<<endl; }; int Ant::rgos(G...
ALGO
0.999069
3.815561
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2014-03-19T11:49:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d8dc71d08...
5909cb97-422a-468c-8d1f-6fb0c67f79ea
pytorch/nestedtensor
nestedtensor/csrc/ReduceOps.cpp
#include <ATen/WrapDimUtilsMulti.h> #include <ATen/core/op_registration/op_registration.h> #include <nestedtensor/csrc/nested_tensor_impl.h> #include <torch/library.h> #include <algorithm> #include <array> #include <functional> #include <iostream> namespace at { using namespace torch::nested_tensor; Tensor NestedTen...
TOOL
0.984136
6.651166
{ "github_metadata": { "branch": "master", "commit_count": 412, "repo_created_at": "2019-10-23T22:04:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 251, "forks": 27, "issues": 44, "pull_requests": 5 }, "file_meta": { "content_id": "0ff5a...
38ff542b-aa52-4d35-9d43-173d3dfe7676
Schr0Smi1ey/GeekForGeeks
Graph/Level_of_nodes.cpp
#include<bits/stdc++.h> using namespace std; class Solution { public: //Function to find the level of node X. int nodeLevel(int n, vector<int> adj[], int x) { bool visited[n]; memset(visited,false,sizeof(visited)); queue<int> q; q.push(0); visited[0] = true; int level = 0; while(...
ALGO
0.999966
5.12269
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2023-08-04T15:09: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": "4899c33b824...
9009e472-4dfd-4731-9453-2eeee2654d69
alejobaenam/Competitive-Programming
USACO/2. Bronze/Complete Search (brute force)/Basic/WhyDidtheCowCrosstheRoadII.cpp
// #pragma GCC optimize("Ofast") // #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma") // #pragma GCC optimize("unroll-loops") /* #include <complex> #include <queue> #include <set> #include <unordered_set> #include <list> #include <chrono> #include <random> #include <iostream> #include <algorith...
ALGO
0.999726
3.484227
{ "github_metadata": { "branch": "main", "commit_count": 79, "repo_created_at": "2023-01-22T23:04: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": "e598f1fcb61...
497be85f-db2e-41bc-9faa-17b79dee9412
SpM-lab/irbasis
sample/step_by_step_examples.cpp
#include <iostream> #include <vector> #include "irbasis.hpp" double rho_omega_metal(double omega) { return (2/M_PI) * std::sqrt(1-omega*omega); } int main() { double beta = 100.0; double wmax = 1.0; double Lambda = wmax * beta; irbasis::basis b = irbasis::load("F", Lambda, "./irbasis.h5"); in...
ALGO
0.981089
4.974909
{ "github_metadata": { "branch": "master", "commit_count": 318, "repo_created_at": "2018-06-05T00:33:11.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 18, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "861afef9...
1feb247b-05cd-4905-960d-9dc6bbb0d3cf
why78901/Algorithm-vs-
vs2013/Project1/Project1/HeapSort.cpp
#include "HeapSort.h" HeapSort::HeapSort(): SwapCount(0) { } HeapSort::~HeapSort() { } void HeapSort::OnInit() { int a[] = { 0 , 50, 10, 90, 30, 70, 40, 80, 60, 20 ,15, 25,55,85,45,75,65,16,86,56,36,46,96,26 }; aLen = sizeof(a) / sizeof(int); Sort(a, aLen); cout << "ArrLen" << aLen << " HeapSortSwapCount" << ...
ALGO
0.999515
4.417482
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2017-09-01T02:14: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": "4bec5d5dd...
5d28aabb-ab86-4ae7-b631-42c74a084b9b
PNU-PULSE/Algorithm_Implementation
ps/string/trie/trie.cpp
//Warning! binary trie. solution of 13505! struct trie{ trie* node[2]; bool end; trie(){ end = false; for (int i = 0; i < 10; i++) node[i] = NULL; } ~trie(){ for (int i = 0; i < 10; i++) node[i] = nullptr; } void insert(ll num, ll depth){ if (depth == 31){ ...
ALGO
0.998717
3.446924
{ "github_metadata": { "branch": "main", "commit_count": 83, "repo_created_at": "2024-02-27T03:14:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f836d0751269...
9c4783b4-3036-4119-af3e-7fa4977ee099
edisonhello/competitive_programming
NPSC/2017/g.cpp
#include <bits/stdc++.h> using namespace std; const int maxn = 1e6 + 10; const int inf = 1e9 + 1; int a[maxn],n; long long dp[3][maxn]; bool v[maxn]; void solve() { // cout << "solve" << endl; for (int i = 0; i < 3; ++i) fill(dp[i], dp[i] + maxn, -1000000000000000009); dp[0][0] = 0; dp[1][0] = -1000000000...
ALGO
0.999994
3.534994
{ "github_metadata": { "branch": "master", "commit_count": 843, "repo_created_at": "2016-03-15T14:58:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "23480907...
91f985cc-e06a-499e-932c-e5035242d30f
indjev99/Competitive-Programming-Problems
sequences/sequences-author_slow.cpp
#include<iostream> #include<fstream> using namespace std; #define official #ifdef official ifstream inF("sequences.in"); ofstream outF("sequences.out"); #define cin inF #define cout outF #endif long long b1, c1, s1, b2, c2, s2, n; int q; long long ans; void input() { cin>>q; } void output() { cout<<ans<<'\n'...
ALGO
0.999895
4.29271
{ "github_metadata": { "branch": "master", "commit_count": 175, "repo_created_at": "2019-02-16T22:21:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47e1b45b...
c19c847d-4922-424e-a019-688db1d33c95
limoiie/my-oj
problems/nyoj0008.cpp
// // Created by limo on 2018/6/19. // #include <iostream> #include <algorithm> #include <vector> using namespace std; struct rect { int no, height, width; rect() = default; rect(int v_no, int v_one, int v_two) { set(v_no, v_one, v_two); } void set(int v_no, int v_one, int v_two) { ...
ALGO
0.999295
4.692782
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2018-07-22T08:39:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6c8031ffd...
f2ef04b6-f0d0-488e-ade5-6d95017beb82
jackandrea54/Coding-Project
C++ practice/isPrime.cpp
#include <iostream> #include <math.h> #include <vector> #include <algorithm> using namespace std; vector<int> primeNum; //De chua cac so nguyen to int ar[5];//De chua cac chu so //Kiem tra xem so co phai so nguyen to khong bool isPrime(int firstNum,int secNum){ int testNum=0; int ar_clone[5]; //Clone mot array kh...
ALGO
0.998722
3.655419
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2022-03-08T13:10:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f4b970f5e1...
0e9190fa-fbc7-4c4a-8969-410be598d145
skorsch/Pixel-Generator-Project
cpp_project-sabrina-korsch/include/color_reductions.hpp
#include "opencv2/highgui/highgui.hpp" #include "opencv2/core/core.hpp" #include <vector> #include <tuple> #include <iostream> #include <math.h> #include <algorithm> namespace pixels { //Taking into consideration the use case of this software where artists will most likely continue modification in drawing softwa...
TOOL
0.938808
5.641595
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-08-24T17:36:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6d4b0e34b6d...
3ef03b0b-1cf6-46be-bc68-6a00e431d0c2
panchaltej/cpp
BookList/BookListsApp.cpp
/* * BookListsApp.cpp * * Created on: Oct 18, 2017 * Author: <NAME> * 012432680 */ #include "Book.h" #include "BookList.h" #include "BookNode.h" #include <iostream> #include <fstream> #include <iomanip> #include <vector> #include <algorithm> #include <string.h> using namespace std; const string CATEG...
TOOL
0.957017
4.590018
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-10-28T05:22:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d30a928a9...
292db28d-4656-4bdf-8e75-813f35afca9c
icebear0613/Voidmatrix_Learning
TutorialZero_5/include/path.h
#pragma once #include "vector2.h" #include <vector> class Path { public: // 角色移动路径的封装 Path(const std::vector<Vector2>& point_list) { this->point_list = point_list; for (size_t i = 1; i < point_list.size(); ++i) { float segment_len = (point_list[i] - point_list[i - 1])...
TOOL
0.919992
5.38792
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2024-10-17T01:10: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": "0becbb5d1...
384ecc53-b5c4-4650-8b6f-9e02e182aa5e
ishandutta2007/codeforces-i
-imc-/normal/1033/E.cpp
#undef NDEBUG #include <bits/stdc++.h> using namespace std; using li = long long; using ld = long double; #define all(v) (v).begin(), (v).end() void solve(bool); int main() { #ifdef YA auto s = clock(); assert(freopen("input.txt", "r", stdin)); #else //assert(freopen("input.txt", "r", stdin)); //as...
ALGO
0.999725
3.219283
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39: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": "a8fb0bee39b3...
e33f8fde-c111-4fe3-b272-a152ff8a81fb
amol4803/Singly-linked-Lists
Adder Function.cpp
#include<iostream> using namespace std; #include<iostream> using namespace std; class node{ public: int data ; node *next; public: node(){ data=0; next=NULL; } }; node* head; void atBegining(int data){ node *newnode=new node; newnode->data=data; newnode->next=head; head=newnode; } void end_adder(...
ALGO
0.998818
4.164601
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-08-03T05:08: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": "386e02984bbd...
d02f470e-fe01-4465-ac25-8bc0f4906ffb
domz1/SourceFlyFF
Program/boost_1_34_1/boost_1_34_1/boost/xpressive/detail/static/productions/quant_compilers.hpp
/////////////////////////////////////////////////////////////////////////////// // quant_compilers.hpp // // Copyright 2004 <NAME>. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_XPRESSIVE_DETAIL_...
ALGO
0.991313
7.349334
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2013-10-15T13:15:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 24, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4a114abc...
4d69c49e-bcf6-44b1-b332-16af44b7f41d
itsAnkitAkm/cpp
C_Choose_the_Different_Ones.cpp
#include<bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int testCases; cin >> testCases; while(testCases--) { int arraySize1, arraySize2, limit; cin >> arraySize1 >> arraySize2 >> limit; vector<int> array1(arraySize1), arra...
ALGO
0.999904
4.214611
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-05-10T06:35: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": "8e9ae67d5cc0...
b31687c4-12e3-416e-91fa-14e3adf8ce8a
lenazherdeva/ACOS
plugins/main.cpp
#include <stdio.h> #include <string> #include <vector> #include <iostream> #include <malloc.h> #include <cstring> #include "plugin_load.h" std::vector<std::string> parse_input(std::string input) { std::vector<std::string> words; words.push_back(""); char quote_opened = 0; bool was_backslash = 0; fo...
TOOL
0.947008
4.481269
{ "github_metadata": { "branch": "plugins", "commit_count": 2, "repo_created_at": "2016-05-27T21:23: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": "b3247296f...
3680522f-fde8-4ef1-8626-006b3c0fbde5
bobverity/Rgeoprofile
src/probability.cpp
#include <Rcpp.h> #include <random> #include "probability.h" #include "misc.h" using namespace Rcpp; std::default_random_engine generator; std::uniform_real_distribution<double> uniform_0_1(0.0,1.0); //------------------------------------------------ // sample from uniform(a,b) distribution double runif1(double a, d...
ALGO
0.964178
4.199309
{ "github_metadata": { "branch": "master", "commit_count": 300, "repo_created_at": "2016-05-16T10:23:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2c6b5c5...
8877e4cd-a28e-44fa-949f-bbe223885d10
karlbowm/fem_bernstein_poisson
algorithms.cpp
#include <stdio.h> #include <stdlib.h> #include <cstdlib> #include <iostream> #include <sstream> #include <fstream> #include <cuda.h> #include <time.h> #include "helper_functions.h" // helper for shared functions common to CUDA SDK samples #include "helper_cuda.h" #include "cuda_runtime.h" #include "device_launch_p...
ALGO
0.999775
3.069813
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2012-09-30T16:51:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed54fd31b...
a8c8963e-2fc2-4bf4-8a4f-041ac6b93c58
Coach-Academy/Summer-2-2024
Level 1/CPU - Standard - L1 - C106/Practice G4/Week 08/A.cpp
#include <bits/stdc++.h> using namespace std ; int main(){ int n ; cin >> n ; vector<int> pos , neg , zero ; int x ; for(int i=0 ; i<n ; ++i){ cin >> x ; if(x>0) pos.push_back(x) ; else if(x<0) neg.push_back(x) ; else zero.push_back(x) ; } if(neg...
ALGO
0.999843
3.568902
{ "github_metadata": { "branch": "main", "commit_count": 153, "repo_created_at": "2024-08-18T10:29:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d4d16a88dfe...
19a0755b-9465-4998-bf78-2ee08eeeac9b
rikuTanide/atcoder_endeavor
agc039/agc039_b.cpp
#include <bits/stdc++.h> //#include <boost/multiprecision/cpp_int.hpp> //namespace mp = boost::multiprecision; using namespace std; const double PI = 3.14159265358979323846; typedef long long ll; const double EPS = 1e-9; #define rep(i, n) for (int i = 0; i < (n); ++i) //#define rep(i, n) for (ll i = 0; i < (n); ++i) ...
ALGO
0.999869
3.621411
{ "github_metadata": { "branch": "master", "commit_count": 4423, "repo_created_at": "2020-12-05T04:36: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": "dc02fdf...
f165eed2-5712-4610-8bc5-cf82cce7c825
iyohan/InvertedPendulum_ArduinoMega
motor_twoside/motor_twoside.ino
/* 20-02-11 <NAME> * Arduino Project: Inverted Pendulum */ void lhInterrupt(); void rhInterrupt(); // Pin Setting const int LH_INA = 6; // Left side EN (speed) const int LH_INB = 7; // Left side DIR const int RH_INA = 8; // Right side EN const int RH_INB = 9; // Right side DIR const int LH_ENCA = 2; // Left s...
TOOL
0.989971
5.060488
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-08-04T06:40: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": "ae64d7a48b...
3779e63b-d51f-4a4f-99c1-ee68e2137539
bobxiong88/Competitive-Programming-Solutions
DMOJ solutions/Uncategorized/acc1p2.cpp
#include <bits/stdc++.h> #include <queue> #include <vector> using namespace std; int Avisited[100001]; int Bvisited[100001]; int disjoint[100001]; //int epic[100001]; /* 5 3 3 1 4 4 2 3 5 1 3 1 2 3 4 */ int find_set(int v){ if (v == disjoint[v]){ return v; } return disjoint[v] = find_set(disjoint[v]); } void unio...
ALGO
0.999926
3.760173
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-12-28T07:45: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": "fc7cf350c86a...
0f4c93cd-ef0b-4caf-b961-ce430345dfcc
Exzorcist14/Yandex-Algorithm-Training
YandexAlgorithms#3B.4/Task1.cpp
#include <bits/stdc++.h> using namespace std; void solve() { ifstream fin("input.txt"); int N, M; fin >> N >> M; vector<vector<int>> table; vector<int> str(M + 1); table.push_back(str); for (int i = 1; i <= N; ++i) { for (int j = 1; j <= M; ++j) { fin >> str[j]; ...
ALGO
0.99993
4.505289
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-07-21T07:28:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8f9a5fbc1852...
720f88d5-fe97-4797-8d7e-caea390cd456
DyhaCreator/programming_tasks
CodeForcesRound/nar/1982C.cpp
#include <iostream> #include <vector> using namespace std; using ll = long long; const int INF = 1e9 + 7; void solve() { ll n, l, r; cin >> n >> l >> r; vector<ll> a(n); for (auto &x : a) cin >> x; int j = 0; ll sum = 0; int ans = 0; for (int i = 0; i < n; i++) { // cou...
ALGO
0.999925
4.843307
{ "github_metadata": { "branch": "main", "commit_count": 1242, "repo_created_at": "2023-10-15T11:41:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "166121adb...
49547ee9-e386-4f46-894b-e644083351f2
leggedrobotics/ocs2
ocs2_perceptive/include/ocs2_perceptive/interpolation/TrilinearInterpolation.h
/****************************************************************************** Copyright (c) 2017, <NAME>. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain t...
ALGO
0.997769
7.380903
{ "github_metadata": { "branch": "main", "commit_count": 7465, "repo_created_at": "2021-07-08T07:09:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1106, "forks": 258, "issues": 50, "pull_requests": 3 }, "file_meta": { "content_id": "e276...