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
a6a74eb2-59f8-4840-84d9-b189960e72b2
prathamyamazkai/CSES-Problems
Sorting and Searching/Playlist.cpp
#include<bits/stdc++.h> #define ar array using namespace std ; int main(){ int n ; cin >> n ; vector<int>a(n) ; for(int &x:a) cin >> x ; map<int,int>mp; int ans = 0; for(int i=0 , j = 0 ; i<n ; i++){ j = max(mp[a[i]],j); ans = max(ans,i-j+1); mp[a[i]] = i+1; } ...
ALGO
0.999959
4.219302
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2023-01-05T11:01: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": "6ff03ab23...
ba162f39-04ca-45a6-9617-630a609a01cf
metrumresearchgroup/Torsten
cmdstan/stan/lib/stan_math/stan/math/prim/fun/simplex_free.hpp
#ifndef STAN_MATH_PRIM_FUN_SIMPLEX_FREE_HPP #define STAN_MATH_PRIM_FUN_SIMPLEX_FREE_HPP #include <stan/math/prim/meta.hpp> #include <stan/math/prim/err.hpp> #include <stan/math/prim/fun/Eigen.hpp> #include <stan/math/prim/fun/log.hpp> #include <stan/math/prim/fun/logit.hpp> #include <stan/math/prim/fun/to_ref.hpp> #in...
ALGO
0.994112
6.109128
{ "github_metadata": { "branch": "master", "commit_count": 655, "repo_created_at": "2018-03-09T17:48:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 59, "forks": 13, "issues": 7, "pull_requests": 1 }, "file_meta": { "content_id": "340ec4c...
8a781edf-d0d3-41e8-a251-c25592144b3d
DhruvSharma845/codeforces
cpp/newspaper_headline_91_A.cpp
#include <iostream> #include <string> #include <vector> #include <set> auto findNewspaperHeadingsToConvert(const std::string& initialHeading, const std::string& requiredString) -> int { std::vector<std::set<int>> charLocations(26); for(int i = 0; i < initialHeading.size(); ++i) { int charInt = static_...
ALGO
0.999981
5.542567
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2019-11-02T05:30:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a45eb43...
f218bdc5-46f6-4e0e-bce6-7eba658de9ab
Naveens24/classroom.code
IT_Insertionsort.cpp
/* WORKING- 1. Pick the element. 2. Compare with all elements in the sorted sub-list on the left 3. shift all the elements in thesorted sub-list theat is greater than the value to be sorted. 4. Insert the value. 5. Repeat until list is sorted. */ #include<iostream> using namespace std; void insertionSort(int arr[]) ...
ALGO
0.999949
5.071671
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2022-07-29T03:43: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": "24bdbb6a87c...
e8dcc1f0-587b-4ac9-8dc0-dfc17c2735d9
Saisinare/DSA
2. Sorting/quickSort.cpp
#include<iostream> #include<vector> using namespace std; class Solution { public: void quickSort(vector<int>& arr, int low, int high) { if(low<high){ int partitionIndex = partition(arr,low,high); quickSort(arr,low,partitionIndex-1); quickSort(arr,partitionIndex+1,high);...
ALGO
0.999982
5.743466
{ "github_metadata": { "branch": "main", "commit_count": 162, "repo_created_at": "2025-04-03T18:04: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": "25b1000d3a...
b6a18db5-8021-4074-b0af-9711c659da57
phitronio/Batch-4-Introduction-to-Algorithms
Module 7/bellman_ford.cpp
#include <bits/stdc++.h> using namespace std; class Edge { public: int u, v, c; Edge(int u, int v, int c) { this->u = u; this->v = v; this->c = c; } }; const int N = 1e5 + 5; int dis[N]; int main() { int n, e; cin >> n >> e; vector<Edge> EdgeList; while (e--) ...
ALGO
0.999987
4.671635
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-01-20T09:45:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 40, "forks": 17, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "7a21778d89...
96bd3da0-58dc-4a66-b5ea-cddc70987bdb
lemadmax/Qt_ImageEditApp
sakmeans.cpp
#include "sakmeans.h" SaKmeans::SaKmeans(int k, double E, VVV rgb, Point dimension, double spatial, double w1, double w2, double w3) { srand((unsigned)time(NULL)); this->k = k; this->E = E; this->rgb = rgb; this->dimension = dimension; this->w1 = w1; this->w2 = w2; this->w3 = w3; th...
ALGO
0.999775
4.406392
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2020-11-17T18:00: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": "e66c48c9459...
1a0c3f80-d9f0-4114-b2b8-03e275c66f6d
rrvrs/C-plus-plus-practice
ciphertext.cpp
#include<bits/stdc++.h> using namespace std; string plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; string encoder(string key) { string encoded = ""; bool arr[26] = {0}; for (int i=0; i<key.size(); i++) { if(key[i] >= 'A' && key[i] <= 'Z') { if (arr[key[i]-65] == 0) { encoded += key[i]; arr[key[i]-65] = 1; } } else if (key[...
ALGO
0.999763
4.558568
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2020-08-17T12:11: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": "415152b19...
fa09732c-c347-456a-bd01-0ff246f43580
wallacelw/Competitive-programming
content/graph/chromatic-number.cpp
/** * Author: YouKn0wWho and Wallace * Date: 29/07/2024 * Description: Using bitmask DP and Inclusion-Exclusion principle, compute the Chromatic Number of a small graph. * Time: O(2^n n) */ ll ChromaticNumber(const vector<vector<ll>> &g) { ll n = g.size(); ll N = 1 << n; ll ans = n; // adjacency...
ALGO
0.999427
5.54814
{ "github_metadata": { "branch": "main", "commit_count": 463, "repo_created_at": "2022-07-18T19:21:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f331e220d6...
b4b76577-ec9e-487a-a381-db1d32d168f3
Kalit31/cp-playground
CSES/Geometry/PointLocationTest.cpp
#pragma GCC optimize("Ofast") #pragma GCC optimization("unroll-loops") #pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> using namespace std; #define ll long long int #define deb(x) cout << #x << " " << x << endl; #define mod 1000000007 #define mod2 998244353 #define fast std::ios::sync_with_stdio(false), cin...
ALGO
0.999845
4.91831
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2019-12-14T13:01: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": "27315e8b3...
0038e632-4612-4206-bcf5-0fac88b7bf59
adityasarvaiya/MLIS1
Sem 1/coding/prime.cpp
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int n,i; cin >> n; for (i = 0; i < n; i++) { int s,e,j; cin >> s; cin >> e; cout << "s: " << s << "e: " << e << endl; int size = e-s; int prime[size]; for (j...
ALGO
0.999796
3.269991
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2018-09-17T17:18: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": "7798bf4ce...
cf83ea45-d8e7-46e7-b6bb-43a640ef362b
miquelt9/PRO1-FIB
P9 Data Structure (tuples)/P81104.cc
#include <iostream> #include <vector> using namespace std; struct Assignatura{ string nom; double nota; }; struct Alumne{ string nom; int dni; vector<Assignatura> ass; }; double nota(const vector<Alumne>& alums, int dni, string nom){ for(int i = 0; i < (int)alums.size(); ++i){ if(alums[i].dni == dni){ for...
ALGO
0.998457
3.55352
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2021-01-19T14:23: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": "0b42ae3e458...
e6ba0797-3c68-4948-9f25-c0dc77f6f96e
TomographyLab/NiftyRec
reg-lib/_reg_blockMatching.h
/* * _reg_blockMatching.h * * * Created by <NAME> and <NAME> on 24/03/2009. * Copyright (c) 2009, University College London. All rights reserved. * Centre for Medical Image Computing (CMIC) * See the LICENSE.txt file in the nifty_reg root folder * */ #ifndef __REG_BLOCKMATCHING_H__ #define __REG_BLOCKM...
ALGO
0.98326
5.116282
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2018-11-13T14:45:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0023b75e7...
117b475b-1aaf-4a7d-8cdb-538be2dbbc6e
uiuc-fa20-cs126/ideal-gas-spitzer4
src/core/particle.cc
// // Created by <NAME> on 12/18/20. // #include "../../include/core/particle.h" #include "../../include/visualizer/ideal_gas_app.h" particle::particle() { position = {rand() % 500 + 120, rand() % 500 + 120}; direction = static_cast<float>(rand()); velocity = glm::vec2(static_cast<float>(rand()), static_c...
ALGO
0.956677
5.988385
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2020-10-31T20:58:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "43031a8dc75c...
27a9c4b5-76ec-4576-913b-01426f102ced
club-code/AdventOfCode2022
CPP/NiqueCPP/day11.hpp
#include "common/common.hpp" #define NB_ROUNDS_P1 20 #define NB_ROUNDS_P2 10000 #define DIVISER_P1 3 #define DIVISER_P2 1 std::function<unsigned long(unsigned long, const std::pair<std::string, std::string>)> operation = [](unsigned long old, const std::pair<std::string, std::string>& opParameters) { ...
ALGO
0.991554
4.805023
{ "github_metadata": { "branch": "main", "commit_count": 292, "repo_created_at": "2022-11-28T08:34:03.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5aee255dafb...
14ed4b89-a365-4d2a-9714-ceb540addc41
vichua2006/Competitive_Programming_Cpp
CodeForce/1526C2.cpp
/* iterate through the potions and for each potion i, if i does not kill you, drink it. if not, check if arr[i] is larger than the smallest potion you have taken. If it is, then "undrink" the smallest potion and replace it with current i. This will always result in more "room" for future potions and thus is always o...
ALGO
0.999796
4.244886
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2022-06-07T00:43: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": "a028b9ba0...
a98ad397-1898-4c99-b1ae-948271dee305
MijaTola/Codeforce
100819O.cpp
#include <iostream> #include <queue> #include <vector> #include <cstring> using namespace std; int r[500][500]; int d[500][500]; int n,m; bool check(int x,int y){ if(x >= 0 and x < n and y >= 0 and y < m and d[x][y] == -1) return true; return false; } int main(){ memset(d,-1,sizeof d); queue<pair<int,int> > bfs;...
ALGO
0.999952
4.049833
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2015-10-31T01:44: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": "9cabe7588e...
02e634e4-c437-4a7c-adc4-205cde0c6fe7
ahdeshpande/CppPrograms
BalancedBrackets.cpp
#include <iostream> #include <stack> using namespace std; int main() { string strInput = ""; cout << "Enter a string: "; cin >> strInput; stack<char> stkOpeningBrackets; bool isBalanced = true; for(int i=0; i<strInput.size(); i++) { // Check for opening brackets, push it onto st...
ALGO
0.999213
6.204417
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-10-06T00:13: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": "461ab07a1...
62e6fb01-3de7-47ea-a8cf-9bab0f53b989
professorlineu/PROA3-2019-2
Projeto de Programação/Jogo da Velha - Clayton e Robson/PROJ -JOGO DA VELHA CeR v9.cpp
/********************************************************** - Autor: <NAME> e <NAME> - Descrição: Jogo da Velha **********************************************************/ #include <iostream> #include <locale.h> #include <cstdlib> #include <windows.h> #include <time.h> #include <math.h> using namespace std; int m...
TOOL
0.986152
3.789239
{ "github_metadata": { "branch": "master", "commit_count": 731, "repo_created_at": "2019-07-29T02:58:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 121, "pull_requests": 0 }, "file_meta": { "content_id": "0a4891...
a018aa72-8fc6-4ec8-93a8-e2901ff874c1
plusls/oj
vjudge/contest/UESTC 2017 Summer Training #13 Div.2/H/main.cpp
#include <bits/stdc++.h> using namespace std; string constStr[2] = {"+----------+----------+----------+", "| | | |"}, data[10][10]; int getWeek(const string &str) { if (str == "Tuesday") return 1; else if (str == "Thursday") return 2; else return 3;...
ALGO
0.99962
3.713739
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2017-03-08T02:36: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": "476207f07...
bab83725-7152-42ae-a120-702a5cf91074
DipanshuRaj2/Striver-A2Z-sheet-DSA
Learn Linked_list/Singly_Linked_List/RemoveEle.cpp
#include<bits/stdc++.h> using namespace std; struct Node{ int data; Node* next; Node(int data1){ data = data1; next = nullptr; } }; Node* convert2LL(vector<int>& arr){ Node* head = new Node(arr[0]); Node* mover = head; for(int i = 1; i<arr.size(); i++){ Node* temp =...
ALGO
0.999876
4.406464
{ "github_metadata": { "branch": "main", "commit_count": 394, "repo_created_at": "2024-02-06T17:07: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": "21999d21c7...
f9db3b85-7025-4e7d-8ef1-a26b9c0d56ec
GersonCavalheiro/OpenMPSnapshot
May2023/RepCPP/14143578/mpi_accumulate.h
#pragma once #include <mpi.h> #include <array> #include <vector> #include <map> #include "accumulate.h" namespace dg { namespace exblas { namespace detail{ static std::map<MPI_Comm, std::array<MPI_Comm, 2>> comm_mods; } static void mpi_reduce_communicator(MPI_Comm comm, MPI_Comm* comm_mod, MPI_Comm* comm_mod_reduce...
TOOL
0.983647
5.479012
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2024-08-19T17:35:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "770efa8ab3...
671ff106-541d-4136-88ce-e813bc289450
quangtran8588/COSC6360-OperatingSystem-HW2
Server.cpp
/************************************************************************************ * COSC 6360 - Advanced Operating System * * Homework Assignment 2 - Simulate a Client-Server TCP Socket Connection in Linux * * Server creates TCP Socket connections * * Server wa...
WEB
0.942214
3.243491
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-01-30T18:53: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": "e1e4b01054...
705d71bb-cd86-4196-93af-137155c6ee12
ToureOus/DE1SOC_FPGA-Embedded-Design
Quartus/Lab 4/Lab 4 CPP/lab43.cpp
#include <iostream> #include <string> int main(){ int array[8]; int input; int count = 0; while(count < 8){ std::cout << "Enter a number for bit [" << count << "]: "; std::cin >> input; if(!(input == 0 || input == 1)){ std::cout << "Please enter either 0 or 1" << std::endl; ...
ALGO
0.993608
4.13273
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-09-27T17: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": "9820e071cc...
7335737b-a48e-4cb8-bcb2-09d505e99a5b
J-jjp/Operating_System
include/RRS.cpp
#include "common.hpp" //时间片轮转调度算法 class RoundRobin_Scheduler { private: std::queue<PCB*> readyQueue; // 就绪队列 int time_slice; // 时间片长度 public: RoundRobin_Scheduler(int slice) : time_slice(slice) {} // 添加进程到就绪队列 void addProcess(int id, int burstTime) { PCB* p = new PCB(id, ...
ALGO
0.999036
5.676414
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-16T18:35:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "279cf54943d3...
47c41aa7-d99e-4a24-b812-bd2c601e054a
Farhan41229/CPP_Notes
Hashmap/hashing.cpp
#include <iostream> #define SIZE 10 #define PRIME 7 using namespace std; class HashTable { private: int H[SIZE] = {0}; int Hash(int key) { return key % SIZE; } int LinearProbe(int key, int &attempts) { int idx = Hash(key); int i = 0; while (H[(idx + i) % SIZE] != 0) {...
ALGO
0.998755
5.306679
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-03-19T00:00: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": "4919aaee3f81...
2aa9eb38-8ecd-4cf3-8747-16403f625c13
kiddos/notes
codeforces/1600~1699/1605/c.cc
#include <bits/stdc++.h> using namespace std; using i64 = long long; void solve() { int n = 0; cin >> n; string s; cin >> s; int ans = numeric_limits<int>::max(); for (int i = 1; i < n; ++i) { if (s[i] == 'a' && s[i-1] == 'a') { cout << "2" << endl; return; } } for (int i = 2; i ...
ALGO
0.999554
3.404854
{ "github_metadata": { "branch": "master", "commit_count": 398, "repo_created_at": "2017-01-31T13:49: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": "c10d42ad...
7f1f7f7b-a539-4105-9e8e-f5a79f15de31
sanyamsinghai/DSA-practice
Difficulty: Easy/Delete Mid of a Stack/delete-mid-of-a-stack.cpp
//{ Driver Code Starts // Initial template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function template for C++ class Solution { public: // Function to delete middle element of a stack. void deleteMiddleElement(stack<int>&s , int cnt , int size){ //base c...
ALGO
0.988902
6.310257
{ "github_metadata": { "branch": "master", "commit_count": 360, "repo_created_at": "2024-04-03T03:24:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b64f8e9...
962cb5a6-3dad-4eda-8a5a-983228c05eee
a-pramanik37/Solved-problems-of-UVA
10473.rett.cpp
#include <cstdio> #include <iostream> #include <cstring> #include <string> #include <cmath> #include <cstdlib> #include <algorithm> using namespace std; int main() { char a[5000], b[5000]; long long int i, len,sum, p, rem, j, n; while(scanf("%s", a)==1){ len = strlen(a); if(a[0]=='0'...
ALGO
0.997953
3.789985
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-05-25T14:26: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": "182915266b...
926323d3-8dd8-4841-9ab5-90b34a6e38c9
xyh-cosmo/csst_inspector
src_test/test_subastral3.cpp
// 检验了张鑫的计算星下点的算法! // 这里采用的算法,从几何意义上来讲更加直观和容易理解. #include "inspector.hpp" using namespace std; int main( int argc, char* argv[] ){ if( argc != 3 ){ cout << "usage:\n" << argv[0] << " t_start t_end \n"; exit(0); } // double jdate_origin = 2459766; double jdate_start = std::atof(arg...
ALGO
0.980304
4.105028
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-01-15T03:05: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": "edc9ded34e...
947d71d3-3e4b-4a97-b679-ba572ebc4555
liu-chunzhang/cpp_primer_5ed_exercise_solution
第11章 关联容器/11.05 练习集合/练习 11.04/main.cpp
// 本程序用于验证读者在练习11.4中的想法,并在必要的地方予以说明 #include <iostream> #include <fstream> #include <map> using namespace std; string &trans( string &s ) ; int main() { map<string,size_t> str_num ; ifstream in( "data.txt" ) ; string str ; while( in >> str ) ++str_num[ trans(str) ] ; for( const pair<string...
ALGO
0.913282
3.448336
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2021-12-12T02:13:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9799e7fa4e4...
3393bcff-0211-40b9-9e36-a73c5cce7c4e
raincross7/code-similarity
codes/train_code/problem204/problem204_286.cpp
#include<bits/stdc++.h> using namespace std; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) #define rep1(i, n) for (ll i = 1; i...
ALGO
0.999881
3.391483
{ "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": "532fca742a5f...
d70e3b7b-319c-4d51-9346-cd8993934541
Jessica-Ward03/Kattis
Problems/Job Expense.cpp
// // Created by jessi on 1/13/2024. // /*"At ACME Corp, the seller Robin is selling software like hotcakes. To sell the software, he arranges meetings all over the country. Of course, he always needs to travel there, and sometimes even stay the night. Other times, he decides that a hot dog on the way to a meeting coun...
ALGO
0.997124
4.274895
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-01-13T01:40: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": "b0ba1c60e640...
e8eb0580-f3c9-45f9-9b67-81229865fb3f
Xiao-Jian/ACM-Training
个人排位-4/G. Popular Cows.cpp
//Tarjan #include <stdio.h> #include <string.h> #define MAX_N 10001 #define MAX_M 100001 struct Edge { int to,next; }e[MAX_M]; int n,m,head[MAX_N],dfn[MAX_N],low[MAX_N],s[MAX_N],num[MAX_N],du[MAX_N],vis[MAX_N]; int cnt,time,top,cut; void addedge(int u,int v) { e[cnt].to=v; e[cnt].next=head[u]; head[u...
ALGO
0.999951
4.117538
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2015-07-20T04:05: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": "2a5fadfcb...
076d0f8e-fcca-4be4-8ced-1bcf000b294f
mejibyte/competitive_programming
Codeforces/Round #110/a/a.cpp
// <NAME> using namespace std; #include <algorithm> #include <iostream> #include <iterator> #include <numeric> #include <sstream> #include <fstream> #include <cassert> #include <climits> #include <cstdlib> #include <cstring> #include <string> #include <cstdio> #include <vector> #include <cmath> #include <queue> #includ...
ALGO
0.999968
4.270175
{ "github_metadata": { "branch": "master", "commit_count": 355, "repo_created_at": "2011-10-27T01:25:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 196, "forks": 66, "issues": 1, "pull_requests": 2 }, "file_meta": { "content_id": "45a2e...
d51e999f-3381-4daa-9f93-cf9f819d461b
codedazzlers/DSA-Bootcamps
KM POOJA/Assignment 1/countDuplicate.cpp
//c++ program count total duplicate elements in array //time complexity O(n^2) and space O(1) #include <iostream> using namespace std; int main() { int i,j, n; /* Input array size */ cout<<"Enter size of array: "; cin>>n; int arr[n]; /* Input elements in array */ cout<<"Enter "<<n<<" eleme...
ALGO
0.998302
3.929513
{ "github_metadata": { "branch": "main", "commit_count": 273, "repo_created_at": "2021-09-20T13:18:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 13, "forks": 58, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "db1c21368...
dc454dda-da94-4b28-bdab-0042cd2bf0d0
Paloouf/voxel-engine
srcs/Renderer.cpp
#include "../include/Renderer.hpp" void GLClearError(){ while (glGetError() != GL_NO_ERROR); } bool GLLogCall(const char* function, const char* file, int line){ (void)line; while (GLenum error = glGetError()){ std::cout << "[OpenGL Error] (" << error << "): " << function << " " << file << ":" << std::endl; ...
TOOL
0.950671
5.318944
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-06-02T13:32: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": "bdd826507629...
565736fc-6722-465f-ae0f-15d15fd3f3cd
udyankhurana/raytracing
bvh_linearization/shapes.h
//Include Header Guard #ifndef __SHAPES_H_INCLUDED__ #define __SHAPES_H_INCLUDED__ #include<stdio.h> #include<math.h> #include<vector> #include<queue> #include<stack> #include "ray.h" #define EPSILON 0.000001 #define MIN(a,b) (((a)<(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b)) void swap(float &a, float &b) { flo...
ALGO
0.986342
3.526879
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2014-06-16T16:35: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": "2dcaa9e2d...
80e8d648-484e-4589-b467-008c0d35675e
alecjacobson/gptoolbox
mex/angle_derivatives.cpp
#include <mex.h> #include <igl/C_STR.h> #include <igl/matlab/mexErrMsgTxt.h> #undef assert #define assert( isOK ) ( (isOK) ? (void)0 : (void) mexErrMsgTxt(C_STR(__FILE__<<":"<<__LINE__<<": failed assertion `"<<#isOK<<"'"<<std::endl) ) ) #include <igl/matlab/MexStream.h> #include <igl/matlab/parse_rhs.h> #include <igl...
ALGO
0.999729
5.942677
{ "github_metadata": { "branch": "master", "commit_count": 1649, "repo_created_at": "2014-02-21T13:46:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 655, "forks": 175, "issues": 60, "pull_requests": 14 }, "file_meta": { "content_id": "8...
96f66ad3-e639-4e1c-98d9-d2a382736e95
marcosherreroa/Metodos-Algoritmicos-en-Resolucion-de-Problemas-II
Exercises/Hoja 1/1.3 Mínimo varillas/1.3 Mínimo varillas/MinVarillas.cpp
//<NAME> #include <iostream> #include <vector> #include <algorithm> int minVarillas(std::vector<int> const& l, int fin, int L) { if (L < 0) return l.size()+1;//infinito else if (fin == 0) { if (L == 0)return 0; else return l.size()+1; } else { int s1 = minVarillas(l, fin - 1, L...
ALGO
0.999898
4.070501
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-05-30T07:17: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": "bde302708c69...
8b75414f-4e4f-44bd-a56a-f6651c9ef337
ei1903/icpc_domestic
TrieLCA.hpp
template <int CHAR_SIZE, int BASE, int MAX_LOG> struct Trie { struct Node { vector<Node *> nxt, prev; vector<int> accept; int c, d, num; Node(int c_, int num_, int d_) : c(c_), num(num_), d(d_) { nxt.assign(CHAR_SIZE, nullptr); prev.assign(MAX_LOG + 1, nullptr...
ALGO
0.999048
5.388647
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2025-06-18T23:43:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "21c17ea31...
930e1eb5-8b66-473c-a1c2-6df7c84093de
TranTrongHung123/TRR2-Ptit
CodePtit/CK4001 - 4.1 Cây khung.cpp
#include <bits/stdc++.h> #define ll long long #define endl "\n" #define TranHungss(); ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); using namespace std; const int maxn = 105; int t, n, root, visited[maxn]; vector<int> Ke[maxn]; vector<pair<int,int>> edge; void input(){ cin >> t >> n >> root; for(int...
ALGO
0.999965
3.712472
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2025-06-23T14:29: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": "39c419777d...
c64daea9-35f3-401e-a6ef-16490e06a5f6
jerrychenhf/pegasus
cpp/src/pegasus/runtime/client_cache.h
// 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 // "License"); you may...
TOOL
0.960462
5.416551
{ "github_metadata": { "branch": "master", "commit_count": 613, "repo_created_at": "2020-10-30T06:01:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0014fa49...
bc99d20f-f492-4a31-ba57-ae9f77753454
AlexandreDewilde/algo-training
cf152/B_Monsters.cpp
#include <bits/stdc++.h> using namespace std; signed main() { cin.tie(NULL); ios::sync_with_stdio(false); int t; cin >> t; while (t--) { int n, k; cin >> n >> k; vector<int> a(n); int m = 1e9 + 1; for (int i = 0; i < n; i++) { cin >> a[i]; m = mi...
ALGO
0.999974
3.529329
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2022-12-29T17:04: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": "7dc9ee2a866...
1dce8ec1-cc79-47cd-aaa7-9911625811d8
divyansh2212/DSA-and-CP
take u forward/Binary Trees/vid33.cpp
#include <bits/stdc++.h> using namespace std; struct node { int data; node *left; node *right; node(int val) { data = val, left = NULL, right = NULL; } }; int heightOfLeft(node *Node) { int h = 0; while (Node) { h++; Node = Node->left; } return h; } ...
ALGO
0.999778
4.819815
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2021-11-13T10:17: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": "b3470084...
d4b64805-3591-4b7d-99ec-2b5d2eb622e7
ishandutta2007/codeforces-b
benq/normal/786/E.cpp
#pragma GCC optimize ("O3") #pragma GCC target ("sse4") #include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> #include <ext/rope> using namespace std; using namespace __gnu_pbds; using namespace __gnu_cxx; typedef long long ll; typedef long double ld; typedef complex...
ALGO
0.99987
3.629584
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4dc8763d4f22...
36c375c4-e2bf-4887-a3ec-6c49b0483de1
UNMECE231Fa2020/SearchSort
Search/LinearSearch/main.cpp
#include <iostream> #include <vector> #include <string> template <typename T> bool linear_search(const std::vector<T> &v, T value) { for (const auto &x : v) { if (x == value) { return true; } } return false; } template <typename X> int linear_search_index(const std::vector<X> &v, X value) { for (int i = 0;...
ALGO
0.998316
5.576303
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2020-10-17T22:15:08.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "778086a024cb7...
b43365e6-a01c-42e9-a981-047e08c91f6d
LutzGross/esys-escript.github.io
trilinos_source15/packages/rol/src/zoo/testproblems/ROL_HS9.hpp
// @HEADER // ************************************************************************ // // Rapid Optimization Library (ROL) Package // Copyright (2014) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by or on be...
ALGO
0.971861
5.49955
{ "github_metadata": { "branch": "master", "commit_count": 5724, "repo_created_at": "2020-08-10T02:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 63, "pull_requests": 0 }, "file_meta": { "content_id": "d191...
40c65276-f1ab-4950-9c6c-363b4fed43c0
townboy/acm-algorithm
HDOJcode/1252 2013-09-06 13 16 04.cpp
****************************** Author : townboy Submit time : 2013-09-06 13:16:04 Judge Status : Accepted HDOJ Runid : 9117218 Problem id : 1252 Exe.time : 46MS Exe.memory : 1436K https://github.com/townboy ****************************** #include<stdio.h> #include<iostream> #include<me...
ALGO
0.999955
3.599024
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2014-03-23T03:30: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": "5f6b2a2ad...
43d37eb9-2e4c-4316-8a46-9aa185d9e47a
RinCloud/TrickCatcher
Datasets/TrickyBugs/GenProgs/dpp_generated_progs_cpp/p02669/p02669_num4_parsed.cpp
#include <iostream> #include <vector> #include <climits> using namespace std; typedef long long ll; int main() { int T; cin >> T; while (T--) { ll N, A, B, C, D; cin >> N >> A >> B >> C >> D; vector<ll> dp(N + 1, LLONG_MAX); dp[0] = 0; for (int i = 1; i <= N; i++...
ALGO
0.99986
4.277064
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-12-15T17:51:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "312b884c30...
9e416171-1987-4a67-ab31-76b924a1b4a6
KevinyWu/competitive-programming
cses-solutions/dynamic-programming/removal-game.cpp
#include <iostream> #include <vector> #define ll long long using namespace std; void solve() { int n; cin >> n; ll a[n+1], sum = 0; for (int i = 1; i <= n; ++i) { cin >> a[i]; sum += a[i]; } // dp[l][r] is maximum of diff = score1 - score2 // if the game is played on interval ...
ALGO
0.999868
3.913651
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2023-08-13T15:19:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aaa0fb10346...
d7f69ced-a096-46c3-9575-8e2babc18719
psanse/graph
algorithms/graph_sort.h
//graph_sort.h: header for GraphSort class which sorts graphs by different criteria //date: 20/11/15 //authors: pss #ifndef __GRAPH_SORT_H__ #define __GRAPH_SORT_H__ #include "../graph.h" #include "../kcore.h" #include "filter_graph_sort_type.h" //Template Graph_t reduced to undirected types #include "pablodev/util...
ALGO
0.999901
5.598617
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2015-05-12T07:08:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e1674bb3...
41eb0526-2291-4209-8401-320dfdeacbbe
Amar6de2/LeetCode
0037-sudoku-solver/0037-sudoku-solver.cpp
/* This is the solution to solve a sudoku puzzle. Sudoku Puzzle generally conists of 9*9 grid with numbers appearing in some of the squares and there are 9 (3*3) square grids contained in them.3 conditions are to be followed while filling the rest of the numbers. 1)Each row must be filled with numbers 1 to 9 without re...
ALGO
0.999833
6.579286
{ "github_metadata": { "branch": "main", "commit_count": 122, "repo_created_at": "2024-01-05T18:31: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": "dcbe5d4917...
6565786b-eead-4c02-b06f-d1e137ed32fa
dhnesh12/codechef-solutions
03-CodeChef-Medium/288--Quadratic Equations.cpp
#include <cstdio> #include <iostream> #include <vector> #include <set> #include <map> #include <cmath> #include <string> #include <cstring> #include <sstream> #include <queue> #include <iomanip> #include <algorithm> using namespace std; typedef long long ll; typedef pair <int, int> ii; int t; int a, b, c, p; vector <...
ALGO
0.99987
3.763504
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2021-04-06T05:27: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": "88db9ce025...
af572502-1606-45f0-b6e4-91351c5c6ed3
NadineAB/MPC-Meshing_Point_Clouds
CGAL/include/CGAL/Triangle_2_Iso_rectangle_2_intersection.h
// Copyright (c) 2002-2004 INRIA Sophia-Antipolis (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org); you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public License as // published by the Free Software Foundation; either version 3 of the License, // o...
ALGO
0.993847
4.271268
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2015-12-18T21:22:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b589fd26...
7dc6c462-d17e-49c5-91a7-e7d4b8cbd855
ex-MingNine9999/algorithm
Problems/boj1780.cpp
//Problem Number : 1780 //Problem Title : 종이의 개수 //Problem Link : https://www.acmicpc.net/problem/1780 #include <iostream> #include <algorithm> using namespace std; struct mzo { int m; int z; int o; }; int P[6666][6666]; mzo nop(int y, int x, int l) { int base = P[y][x]; int check = 1; mzo ret = { 0,0,0 }; ...
ALGO
0.997629
4.34297
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2020-03-25T07:39:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "88e017ff...
7895e9a0-d8d7-4619-a527-3616b46a67b7
cpatrick/calatk
Code/Libraries/Utilities/VectorImageUtils.h
/* * * Copyright 2011, 2012 by the CALATK development team * * 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 by a...
TOOL
0.980186
6.925606
{ "github_metadata": { "branch": "master", "commit_count": 360, "repo_created_at": "2012-12-12T22:14:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "01a8d1ff...
8bae771d-b0bc-4e62-b34d-5cf4a6f00969
dolphingarlic/CompetitiveProgramming
IOI/IOI 12-supper.cpp
#include "grader.h" #include <bits/stdc++.h> #define FOR(i, x, y) for (int i = x; i < y; i++) using namespace std; set<pair<int, int>> scaffold; map<int, int> scaffold_map; queue<int> occurrences[100000]; int swap_sequence[100000], on_scaffold[100000], active[200000]; void ComputeAdvice(int *C, int N, int K, int M) {...
ALGO
0.999941
3.612835
{ "github_metadata": { "branch": "master", "commit_count": 439, "repo_created_at": "2019-08-15T19:00:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 50, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1ebc56...
c2d87be3-747e-4912-b43f-1b670bf29f17
ChrisCummins/phd
datasets/benchmarks/gpgpu/amd-app-sdk-3.0/samples/opencl/cl/1.x/Reduction/Reduction.hpp
/********************************************************************** Copyright ©2015 Advanced Micro Devices, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: • Redistributions of source code mu...
TOOL
0.902796
5.396101
{ "github_metadata": { "branch": "master", "commit_count": 14702, "repo_created_at": "2015-08-31T11:16:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 187, "forks": 35, "issues": 24, "pull_requests": 6 }, "file_meta": { "content_id": "64...
bdd2f26f-b7f3-467f-8771-5f04564040f3
martinjonas/Q3B
lib/UnconstrainedVariableSimplifier.h
#ifndef UNCONSTRAINEDVARIABLESIMPLIFIER_H #define UNCONSTRAINEDVARIABLESIMPLIFIER_H #include "z3++.h" #include <map> #include <vector> #include <list> #include <string> #include <tuple> #include <unordered_map> #include <set> #include <optional> #include <iostream> enum BoundType { EXISTENTIAL, UNIVERSAL }; enum MulR...
ALGO
0.958474
4.492917
{ "github_metadata": { "branch": "master", "commit_count": 463, "repo_created_at": "2015-06-20T17:47:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 28, "forks": 5, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "b2e111a...
0095202f-85d4-4db0-815c-9a01dcf28b87
Angular-SPA-MEAN-CSharp-AspDotNet-MVC/CWR_int_count_frequency
Project2/main.cpp
#include <iostream> #include <algorithm> #include <vector> #include <cstring> #include <ctime> using namespace std; void display(char *ary, int size) { for (int i = 0; i < size; i++){ cout << ary[i] << " "; } cout << endl; } void displayPair(vector<pair<char, int>> *pairResult, int size) { cout << endl; for (...
ALGO
0.999332
5.126163
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-01-03T20:45:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be0063221f...
25e37f57-603f-4874-806f-39aae5337881
sakiib/OnlineJudge-Solutions
CSES Solutions/Dynamic Programming/removing_digits_bfs.cpp
#include <bits/stdc++.h> using namespace std; const int N = 1e6 + 5; const int inf = 1e9; vector <int> v[N]; int cost[N]; int bfs(int cur) { memset(cost, -1, sizeof(cost)); queue <int> q; cost[cur] = 0; q.push(cur); while (!q.empty()) { int f = q.front(); q.pop(); for (auto x: v[f...
ALGO
0.99977
3.965355
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2020-08-17T13:46: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": "d62999b68...
bd020da3-bfb6-411a-93e8-f5d0b8941e68
leggedrobotics/traversability_estimation
traversability_estimation_filters/include/filters/StepFilter.hpp
/* * StepFilter.hpp * * Created on: Mar 12, 2015 * Author: <NAME> * Institute: ETH Zurich, Autonomous Systems Lab */ #ifndef STEPFILTER_HPP #define STEPFILTER_HPP #include <filters/filter_base.h> #include <string> namespace filters { /*! * Step Filter class to compute the step traversability value o...
TOOL
0.986012
7.065759
{ "github_metadata": { "branch": "master", "commit_count": 377, "repo_created_at": "2015-03-03T14:16:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 431, "forks": 101, "issues": 10, "pull_requests": 1 }, "file_meta": { "content_id": "6f34...
bfbe6cb1-6642-4751-bda6-f2005df752d8
ngthanhtrung23/CompetitiveProgramming
codeforces/100947/G.cpp
#include <bits/stdc++.h> #define int long long #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 DEBUG(X) { cout << #X << " = " << (X) << endl; } #define PR(A,n) { cout << #A << " = "; FOR(_,1,n) cout <...
ALGO
0.99945
4.758475
{ "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": "54b21...
f850e847-eb1d-4be2-9f43-7f6fbc3f42da
Sudyko/University_stuff
2nd_year/comp_math/[3.1]/graph_solves.cpp
#include <stdio.h> #include <math.h> #include <fstream> using namespace std; double f1(double x) { return 5 * pow(x, 4) - 2 * pow(x, 3) + 3 * pow(x, 2) + x - 4; } double f2(double x) { return pow(x, 5) - 3 * pow(x, 4) + 7 * pow(x, 2) + x - 8; } int main() { ofstream fout1("file1.csv"), fout2("file2.csv"); pu...
ALGO
0.999273
4.219254
{ "github_metadata": { "branch": "main", "commit_count": 132, "repo_created_at": "2021-02-13T19: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": "6cc90f9569...
91dab555-2850-4305-acd3-d357452976df
frankkn/CodeForce
CodeForce/Round#859_div4/c.cpp
#include <algorithm> #include <iostream> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define ll long long int int main(){ ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); int T; cin >> T; while(T--){ int n; cin >> n; string s; cin...
ALGO
0.999868
4.594138
{ "github_metadata": { "branch": "master", "commit_count": 90, "repo_created_at": "2022-03-15T14:37: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": "2bc68b7b5...
a6d9e672-ccdb-47dd-b077-d7afb4d2a87e
anay-jain/DSA
DS Topics/Time And Space/TNS.cpp
#include<iostream> #include<vector> using namespace std; void swap(vector<int> &arr , int pi , int si){ int temp=arr[pi]; arr[pi]=arr[si]; arr[si]=temp; } //==== sort 0 1 and 2 ============================================================================= void sort0and1(vector<int> &arr ){ int p1=0,p2=0;...
ALGO
0.99992
3.937008
{ "github_metadata": { "branch": "master", "commit_count": 339, "repo_created_at": "2019-07-28T21:02:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "4c350080...
38f5143b-26d9-447b-b6f8-d2a8040ed652
RAnthonyVR/CrackingTheCodinginterviewProblems
CodeForces/Python/1428C-ABBB.cpp
# ABBB problem # Rules: AB or BB, explotes a bomb, they have in common that they end in B # It is like problems of balanced parenthesis [{()}], so a stack is used # Algorithm: # 1. If a B is read, then delete previous value # 2. Else if there is no previous value, or an A is read, insert in stack # 3. After the whole...
ALGO
0.996191
3.75843
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-02-10T19:37:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6e26bb409343...
3e2a08f4-6c9d-4f45-808a-7ded2eeae530
estanislawski4/Projets
Polymorphisme/trajectoire.cpp
#include "trajectoire.h" Trajectoire::Trajectoire(const int _nbEtapesMaxi) : nbEtapesMax(_nbEtapesMaxi), prochaineEtape(0) { depart.setX(5); depart.setY(10); parcours = new Element*[_nbEtapesMaxi]; } Trajectoire::~Trajectoire() { delete[] parcours; } bool Trajectoire::Ajouter(Element *_pElem...
ALGO
0.934962
4.307557
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2024-09-04T09:28: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": "92ec4ab6a8f...
24c3fcde-6260-4a97-94c2-d4c4a8d1584c
greole/coalFoam
transpEq/pIncompEqn.H
// update rho from thermodynamics, // moved out of piso loop as suggested by Jarczy 2013 rho = thermo.rho(); clock_t t_begin_P = std::clock(); Info << "=== Start Pressure Corrector ===" << endl; volScalarField rAU(1.0/UEqn.A()); U = rAU*UEqn.H(); surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rho*rAU)); vo...
ALGO
0.999644
4.658954
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-01-18T14:35:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0202277e2ae2...
44a4bc86-c1a9-487b-8cc1-40c46e8aa9ce
pdeitel/CPlusPlusHowToProgram10e
examples/ch16/fig16_08/fig16_08.cpp
// Fig. 16.8: fig16_08.cpp // Algorithms swap, iter_swap and swap_ranges. #include <iostream> #include <array> #include <algorithm> // algorithm definitions #include <iterator> using namespace std; int main() { const size_t SIZE{10}; array<int, SIZE> a{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; ostream_iterator<int> ou...
ALGO
0.997983
6.306768
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-11-15T16:14:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 167, "forks": 88, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cb539b7...
54b842cf-84f3-41e1-a6d3-54c963d7da34
SaurabhP7/SPOJ-solutions
PPATH.CPP
#include<bits/stdc++.h> using namespace std ; typedef long long ll ; void addEdge(vector<vector<int>> &adj,int u,int v){ adj[u].push_back(v) ; adj[v].push_back(u) ; } vector<bool> segmentedSieve(int L, int R) { vector<int> primes ; //upto R ,prime numbers int lim=sqrt(R) ; vector<bool> marked(lim+1,fal...
ALGO
0.999543
4.037584
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-09-29T06:43: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": "64289ea840...
52525038-e006-4809-aeee-98f90eb67c1f
mumba-org/mumba
lib/chromeos/arc/setup/config.h
// Copyright 2018 The Chromium OS Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef ARC_SETUP_CONFIG_H_ #define ARC_SETUP_CONFIG_H_ #include <functional> #include <map> #include <memory> #include <string> #include <base/envir...
CONFIG
0.918524
7.211663
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2022-01-06T21:38:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 20, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "16b60e1c048...
3fc795c8-e03e-436f-bf89-b5d6a1b13646
redplait/cses
Add/Hamming.cc
#include <stdlib.h> #include <stdio.h> #include <iostream> #include <vector> #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,tune=native") #pragma GCC optimize("-Ofast") // solution for Hamming Distance // distance in just XOR between couple of numbers, bcs k < 30 we can use ordinary int using namespace st...
ALGO
0.999979
4.622474
{ "github_metadata": { "branch": "main", "commit_count": 221, "repo_created_at": "2023-09-22T12:04:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "515556cd26...
f3dfeb3e-6393-4ed3-866b-5d00d009def5
SachinSarin/Competative-Programming
Problem_Set_Code_Forces/Problem_17_A_Beautiful_Matrix.cpp
/* You've got a 5 × 5 matrix, consisting of 24 zeroes and a single number one. Let's index the matrix rows by numbers from 1 to 5 from top to bottom, let's index the matrix columns by numbers from 1 to 5 from left to right. In one move, you are allowed to apply one of the two following transformations to the matrix: S...
ALGO
0.999968
4.639495
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2021-06-14T06:22:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d226b62c...
2f7f6634-7707-4ff4-81f3-08953ffa295a
opencv/opencv
modules/core/src/split.dispatch.cpp
// This file is part of OpenCV project. // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html #include "precomp.hpp" #include "opencl_kernels_core.hpp" #include "split.simd.hpp" #include "split.simd_declarations.hpp" /...
TOOL
0.942045
6.720064
{ "github_metadata": { "branch": "4.x", "commit_count": 35401, "repo_created_at": "2012-07-19T09:40:17.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 83079, "forks": 56217, "issues": 2595, "pull_requests": 138 }, "file_meta": { "content_id"...
857abf36-1f1d-4c69-84d5-613ffbd0e420
passionwang/MyTest
AllTest/BinaryTreeNode.cpp
//#include<iostream> //using namespace std; // //struct BinaryTreeNode //{ // int m_nValue; // BinaryTreeNode* m_pLeft; // BinaryTreeNode* m_pRight; //}; // //BinaryTreeNode* ConstructCore(int* PreOrderStart,int* PreOrderEnd, // int* InOrderStart,int* InOrderEnd) //{ // int rootValue = PreOrderStart[0]; // Bina...
ALGO
0.999697
4.615262
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2016-05-22T15:35: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": "4cd9ca84d...
fcf2b7f8-fc1f-4f3c-9e8c-a57e423111f9
HongYoungsuk/UAV
UAVTG/UAVTrajectory/HexarotorPTPOptimization.h
#pragma once #include "PTPOptimization.h" #define USE_MAX_IN_INPUTCNT #define USE_ANALTIC_JACOBIAN static int cntForEvaluation = 0; static std::vector<irLib::irMath::Real> gFvals = std::vector<irLib::irMath::Real>(); static std::vector<irLib::irMath::VectorX> gParams = std::vector<irLib::irMath::VectorX>(); namespa...
ALGO
0.984768
4.54788
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2016-12-11T08:50: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": "8d5297913...
4f707393-40b8-4a22-ad1f-70a2721b8c2e
sahrishmustafa/OpenCL-Convolution-Performance-Analysis
OpenCL/22i0977_Q1_host_shared.cpp
#define CL_TARGET_OPENCL_VERSION 300 #include <stdio.h> #include <stdlib.h> #include <CL/cl.h> #include <string.h> #include <time.h> #include <opencv2/opencv.hpp> #include <filesystem> using namespace cv; using namespace std; namespace fs = std::filesystem; // check OpenCL errors #define CHECK_ERROR(err, msg) if (er...
DATA
0.932592
6.055737
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-03-24T20:31:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "15760ea69d8f...
32f10998-e5a8-4d82-9c2b-3375f09bd127
steciuk/PROI_1-hashing-table
src/Hash.cpp
/* <NAME> 300263 lab1 */ #include "Hash.h" #include <iostream> #include <algorithm> using namespace std; Hash::Hash() { mod = 50; } void Hash::addNumber() { int newNum; cout << "Give number: "; cin >> newNum; hashList.push_back(Hash::hashNumber(newNum)); } void Hash::addNumber(int howManyToAdd) ...
ALGO
0.933268
3.759803
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-03-19T11:26: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": "d2da8bd2a9...
8305b4ca-96b2-47ce-afe2-b0a86445a9b0
gunjan192002/LearningCpp
B_A_BIT_of_a_Construction.cpp
#include <bits/stdc++.h> using namespace std; #define mp make_pair #define pb push_back #define ff first #define ss second #define ll long long #define vi vector<int> #define vl vector<ll> #define pi pair<int, int> #define pl pair<ll, ll> #define vpi vector<pi > #define vpl vector<pl > #define endl '\n' #define SetBit...
ALGO
0.999767
3.919376
{ "github_metadata": { "branch": "main", "commit_count": 41, "repo_created_at": "2023-06-19T08:29: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": "e9c14595efb...
55aa670a-e939-4da4-8773-bf449efaf348
VastoLorde95/Competitive-Programming
SPOJ/Random/ELDORADO/el.cpp
#include<stdio.h> #include<iostream> #include<cmath> #include<algorithm> #include<cstring> #include<map> #include<set> #include<vector> #include<utility> #include<math.h> #define sd(x) scanf("%d",&x); #define sd2(x,y) scanf("%d %d",&x,&y); #define sd3(x,y,z) scanf("%d %d %d",&x,&y,&z); #define sull(x) scanf("%ull",&x)...
ALGO
0.999678
3.169401
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2017-07-25T11:08:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 171, "forks": 41, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97752e...
b78ac2a5-6b8d-4d63-8b31-375a332c51b2
ninaadps/codeforcesanswers
467Bcodeforces.cpp
#include <bits/stdc++.h> using namespace std; #define int long long int #define F first #define S second #define pb push_back #define si set <int> #define vi vector <int> #define pii pair <int, int> #define vpi vector <pii>...
ALGO
0.999981
4.285753
{ "github_metadata": { "branch": "main", "commit_count": 25, "repo_created_at": "2021-05-28T06:27:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "671c69068fd...
eaac3f6f-2131-4966-a86b-15519d52bde9
LuckyN510/CODE_PTIT
DSA/Cay nhi phan/DSA11030_KHOANG CACH GIUA HAI NODE.cpp
#include <bits/stdc++.h> using namespace std; vector<int> adj[10005]; bool visited[10005]; int parent[10005]; void bfs(int u){ queue<int> q; q.push(u); visited[u] = true; while(!q.empty()){ int curr = q.front(); q.pop(); for(int v : adj[curr]){ if(!visited[v]){ ...
ALGO
0.99992
5.050593
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2025-02-06T14:18: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": "ab23a12c1ed...
ed67a21d-cce7-48db-a315-dffc64afac54
Osama-Kawkabah/ProblemSolving
Algorithms & Problem-Solving Level 2/Problem 22-2/Problem 22-2/Problem 22-2.cpp
#include <iostream> using namespace std; int ReadNumber() { int Number; cout << "Please enter a number: "; cin >> Number; return Number; } void ReadArray(int Number, int Array_Number[]) { for (int i = 0; i < Number; i++) { cout << "Element [" << i + 1 << "]: "; cin >> Array_Number[...
ALGO
0.98458
4.771979
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-11-10T19:07: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": "52deada5d7f9...
c2d95cfd-437b-4dbf-88d1-d16e8c5ce911
hungry5656/Leetcode
medium/380_InsertDeleteGetRandomO(1)/RandomizedSet.cpp
class RandomizedSet { public: RandomizedSet() { } bool insert(int val) { if (idxMap.find(val) != idxMap.end()) return false; idxMap[val] = valVec.size(); valVec.push_back(val); return true; } bool remove(int val) { auto itr = idxMap.find(val...
ALGO
0.997224
6.178238
{ "github_metadata": { "branch": "main", "commit_count": 236, "repo_created_at": "2022-02-17T09:00:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d3bd930cb...
f1d28574-d423-44a1-b282-7632de2b2f90
evan-hossain-zz/competitive-programming
contests/Others/BigBangladeshiContest_17_11_12_H.cpp
#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <c...
ALGO
0.994783
3.287867
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2017-06-02T09:04:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 4, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "72fa18690...
c4637691-ace5-4cd2-b409-9468cccdf11b
tushar-nain/DSA_Practice
DP_Subseq_ArithmaticSlices.cpp
#include <iostream> #include <vector> using namespace std; // practice ---> https://leetcode.com/problems/arithmetic-slices/ // just the bottom up is very intuitive and makes sense, just see the reference // reference --> https://www.youtube.com/watch?v=D7PZZtvHnGo // bottom up //tabulation int numberOfArithmeticSli...
ALGO
0.997962
6.030182
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-12-09T10:09: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": "8de0fdb3232f...
6e9ade4d-a2ec-40ad-b738-593652043095
jtalman/ual-sandbox
codes/PAC/src/SMF/PacLattice.cc
// Library : PAC // File : SMF/SmfLattice.cc // Copyright : see Copyright file // Description : The implementation of the class PacLattice. // Author : <NAME> // #include <String.h> #include "SMF/PacLattices.h" #include "pcre.h" #include <string.h> #define OVECCOUNT 30 /* should be a multiple of...
TOOL
0.909145
4.650544
{ "github_metadata": { "branch": "master", "commit_count": 1290, "repo_created_at": "2015-10-31T09:25: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": "af91337...
00d07d53-c243-40b4-be3d-a8729c109364
zsmn/competitive_programming
problems/dfs/UVA_Judge_00459.cpp
#include<bits/stdc++.h> using namespace std; int subgraphs = 0; vector<int> adjacencia[50]; int percorridos[50] = {0}; void DFS(int v){ percorridos[v] = 1; for(int x = 0; x < adjacencia[v].size(); x++){ int at = adjacencia[v][x]; if(percorridos[at] == 0){ percorridos[at] = 1; DFS(at); } } } int main()...
ALGO
0.99915
3.819816
{ "github_metadata": { "branch": "master", "commit_count": 170, "repo_created_at": "2018-10-26T21:23:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 18, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76798d5...
f8b46f9b-0855-4b1d-9971-436569547c1c
Muhid-Qaiser/Data-Structures-Cpp
Beginner Practice/Adding_1_DoublyLinked.cpp
#include <iostream> using namespace std; class Node { public: int data; Node *prev; Node *next; Node(int val) : data(val), prev(nullptr), next(nullptr) {} }; class DoublyLinkedList { private: Node *head; Node *tail; public: DoublyLinkedList() : head(nullptr), tail(nullptr) {} // Ins...
ALGO
0.999912
6.938548
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-28T05:15: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": "f57a50a5faf1...
3c388fca-d157-4b16-9ae3-354bddd5b236
dejanpan/people_detector_2d_laser
features/Feature_3.cpp
#include <math.h> #include <Feature_3.h> #include <iostream> using namespace std; //---------------------------------------- // compar //---------------------------------------- int compar(const void *a, const void *b) { double *v1 = (double *)a; double *v2 = (double *)b; if ( *v1 < *v2 ) { return -1; } e...
ALGO
0.99909
4.81757
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2014-06-13T21:20:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "267402a8b4...
6334dcc3-de32-42ef-bfb8-438f5a42864f
sharma18b/Algorithmic-Library
backtracking/N-queens.cpp
#include <bits/stdc++.h> using namespace std; void printvvi(vector<vector<int>> v,int n) { for (int i=0;i<n;i++) { for (int j=0;j<n;j++) { cout << v[i][j] << " "; } cout << endl; } } bool check(vector<vector<int>> &v,int r,int c,int n) { for (int i=0;i<=r;i++) { if(v[i][c]==1) re...
ALGO
0.999931
5.107477
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2021-09-11T09:26:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51f6fd7ed...
00ccbff0-6ff3-464b-a249-56b2333c33ad
lijinggai/cpp
leetcode._11_25.809/源.cpp
class Solution { public: int expressiveWords(string s, vector<string>& words) { int ret = words.size(); for (auto& word : words) { int i = 0, j = 0; while (i < s.size() || j < word.size()) { //其中有一个结束了,另一个没结束 if (i == s.size...
ALGO
0.999918
5.486029
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2022-08-30T09:42:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4eb52195130...
12289d75-d222-401e-99b3-d7f47eedfa82
MohitSaraya2005/Java-
A_Dubstep.cpp
#include <bits/stdc++.h> using namespace std; int main() { string song; cin >> song; int length= song.length(); int array[100]; int j=0,temp=0; for(int i=0;i<(length-2);i++) { if(song[i]=='W' && song[i+1]=='U' && song[i+2]=='B') { array[j]=i; ...
ALGO
0.999648
3.127313
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-12-28T04:22: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": "b629a904dcc1...
73032985-fe67-45a1-a99b-12052242ba32
gaoyuanhezhihao/Door_Detection_Tracking
indoor_navigation_by_door/indoor_navigation_by_door/main_func.cpp
#include "main_func.h" /* judge the result of door detection. *------------------------------------------------------------------------ @current_mode: the mode of this system. set it to "tracking" if we need to switch to tracking mode. @target: tracked target. updated for every frame. @curr_door_states: got door or ...
ALGO
0.991789
4.169064
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2016-06-19T02:45:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a1028b35e1...
f4f6ef1e-b1ea-40d9-beb5-3f2740827c70
Veraph/LeetCode_Practice
hards/TSP/hdu5418.cpp
#include <iostream> #include <cstring> #include <vector> #include <climits> #include <algorithm> using namespace::std; const int INF = 0x3f3f3f3f; const int maxN = 16; int map[maxN][maxN]; int dp[(1 << 16)][maxN]; int main() { int T; cin >> T; while (T--) { memset(dp, INF, sizeof(dp)); memset(...
ALGO
0.999967
4.23108
{ "github_metadata": { "branch": "master", "commit_count": 203, "repo_created_at": "2020-06-18T18:58: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": "43fb6816...
75911858-a49e-43f9-8783-3f31edc3d6be
soarpenguin/code-sample-c
leetcode/stringPath.cpp
#include <stack> #include <iostream> #include <string.h> //#include <memory> //using namespace std; struct position { int x; int y; }; struct position up = {0, -1}; struct position right = {1, 0}; struct position down = {0, 1}; struct position left = {-1, 0}; struct position dir[] = {up, right, down, left}; bool ...
ALGO
0.999986
3.84933
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2012-11-15T11:55:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cef82e602...
97cc9229-1e86-4df1-a136-5194b557b534
DivyaMusahib/Codeforces-Solutions
Battle_Cows.cpp
#include<bits/stdc++.h> using namespace std; int main(){ int t; cin >> t; while(t--){ int n,k; cin >> n >> k; vector<pair<long long, long long>>arr(n); for(int i=0; i<n; i++){ cin >> arr[i].first; arr[i].second = i; } int max...
ALGO
0.999916
4.920598
{ "github_metadata": { "branch": "main", "commit_count": 249, "repo_created_at": "2024-02-06T10:36: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": "e4164f0838...
0fcbc033-71e6-47be-851d-13703ea4b94a
mukund26/coding
codejam/kb_18_nonine.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair <int, int> ii; typedef vector< ii > vii; typedef vector <int> vi; bool digit_sum(ll n){ // base case: if n<10 return sum of // first n natural numbers if (n<10) return n*(n+1)/2; // d = number of digits minus one i...
ALGO
0.99983
4.545788
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-07-05T09:34: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": "9649f8ad4...