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
7c2b38d5-acfa-43cd-bc68-53f46adcf968
elmer-payro/cloud-computing
SumaParalela.cpp
#include <iostream> #include <omp.h> #define N 20000 #define chunk 1000 #define mostrar 50 void imprimeArreglo(float* d); using namespace std; int main() { cout << "Sumando arreglos en paralelo \n"; float a[N], b[N], c[N]; int i; for (i = 0; i < N; i++) { a[i] = i * 10; b[i] = (...
ALGO
0.99977
4.701122
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-01-29T23:47: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": "7fd28d631437...
8fb41e73-2ddf-4a00-80f7-8b76f36e0e86
ayush8303/testCaseGenerator
TakeArrayWithoutSize.cpp
#include <bits/stdc++.h> using namespace std; #define int int64_t #define endl "\n" int mod = 1000ll * 1000ll * 1000ll + 7; const int inf = 1000ll * 1000ll * 1000ll * 1000ll * 1000ll * 1000ll; #define cout std::cout #define cin std::cin const int N = 500023; bool arrayEnded = false; long long readInt(long long l, long...
ALGO
0.999442
4.237502
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2023-04-09T23:07: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": "334e1c1312af...
74b8428e-6284-48c8-82eb-3db873b3a983
asksaurabh/Leetcode_Prep
02_Dynamic_programm/3_5_perfect_sum.cpp
// Memo + Rec const int mod = 1e9 + 7; int solve(int i, int sum, int *nums, vector<vector<int>> &dp) { if (i == 0) { if (sum == 0) return 1; else return 0; } if (dp[i][sum] != -1) return dp[i][sum]; if (nums[i - 1] > sum) return dp[i][sum] = solve(i - 1, sum, nums, dp) % mod; return dp[i][sum] = (solve(i - 1...
ALGO
0.999947
4.866498
{ "github_metadata": { "branch": "main", "commit_count": 353, "repo_created_at": "2022-02-04T19:27: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": "0f2aefda08...
f7428a83-5e0a-4254-834b-4b080654e0e1
Zeyu-Li/kattis_solutions
basicprogramming2/basicprogramming2.cpp
#include <bits/stdc++.h> typedef long long ll; using namespace std; int main() { int n, t; cin >> n >> t; vector<int> array; for (int i = 0; i < n; i++) { int tmp; cin >> tmp; array.push_back(tmp); } switch (t) { case 1: { sort(array.begin(), array....
ALGO
0.999856
3.416113
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2020-07-13T13:04:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51716fcb6...
31d58ae3-2638-4d76-bfb2-b2a8d0df7a40
JoonYong-Park/Image-Processing
irfanview/week_7.cpp
#include <stdio.h> #include <math.h> #pragma warning(disable:4996) // ๊ฒฝ๊ณ  ๋ฉ”์‹œ์ง€ 4996์„ ๋ฌด์‹œํ•˜๋Š” pragma ์ง€์‹œ๋ฌธ int main_7() { ////////// ์ค‘๊ฐ„๊ฐ’ ํ•„ํ„ฐ ////////// FILE* fp; // ํŒŒ์ผ ํฌ์ธํ„ฐ ์„ ์–ธ unsigned char Readbuf[256][256]; // ์˜์ƒ ์ฝ์„ ๋ฐฐ์—ด ์„ ์–ธ unsigned char Writebuf[256][256]; // ์˜์ƒ ์“ธ ๋ฐฐ์—ด ์„ ์–ธ double ...
TOOL
0.987213
3.792111
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2023-09-14T07:44: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": "c7cdc34a59...
18276d13-c460-44d0-8ed9-62a14502c682
tricktron/Programming-Challenges
number-theory/10139_factovisors.cpp
/* Created by <NAME> on 22.06.18. uva 10139 - Factovisors Problem: Does m divide n!, e.g. Does 9 divide 6! Solution: You cannot calculate n! as the factorial grows much too quickly. 1. Find the prime factorization of m by trial division: 9 = 3^2 2.a Find the highest power of all prime factors in n!: 6! / 3 = 2 ...
ALGO
0.999888
5.40041
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2017-10-11T17:51: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": "ffbd1963c...
ec246861-b11c-452e-b656-26917c7e4082
guichristmann/Advent-of-Code-2022
Day2/a.cpp
#include <fstream> #include <iostream> #include <string> int32_t charToValue(char c) { // X ascii code is 88. return static_cast<int32_t>(c) - 87; } int32_t roundPoints(char c1, char c2) { if (c1 == (c2 - ('X' - 'A'))) { // Draw. return 3; } else if ((c1 == 'A' && c2 == 'Y') ||...
ALGO
0.999711
5.191621
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-12-01T13:47: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": "017c0569ca6f...
ce281824-7cb3-478d-9bb5-43a62efd5b1e
pratyush2331/DSA_Love-Babbar
XX. AAA_Platform/Codeforces/TLE CP 31/800/3_A_CoverInWater.cpp
// A. Cover in Water // Codeforces : https://codeforces.com/problemset/problem/1900/A #include<bits/stdc++.h> using namespace std; void dbg_out() { cerr << endl; } template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T) { cerr << ' ' << H; dbg_out(T...); } #define dbg(...) cerr << '[' << __FILE__ <...
ALGO
0.99915
3.966174
{ "github_metadata": { "branch": "master", "commit_count": 538, "repo_created_at": "2023-06-24T10:52:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cbc90452...
776c8e74-3547-4567-883a-881b19dcc4fb
Aliyan-Ismail/CS150
h06/h06.cpp
/** * @author <NAME> * @date Spring 2021 WPM * @file h06.cpp */ #include <string> #include <cctype> using namespace std; string STUDENT = "aismail9"; // Add your Canvas login name // Add your function here int sumNums(const string& str) { int result{0}; int sum{0}; int num{0}; int digit{0}; for (size_t...
ALGO
0.987773
5.448187
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-10-06T04:48: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": "0159bf5cd871...
22e4600a-8ab8-4477-852f-ce7a3861a4bd
CompPhysics/ThesisProjects
doc/MSc/msc_students/former/SeanMiller/Thesis/Codes/CCD_prototype/main.cpp
#include <iostream> #include <fstream> #include <string> #include <math.h> #include <eigen3/Eigen/Dense> #include <armadillo> using namespace std; double singleBody(int i, arma::mat SPB){ return 0.5*SPB(i,0); } int KD(int p, int q){ return (p==q); //return 1 if true, 0 if false } //Coloumb interaction. T...
ALGO
0.999821
4.060652
{ "github_metadata": { "branch": "master", "commit_count": 213, "repo_created_at": "2015-09-23T12:38:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "97cc2a7c7...
c150988e-5326-4c93-9ea8-ce9678ed2640
stefanpantic/cpp-design-patterns
structural/adapter/geometry/geometry.hpp
#pragma once #include <boost/container_hash/extensions.hpp> #include <boost/container_hash/hash_fwd.hpp> #include <boost/functional/hash.hpp> #include <vector> struct Point { int x, y; Point(int x, int y) : x{x}, y{y} {} friend std::size_t hash_value(const Point& p) { std::size_t seed{0x1e4493f}; boost:...
TOOL
0.973037
6.195242
{ "github_metadata": { "branch": "main", "commit_count": 58, "repo_created_at": "2021-01-14T21:12:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bb164707c6...
e475044b-c339-4846-ab8e-c23885029730
lydrainbowcat/tedukuri
้…ๅฅ—ๅ…‰็›˜/ไพ‹้ข˜/0x60 ๅ›พ่ฎบ/0x67 Tarjan็ฎ—ๆณ•ไธŽๆœ‰ๅ‘ๅ›พ่ฟž้€šๆ€ง/้“ถๆฒณ/gin.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> using namespace std; const int N = 100010, M = 500010; int head[N], val[M], len[M], nxt[M], mr; void ginit (int n) { mr = 0; for (int i = 0; i < n; i++) head[i] = -1; } void glink (int a, int b, int v) { val[mr] = b, len[mr] = v, ...
ALGO
0.999918
3.699907
{ "github_metadata": { "branch": "master", "commit_count": 140, "repo_created_at": "2018-03-18T01:24:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2487, "forks": 607, "issues": 15, "pull_requests": 0 }, "file_meta": { "content_id": "a6...
7898d28a-a7f8-45a8-9c27-07ee4aa59e3f
IshitaApan/bug-severity-classification
token_sw_feature_V3.cpp
#include<iostream> #include<sstream> #include<fstream> #include<vector> #include<map> #include<algorithm> using namespace std; struct mapSorter{ string word; int frequency; }; bool sortingRule(const mapSorter& a ,const mapSorter& b) { return a.frequency > b.frequency; } void cleanUp(string &s){ int i=0; while(i...
DATA
0.998358
3.85772
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2018-03-06T11:54:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5252a745...
eea27aae-d375-46bb-93af-a91dfb14aadc
Mridul-1-Sharma/Hacktoberfest2022-DataStructuresAndAlgorithms
Cpp/Binary_Search_Tree/22FlattenBST.cpp
#include<iostream> using namespace std; struct Node{ int data; Node* left; Node* right; Node(int data){ this->data = data; left = right = NULL; } }; Node* insertInBST(Node* root, int x){ if(!root){ root = new Node(x); return root; } if(x > root->data)...
ALGO
0.999997
4.797091
{ "github_metadata": { "branch": "main", "commit_count": 391, "repo_created_at": "2022-10-01T08:14:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 38, "forks": 97, "issues": 2, "pull_requests": 12 }, "file_meta": { "content_id": "1cc0c7e...
cc331654-e403-41d2-91d4-c88c42c1061c
Grey-Haven/MOLT
MOLT_CPP/MovingBlob/BlobRunner.cpp
#include <limits> #include <cstdio> #include <cstdlib> #include <cstring> #include <sys/time.h> #include <filesystem> #include <cmath> #include <random> #include "../MOLTEngine.h" #include "../FD6.h" #include "../FFT.h" #include "../Derivative.h" #include <unistd.h> #include <stdio.h> #include <omp.h> int main(int a...
ALGO
0.999424
3.339003
{ "github_metadata": { "branch": "master", "commit_count": 265, "repo_created_at": "2023-03-28T14:10: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": "eca6e5b0...
abb64981-4349-47d8-94b9-d2d2673ae607
ratnakar5938/90dayDSA
day 15/exponents.cpp
#include <iostream> using namespace std; // a^n = a * a * a... (n times) int pow(int a, int b) { if (b > 0) return a * pow(a, b - 1); else return 1; } int pow2(int a, int b) { if (b == 0) return 1; else if (b % 2 == 0) return pow2(a * a, b / 2); else retu...
ALGO
0.999904
5.369086
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2021-11-30T10:26: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": "dca8f647...
c9883937-cda9-4b1b-bf6a-7da2bc617f3c
Martins3/ACM
poj/1/1/63.cpp
#include <iostream> #include <fstream> #include <vector> #include <map> #include <algorithm> using namespace std; #define VSCODE_READ freopen("../../../input.txt", "r", stdin); #define MAX_INPUT 101 int num [MAX_INPUT][MAX_INPUT]; int res [MAX_INPUT][MAX_INPUT]; int main(){ VSCODE_READ int rowNum; scan...
ALGO
0.999931
3.397356
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2018-03-05T11:57:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a82ef279...
3ba2872c-c804-4f39-a6a3-ceede5474679
sajjadium/ctf-archives
ctfs/Glacier/2023/pwn/flipper/common/source/ustl/ubitset.cpp
// This file is part of the uSTL library, an STL implementation. // // Copyright (c) 2005 by <NAME> <<EMAIL>> // This file is free software, distributed under the MIT License. #include "ubitset.h" namespace ustl { /// Copies bits from \p v of size \p n into \p buf as MSB "1011001..." LSB /// If \p buf is too small, ...
TOOL
0.911978
7.145105
{ "github_metadata": { "branch": "main", "commit_count": 1073, "repo_created_at": "2021-06-10T16:53:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1112, "forks": 159, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "2f3f...
241c2ddf-94d3-4cdd-b00b-bff72ff0f055
dvdalilue/CS140_lab_assignment
BST2.h
#ifndef BST_H #define BST_H #include <iomanip> #include <iostream> #include <queue> #include <vector> using namespace std; template <class TKey> class bst { struct node { node() { key=TKey(); parent=link[0]=link[1]=NULL; } void print(); TKey key; node *parent; node *l...
ALGO
0.997165
3.874504
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-04-24T23:22: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": "1e02089e71...
2fd125ed-bc10-425a-8026-f2dd01ba24e4
Tushar1441/Striver_A2Z_DSA
MCM DP/burst_ballons.cpp
#include <bits/stdc++.h> using namespace std; // Note: The intuition is to first find the last balloon, then the second last, and so on. // This is the sequence we need to follow to solve this problem. int solve(int i, int j, vector<int>arr) { if (i > j)return 0; int maxi = -1e9; for (int k = i; k <= j; k++) { ...
ALGO
0.999984
4.706178
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2023-05-25T16:54: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": "1b921209704...
3eb9bd69-a82b-42b9-8c23-3c08d3160314
yunusfebriansyah/struktur-data
Login with Hashing/src/Main.cpp
#include <iostream> using namespace std; // Hash Table struct HashTable { // data string username, password; } dataAkun[26]; // function hash int hashFunction( string key ){ return tolower(key[0]) - 97; } // cekDaftar bool cekDaftar( string username, string password ) { int index = hashFunction(password)...
TOOL
0.929305
3.772206
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-07-19T09:00:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 18, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27f46c1e1a...
bebb4426-f9e8-41e2-9014-ca2c3f269583
marcinlos/iga-ads
include/ads/lin/lapack.hpp
// SPDX-FileCopyrightText: 2015 - 2023 <NAME> <<EMAIL>> // SPDX-License-Identifier: MIT #ifndef ADS_LIN_LAPACK_HPP #define ADS_LIN_LAPACK_HPP // LAPACK routines extern "C" { using in_int = const int*; using in_double = const double*; using in_int_array = const int*; using out_int = int*; using out_int_array = int*; ...
TOOL
0.946447
5.694071
{ "github_metadata": { "branch": "develop", "commit_count": 713, "repo_created_at": "2016-05-08T23:31:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 9, "issues": 12, "pull_requests": 3 }, "file_meta": { "content_id": "0cc09...
8c03cd85-4a01-4e55-9d85-1b49d1bf0fbf
jmml97/alg-practicas
p3/resources/ejemplo/solucion/Greedy/src/Algoritmos.cpp
#include "Algoritmos.h" #include <iostream> using namespace std; Solucion AlgoritmoGreedyAGM(Problema p) { Solucion S; // Soluciรณn a devolver bool *LC; // Lista de candidatos (false si estรก en LC, true si estรก en LCU) int NumLC; // Nรบmero de candidatos sin utilizar int origen, destino; // Las plazas ...
ALGO
0.999983
4.90119
{ "github_metadata": { "branch": "master", "commit_count": 230, "repo_created_at": "2017-03-14T18:01:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "412c66a9...
a513e0c3-72b3-4023-8c2a-7fcbdb361983
danielScLima/BinomialHeap
binomialheap.cpp
#include "binomialheap.h" BinomialHeapDS::BinomialHeapDS() { } BinomialHeapDS::~BinomialHeapDS() { dealockList(start, start); } BinomialHeapNode *BinomialHeapDS::getStartNode() { return this->start; } BinomialHeapNode *BinomialHeapDS::getMinNode() { return this->nodeWithMinimumValue; } void BinomialHe...
ALGO
0.99981
3.68963
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2020-07-26T12:42: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": "86abe4c165...
de6d00d8-0f72-4ff7-9919-bc3ae613e33f
Yawn-Sean/Daily_CF_Problems
daily_problems/2025/02/0215/personal_submission/cf660c_dinghc.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, k; scanf("%d%d", &n, &k); vector<int> a(n); for (auto& x : a) scanf("%d", &x); array<int, 3> ans{}; for (int i = 0, j = 0, curr = 0; i < n; i++) { if (a[i] == 0) curr += 1; while (curr > k) { if (a[j+...
ALGO
0.999979
3.606744
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "bbf8...
ee5b7054-22b9-43cd-9a82-dba2ec9f18be
lemire/Code-used-on-Daniel-Lemire-s-blog
2020/01/30/costofthread.cpp
#include <algorithm> #include <chrono> #include <cstdlib> #include <cstring> #include <iomanip> #include <iostream> #include <thread> #include <vector> #include <future> using clk = std::chrono::high_resolution_clock; using time_point = std::chrono::time_point<clk>; using dur_double = std::chrono::duration<double>; usi...
TOOL
0.96285
6.393697
{ "github_metadata": { "branch": "master", "commit_count": 2385, "repo_created_at": "2012-04-06T00:13:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 885, "forks": 184, "issues": 2, "pull_requests": 5 }, "file_meta": { "content_id": "109...
c9f55964-9995-4ab8-a28d-4a12e87ee96a
neuroprod/NPInverseKinematics
IKTest_1/src/perlinNoise.h
// perlinNoise.h // Class to implement coherent noise over 1, 2, or 3 dimensions. // Implementation based on the Perlin noise function. Thanks to // <NAME> of NYU for publishing his algorithm online. ///////////////////////////////////////////////////////////////////// // Copyright (c) 2001, <NAME> // You may use this...
ALGO
0.997058
6.511525
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2011-08-07T14:06:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "14e052b58a...
bc2786cd-03a3-4e60-8281-d0ead2c05da3
sampritipanda/IOI_Repository
Misc/IPSC/2016/A/A2.cpp
#include <iostream> #include <string> #include <cassert> #include <vector> using namespace std; int main() { int T; cin >> T; while(T--) { vector<string> A; string ans = ""; for(int i = 0; i < 10; i++) { string S; cin >> S; A.push_back(S); } int a = -1, b = -1; for(int i = 0; ...
ALGO
0.998978
4.144078
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2014-12-27T14:42:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2ee2fbc...
4202fb45-dea7-4727-88b2-4056f98764fe
prashantpandey9/create-your-own-what-you-want
c++/recursive-bubblesort.cpp
#include <bits/stdc++.h> using namespace std; void bubble_sort(int a[], int n) { //base step/condition if (n == 1) return; //Perform the operation for the first pass only for (int i = 0; i < n - 1; i++) if (a[i] > a[i + 1]) { int t = a[i]; a[i] = a[i + 1...
ALGO
0.99957
5.362786
{ "github_metadata": { "branch": "master", "commit_count": 482, "repo_created_at": "2018-10-14T05:45:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 26, "forks": 93, "issues": 0, "pull_requests": 10 }, "file_meta": { "content_id": "070e3...
eb62db09-d5ee-430d-82b9-dc4f5c82bd26
npole0103/coding-test-cpp
coding-test-cpp/NumberOfPartialSequenceSum.cpp
//#include <iostream> //#include <algorithm> //#include <string> //#include <vector> //#include <set> //#include <map> //#include <queue> //#include <stack> //#include <math.h> //using namespace std; // //int solution(vector<int> elements) { // set<int> s; // int n = elements.size(); // // elements.resize(2 * ...
ALGO
0.998374
4.867773
{ "github_metadata": { "branch": "master", "commit_count": 229, "repo_created_at": "2022-07-31T17:15:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc35ca71...
8dfdc689-ac54-4837-aa2c-0f5147ad2e01
hergerr/OpenGLPerspective
main.cpp
#include <GL/glut.h> #include <math.h> typedef float point3[3]; static GLfloat viewer[] = {3.0, 3.0, 10.0}; float up = 0.0; float side = 0.0; float r = 10.0; bool mode = true; static GLfloat theta = 0.0; // kฤ…t obrotu obiektu static GLfloat alfa = 0.0; // kฤ…t obrotu obiektu static GLfloat pix2angle; // przeliczn...
ALGO
0.937598
5.241818
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-12-08T17:02:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "439cb08413...
05866737-5d0b-4f37-8dd3-b33b0704b0eb
utec-cs-aed-2021-1/proyecto-de-curso-team-triple-for
Graph/Algorithms/dijkstra.h
#ifndef DIJKSTRA #define DIJKSTRA #include <climits> #include "graph.h" template <typename TV, typename TE> class Dijkstra { public: Graph <TV, TE> *graph; string start_id; Dijkstra(Graph <TV, TE> *graph, string id) { this->graph = graph; this->start_id = id; } bool any_false(std:...
ALGO
0.998876
4.149715
{ "github_metadata": { "branch": "main", "commit_count": 36, "repo_created_at": "2021-06-15T17:39:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "e5f071b9f3bf...
625d740f-daee-479c-8142-0b4a01bc395f
pawan-nirpal-031/Algorithms-And-ProblemSolving
LearningSeries/CSESProblemSet/SearchingAndSorting/Express_the_Number.cpp
// Problem Link : #include <bits/stdc++.h> using namespace std; typedef unsigned long long int ull; typedef long long int ll; typedef long double ld; #define Mod 1000000007 #define Infinity (ll)1e18 #define Append(a) push_back(a) #define Pair(a,b) make_pair(a,b) #define Clear(a) for(ll &x : a){x=0;} #define Point(x) s...
ALGO
0.999954
4.164269
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2021-03-16T14:30:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5d0bb1b...
847a40c3-af64-45ac-ba0b-69f5117aa52e
imsangamesh/DSA
RESTART/04_WEEK_2_ASS/02_numeric_hollow_inverted_half_pyramid.cpp
#include <iostream> using namespace std; int main() { int n; cin >> n; //! NUMERIC INVERTED HALF PYRAMID //* 123456 //* 2 6 //* 3 6 //* 4 6 //* 56 //* 6 //* MINE // for (int row = 0; row < n; row++) { // for (int col = 0; col < n - row; col++) { // if (col == 0 || row == 0 || row +...
ALGO
0.999938
4.784848
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2023-04-04T02:53: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": "3d322cdf7...
bbb3a393-728d-499f-bccb-7f4a477c3164
kamilszymczak1/my_solutions
poi/XXVIII/cukiernia.cpp
#include <iostream> using namespace std; const long long inf = 1000000000000000000; struct NewCost { long long cost; int pos; NewCost() {} NewCost(long long _cost, int _pos) : cost(_cost), pos(_pos) {} }; NewCost best[3][3]; long long totalCost = 0; void ReadData(); int main() { ios_base::syn...
ALGO
0.999728
4.01773
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2023-04-23T06:54: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": "7b86464a50a...
4bb8f87d-8bcf-4289-877e-0b9f2abbaff9
ishandutta2007/codeforces-p
p_b_p_b/normal/891/E.cpp
#include<bits/stdc++.h> clock_t t=clock(); namespace my_std{ using namespace std; #define pii pair<int,int> #define fir first #define sec second #define MP make_pair #define rep(i,x,y) for (int i=(x);i<=(y);i++) #define drep(i,x,y) for (int i=(x);i>=(y);i--) #define go(x) for (int i=head[x];i;i=edge[i].nxt) #d...
ALGO
0.999897
3.868705
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:49: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": "331a4e77e71e...
f2d57bfd-784b-4047-9c66-8e90ac1aa3ae
raincross7/code-similarity
codes/train_code/problem349/problem349_370.cpp
#include <iostream> #include <cstdlib> using namespace std; class element{ public: int key; char org[2]; int postition; }; void bubble(element *arr, int n); void select(element *arr, int n); int main() { int n; cin>>n; element arr[n]; element arr2[n]; for(int i = 0...
ALGO
0.999951
3.887443
{ "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": "387f3e0a5e11...
1d3aca32-e680-4cc4-ae12-3281bd1f0f16
alibabaei12/Left-Rotation
leftRotation.cpp
//Written by <NAME> #include <iostream> #include <vector> using namespace std; //using vectors vector <int> leftRotation(vector <int> arr1, int d ) { int n = arr1.size(); vector <int> arr2; // create a new array and insert from the previous array int rot = d; //first put the right side of the ro...
ALGO
0.999967
3.99212
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-09-14T02:42: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": "bf1d95c2ac...
89c3153d-5e07-4e0e-be2f-11f2375433f5
Orca0917/Algorithm
BaekjoonOnlineJudge/4013.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; // ๊ต์ฐจ๋กœ์˜ ์ˆ˜์™€ ๋„๋กœ์˜ ์ˆ˜ int n, m; // ๊ต์ฐจ๋กœ ์—ฐ๊ฒฐ ์ •๋ณด๋ฅผ ๊ฐ€์ง„ ์ธ์ ‘ ๋ฆฌ์ŠคํŠธ ์ƒ์„ฑ vector<int> adj[500001]; vector<int> sccGraph[500001]; vector<int> balance(500001, 0); vector<ll> memo(500001, -1); vector<bool> isRestaurant(500001, false); vector<int> sccID(500001, -1); vector<...
ALGO
0.999808
4.194117
{ "github_metadata": { "branch": "main", "commit_count": 826, "repo_created_at": "2021-12-01T08:06:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c07c192efe...
930d5269-6b6a-4b1b-8e41-093802e2fd2f
nickchen111/Leetcode
Dynamic_Programming/1397. Find All Good Strings.cpp
/* 1397. Find All Good Strings */ // TC:O(k + (n+k) + max(m,n) + m*26 + n*26 + m*k*26*k + n*k*26*k) SC:O(m*k + n*k + max(m,n) + k + m) class Solution { using LL = long long; LL MOD = 1e9 + 7; public: int findGoodStrings(int n, string s1, string s2, string evil) { int k = evil.size(); funct...
ALGO
0.999914
5.734836
{ "github_metadata": { "branch": "main", "commit_count": 2388, "repo_created_at": "2023-08-16T05:31:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "946f1b57c...
cf56ccf1-9ac2-4ecc-8159-8f837f719a33
raincross7/code-similarity
codes/train_code/problem428/problem428_239.cpp
#include <bits/stdc++.h> typedef long long int ll; typedef long double ld; using namespace std; const long long int INF = 1e18; const long long int mod = 1e9+7; typedef pair<ll, ll> pairs; typedef vector<pairs> p; struct Edge{ ll to, weight; Edge(ll t, ll w) : to(t), weight(w){} }; using graph = vector<vector...
ALGO
0.999951
3.904258
{ "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": "ae63ed25d0c3...
a30121cd-7e97-42dc-9f16-771be2d470a4
es00/Summer_CSC_CIS_5
Hmwk/Assignment 4/Gaddis_9thEd_Chap5_Prob23_Pattern/main.cpp
/* * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license * Click nbfs://nbhost/SystemFileSystem/Templates/cppFiles/main.cc to edit this template */ /* * File: main.cpp * Author: <NAME> * Purpose: C++ Template To be used in all future Assignments * * Created on ...
ALGO
0.999605
4.794961
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-07-18T22:07:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85bae10670f...
8f0d4cca-d43d-4251-8983-96bc5dfb1878
pz1971/Online-Judge-Solutions
UVA/10183 How many fibs.cpp
#include <bits/stdc++.h> #define vi vector<int> #define vb vector<bool> #define vc vector<char> typedef unsigned int ui; typedef long int li; typedef unsigned long lu; typedef long long ll; typedef unsigned long long llu; using namespace std; //double const pi = acos(-1.0); //void scanf(ll &n) // { // bool negativ...
ALGO
0.999911
3.885833
{ "github_metadata": { "branch": "master", "commit_count": 135, "repo_created_at": "2019-09-01T13:03:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "317077b7...
97bb0bb7-c88e-4351-bf59-08852b6c652c
evilmucedin/project-euler
leetcode/maximum-value-of-k-coins-from-piles/maximum-value-of-k-coins-from-piles.cpp
#include "../header.h" class Solution { public: void split(int now, int index, int sum, int& mx, vector<vector<int>>& suffixes) { if (now < 0) { return; } if (index == suffixes.size() || now == 0) { mx = max(mx, sum); return; } for (int ...
ALGO
0.999401
5.781277
{ "github_metadata": { "branch": "master", "commit_count": 1124, "repo_created_at": "2012-05-06T15:25:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b5a67a9...
6a9faaca-dc23-4f13-b34f-a73e494ffc8f
kongjun18/leetcode
longest-substring-without-repeating-characters-3.cc
// ๆป‘ๅŠจ็ช—ๅฃ // // ็ฎ—ๆณ•๏ผšไธๆ–ญๅ‘ๅณๆ‹“ๅฑ•็ช—ๅฃ๏ผŒๅ‡บ็Žฐ้‡ๅคๅญ—็ฌฆไธฒๆ—ถ๏ผŒ็ผฉๅฐ็ช—ๅฃๅทฆ่พน็•Œ๏ผŒ็›ดๅˆฐ้‡ๆ–ฐๆปก่ถณโ€œไธๅญ˜ๅœจ้‡ๅคๅญ—็ฌฆโ€ใ€‚ // // ๅฎž็Žฐ๏ผšๅฏไปฅไฝฟ็”จ set ่ฎฐๅฝ•้‡ๅคๆƒ…ๅ†ต๏ผŒไนŸๅฏไปฅไฝฟ็”จ map ่ฎฐๅฝ•ๆฏไธชๅญ—็ฌฆๅ‡บ็Žฐ็š„ๆฌกๆ•ฐใ€‚ // map ็š„ๅฎž็Žฐๆ›ดๅŠ ็ฎ€ๅ•ใ€‚ class Solution { public: int lengthOfLongestSubstring(string s) { int maxLen = 0; unordered_map<int, int> m; for (int start = 0, end = 0; end < s.size(); end++) {...
ALGO
0.999642
6.554771
{ "github_metadata": { "branch": "main", "commit_count": 178, "repo_created_at": "2022-01-26T10:21:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c0a6d7edb...
9be9bc36-1b42-4f36-97aa-8898ac67144a
ishandutta2007/codeforces-n
noshi91/normal/1523/B.cpp
//#define NDEBUG #pragma warning(disable : 4146 2397) #include <algorithm> #include <cassert> #include <cstddef> #include <cstdint> #include <iostream> #include <utility> #include <vector> namespace n91 { using i32 = std::int32_t; using i64 = std::int64_t; using u32 = std::uint32_t; using u64 = std::uint64_t; using ...
ALGO
0.997795
3.857265
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65a2f06d9d17...
279b1718-d8f2-4c3d-8a60-f5bb27c05473
anthonyzhub/Bowers-Sorting-Project
main.cpp
// // main.cpp // Algorithm Project // // Created by <NAME> on 12/3/18. // Copyright ยฉ 2018 <NAME>. All rights reserved. // // Sources: geekforgeek.org & stackoverflow.com #include <iostream> #include <fstream> #include <sstream> #include <string> #include <vector> using namespace std; #pragma mark Custom MergeS...
ALGO
0.999936
5.166433
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-12-14T18:26: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": "0f0e9a75f4...
22a2b9f9-5fca-41c1-8892-53535aaf82e8
matt-rymar/competitive-programming
library/SegmentTree.cpp
// TODO: accumulateWhole function? As a shorthand for query(0, sz-1). // TODO: think about the exact axiomatic requirements on the predicate for the // search (lowerBound/upperBound) functions. // TODO: generally clean up lowerBound/upperBound. // TODO: implicit segment tree (change children from unique_ptr to a proxy ...
ALGO
0.999287
7.119907
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-01-14T10:39:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "483a286cceda...
ebb86b73-5644-4ce6-80cd-aaca08dc7f95
masoud-rafiee/Complex-Number-DSA-
Complex Number (DSA).cpp
/*Here, we define a class of complex numbers with imaginary and real parts and doing BIG FIVE and some operation and manipulation on them*/ #include <iostream> #include <cmath> using namespace std; class complex { private: double re, im; //re for real and im for imaginary public: complex() : re{ 0 }, im{ 0 }...
TOOL
0.951005
4.761639
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-07-31T05:15: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": "2077efa09e...
34acd345-b859-4ba6-9a70-8162380252a5
KerelOlivier/AoC2021
d11.cpp
#include<iostream> #include<string> int step1(ushort map[10][10]); int step2(ushort map[10][10]); int main(){ std::string s; ushort map[10][10]; ushort map2[10][10]; for(int i = 0; i < 10; i++){ std::cin >> s; for(int j = 0; j < 10; j++){ map[i][j] = s[j] - '0'; map2[i][j] = s[j] - '0'; ...
ALGO
0.999694
3.618028
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2021-12-01T18:47: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": "1eecbaf1a...
d0d48f85-7e66-4396-90ac-8473f531c71c
orifs/ori
public/ori/treediff.h
/* * Copyright (c) 2012 Stanford University * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR(S)...
TOOL
0.925745
6.822263
{ "github_metadata": { "branch": "master", "commit_count": 1004, "repo_created_at": "2014-01-15T06:20:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 29, "forks": 8, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "d5cb97c...
f5b20d95-16dd-4331-9946-848bdd6d4736
ishandutta2007/codeforces-a
al.cash/normal/582/B.cpp
#include <stdexcept> #include <iostream> #include <sstream> #include <fstream> #include <cstring> #include <cstdarg> #include <cstdio> #include <cmath> #include <ctime> #include <functional> #include <algorithm> #include <complex> #include <numeric> #include <bitset> #include <vector> #include <string> #include <queue>...
ALGO
0.999859
3.601157
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e8ae01a57e5c...
dde57d7e-c4a2-4079-801a-a134981e69b2
friackazoid/math_tests
remove_n.cpp
#include <list> #include <iostream> #include <algorithm> #include <vector> #include <ctime> int main () { const int N = std::rand() % 10 + 1; std::cout << "Found and remove N=" << N << std::endl; std::list<int> l(10); std::srand(time(NULL)); std::generate(l.begin(), l.end(), [](){ return std::ran...
TOOL
0.944058
5.875352
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-04-22T05:34:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29e3e6168f...
1dcb4c44-647d-4f68-bb25-6d9e00caf499
JoHoYoung/Algorithm
BackJoon's Problem/๋‹จ์–ด๊ฒ€์ƒ‰.cpp
#include<iostream> #include<cstring> #include<vector> #include<set> #include<algorithm> #include<cmath> #include<queue> #include<map> #define MAXN 31 #define INF 987654321 #define MAX 1000000 using namespace std; using ll = long long; using P = pair<int, int>; typedef struct nodes { vector<pair<int, nodes*>> lea...
ALGO
0.99996
4.056856
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2018-05-22T11:42:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a3f264ab...
926e26c1-14ae-40d8-972c-d44d28a584f9
josblax/ED
09_Clases_y_Objetos/00_Clase_Alumno/claseAlumno4.cpp
// ConsoleApplication21.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <vector> #include <algorithm> using namespace std; // Globales int numMaterias; //class class Materias { public: string materia; double calificacion; }; class Alumno ...
TOOL
0.965644
4.189722
{ "github_metadata": { "branch": "main", "commit_count": 476, "repo_created_at": "2024-09-16T19:47:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b6160fb739...
f5178eb2-991e-4403-8221-ea8dcdc364dd
atom9006/Competitive_Programming
Google Code Jam/GCJ2021/Qualification Round 2021/Moons_and_Umbrellas.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef unsigned long long int ull; typedef long double ld; //%Lf #define MOD 1000000007 int main(void) { int t, tt; cin >> t; for (tt = 1; tt <= t; tt++) { int i = 0, j = 0, n, x, y, ans = 0, anscj, ansjc; string s, prev, ssc = "...
ALGO
0.999956
3.586185
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-04-03T13:09: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": "600824b4eab...
8e7e8f61-cb65-41ed-9604-8fd710b16bc6
arvid220u/turingsgang
problems/taltankmedlinn/solution.cpp
#include <bits/stdc++.h> using namespace std; int main() { // Deklarera talet x, som Linn tรคnker pรฅ int x; // Lรคs in x cin >> x; // Skapa ett nytt tal y, som รคr talet Linn kommer att sรคga hรถgt // Vi kommer att behรถva x senare int y = x; // Lรคgg till 19 y = y + 19; // Mu...
ALGO
0.999754
3.109931
{ "github_metadata": { "branch": "master", "commit_count": 184, "repo_created_at": "2017-06-08T16:02: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": "ef1e2d4a...
421b46ab-2bf1-4ee4-b683-9e23990882f1
rrichajalota/InterviewBit
Linked List/removeDuplicatesfromSortedList-2.cpp
/* Remove Duplicates from sorted list- 2 Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1->2->3->3->4->4->5, return 1->2->5. Given 1->1->1->2->3, return 2->3. */ /** * Definition for singly-linked list...
ALGO
0.999976
4.838949
{ "github_metadata": { "branch": "master", "commit_count": 116, "repo_created_at": "2016-06-23T06:47:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d696952f...
b480d35a-46df-4370-b4d4-d3c28ee6b6c6
onenewarm/codetree-TILs
240521/์ •์ˆ˜ ์‚ฌ๊ฐํ˜• ์ตœ๋Œ€ ํ•ฉ/maximum-sum-path-in-square.cpp
#include <iostream> using namespace std; int N; int matrix[101][101]; int dp[101][101]; int DFS(int Row, int Col) { if(dp[Row][Col] != -1) return dp[Row][Col]; dp[Row][Col] = max(DFS(Row-1,Col), DFS(Row,Col-1)) + matrix[Row][Col]; return dp[Row][Col]; } int main() { // ์—ฌ๊ธฐ์— ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”. cin ...
ALGO
0.99999
4.083794
{ "github_metadata": { "branch": "main", "commit_count": 494, "repo_created_at": "2023-12-13T03:27: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": "8d298f6486...
2bfe2cf1-6906-4ca8-a748-478bdb1f9daa
526766987/MulitRobs_Delivering_Scheduling_MotionControl
Map.cpp
#include "Map.h" #include "Global.h" #include "Main.h" #include "Path.h" #include "Attack.h" using namespace std; int MAPKIND = 0; //ๅœฐๅ›พ็ฑปๅž‹ๅˆๅง‹ๅฎšไน‰ไธบ้ป˜่ฎคๅ€ผ bool wallMap[100][100] = { false }; // ๅข™ๅœฐๅ›พ bool expandWall[100][100] = { false }; // ๅข™้ขๆ‰ฉๅฑ•ๅŽ็š„ๅœฐๅ›พ bool chessBoard[101][101] = { false }; // ๅ›ดๆฃ‹ๅœฐๅ›พ /*่ฏ†ๅˆซๆ˜ฏๅฆไธบ2็ฑปๅ›พ*/ bool map2_identi...
ALGO
0.999047
3.352087
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-05-06T01:08: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": "786f80f65963...
b34ee0ff-4124-47cc-a8ac-575f35c4acbc
jnorthrup/jmodelica2014
ThirdParty/CppAD/cppad-20100325/example/jac_lu_det.cpp
/* $Id: jac_lu_det.cpp 1370 2009-05-31 05:31:50Z bradbell $ */ /* -------------------------------------------------------------------------- CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-07 <NAME> CppAD is distributed under multiple licenses. This distribution is under the terms of the ...
TEST
0.998802
6.626455
{ "github_metadata": { "branch": "master", "commit_count": 4876, "repo_created_at": "2014-03-20T17:20:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf29d08...
b9625769-28b4-44b4-8ad1-f3ff3a798724
Tora416/MultiCodeEmbed
dataset/dataset_raw/gcj_cpp/qingl/5304486_5697460110360576_qingl.cpp
#include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> using namespace std; typedef long long ll; const int N = 105; struct P { int l, r; } d[N][N]; bool cmp(P x, P y) { return...
ALGO
0.99907
3.148939
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2025-07-10T08:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "799df4186...
e6ace35d-b551-401a-ae45-8f47c1aef7f8
weihaoqu/ICS
repo/include/ns3.18.1/ns3/Geodesic.hpp
// iTetris INTECS /** * \file Geodesic.hpp * \brief Header for GeographicLib::Geodesic class * * Copyright (c) <NAME> (2009, 2010) <<EMAIL>> * and licensed under the LGPL. For more information, see * http://geographiclib.sourceforge.net/ **********************************************************************/ #...
ALGO
0.99322
6.492549
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-04-17T03:21: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": "d337667a80...
c72da257-c3e9-4d5f-9e7e-93616c05c0ea
ttyang/sandbox
sandbox/SOC/2008/graphs/branches/placeholder/boost/graphs/directed_graph.hpp
#ifndef DIRECTED_GRAPH_HPP #define DIRECTED_GRAPH_HPP #include <boost/static_assert.hpp> // Notes on directed graphs... Unlike directed graphs, which are required // to globally store edge properties, the vertices directed graphs act as // the stores for nested properties. Edge properties are stored with the // out ...
ALGO
0.972044
7.59699
{ "github_metadata": { "branch": "trunk", "commit_count": 20907, "repo_created_at": "2013-10-11T03:08:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "593e9c4...
3e493b26-6794-4818-8c44-e3c8c34a91f7
Richie314/SimpleCode
C++/SoringAlgorithms/QuickSort.h
template <typename T> inline size_t QuickSortDivision(T* arr, size_t since, size_t to, bool (*compare)(T a, T b) = [](T a, T b) {return (a <= b); }, void (*swap)(T* a, T* b) = [](T* a, T* b) { T c = *a; *a = *b; *b = c; }) { T pivot = arr[to]; size_t i = since - 1U; for (size_t j = since; j <= (to - 1U); j++) ...
ALGO
0.999925
5.513221
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-10-05T20:12: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": "c889db594d2...
61f27b90-9ccc-4fc5-b8b8-f0f6654dd21b
aerimforest/Algorithm-Study
Baekjoon/hyeonyoung/๋‹ค๋ฆฌ ๋งŒ๋“ค๊ธฐ 2.cpp
// 221106_BOJ_17472 #include <iostream> #include <queue> using namespace std; int N, M, board[11][11], answer = 0; int island[11][11], bridge[11][11]; bool connect[11]; struct state { int A, B, br; bool operator<(const state &X) const { return this->br > X.br; } }; const int dx[] = {-1, 1,...
ALGO
0.999971
4.105848
{ "github_metadata": { "branch": "main", "commit_count": 2022, "repo_created_at": "2022-08-16T13:07:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c5d4e4...
0569e78e-c14d-49e8-8b9d-596cf4c6d864
sam1322/100DaysOfCode
leetcode.cpp
#include<bits/stdc++.h> #include<algorithm> using namespace std; #define fr(i,a) for(int i=0;i<a;i++) #define forn(i,a,n) for(int i = a; i < n ;i++) #define Sort(a) sort(a.begin(),a.end()) #define Rev(k) reverse(k.begin(),k.end()) #define Sz(x) x.size() #define Show(v) for(int i =0 ; i < v.size();i++) cout<<v[i]<<" ...
ALGO
0.999873
3.416583
{ "github_metadata": { "branch": "master", "commit_count": 585, "repo_created_at": "2021-08-09T05:34: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": "c8021148...
0040883e-e309-4547-9975-d22335147b24
gghtn/BOJ
Shortest Path/Floyd Warshall/11404.cpp
#include <iostream> #include <algorithm> using namespace std; int n, m; int dp[101][101]; void floyd() { for (int k = 1; k <= n; ++k) { for (int i = 1; i <= n; ++i) { for (int j = 1; j <= n; ++j) { dp[i][j] = min(dp[i][j], dp[i][k] + dp[k][j]); } } } } int main() { cin.tie(NULL); cout.tie(NUL...
ALGO
0.999995
4.208095
{ "github_metadata": { "branch": "main", "commit_count": 284, "repo_created_at": "2022-01-06T15:17:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "469d03ce9e...
945ada86-9c21-4a3d-bbdb-b474982985f7
suziinee/Backjoon
BFS/1697 ์ˆจ๋ฐ”๊ผญ์งˆ.cpp
#include <iostream> #include <queue> using namespace std; #define MAX 100000 int n, k; struct POS { int x; int t; }; void input() { cin >> n >> k; } int bfs() { queue<POS> q; bool chk[MAX + 10] = { false }; q.push({ n, 0 }); chk[n] = true; while (!q.empty()) { POS tmp = q.front(); q.pop(); if (tmp.x - ...
ALGO
0.999921
3.739511
{ "github_metadata": { "branch": "main", "commit_count": 292, "repo_created_at": "2022-02-15T03:02:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2bcca98353...
288f6a23-617b-4d0b-aa52-8f7f10ecf83f
curow/Problem-Solving
acwing/Level-2/798. ๅทฎๅˆ†็Ÿฉ้˜ต/solution.cc
#include <iostream> #include <vector> using namespace std; int main() { int n, m, q; cin >> n >> m >> q; vector<vector<int>> matrix(n + 2, vector<int>(m + 2, 0)); auto insert = [&](int x1, int y1, int x2, int y2, int c) { matrix[x1][y1] += c; matrix[x1][y2 + 1] -= c; matrix[x2 ...
ALGO
0.999856
4.649673
{ "github_metadata": { "branch": "master", "commit_count": 353, "repo_created_at": "2020-04-05T02:49:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "baf5bb69...
d670d2ea-ba7a-421b-8d48-c4ed87720760
Popotanu/sandbox_kyopro
typical90/024/main.cpp
#include <bits/stdc++.h> using namespace std; /* -------------ACL--------------- */ // #include <atcoder/fenwicktree> // #include <atcoder/segtree> // #include <atcoder/lazysegtree> // #include <atcoder/string> // // #include <atcoder/math> // #include <atcoder/convolution> // #include <atcoder/modint> // // #include...
ALGO
0.999981
5.355001
{ "github_metadata": { "branch": "main", "commit_count": 246, "repo_created_at": "2022-08-24T08:34: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": "3a7fc1ba45...
9327576b-92c0-49f7-bed2-b71f03b1017d
ishandutta2007/codeforces-l
laycurse/normal/1534/B.cpp
#pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC optimize("inline") #include<bits/stdc++.h> using namespace std; template<class T> struct cLtraits_identity{ using type = T; } ; template<class T> using cLtraits_try_make_signed = typename conditional< is_integral<T>::value, make_...
ALGO
0.999286
4.192491
{ "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": "2f90f799bbaa...
a6335931-1ff7-4669-9a9b-7d5d55ac15ef
dbirch997/cantera
cantera18/changes/liquidTransportDevelop/Cantera/src/transport/MultiTransport.h
/** * @file MultiTransport.h * Interface for class MultiTransport * */ // Copyright 2001 California Institute of Technology #ifndef CT_MULTITRAN_H #define CT_MULTITRAN_H // Define this for better agreement with Chemkin TRANLIB results, even // if the results are less correct. //#undef CHEMKIN_COMPATIBILITY_...
ALGO
0.998705
6.837929
{ "github_metadata": { "branch": "master", "commit_count": 3428, "repo_created_at": "2015-04-26T13:53:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 24, "pull_requests": 0 }, "file_meta": { "content_id": "4df81b...
dbc63f83-509e-4ad3-b4bc-da8c09112c8f
vikash2231/GFG-Problem-of-the-day
remainder_on_dividing_by_11.cpp
/*Given a big positive number x represented as string, find value of x % 11 or x mod 11. Output is expected as an integer. Example 1: Input: x = 1345 Output: 3 Explanation: 1345 % 11 = 3 Example 1: Input: x = 231456786543567898765 Output: 1 Explanation: 231456786543567898765 % 11 = 1 Your Task: You don't need to...
ALGO
0.999845
4.951669
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2023-02-26T14:37:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "289cedc388a...
0ebf798b-079f-4a2c-aadd-52da631065e9
simonefinelli/Cpp-Notes
Beginner/06_ProgramFlow/DoWhile/main.cpp
// Section 9 // Do-while // Simple Menu Example #include <iostream> using namespace std; int main() { char selection {}; do { cout << "\n---------------------" << endl; cout << "1. Do this" << endl; cout << "2. Do that" << endl; cout << "3. Do something else" << endl; ...
TOOL
0.906109
3.813658
{ "github_metadata": { "branch": "main", "commit_count": 126, "repo_created_at": "2022-03-31T10:55:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a4f4dddd...
7a960ced-2c1a-4c2b-be1d-db0447092cc8
freebsd/freebsd-ports
graphics/dilay/files/patch-lib_src_isosurface-extraction_grid.cpp
--- lib/src/isosurface-extraction/grid.cpp.orig 2020-10-19 21:28:22 UTC +++ lib/src/isosurface-extraction/grid.cpp @@ -50,7 +50,7 @@ namespace false, true, false, true, false, false, false, false, false, false, false, false, true, false, false, true, false, false, false, false, false, false}; - static c...
ALGO
0.990763
6.621888
{ "github_metadata": { "branch": "main", "commit_count": 713138, "repo_created_at": "2011-05-26T11:15:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1066, "forks": 794, "issues": 0, "pull_requests": 54 }, "file_meta": { "content_id": "8c...
320cc595-44c7-4e5d-9aae-6e54ded8627a
m9-meguroyuya/programming2
main.cpp
#include <iostream> #include <string> #include <fstream> #include <vector> #include <algorithm> #include <random> //้ธๆ‰‹ใฎใ‚ฏใƒฉใ‚น class LFC_Player { protected: int _num; std::string _position; std::string _name; public: LFC_Player(){} void setNum(int num) { _num = num; } void setPosition(std::str...
TOOL
0.905791
3.303175
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-08-08T10:35: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": "c227aff447bc...
41e20acb-aca7-4dc7-aec6-d22a761a5150
fengvyi/LeetCode
C++/333. Largest BST Subtree.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 largestBSTSubtree(TreeNode* root) { int res = 0; dfs(root, res); re...
ALGO
0.99989
6.149904
{ "github_metadata": { "branch": "master", "commit_count": 1188, "repo_created_at": "2017-08-06T09:52:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 144, "forks": 39, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "1b74...
74e6f767-cd2f-4bda-9e05-92bd4d68b48b
ishandutta2007/codeforces-l
lucccff/normal/1575/F.cpp
#include <bits/stdc++.h> #define MOD 1000000007 #define maxn 300005 #define LL long long using namespace std; const LL mod1=998244353,mod2=1004535809,mod3=469762049,g1=3; const LL M=1LL*mod1*mod2; long long a[100010],b[100010],c[100010],d[100010]; map <int,int> p; long long inv(long long x) { if (x==1) return x;...
ALGO
0.999923
4.078112
{ "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": "19bebccdd491...
48429149-cbb3-4939-9558-dc4981946907
Izaron/ACM-ICPC
Timus Online Judge/Volume 1/1007. Code Words.cpp
// The solution of the problem was written by Izaron // Date: 22:22:15 18 Feb 2015 // Execution time: 0.531 // Please do not copy-paste the solution. // Try to understand what is happening here and write your own. #include <string> #include <sstream> #include <cstring> #include <sstream> #include <vector> #include ...
ALGO
0.999943
3.149888
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2017-07-17T18:21:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe9fe9992...
8096c1bb-9515-4151-9e63-423bd2fb870b
abarankab/moscow-workshop-juniors-2019
Day3/F/F/Source.cpp
#include <iostream> using namespace std; #define int long long const int MAXN = 1005; const int MOD = 1e9 + 7; int n, pw[MAXN * MAXN], dp[MAXN], c[MAXN][MAXN]; signed main() { pw[0] = 1; dp[2] = 1; dp[0] = 1; c[0][0] = 1; for (int i = 1; i < MAXN * MAXN; ++i) { pw[i] = pw[i - 1] * 2; if (pw[i] > MOD) pw[i...
ALGO
0.999982
3.995132
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-09-24T17:43: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": "cc39505661...
c86c6d51-d1c3-4f0c-89a0-99cef1d782ea
shbhmexe/LeetCode-Question-Sol
Daily Questions/Easy/FindLuckyIntegerinanArray_1394.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int findLucky(vector<int>& arr) { unordered_map<int, int> freq; // Frequency count for (int num : arr) { freq[num]++; } int ans = -1; // Check lucky number for (auto it : fr...
ALGO
0.999944
5.36112
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2025-07-01T14:45: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": "165e000e2af...
6feb95fc-8121-448d-bd16-7efd23bcd667
xuqing-ict/BackupCode
DaiziGuiZhong/perfectShuffle.cc
/** * @file perfectShuffle.cc * @brief * @author <NAME>, <EMAIL> * @version 0.1.00 * @date 2014-11-06 */ #include <bits/stdc++.h> using namespace std; void shuffle(char *A, const int R, const int C) { if(A == nullptr || R <= 0 || C <= 0 ) return ; if(R == 1 || C == 1 ) return; const int size = R*C-...
ALGO
0.988751
3.615303
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2014-09-24T02:28: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": "6fd47aefc...
030f7938-bad7-4912-9b97-424c48aaf15b
Girgingokhan/C_Applications
cift bir dizideki tek ve cift sayฤฑlarฤฑ ayฤฑran uygulama.cpp
/* ร‡ift ve Tek Sayilari iki Ayri Diziye Yerlestiren C Programi*/ #include<stdio.h> void PrintArray(int a[], int Size); int main() { int Size, i, a[5], cift[5], tek[5]; int cift_Count = 0, tek_Count = 0; printf("\n dizinin boyutunu gir : "); scanf("%d", &Size); printf("\n dizideki elemanlari gir : "); for(i...
ALGO
0.999411
3.963446
{ "github_metadata": { "branch": "C/C++projeler", "commit_count": 3, "repo_created_at": "2022-11-24T15:00:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d6...
5600d48d-e308-458b-84f4-e8477a0c36f8
CMU-SAFARI/ramulator
trace_generator/src/gettrace.cpp
/* * This file contains an ISA-portable PIN tool for tracing memory accesses. */ #include <stdio.h> #include <iostream> #include <string> #include <sstream> #include <unistd.h> #include <fstream> #include "pin.H" #include "Cache.h" #include "Cache.cpp" #include "Config.h" #include "Config.cpp" #include "PPFileParse...
TOOL
0.91685
4.920493
{ "github_metadata": { "branch": "master", "commit_count": 96, "repo_created_at": "2015-03-27T03:59:59.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 643, "forks": 216, "issues": 59, "pull_requests": 6 }, "file_meta": { "content_id": "cdc4a...
9a117e2f-1801-49f1-b9ef-b0dc56129fdd
alidev313xA/leetcoding-jul25-
Day 3/3304-Find-the-K-th-Character-in-String-Game-I.cpp
// https://leetcode.com/problems/find-the-k-th-character-in-string-game-i // Two approaches 1st is the simple simulation ( but got in TLE lol, but still worked after a little improvement) // Second one is the most intresting, you got it correct its the Bit Manipulation, hey dont think it'd be too difficult nahh, its ...
ALGO
0.999477
4.533222
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-07-01T19:20:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d7f2bc2d5cb5...
7f6b74f9-bf25-4662-ab4b-f8d2f377c7ff
zimasilevuyo/BMI-Calculator
BMICalculator.cpp
//Calculates BMI and Displays a weight status #include <iostream> #include <string> #include <cmath> using namespace std; //Functions to Input Height and Weight Data from User float getdata( float & Weight, float & Height ) { cout << "Input your Weight " << endl; cin >> Weight; cout << "Inp...
ALGO
0.996075
5.306801
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-09-14T13:46: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": "4f26efa61e...
aec03a57-72db-4491-8668-6c0f2ee8f83f
devs4v/devs4v-information-retrieval15
project/lucene/pylucene-4.9.0-0/build/lucene/include/org/apache/lucene/search/suggest/InMemorySorter.h
#ifndef org_apache_lucene_search_suggest_InMemorySorter_H #define org_apache_lucene_search_suggest_InMemorySorter_H #include "java/lang/Object.h" namespace org { namespace apache { namespace lucene { namespace util { class BytesRefIterator; class BytesRef; } namespace search { ...
TOOL
0.904871
6.575686
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2015-04-08T18:54:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1fda3c6d...
f328b742-9234-4862-bf9c-8389ce79efbb
KRM7/gapp
examples/8_genetic_operators.cpp
/* Example showing the usage of the genetic operators in the GAs. */ #include "gapp.hpp" #include <algorithm> #include <iostream> using namespace gapp; class MyCrossover : public crossover::Crossover<PermutationGene> { public: using Crossover::Crossover; CandidatePair<GeneType> crossover(const GaInfo&, cons...
ALGO
0.999701
7.00987
{ "github_metadata": { "branch": "master", "commit_count": 1426, "repo_created_at": "2021-08-14T17:41:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 36, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "87a9e1...
fd9ddcc8-a4ff-4e21-910f-f384d1392674
Subhash575/myResource
stackAndQueue/Infix_prefix_postfix/01infixToPostfixConversion.cpp
#include <bits/stdc++.h> using namespace std; int priority(char x) { if (x == '^') { return 3; } else if (x == '*' || x == '/') { return 2; } else if (x == '+' || x == '-') { return 1; } else { return -1; } } string infixToPostfix(string ...
ALGO
0.999956
5.127731
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-01-26T09:06: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": "a76a8ffc2ba...
64281ce0-096c-44f3-bf98-97318ac3fdf7
ardRiriy/old-CompetitivePrograming
ABC/D/295.cpp
#include <bits/stdc++.h> #define int long long #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define print(x) cout << x << endl const int INF = LLONG_MAX; const int N_INF = LLONG_MIN; using namespace std; class UnionFind { private: vector<int> uf; public: UnionFind(int size) : uf(size) { for (int i ...
ALGO
0.999963
4.384133
{ "github_metadata": { "branch": "master", "commit_count": 204, "repo_created_at": "2022-06-20T10:32:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9cc6182c...
da9e246b-123c-472a-84de-72056e8b9bd0
azuth/algorithm-exercise
src/insertionsort/insertionsort.h
#pragma once #include <array> namespace Insertionsort{ template <typename T, size_t SIZE> void normal(std::array<T,SIZE> &a){ for(size_t i = 1 ; i < SIZE ; i++){ T t = a[i]; for(size_t j = i ; j > 0 && t < a[j-1]; j--){ a[j] = a[j-1]; a[j-1] = t; ...
ALGO
0.999207
4.990743
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2014-10-11T14:00:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d82f9e47...
8e73345c-7ccb-4dfa-b649-f61fab204efb
dattrxng/INT2210_22
SamSungExercises/Ex25.cpp
#include <iostream> #include <vector> #include <queue> #include <limits> using namespace std; const int INF = numeric_limits<int>::max(); class Edge { public: int u, v, weight; Edge(int u, int v, int weight) : u(u), v(v), weight(weight) {} bool operator>(const Edge &other) const { return weight...
ALGO
0.999976
5.734396
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-09-05T03:09:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ef172a2232a...
50a9d7ee-ee00-4c93-9cb1-ba974d9643ef
Bynaryman/OSFNTC
flopoco/src/PrimitiveComponents/Xilinx/Xilinx_GenericMux_slice.cpp
// general c++ library for manipulating streams #include <iostream> #include <sstream> /* header of libraries to manipulate multiprecision numbers There will be used in the emulate function to manipulate arbitraly large entries */ #include "gmp.h" #include "mpfr.h" // include the header of the Operator #include...
TOOL
0.911961
3.383083
{ "github_metadata": { "branch": "main", "commit_count": 340, "repo_created_at": "2023-05-30T08:55:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cba6373d52...
e6fbbdd6-399d-41f9-9b3d-bdf24b39fe6a
salmaan25/UVa
12442.cpp
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define endl "\n" #define all(x) (x).begin(), (x).end() #define PI 3.1415926535897932384626433832795 int powmod(int a,int b,int mod) {int res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;} typedef long l...
ALGO
0.999843
4.306959
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-02-18T00:36: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": "7c4d1f2a54...
ca61e3d7-02eb-45c4-a55a-fcf963a8c44b
Jajajou/CodeLearningProcess
CSES_GRAPH_ALGORITHMS/SHORTEST_ROUTE_I/shortestRouteI.cpp
/* __ (\_/) ._( .)<(MEOW) (WOOF)('V') \____) (U U) */ #include <bits/stdc++.h> using namespace std; #define name "shortestRouteI" //pls dont forget your task's name #define maxn int(2e5) + 25 #define pri_q priority_queue #define pf push_front #define pb push_back #define popb pop_back #...
ALGO
0.999988
4.216925
{ "github_metadata": { "branch": "master", "commit_count": 157, "repo_created_at": "2021-06-24T17:36: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": "994cdceb...
b5fcc11d-7ff5-4af7-bc54-357a8628d9d5
kei1107/algorithm
problems/yukicoder/No0099.cpp
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int INF = 1e9; const ll LINF = 1e18; template<class S,class T> ostream& operator << (ostream& out,const pair<S,T>& o){ out << "(" << o.first << "," << o.second << ")"; return out; } template<c...
ALGO
0.999924
4.313063
{ "github_metadata": { "branch": "master", "commit_count": 488, "repo_created_at": "2017-10-06T09:12:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90308c77...
f3147aa9-dae3-46ba-aad8-7428b98a2f16
ThiagoBahiaLima/Exercicios_beecrowd
ED/abreviacoes.cpp
#include <bits/stdc++.h> using namespace std; int main(){ string str; map<char,pair<string,int>>::iterator it; map<string,int>::iterator IT; map<char,pair<string,int>> abrevs; map<string,int> quant; while(getline(cin,str) && str != "."){ int cont = 0; istringstream tudo(str); strin...
ALGO
0.997621
3.541706
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-13T10:40: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": "dd163faa01a5...
d88e93af-e58b-4ec1-8140-69d3f621a128
ishandutta2007/codeforces-i
ivan100sic/normal/607/C.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef long double ld; char sup(char x) { if (x == 'N' || x == 'S') return x ^ 'N' ^ 'S'; return x ^ 'E' ^ 'W'; } int n; string a, b; vector<int> zalgo(string s) { int n = s.size(); vector<int> z(n); for (int...
ALGO
0.999985
4.129612
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f33dec2e218c...
3b67de38-3a66-4cb2-b673-0c29f50dcf38
gajanan43/DSA
C++/tuto28b.cpp
#include <iostream> using namespace std; // forward declaration class c2; class c1 { int val1; public: void setValue(int a) { val1 = a; } void display(void) { cout << val1 << endl; } friend void exchange(c1 &, c2 &); }; class c2 { int val2; public: void set...
ALGO
0.982719
4.776769
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-06-13T11:15: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": "fa630bc8848b...