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
55c20dd4-d7f3-405b-8152-72253739a9f7
jtlap/nt2
modules/core/linalg/include/nt2/linalg/functions/linsolve.hpp
//============================================================================== // Copyright 2003 - 2012 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2012 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // ...
TOOL
0.970614
5.789264
{ "github_metadata": { "branch": "master", "commit_count": 14374, "repo_created_at": "2010-11-02T16:07:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 40, "forks": 39, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7e3...
b784ea25-bc48-4570-b166-26a0e653f662
IntelLabs/pmgd
util/neighbor.h
/** * @file neighbor.h * * @section LICENSE * * The MIT License * * @copyright Copyright (c) 2017 Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without rest...
ALGO
0.987371
6.490279
{ "github_metadata": { "branch": "develop", "commit_count": 725, "repo_created_at": "2018-02-07T19:22:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 43, "forks": 9, "issues": 11, "pull_requests": 3 }, "file_meta": { "content_id": "90c669...
92d93462-bfdb-48b7-a597-f2cd9f37929c
kynp28/007
ch9-ex1.cpp
#include <iostream> using namespace std; bool seqSearch(int list[], int size, int target, int& locn) { int looker = 0; while (looker < size && target != list[looker]) { looker++; } locn = looker; bool found; if (looker < size && target == list[looker]) { found = true; } else...
ALGO
0.999404
5.309201
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-12-09T06:45:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9ed1e95225b8...
af9400e6-b740-4156-9af4-307dd10380f1
alexandraback/datacollection
solutions_5658068650033152_1/C++/sergeif/CodeJam.cpp
#include <cstdio> #include <iostream> #include <string> #include <cmath> #include <vector> #include <map> #include <set> #include <algorithm> using namespace std; typedef long long LL; typedef long double LD; typedef vector<int> VI; typedef vector<string> VS; typedef pair<int,int> PII; #define FOR(k,a,b) for(typeof(a...
ALGO
0.999974
3.947401
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94ccfdaf4...
ccb52d05-3fab-43bd-9d82-f2586f8fe12c
u-noob-i/ACD-Ladder
GCounttheTrains.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update> using namespace std; #define ll long long #define ull unsigned long long #define INF 1e18...
ALGO
0.99998
3.952197
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-11-03T03: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": "bc05089f562c...
d74a2884-ac07-4d56-8a19-9e893d0c2ba2
torquecoder/InterviewBit-Solutions
Arrays/N by 3 Repeat Number.cpp
int Solution::repeatedNumber(const vector<int> &A) { int n = A.size(); int elem1 = INT_MAX, elem2 = INT_MAX; int cnt1 = 0, cnt2 = 0; for (int i = 0; i < n; i++) { if (cnt1 > 0 && A[i] == elem1) cnt1++; else if (cnt2 > 0 && A[i] == elem2) cnt2++; else if (cnt1 == 0) ...
ALGO
0.999905
4.838372
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2017-06-23T06:59:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f203229c...
b5dee460-7479-49a5-8ba9-cd95ec17a243
VivekChatterjee/Data-Structures-and-Algorithms-2
0988-smallest-string-starting-from-leaf/0988-smallest-string-starting-from-leaf.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999975
5.700184
{ "github_metadata": { "branch": "master", "commit_count": 1983, "repo_created_at": "2022-12-13T05:28:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee7b752...
4e3848d6-5474-40c2-8e53-1235c1229304
raincross7/code-similarity
codes/train_code/problem236/problem236_111.cpp
#include <iostream> #include <utility> #include <map> #include <vector> #include <algorithm> #include <queue> #include <math.h> #include <stack> #include <set> #include <deque> #include <cmath> #include <cassert> using namespace std; typedef long long ll; ll mod = 1e9+7; #define rep(i,n) for(int i = 0; i < (n); ++i) ...
ALGO
0.999925
3.653635
{ "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": "fe021cae5395...
5a1bb94a-f35c-4483-ba7d-b6fb834815aa
rafiullah007/Open-Kattis
Is Y a Vowel.cpp
#include <iostream> #include <string> using namespace std; /* MD. <NAME> UNIVERSITY : UNIVERSITY OF ASIA PACIFIC STUDENT ID : 22101150 (UAP,DHAKA,BANGLADESH) COLLEGE : ADAMJEE CANTONMENT COLLEGE STUDENT ID : 181063 (ACC,DHAKA,BANGLADESH) */ int main() { string s; cin >> s; ...
ALGO
0.998795
4.195837
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2023-12-24T09:47: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": "0a5c1178b93...
8dbd0452-bc47-4c53-909c-000481ca7e8f
arubhardwaj/fqr
src/RcppExports.cpp
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: <PASSWORD> #include <RcppArmadillo.h> #include <Rcpp.h> using namespace Rcpp; // fast_rexp arma::vec fast_rexp(int n); RcppExport SEXP _fqr_fast_rexp(SEXP nSEXP) { BEGIN_RCPP Rcpp::RObject rcpp_result_gen; Rcpp::RNGSco...
ALGO
0.942574
5.577137
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2021-05-14T15:13:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2c1d3fb0828...
80518635-b4e7-42a4-9037-22bb5046a7db
HEltim7/cpcode
CF/Round/851/E_Sum_Over_Zero.cpp
#include <vector> #include <iostream> #include <algorithm> using namespace std; // #define ONLINE_JUDGE #ifndef ONLINE_JUDGE #include <heltim7/debug> #else #define debug(...) 7 #endif #define endl '\n' using LL=long long; constexpr int N=2e5+10,INF=1e9; LL pre[N]; int arr[N]; struct SegmentTree { #define lch (u<...
ALGO
0.999983
3.959462
{ "github_metadata": { "branch": "master", "commit_count": 249, "repo_created_at": "2022-06-06T13:55:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0d7d5030...
6af6601b-f779-4580-bdf0-50b748a15299
zjsxzy/algo
UVALive/NEERC-2006/P3710.cpp
#include <map> #include <set> #include <list> #include <cmath> #include <queue> #include <stack> #include <bitset> #include <vector> #include <cstdio> #include <string> #include <sstream> #include <cstdlib> #include <cstring> #include <iostream> #include <algorithm> using namespace std; #define PB push_back #define MP ...
ALGO
0.999807
3.829672
{ "github_metadata": { "branch": "master", "commit_count": 1296, "repo_created_at": "2013-05-18T10:52:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4623ad5...
9cab8122-eeda-4d95-8985-066e856e3838
shhisau/AOC-2021
Day1/Day1.cpp
#include <fstream> #include <vector> #include <iostream> // // Created by <NAME> on 12/1/21. // using namespace std; void part_one( ifstream &myfile ) { uint increased_count = 0; uint decreased_count = 0; string line; string previous_line; // file is good, lets read each line while ( getline( myfile, li...
ALGO
0.997508
5.520178
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2021-12-01T16:58: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": "fd33adf50...
cb4e6c41-719e-41cd-9eea-5e479e7edfb4
Alexis2311EsimeZ/calculadora-de-matrices-y-los-vectores-me-equivoque-en-subirlos-jejejej
Vectores.cpp
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <conio.h> using namespace std; void menu (); void leer_opcion(int &opt); void printVector(int Vector[], int size); void printVectorF(double Vector[], int size); void scanVector(int Vector[], int size); void suma(int v1[3],int v2[3],int *ptr); void rest...
TOOL
0.976718
3.108527
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-11-28T00:59: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": "63513ce9ba...
bfa84b39-3c68-4f55-8d85-1513e566bfd2
ARM-software/armnn
src/backends/reference/workloads/Pooling3d.cpp
// // Copyright © 2021 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // #include "Pooling3d.hpp" #include <armnn/Exceptions.hpp> #include <armnn/Types.hpp> #include <armnnUtils/DataLayoutIndexed.hpp> #include <armnn/utility/NumericCast.hpp> #include <limits> #include <algorithm> #in...
ALGO
0.996614
7.02578
{ "github_metadata": { "branch": "branches/armnn_25_02", "commit_count": 3679, "repo_created_at": "2018-03-09T12:11:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1275, "forks": 323, "issues": 2, "pull_requests": 0 }, "file_meta": { "con...
a2633cad-7908-46ba-b27e-2baefbc0814b
LogicJake/qemuX
code/thread1/sort.cpp
#include <stdlib.h> #include <stdio.h> #include <pthread.h> #include <time.h> #define N 20 int *array; struct param { long long start; }; void swap(int*a,int*b) { int temp; temp=*a; *a=*b; *b=temp; } void *select_sort(void *arg) { struct param *param; param = (struct param *)arg; int i,j...
ALGO
0.999987
3.947854
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2018-04-22T01:20:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "647a2893d...
16e05a71-8c0a-4619-b2ec-7d9d517af620
HassanMahmoud22/dots-and-boxes
main.cpp
#include <bits/stdc++.h> using namespace std; const int N = 5; const int M = 5; const int n_players = 2; char marks[n_players] = {'X', 'O'}; int count_boxes[n_players]; char grid[N-1][M-1]= {'.'}; bool horizontal_grid[N+1][M]; bool vertical_grid[N][M+1]; //This function prints the grid of Dots-and-Boxes as the game pro...
ALGO
0.999955
4.507076
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-04-11T16:59: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": "115fa23ba723...
f50f3117-be78-44a1-b0ee-e3167cc83c7d
SamSkull19/XPSC
Week-19/Day-6/IvaPav.cpp
#include<bits/stdc++.h> #define endl '\n' #define ll long long using namespace std; const int N = 2e5 + 5; ll a[N], dp[4 * N]; void build(int n, int b, int e){ if(b == e){ dp[n] = a[b]; return; } int mid = (b + e) / 2; int l = 2 * n; int r = (2 * n) + 1; build(l, b, mid); ...
ALGO
0.999984
4.742273
{ "github_metadata": { "branch": "main", "commit_count": 427, "repo_created_at": "2024-10-26T21:57: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": "0d70340a89...
a394c06c-e00a-45a2-a149-fb5ea54a4447
setak482/2023_BOJ_solved
BOJ_Platinum/P5/2150.cpp
#include <bits/stdc++.h> using namespace std; int visited[10001], num[10001], low[10001], vertex, edge, cnt; vector<int> graph[10001]; vector<vector<int>> scc; stack<int> stk; void dfs(int cur){ visited[cur] = 1; num[cur] = ++cnt; low[cur] = cnt; stk.push(cur); for(auto& i : graph[cur]){ if(...
ALGO
0.99999
4.501661
{ "github_metadata": { "branch": "master", "commit_count": 88, "repo_created_at": "2023-07-24T07:49: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": "e14c4fa90...
f6395f09-a18c-4ba1-bfb1-8d03c2f259b9
jaopdc11/pointers-studies
trees/avl_tree.cpp
// avl_tree.cpp // This file demonstrates an AVL tree implementation using pointers in C++. // AVL trees are self-balancing binary search trees. This example supports insertion and in-order traversal. #include <iostream> #include <algorithm> using namespace std; // Node structure for the AVL tree struct Node { i...
ALGO
0.998475
7.147685
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-05-19T17:11:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a0e487f28cb3...
c4ce8b29-be73-4796-aa88-270079d28839
wiki-152/Data_Structures
Tasks/Final Exam/Solutions/C++/Solutions/i222469_Waqas_E_BSSE_Q2.h
#pragma once #include <iostream> #include <string> using namespace std; class Algo { public: int frequency[28]; Algo(); ~Algo(); void updateFrequency(string a); }; Algo::Algo() { for (int i = 0; i < 28; i++) { frequency[i] = 0; } } Algo::~Algo() { } void Algo::updateFrequency(string a) { cout << ...
ALGO
0.999218
3.114147
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-08-12T10:43: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": "128cadb83190...
d3a17258-7c9a-4f28-93b4-361f2f646081
tjrgus1213/Algorithm
Baekjoon/톱니바퀴.cpp
#include<iostream> #include<math.h> using namespace std; int gear[4][8]; void func(int pos, int dir, int lr); int main() { int K, temp; for (int i = 0; i < 4; i++) { cin >> temp; for (int j = 7; j >= 0; j--) { gear[i][j] = temp % 10; temp /= 10; } } cin >> K; int pos, dir; for (int i = 0; i < K; i...
ALGO
0.999417
3.513638
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2019-09-28T07:12: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": "219980e17...
bbe03945-8241-45cc-8867-435c382d7b54
swapnilgt/codingpractise
dailycodingproblem/problem27/solution.cpp
#include<iostream> #include<stack> using namespace std; bool isBalanced(string s) { stack<char> myStack; int i = 0; while(i < s.length()) { char c = s.at(i); cout << "Next char is " << c << endl; if(c == '}' || c == ')' || c == ']') { char openingChar; switch(c) { case '}': ...
ALGO
0.995953
6.074821
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2019-03-18T09:45:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff97b3222...
9594c151-5423-436b-95ed-ae91e5570c49
riteme/test
hw/2019-11-22/E.cpp
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define NMAX 40000 struct Edge { int v, w, nxt; }; static int n, q; static Edge e[2 * NMAX + 10]; static int G[NMAX + 10]; int dfs(int x, int t, int dist, int fa) { if (x == t) return dist; for (int i = G[x]; i; i = e[i].nx...
ALGO
0.999953
4.260378
{ "github_metadata": { "branch": "master", "commit_count": 550, "repo_created_at": "2015-04-26T07:16:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "9ba7108d...
8785729e-c358-48fa-b402-d9fc192eb410
pohjoiseen/AoC2024
13-2.cc
#include <iostream> #include <string> #include <vector> #include <cstdio> #include <cmath> using Input = std::vector<std::tuple<int, int, int, int, int, int>>; Input readInput() { Input input; std::string line; while (!std::cin.eof()) { auto &tuple = input.emplace_back(); std::getline...
ALGO
0.993377
4.290016
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-12-15T14:36: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": "4291ee24a9...
ae0dfb62-bf08-4ce7-904b-2f37ec6b58f4
tanishqg5325/CodeChef
INTRPATH.cpp
#include <bits/stdc++.h> #define pb push_back #define N 300000 #define LN 19 using namespace std; typedef long long ll; vector<int> adj[N]; int pa[LN][N], depth[N]; ll subsize[N], subsize_sq[N], weights[N], cum_weights[N]; int LCA(int u, int v) { if(depth[u] < depth[v]) swap(u,v); int diff = depth[u] - depth[v]; f...
ALGO
0.999783
4.142719
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2018-03-30T20:55:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0fa97d5ec...
0595273d-9f27-43d9-b015-8847c74b8e45
LinkStartNow/DataStructures
学习笔记666/DP/区间DP/矩阵取数游戏(高精度+区间DP).cpp
#include<bits/stdc++.h> #define ll long long #define run(i, a, b) for(int i = a; i <= b; i ++) #define rep(i, a, b) for(int i = a; i >= b; i --) #define x(i) x = i << 1 #define y(i) y = i << 1 | 1 #define m(l, r) m = (l + r) >> 1 #define t() int t; cin >> t; while(t --) //#define t(i) int t; cin >> t; run(i, 1, t) #de...
ALGO
0.999963
3.253138
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2022-11-24T14:18: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": "d7073fc3c2d...
d996259f-2815-4ca3-a953-a0aafa6b18c4
ritmojs/Algorithms
DS_ALGO/Binary Trees/CPP/Binary_Search_Tree.cpp
// This is Full Binary Search Tree with Insertion, Deletion, Search and inorder_Traversal of tree with user interaction (kind of application) // As well as the time complexity of each function #include <iostream> using namespace std; #define ll long long #define endl "\n" //---------- <NAME> ----------// class Node {...
ALGO
0.999844
4.816034
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2021-10-03T06:16:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 8, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "751505be6...
bb521cc5-b4ae-48d1-8897-82b20c33c496
271812697/opengl
PolygonDemo/Vertex.cpp
#include"Vertex.h" /* * 判断两条线段是否有点在对方线段上 */ std::vector<Vertex> VertexOnLine(LineSegment line1, LineSegment line2) { std::vector<Vertex> ans; if (Intersection(line1.p1, line2)) { ans.push_back(line1.p1); } if (Intersection(line1.p2, line2)) { ans.push_back(line1.p2); } if (Int...
ALGO
0.999894
4.342543
{ "github_metadata": { "branch": "main", "commit_count": 114, "repo_created_at": "2022-11-30T14:42:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "49e0d16e97...
4aa46739-48c0-4d0e-9afc-94bc632a0e31
anandpaithankar/coding-problems
problems/construct_binary_tree_from_preorder_and_inorder_traversal/solution.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: int search(vector<int>& inorder, int start, int end, int val) { for (int i = start; i <...
ALGO
0.999996
6.44215
{ "github_metadata": { "branch": "master", "commit_count": 184, "repo_created_at": "2019-02-16T00:48:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ec3200d...
4057927b-755b-4744-9846-f4fe63606172
rbfx/rbfx
Source/ThirdParty/crunch/crnlib/crn_dxt_endpoint_refiner.cpp
// File: crn_dxt_endpoint_refiner.cpp // See Copyright Notice and license at the end of inc/crnlib.h #include "crn_core.h" #include "crn_dxt_endpoint_refiner.h" #include "crn_dxt1.h" namespace crnlib { dxt_endpoint_refiner::dxt_endpoint_refiner() : m_pParams(NULL), m_pResults(NULL) { } bool dxt_endpoint_ref...
ALGO
0.97229
5.16423
{ "github_metadata": { "branch": "master", "commit_count": 15508, "repo_created_at": "2016-03-20T15:41:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 933, "forks": 152, "issues": 57, "pull_requests": 37 }, "file_meta": { "content_id": "7...
c9fa0fa7-4d80-4221-b5ba-e4a9c99933b3
KarimElsayad247/operating-systems-course
replacement-algorithms/replacement-algorithms/main.cpp
#include <iostream> #include <string> #include <vector> #include <iomanip> #include <list> #include <algorithm> using namespace std; /* * Utility funcitons that handle printing */ void printHeader(string policy) { cout << "Replacement Policy = " << policy << endl; cout << "---------------------------------...
ALGO
0.988979
4.565442
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2020-11-25T09:09: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": "18edeb447ce9...
8a0397f7-257a-4b19-89a0-9dff5d585b5b
le-incroyable1-dev/competitiveProgramming
leetcode/weekly319/2471.cpp
/* There is a limit to power and ability but not to hope and belief! --------------------------------------- Author : <NAME> */ #include<bits/stdc++.h> using namespace std; #define mod 1000000007 #define pb push_back #define mp make_pair #define fi first #define sec second typedef long long ll; typedef long d...
ALGO
0.999957
4.674159
{ "github_metadata": { "branch": "main", "commit_count": 463, "repo_created_at": "2021-04-19T05:06:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "36ac34c5f5...
f3bdf0a7-6948-4f52-a9ba-12d1169411a4
FredrikWallstrom/Kattis
kattis/turbo/Turbo.cpp
/* -*- Mode: C++ -*- */ /** * Author: <NAME> * Date: 29/1 -18 * * Comments: Fenwick tree solution. Create fenwickTree with only 1:s. Save the indexes for the incoming values * and iterate over them, for every index subtract one from the fenwickTree and than take the range_sum. * * Lessons Learned...
ALGO
0.999985
4.099707
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2018-01-15T10:31:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48caafb06...
8a87588b-7dcb-4e4a-aeac-859c73281431
ZakharTS/aisd_lab
lab3/task2/main.cpp
#include <iostream> #include "queue.h" using namespace std; void queue_fill(struct queue *A, struct queue *B); struct queue *to_one_queue(struct queue *A, struct queue *B); struct queue *to_one_queue_sorted(struct queue *A, struct queue *B); int main() { struct queue *A = queue_init(), *B = queue_init(); q...
ALGO
0.998971
4.88543
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2022-03-30T17:42: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": "6a4f92e00a9...
33ac402c-c64a-4aab-b2d4-455951b2a993
woodart8/Learning-Algorithm-CPP
15685.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; #define endl '\n' #define MAX 101 struct Curve { int x,y,d,g; vector<int> dir; //그리는데 필요한 방향 배열 }; int N; bool map[MAX][MAX]; //드래곤 커브가 해당 좌표를 지나가는 지 확인하는 배열 int nxt[4] = {1,2,3,0}; //시계방향으로 돌렸을 때 다음 방향 int dy...
ALGO
0.999745
4.358964
{ "github_metadata": { "branch": "main", "commit_count": 148, "repo_created_at": "2023-12-11T12:31:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c71edc68f4...
661570c2-2294-49de-b6aa-0b3a20d545bb
ishandutta2007/codeforces-l
linkus/normal/1336/B.cpp
#include <stdio.h> #include <algorithm> #include <vector> #include <queue> #include <deque> #include <set> #include <map> #include <stdlib.h> #include <ctime> #include <climits> #include <cmath> #include <complex> #include <iostream> #include <cctype> #include <cstring> #include <numeric> #include <bitset> #include <st...
ALGO
0.999798
4.44523
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f390a49f292...
af5124b4-386a-49ea-8ec1-8ac56a61b092
afane20/testPlan
src/main/webapp/cs213/public_html/cs313/uploads/brycejp.cpp
/*************************************************************************** * Program: * Assignment 01, OOP Review * <NAME>, CS 235 * Author: * <NAME> * Summary: * This program helps us to make a Set of integers. ***************************************************************************/ #include <i...
TOOL
0.983404
4.851498
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2015-03-27T02:09:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "967bf8e5f...
6f810272-4f30-4075-8822-a7f9c2fb2129
dragon-web/Cpp_practice
help/help/help.cpp
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<malloc.h> #include<Windows.h> #define MAXV 5 //最大顶点个数 #define INF 32767 //定义 ∞ //∞ == INF ,int 型的最大范围(2位)= 2^(2*8-1),TC告诉我们int占用2个字节,而VC和LGCC告诉我们int占用4个字节 //图:Graph //顶点:Vertex //邻接:Adjacency //矩阵:Matrix //表:List //边:Edge //深度优先遍历:Depth First Searc...
ALGO
0.999974
3.646912
{ "github_metadata": { "branch": "master", "commit_count": 227, "repo_created_at": "2020-03-05T08:34:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1935c6d6...
40b30314-fcaa-43b4-a5ba-0f5b39ff1bec
sparshgoyal2014/cppCodes
dsQueue.cpp
#include<iostream> using namespace std; struct Queue{ int size; int front; int rear; int *Q; }; void enqueue(Queue *q, int x){ if(q->rear == q->size - 1) cout << "Queue is full" << endl; else{ q->rear++; q->Q[q->rear] = x; } } int dequeue(Queue *q){ int x = -1;...
ALGO
0.998637
3.733787
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-04-19T16:21: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": "3fb2b666aa...
53924739-2635-4daf-926a-32832539b826
Sookmyung-Algos/2023algos
algos_assignment/전유정_bboroo626/여름방학_스터디/Day1/10000.hpp
#include <iostream> #include <vector> #include <stack> #include <queue> #include <algorithm> #include <cmath> #include <string> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; vector<pair<ll, int>> vec; int main() { int N; cin >> N; for (int i = 0; i < N; i++) ...
ALGO
0.999646
3.502534
{ "github_metadata": { "branch": "main", "commit_count": 476, "repo_created_at": "2023-03-26T12:38:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 11, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "9251bf3f14...
1888171b-669a-4141-9dfa-b6f787459059
ExRoc/problem-record
HDU/2018_Multi_University_Training_Contest_9/B_Rikka_with_Seam.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int maxn = 2000 + 100; const int MOD = 998244353; int T, n, m, k; char str[maxn][maxn]; int dp[maxn][maxn], sub[maxn][maxn]; int main() { ios::sync_with_stdio(false); scanf("%d", &T); while (T--) { scanf("%d%d%d", &n, &m, &...
ALGO
0.999973
4.567416
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2024-06-29T11:24: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": "6241e8e0e...
67818054-1feb-4d27-927a-7ba1590eba2f
MueFab/genie
src/genie/entropy/gabac/decode_transformed_sub_seq.cc
/** * Copyright 2018-2024 The Genie Authors. * @file * @copyright This file is part of Genie. See LICENSE and/or * https://github.com/MueFab/genie for more details. */ #include "genie/entropy/gabac/decode_transformed_sub_seq.h" #include <algorithm> #include <cassert> #include <limits> #include <vector> #include...
ALGO
0.996665
7.250558
{ "github_metadata": { "branch": "main", "commit_count": 2138, "repo_created_at": "2018-05-10T19:23:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 45, "forks": 6, "issues": 13, "pull_requests": 0 }, "file_meta": { "content_id": "f9cb5ad...
d64e1bb8-c97b-4ea6-8bb2-875aeaa760b0
diliscia/Codingame
Power Of Thor - Episode 1/Power Of Thor - Episode 1.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; /** * Auto-generated code below aims at helping you parse * the standard input according to the problem statement. * --- * Hint: You can use the debug stream to print initialTX and initialTY, if Thor seems not follow...
ALGO
0.999923
4.730232
{ "github_metadata": { "branch": "master", "commit_count": 346, "repo_created_at": "2020-02-22T22:22: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": "9666261d...
9fb525cc-006a-40f9-b841-d1c2d2a14509
happymink/DataStruct_C
HW1/HW1/h1.cpp
//////////////////////////////////////////////////////////////// // // 작성자 : 이민균 // 작성일 : 2022년 03월 12일 // 프로그램명 : 파일입출력을 이용한 사용자 정의 n개의 데이터 출력 및 최대값,최소값 출력 // 프로그램설명 : 파일입출력을 통해 사용자가 임의로 정한 개수만큼 데이터를 출력함과 동시에 최대값과 최소값을 판별한다. // // //////////////////////////////////////////////////////////////// #define _CRT_SEC...
ALGO
0.998945
3.763558
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-03-04T03:21: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": "64b8cee0a7a...
b7c8a150-75fd-4ddf-98e0-4e9e4c25752b
ovcg/PG-P2-16
main.cpp
#include <iostream> #include <GL/glut.h> #include <vector> #include "ponto.h" #include "mathutil.h" #include <math.h> #include <fstream> #include <string> #define PI 3.1415926535 const int WINDOW_W = 500; const int WINDOW_H = 500; std::vector <Ponto> pontos; bool pontosControle = true; bool poligonalCtrl = true; bool...
TOOL
0.904981
4.40938
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-11-05T21:37: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": "d14e7a6d5d...
38703c8c-3a7b-48a1-ae07-84a40286393c
developer-mohitsoni/DSA-A2Z
Step 03 - Solve Problems on Arrays Easy, Medium, Hard/#2 Medium/28. Set Matrix Zeroes/Optimal Approach/Set_Matrix_Zeroes.cpp
//! Program for Set Matrix Zeroes #include <bits/stdc++.h> using namespace std; //?------------------(Optimal Force Approach)------------------------------ //* T.C = O(2 * (N * M)) //* S.C is O(1). void setMatrixZeroes(vector<vector<int>> &matrix, int n, int m) { // int row[n] = {0}; : -> matrix[..][0] // i...
ALGO
0.99903
5.608279
{ "github_metadata": { "branch": "main", "commit_count": 516, "repo_created_at": "2024-12-03T14:35: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": "113ca1e3b4...
467a8269-7425-4bb3-a713-c185d9ab96a2
Qian-Li/MIC2
src/util.cpp
#include "MIC.h" // // [[Rcpp::depends(RcppArmadillo)]] // [[Rcpp::plugins(cpp11)]] // /***********************************************************************************/ /* mixpr: marginal mixing probability */ /*************************************************************...
ALGO
0.999256
5.482601
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2017-05-06T03:20: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": "959c675ed...
f24181fd-db4a-45a4-b055-f39541b42f24
facebookresearch/fastText
src/model.h
/** * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <memory> #include <random> #include <utility> #include <vector> #include "matrix.h" #inc...
DATA
0.916429
7.19874
{ "github_metadata": { "branch": "main", "commit_count": 391, "repo_created_at": "2016-07-16T13:38:42.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26280, "forks": 4779, "issues": 466, "pull_requests": 89 }, "file_meta": { "content_id": "e...
3719d067-d08c-4df0-87ab-089e26499c72
kazuma8128/procon-lib
Graph/dijkstra.cpp
// function ver using Cost = int; const Cost INF = 2e9; struct edge { int from, to; Cost cost; edge() {} edge(int f, int t, Cost c) : from(f), to(t), cost(c) {} }; using edges = vector<edge>; using graph = vector<edges>; vector<Cost> dijkstra(const graph& G, int s) { int n = G.size(); vector<Cost> d(n, INF); ...
ALGO
0.999829
4.806127
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2017-12-06T03:18:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "615fc99b9...
a3c73984-4daa-4ff5-9726-7236150bf65d
minhvpham/Competitive_Programing
codeforces/thswaps.cpp
// Onegai no bug // Author : 13minusone #include<bits/stdc++.h> using namespace std; #define task "akarui" #define SZ(c) (c).size() #define getbit(x,i) (((x) >> (i)) & 1) #define turnoff(x,i) (x)&(~(1<<(i))) #define __builtin_popcount __builtin_popcountll #define all(x) (x).begin(),(x).end() #define pb(x) push_back(x) ...
ALGO
0.999901
4.664715
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-10-11T15:35: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": "6c9f742e9b10...
55203090-5f23-441e-885e-702088b4dc22
jrl-umi3218/RBDyn
src/RBDyn/RBDyn/Joint.h
/* * Copyright 2012-2019 CNRS-UM LIRMM, CNRS-AIST JRL */ #pragma once // includes // std #include <cmath> #include <sstream> #include <stdexcept> #include <string> #include <vector> // SpaceVecAlg #include <SpaceVecAlg/SpaceVecAlg> namespace rbd { /** * Utility function to compute a rotation matrix from the par...
TOOL
0.914356
6.561255
{ "github_metadata": { "branch": "master", "commit_count": 667, "repo_created_at": "2012-03-16T15:22:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 196, "forks": 51, "issues": 8, "pull_requests": 5 }, "file_meta": { "content_id": "b89d7e...
cbcc7034-dd79-493e-bb67-4112922e49e3
a1024/acc2
Archive/src/acc2_math.cpp
#include "include/math.h" #include "include/stdlib.h" int maximum(int a, int b){return a>b?a:b;} int minimum(int a, int b){return a<b?a:b;} int clamp(int lo, int x, int hi) { if(x<lo) x=lo; if(x>hi) x=hi; return x; } int mod(int x, int n) { x%=n; x+=n&-(x<0); return x; } int first_set_...
ALGO
0.998711
3.864394
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2021-07-21T05:27: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": "2fb8f976d68...
78fcb88d-c198-4fdd-a36b-4ebdfb68df87
ChoiWooCheol/ICHTHUS-planner
common/op_planner/include/op_planner/control/op_acc.h
/// \file op_acc.h /// \brief PID based velocity controller /// \author <NAME> /// \date September 02, 2020 #ifndef VELOCITY_CONTROLLER_H_ #define VELOCITY_CONTROLLER_H_ #include "op_planner/RoadNetwork.h" #include "op_utility/UtilityH.h" #include "op_planner/PlannerCommonDef.h" namespace PlannerHNS { class ACC { ...
ALGO
0.965271
6.051873
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2020-09-04T13:52:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e1c59605f...
67e45f93-7702-49c5-af4d-f9bcc73a4fc8
samarthsingla/CP
CP/ICOPRAC/inoi2020_1.cpp
#include<bits/stdc++.h> using namespace std; #define f(i, s, e) for(int i = s; i < e; i++) const int MAX = 100001; int n, e; vector<int> adj[MAX]; int mdep[MAX], p[MAX], mindep[MAX], maxdep[MAX]; int gethead(int i){ int temp = i; while(p[temp] != temp){ temp = p[temp]; } int head = temp; tem...
ALGO
0.999969
3.614195
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-05-15T15:12: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": "0adb9870a3...
80456744-4546-4008-8bfe-ac22f64693e3
thepravin/DSA-Problems
Binary Search/parataSpoj.cpp
// https://www.spoj.com/problems/PRATA/ #include<iostream> #include<vector> #include<algorithm> using namespace std; bool isPossible(vector<int>cookRank,int np,int mid) { int currP = 0; // initial cooked prata for(int i=0;i<cookRank.size();i++) { int R = cookRank[i]; int j=1 , timeTaken = 0; while(...
ALGO
0.99999
4.426411
{ "github_metadata": { "branch": "main", "commit_count": 135, "repo_created_at": "2023-09-19T15:22: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": "5585639949...
ff4cdf11-a479-4c0d-8878-77f968927bb6
alexandraback/datacollection
solutions_1673486_1/C++/Adonais/a.cpp
#include <cstdio> using namespace std; int main() { int t, T; int i, j, n, a, b; double p[100002]; double op; double ans; scanf("%d", &T); for (t = 1; t <= T; t++) { ans = 0; scanf("%d %d", &a, &b); for (i = 0; i < a; i++) { scanf("%lf", &p[i]); } for (i = 1; i < a; i++) { p[i] *= p[i - 1]...
ALGO
0.999278
3.176791
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b71b54f97...
2a3a4061-a8bf-4358-b3dc-3594270d943b
Rodrigo61/GUAXINIM
icpcarchive/2728/main.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define db(x) cerr << #x << " = " << x << endl; #define INF 0x3f3f3f3f #define fi first #define se second #define vi vector<int> #define vll vector<ll> #define all(x) x.begin(), x.end() #define pii pair<int, int> #define pll pair<ll, ll> #define vii v...
ALGO
0.999864
3.565024
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2018-03-16T13:30:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a41af79b...
f876b3af-59e9-4e67-a3f5-bc7b622c0c00
ishandutta2007/codeforces-l
luhong/normal/1081/E.cpp
#include <cstdio> #include <iostream> #include <set> #include <map> #include <vector> #include <algorithm> #include <cstring> long long x[101000]; int Abs(int x) {return x > 0 ? x : -x;} int main() { int n; scanf("%d", &n); for(int i = 2; i <= n; i += 2) scanf("%lld", &x[i]); long long lst = 0; for(int i = 2; i...
ALGO
0.999923
3.378139
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:17:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6a3ba9163a1...
16084559-4ac2-431e-8581-94683fd26f73
Kramekjvp/UEPG
2ºAno/Estrutura de Dados/Pilha/pilha.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #define MAX 100 typedef struct { int dados[MAX]; int topo; } Pilha; int palindromo(){ char palavra[30], copia[30]; int i, tamanho, iguais = 0; printf("Digite uma palavra: "); scanf("%s", palavra); tamanho = strlen(palavra); f...
ALGO
0.998805
4.621211
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-03-16T22:18: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": "3f1ad7e08a1...
620a5301-b3ff-4ccd-b262-061f5c3940a4
ashutosh7i/CPP_ProblemsDSA
Concepts/Recursion/Recurison.cpp
//What is Recursion? //The process in which a function calls itself directly or indirectly is called recursion and the corresponding function is called a recursive function. // Properties of Recursion: // Performing the same operations multiple times with different inputs. // In every step, we try smaller inputs to ma...
ALGO
0.999933
5.050884
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-09-21T21:00: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": "3a8c82ac42c...
c26a6b92-97e1-4cb5-9bfb-eabf94c1233c
HOL-Theorem-Prover/HOL
src/HolSat/sat_solvers/minisat/VarOrder.h
/**************************************************************************************[VarOrder.h] MiniSat -- Copyright (c) 2003-2005, <NAME>, <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Softwa...
ALGO
0.988426
5.859543
{ "github_metadata": { "branch": "develop", "commit_count": 20957, "repo_created_at": "2009-10-29T02:47:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 675, "forks": 156, "issues": 207, "pull_requests": 7 }, "file_meta": { "content_id": "...
a410ce63-fc20-4faf-8806-85582c170cc4
MrKeanu-V/Code-Everyday
CPP/1170.cpp
/* 1170. Compare Strings by Frequency of the Smallest Character [Medium - 1432] */ #include <iostream> #include <vector> #include <string> #include <utility> #include <map> #include <set> #include <queue> #include <stack> #include <unordered_map> #include <unordered_set> #include <algorithm> #include <ranges> #include ...
ALGO
0.999962
5.567262
{ "github_metadata": { "branch": "main", "commit_count": 165, "repo_created_at": "2024-08-14T17:04: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": "59ebc5f7e2...
d17efe77-3342-4d6c-abe3-80a9e2ad6260
kudarukuni/Java_Tutorials
main.cpp
#include <iostream> using namespace std; int main(){ int m1, m2, m3, m4, m5, tot; float per; cout << "Enter Marks of Five Subjects: " << endl; cin >> m1; cin >> m2; cin >> m3; cin >> m4; cin >> m5; tot = m1 + m2 + m3 + m4 + m5; cout << "Total Marks of Student = " << t...
TOOL
0.992148
3.012627
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-05-22T19:34:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8f4229e11c0...
0d26dda2-f75a-4731-ba4d-c5ba6cc612de
valpo-DylanBrown/projectEuler
c++/project04.cpp
/*QUESTION A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99. Find the largest palindrome made from the product of two 3-digit numbers. */ //SOLUTION #include <iostream> using namespace std; bool isPalindrome(int a, int b){ int n, n...
ALGO
0.999744
5.48389
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-03-29T03:44:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "424a8b658d7...
7a2be4b9-d456-4196-bc75-2793091131ab
omer4d/OldCodeBackup
CODE/WORMS/WORMS9.cpp
#include <stdio.h> #include <conio.h> #include <math.h> #include <allegro.h> #include <list> #include <vector> #include <algorithm> #include "Vec2f.hpp" #include "Buffer.hpp" struct Rect { int x, y, w, h; Rect(int px, int py, int pw, int ph): x(px), y(py), w(pw), h(ph) { } }; BITMAP* buffer; #defin...
TOOL
0.929022
4.225803
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2015-12-13T14:41: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": "1f6d2b7a02...
12965cfa-107c-40ba-9c22-a6004e1d83b6
phelrine/NBTools
distfiles/cpplapack-2010.03.27/include/dgsmatrix-/dgsmatrix-dsymatrix.hpp
//============================================================================= /*! dgsmatrix+dsymatrix operator */ inline _dgematrix operator+(const dgsmatrix& matA, const dsymatrix& matB) {VERBOSE_REPORT; #ifdef CPPL_DEBUG if(matA.m!=matB.n || matA.n!=matB.n){ ERROR_REPORT; std::cerr << "These two matrises...
ALGO
0.991531
5.711128
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2011-07-14T12:40:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a5d02ae0...
792563f3-8560-4c1e-b9be-3ddd82792f24
maguilo11/locus
xgen/include/NonlinearConjugateGradient/Locus_NonlinearConjugateGradient.hpp
/* * Locus_NonlinearConjugateGradient.hpp * * Created on: Oct 22, 2017 * Author: <NAME> */ #ifndef LOCUS_NONLINEARCONJUGATEGRADIENT_HPP_ #define LOCUS_NONLINEARCONJUGATEGRADIENT_HPP_ #include <limits> #include <memory> #include <cassert> #include "Locus_Types.hpp" #include "Locus_Bounds.hpp" #include "Loc...
ALGO
0.997256
6.631862
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2016-10-31T20:31:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "552090ba...
bca50c3f-f476-4d7c-99c3-accdcf78cda7
Wsh7Ash/LEETCODE
cpp/c0-500/401-450/433.cpp
#include <vector> #include <string> #include <queue> #include <unordered_set> class Solution { public: int minMutation(string startGene, string endGene, vector<string>& bank) { // Convert bank to unordered_set for O(1) lookup unordered_set<string> validGenes(bank.begin(), bank.end()); ...
ALGO
0.999938
6.123309
{ "github_metadata": { "branch": "master", "commit_count": 365, "repo_created_at": "2025-03-26T15:51: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": "08567d67...
bcc513d3-8361-42c9-982c-9047b75fc0f6
gkdidms/Algorithm_Test
백준/Gold/1238. 파티/파티.cc
//https://www.acmicpc.net/problem/1043 #include <iostream> #include <stdio.h> #include <string> #include <vector> #include <algorithm> #include <queue> #define INF int(1e9) using namespace std; int n, m, x; void dijkstra(vector<vector<pair<int, int>>>& graph, vector<int>& dist, int start) { priority_queue<pair<int,...
ALGO
0.999965
4.474823
{ "github_metadata": { "branch": "main", "commit_count": 306, "repo_created_at": "2024-03-11T03:52:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81c2985f81...
c3f9f629-9fb3-486e-8769-cb3af6283f37
prozod/fundam-prog-a1s1
assignment_08/ex2.cpp
#include <iostream> #include <random> int main() { int M_SIZE; std::cout << "Introduceti dimensiunea matricei: "; std::cin >> M_SIZE; std::random_device rd; std::uniform_int_distribution<int> dist(0, 1); int matrice[M_SIZE][M_SIZE]; int ab, bl, md, sd; for (int row = 0; row < M_SIZE; row++) { for ...
ALGO
0.99681
4.625131
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-11-20T17:42:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ecf7f8e58c...
eaea6804-342f-4ec8-8b55-c9345b502162
CW-YI/Baekjoon
백준/Gold/9328. 열쇠/열쇠.cc
#include <iostream> #include <vector> #include <queue> #include <cctype> using namespace std; int dir[4][2] = { {-1, 0}, {1, 0}, {0, -1}, {0, 1} }; int main() { cin.tie(NULL); cout.tie(NULL); ios_base::sync_with_stdio(false); int N, M, R; cin >> R; for (int r = 0; r < R; r++) { cin >> N ...
ALGO
0.999338
4.516383
{ "github_metadata": { "branch": "main", "commit_count": 208, "repo_created_at": "2024-09-14T10:28:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b621f89a1...
51a29461-9e3d-4049-b2f1-8064eb822bb1
banyar-shin/career-advisor
HashTable.h
/** * Many of the following classes were taken from the text book. * Some changes were applied to fit the context of the lab. */ #ifndef HASHTABLE_H #define HASHTABLE_H #include <string> #include <vector> //A function to return the hash code of a string int hash_code(const std::string& letter); class HashTable; c...
ALGO
0.93966
3.930926
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2022-05-13T05:15: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": "e7b2972775d...
6f2e5772-efc9-4ac8-b9ce-8309a052927c
AnkitPatel27/CSES
String Algorithm/String_Matching(3).cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define vvi vector<vector<int>> #define vi vector<int> #define vl vector<long long> #define vvl vector<vector<long long>> #define pii pair<int,int> #define FOR(start, end, step) for (int i = start; i <= end; i += step) int main(){ ios_base::sync...
ALGO
0.999914
4.034436
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2023-05-14T10:37: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": "ded6751bd2a...
870648af-3ccc-4c07-9135-01d0f97f11e1
ldct/cp
atcoder/abc44/C/C.cpp
#include <vector> #include <iostream> #include <map> #include <climits> #include <set> #include <algorithm> #include <array> #include <cstring> using namespace std; #define endl '\n' #define int long long #define i32 int32_t #define i64 int64_t int N, A; vector<int> X; int memo[51][51][50*50+1]; int ans(int i, int ...
ALGO
0.999567
4.132607
{ "github_metadata": { "branch": "master", "commit_count": 647, "repo_created_at": "2011-02-20T07:42:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa931f50...
3bbe6f56-533a-404f-8534-f9af331dff6e
bimansaha1993/acm_practice
stack_queue/stack_queue/queue_stack.cpp
#include<iostream> using namespace std; int queue[100], capacity, front, rear, size, temp; void clear() { front = 0; rear = 0; size = 0; } bool isempty() { if (size == 0) return true; else return false; } void enqueue(int val) { if (size == capacity) return; queue[rear] = val; rear = (rear + 1) % capaci...
ALGO
0.999038
3.235112
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2019-01-02T07:00: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": "fc8172f87...
70cbbd26-626d-4c83-ade6-6c1da9c76142
xuanlanxingkongxia/ransac_test
Methods.cpp
// // Created by nijunjie on 2020/8/18. // #include <chrono> #include <random> #include <iostream> #include "Methods.h" Methods::Methods(int data_num_, double variance_, int outlier_num_) { data_num=data_num_; variance=variance_; oulier_num=outlier_num_; generate_data(); } void Methods::generate_data...
ALGO
0.999195
3.959405
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-09-16T11:46: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": "d7c3f7a8ac...
b0269789-d8dc-42a0-8892-c986ec405264
Rakibul73/Programing-Code
programing_code/Codeforces/1487B.cpp
/*** <NAME> Read in the name of Allah, who created you. Author : <NAME>, Faculty of CSE, Patuakhali Science & Technology University, Bangladesh. ***/ // last modified: 2021/02/20 17:34:15 #include <bits/stdc++.h> using namespace std; #define fast_cin() ios_base::sync_with_stdio(false); cin.tie(NUL...
ALGO
0.999944
4.245646
{ "github_metadata": { "branch": "main", "commit_count": 262, "repo_created_at": "2020-11-09T06:43:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c0ae77bc55...
4de5d601-0df1-4b93-ace6-4a4b0c21ce41
Wisdom-moon/hStreams-benchmark
parboil/benchmarks/mri-q/src/hstreams/kernel.cpp
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <omp.h> #include <assert.h> #include <intel-coi/sink/COIPipeline_sink.h> #define PI 3.1415926535897932384626433832795029f #define PIx2 6.2831853071795864769252867665590058f #define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) #define K_ELEMS_...
ALGO
0.999558
4.336748
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-01-08T16:58:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7d83ad8d5...
2453ceb8-4808-47e2-bcb5-d85814484601
onkarbartakke/DSA-Marathon
Strings/find_missing_num_IMP.cpp
#include <bits/stdc++.h> using namespace std; /* Given a string consisting of some numbers, not separated by any separator. The numbers are positive integers and the sequence increases by one at each number except the missing number. The task is to complete the function missingNumber which return's the missing numbe...
ALGO
0.997575
4.63117
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2021-08-18T13:02:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7d84ea9096...
6fa09e16-b47a-4ffe-87f2-17e7fe870f95
lythesia/leet
cc/roman-to-integer/roman-to-integer.cc
#include <cstdio> #include <cstring> #include <iostream> #include <string> using namespace std; #define see(x) cout << #x << ": " << (x) << endl class Solution { public: int romanToInt(string s) { int res = 0; char prev = 0; for(char c : s) { if(c == 'I') { ++res; } else if(c ...
ALGO
0.999193
4.727631
{ "github_metadata": { "branch": "master", "commit_count": 205, "repo_created_at": "2015-04-02T13:19:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "134d779b...
64372444-abec-4090-91fa-512a4edfed71
ljshou/workspace
algorithm/leetcode/recover-binary-search-tree.cc
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: void recoverTree(TreeNode *root) { //using morris inorder traversal TreeNode *pre(nullp...
ALGO
0.999999
6.015615
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2014-11-02T07:42:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c69552511...
ca393c57-3a7e-4427-b48f-4b7234fa484f
jaween/scene-reconstruction
src/algorithm.cpp
#include <algorithm> #include <fstream> #include <iostream> #include <sstream> #include <stdio.h> #include "algorithm.hpp" Algorithm::Algorithm() { initialiseOpenCL(); } Algorithm::~Algorithm() { // ?? Temp: CPU voxel storage delete [] volume.voxels; } void Algorithm::initialise(GraphicsFac...
ALGO
0.997169
6.209332
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2015-04-18T14:50:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76b649020...
1fff8f38-285d-4dc1-966f-8e5385b18c1f
LuluFighting/DataStructAndAlgorithm
string_match.cpp
#include <iostream> #include <string> using namespace std; class Solution { public: Solution() :matched(false) {} bool match(string pattern, string text) { rmatch(pattern, 0, text, 0); return matched; } private: void rmatch(string pattern, int pos1, string text, int pos2) { if (...
ALGO
0.999919
4.031194
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-10-16T13:20:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8576a2c1c...
4c75bcb2-b424-4b91-9163-2775b593a396
rhodso/dominosRunCalculator
src/main.cpp
#include <main.h> #include <algorithm> #include <iostream> #include <thread> #include <sstream> std::string getStringList(std::vector<domino> _lst){ // Convert a list of dominos to a string std::string outStr = ""; for(domino d : _lst){ outStr += d.to_string() + " "; } return outStr; } int getListScore...
ALGO
0.99933
5.875328
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2020-12-26T04:17: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": "e71e1fae96a...
901ff558-9cea-4a96-8f2a-f3a1989befd9
ecmwf/eckit
src/eckit/geo/polygon/PolygonXY.cc
/* * (C) Copyright 1996- ECMWF. * * This software is licensed under the terms of the Apache Licence Version 2.0 * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. * In applying this licence, ECMWF does not waive the privileges and immunities * granted to it by virtue of its status as an interg...
ALGO
0.968938
7.44387
{ "github_metadata": { "branch": "develop", "commit_count": 7657, "repo_created_at": "2018-02-26T13:33:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 26, "forks": 26, "issues": 11, "pull_requests": 10 }, "file_meta": { "content_id": "583...
6d336684-c932-4251-888a-18e26713a017
muhammad-nasr-dawood/Data-Structures
CircularQueueUsingArray/main.cpp
#include <iostream> #include <string.h> using namespace std; class CirularQueue{ int* arr; int front; // for pop int rear; // for push int siz; public: CirularQueue(){ siz = 5; rear = front = -1; } CirularQueue(int _size){ siz = _size; rear = front = -1; ...
ALGO
0.999291
4.038457
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-09-23T14:36: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": "7db1ef48e9a...
8e2365e2-a847-4b15-9a59-e9d9c66fdd56
LCA2-EPFL/ephemeral-quic
proto-quic/experiments/preprocess_message_receipt.cc
#include <iostream> #include <string> #include <vector> #include <set> #include <fstream> using namespace std; int main(int argc, char *argv[]) { ifstream myfile; myfile.open(argv[1]); set<int> valid_ids; int id, delay; char ch; while (myfile >> id >> ch >> delay) { if (delay < 100000) { valid_i...
ALGO
0.976999
3.786839
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-05-08T13:21:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "3a71060ef...
3c6e1b15-a443-4b4c-bd51-d3d9afde378b
avcopan/MPACK
mlapack/library/Rgbtrs.cpp
/* * Copyright (c) 2008-2010 * <NAME> * All rights reserved. * * $Id: Rgbtrs.cpp,v 1.9 2010/08/07 04:48:32 nakatamaho Exp $ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of...
ALGO
0.999435
6.008674
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-12-18T18:49:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91af255d1...
94866ccc-5948-4b4b-9a6f-0ead83c34efb
mnbrog/Projects
Cs 201/p2/main.cpp
#include <iostream> int main (int argn,char** args) { using namespace std ; RBTree<int,int> rbt ; printf ("start off -- \n") ; for (auto t : inserts) { rbt.insert (t.k,t.v) ; } rbt.print () ; printf ("========== ################ ==========\n") ; ...
ALGO
0.950229
3.450334
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2024-08-27T19:00:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11f7275bce...
95d367ab-e713-4f72-b1d1-9f6abd05c304
ljweel/PS
code/boj2170.cpp
/* 선 긋기 스위핑이라는데 잘 모르겠다 아직. */ #include <iostream> #include <vector> #include <algorithm> using namespace std; typedef pair<int,int> pii; int N; vector <pii> Point; bool IsConnected(pii a, pii b) { return (b.first <= a.second); } int dist(pii a) { return a.second - a.first; } int main() { ios::sy...
ALGO
0.999929
4.104115
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2022-03-04T07:06:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57cc10356ed...
f72978ae-03a7-4817-9ba8-4f888681f523
goodstudyqaq/ACM
codeforces/1600-1699/1673/C.cpp
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "copypaste/debug.h" #else #define debug(...) 42 #endif #define endl '\n' struct fast_ios { fast_ios() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10); }; } fast_ios_; vector<int> V;...
ALGO
0.999885
5.279107
{ "github_metadata": { "branch": "main", "commit_count": 844, "repo_created_at": "2021-05-25T15:11:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5d63504047...
a2bc0aef-1962-4bff-b770-000cdde242a9
ShubhamRaj1997/SPOJ
BLUNIQ.cpp
// implicit segment tree ,create node only when needed :) #include <bits/stdc++.h> #define pb push_back #define mp make_pair #define ll long long #define MAX 1000001 #define f first #define s second #define INF INT_MAX #define INFLL LONG_LONG_MAX #define pii pair<int,int> #define pll pair<long,long> #define mset(a,val)...
ALGO
0.999956
4.028306
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2017-06-30T07:48:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2699bda7a...
86f5017a-2cf2-416d-ab99-623b02e80121
whasenpl/vertexColor
vertexColorJP/VertexColor.h
#ifndef _GRAPH_COLOR_JP_H #define _GRAPH_COLOR_JP_H #include "graphColor.h" #include "graphColorOrdering.h" #define CILK_FOR_THRESHOLD 256 #define COUNTER_THRESHOLD 512 #define NUM_LEAF_MEMBERS 64 struct LeafClass { volatile unsigned long bitColor; inline unsigned long updateLeafCounter(unsigned long _bitColo...
ALGO
0.998431
5.916145
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-06-07T11:47:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2ee8754bb0...
9f3e56b9-b4d1-4ae4-8874-ccb33fd815a3
Turbstructor/AlgorithmDuoParty
Workspace_yechan/Baekjoon_yechan/KMP/1786.cpp
// baekjoon 1786 reference #include <stdio.h> #include <iostream> #define mv 1000002 char t[mv], p[mv]; int f[mv], l, m, q[mv], qi; int strlen(char *s) { int i; for (i = 0; s[i]; i++); return i; } int main() { fgets(t, mv, stdin); fgets(p, mv, stdin); l = strlen(t); m = strlen(p); if...
ALGO
0.999881
3.837759
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2018-10-22T12:21:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3600ae3b...
7dc2816c-70fa-499b-80a5-8d7a24b2849c
wuyhyh/scratch
Archive/oldcode/code2022/HJ/HJ32/源.cpp
//Catcher是MCA国的情报员,他工作时发现敌国会用一些对称的密码进行通信, //比如像这些ABBA,ABA,A,123321, //但是他们有时会在开始或结束时加入一些无关的字符以防止别国破解。 //比如进行下列变化 ABBA->12ABBA, ABA->ABAKK, 123321->51233214 。 //因为截获的串太长了,而且存在多种可能的情况(abaaab可看作是aba, 或baaab的加密形式) //Cathcer的工作量实在是太大了,他只能向电脑高手求助, //你能帮Catcher找出最长的有效密码串吗 // //最长回文字符串的长度 #include<iostream> #include<string> #...
ALGO
0.999781
3.826488
{ "github_metadata": { "branch": "master", "commit_count": 720, "repo_created_at": "2024-03-09T15:51: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": "f5a67fc1...
ca96813b-5be3-4b20-be58-b167b0bfea78
gvilardefarias/CASS
cpp/test1/Conect.cpp
// // File: main.cpp // // MATLAB Coder version : 3.1 // C/C++ source code generated on : 23-Oct-2017 02:09:14 // //*********************************************************************** // This automatically generated example C main file shows how to call // entry-point functions that MATLAB Coder genera...
ALGO
0.925364
4.195736
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-10-18T00:15:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24a9084fa...
cec82668-8824-4fda-9c17-a7b69ea4d314
ItsSuhail/G20InternationalFest
Sketches/MotorDriver/EX_MOTOR_DRIVER/EX_MOTOR_DRIVER.ino
#include <AFMotor.h> // Defining a time period for turning the car // time period in milliseconds const int turningTimePeriod = 3 * 1000; // Creating an object and defining the four car motor at pins 1, 2, 3 and 4 AF_DCMotor frontRight(1); AF_DCMotor frontLeft(2); AF_DCMotor bottomLeft(3); AF_DCMotor bottomRight(4);...
ALGO
0.97901
4.754627
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2023-07-11T13:07:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05efddec042...
d312e40c-6e50-4a26-bf33-4dc40fd09433
JiwoonKim/interview-cake
10_bit_manipulation/1_stolen_breakfast_drone.cpp
/** * Find unique integer within vector of duplicate integers. * * Time Complexity: O(n) * Space Complexity: O(1) * * * Stuck Point: * - could not figure how to optimize further from solution using unordered set (O(n) time & O(n) space) * * ** Untangled Hints: can use BIT MANIPULATION (bit manipula...
ALGO
0.998372
6.042421
{ "github_metadata": { "branch": "master", "commit_count": 149, "repo_created_at": "2019-05-17T05:54:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 53, "forks": 18, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "6d9c9c...
68429761-c5eb-4d75-aba1-30f7c0b76df0
cypmaster14/SI
Exercitiul2/main.cpp
#include <string.h> #include <openssl/sha.h> #include <openssl/md5.h> #include <fstream> #include <iostream> #include "functions.h" using namespace std; string f1_content; string f2_content; string h1_sha256Content, h2_sha256Content, h1_md5, h2_md5; int main(int argc, char *argv[]) { f1_content = read_content(...
TOOL
0.992226
3.92992
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-11-27T19:33: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": "67bf26be4...