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
26f1ee4d-2e6a-4bcb-8298-049048a07127
Ivanovich0705/C-Notes
C++DataStructures/MyProjects/TF/TF/BinaryTree.h
#pragma once #include <algorithm> #include "SHA265.h" template <class T> class Nodo { public: T elemento; Nodo* izq; Nodo* der; int h; Nodo(T elemento) { this->elemento = elemento; izq = der = nullptr; } Nodo() { } static int altura(Nodo<T>* n) { return n == nullptr ? -1 : n->h; } vo...
ALGO
0.999082
4.766829
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2021-12-06T00:14: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": "fa6c0df623c...
4ea0375a-4ac5-4b99-ba01-bc184205b82d
div5252/Uva-Judge-Solutions
108 - Maximum Sum.cpp
//Using dp. Time-0.020s #include <bits/stdc++.h> using namespace std; #define ll long long #define vll vector<ll> int main() { ll n,ans,sub; while(cin>>n) { ll ar[n][n]; for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { cin>>a...
ALGO
0.999973
3.499897
{ "github_metadata": { "branch": "master", "commit_count": 86, "repo_created_at": "2020-03-25T15:53: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": "0e549656b...
378d9e2d-8def-4695-9c3c-b1b0164081bd
PatelManav/Codeforces_Backup
1133B.cpp
/*May The Force Be With Me*/ #include <bits/stdc++.h> #include <stdio.h> #include <ctype.h> #pragma GCC optimize ("Ofast") #define ll long long #define MOD 1000000007 #define endl "\n" #define vll vector<long long> #define mll map<long long,long long> #define pll pair<long long, long long> #define all(c) c.begin(),c.en...
ALGO
0.999947
3.883401
{ "github_metadata": { "branch": "master", "commit_count": 98, "repo_created_at": "2020-10-01T14:54:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d84cf833...
720ded57-096b-4a64-b794-2e194baafa75
toshiya1015programmer/compro
src/atcoder/typical90/068_segtree.cpp
#include <bits/stdc++.h> #include <atcoder/dsu> #include <atcoder/segtree> using namespace std; using namespace atcoder; using S = long long; S op(S a, S b) { return a + b; } S e() { return 0; } int main() { int n, q; cin >> n >> q; dsu dsu(n); segtree<S, op, e> st(n - 1); for (int i = 0; i < q; i++) { ...
ALGO
0.999374
5.500526
{ "github_metadata": { "branch": "main", "commit_count": 112, "repo_created_at": "2021-11-03T20:29: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": "84972a3071...
a97a552f-b76f-4615-8fbd-f9596b3abcdd
BalhegoJ/producaoaulas
algoritmos.I/M3/exer2.cpp
#include <iostream> using namespace std; int main() { int vetorA[10], vetorB[10], contador[10] = {0}; for (int i = 0; i < 10; i++) { cout << "Informar os valores do vetor: "; cin >> vetorA[i]; } cout << "Impressão do vetor A: "; for (int i = 0; i < 10; i++) { ...
ALGO
0.999567
3.660128
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2024-07-23T18:37: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": "346c529bb3d...
e4c20c91-d169-4b55-b8f7-0037960badaf
xsligroup/chronusq_public
src/matrix/components.cxx
/* * This file is part of the Chronus Quantum (ChronusQ) software package * * Copyright (C) 2014-2022 Li Research Group (University of Washington) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Softwa...
TOOL
0.938967
6.170315
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-06-13T16:17:10.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15, "forks": 5, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "e7dfe13bc4...
7041e435-09dc-4a84-9e23-dd01cc57490a
Thasin-Sheikh/Codeforces-Solutions
976C .cpp
///*<NAME>***/// /***Stay_Home_Stay_Safe***/ ///**Author <NAME>**/// #include<bits/stdc++.h> using namespace std; #define MAX 1e6+10 #define MOD 1000000007 #define PI acos(-1) #define R 510 #define makefast__ ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); using ll=long long int ; using dl =double; using ld=l...
ALGO
0.999899
3.63071
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2023-03-27T10:45:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "11c993bad...
bb92f899-4840-4a38-9d75-d43e04d22395
giri69/StriverSheet-solutions
Stacks and queues/Infix-to-Postfix.cpp
#include <bits/stdc++.h> using namespace std; // Function to check if a character is an operator bool isOperator(char c) { return (c == '+' || c == '-' || c == '*' || c == '/'); } // Function to get the precedence of an operator int precedence(char c) { if (c == '+' || c == '-') return 1; if (c == '*' || ...
ALGO
0.999742
5.918444
{ "github_metadata": { "branch": "main", "commit_count": 224, "repo_created_at": "2024-02-24T08:37: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": "447070f8eb...
f7d573e1-76b6-4379-9cbb-53656d2717a6
zaXsa/School
Lessons/Cpp_W1_exr2/Cpp_W1_exr2/main.cpp
#include <iostream> #include <fstream> #include <iomanip> using namespace std; bool logicFunction(bool b1, bool b2, bool b3); int main(){ int i,j,k; bool a,b,c; bool Bool = true; bool Read = false; ofstream BoolTest; ifstream OtherTest; string text; cout << setw(8) << "Input" << set...
ALGO
0.981229
3.986462
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2018-02-27T17:49: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": "09054e9fc...
4ba89b2f-64d3-489c-add2-c2b73e25283e
FishFilletsNG/Fish-Fillets-NG
src/menu/LevelNode.cpp
/* * Copyright (C) 2004 <NAME> (<EMAIL>) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ #include "LevelNode...
TOOL
0.993843
5.814921
{ "github_metadata": { "branch": "master", "commit_count": 516, "repo_created_at": "2012-02-23T20:36:16.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 4, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "b077313fb...
620f7edd-3aa7-434f-8ea6-fe9ced78ca4e
Racon23/leetcode2
solution/205.同构字符串.cpp
// @before-stub-for-debug-begin #include <vector> #include <string> #include <algorithm> #include <unordered_map> #include "commoncppproblem205.h" using namespace std; // @before-stub-for-debug-end /* * @lc app=leetcode.cn id=205 lang=cpp * * [205] 同构字符串 */ // @lc code=start class Solution { public: bool isI...
ALGO
0.999993
6.547374
{ "github_metadata": { "branch": "master", "commit_count": 312, "repo_created_at": "2020-09-29T09:55: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": "3a625711...
6eeadf1c-a6d7-4be7-9a14-173b950e3339
godsonsphilip/Practise
Floyd-Warshall.cpp
#include <iostream> #include <vector> #include <climits> // For INT_MAX using namespace std; void floydWarshall(vector<vector<int>>& graph, int n) { // Initialize the distance matrix with the given graph vector<vector<int>> dist = graph; // Apply the Floyd-Warshall algorithm for (int k = 0; k < n; k+...
ALGO
0.999994
5.691213
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-05-04T21:00: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": "d90c428ab3af...
a193daa8-81f5-4864-899f-1c80d278b868
graham-jessup/Watchman
Servo_Control.ino
//This function maps the Servo Angles and sends the commands to the servos void SetServoPosition() { // Set X Positions pwm.setPWM(X1SERVO, 0, ConvertToCounts(XFromPi + X1DegComp)); pwm.setPWM(X2SERVO, 0, ConvertToCounts(XFromPi + X2DegComp)); // Serial.print("X "); // Serial.println((-1*(XFromPi + X2DegCom...
TOOL
0.984239
5.539386
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2020-01-11T21:58:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "65daf9d57...
df50bf2a-854c-4ec1-947b-cf7499bc6124
Biplab-Roy/codeforces
1698C/Animesh/Program.cpp
#include<bits/stdc++.h> using namespace std; void solve(){ int n; cin>>n; vector<int> nums(n); for(int i=0;i<n;i++){ cin>>nums[i]; } bool res = true; int posCnt = 0,negCnt = 0; for(auto it:nums){ if(it>0){ posCnt++; }else if(it<0){ negCnt...
ALGO
0.99873
5.06748
{ "github_metadata": { "branch": "main", "commit_count": 122, "repo_created_at": "2023-05-01T13:32: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": "4f0046270f...
0515dbf8-2b5a-4f21-81ca-8c699e7e2fd5
mcclanahoochie/from_google_code
cuda/mm/thrust/thrust/detail/host/find.h
/* * Copyright 2008-2010 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
ALGO
0.999589
6.85347
{ "github_metadata": { "branch": "master", "commit_count": 61, "repo_created_at": "2015-08-25T20:30:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "833606ba3...
6c962bef-84ef-4a2e-bcc7-164ca08d8bdd
ishandutta2007/codeforces-p
potassium/normal/1437/G.cpp
#pragma GCC optimize ("O3", "unroll-loops") //#pragma GCC target ("avx2") //#pragma comment(linker, "/stack:200000000") //#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #include "bits/stdc++.h" #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define all(x) (x...
ALGO
0.999853
3.614411
{ "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": "9697bfce830a...
3bacee3b-0147-4a10-9f6e-40302b653813
TheAlphaBoy/Recursion
Recursion3.cpp
// Array is sorted or not using Recursion /* #include<iostream> #include<vector> using namespace std; bool CheckSorted(vector<int>& arr,int i,int& n) { // Base Case if(i == n-1) { return true; } // 1 case solve kardo if(arr[i] > arr[i+1]) { return false; } // Baki recursion ...
ALGO
0.99944
3.585629
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-01-24T10:35: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": "0afb6dc5828c...
2ce04252-251d-4751-810b-73c72f2d236e
RitikJainRJ/DailyCodingProblem-Practice
Form a palindrome.cpp
#include<bits/stdc++.h> using namespace std; int formPalin(string); int main(){ int t; string str; cin >> t; while(t--){ cin >> str; cout << formPalin(str) << endl; } return 0; } int formPalin(string str){ int n = str.length(); int arr[n][n]; for(int i = 0; i < n...
ALGO
0.999924
4.358497
{ "github_metadata": { "branch": "master", "commit_count": 93, "repo_created_at": "2019-12-12T10:42:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7adc5f41...
a8386150-739c-4dde-a9aa-e018fa34ca34
P79N6A/Codes-1
OJ-Codeforces/Jzzhu and Cities.cpp
#include<algorithm> #include<cctype> #include<cmath> #include<cstdio> #include<cstring> #include<iomanip> #include<iostream> #include<map> #include<queue> #include<set> #include<sstream> #include<stack> #include<string> #define ll long long #define pr(x) cout << #x << " = " << (x) << '\n'; using namespace std; const i...
ALGO
0.99997
3.386981
{ "github_metadata": { "branch": "master", "commit_count": 232, "repo_created_at": "2019-04-23T01:06:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9dcdf649...
18d3a6b9-9932-4840-aab7-34a1735293a6
wjoh0315/BOJSolutions3
BOJ1157_studywords/studywords.cpp
//https://www.acmicpc.net/problem/1157 #include <iostream> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); string in; cin >> in; int max = 0; int maxidx = 0; int idx = 0; bool isSame = false; int alphabet[26] = { 0, }; for (int i=0; i < in.le...
ALGO
0.999991
3.641729
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2021-10-22T13:02: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": "1b79f317333...
faa99782-bbd7-4baa-844e-765b8884a727
strega-nil/stl-tests
vso-1543191.cxx
#include <cstdio> #include <cstring> #include <vector> #include <malloc.h> #define MEMTAG1 1330464077 #define MEMTAG2 1279416658 #define MEMTAG3 558580559 #define MEMFREE 1162170950 typedef struct MemHead { int tag1; size_t len; int tag2; short pad1; short alignment; } MemHead; typedef MemHead M...
TOOL
0.935389
3.174253
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2022-05-13T19:28: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": "da8af6f08b3...
5802bc9e-8cd4-4687-93c4-bd56a7d69760
Ivanhan2018/SixCocos2d-xVC2012
Cocos2d-x/maccpp/dfridr.cpp
// // dfridr.cpp // // // Created by Hsq on 19/8/23. // Copyright © 2019年 Bjoy. All rights reserved. // /* g++ -o dfridr dfridr.cpp HsqtekiMac-2:maccpp Hsq$ ./dfridr 1 dsin(x)/dx|_(x=1)=0.540301,cos(1)=0.540302 err=0.000001HsqtekiMac-2:maccpp Hsq$ ./dfridr 计算一阶导数dfridr(sin,x,h=0.1),请输入x: 1 dsin(x)/dx|_(x=1)=0.540...
ALGO
0.999847
4.789424
{ "github_metadata": { "branch": "master", "commit_count": 62, "repo_created_at": "2018-11-06T02:41:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1951b8f7...
01608538-4879-4cd3-a850-525ae951f646
ansohxxn/coding-test
프로그래머스/Level_2/11-2.cpp
#include <string> #include <vector> #include <map> #include <algorithm> using namespace std; bool cmp(pair<string, int> a, pair<string, int> b){ return a.second > b.second; } vector<string> solution(vector<string> orders, vector<int> course) { vector<string> answer; map<string, int> dic; for (int i ...
ALGO
0.999907
5.266331
{ "github_metadata": { "branch": "main", "commit_count": 514, "repo_created_at": "2021-03-24T10:10:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a91375106c...
5d1428ac-61b5-4569-b1e9-1b2aef848f02
snow-tyan/cpp_wangdao
day15/code_exercise/bind.cc
#include <iostream> #include <functional> #include <algorithm> #include <vector> #include <string> #include <iterator> using std::cout; using std::endl; using std::string; using std::vector; using std::ostream_iterator; using namespace std::placeholders; //提供占位符 _1, _2 ... #if 0 bool isShorter(const string &lhs, const ...
ALGO
0.995688
4.910046
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2019-07-30T02:32:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f35b9486a...
17716901-d497-486a-ad21-d6f5127cff82
hzhihao/sort_optimize
sort/SortMerge.cpp
#include "stdafx.h" #include "SortMerge.h" SortMerge::SortMerge() { } SortMerge::~SortMerge() { } /* * 将一个数组中的两个相邻有序区间合并成一个 * * 参数说明: * a -- 包含两个有序区间的数组 * start -- 第1个有序区间的起始地址。 * mid -- 第1个有序区间的结束地址。也是第2个有序区间的起始地址。 * end -- 第2个有序区间的结束地址。 */ void SortMerge::merge(int a[], int start, int mid, int...
ALGO
0.999617
4.174751
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-08-14T14:26:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8d38346c71...
d3236f0e-bc33-4c58-abd1-72c23396eed9
hanil12/2024_5_30_Unreal
Algorithm/WINAPI_Algorithm/Algorithm/DFS.cpp
#include <iostream> #include <vector> #include <unordered_map> #include <algorithm> #include <stack> #include <queue> using namespace std; // DFS // 깊이우선 탐색 (Deep First Search) // 재귀함수로 구현할 수 있다. vector<bool> visited; vector<vector<bool>> adjacent; void CreateGraph_AdjacentMatrix() { // 0 1 2 3 4 5 6 // ...
ALGO
0.999228
4.647215
{ "github_metadata": { "branch": "main", "commit_count": 176, "repo_created_at": "2024-06-21T01:08: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": "85de16afa6...
4fd845b6-75ae-4d21-8ca7-9345a2fd9bad
ishandutta2007/codeforces-k
kiyoshi0205/normal/1473/F.cpp
#pragma GCC target("avx") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #include<bits/stdc++.h> // #include<ext/pb_ds/assoc_container.hpp> // #include<ext/pb_ds/tree_policy.hpp> // #include<ext/pb_ds/tag_and_trait.hpp> // using namespace __gnu_pbds; // #include<boost/multiprecision/cpp_int.hpp> // nam...
ALGO
0.999813
3.908801
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bcf1e006b874...
8e618c73-0e6d-4cb0-87f5-bf4f9d801f18
gec1234/practical
Rabin-Karp.cpp
a) Rabin-Karp: #include <iostream> #include <string> #include <cmath> using namespace std; #define d 256 const int q = 101; // You can change this to another prime number unsigned long long calculateStringhash(const string &str, int n) { unsigned long long h = 0; for (int i = 0; i < n; i++) { h = (h ...
ALGO
0.999981
6.022522
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-06-26T18:10: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": "2b414faeafb9...
830e7d11-e8b4-43b9-9396-69cf98ac5776
rohakdebnath/ATCODER-solutions
abc356C.cpp
#include <bits/stdc++.h> using namespace std; using i64 = long long; #define UNSYNC ios::sync_with_stdio(false); cin.tie(nullptr); #define all(x) x.begin(), x.end() #define rep(i, ini, x) for (int i = ini; i < x; ++i) #define per(i, fin, x) for (int i = fin; i >= x; --i) int main() { UNSYNC int N, M, K; cin ...
ALGO
0.999613
4.115682
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-07-17T12:08: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": "57d12b984a...
b08ffd9c-2b25-478b-9472-dbf75ffd4723
skn123/clMagma-CMake
src/dorghr.cpp
/* -- clMAGMA (version 1.1.0) -- Univ. of Tennessee, Knoxville Univ. of California, Berkeley Univ. of Colorado, Denver @date January 2014 @generated from zunghr.cpp normal z -> d, Fri Jan 10 15:51:18 2014 */ #include <stdio.h> #include "common_magma.h" extern "C" magma_err_t m...
ALGO
0.987948
5.025618
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2014-04-30T05:37:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28e7a38fce...
fc690afd-a6da-41be-bca3-43f461e1cef7
mikekasprzak/quack
old/GEL2/Generate/Vertex_HalfCircle.h
// - ------------------------------------------------------------------------------------------ - // #ifndef __GEL2_GENERATE_VERTEX_HALFCIRCLE_H__ #define __GEL2_GENERATE_VERTEX_HALFCIRCLE_H__ // - ------------------------------------------------------------------------------------------ - // // action_OutputVertexType...
ALGO
0.989627
6.164763
{ "github_metadata": { "branch": "master", "commit_count": 814, "repo_created_at": "2020-06-11T18:49: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": "8791d122...
1aaf6a97-f1dd-4ff5-baf4-61157bc28374
Lammatian/AdventOfCode
2018/25/first.cpp
#include <iostream> #include <fstream> #include <vector> #include <set> #include <string> #include <cmath> #include <queue> struct Point { int x; int y; int z; int t; }; std::ostream& operator<<(std::ostream& o, const Point& p) { o << p.x << "," << p.y << "," << p.z << "," << p.t; return o; }...
ALGO
0.996533
4.55144
{ "github_metadata": { "branch": "master", "commit_count": 326, "repo_created_at": "2019-12-04T19:49:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "27e39ac9...
4b5d092e-93f5-4121-a659-bbe1a16657ff
Maksym025/Lab_03.2_repos
Lab_03.2/Lab_03.2/Lab_03.2.cpp
//Lab_03.2.cpp //<NAME> //Лабораторна робота №3.2 //Розгалуження, задане формулою: функція з параметрами //Варіант 7 #include <iostream> #include <cmath> using namespace std; int main() { double x; double b; double c; double a; double F; cout << " a ="; cin >> a; cout << " b ="; cin >> b; cout << " c ="; cin >>...
ALGO
0.99921
3.726283
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-16T09:18: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": "f80b3c5647d5...
79d2e347-d5df-4e7f-8131-232349e8b490
vikramkbgs/CP
Merge In Between Linked Lists.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode *mergeInBetw...
ALGO
0.999979
5.22047
{ "github_metadata": { "branch": "master", "commit_count": 294, "repo_created_at": "2021-12-11T11: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": "a976ee0e...
31cfc897-d919-4264-bbef-17faede2b3dc
jkvishu/DSA-Practice-GFG
Medium/Check if Linked List is Palindrome/check-if-linked-list-is-palindrome.cpp
//{ Driver Code Starts #include <stdio.h> #include <stdlib.h> #include <iostream> #include <stack> using namespace std; /* Link list Node */ struct Node { int data; struct Node *next; Node(int x) { data = x; next = NULL; } }; // } Driver Code Ends /* struct Node { int data; struct Node *next; ...
ALGO
0.999854
5.374603
{ "github_metadata": { "branch": "main", "commit_count": 2654, "repo_created_at": "2022-12-31T18:42: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": "63807453a...
dededfa2-f2b4-4ae1-8cb9-b1e9490c9173
nojhan/paradiseo
mo/tutorial/Lesson6/testMetropolisHasting.cpp
//----------------------------------------------------------------------------- /** testMetropolisHasting.cpp * * SV - 22/01/10 * */ //----------------------------------------------------------------------------- // standard includes #define HAVE_SSTREAM #include <stdexcept> // runtime_error #include <iostream>...
ALGO
0.999852
5.597271
{ "github_metadata": { "branch": "master", "commit_count": 5554, "repo_created_at": "2013-01-11T08:47:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 108, "forks": 36, "issues": 45, "pull_requests": 4 }, "file_meta": { "content_id": "c99...
6668b05d-5b6c-4957-8600-5d195e4cd675
Sagar-Wadhwa-726/DSA-Supreme-Batch
Week-19/Lecture-7.cpp
#include <iostream> #include <list> #include <unordered_map> #include <queue> #include <algorithm> #include <stack> #include <limits.h> #include <set> using namespace std; template <typename T> class Graph { public: unordered_map<T, list<pair<T, T>>> adjList; void addEdge(T u, T v, T weight, bool isDirected) ...
ALGO
0.999909
5.175095
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2023-11-24T11:12:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e12ca0c98...
5d9a6be4-804f-4ee6-8cbf-3cf1ebc9ec17
tatt61880/atcoder
submissions/agc029_d/main.cpp
//{{{ #include <bits/stdc++.h> using namespace std; #define repX(a,b,c,x,...) x #define repN(a) repX a #define rep(...) repN((__VA_ARGS__,rep3,rep2,loop))(__VA_ARGS__) #define rrep(...) repN((__VA_ARGS__,rrep3,rrep2))(__VA_ARGS__) #define loop(n) rep2(i_,n) #define rep2(i,n) rep3(i,0,n) #define rep3(i,begin,end) for(in...
ALGO
0.9999
3.806197
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2018-01-21T17:47: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": "c270f3494a9...
9ad71c07-95d4-4d47-afef-b26fe75de642
Madhur2002/LeetCode-Questions
0224-basic-calculator/0224-basic-calculator.cpp
class Solution { public: int calculate(string s) { int n = s.length(); int result = 0; int number = 0; int sign = 1; stack<int>st; for(int i=0;i<n;i++){ if(isdigit(s[i])){ number = number*10 + (s[i] - '0'); }else if(s[i] == '+')...
ALGO
0.999934
4.978825
{ "github_metadata": { "branch": "main", "commit_count": 435, "repo_created_at": "2022-11-11T03:30: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": "0b7d70492b...
b3c60409-8827-4d6a-87a2-9f45afd50e6f
EyciaZhou/acm
ama/锁屏/锁屏/main.cpp
// // main.cpp // 锁屏 // // Created by eycia on 14-9-16. // Copyright (c) 2014年 eycia. All rights reserved. // #include <stdio.h> #include <stdbool.h> long long tot; int ml = 9; bool v[10] = {false}; int cc[16][3] = { {1, 3, 2}, {1, 7, 4}, {1, 9, 5}, {2, 8, 5}, {3, 1, 2}, {3, 7, 5}, {3...
ALGO
0.999096
4.260216
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2015-05-04T23:55: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": "bc6ea5c1c...
80d34af2-2dd7-44d4-b4e1-307d8e7c0ae0
ishandutta2007/codeforces-v
vlad89/normal/86/C.cpp
#include <iostream> #include <cstdio> #include <sstream> #include <vector> #include <set> #include <map> #include <queue> #include <algorithm> #include <numeric> #include <functional> #include <string> #include <cstdlib> #include <cstring> #include <cmath> #include <list> using namespace std; #define FOR(i,a,b) for(i...
ALGO
0.999928
4.013307
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:31: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": "07814c4b5446...
e1b39941-0f69-44b3-99f6-fb179da6fb47
Noodle96/contestProgramming
uva/03_Problem_Solving_Paradigm/completeSearch/Mathematical_Simulation/382_Perfection.cpp
#include <bits/stdc++.h> #define all(x) x.begin(),x.end() #define msg(str,str2) cout << str << str2<< endl using namespace std; using ll = long long; using ld = long double; using uint = unsigned int; using ull = unsigned long long; template<typename T> using pair2 = pair<T, T>; using pii = pair<int, int>; using pli =...
ALGO
0.99786
4.443179
{ "github_metadata": { "branch": "main", "commit_count": 787, "repo_created_at": "2022-02-23T23:20:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d212a8c7cd...
99a3862b-369b-418a-bdf7-0495c6a090d5
truongcongthanh2000/TrainACM-ICPC-OLP
2019 ICPC North American Qualifier Contest/L.cpp
#pragma GCC diagnostic ignored "-Wunused-parameter" #include <bits/stdc++.h> using namespace std; #define INP "solve" #define OUT "solve" const long long INF_LL = 1e17; const int INF = 1e9 + 100; const int MOD = 1e9 + 7; const int Base = 30; const double EPS = 1e-9; const int dx[4] = {-1, 0, 1, 0}; const int dy[4] ...
ALGO
0.999856
4.558964
{ "github_metadata": { "branch": "master", "commit_count": 261, "repo_created_at": "2020-01-13T11:13:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 94, "forks": 22, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4d9c71...
351472fe-a1dd-487e-bba5-7efcfd14e32f
sjoh0704/Data-Structure
data-structure/Table2.h
//practice 16 // chained hash table #pragma once using namespace std; const int MAX_TABLE = 11; template<class tableKeyType, class tableDataType> class Table2 { public: Table2(); void insert(const tableKeyType& key, const tableDataType& data); bool lookup(const tableKeyType& key, tableDataType& data); void deleteK...
ALGO
0.98687
4.510977
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2021-03-28T12:23:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6114b85e9...
88a7c58d-e2ce-4d94-9b88-1e9a18e626f6
ubuntuh/github
contest/aizu/grl/grl-5-a-diameter-of-a-tree/textbook.cpp
// Accepted. #include <iostream> #include <queue> #include <vector> using namespace std; #define MAX 100000 #define INFTY (1 << 30) class Edge { public: int t; int w; Edge() {} Edge(int t, int w): t(t), w(w) {} }; vector<Edge> G[MAX]; int n; int d[MAX]; bool vis[MAX]; int cnt; void bfs(int s) { for (int i = 0;...
ALGO
0.999887
4.18206
{ "github_metadata": { "branch": "master", "commit_count": 265, "repo_created_at": "2015-11-17T15:24: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": "43a6225c...
82bb2ff6-713a-41a4-aa11-9e161fb31f3e
chandrikadeb7/Hacktoberfest_2021
Task 3/Longest Palindromic Substring/longest_palindromic_substr.cpp
// A C++ dynamic programming // solution for longest palindrome #include <bits/stdc++.h> using namespace std; // Function to print a substring // str[low..high] void printSubStr( string str, int low, int high) { for (int i = low; i <= high; ++i) cout << str[i]; } // This function p...
ALGO
0.999961
4.904165
{ "github_metadata": { "branch": "main", "commit_count": 615, "repo_created_at": "2020-10-02T10:00:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 112, "forks": 261, "issues": 11, "pull_requests": 36 }, "file_meta": { "content_id": "41a2...
ac3dc833-ddb8-4ce0-92c4-c861e64c0a9e
zsm2024/faser-.-tracking
calypso/Tracking/Acts/FaserActsKalmanFilter/src/SegmentFitClusterTrackFinderTool.h
#ifndef FASERACTSKALMANFILTER_SEGMENTFITCLUSTERTRACKFINDERTOOL_H #define FASERACTSKALMANFILTER_SEGMENTFITCLUSTERTRACKFINDERTOOL_H #include "AthenaBaseComps/AthAlgTool.h" #include "Gaudi/Property.h" #include "GaudiKernel/EventContext.h" #include "GaudiKernel/IInterface.h" #include "GaudiKernel/StatusCode.h" #include "S...
TOOL
0.93043
7.048001
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-30T05:18: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": "bc70c2430fed...
532d695d-ea79-416a-a511-9e95045d09d1
Saifu0/Competitive-Programming
CP/1500/approximating_constant_range.cpp
// ----- In the name of ALLAH, the Most Gracious, the Most Merciful ----- #include<bits/stdc++.h> using namespace std; #define NINJA ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define fo(i,n) for(int i=0;i<n;i++) #define Fo(i,k,n) for(int i=k;i<n;i++) #define for1(i,n) for(int i=1;i<=n;i++) #define dloop(i...
ALGO
0.999951
4.22883
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-09-08T08:09: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": "cbfc558abe...
894e1885-dc7d-435c-8483-cb5db9b9acfd
theabhaychaudharyy/DSA-PPT-ASSIGNMENT-3
Q1A-3.cpp
#include <iostream> #include <vector> #include <algorithm> #include <climits> int threeSumClosest(std::vector<int>& nums, int target) { std::sort(nums.begin(), nums.end()); int n = nums.size(); int closestSum = INT_MAX; for (int i = 0; i < n - 2; ++i) { int left = i + 1; int right = n ...
ALGO
0.999992
6.452308
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-06-24T07:42: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": "4c01b48f2bd5...
3e9ed986-63e9-463b-b7f2-65622118f7e2
ChaeHoonki/boj
kakao/15953.cpp
/* 입력 첫 번째 줄에 제이지가 상상력을 발휘하여 가정한 횟수 T(1 ≤ T ≤ 1,000)가 주어진다. 다음 T개 줄에는 한 줄에 하나씩 제이지가 해본 가정에 대한 정보가 주어진다. 각 줄에는 두 개의 음이 아닌 정수 a(0 ≤ a ≤ 100)와 b(0 ≤ b ≤ 64)가 공백 하나를 사이로 두고 주어진다. 출력 각 가정이 성립할 때 제이지가 받을 상금을 원 단위의 정수로 한 줄에 하나씩 출력한다. 입력이 들어오는 순서대로 출력해야 한다. */ #include <iostream> #include <vector> #include <math.h> using nam...
ALGO
0.994295
4.162902
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2019-07-22T06:34: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": "f85806bc7e...
99d1ba1e-d312-4af9-87b2-d25477479d74
mengtaog/simplecar
src/model/CarSolver.cpp
#include "CarSolver.h" #include <algorithm> using namespace Minisat; namespace car { CarSolver::CarSolver() {} CarSolver::~CarSolver() { ; } bool CarSolver::SolveWithAssumption() { lbool result = solveLimited(m_assumptions); if (result == l_True) { return true; } else if(result == l_False) { ...
ALGO
0.998524
5.306037
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-11-26T03:52: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": "22f0361bfd7...
65d53adc-f06e-4fc6-9882-cdb7cb77c1ff
Shikhar-S/Analysis-of-Competitive-Codebase
Data/Contest1244/all/28900664_62488624.cpp
/* Uruchamiamy samolot zwiadowczy ( + 500% do wzlamaniej ) /▄/ /█/ /◐/ /▐/ /▌/ /▀/ /░/ /🔥/ choose own style! ***IT'S OUR LONG WAY TO THE OIILLLL*** ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░████████░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░█████████░░░░░░░░░░...
ALGO
0.999975
3.781834
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2019-11-22T14:40: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": "6f97817d7...
36577ba1-8e10-45d0-886c-dacc6ae8b962
dxahtepb/ifmo-algo-is
Lab1/easy_sort.cpp
#include <fstream> #include <vector> using namespace std; void bubble_sort(vector<int> & a) { int n = a.size(); int temp; bool was_swap = false; do { was_swap = false; for (int i = 0; i < n-1; i++) { if (a[i] > a[i+1]) { temp = a[i]; a[i]...
ALGO
0.999944
4.713377
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2017-12-08T05:07:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67ac0ad00...
daf20b17-ae0b-40c4-94e4-49e76c2ea7ac
NgTienHungg/PTIT-Source
CodePTIT - DSA/DSA09034 - ĐẾM SỐ AO.cpp
// https://code.ptit.edu.vn/student/question/DSA09034 // ĐẾ<NAME> #include <bits/stdc++.h> using namespace std; int n, m, ao; vector<string> vuon; int r[8] = {-1, -1, -1, 0, 0, 1, 1, 1}; int c[8] = {-1, 0, 1, -1, 1, -1, 0, 1}; void Bfs(int i, int j) { for (int k = 1; k < 8; ++k) { int x = i + r[k]; ...
ALGO
0.999889
4.506172
{ "github_metadata": { "branch": "main", "commit_count": 106, "repo_created_at": "2021-07-04T02:14:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 130, "forks": 36, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6a05c71...
0605edfe-ac7d-459c-84f4-69156772d4b2
ashishdaulatabad/multidimensional_array
include/md_static/signal/convolve1d.hpp
#pragma once #ifndef __CONVOLVE_1D_HPP__ #define __CONVOLVE_1D_HPP__ #include "./md_signal.hpp" template <typename T, typename T1, typename T2> Array<T> Signal::convolve1d(const Array<T1>& input, const Array<T2>& other) { if (input.get_shape_size() != 1) { throw std::runtime_error( "Expected 1...
ALGO
0.997238
6.948701
{ "github_metadata": { "branch": "master", "commit_count": 157, "repo_created_at": "2022-12-29T09:58:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "02ca9c96...
309390fa-c0c0-4045-a663-45d9e9a77297
luofeng457/fmtconv-git
src/conc/LockFreeStack.hpp
/***************************************************************************** LockFreeStack.hpp Author: <NAME>, 2011 --- Legal stuff --- This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms o...
ALGO
0.905209
5.766782
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-11-08T15:30: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": "cbc4da42fe...
07e97083-895c-4387-a2c6-3fa7551ff462
princeofcrows/archiveCPcodes
archived/codeforces/cf808B.cpp
//////////////////////////////////////////////////////////////////////// //.....................................................................// ///////////__jasper_skywalker__fsociety()__BUET_mushroom__/////////////// //.....................................................................// /////////////////////////...
ALGO
0.999874
3.263327
{ "github_metadata": { "branch": "main", "commit_count": 35, "repo_created_at": "2022-05-16T02:52: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": "bcde6ac91a6...
4d8ae989-7dd7-455c-b1b0-3565f0caa05f
Czar-Ec/URI-Parser
URIParser/URIParser/URIParser.h
#pragma once #include <string> #include <iostream> #include <algorithm> #include <regex> /** * URIParser * class that takes in a string input and automatically parses * the input into components of a URI and also checks if the URI * is syntactically valid * * created by <NAME> (CzarEc) */ class URIParser { public: ...
TOOL
0.915795
5.120502
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-07-01T01:31: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": "d138a8026...
7adbcad8-4824-4c13-acbb-16e3fd414f81
XiAoRayL/3gStudyCommit
zsy_/双向队列.cpp
#include <stdio.h> #include <stdlib.h> #define MAX_SIZE 10 typedef struct { int data[MAX_SIZE];//数组实现的 int front; int rear; } Deque; void initDeque(Deque *dq) { dq->front = dq->rear = MAX_SIZE / 2;//初始化 } //判满判空条件 int isFull(Deque *dq) { return (dq->front == 0 && dq->rear == MAX_SIZE - 1) || (dq...
ALGO
0.999366
4.890953
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2023-03-27T08:16:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 5, "issues": 0, "pull_requests": 10 }, "file_meta": { "content_id": "f0a3a4987d...
8268bfbd-483e-4a5c-97fe-383bf48db6ab
imjnnanna/USACO-solutions
Gold/vacations.cpp
/* #include <iostream> using namespace std; int n; int days[105]; // days of rest int dp[105]; // dp[index] = days of rest int main() { cin >> n; for(int i = 1; i <= n; i++) { cin >> days[i]; } int previousActivity = 0; for(int i = 1; i <= n; i++) { // days[i] // have to rest ...
ALGO
0.999976
3.943454
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-04-21T05:03: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": "1d34269bccb6...
9f31d2ad-037f-4129-bafe-064e27575235
gilbert12tw/CP-Code-Archive
CSES/2086.cpp
#include<bits/stdc++.h> #define loli using namespace std; typedef long long ll; #define int ll #define pii pair<int, int> #define X first #define Y second #define F first #define S second #define SZ(a) ((int)a.size()) #define ALL(v) v.begin(), v.end() #define pb push_back #define eb emplace_back #define push emplace #d...
ALGO
0.999962
4.080206
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2024-08-16T07:45: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": "6229fc634...
f3051896-05e6-46e4-95c0-84c90ac3aeee
SayaUrobuchi/uvachan
UVa/10196_2.cpp
#include <iostream> using namespace std; const int NONE = 0; const int BLACK = 1; const int WHITE = 2; const int KING = 5; const string key = "pnbrqk"; const string king = "_kK"; const int dx[][8] = { {1, 1}, {1, 1, -1, -1, 2, 2, -2, -2}, {1, 1, -1, -1}, {0, 1, 0, -1}, {0, 1, 0, -1, 1, 1, -1, -1}, {0, 1, 0, -1,...
ALGO
0.999472
4.030447
{ "github_metadata": { "branch": "master", "commit_count": 105, "repo_created_at": "2017-06-12T06:49:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c1cc41b...
67b852a5-c44f-4e5e-8740-6e40f347c1af
decimalDev/CHM5
Task I.h
#include<iostream> #include <fstream> #include<vector> #include<stdio.h> #include<cmath> #include <iomanip> #include <stdlib.h> #include "Matrix algebra.h" #pragma once using namespace std; vector<double> NonDiagonal(int N, int l); int index(int i, int j, int N, int l); //по номеру элемента в исходной матрицы вычис...
ALGO
0.999723
3.083794
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-01-08T17:21: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": "9fdc1cb7c3...
66988a42-8711-4d4a-88c1-b772b021b0c6
vfolunin/archives-solutions
UVa Online Judge/486.cpp
#include <iostream> #include <algorithm> #include <vector> #include <set> #include <map> #include <string> using namespace std; vector<string> readWords() { string line; getline(cin, line); vector<string> words; string word; for (char c : line) { if (isalnum(c)) { word += c; ...
ALGO
0.998693
4.268209
{ "github_metadata": { "branch": "master", "commit_count": 2367, "repo_created_at": "2017-11-27T10:19:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 1, "pull_requests": 5 }, "file_meta": { "content_id": "e3920b3...
45220772-51e7-4203-bfe3-86e1c0abdf39
butleger/projects
cpp/base/Graph.cpp
#include "Graph.h" void My::Graph::deleteGraphAndNullingVertex() { deleteMatrix(graph, vertex); vertex = 0; } My::Graph::Graph() : vertex(NO_VERTEX), graph(nullptr) {} My::Graph::Graph(size_t vertex, int** graph) : vertex(vertex) { this->graph = initMatrix<int>(vertex, vertex); for (size_t i = 0; i < vertex;...
ALGO
0.99835
3.053033
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2020-09-04T07:35: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": "2a18e229d...
45ceeffd-ab77-44d5-b885-326aab720af8
Andwerpz/Competitive-Programming-Practice
- cpp -/deadlee.cpp
#include <bits/stdc++.h> typedef long long ll; typedef long double ld; typedef std::pair<int, int> pii; typedef std::pair<ll, ll> pll; // typedef __int128 lll; // typedef __float128 lld; using namespace std; //Codeforces - 1369E //first, observe that we can convert this into a graph problem. The ith friend represents...
ALGO
0.999995
4.160873
{ "github_metadata": { "branch": "main", "commit_count": 339, "repo_created_at": "2021-02-26T19:38: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": "77cd0e5d25...
0cd87e06-3eef-4601-8288-97220b24a2f5
Aqendo/olproga
vuzak/G.cpp
#include <bits/stdc++.h> using namespace std; #define int int64_t vector<vector<int>> grid; vector<vector<int>> pref; /* t ________ | | s| | | */ // Standard prefix-sum query: returns the sum of the submatrix with top-left (lefti, leftj) // and dimensions s x t. int get(int lefti, int leftj, int s, int t) {...
ALGO
0.999835
5.433082
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2024-09-05T16:33: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": "ce6947c3efc...
9849789b-d4b4-4f8b-8218-778ad6422626
kyad/atcoder
abc324/c/a.cc
#include <algorithm> #include <cassert> #include <iostream> #include <vector> using namespace std; #pragma GCC target("avx2") #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") bool check1(const string& S, const string& T) { int M = S.size(); int L = T.size(); if (M != L) { return false; } ...
ALGO
0.999961
4.229612
{ "github_metadata": { "branch": "master", "commit_count": 889, "repo_created_at": "2021-08-26T14:42: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": "7719d141...
74f362d6-ccfc-4277-8b91-4cf06465f5a8
kylerichey/exampleCodeCS360
threads/threads/sample2.cpp
#include <stdio.h> #include <stdlib.h> #include <pthread.h> #include <unistd.h> #include <semaphore.h> void *functionC(void *ptr); int counter = 0; sem_t sem; main() { int rc1, rc2; pthread_t thread1, thread2; sem_init(&sem, PTHREAD_PROCESS_PRIVATE, 1); // Now it is set to one, one person will be able t...
ALGO
0.989225
5.026773
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-03-04T23:11:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7318f476ea...
ce3604d2-d775-40c2-aae8-924d483b2672
mangobrain/aoc-2021
src/day07-2.cxx
#include <fstream> #include <iostream> #include <sstream> #include <string> #include <cmath> #include <limits> #include <list> #include <vector> int main(int argc, char const * const argv[]) { if (argc != 2) { std::cerr << "Usage: " << argv[0] << " <filename>\n"; return 1; } std::ifst...
ALGO
0.968634
4.95694
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2021-12-19T17:23: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": "3cd677470...
5fe66381-e369-4447-bf20-465344e71b47
CorbanSmith14/CISS240
f01/f01.cpp
#include <iostream> #include <ctime> #include <cmath> #include <cstdlib> const int MAX_SIZE = 100; void init(char world[100][100], int size); void put_gold(char world[MAX_SIZE][MAX_SIZE], int size, int n); void draw(char world[MAX_SIZE][MAX_SIZE], int size); void move(int size, int &row, int &col); void init(char w...
ALGO
0.990618
3.945592
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-09-29T18:56: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": "c9915b53dee6...
eba9b280-646d-496a-8e36-2e6553d64603
spa5k/Leetcode-Practice
Leetcode/2335.minimum-amount-of-time-to-fill-cups.cpp
/* * @lc app=leetcode id=2335 lang=cpp * * [2335] Minimum Amount of Time to Fill Cups * * https://leetcode.com/problems/minimum-amount-of-time-to-fill-cups/description/ * * algorithms * Easy (55.07%) * Likes: 321 * Dislikes: 50 * Total Accepted: 26.5K * Total Submissions: 48.1K * Testcase Example: '...
ALGO
0.999771
6.199299
{ "github_metadata": { "branch": "main", "commit_count": 149, "repo_created_at": "2021-05-10T17:55:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1c78be09d1...
3b892007-72ef-461e-94a2-e82fbf64ddaf
Edgarrrrrr/T2-RELION
src/jaz/optics/astigmatism_fit.cpp
#include "astigmatism_fit.h" AstigmatismFit::AstigmatismFit( const std::vector<BufferedImage<float>>& spectra, int num_threads, int k0, int k1, double Cs_px ) : spectra(spectra), num_threads(num_threads), k0(k0), k1(k1), Cs_px(Cs_px) { std::cout << spectra.size() << " frames." << std::endl; } vo...
ALGO
0.97703
6.063418
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-04-28T08:03:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c95df42ddc3f...
a860d6b2-c95a-40b7-b336-1b21cad04854
dager-mohamed/linked-list
linked_list.cpp
#include <iostream> using namespace std; struct node{ int data; node* next; }; node *head = NULL; void InsertNode(int value); void displayNode(); void deleteNode(int value); void InsertBeg(int value); void DeleteBeg(); void DeleteLast(); int main(){ // IT IS A TEST CODE ONLY --> InsertNode(10); In...
ALGO
0.999161
4.870889
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-09-15T04:08:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "308d69d435e0...
147434d7-e415-43cb-b142-3e31e74d205c
Vaishnavi0903/DSA-in-CPP
stringCompression.cpp
#include <vector> #include <string> class Solution { public: int compress(std::vector<char>& chars) { int i = 0; int ansIndex = 0; int n = chars.size(); while (i < n) { // Initialize j to the next index int j = i + 1; // Find the consecutive rep...
ALGO
0.999992
6.462004
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-11-15T04:26: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": "250400448631...
fe05cb4d-9a1c-4353-8317-ee19f38154d0
anducnguyen/anD_ws
src/controller_calc/src/controller_calc.cpp
#include "math.h" #include "ros/ros.h" #include "geometry_msgs/Vector3.h" #include "geometry_msgs/Quaternion.h" #include "tf/transform_datatypes.h" //#include <tf/Matrix3x3> #include "sensor_msgs/Imu.h" //#include "wiringPi.h" #include "iostream" #include <string> #include <std_msgs/Float32MultiArray.h> #include <cust...
ALGO
0.916457
3.717935
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2020-10-07T08:26:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "67cc97ca340f...
cf8643a6-9876-44fc-84ec-56643a2a8410
ACEAlex/AoC
2024/1x/14b/main.cpp
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstdint> #include <cstdio> #include <fstream> #include <iomanip> #include <iostream> #include <istream> #include <limits> #include <list> #include <map> #include <memory> #include <numeric> #include <queue> #include <set> #include <sst...
ALGO
0.99978
4.804287
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-01-05T10:37: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": "315a91e7f050...
3928d862-bdd2-4499-b5e3-e281c90c8579
ishandutta2007/codeforces-o
okwedook/normal/1394/C.cpp
#pragma GCC optimize("O3", "unroll-loops") #pragma GCC target("sse4.2") #include <iostream> #include <iomanip> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <bitset> #include <sstream> #include <deque> ...
ALGO
0.999979
3.993672
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:45: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": "05a4b9ac7ef4...
c3a57b20-8ec5-46b2-bab5-fcd2161a3be6
kartikbathla/OS-assgnment-2-C-
src/scheduling.cpp
#include <string.h> #include <fstream> #include <iostream> #include <queue> #include <list> #include <stdio.h> #include "scheduling.h" using namespace std; pqueue_arrival read_workload(string filename) { pqueue_arrival workload; ifstream procs; procs.open(filename); int a, b; if(procs.is_open()) {while(pr...
ALGO
0.989927
4.316844
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-04-11T05:29: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": "25e203395b...
7e86f463-b00d-4c81-87f4-bdc860d51cd7
megumin9/Lapsac
real-project/blender/test-function/classification_results/compilable/test_3.cpp
#include <bits/stdc++.h> using namespace std; struct Intersection { int t; }; void NewTest(); void ConsistencyChecker(); void TransiveChecker(); void SymmetryChecker(); void ReflexivityChecker(); int intersections_compare(const void *a, const void *b) { const Intersection *isect_a = (const Intersection *)a; ...
ALGO
0.961249
3.712065
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2025-05-19T05:35: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": "54cd6ef796...
382c3c54-1cae-4e52-8838-46f0ff1e5d37
QbitQuantum/Basics
Исходники/sw-vector.cpp
/* * Calculate the Smith-Waterman score. * * This is basically an SSE2 version of Wozniak's vectored implementation, but * without a score table. Further, we assume a fixed database and query size, * so *nogap and *b_gap must be pre-allocated (the malloc overhead for very * small scans is _huge_). * * NOTE THE ...
ALGO
0.999922
6.847004
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2024-03-06T07:05:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bd28d2caaf1...
6246329c-3cb2-4d74-9033-6f3050b54392
BijoySing/Problem-Solving
DSA/doubly_Linked/Queries.cpp
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define yes cout << "YES\n" #define no cout << "NO\n" #define pp(x) cout << x << endl // #define int long long #define Int int #define ck(x) cout << #x << " = " << x << endl; // class Node // { // public: // int val; // Node *next; // N...
ALGO
0.999715
3.576361
{ "github_metadata": { "branch": "main", "commit_count": 152, "repo_created_at": "2023-02-11T19:12:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "44e7f98478...
bbcb9d19-0d56-46f0-9200-61665bf82d80
scortier/Complete-DSA-Collection
Stack&Queue/Implement a method to insert an element at its bottom without using any other data structure.cpp
/* <<<<<<<<<<<---APPROACH-->>>>>>>>>>>>>> 1.RECURSION 2.ANOTHER STACK : The idea is to push every element into another temporary stack and then print elements of the temporary stack. */ #include <bits/stdc++.h> using namespace std; // Recursive function to print stack elements // from bottom to top without changing //...
ALGO
0.999912
5.438019
{ "github_metadata": { "branch": "main", "commit_count": 66, "repo_created_at": "2020-10-28T09:17:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09f890f5c98...
5237404b-caff-4358-bd56-437c9ccbc471
cctbx/cctbx_project
cctbx/geometry_restraints/dihedral.h
#ifndef CCTBX_GEOMETRY_RESTRAINTS_DIHEDRAL_H #define CCTBX_GEOMETRY_RESTRAINTS_DIHEDRAL_H #include <cctbx/sgtbx/rt_mx.h> #include <cctbx/geometry_restraints/utils.h> #include <cctbx/restraints.h> #include <scitbx/math/dihedral.h> #include <boost/format.hpp> namespace cctbx { namespace geometry_restraints { typedef...
TOOL
0.961232
5.965993
{ "github_metadata": { "branch": "master", "commit_count": 38660, "repo_created_at": "2015-07-22T13:36:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 256, "forks": 121, "issues": 120, "pull_requests": 31 }, "file_meta": { "content_id": "...
d3a36754-e7b7-44dc-bbef-04844b2daa84
ssj-gz/Competitive-Programming
adventofcode/2019/day18/day18_part2_solution.cpp
#include <iostream> #include <vector> #include <map> #include <set> #include <array> #include <cstdint> #include <cassert> using namespace std; struct Coord { int x = -1; int y = -1; auto operator<=>(const Coord& other) const = default; }; class KeySet { public: KeySet& addKey(char keyChar) ...
ALGO
0.999475
5.109483
{ "github_metadata": { "branch": "main", "commit_count": 6590, "repo_created_at": "2022-04-27T12:08: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": "ae863ed4a...
b9e345d8-792e-49c2-8c24-5c94caa06cf6
ryan10projects/Leetcode-2023-Daily
April-2023/C++/SimilarStringGroups.cxx
// 839. Similar String Groups // 3 steps // First make the adjency nodes map within the numSimilarGroups function, only if isSimilar is true // Second implement isSimilar function at most only two or zero letters in both the string should be different to be considered similar // Traditional dfs traversal marking all v...
ALGO
0.999979
6.280432
{ "github_metadata": { "branch": "main", "commit_count": 476, "repo_created_at": "2022-12-30T09:04:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75fefd7e27...
69328968-ace2-49e8-ae05-2583efd91b17
Chinmay1812/Algorithms
8-queen_cses.cpp
#include<bits/stdc++.h> #define pb push_back #define endl ("\n") #define mp make_pair #define lb lower_bound #define ff first #define inf 1e18 #define ss second #define cn continue #define br break #define ins insert #define int long long #define bit(x) __builtin_popcount(x) #define all(x) x.begin(),x.end() #define up ...
ALGO
0.999579
4.143926
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2021-07-23T11:45:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c1e7ecbf443a...
90d86c5e-0040-459a-97c9-e3137a5b8041
pfragkiad/CppSdlTestApp
ThreadTests/Tzoker.h
#pragma once #include <random> #include <vector> #include <algorithm> std::random_device entropySource; std::mt19937_64 generator(entropySource()); std::uniform_int_distribution<int> distMain(1, 45), distTzoker(1, 20); struct Tzoker { int tzoker; std::vector<int> main; friend std::ostream& operator <<(std::ostre...
ALGO
0.993022
4.672656
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2022-07-26T18:33:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1fea7e8dd...
1ee1ffa1-1ac3-4246-8172-90068447b208
oikkoikk/ALOHA
important_problems/11780_Floyd2.cpp
//분할정복으로 경로 추적!! #include <iostream> #include <climits> #include <vector> #include <algorithm> #include <string.h> using namespace std; const int INF = INT_MAX; const int MAX_NUMBER = 101; long long Node[MAX_NUMBER][MAX_NUMBER]; //노드 연결 확인 + 최단거리 저장 int via[MAX_NUMBER][MAX_NUMBER]; //경유지 저장 int N, M, a, b, c; ...
ALGO
0.999972
3.766249
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2020-04-08T06:42:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7a7a2b949...
6fd7d890-1a40-4151-9fd9-3ec623708d63
MiguelABatista/icpc-training
codeforces/2070/b.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p64; typedef vector<ll> v64; #define forn(i, s, e) for(ll i = (s); i < (e); i++) #define ln "\n" #if defined(DEBUG) || defined(debug) #define _ ios_base::sync_with_stdio(false), cin.tie(NULL) #define debug(x) cout << __...
ALGO
0.999893
3.685099
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-03-10T22:08: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": "b80f0b5f84bd...
f3bb6621-d742-4883-8ac1-47a1bbba6b72
gap-prog/Competitive-Programming
solutions/codechef/practice/remove_one_element.cpp
// CodeChef Problem Link: https://www.codechef.com/problems/REMONE #include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; vector<int> a(n + 1); vector<int> b(n); for (int i = 0; i < n; ++i) { cin >> a[i]; } for (int i = 0; i < (n - 1); ++i) { cin >> b...
ALGO
0.999974
4.336044
{ "github_metadata": { "branch": "main", "commit_count": 889, "repo_created_at": "2022-11-25T20:15:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7be49e279...
578bdb95-fe5b-4ac3-9738-c2cbb7077d3f
Nyarmith/cpp_club
Chapter_10/Exercises/median.hpp
#ifndef __MEDIAN_HPP__ #define __MEDIAN_HPP__ #include <algorithm> #include <cstddef> #include <iostream> #include <stdexcept> #include <vector> // 10-2 // Rewrite the median function to be callable with a vector or // built-in array. template<class T> T _detail_median(std::vector<T> & v) { typedef typename std::...
ALGO
0.999789
6.656584
{ "github_metadata": { "branch": "master", "commit_count": 36, "repo_created_at": "2017-09-04T08:13:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "cce026695...
852e09d4-5ac7-4e8a-92a0-2f826aaffbff
Trishna2005Das/Lift-Off-Cpp
Assignment - week 2/Q10-stringcharacters.cpp
//Write a C++ program to find the total number of alphabets , digits and special characters in a string. #include <iostream> using namespace std; int main() { string str; int alphabets = 0, digits = 0, special = 0; cout << "Enter a string: "; getline(cin, str); for (int i = 0; i < str.length()...
TOOL
0.98964
4.254312
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-21T10:51: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": "23f137259dff...
adcaff56-db00-413e-8657-da6e45ca6540
GilgameshxZero/altair
codeforces/1864/d.cpp
#if defined(__GNUC__) && !defined(__clang__) #pragma GCC target("avx", "avx2", "fma", "bmi", "bmi2", "popcnt", "lzcnt") #pragma GCC optimize("Ofast", "unroll-loops") #endif #include <bits/stdc++.h> using LL = long long; using LD = long double; using namespace std; #define RF(x, from, to) \ for (LL x(from), _to(to),...
ALGO
0.999976
5.035461
{ "github_metadata": { "branch": "master", "commit_count": 485, "repo_created_at": "2021-08-08T21:45:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "63e8f029...
277e28be-f435-41fd-be62-29bb178cdc64
aakanshaV04/DSA
PolynomialMultiplication.cpp
#include <stdio.h> #include <stdlib.h> struct Node { int coeff; int exp; struct Node* next; }; struct Node* createTerm(int coeff, int exp) { struct Node* term = (struct Node*)malloc(sizeof(struct Node)); term->coeff = coeff; term->exp = exp; term->next = NULL; return term; } struct No...
ALGO
0.999869
4.535395
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-11-06T08:44: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": "0f99889ed100...
9201207a-a1b4-4a20-a230-200228f0cbe9
bfay1/codeforces
contests/834/thermostat.cpp
#include <bits/stdc++.h> using namespace std; #define int long long void solve() { int l, r, x, a, b; cin >> l >> r >> x >> a >> b; if (a == b) { cout << 0 << "\n"; return; } if (b < l || b > r || (abs(a - l) < x && abs(a - r) < x) || (abs(b - l) < x && abs(b - r) < x)) { cout << -1 << "\n"; return; } i...
ALGO
0.999007
4.208903
{ "github_metadata": { "branch": "master", "commit_count": 110, "repo_created_at": "2022-10-13T13:10: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": "eabd23b9...
09b3d460-fe16-48a0-bb5d-c0e8833dd846
HotBunny/leetcode_program
leetcode/reverseInteger.cpp
#include <iostream> #include <climits> using namespace std; // Function to reverse the digits of a signed 32-bit integer // Returns 0 if the reversed integer is outside the range of a signed 32-bit integer int reverse(int x){ int rev = 0; while (x != 0){ int pop = x % 10; x /= 10; ...
ALGO
0.999186
5.799392
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-09-21T16:11: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": "efb9a4b68686...
ee3244b6-01a3-4025-89b5-a796eed61147
Alok-Khansali/Lets-LeetCode
Medium/Lowest_Common_Ancestor_of_a_Binary_Tree.cpp
class Solution { public: TreeNode *Ancestor = NULL; int dfs(TreeNode *r, TreeNode *p, TreeNode *q) { if (r == NULL) return 0; // For every node get a score // 0 meAncestor no node has been found so far, i.e. not ancestors for sure // 1 meAncestor one node found so...
ALGO
0.999973
6.049713
{ "github_metadata": { "branch": "main", "commit_count": 300, "repo_created_at": "2021-07-07T17:36: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": "528ace5efd...
68b0052a-cf30-4e35-a229-d2b3ac0becf6
mikehung/competitive-programming
codeforces/275/A/sol.cc
#include <bits/stdc++.h> using namespace std; #ifdef DEBUG #define dbg(...) fprintf(stderr, __VA_ARGS__) #else #define dbg(...) #endif const int N = 10, n = 3; int a[N][N], b[N][N]; int main() { ios::sync_with_stdio(false); cin.tie(0); int x; for (int r = 1; r <= n; ++r) { for (int c ...
ALGO
0.999978
3.467648
{ "github_metadata": { "branch": "master", "commit_count": 182, "repo_created_at": "2018-10-18T09:10:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b188ae1e...
57fc23a3-67e3-4493-a55b-2e1df15066d7
frdmu/Coding
Tree/124_Binary_Tree_Maximum_Path_Sum.cc
// https://leetcode-cn.com/leetbook/read/bytedance-c01/ohlfp5/ /** * 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) {} * ...
ALGO
0.999975
5.545556
{ "github_metadata": { "branch": "master", "commit_count": 331, "repo_created_at": "2021-03-08T02:54:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 104, "pull_requests": 0 }, "file_meta": { "content_id": "a1a776...