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
23fd7d0b-8e30-470d-92a3-0f4c52a619f6
qunsorber/RoadToGeek
0730.cpp
// 49:丑数 // 题目:我们把只包含因子2、3和5的数称作丑数(Ugly Number)。求按从小到 // 大的顺序的第1500个丑数。例如6、8都是丑数,但14不是,因为它包含因子7。 // 习惯上我们把1当做第一个丑数。 // #include <iostream> int GetKthUglyNum(int k){ } bool IsUglyNum(int num){ while(num % 2 == 0){ num = num / 2; } while(num % 3 == 0){ num = num / 3; } while(num %...
ALGO
0.99902
4.742168
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2022-08-03T12:17: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": "97f593416048...
df1643a3-3024-4929-bd9e-5764a3916783
Jack1eNgBaro/JustCp
CodeForces/C++20 (GCC 11-64)/535A | Tavas and Nafas/211258725.cpp
#include<bits/stdc++.h> #define MOD 1000000007 #define fi first #define se second #define ll long long #define ii pair<int,int> #define Dennis "" #define heap_max(a) priority_queue<a> #define heap_min(a) priority_queue<a, vector<a>, greater <a>> #define all(x) (x).begin(), (x).end() #define pb push_back #define eb empl...
ALGO
0.999029
4.141672
{ "github_metadata": { "branch": "main", "commit_count": 896, "repo_created_at": "2024-06-16T11:06:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "89e025f658...
12bff55d-5b65-4771-83d5-b94030a3a8af
gabriel88766/C-CPP-AlgorithmsAndContests
CSES/SortingandSearching/SlidingCost.cpp
#include <bits/stdc++.h> //#include <ext/pb_ds/assoc_container.hpp> //required //#include <ext/pb_ds/tree_policy.hpp> //required typedef long long int ll; const ll INF_LL = 0x3f3f3f3f3f3f3f3f, MOD = 1e9+7; const int INF_INT = 0x3f3f3f3f; using namespace std; //using namespace __gnu_pbds; //required //template <typen...
ALGO
0.999969
3.78197
{ "github_metadata": { "branch": "master", "commit_count": 436, "repo_created_at": "2020-08-21T00:21:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50af75e8...
d83ecda5-4a5d-4889-8bee-6b8970557201
lballabio/QuantLib
ql/pricingengines/barrier/analytictwoassetbarrierengine.hpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2012 Master IMAFA - Polytech'Nice Sophia - Université de Nice Sophia Antipolis This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org...
ALGO
0.911323
6.870671
{ "github_metadata": { "branch": "master", "commit_count": 17543, "repo_created_at": "2015-12-17T16:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6151, "forks": 1964, "issues": 51, "pull_requests": 11 }, "file_meta": { "content_id":...
3ce51d64-06a8-4a21-b7eb-48f1d6f66db1
subratamondalnsec/Pw-cpp-code
24Backtracking/class/04Rat_in_a_maze.cpp
/* problem link : By <NAME> */ #include <bits/stdc++.h> using namespace std; int ways = 0; bool isValid(int i, int j, int n, vector<vector<int> > &grid) { return (i >= 0 and j >= 0 and i < n and j < n and grid[i][j] == 0); } void maze(int i, int j, int n, vector<vector<int> > &grid) { if(i == n-1 and j == n-...
ALGO
0.999911
4.986132
{ "github_metadata": { "branch": "main", "commit_count": 272, "repo_created_at": "2024-09-22T18:08:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1ba95dce6...
6eab96da-70cd-47fb-998b-064296ca4842
AlexHarn/bfrv1_icetray
CoincSuite/private/CoincSuite/lib/PartialCOG.cxx
/** * \file PartialCOG.cxx * * (c) 2012 the IceCube Collaboration * * $Id$ * \version $Revision$ * \date $Date$ * \author mzoll <<EMAIL>> */ #include <CoincSuite/lib/PartialCOG.h> #include "dataclasses/I3Double.h" #include "icetray/I3Bool.h" using namespace HitSorting; using namespace OMKeyHash; std::vect...
ALGO
0.99224
6.245268
{ "github_metadata": { "branch": "master", "commit_count": 3832, "repo_created_at": "2020-06-29T14: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": "8b96fab...
f2e1639a-e09f-4b98-90e7-1a730d5eb094
coder626/MoneyMatters2
main.cpp
#include <iostream> #include <unordered_map> #include <iterator> #include <cstring> #include <fstream> #include <string> #include <sstream> #include <vector> #include <cassert> using namespace std; int balanceList[10000]; bool visitedArray[10000]; vector<vector<int>> adjList(10000); int depthFirstSearch(int no...
ALGO
0.999958
4.412947
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-05-10T09:33: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": "3950e6a6bc09...
643b35c1-670d-4eea-9204-cede47072ca2
4miRRez4/UI_Learning_Journey
1.Basic_Programming/0.Assignments_and_Practices/must see another way(array_reverse(pointers).cpp
#include <iostream> using namespace std; void swap3(int* a, int* b) { if (a == b) return; *a = *a ^ *b; *b = *a ^ *b; *a = *a ^ *b; } int main() { int n; cin >> n; int nums[n]; for(int i=0; i<n; i++) cin >> nums[i]; for(int j=0; j<(n/2); j++) { //swaping elem...
ALGO
0.99999
4.470113
{ "github_metadata": { "branch": "main", "commit_count": 458, "repo_created_at": "2024-02-22T10:30:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "708dfe92b3...
0df7c948-3440-48fc-abcd-3272484c3125
Andrew-J-Li/UTPC-practice
Contests/educational_179_problem_a.cpp
#include <bits/stdc++.h> #define endl "\n" #define ll long long using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll t; cin >> t; while (t--) { ll x; cin >> x; ll a = 0, b = 0, c = 0; ll rslt = 0; while (a < x || b < x || c < x) { ...
ALGO
0.999932
4.009968
{ "github_metadata": { "branch": "main", "commit_count": 208, "repo_created_at": "2024-09-15T14:42:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "130e541a92...
a8db39e9-1bc9-44a9-9490-368edb9d8e83
wangli-cn/online-judge-libs
geometry/polygon/ConvexPolygonContain.cpp
enum { OUT, ON, IN }; int convex_contains(const polygon &P, const point &p) { const int n = P.size(); point g = (P[0] + P[n/3] + P[2*n/3]) / 3.0; // inner-point int a = 0, b = n; while (a+1 < b) { // invariant: c is in fan g-P[a]-P[b] int c = (a + b) / 2; if (cross(P[a]-g, P[c]-g) > 0) { // angle < 180 ...
ALGO
0.999516
5.428034
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2015-05-06T14:36: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": "fe12fc86...
a95fec92-e3c6-4d40-abd2-0bd1a6baa663
Satyam50Singh/C-Cpp-Programs
Cpp Programs Practise/#78 Casing Conversion.cpp
#include <iostream> using namespace std; int main() { char str[30]; cout << "Enter a string : "; cin.getline(str,30); cout << "\nString is : " << str; cout << "\nString in Upper Case :"; for(int i=0; i<str[i]!='\0'; i++){ if(str[i]>='a' && str[i]<='z'){ cout << char(str[i]-32); }else { cout << str[i];...
TOOL
0.934834
3.844825
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-01-08T18:11:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c5c3d2a5a...
3527b8f2-e5f0-4e70-abc9-db8b59641200
ishandutta2007/codeforces-t
tob123/normal/1515/A.cpp
#include <bits/stdc++.h> using namespace std; #define sz(x) ((int) (x).size()) typedef long long ll; typedef pair<int,int> pii; template<class T> void print(T & x){ cout << x; } template<class T,class U> void print(pair<T,U> & p){cout << "("; print(p.first); cout << ", "; print(p.second); cout << ")"; } template<class ...
ALGO
0.999759
3.388349
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "144393ed66e8...
cdc6b448-8c08-452f-938f-4957033e0c20
hrithik86/algorithm
linkedList11.cpp
/*Cycle detection and finding first node of the loop(Floyd's Cycle) */ #include <bits/stdc++.h> using namespace std; struct node{ int data; node* link; }; void print(node*A){ cout<<"Linked list is: "; while(A!=NULL){ cout<<A->data<<" "; A=A->link; } cout<<endl; } void insert(i...
ALGO
0.999964
4.108812
{ "github_metadata": { "branch": "master", "commit_count": 247, "repo_created_at": "2019-03-02T07:33:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5038554b...
39bebf03-d299-45d7-884c-3a3f04fc894b
Yousefalaarabea/words-calculator
main.cpp
/// FCAI – OOP – 2022 - Assignment 3 /// Program Name: Text words calculator.cpp /// Author and ID: <NAME> 20210476 #include <bits/stdc++.h> using namespace std; // Function to print frequency of each word void printFrequency(string str) { map<string, int> M; cout<<"hi"<<endl; /// String for storing the words ...
ALGO
0.99959
5.051891
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-12-15T11:26: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": "44c7f9e3163c...
7233e143-a712-4463-a7ad-b814ab44c6a5
djm93dev/cpp
leet_code/cpp/spiral_matrix.cpp
#include <iostream> #include <vector> class Solution { public: vector<int> spiralOrder(vector<vector<int>>& matrix) { vector<int> ans; // Create a vector to store the answer int left = 0, right = matrix[0].size() - 1; // Set the left and right pointers int top = 0, bottom = matrix.size() - ...
ALGO
0.999998
6.655569
{ "github_metadata": { "branch": "main", "commit_count": 428, "repo_created_at": "2023-02-03T16:13: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": "3ed6441808...
fdb234a8-c389-486b-b9c4-32a0ae8f6ebe
toufu-24/AtCoder
ABC/abc410/e/main copy.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; #define all(v) v.begin(), v.end() #define SORT(v) sort(v.begin(), v.end()) #define RSORT(v) sort(v.rbegin(), v.rend()) #define REVERSE(v) reverse(v.begin(), v.end()) #define ll long #define ld long double #define int ll boo...
ALGO
0.999828
3.776474
{ "github_metadata": { "branch": "main", "commit_count": 303, "repo_created_at": "2023-04-15T10:40: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": "2a7bf53f1e...
5753532b-2d78-478f-8da2-613e8954ba08
ghdic/CodingProblemSolving
BaekjoonProblemSolving/BaekjoonProblemSolving/1874.cpp
/* https://www.acmicpc.net/problem/1874 &Title 1874번 - 스택 수열 &Question 스택 (stack)은 기본적인 자료구조 중 하나로, 컴퓨터 프로그램을 작성할 때 자주 이용되는 개념이다. 스택은 자료를 넣는 (push) 입구와 자료를 뽑는 (pop) 입구가 같아 제일 나중에 들어간 자료가 제일 먼저 나오는 (LIFO, Last in First out) 특성을 가지고 있다.1부터 n까지의 수를 스택에 넣었다가 뽑아 늘어놓음으로써, 하나의 수열을 만들 수 있다. 이때, 스택에 push하는 순서는 반드시 오름차순을...
ALGO
0.999981
4.746116
{ "github_metadata": { "branch": "master", "commit_count": 423, "repo_created_at": "2018-01-01T19:38:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f3720691...
7cc49d84-6d73-4ce1-8e96-c8ffadd3f01a
raincross7/code-similarity
codes/train_code/problem314/problem314_238.cpp
#include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <vector> #include <string> #include <algorithm> #include <queue> #include <stack> #include <map> #include <set> #include <unordered_set> #include <unordered_map> #include <bitset> #include <limits> #include <random> #include <complex>...
ALGO
0.99976
3.526263
{ "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": "e3499efb7b2b...
02c0f346-3cb2-42f1-bbdd-2846ddfed24d
JhiWhoonKang/coding_test
LIGNex1_C_T_Study/2800.cpp
#include <iostream> #include <string> #include <vector> #include <stack> #include <set> #include <algorithm> using namespace std; // 쌍이 되는 괄호만 제거 가능 string math; vector<pair<int, int>> _pair; // 괄호 짝 stack<int> stk; // 괄호 관련 스택 vector<string> result; ...
ALGO
0.999941
4.61284
{ "github_metadata": { "branch": "main", "commit_count": 55, "repo_created_at": "2024-07-02T18:06: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": "36055958325...
7f8a7618-9264-4cfc-ae74-f6624fc2dd48
knagakura/procon
codeforces/1359/a.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, N) for(int i=0;i<int(N);++i) #define rep1(i, N) for(int i=1;i<int(N);++i) #define all(a) (a).begin(),(a).end() #define print(v) { cerr<<#v<<": [ "; for(auto _ : v) cerr<<_<<", "; cerr<<"]"<<endl; } #define printpair(v) { cerr<<#v<<": [ "; for(auto _ : v) cer...
ALGO
0.999938
3.734718
{ "github_metadata": { "branch": "master", "commit_count": 328, "repo_created_at": "2018-12-14T09:52: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": "43810907...
aadb1f65-9e2e-458b-9ba0-a88656f97ea7
Soul-8789/Cp-NoobToExpert
C_Andryusha_and_Socks.cpp
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef unsigned long long int ull; typedef long double ld; typedef pair<int, int> pii; typedef pair<ll,ll> pll; typedef vector<int> vi; typedef vector<ll> ...
ALGO
0.999782
3.799937
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-10-02T04:52:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4e6d64f75040...
964a6664-2c70-49b5-825c-dd784cb92421
Mason-Wmx/ViewFramework
3p/VTK/ThirdParty/vtkm/vtk-m/vtkm/rendering/raytracing/QuadIntersector.cxx
//============================================================================ // Copyright (c) Kitware, Inc. // All rights reserved. // See LICENSE.txt for details. // This software is distributed WITHOUT ANY WARRANTY; without even // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR // PURPOSE...
ALGO
0.999675
5.77121
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2021-06-06T04:31:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "50c319d6ef0e...
7c23ea60-f5a3-42bf-961e-682e9c2bcf3d
Blue16-WangFudi/study_record
my_coding/algorithm/backtracking/permutations_i.cpp
/** * File: permutations_i.cpp * Created Time: 2023-04-24 * Author: Krahets (<EMAIL>) */ #include "../utils/common.hpp" vector<vector<int>> result; // 存储所有结果 void backtracking(vector<int> &choice, vector<bool> &selected, vector<int> path) { if (path.size() == choice.size()) // 所有选择遍历完了,可以返回和添加res了 { ...
ALGO
0.999758
5.389437
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2023-10-31T14:47: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": "ae08a29493d...
577b1ba5-ca63-4f4d-b22a-0ba824fa2b09
ishandutta2007/codeforces-k
kiyoshi0205/normal/1468/A.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define all(x) (x).begin(), (x).end() #define rep(i,n) for(int i=0; i<(n); i++) template<typename monoid> struct Segtree{ using F = function<monoid(monoid,monoid)>; int sz; vector<monoid> seg; const F f; const monoid M; Segtre...
ALGO
0.999881
4.282743
{ "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": "526c44a0f83d...
fa082797-a837-4f4b-887c-db714343b6b1
inommuidinov/ITMO-University
discrete math labs/first term/lab3/11.cpp
#include<bits/stdc++.h> using namespace std; const int N = 15; int n; int a[N]; vector<vector<string> > ans; string convert(int x) { string res = ""; if (x == 10) x = 99; while (x != 0) { res = char(x % 10 + 48) + res; x /= 10; } return res; } int main() { freopen("subsets.i...
ALGO
0.999963
4.485963
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-02-27T20:50: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": "d17b17df1...
93104a59-1773-42a6-a290-e558b4199d51
vadimsteshkin/MAI
first year/Computer technologies/Laboratory works/3rd Laboratory work dynamic matrix/main.cpp
#include <iostream> #include <fstream> const int N_MAX = 15; // Максимальный размер матрицы const char* FNAMEA = "test.txt"; // Матрица A const char* FNAMEB = "testb.txt"; // Матрица B // Чтение матрицы из файла int InputData(const char* FNAME, double**& Matr, int& rows, int& columns) { setlocale(LC_ALL, "Russia"...
ALGO
0.999522
4.492639
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2022-11-14T22:00: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": "eb13296cd...
6e3df06c-b30f-4e4d-8b31-ea1f6b638cc7
min99819/boj
백준/Silver/2529. 부등호/부등호.cc
#include <iostream> #include <vector> #include <algorithm> using namespace std; int k; char c[10]; bool is_visit[10]; string max_ans = "0"; string min_ans = "9876543210"; bool check_sign(char a, char b, char sign) { if(sign == '>') { if(a > b) return true; else return false; } else { ...
ALGO
0.999986
4.012058
{ "github_metadata": { "branch": "main", "commit_count": 211, "repo_created_at": "2022-11-14T13:28:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c0fa9ba926...
b776cb26-a7cc-4090-b469-986b76a80152
0x26c9b3/HaoTran2504
C,C++/String/string/string43.cpp
//[Xâu ký tự]. Bài 43. Ước chung lớn nhất.cpp #include <bits-stdc++.h> using namespace std; // modCalc calculates the remainder when the input string s is divided by m // using the repeated division method long long modCalc(string s, long long m){ long long result = 0; for (int i = 0; i < s.size(); i++){ ...
ALGO
0.999987
4.95673
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-02-26T05:51:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4415ec146257...
6866fb30-901f-4966-9d44-2e2ef64569a4
atatomir/work
_Codeforces/Round 356/B (copy)/main.cpp
#include <iostream> #include <cstdio> #include <cstring> #include <vector> #include <algorithm> #include <cmath> #include <set> using namespace std; #define mp make_pair #define pb push_back #define ll long long ll m, ini, i; ll nxt, cnt, how, need, aux, sum; pair< ll, ll > ans; multiset<ll> pk; void get_next() { ...
ALGO
0.999967
3.291703
{ "github_metadata": { "branch": "master", "commit_count": 302, "repo_created_at": "2015-03-29T18:54: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": "1646a651...
079a48ff-5183-421b-a802-cd7c9f1f902b
r0nd0ud0u/aoc2020
aoc2020/day5.cpp
#include "day5.h" #include <sstream> #include "utils.h" #include "math.h" using namespace std; day5::day5() { } day5::~day5() { } void day5::JigglypuffRest() { int seatID =0; ifstream file("puzzles/puzzle_day05.txt", ios::in); if (file.is_open()) { string line; int result = 0; ...
ALGO
0.999497
3.850317
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-12-03T18:34: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": "340debfa06...
06e7ca3a-3813-4395-8daf-8d41dc692c0a
ZubinGou/leetcode
JZoffer/18-删除链表中重复的节点.cpp
#include <iostream> #include <vector> #include <stack> #include <queue> #include <map> // #include <unordered_map> // can't compile on poj #include <algorithm> #include <cstring> #include <climits> using namespace std; // Definition for singly-linked list. struct ListNode { int val; ListNode *next; ListN...
ALGO
0.999944
5.081623
{ "github_metadata": { "branch": "main", "commit_count": 106, "repo_created_at": "2021-06-30T04:14:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0722ed639...
d92ef0bd-aa87-419e-878b-3524f7191a47
letskuku/problem_solving
백준/Silver/2178. 미로 탐색/미로 탐색.cc
#include <iostream> #include <queue> #include <algorithm> #include <string> using namespace std; string board[101]; int dist[101][101]; int dx[4] = {0, 0, -1, 1}; int dy[4] = {1, -1, 0, 0}; int n, m; int main() { ios_base::sync_with_stdio(false); cin.tie(0); queue<pair<int, int>> q; cin >> n >> m; ...
ALGO
0.999965
4.065458
{ "github_metadata": { "branch": "main", "commit_count": 246, "repo_created_at": "2022-03-30T17:47: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": "8408a62f88...
9ac1ccd4-2658-41d3-826d-930b2c1b67ad
imicola/Questions-and-Impressions
main/LuoGutest/Luogu_P_1889[solve].cpp
//#pragma GCC optimize(3) #include <bits/stdc++.h> #define endl '\n' #define size_t int #define all(v) v.begin(), v.end() using namespace std; typedef long long LL; typedef vector<int> vint; typedef vector<vint> vvint; typedef vector<string> vstr; typedef pair<int, int> pii; typedef vector<pii> vpii; int main() { ...
ALGO
0.999957
3.787487
{ "github_metadata": { "branch": "LuoGutest/main", "commit_count": 160, "repo_created_at": "2024-09-08T11:43:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "...
c292dfb5-7368-41fc-a627-0b5c8926fa7e
DorHarizi/Cpp_Assigments2
CPP_EX1_24/Algorithms.cpp
#include "Algorithms.hpp" #include "Graph.hpp" #include <vector> #include <limits> #include <queue> #include <string> #include <iostream> #include <algorithm> using namespace std; namespace ariel { void Algorithms::DFS(size_t start, vector<bool>& visited, vector<vector<int>>& matrixGraph){ visited[s...
ALGO
0.999605
5.193607
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-04-26T15:32: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": "1f7e5b2338c...
34e052b8-1856-4434-9e66-6e443b7bd7c4
Pragadeeshwar-D/GFG-PROBLEMS
Upper case conversion.cpp
Upper case conversion Difficulty: SchoolAccuracy: 38.13%Submissions: 43K+Points: 0 Given a string str, convert the first letter of each word in the string to uppercase. Example 1: Input: str = "i love programming" Output: "I Love Programming" Explanation: 'I', 'L', 'P' are the first letters of the three words. You...
ALGO
0.999928
4.727354
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-08-07T17:35:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "518cddff361...
96da132f-e901-4638-9d8a-630559791abc
austinlf96/SNHU-Portfolio
CS-300/VectorSorting/VectorSorting/VectorSorting.cpp
//============================================================================ // Name : VectorSorting.cpp // Author : <NAME> // Version : 1.0 // Copyright : Copyright © 2017 SNHU COCE // Description : Vector Sorting Algorithms //========================================================================...
ALGO
0.999221
5.925939
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2022-02-18T22:19: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": "f06331159cc...
a61b407e-d62c-4adb-859b-f05f544cbb8a
Adivatsa/Coding
Linked_List/rotateLinkedList.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* rotateRight...
ALGO
0.99996
5.820381
{ "github_metadata": { "branch": "main", "commit_count": 395, "repo_created_at": "2022-02-21T08:20:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "98170699d8...
7999d053-d829-48ec-9633-bfaebc968de9
alibaba/GraphScope
flex/third_party/pthash/builders/search.hpp
/** Copyright 2020-2024 <NAME> and <NAME> * * The following sets forth attribution notices for third party software. * * PTHash: * The software includes components licensed by <NAME> and * <NAME>, available at https://github.com/jermp/pthash * * Licensed under the MIT License (the "License"); * you may not use...
ALGO
0.999092
5.921817
{ "github_metadata": { "branch": "main", "commit_count": 2271, "repo_created_at": "2020-10-28T03:19:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3461, "forks": 458, "issues": 418, "pull_requests": 28 }, "file_meta": { "content_id": "31...
df39c2d2-470c-4eb2-ab45-4d0a69ede060
godely/Problems
Livearchive/6348.cpp
#include <cstdio> #include <cstdlib> #include <algorithm> #include <vector> #include <cmath> #include <map> #include <set> #include <iostream> #include <cstring> #include <ctime> using namespace std; typedef pair<int,int> pii; #define fr(a,b,c) for(int a = b; a < c; a++) #define rp(a,b) fr(a,0,b) #define cl(a,b) memset...
ALGO
0.999947
3.674323
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2013-09-18T02:43:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a3dd3d6c9b...
4e6f28e7-7f51-4224-9a95-3eda56f3861c
chemicstry/poolserver
src/server/poolserver/Stratum/ShareLimiter.cpp
#include "ShareLimiter.h" #include "Server.h" #include "Client.h" #include "Config.h" #include "Log.h" namespace Stratum { // Returning false will stop any further share verifications (DoS prevention, etc) bool ShareLimiter::Submit(uint64 diff) { ++_totalShares; uint64 curTime = Ut...
ALGO
0.969622
5.634602
{ "github_metadata": { "branch": "master", "commit_count": 59, "repo_created_at": "2013-07-23T13:38:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 42, "forks": 39, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "69d9ade...
d2a4d214-6457-45b7-a46f-b4f43471177f
aszxvcb/TIL
프로그래머스/lv1_[1차]_비밀지도.cpp
#include <string> #include <vector> #include <bitset> #include <iostream> using namespace std; vector<string> solution(int n, vector<int> arr1, vector<int> arr2) { vector<string> answer; vector<int> temp; vector<string> v_bitset; string bits; /* 비트연산 */ for( int i=0; i<n; i++ ){ temp....
ALGO
0.999977
4.581903
{ "github_metadata": { "branch": "master", "commit_count": 251, "repo_created_at": "2020-11-04T13:50: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": "f47c1e9a...
0297d57f-33a1-4d34-a3d9-86455c11a45a
TIWTIW/causual-project
data_strcuture/chapter1/ex2_word_puzzle/main.cpp
#include <iostream> #include <string> #include <vector> #include <set> using namespace std; set<string> WordFind( set<string> &wordTable, vector<vector<char>> &vvc ) { set<string> WordFinded; int row = vvc.size(); int col = vvc[0].size(); for( int i = 0; i < row; ++i ) { for( int j = 0; j...
ALGO
0.999581
3.579214
{ "github_metadata": { "branch": "master", "commit_count": 89, "repo_created_at": "2018-01-15T03:52: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": "6ac1b5998...
4098d5e5-837d-4b4f-9326-e6f016c8e8d5
EvanderRPT/3DGraphics1
matrix.cpp
#include "matrix.h" #include <math.h> mat4_t::mat4_t() { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { m[i][j] = (i == j) ? 1.0f : 0.0f; } } } mat4_t& mat4_t::identity() { for (int i = 0; i < 4; i++) { for (int j = 0; j < 4; j++) { if (i == j) { ...
ALGO
0.976317
4.573255
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2025-03-20T22:24: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": "cddd6e1d55e...
07fdc086-38ad-4394-9006-7bf46e5b0ecb
ishandutta2007/codeforces-e
evilbuggy/normal/1139/F.cpp
#include <bits/stdc++.h> using namespace std; struct Query{ int type, ind, mul; int x, y, z; Query(){} Query(int it, int ii, int im, int ix, int iy, int iz){ type = it; ind = ii; mul = im; x = ix; y = iy; z = iz; } }; const int N = 100005; const int M = 300005; Query qur[M]; int sz, timer, p[N], s[N], b[N], x...
ALGO
0.999836
3.693194
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34: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": "271c75c142fa...
ffddb567-b86e-4f21-b9e5-0000e175451f
Taufique-07/Cpp
Backtracking.cpp
#include<iostream> using namespace std; bool safe( int** a,int x, int y,int n) { if(x<n &&y<n &&a[x][y]==1) { return true; } return false; } bool maze(int** a,int x, int y,int num,int** sol) { if(x==num-1 && y==num-1) { sol[x][y]=1; return true; } if(safe(a,...
ALGO
0.999942
3.816451
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-08-28T13:32: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": "5b33bf042714...
3b8337d3-5b39-4dc6-b475-cd1e544c08ec
fatmaf/ec100_projects
qll/qll/Source.cpp
#include <iostream> #include <string> using namespace std; template <class T> struct node { T data; node* next; node* prev; }; template <class Litem> class linkedList { node<Litem>* head; node<Litem>* tail; public: linkedList() { head = NULL; tail = NULL; } bool isEmpty() { return (head == tail) ...
ALGO
0.999445
4.612916
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-02-14T19:40:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 8 }, "file_meta": { "content_id": "7a91579729...
84ce0e99-77ec-4e81-931f-efa6745daa70
arnab000/Problem-Solving
codeforces/1392/D.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define f first #define s second #define Fast ios_base::sync_with_stdio(false);cin.tie(NULL); #define fo(a,b,c) for(int i=a;i<b;i+=c) typedef pair<ll , pair<ll, ll> > pi; int pow(int x,int y){ int res=1; while(y){ if(y&1) res*=x; ...
ALGO
0.999946
4.137791
{ "github_metadata": { "branch": "master", "commit_count": 1170, "repo_created_at": "2021-01-10T08:17:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "68a6a8a...
2231a953-963f-4057-b1d9-4060bbe70a21
jsquared21/StartingOutCPP
PC_2/PC_2_18.cpp
/* Future Ocean Levels During the past decade ocean levels have been rising faster than in the past, an average of approximately 3.1 millimeters per year. Write a program that computes how much ocean levels are expected to rise during the next 20 years if they continue rising at this rate. Display the answer in both ce...
TOOL
0.958727
5.061604
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-05-31T21:30:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 110, "forks": 84, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b9f244a...
8b9581cf-8dce-4d0a-bbbb-e7943fb1fcff
o-leolleo/RoadToCompete
UVa/Cap3/481.cpp
#include <bits/stdc++.h> using namespace std; vector<int> num, L, p, L_id; int main() { int tmp; while (scanf("%d\n", &tmp) != EOF) num.push_back(tmp); L.assign(num.size() + 1, 0); p.assign(num.size() + 1, 0); L_id.assign(num.size() + 1, 0); L[0] = num...
ALGO
0.999957
3.543833
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2015-10-10T05:02: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": "57dad411b...
2c0d083b-57de-497c-9cfd-3416164e4a66
Ishashikant9/leetcode
sortColors.cpp
#include <iostream> #include <vector> #include <unordered_map> using namespace std; class Solution { public: void sortColors(vector<int>& nums) { unordered_map<int, int> count = {{0, 0}, {1, 0}, {2, 0}}; // Count the occurrences of 0, 1, and 2 for (int num : nums) { count[num]+...
ALGO
0.999974
6.276317
{ "github_metadata": { "branch": "master", "commit_count": 108, "repo_created_at": "2024-06-10T04:23:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e47a598b...
4dcd1be6-747b-44ff-8d35-2bb2219ae9e3
Vivek3500/365-Days-of-GFG
Difficulty: Hard/Wildcard Pattern Matching/wildcard-pattern-matching.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: // Function to check if given pattern can match the given string. int wildCard(string pattern, string str) { bool isFirst = true; int trueVal = pattern.length(); int d...
ALGO
0.999944
5.522443
{ "github_metadata": { "branch": "main", "commit_count": 280, "repo_created_at": "2024-05-16T03:18: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": "f9c5416e92...
0c477943-eb22-44c2-9c68-a06104549581
hs05june/CP
cp_practice/contests/1814C.cpp
#include<bits/stdc++.h> #define rp(i,a,n) for(int i=a;i<n;i++) #define rep(i,a,n) for(int i=a;i>=n;i--) #define ll long long #define int long long #define deq vector<ll> #define mii map<ll,ll> #define pii pair<ll,ll> #define pb push_back #define f first #define s second #define sz(a) (int)a.size() #define all(x) (x).be...
ALGO
0.999608
3.390339
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2022-07-20T13:09: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": "5f997a14275...
f617ceb5-cfbb-4ed6-a173-9fc9caa5f696
LeslyS05/EstructuraDeDatos
Serie-10maSemana/La-cadena-mas-larga.cpp
#include <iostream> // Función para calcular la longitud de la cadena de números para un invitado dado int calcularLongitudCadena(int numero) { int longitud = 0; while (numero != 4) { if (numero % 2 == 0) { numero /= 2; } else { numero = numero * 3 + 1; } ...
ALGO
0.999837
5.406223
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2023-06-11T21:22: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": "cd86dd1d266...
1b932b57-e78f-4dc9-92cf-fd9133d169d7
Terpodia/Competitive-Programming
Problems Solved/Codeforces/Greedy/Game with Chips.cpp
#include <algorithm> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; /* ================================================= */ void fastIO() { cin.tie(0)->sync_with_stdio(0); } int aux; void _scan(int &x) { au...
ALGO
0.99981
3.193561
{ "github_metadata": { "branch": "main", "commit_count": 170, "repo_created_at": "2021-12-10T22:43: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": "637535d914...
b048a29e-2e6d-493f-a83a-4ebb90735f3a
SrihariLax/DAA-Assignments
Assing2src/minCut.cpp
/** * \file minCut.cpp * \brief This file contains the implementation for finding mincut of a directed graph * * */ #include<bits/stdc++.h> #include "FordFulkerson.h" using namespace std; map<unsigned long long,unsigned long long> Map; /**< Map of vertex to its index */ vector<int> partA,partB; //Two vectors to...
ALGO
0.999644
4.626621
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-03-10T09:28: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": "9ed696dca...
c58ed933-d301-4c72-8ad3-4e4a1a83934f
Owmicron/CPStuff
Atcoder/Balance.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef string str; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef vector<int> vi; typedef vector<ll> vll; typedef vector <pii> vpii; typedef vector <pll> vpll; typedef map <str,int> mapsi; typedef map <str,int> :: iterator mapsitr; typedef...
ALGO
0.999938
3.525261
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2020-04-24T08:11:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5406de0ca...
fd3b1534-349b-4278-823e-63e33e39d21f
raju2592/problem-solving
topcoder/DrivingPlans.cpp
/** * SRM: 624 * Div: 1 * Point: 450 */ #include<cstdio> #include<ctime> #include<iostream> #include<cmath> #include<cstring> #include<algorithm> #include<cstdlib> #include<vector> #include<stack> #include<queue> #include<map> #include<set> #include<utility> #define ll long //long #define uint unsigned int #define ...
ALGO
0.999971
4.288651
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-10-03T17:19: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": "8c7254e205...
b810dcef-ceb3-477b-91b1-8480e2bc881f
austin2734/C-Assignments
Lab 12/DL2_L14_Riggs.cpp
/* Author: <NAME> Assignment: Lab 14 Course/Section: COSC 1337 Section S (change S to your section number) Due Date: See syllabus or blackboard Instructor: Thayer Purpose: Practice recursion by re-implementing looping functions as recursive functions For each looping function, provi...
ALGO
0.994601
5.177807
{ "github_metadata": { "branch": "main", "commit_count": 17, "repo_created_at": "2023-12-12T18:23: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": "2796bd2e9e4...
209330a1-5bef-4c59-b86f-609991b046f8
arnab-bhattacharjee/my_code_repo
c++/TYTACTIC.cpp
#include <iostream> #include <vector> #include <string.h> using namespace std; vector<int>* g; int V,M; int* begin_time; int* end_time; int* tree; int* skill; int t; #define Rep(i,x) for(int i=0;i<x;i++) void update(int idx, int diff){ while(idx<V+1){ tree[idx]+=diff; idx+=idx & -idx; } } int get(int id...
ALGO
0.999752
3.722577
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-02-22T22:26: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": "416110af27...
82fb2dd9-32f5-4552-b41a-a22e17f374ab
ishandutta2007/codeforces-s
sendthemtohell/normal/1439/A1.cpp
#ifndef LOCAL #pragma GCC optimize("Ofast,no-stack-protector") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,mmx,tune=native") #endif //LOCAL #define _SCL_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #pragma comment(linker, "/STACK:256000000") #define first x #define second y #...
ALGO
0.99996
3.148335
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07: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": "7e8d83f71657...
35883969-4306-41d0-bd33-b177c5d0f54f
capnmav77/Core-Programming
Generic Prog/Unit-01/PROGRAMS/quicksort.cpp
// #include<bits/stdc++.h> // using namespace std; // // class Quicksort{ // // public: // // // Quicksort(); // // // ~Quicksort(); // // void quicksort(int *arr, int low, int high){ // // if(low < high){ // // int pi = partition(arr, low, high); // // ...
ALGO
0.999898
5.41763
{ "github_metadata": { "branch": "main", "commit_count": 215, "repo_created_at": "2023-02-11T05:00:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b709788551...
f8d33b5c-f96c-47f2-bc39-1ea4e48fe9fc
mdh058/morsec
morce code.cpp
#include <iostream> using namespace std; string morse_code_alpha(char alpha){ switch(alpha){ case 'A': case 'a': return "._"; case 'B': case 'b': return "_..."; case 'C': case 'c': return "_._."; case 'D': case 'd': return "_.."; case 'E': case 'e': return "."; case...
ALGO
0.999839
4.242859
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-02-03T20:37:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "625dde0b6bea...
2ac7d652-1eb3-4d85-a107-4ed8f1856875
AdityaSah2030/DSAwithCPP
Standard Template Library/09 Set/02_set_erase_find_count.cpp
#include <iostream> #include <set> using namespace std; /* * File: 02_set_erase_find_count.cpp * Description: * Demonstrates how to erase elements, and how to use find() and count() in a std::set. * * - erase(value): Removes 'value' if it exists, returns the number of elements removed (0 or 1). * - find(va...
ALGO
0.993596
6.913895
{ "github_metadata": { "branch": "main", "commit_count": 130, "repo_created_at": "2025-02-12T12:35: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": "72d6231ce3...
acbd3636-9ad1-4587-80ea-c7ec06c8eff4
woshiluo/algorithm_competition
cf/contest/1341/a/a.cpp
// Woshiluo<<EMAIL>> // 2020/04/23 22:48:04 // Blog: https://blog.woshiluo.com #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> template <class T> T Max( T a, T b ) { return a > b? a: b; } template <class T> T Min( T a, T b ) { return a < b? a: b; } template <class T> T chk_Max( T &a,...
ALGO
0.999463
3.727734
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2019-01-06T05:21:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6df40446d...
d2a14dcb-fa76-4318-a079-73d4d53b2005
tmoux/prog-contests
codeforces/1007/D/D2/D.cpp
#include <iostream> #include <string> #include <vector> #include <algorithm> #include <math.h> #include <set> #include <map> #include <unordered_set> #include <cstring> using namespace std; typedef long long ll; vector<int> facm[100005]; void factor(int i,map<int,int>& mp) { if (i == 1) return; for (int j = 2...
ALGO
0.999702
5.562227
{ "github_metadata": { "branch": "master", "commit_count": 288, "repo_created_at": "2018-10-21T03:33:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3e4bee5...
2f282e08-cb86-4437-97cd-d7341522d753
Vince001/Cpp-demo
PrintArray.cpp
// PrintArray.cpp : Defines the entry point for the console application. // Print diamon '*' for test. #include "stdafx.h" #include <stdlib.h> #include <stdio.h> #include <string.h> // memset #define DIAMOND_HEIGHT 11 int _tmain(int argc, _TCHAR* argv[]) { int dia_h = 0; char cSign = '*'; if( argc == 3 ) { d...
TOOL
0.989682
3.672032
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2014-06-05T01:20: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": "7bc56fe4a...
e62acb4e-78b9-42be-aa41-bb05b22dd1cd
gdfszjs/FRegion
GlutSnippet/Grid4ConnectedUndirectMRF.cpp
#include "Grid4ConnectedUndirectMRF.h" Grid4ConnectedUndirectMRF::Grid4ConnectedUndirectMRF() { } Grid4ConnectedUndirectMRF::~Grid4ConnectedUndirectMRF() { this->Free(); } void Grid4ConnectedUndirectMRF::Free() { for(uint i = 0;i<mrf_.rows();i++) { for(uint j = 0;j<mrf_.cols();j++) { if(this->mrf_.at(i,j...
ALGO
0.992086
4.381121
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2016-11-24T04:04: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": "374ba44148...
5a109e5a-be1c-40d6-815c-2343db83d002
dimekai/Algorithmic-Club
Basicos/Ejercicios/UVA/Newspaper.cpp
#include <iostream> #include <iomanip> #include <string> #include <utility> #include <vector> using namespace std; const int K = 105; /*Numero maximo de caracteres a pagar*/ int main(){ vector<char> characteres(K,0); vector<float> price(K,0); pair<short,short> N_K; /*Casos-#caracteres a pagar*/ double tot...
ALGO
0.981341
3.600471
{ "github_metadata": { "branch": "master", "commit_count": 142, "repo_created_at": "2018-04-07T20:34: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": "35599c6f...
70a7e9ab-7391-4a89-86e9-6b83d5913a98
wodxx/Algorithm-T2-PKU
ErFen/liangshuzhihe.cpp
#include <iostream> #include <algorithm> using namespace std; int findtwonumber(int arr[], int n, int m){ for(int i = 0; i < n - 1; i++){ int temp = m - arr[i]; //方法一:对数组中每一个值arr[i],在数组中找m - arr[i] int left = i; int right = n; while(left <= right){ //二分...
ALGO
0.999986
3.598917
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2022-03-01T00:58: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": "611577fdb9e...
023afa88-f847-4c10-9457-fe981e0a4fe5
t-ueshiba/TUTools
Testprog/Vector/main.cc
/* * $Id: mtest.cc,v 1.4 2010-03-03 01:36:57 ueshiba Exp $ */ #include "TU/Vector++.h" int main() { using namespace std; using namespace TU; Vector<double> u, v; Matrix<double> A, B; Matrix<float> F; // cout << setprecision(8); cout.setf(ios::scientific, ios::floatfield); for (...
TEST
0.928315
3.728754
{ "github_metadata": { "branch": "develop", "commit_count": 3204, "repo_created_at": "2023-06-23T22:35: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": "9a63ac...
43a4523b-28f7-46f4-8a2d-c125cbc62a97
hyojeongbae/SAMSUNG-SW-Study
Project1/day10.cpp
#include<iostream> #include <vector> #include<queue> #include <cmath> #include<cfloat> using namespace std; struct Node { int nodeNum; double dist; bool operator < (const Node& o)const { return dist > o.dist; } }; vector<vector<Node>> g; int main(int argc, char** argv) { int T; cin >> T; for (int test_cas...
ALGO
0.999902
4.265199
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2024-09-03T10:06: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": "2c71c9cc990...
5d1071c5-ffe0-460c-a434-ca01a1d21fe2
Shahbaz898414/Code_Cheff
Pratice/Chef and Tag.cpp
#include "bits/stdc++.h" using namespace std; #define ll long long int #define double long double #define endl '\n' const int MOD = 1000000007; const int inf = 1ll << 60; int modInverse(int A, int M = MOD) { int m0 = M; int y = 0, x = 1; if (M == 1) return 0; while (A > 1) { int q = A / M; int...
ALGO
0.999758
4.563781
{ "github_metadata": { "branch": "main", "commit_count": 654, "repo_created_at": "2023-01-23T10:35: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": "dafde4b22d...
0981ca91-bcf0-4763-922b-a64f1c97bc7d
wg-perception/PartsBasedDetector
matlab/mex/score.cc
#include <math.h> #include <stdint.h> #include "mex.h" // score(w,qp.x,inds) // scores a weight vector 'w' on a set of sparse examples in qp.x at the columns specified by 'inds' #define MAX(A,B) ((A) < (B) ? (B) : (A)) static inline double score(const double *W, const float* x) { double y = 0; int xp = 1; ...
ALGO
0.958136
4.648456
{ "github_metadata": { "branch": "master", "commit_count": 140, "repo_created_at": "2012-06-28T18:05:44.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 167, "forks": 119, "issues": 15, "pull_requests": 4 }, "file_meta": { "content_id": "c094...
19377b19-d178-4f23-b93c-6baca02f326d
raj2k00/LeetCode
17-letter-combinations-of-a-phone-number/letter-combinations-of-a-phone-number.cpp
class Solution { public: unordered_map <char , vector <char>> hash = { {'2' , {'a', 'b', 'c'}}, {'3' , {'d', 'e', 'f'}}, {'4' , {'g', 'h', 'i'}}, {'5' , {'j', 'k', 'l'}}, {'6' , {'m', 'n', 'o'}}, {'7' , {'p', 'q', 'r','s'}}, {'8' , {'t', 'u', 'v'}}, ...
ALGO
0.999925
6.329661
{ "github_metadata": { "branch": "main", "commit_count": 1989, "repo_created_at": "2023-01-01T10:49:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8060dc862...
07a3152a-60e6-4e93-a577-f9e7f0d21904
mardyr/Cpp-trainging_and_tasks
watki/watki/015.cpp
#include <iostream> #include <array> // tablica #include <vector> // wektor #include <deque> // kolejka z dwoma końcami #include <list> // lista #include <forward_list> // lista jednokierunkowa #include <set> // zbiór #include <map> // asocjacyjne kontenery #include <unordered_set> #include <unordered_map> #include <...
TOOL
0.923928
3.380762
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-10-06T14:00: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": "59e26298d...
3acf332e-ed88-441c-a514-50485ac9edb3
Spencer-Janus/C_Learning_process
排序及其时间计算.cpp
#include<stdio.h> #include<iostream> #include<stdlib.h> #include<time.h> #define max 50000 using namespace std; typedef int KeyType; typedef int DataType; typedef struct entry { KeyType key; DataType data; }Entry; typedef struct list { int n; Entry D[max]; }List; int FindMin(List list, int startIndex) //简单选择排序 { ...
ALGO
0.999943
4.128983
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2021-01-21T14:16: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": "a3587926302...
60a98768-0762-40ab-9f37-d15d5b31921a
Aryan-Kumar-Thakur/GFG-DSA-Submissions
Difficulty: Hard/Maximum Connected group/maximum-connected-group.cpp
//{ Driver Code Starts // Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends // User function Template for C++ class disjoint{ public: vector<int> size,parent; disjoint(int n){ size.resize(n+1,1); parent.resize(n+1); for(int i=0;i<=n;i++)...
ALGO
0.999823
6.187493
{ "github_metadata": { "branch": "main", "commit_count": 723, "repo_created_at": "2023-10-02T05:59: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": "a53f693483...
cb39e12c-9264-499f-8ece-4d3d87b61664
moos-ivp/moos-ivp
ivp/src/lib_geometry/XYSegment.h
/*****************************************************************/ /* NAME: <NAME> */ /* ORGN: Dept of Mechanical Engineering, MIT, Cambridge MA */ /* FILE: XYSegment.h */ /* DATE: Mar 28, 2009 ...
TOOL
0.927253
6.402143
{ "github_metadata": { "branch": "main", "commit_count": 5457, "repo_created_at": "2024-08-05T04:59:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 27, "forks": 18, "issues": 4, "pull_requests": 7 }, "file_meta": { "content_id": "f0993c39...
b53b6175-e09f-48b0-be27-1990ef85c45b
ravilkooo/mat_mod_2
matmod2_lab1/matmod2_lab1/Application_2.cpp
#include "Application_2.h" #include <iostream> Cell_2::Cell_2() : m_state(Cell_2_State::Resting), m_state_step(0) {}; Cell_2::Cell_2(Cell_2_State state) : m_state(state), m_state_step(0) {}; Cell_2::Cell_2(Cell_2_State state, double level) : m_state(state), m_level(level), m_state_step(0) {}; Application_2::Applica...
TOOL
0.960918
4.477838
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-03-14T07:02:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "805082c055...
61b99589-cb35-4147-9193-cf2819d99aec
koba-e964/contest
opencup/22-southeastern-europe/l.cpp
#include <algorithm> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <ctime> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <random> #include <utility> #include <vector> const int...
ALGO
0.9997
4.376263
{ "github_metadata": { "branch": "master", "commit_count": 2836, "repo_created_at": "2013-09-13T04:48:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 5, "issues": 20, "pull_requests": 0 }, "file_meta": { "content_id": "f1432...
4c507892-9477-4a85-a0e5-fc6163cc7915
InwooLeeme/Algorithm
Boj/21608.cpp
#pragma GCC target("avx,avx2,fma") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include <bits/stdc++.h> #include <ext/rope> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define fastio ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) using namespace std; using name...
ALGO
0.999781
3.916522
{ "github_metadata": { "branch": "main", "commit_count": 2142, "repo_created_at": "2021-03-08T04:16: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": "3d37534c3...
9efb5b0b-605f-4b90-b946-563fc8599cb0
Phil26/Algorithms-implementations
LRDoolittle Factorization/main.cpp
#include <iostream> using namespace std; int main() { int n, i, j, k, h; int perm = 0; float a[10][10], aux, l[10][10], r[10][10]; float S, piv; cout << "n: "; cin >> n; for (i = 1; i <= n; i++) { for (j = 1; j <= n + 1; j++) { cout << "a["<< i <<"]["<< j <<"] = "; cin >> a[i][j]; } } if (a[1][1]...
ALGO
0.999914
3.448866
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2021-05-02T18: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": "0daddcfc5cf...
4c11cb6b-215f-4e49-93d2-44d1dd05a06f
kimjunseok00/codetree
250512/정수 명령 처리/process-numeric-commands.cpp
#include <iostream> #include <stack> using namespace std; int N; string command[10000]; int value[10000]; int main() { cin >> N; for (int i = 0; i < N; i++) { cin >> command[i]; if (command[i] == "push") { cin >> value[i]; } } stack<int> s; for(i...
ALGO
0.999575
4.47148
{ "github_metadata": { "branch": "main", "commit_count": 381, "repo_created_at": "2025-04-07T07:04:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c4ea3c58f...
ce2e9941-8723-4c56-b0cf-669259c610a3
emilyju0314/gpt_code_plagiarism
dataset/code_content_classifier/allpro_train/1_8288_41.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n >> m; int a[n]; long long mx = 0, mn = INT_MAX, sm = 0; for (int i = 0; i < n; i++) cin >> a[i]; for (int i = 0; i < n; i++) { sm += a[i]; mx = max(sm, mx); mn = min(mn, sm); if (sm > 0 && sm > m) { cout << 0...
ALGO
0.999998
3.744046
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-04-28T03:59: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": "ad47798f6f6...
e0d800b2-1fcb-4846-921a-cfae2688d7a3
MoRamdan11/Algorithms-and-Data-structure
1- Algorithms Toolbox/Week 4/4-1 Binary Search.cpp
#include <iostream> using namespace std; int binarysearch(int a[], int e, int l, int r) { if(l > r) return -1; if(r == l) { if(a[l] == e) return l; else return -1; } int mid = (l + r) / 2; if(a[mid] == e) return mid; if(e < a[mid]) ...
ALGO
0.999986
5.242587
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2020-09-16T14:32: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": "39cd66d65...
6ac6622b-9bad-4833-b87a-bf3c7ad4d28c
cleamoon/OJ-submissions
kattis/ipv6.cpp
#include <iostream> #include <string> using namespace std; int main(void) { string input; cin >> input; int nM=0, n0; for(int i=0; i<int(input.length()); i++) { if(input[i]==':') nM++; } // cout << nM << endl; n0 = 7 - nM + 1; if((input[0]==':')or(input[int(input.leng...
ALGO
0.937033
3.130886
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2024-05-19T12:30:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "225b18e8b19...
8701fe79-8fa0-4b93-99e0-84bbc7853c2f
openvinotoolkit/openvino
src/plugins/intel_gpu/src/kernel_selector/kernels/fully_connected/fully_connected_kernel_imad.cpp
// Copyright (C) 2018-2025 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include <vector> #include "fully_connected_kernel_imad.h" // IMAD Fully_Connected primitive implementation. // Limitations are: // 1. Input = F x 1 x 1 with Filter = 1 x 1 // 2. No data padding namespace kernel_selector { Param...
ALGO
0.905158
4.107614
{ "github_metadata": { "branch": "master", "commit_count": 19551, "repo_created_at": "2018-10-15T10:54:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8597, "forks": 2656, "issues": 303, "pull_requests": 258 }, "file_meta": { "content_id"...
317978b9-bbd4-4b5c-8a8b-dfb964ac74d4
Ishwarendra/Contests
Short_contest/Lockout/lockout_3/E.cpp
#include "bits/stdc++.h" #ifdef LOCAL #include "F:\CPP\Debug\debug.h" #else #define print(...) 1; #endif using i64 = long long; void solve() { int n; std::cin >> n; std::vector<int> indeg(n); std::vector<std::pair<int, int>> adj[n]; int can = 1; for (int i = 0; i < n; i++) { i...
ALGO
0.999103
4.263186
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-02-11T15:50:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a97cfa79b2ba...
7dc059ba-d039-4d14-a7e6-5a82569639a9
AdhikariDeepankar/K-D-Trees
KDcomplete.cpp
// author@ <NAME> // roll number@ 2019csm1004 // @ <NAME> //Complete KD TREE WITH CONTROLS TO SELECT DESIRED OPERATIONS AT EXECUTION //INITIALLY BULKLOADED DATA INTO THE KD TREE FROM A TEXT FILE WITH INPUT IN FORMAT <POINT ID> <XCOORDINATE> <YCOORDINATE> //ALSO IF NOT BULK LOADING HAVE THE ABILITY TO CREATE THE KD TR...
ALGO
0.99834
3.044424
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-04-05T13:08: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": "260d814165...
ef739a7a-955b-4a91-aa78-fa42ab257660
atyamsriharsha/a2ojladderssolutionscodeforces
209_div2c.cpp
#include <bits/stdc++.h> using namespace std ; const long long int mod1 = 1000000007 ; map<long long int,long long int> k ; long long int gcd(long long int a,long long int b) { if(b==0) return a%mod1 ; return gcd(b,a%b)%mod1 ; } long long int power(long long int a,long long int b) { long long int ans1 = 1 ; whi...
ALGO
0.999967
4.362049
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2015-09-20T13:27:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49372e9c4...
33f7aeee-0765-45cf-aa3e-236f6cdaf0ae
pyre/pyre
tests/pyre.lib/viz/iterators/decimate.cc
// -*- c++ -*- // // <NAME> <<EMAIL>> // (c) 1998-2025 all rights reserved // STL #include <vector> #include <fstream> // support #include <pyre/grid.h> #include <pyre/viz.h> // type aliases // the data type using data_t = std::complex<double>; // storage using storage_t = pyre::memory::heap_t<data_t>; // layout us...
ALGO
0.932589
5.840367
{ "github_metadata": { "branch": "main", "commit_count": 6583, "repo_created_at": "2016-05-23T04:17:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 28, "forks": 15, "issues": 24, "pull_requests": 2 }, "file_meta": { "content_id": "07eab50...
b3474660-972a-4672-8d2a-177686540a43
IljaSir/CopilotSolverForLeetCode
C++/Medium/WrongAnswer/number-of-ways-to-select-buildings_5.cpp
class Solution { public: long long numberOfWays(string s) { long long mod = 1e9 + 7; long long n = s.size(); long long count = 0; for(int i = 0; i < n; i++) { if(s[i] == '1') count++; } if(count % 3 != 0) return 0; if(count == 0) { ...
ALGO
0.999996
5.410506
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-07-28T08:23:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ff0b0fa0c63e...
ccf68b4d-75a0-465e-b3f4-a9de3d52cdef
ithsarasak/Programming
Compettitive programming/BUU camp #14/camp#3/Daily#2/Iguana.cpp
#include<bits/stdc++.h> using namespace std; struct eve{ int po, va; bool operator<( const eve &k )const{ if( po == k.po ) return va < k.va; else return po < k.po; } }; vector<eve> all; int n, m, sum, tap = 0, color; char ch; int main() { scanf("%d %d",&n,&m); for( int i = 0 ; i < m...
ALGO
0.999882
3.305638
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2019-04-03T08:43:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0ea2353d4...
ee36aace-6425-4702-b24e-4434dcceecff
dev-singh-kanyal/Archive-cns-lab
additive_inverse_cipher.cpp
#include <iostream> #include <cctype> // For isalpha and isupper using namespace std; string additiveInverseEncrypt(const string &plaintext, int key); int main() { string plaintext; int key; cout << "Enter the plaintext: "; getline(cin, plaintext); cout << "Enter the key (an integer): "; cin...
ALGO
0.999522
5.55836
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-11-14T10:55:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9dc4860a4a04...
69c16da7-1c58-448e-833c-e055f3a5ead8
liuyubobobo/Play-with-Algorithm-Interview
04-Using-Hash-Table/Course Code (C++)/04-Two-Sum/main.cpp
#include <iostream> #include <vector> #include <cassert> #include <unordered_map> using namespace std; // 1. Two Sum // https://leetcode.com/problems/two-sum/description/ // 时间复杂度:O(n) // 空间复杂度:O(n) class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { unordered_map<int,int> record...
ALGO
0.997264
5.510423
{ "github_metadata": { "branch": "master", "commit_count": 257, "repo_created_at": "2017-01-13T02:17:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1113, "forks": 456, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f46...
2fb6e69a-f488-47d6-a74b-a9fb3a79af52
seo-bo/ProblemSolving
백준/Gold/2580. 스도쿠/스도쿠.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double lb; typedef pair<int, int> pii; typedef pair<ll, ll> pll; int main(void) { ios::sync_with_stdio(0); cin.tie(0); vector<vector<int>>v(9, vector<int>(9, 0)); vector<pii>a; for (int i = 0; i < 9; ++i) { for (int j = 0; j < 9; ...
ALGO
0.9999
4.429239
{ "github_metadata": { "branch": "main", "commit_count": 2731, "repo_created_at": "2025-01-09T04:45: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": "579c56fad...
45f18c8d-8a63-46f5-a186-33c8acc59e78
Destiny-King/Algorithm_Exercice
String/StrStr/StrStr.cpp
// // Created by Destiny on 2022/9/9. // #include "StrStr.h" //得到next数组 void StrStr::getNext(int *next, const string &s) { int j = 0; next[0] = 0; for (int i = 1; i < s.size(); ++i) { //前后缀不相等 while (j > 0 && s[i] != s[j]) { j = next[j - 1]; } //前后缀相等 if (s[i] == s[j]) { j++; ...
ALGO
0.998517
4.50675
{ "github_metadata": { "branch": "master", "commit_count": 159, "repo_created_at": "2022-07-04T05:46:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bce7bdec...
474abdfa-1e0d-4a4e-a609-33737ebd34ac
verif/leetcode
insertSortedList/t.cpp
/* Insert into a Cyclic Sorted List */ #include <iostream> using namespace std; typedef struct Node { Node* next; int val; } Node; void printList(Node* head) { if (!head) return; cout << "List Item: " << head->val << endl; Node* next = head->next; while (next != head) { cout << "List...
ALGO
0.999768
5.148545
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2014-08-15T17:07: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": "5884d542b...
3b843725-ede9-4570-93de-9437ea31989c
SanidhyaPathak14/projects
classRect.cpp
#include <iostream> using namespace std; class Rectangle { private: double length; double width; public: // constructor for length and breadth Rectangle(double l, double w) { length = l; width = w; } double calculateArea() const { return length * width; } ...
TOOL
0.927593
4.83527
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2025-02-25T15: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": "da6cb791f9a0...
fd4afeca-4a9d-435d-8bd4-aedabbbd7d29
sherlockjin/leetcode_sherlockjin
Common/sort.cpp
#include "common.h" class Sort { public: void test() { int origin[] = { 21,23,3,22,57,5 }; //int origin[] = { 5, 4, 3, 2, 1 }; int s[10]; int length = sizeof(origin) / sizeof(int); string type; cout << "请输入排序类型:"; while (cin >> type) { if (type == "quickSort") { memcpy(s, origin, sizeof(origin)...
ALGO
0.998259
4.643474
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2017-08-25T01:24: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": "fa8433e68...