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
4374ded4-c8bf-45ff-9da2-e04e7824b475
microsoft/CNTK
Source/Readers/ReaderLib/IndexBuilder.cpp
// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.md file in the project root for full license information. // #define __STDC_FORMAT_MACROS #define _CRT_SECURE_NO_WARNINGS #include <inttypes.h> #include <future> #include "IndexBuilder.h" #include "ReaderConstants.h" #in...
DATA
0.957505
7.452321
{ "github_metadata": { "branch": "master", "commit_count": 16117, "repo_created_at": "2015-11-26T09:52:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 17590, "forks": 4269, "issues": 755, "pull_requests": 85 }, "file_meta": { "content_id"...
17332ec1-7749-427e-8175-650f9275b4da
acs-pa/pa-lab
skel/lab04/cpp/task-1/main.cpp
// SPDX-License-Identifier: BSD-3-Clause #include <fstream> #include <iostream> #include <vector> using namespace std; // constanta modulo folosita in aceasta problema #define MOD ((int)1e9 + 7) // sau // #define MOD 100000007 // (varianta 2 e mai ușor de busit, sesizați? :p) class Task { public: void solve() { ...
ALGO
0.999937
4.859614
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2021-03-01T22:01:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14, "forks": 46, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "35d6b838b0...
7af6eb25-82eb-40b1-a776-91d537cd9d0d
organicmaps/organicmaps
coding/sparse_vector.hpp
#pragma once #include "3party/succinct/rs_bit_vector.hpp" namespace coding { /// Simple sparse vector for better memory usage. template <class Value> class SparseVector { succinct::rs_bit_vector m_bits; std::vector<Value> m_values; public: SparseVector() = default; bool Empty() const { return GetSize() == ...
TOOL
0.947114
7.063083
{ "github_metadata": { "branch": "master", "commit_count": 42613, "repo_created_at": "2020-12-27T19:02:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11487, "forks": 1128, "issues": 2796, "pull_requests": 182 }, "file_meta": { "content_i...
4f6767ba-2e02-4cca-b646-cb1f379752f1
Chiki1601/Hackerearth-Solutions
Data Structures/Advanced data structures/Segment trees/Repair this tree.cpp
#include<bits/stdc++.h> using namespace std; mt19937 rnd(chrono::system_clock::now().time_since_epoch().count()); int L[200010], R[200010], Count = 0; bool KT[1000005]; vector <int> a[200010], SNT; vector <pair<pair<int, int>, int>> Pos[78500]; long long rand(long long l, long long r) { return 1LL * (1LL * rnd() ...
ALGO
0.999895
4.045537
{ "github_metadata": { "branch": "main", "commit_count": 1808, "repo_created_at": "2022-09-09T09:13:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14, "forks": 2, "issues": 0, "pull_requests": 2 }, "file_meta": { "content_id": "fa2030a0...
eb20c873-2dcc-4921-bb9a-7bd43c34a918
manasbis10/code
D_2_Sage_s_Birthday_hard_version.cpp
#include<bits/stdc++.h> using namespace std; #define endl '\n' #define int long long int mod = 1e9+7; bool solve(int mid, vector<int>&arr) { int i = arr.size() - 1; bool ans = true; for(int j = mid-1;j>=0;j--) { ans = ans && (arr[j]<arr[i]) && (arr[j]<arr[i-1]); i--; } return ...
ALGO
0.999998
4.086821
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-04-18T19:45: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": "f14cb5199839...
fda7044d-f423-4cfe-8a6f-601ad069754b
BCLCommons/bcl
source/descriptor/bcl_descriptor_molecule_rdf_sign_code.cpp
// (c) Copyright BCL @ Vanderbilt University 2014 // (c) BCL Homepage: http://www.meilerlab.org/bclcommons // (c) BCL Code Repository: https://github.com/BCLCommons/bcl // (c) // (c) The BioChemical Library (BCL) was originally developed by contributing members of the Meiler Lab @ Vanderbilt University. // (c) // (c) T...
ALGO
0.996468
5.016154
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2022-05-21T17:35:18.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 29, "forks": 19, "issues": 2, "pull_requests": 1 }, "file_meta": { "content_id": "8d1683a5...
26cdb497-1e63-485a-a4ea-708f21b182f2
arash-ha/Cpp
Score of Parentheses.cpp
/* Score of Parentheses Given a balanced parentheses string S, compute the score of the string based on the following rule: () has score 1 AB has score A + B, where A and B are balanced parentheses strings. (A) has score 2 * A, where A is a balanced parentheses string. Example 1: Input: "()" Output: 1 Example 2: ...
ALGO
0.999379
5.321139
{ "github_metadata": { "branch": "master", "commit_count": 982, "repo_created_at": "2019-10-02T15:30: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": "136fed47...
5fb7a14f-e97e-4d87-94fb-fc6dd2708751
AndreTMV/POO
3er parcial/presentacion-sonia.cpp
// presentacion-sonia.cpp : Este archivo contiene la función "main". La ejecución del programa comienza y termina ahí. // #include <iostream> #include <cmath> using std::cout, std::cin, std::endl; template <typename T> class linea { public: struct punto { T x, y; }; punto punto1, punto2; fl...
ALGO
0.939905
4.307705
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2021-10-23T15:44: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": "2486aecfd8b...
9632cdc1-f3a1-44b1-8b99-fcbe772f5a03
B1ue-Dev/Random
C++/Exercises/bai5.cpp
#include <iostream> using namespace std; /* Ký hiệu D(n) là số lượng ước số của số tự nhiên n, ví dụ: D(10)=4 và D(12)=6. Với L và R cho trước (L≤R), hãy tính tổng D(L)+D(L+1)+...+D(R−1)+D(R). Input Dòng đầu chứa số nguyên dương T≤106 là số lượng câu hỏi. T dòng sau, mỗi dòng chứa hai số nguyên dương L và R thể hiện ...
ALGO
0.999924
4.888363
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2021-03-04T10:47: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": "5307d5414...
4f430a8d-7650-45a0-b7f2-5b05999e39ed
laijirong/NOIP-C-files
考试/20171104/stone.cpp
#include <cstdio> const int N = 50050; int l, n, m, a[N]; int check( int x ) { int p = 0, ans = 0; while (p <= n) { int t = p; while (t <= n && a[t]-a[p] < x) { t++; } if(t == n+1) break; p = t; ans ++; } if(a[n+1]-a[p]<x) ans --; return n-ans; } int main() { freopen( "stone.in", "r", stdin ); freop...
ALGO
0.999995
3.684901
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-02-02T10:53: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": "f854a6cb57...
5ed54f34-1648-42a6-8053-9032d02ed639
pytorch/pytorch
caffe2/perfkernels/batch_box_cox_vec.h
#pragma once #include <cstdint> #include <cmath> #include <vector> #include <c10/util/irange.h> #include <folly/SingletonThreadLocal.h> #include <caffe2/perfkernels/common.h> #include "vectorizer.h" #include <mkl.h> namespace caffe2::details { namespace { void TileIndicesInPlace(std::vector<int>& v, const std::size_...
DATA
0.984524
7.257146
{ "github_metadata": { "branch": "main", "commit_count": 90499, "repo_created_at": "2016-08-13T05:26:41.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 91573, "forks": 24684, "issues": 5000, "pull_requests": 1303 }, "file_meta": { "content_i...
ba35c65b-2557-48a1-9f6c-df62cfb0ccbd
ZYLZhuPP/OI
YYOJ/1568.cpp
#include<bits/stdc++.h> using namespace std; const int N = 2005; int n, ans, s[N][N], to[N], a[N], t, ned[N]; struct IO { static const int BufS=1<<20; char ibuf[BufS], *iS, *iT, obuf[BufS], c; int top, f, num[66], t; #define gc() ((iS==iT && (iT=(iS=ibuf)+fread(ibuf, 1, BufS, stdin)), iS==iT)? EOF: *iS++...
ALGO
0.999964
3.465711
{ "github_metadata": { "branch": "ZYLZPP", "commit_count": 115, "repo_created_at": "2024-09-18T03:26:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ef0460f...
de2b28fc-449c-4f13-aae7-2d07abb0d3a7
fangding678/OnlineJudge
leetcode/archive/_c0273.h
// // Created by fangding on 2020-02-01. // #include <string> #include <vector> #include "__debug" using namespace std; class Solution { public: string smallNumToWords(int num) { string ans = ""; if (num >= hundred) { ans += m[num / hundred] + " Hundred "; num %= hundred; ...
ALGO
0.998434
5.093979
{ "github_metadata": { "branch": "master", "commit_count": 71, "repo_created_at": "2016-09-11T01:16:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c475ec57c...
3d6bfddb-9730-4acb-b49c-71a3aaad471c
Rhithick02/C-code
Codeforces/1490/F.cpp
#include<bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace std; #define lli long long #define For(i,a,n) for(int i=(a);i<n;i++) #define asc(x) x.begin(),x.end() #define des(x) x.rbegin(),x.rend() #define pb push_back #define fi first #define se second #define mod 100000...
ALGO
0.999937
3.603042
{ "github_metadata": { "branch": "master", "commit_count": 288, "repo_created_at": "2020-04-21T14:09:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c5201603...
c2810eab-34ed-4101-829b-7257f95e26e8
yy-nm/LeetCode
vs-project/76. Minimum Window Substring/76. Minimum Window Substring.cpp
// 76. Minimum Window Substring.cpp : This file contains the 'main' function. Program execution begins and ends there. // #include <iostream> #include <string> #include <vector> #include <limits> using namespace std; class Solution { public: string minWindow(string s, string t) { if (t.length() > s.len...
ALGO
0.999979
7.064433
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2024-01-13T04:17: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": "aa4fb1e11...
6420751e-d13b-4c52-8e57-5075d7e93da8
JawadSher/DSA-LeetCode-GFG-Problems-Repository
05 - Arrays Based Problems/Is Array Sorted or Not/main.cpp
// Linear Approach #include<iostream> using namespace std; void check_sorting(int arr[], int s) { bool isSorted = true; string order = ""; if (s < 2){ isSorted = true; order = "Array is too small to determine order"; }else{ bool Ascending = true; bool Descending = true;...
ALGO
0.99983
5.353705
{ "github_metadata": { "branch": "main", "commit_count": 1256, "repo_created_at": "2024-06-19T04:06: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": "f57a899cb...
bbfd11eb-cbc4-4785-a4ef-5fd5cbae731b
MarkinF1/Programs_on_C_Plus
prak/raznostnoe_reshenie.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> using namespace std; vector <double> progonka(int n, vector <double> &A, vector <double> &B, vector <double> &C, vector <double> &F, double x1, double x2, double m1, double m2, bool print = false) { int i = -1; vector <dou...
ALGO
0.999961
4.256801
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-09-03T16:54: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": "9c444e722488...
3205e74a-b2f0-4620-8910-0aadc8546833
KhalidAlsantali/AdventOfCode
2024/Day10/day10_part1.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> #include <sstream> #include <algorithm> #include <unordered_map> #include <cctype> #include <set> #include <utility> using namespace std; struct pair_hash { template <class T1, class T2> std::size_t operator () (const std::pair<T1,T2> ...
ALGO
0.999799
6.394524
{ "github_metadata": { "branch": "master", "commit_count": 179, "repo_created_at": "2024-12-05T21:33: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": "c9c1b4cd...
5bd8d91b-8acf-45d9-8826-7e78df37f510
ishandutta2007/codeforces-a
abc864197532/normal/1176/D.cpp
#include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace std; #define lli long long int #define fop(i,m,n) for (int i=(m);i<(n);i++) #define FOP(i,m,n) for (int i=(m)-1;i>=(n);--i) #define test(x) cout << #x << ' ' << x << endl; #define printv(a) {\ for ...
ALGO
0.99997
3.329837
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-04-11T00:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab1edeb2e941...
745fd016-fc35-41f7-b94e-ebeab4f14904
HazeeqHaikal/Week-4
investment and dividend/investmentDividend.cpp
#include <iomanip> #include <iostream> #include <string> using namespace std; int main() { float investment, dividend, total; cout << "Enter the amount of investment: "; cin >> investment; if (investment > 75000) { dividend = 1.3 / 100 * investment; } else if (investment > 50000) { ...
ALGO
0.99659
4.580541
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2022-10-28T14:52: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": "f6d62e8a3...
4700b86e-5568-41fe-a69b-70e08fe07474
ishandutta2007/codeforces-e
el_sanchez/normal/695/B.cpp
#include "bits/stdc++.h" #define forn(i, n) for (int i = 0; i < (int)n; i++) #define ford(i, n) for (int i = (int)n - 1; i >= 0; i--) #define forab(i, a, b) for (int i = (int)a; i < (int)b; i++) #define X first #define Y second #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() template<t...
ALGO
0.999943
3.61912
{ "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": "f24b1825ce59...
a5f32272-9980-42bc-9a37-70a41d6c44c5
hjiang13/LLM4IR
results/Task2_IR_Decompilation/DecompiledResuts_Human_x_164_O1/DeepSeek_Decompile_o1_result/Run2_DeepSeek_Decompile/CPP_83.cpp
<think> Okay, I'm trying to decompile this LLVM IR code back into C++ source code. Let's see what this function is doing. The function is named `_Z15starts_one_endsi` with an `i32` return type and takes an `i32` parameter. In C++, this would translate to a function like `int starts_one_ends(int)`. Looking at the IR,...
ALGO
0.997653
4.762889
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2025-05-21T20:32:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1faa5fdfe2a...
530532b9-9825-4ead-a992-ec28babc62e5
neutron-L/CacheSimulator
cachesimulator.cpp
/* Cache Simulator Level one L1 and level two L2 cache parameters are read from file (block size, line per set and set per cache). The 32 bit address is divided into tag bits (t), set index bits (s) and block offset bits (b) s = log2(#sets) b = log2(block size in bytes) t=32-s-b 32 bit address (MSB -> LSB): TAG || S...
ALGO
0.98961
4.510083
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-05-06T02:58: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": "ccd20cc3d42f...
3eb487a3-e598-4ec8-b8e2-e90aa5d89511
Abanning/OO-Programming
Assignment8/Node.h
// @author: <NAME> // @filename: Node.h // @date: April 12th, 2019 // @assignment: Assignment 6 - Binary Search Tree // @description: Node class header and implementation. Friend class of // BinaryTree and BinarySearchTree classes. // ADT Binary Tree Node: // Spec and implementation file // data object: a node ...
ALGO
0.982243
5.616448
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-09-09T22:12: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": "08b2ad6960...
3aba55a2-801c-4d7e-9aca-cb092c527269
OrDro1d/practice
sum-of-squares.cpp
#include <iostream> #include <map> using namespace std; int main() { unsigned int n; cin >> n; pair<int, int> points[n]; for (unsigned i = 0; i < n; i++) { int x, y; cin >> x >> y; points[i] = make_pair(x, y); } map<pair<pair<int, int>, pair<int, int>>, unsigned> po...
ALGO
0.999024
3.72911
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-04-27T14:29: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": "b7550f7c5f01...
2b21b471-a5e7-4307-b926-b0b81cd223e1
aminul-islam-niloy/Cpp-Programming-and-templates-
STL Library/interior_istream.cpp
//copy elelment input to outpt // #include<algorithm> // #include<iostream> // #include<iterator> // using namespace std; // int main(){ // istream_iterator<int>cin_it(cin); // istream_iterator<int>a; // ostream_iterator<int> cout_it(cout," "); // copy(cin_it,a,cout_it); // } //example 2; //c...
ALGO
0.995853
4.959587
{ "github_metadata": { "branch": "main", "commit_count": 193, "repo_created_at": "2022-11-23T12:23:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "163cd783fd...
aa002b8e-4096-406e-b5aa-e87a759d5a15
ZiluZhang/LeetCode-2
0215.cpp
class Solution { public: int findKthLargest(vector<int>& nums, int k) { int n = nums.size(); int left = 0, right = n-1; while (1) { int pos = qsort(nums, left, right); if (pos == k-1) return nums[pos]; else if (pos > k-1) right = pos-1; else le...
ALGO
0.999997
5.912941
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2019-08-10T17:47: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": "8e3162208...
9cd315c8-1ea4-4738-88e1-722cbca04d98
MahirSez/problem-solving
codeforces/329/B.cpp
#include <bits/stdc++.h> #define ll long long int #define PI acos(-1) #define read freopen("in.txt","r",stdin) #define uu first #define vv second #define write freopen("out.txt","w",stdout) #define pii pair<int,int> #define INF 1e9 #define EPS 1e-8 #define MAX 1000006 ...
ALGO
0.999941
3.664608
{ "github_metadata": { "branch": "master", "commit_count": 1286, "repo_created_at": "2021-02-19T06:49:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82b0e20...
fbf8d263-5300-4f27-a1ee-42dc66772202
Shadman-Ahmed-Chowdhury/Data-Structures-and-Algorithm
3. Data Structure/Linked List/Inserting_at_End_Of_LinkedList.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *next; }; void append(Node *n, int new_data) { Node *new_node = new Node(); //Assigning new value to the new_node new_node->data = new_data; new_node->next = NULL; //Traversing to the end of the list w...
ALGO
0.99682
4.773377
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2020-04-05T03:57: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": "4e7d5bd06...
1448f5d9-1f38-4547-9a1c-939b5bdd1c06
secretflow/spu
src/libspu/mpc/experimental/swift/arithmetic.h
// Copyright 2024 Ant Group Co., Ltd. // // 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 law or agreed ...
TOOL
0.937174
6.453351
{ "github_metadata": { "branch": "main", "commit_count": 706, "repo_created_at": "2022-07-02T09:05:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 292, "forks": 135, "issues": 25, "pull_requests": 15 }, "file_meta": { "content_id": "92894...
07962c33-c68f-4c00-983e-4fb798c445f2
denis-gubar/TopCoder
II-398-1/MinDifference.cpp
// BEGIN CUT HERE #include "precompiled.h" /* // END CUT HERE #include <algorithm> #include <cmath> #include <cstdlib> #include <functional> #include <iostream> #include <iterator> #include <map> #include <numeric> #include <set> #include <list> #include <sstream> #include <stack> #include <string> #include <queue> #in...
ALGO
0.999864
4.932699
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-12-21T13:06: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": "b5d7d97538...
4987e8b7-1f79-410e-a2be-77bca237398a
alifalhasan/CP-code-vault
AtCoder/abc256/abc256_e/32562233.cpp
#pragma GCC optimize("Ofast") #include<bits/stdc++.h> #include<ext/pb_ds/tree_policy.hpp> #include<ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; template<typename temp>using ordered_set = tree<temp, null_type, less_equal<temp>, rb_tree_tag,tree_order_statistics_node_update>; //order...
ALGO
0.999988
3.828168
{ "github_metadata": { "branch": "main", "commit_count": 5924, "repo_created_at": "2023-06-06T13:32: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": "5b7500a1d...
9e56f74c-f5ae-4daa-afc1-f1daece20642
ishanGoel1512/DSA-codes
stack and queue/queueUsingArray.h
template <typename T> class Queue { T *data ; int firstIndex ; int nextIndex; int size; int capacity ; public: Queue(int s ) { data = new T[s]; firstIndex=-1; nextIndex=0; size=0; capacity = s; } int getSize() { return size; ...
ALGO
0.996818
4.453027
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2022-08-07T16:07: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": "5930dab9633a...
78d07a30-5e0b-462f-9e45-1f348feb8921
chriszheng124/haha-gemm
app/src/main/cpp/sgemm-unrolling-kernel-O2.cc
#include "blksize.h" #define SET_ZERO_4X4(_ARRAY)\ do{\ _ARRAY[0] = 0;\ _ARRAY[1] = 0;\ _ARRAY[2] = 0;\ _ARRAY[3] = 0;\ _ARRAY[4] = 0;\ _ARRAY[5] = 0;\ _ARRAY[6] = 0;\ _ARRAY[7] = 0;\ _ARRAY[8] = 0;\ _ARRAY[9] = 0;\ _ARRAY[10] ...
ALGO
0.99275
4.002525
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-01-07T12:15:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "76dfbbc968...
c6c5d1c2-d30d-4ae5-9200-052ad643a5fe
moshangcheng/code
Cpp/oj/topcoder/SRM512-C.cpp
/** * @author moshangcheng * @version 1.0 * @date 2011-7-20 下午01:41:41 * @brief 本题考虑二分图最大匹配算法,但是贪婪算法也可以解决问题 */ #include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include ...
ALGO
0.999876
4.121639
{ "github_metadata": { "branch": "master", "commit_count": 160, "repo_created_at": "2012-01-11T06:15:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ec9feff...
202c7972-5c4d-4288-9b6d-704edfab31b0
WilliamQiufeng/CPPCode
CodeForces/gym/102951B.cpp
/* ID: william234 TASK: StudyingAlgo LANG: C++ */ #define PROGRAM_NAME "StudyingAlgo" #include <fstream> #include <iostream> #include <string> #include <vector> #include <map> #include <algorithm> #define DEBUG 0 #define USE_FILE 0 #define PARALLEL 1 #if PARALLEL #pragma GCC optimize("Ofast") #pragma GCC target("avx,...
ALGO
0.99998
4.272647
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-12-09T02:02: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": "ec5c9c63b30...
7569bb8c-fce7-4788-8192-f9675895488c
organicmaps/organicmaps
indexer/cell_coverer.hpp
#pragma once #include "indexer/cell_id.hpp" #include "geometry/rect2d.hpp" #include "base/buffer_vector.hpp" #include <array> #include <cstdint> #include <queue> #include <utility> #include <vector> // TODO: Move neccessary functions to geometry/covering_utils.hpp and delete this file. constexpr int SPLIT_RECT_CE...
ALGO
0.995943
7.469914
{ "github_metadata": { "branch": "master", "commit_count": 42613, "repo_created_at": "2020-12-27T19:02:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11487, "forks": 1128, "issues": 2796, "pull_requests": 182 }, "file_meta": { "content_i...
327e643a-6901-4aa0-970f-c2ba13705b3d
navjeet-py/Codechef-Problems
cpp/DRAWFIX.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; #define print(x) cout << x << endl #define pb push_back #define vi vector<int> #define mod 1000000007 #define MIN_INT -2137483648 #define index(c) (((int) c) - 97) //#define int long long // TREE OF 11 edges 11 1 2 1 3 1 4 2 5 3 6 6 9 3 7 7 10 7 11 4 8...
ALGO
0.999997
3.598796
{ "github_metadata": { "branch": "main", "commit_count": 16, "repo_created_at": "2022-11-13T17:33: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": "d7d181d85fd...
3b03addb-9c7d-4586-a055-2cfe06913098
Yuulis/AtCoderSolution_old
AtCoder/ABC/161~180/180/D.cpp
#include <bits/stdc++.h> #include <map> #include <unordered_map> #include <unordered_set> #include <atcoder/modint.hpp> using namespace std; using namespace atcoder; using ll = long long; using Graph = vector<vector<int>>; using mint = modint998244353; #define all(x) (x).begin(), (x).end() constexpr double PI = 3.14...
ALGO
0.99846
3.92339
{ "github_metadata": { "branch": "main", "commit_count": 445, "repo_created_at": "2021-08-19T01:43:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5f69a3e90e...
0689fe0d-1885-45e5-a255-d4b7a17bd42c
ISCH02/CS1-Arbitrary
HW1.cpp
#include <iostream> #include <iomanip> using namespace std; int main() { const double PI = 3.14159; double radius = 0.0; double area = 0.0; double length = 0.0; double width = 0.0; double base = 0.0; double height = 0.0; int choice = 0; cout << "Geometry Calculator\n"; cout << "\n"; cout << "1. Calculate the area of a...
TOOL
0.987068
3.750658
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-05-16T16:53: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": "76254642fcb7...
74cee3cf-9d3e-44da-9fa5-5bdc036d7d32
PPSantos/network-epidemics
multi_layer_net.cpp
#include<iostream> #include<sstream> #include<fstream> #include<vector> #include<list> #include<iterator> #include<algorithm> #include<numeric> using namespace std; enum Disease_State { S, // Susceptible. I // Infected. }; enum Awareness_State { A, // Aware. U // Unaware. }; template <typename Iter, typename ...
ALGO
0.987994
4.210394
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2019-11-14T00:12:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "75e424268...
2a940668-c318-41a8-a304-5638de4d70f3
RArora28/CodeForces-Submissions
contests/div2/virtual/305/b.cpp
#include<bits/stdc++.h> #include<limits.h> using namespace std; #define mod 1000000007 #define si(x) scanf("%d", &x) #define sll(x) scanf("%lld", &x) #define pi(x) printf("%d\n", x) #define pll(x) printf("%lld\n", x) #define ii pair<int, int> #define vi vector<int> #define vii vector<pair<int, int> > #define adjList v...
ALGO
0.999977
4.368745
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-03-06T21:07: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": "47487afd71...
bddf2d94-b8cb-4f1f-a93b-aeca9872e296
gustavo-candido/ONLINE-JUDGE
URI/1032.cpp
#include <stdio.h> #include <math.h> int prim[10000] = {0}; void calcula_prim (int x) { int i=1, j=3, cont; prim[0] = 2; while(i!= x) { if(j%2 != 0) { cont=0; for (int c=1; c <= sqrt(j); c++) { if(j%c == 0) { cont++; if...
ALGO
0.999983
3.589653
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-07-22T21:54:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8c385ce744...
73c86db2-495a-4312-8fcf-f25d8c14e518
TatyanaV/Introduction-to-C-part-1
week 4/week 4 turn in/probelm5finalfinal.cpp
#include<iostream> //Macro that includes library #include<cstdlib> // includes library with random numbers function #include <ctime> // include library to control time //#include <dos.h> //#include <stdio.h> //#include <conio.h> using namespace std;//Global statement //function declaration to desplay 4 winners out of...
ALGO
0.99301
3.555132
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-07-22T05:04:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1afe0f20a3...
49a05186-288f-43fd-ade0-3d369644228d
22sujata8d/DS
Tries/Trie.cpp
#include <iostream> #include <bits/stdc++.h> using namespace std; // Nodes for the trie struct TrieNode { // Count to keep track how many strings are // ending at the current node in the trie. int count_at_temination; // A Trie node should have 26 other nodes // as it is for the 26 smallcase let...
ALGO
0.9986
4.646823
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2019-08-18T13:51:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3acb5c19e...
766ffb88-50ef-47b6-83ee-0c5c437337c1
kknaks/study
코딩테스트/2st_week/2_p_14502_dfs.cpp
#include <bits/stdc++.h> using namespace std; int n,m,a[10][10],visited[10][10],ret; int dy[4] = {-1,0,1,0}; int dx[4] = {0,1,0,-1}; vector<pair<int,int>> wall,virus; void dfs(int y, int x){ visited[y][x] = 1; for (int i = 0; i < 4; i++){ int ny = y + dy[i]; int nx = x + dx[i]; if (nx ...
ALGO
0.99944
3.943031
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2024-07-17T09:05:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "83b88b1cb99c...
9ba66629-ed24-4ee2-bd81-a1671eec94c9
lballabio/QuantLib
ql/math/randomnumbers/latticersg.hpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2007 <NAME> This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or modif...
ALGO
0.952338
4.265172
{ "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":...
64281f32-aa04-44ab-83b7-127c5d508d32
CuongTDSE172527/TicTacToe
main.cpp
#include <stdio.h> #include <stdlib.h> #include <string.h> #define BOARD_SIZE 3 #define MAX_NAME_LENGTH 50 // Function prototypes void initializeBoard(char board[][BOARD_SIZE]); void displayBoard(char board[][BOARD_SIZE]); int isMoveValid(char board[][BOARD_SIZE], int row, int col); int checkForWinner(char board[][BO...
ALGO
0.998796
6.579143
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-04-03T13:52:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b7df3a2d1...
b2587164-3a6a-4c24-a0f8-9d65d92942c4
injoon149/codetree-TILs
240802/순위 경쟁2/ranking-competition2.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; int main() { // 여기에 코드를 작성해주세요. int n; cin >> n; if(n == 1){ cout << 0; return 0; } int s; string c; string stage="AB"; int ascore = 0, bscore = 0; int change = 0; for(int i = 0; ...
ALGO
0.99989
3.533948
{ "github_metadata": { "branch": "main", "commit_count": 1143, "repo_created_at": "2024-03-29T14:19: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": "08d339933...
7dfc9967-97c6-42e2-afac-19ff11fe5556
Mahmoud-Ayman-Saleh/Homeworks
UVA10617.cpp
#include <iostream> #include <vector> #include <cstring> using namespace std; typedef long long ll; const int MAX = 100 + 1; ll memory[MAX][MAX]; string str; ll dp(int start, int end) { if (start > end) { return 0; // Base case: empty substring } if (start == end) { return 1...
ALGO
0.99998
5.796052
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-01-05T16:53:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3744bb85d52...
cb3f5574-7794-4e1e-a8b9-22834a8c3729
cran/raster
src/RcppExports.cpp
// Generated by using Rcpp::compileAttributes() -> do not edit by hand // Generator token: <PASSWORD> #include <Rcpp.h> using namespace Rcpp; // doBilinear NumericVector doBilinear(NumericMatrix xy, NumericMatrix x, NumericMatrix y, NumericMatrix v); RcppExport SEXP _raster_doBilinear(SEXP xySEXP, SEXP xSEXP, SEXP y...
TOOL
0.963982
6.101531
{ "github_metadata": { "branch": "master", "commit_count": 118, "repo_created_at": "2014-03-13T06:02:19.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25, "forks": 25, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66e68f2...
aa0cc723-407f-4f2a-8126-6bfaee4282df
fabwu/eth-asl-hw
src/hw3/wht/wht.cpp
#include "common.h" #include <immintrin.h> #include <iostream> using namespace std; #define NR 8 // Size of one column vector of A and C #define MR 75 // Number of column vectors to apply WHT /* Matrix A and C are stored in colum-major order. Thus, the first column of A has the elements A[0]..A[7]. Further, ...
ALGO
0.999805
4.495658
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-03-05T11:58: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": "350c70002...
a79a0263-ba59-4fe4-8c6f-60f91baa8509
hundt98847/multi-language-bench
src/havlak/cpp/mao-loops.h
// Copyright 2011 Google Inc. // // 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 law or agreed to in ...
TOOL
0.935337
7.227073
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2015-03-16T22:50:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 84, "forks": 26, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "90a6c53...
c72923df-64a8-4c19-a229-e784c730a418
davidsansome/evolving-tetris
cw3/individual.h
#ifndef INDIVIDUAL_H #define INDIVIDUAL_H #include <tr1/array> #include <limits> #include <algorithm> #include <cstdlib> #include <boost/bind.hpp> #include <boost/random/normal_distribution.hpp> #include <google/gflags.h> #include "tetrisboard.h" #include "individualbase.h" #include "messages.pb.h" class Tetramino...
ALGO
0.981321
6.357781
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2012-05-18T12:36:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00c22f0cd...
8713dc70-83c6-4b6b-aec4-461c0b6519fb
Suvan77blr/Arrays-DSA-GHed
Binary_Search/P03-UB.cpp
// 120124 // <NAME> : UpperBound #include <iostream> #include <vector> using namespace std; class Solution { private: int n; vector<int> arr; void getN(); void getVector(); public: Solution(); Solution(vector<int>& arr, int n); void displayVector(); int getUpperBound(int x); }; void Solution ::...
ALGO
0.99989
4.923936
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2024-11-04T19:49: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": "25246208290...
57b19120-813b-4bbf-b272-a57be05d5ab4
harkerhand/OpenJudge
leetcode/67/67.cpp
#include <iostream> #include <string> #include <algorithm> using namespace std; class Solution { public: string addBinary(string a, string b) { bool up = 0; string newStr = ""; int len_A = a.length(), len_B = b.length(); for (int i = 1; i <= len_A || i <= len_B; ++i) { ...
ALGO
0.999995
5.74901
{ "github_metadata": { "branch": "master", "commit_count": 74, "repo_created_at": "2021-04-11T04:04:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19a77ebe7...
3ef5468b-db56-419c-aa2a-b50e01c449e5
raincross7/code-similarity
codes/train_code/problem040/problem040_482.cpp
// //AtCoder Beginner Contest 132 //C - Divide the Problems // #include <iostream> #include <algorithm> #include <vector> #include <iomanip> #include <cmath> #include <ctime> #include <queue> #include <map> #include <set> #include <tuple> #include <functional> #include <cassert> using namespace std; #define REP(i,n)...
ALGO
0.999945
4.559182
{ "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": "51e9e62dd6a7...
9642737b-dfb4-4018-bed9-2ec1f9e5e6fe
EiJee/msk11_23_ParProg_Matveev
CODE2/6lab.cpp
#include <iostream> #include <vector> #include <omp.h> void Vectors(std::vector<int>& result, const std::vector<int>& a, const std::vector<int>& b) { #pragma omp parallel for for (size_t i = 0; i < result.size(); ++i) result[i] = a[i] + b[i]; } int main() { const int size = 5; std::vector<int>...
ALGO
0.999935
4.984964
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-09-06T16:47: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": "981212595e65...
51766ec1-444e-439e-a02b-bdec3cf9dede
liuyubobobo/Play-Leetcode
1501-2000/1855-Maximum-Distance-Between-a-Pair-of-Values/cpp-1855/main3.cpp
/// Source : https://leetcode.com/problems/maximum-distance-between-a-pair-of-values/ /// Author : liuyubobobo /// Time : 2021-05-19 #include <iostream> #include <vector> using namespace std; /// Two Pointers /// Time Complexity: O(n) /// Space Complexity: O(1) class Solution { public: int maxDistance(vector<...
ALGO
0.999831
6.145281
{ "github_metadata": { "branch": "master", "commit_count": 2592, "repo_created_at": "2016-12-01T17:08:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2732, "forks": 718, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "8e...
70c0ae41-306f-4146-9dc2-7c0712410c97
PollobRay/DUET
Undergraduate (B.Sc. Engg.)/2. Second Year/2. Second Sem/Data Structure/Linked List/Assignment/Assignement B2 improve.cpp
// // Created by Ray on 2/1/2022. // /* #include <iostream> using namespace std; class Player { public: int score; string name; Player *prev; Player *next; Player() { prev=NULL; next=NULL; } }; class TurnamentRecord { private: Player *list; public: TurnamentRecord()...
ALGO
0.979274
3.784825
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-07-02T15:49: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": "012369757ed1...
adb65688-0b25-4065-844f-a8881a444508
jiahao1001/OJ_Guide
有OJ/刷题指南(包含leetcode, POJ, PAT等)/PAT/PAT甲级(Advanced Level)/1129. Recommendation System (25) .cpp
1129. Recommendation System (25) Recommendation system predicts the preference that a user would give to an item. Now you are asked to program a very simple recommendation system that rates the user’s preference by the number of times that an item has been accessed by this user. Input Specification: Each input file c...
ALGO
0.999971
4.820581
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2017-12-25T06:24:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 82, "forks": 29, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "109f871...
2a995f47-f16f-467e-8651-0ea39f1540f4
Next-Gen-UI/Code-Dynamics
Leetcode/0068. Text Justification/0068.cpp
class Solution { public: vector<string> fullJustify(vector<string>& words, size_t maxWidth) { vector<string> ans; vector<string> row; size_t rowLetters = 0; for (const string& word : words) { // if we put the word in this row, it'll exceed the maxWidth, // so we cannot put the word to th...
ALGO
0.999908
6.856487
{ "github_metadata": { "branch": "main", "commit_count": 99, "repo_created_at": "2022-01-06T07:57:09.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 44, "forks": 35, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "450ed4aba4...
51209a6a-6fb8-48c8-a549-71ccaf69521b
2011211242/cplusplus
inorder_traversal/main.cpp
/**************************************** * File Name: main.cpp * Created Time: 2017-08-28 00:08:53 * Author: yanxianlong * Mail: <EMAIL> * Github: https://github.com/2011211242 ****************************************/ #include <cstdio> #include <stack> using namespace std...
ALGO
0.999991
4.937523
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2017-08-13T01:49: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": "14532fc00...
28d31c3d-93c8-440b-8334-324486209746
BitSeq/BitSeq
GibbsSampler.cpp
#ifdef DoSTATS #include<sys/time.h> #endif #include "GibbsSampler.h" #include "common.h" GibbsSampler::GibbsSampler(){ //{{{ thetaAct=0; }//}}} void GibbsSampler::sampleZ(){//{{{ // TimeStats {{{ #ifdef DoSTATS nZ++; struct timeval start, end; gettimeofday(&start, NULL); #endif // }}} long i,j,k;...
ALGO
0.986785
4.782798
{ "github_metadata": { "branch": "master", "commit_count": 243, "repo_created_at": "2014-01-13T12:30:12.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 16, "forks": 8, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": "e75d71ea...
43a0a6ce-a7cc-411d-9690-16ac53b38917
leksasza/yamp_laba
Project1/Project1/dfa.h
#pragma once #include<iostream> #include<vector> #include<fstream> #include<string> #include "State.h" using namespace std; class dfa { public: vector<State>DFA; int finite_state; public: dfa() { DFA = {}; finite_state = 0; }; dfa(string file_name) { // конструктор по умолчанию считывает дка из файла по назван...
ALGO
0.924851
3.074894
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-05-16T21:26:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7e9eed310f...
c53a062b-5fd3-4e86-8b92-37aefa2b382c
MohamedSamehMohamed/Competitive-Programming
codeforces/Gym/102644E/29674621_AC_46ms_272kB.cpp
// Author: <NAME> #include<bits/stdc++.h> using namespace std; const long long mod = 1LL << 32; struct Matrix { int sz; vector<vector<unsigned long long>> a; Matrix (int sz) { this->sz = sz; a = vector<vector<unsigned long long>>(sz, vector<unsigned long long>(sz)); for (int i = 0; i < sz; i++) for (int ...
ALGO
0.999946
4.070719
{ "github_metadata": { "branch": "main", "commit_count": 87, "repo_created_at": "2021-02-12T14:21:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "206ea8aa8ba...
e83d6c80-f58b-47d8-b144-0a52a39628dc
AliSheikhAttar/Algorithm_Course
Data Structure/week4_binary_search_trees/1_tree_traversals/tree-orders.cpp
#include <iostream> #include <vector> #include <algorithm> #if defined(__unix__) || defined(__APPLE__) #include <sys/resource.h> #endif using std::vector; using std::ios_base; using std::cin; using std::cout; class TreeOrders { int n; vector <int> key; vector <int> left; vector <int> right; public: void re...
ALGO
0.999992
5.066675
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2025-04-19T19:30: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": "6866c910cdd0...
8960fec3-7dfd-4d18-b7bc-220c73107907
HeNeos/A-Competitive-Programming-Guide
Math/mobius.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; #define N 1000000 int mobius[N]; int lpf[N]; void sieve() { for (int i = 2; i < N; i++) { if (!lpf[i]) { lpf[i] = i; for (ll j = 1LL * i * i; j < N; j += i) { if (lpf[j] == 0) lpf[j] = i; } } } } void ...
ALGO
0.999713
3.675621
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2020-05-19T04:22: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": "25bec0c30...
67b9f126-9571-4a16-b381-903abc89b795
xiajianmin/cs418
MP 3/MP 3/MP 3.cpp
// // Example code for OpenGL programming // #include <stdio.h> #include <stdlib.h> //these libraries might be different for your platform //Ex. on mac they should be GLEW/glew.h and GLUT/glut.h #include <GL/glew.h> #include <GL/glut.h> #include <SOIL/SOIL.h> #include <iostream> #include <string> #include <math.h> #i...
TOOL
0.918668
4.062453
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2014-02-12T19:32: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": "9ff1cee7ee...
54b4fd5b-5768-4110-89dd-704050f93f3d
dwsaxton/quad
ssc.cpp
#include "ssc.h" #include <cassert> #include <iostream> using namespace std; #include "qpsolver.h" SSC::SSC() { n = l = 0; } void SSC::checkDimensions() { assert(x0.size() == n); assert(B.rows() == n); assert(B.cols() == l); if (E.rows() != 0) { assert(E.rows() == E0.rows()); assert(E.cols() =...
ALGO
0.961013
4.860186
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2014-06-22T08:37: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": "fd08940a6...
c0b93c7c-2205-42ab-a2ad-ced0875e1ecf
ndeyerl/ParallelComputing
Lab6/omp_bug5.cpp
/* * <NAME> * MATH 6370 Spring 2017 * Failed compilation bug by <NAME> and <NAME>, fixed * by changing how program works to model omp_orphan.cpp by DR. */ #include <omp.h> #include <stdio.h> #include <stdlib.h> #define VECLEN 100 // global variables float a[VECLEN], b[VECLEN], sum; // external function void do...
ALGO
0.978637
4.038908
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2018-04-04T19:15:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "be745a964...
70b5a9b1-767f-48e8-b397-eb43cfbba0ea
exenotmaw/cPlusPlus
Two Sums.cpp
#include <iostream> using namespace std; struct userInput { int numberArray = 0; int arrayList[99] = {}; int sumNumber = 0; int temp = 0; int givenNumber = 0; }; userInput input; int main() { cout << "Insert Number of array: "; cin >> input.numberArray; cin.ignore(); cout << endl; for (int i = 0; i < ...
ALGO
0.999381
4.186731
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-06-02T11: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": "448fd36e3cc5...
0b1a2e2f-b623-4d0e-a69c-f6a8df8943da
talharusman/FALL_2024
DSA/LAB/03/Question01.cpp
#include<iostream> using namespace std; class Node{ private: int value; Node* next; public: Node(int value){ this->value = value; this->next = NULL; } friend class LinkedList; }; class LinkedList{ public: Node* head; LinkedList(){ head = NULL; } ...
ALGO
0.99993
5.43339
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2024-09-01T10:23: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": "06618733aac...
8b5799b4-c93a-4eed-95a5-aed32c4e8249
cms-sw/root
roofit/roofit/src/RooStepFunction.cxx
/***************************************************************************** * Project: RooFit * * Package: RooFitBabar * * @(#)root/roofit:$Id$ * Author: ...
ALGO
0.945572
7.036552
{ "github_metadata": { "branch": "master", "commit_count": 61857, "repo_created_at": "2014-02-14T08:31:51.000Z", "is_fork": true, "is_org_owned": true, "forked_from": "root-project/root", "stars": 4, "forks": 12, "issues": 0, "pull_requests": 0 }, "file_meta": { "conten...
785e2501-a2e5-4772-a7bc-f4356950f40e
rafagorr06/POO-exercises
U3/Unidad 3 Relaciones entre clases/eje3-5.cpp
#include <iostream> #include <cmath> #include <cstdlib> #include <vector> using namespace std; //********************************************** class Monomio{ // coef.x^grado int grado; float coef; public: Monomio(float co, int gr):grado(gr),coef(co){}; void Asignar(float co, int gr){grado= gr; coef=co;} float ...
ALGO
0.98017
3.819309
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-12-10T00:38: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": "be1e70d6a3cd...
c086ef10-0864-4f9d-898d-152a056a7126
MatthewZGong/CFTrainingArc
USACO/Dec23/test.cpp
#include<bits/stdc++.h> // g++-12 -o main [file].cpp; //./main < input.txt > output.txt using namespace std; #pragma region #define ll long long template<typename T> void print(T v[], int n){ for(int i =0 ; i < n; ++i){ cout << v[i] << " "; } cout << endl; } void print1(int v[], int n){ for(in...
ALGO
0.997069
3.215897
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-06-03T22:59: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": "de7644ee7fa4...
037f4118-0c79-4005-bc25-b2b7b32c389c
Fibonacci1664/CMP_202_Assignment
CMP_202_Assignment/src/Mandlebrot.cpp
#include "Mandlebrot.h" #include "ComplexNum.h" #include "Filter.h" ///////////////////////////////////////////////////////////////////////////////////////////// #include <amp.h> #include <chrono> #include <iostream> #include <fstream> /////////////////////////////////////////////////////////////////////////////////...
TOOL
0.917292
5.456671
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2021-04-19T13:21:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a44d4dcaa...
3dafe17d-a1b3-4a24-a355-53097c4f016a
Gaaaamma/LeetCode
CPP/medium/pb0230.cpp
#include <iostream> #include <vector> #include <queue> #include <unordered_set> using namespace std; /* #230 Kth Smallest Element in BST Attempt 1: Inorder traversal Q: Given the root of a binary search tree, and an integer k, return the kth smallest value (1-indexed) of all the values of the nodes in the tree. ...
ALGO
0.999996
6.796079
{ "github_metadata": { "branch": "main", "commit_count": 244, "repo_created_at": "2023-01-21T15:56: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": "38a27c6bee...
643783f6-e158-444f-892b-bb43a82c24ef
WanliYoung/MyCSPCode
2006-4-1246(暴力32分).cpp
#include<iostream> #include<math.h> #include<cstring> using namespace std; int count(string S, string s) { //s在S当中出现了几次 int ans = 0; int len = s.size(); if (len == 1) { for (int i = 0; i < S.size(); i++) { if (S[i] == s[0]) { ans++; ...
ALGO
0.999959
4.466999
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2023-01-24T04:33:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad8bf192c07...
fbfcd6ba-c3a9-40d6-8f49-6cbf9d29016d
danielpraciano/Tennis_Court_CG
Scenario_CG/render/source/raycasting/ray_casting.cpp
#include <render/include/raycasting/ray_casting.h> namespace render { namespace raycasting { void RayCasting::render(const Camera &camera, scenario::Scenario scenario, ProjectionType proj, double oblique_angle, double oblique_factor) { camera.to_camera(scenario); scenario.make(); ...
ALGO
0.985457
6.519729
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2017-11-22T01:43: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": "28b71b2a9...
a40e1566-c0c4-4ce6-96e9-967e2270d0eb
SpyzzVVarun/DSA-Lab-Assignments
heap_hash/heap.cpp
#include <iostream> #include <bits/stdc++.h> #include<chrono> typedef long long ll; #define PB push_back using namespace std; using namespace std::chrono; void compare(); // Min Heap class Heap { private: vector<ll> heap; // Get left child of a node if it exists ll left(ll parent) ...
ALGO
0.983868
4.341517
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2022-12-03T12:00: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": "37b640fdbf5...
cf037b2a-49f0-4631-8541-5f8870fb4be8
sureyeaah/Competitive
uva/CH02/978.cpp
#include <iostream> #include <set> #define FOR0(i,n) for (int i = 0; i < n; i++) #define FOR(i,j, n) for (int i = j; i < n; i++) #define MAX(a,b) ((a > b) ?(a) :(b)) #define MIN(a,b) ((a < b) ?(a) :(b)) #define ABS(a) ((a < 0) ? ((-1)*(a)) : (a)) // int geti() {char c;int ret = 0;bool start = false;while(true) {c = get...
ALGO
0.999161
3.569783
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2017-11-01T21:03:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a6a7ecce...
5487a2d9-3a64-4421-afa5-d979d193fa3b
MicheleMiccinesi/Competitive-Programming
more/Fishes.cpp
/* Fishes */ /* Problem Source: codeforces 912D */ /* Solution License: contact <NAME> */ #ifndef NDEBUG #define NDEBUG #endif #include <iostream> #include <vector> #include <iomanip> #include <cassert> std::vector<int> fill_occurrences(const int& r, const int& l){ std::vector<int> O; O.reserve(r); int i=0; while...
ALGO
0.999803
3.063524
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2017-09-21T11:09: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": "84d003ac...
d226ceb7-de78-4218-b717-7b5204cba8db
GIJoes/leetcodeExercise
Sample-Test1/pch.cpp
// // pch.cpp // #include "pch.h" #include<stack> ListNode* ReverseList(ListNode* head) { if(head==nullptr) return nullptr; std::stack<ListNode*>stackList; ListNode* plist = head; while (plist) { stackList.push(plist); plist = plist->next; } plist = nullptr; ListNode* pHead = nullptr; while (!stackList....
ALGO
0.999012
3.833537
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2025-05-13T13:25: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": "3ce708d244...
d2f9bd63-19c8-4190-bd32-dd2a8bdaebd7
50mengzhu/IntroductionToAlgorithmCode
DataStructures/LinkList/LinkList.hpp
#include <iostream> #include "LinkList.h" Node::Node() { next = nullptr; } Node::Node(int val) { data = val; next = nullptr; } Node::Node(Node* T) { data = T -> data; next = T -> next; } Node::~Node() { delete next; } LinkList::LinkList() { head = nullptr; } LinkList::~LinkList() { ...
ALGO
0.999356
4.249934
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-02-17T15:03: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": "ea3530ab5...
d3b8708a-dbd5-42da-9350-075e61e669f9
Ruaytoo/PD_project
headers/strategy.h
#pragma once #include <string> #include <map> #include <vector> #include <iostream> ///агент, для которого хранится история и стратегия class Agent; ///виртуальный класс стратегии, от которого наследуются отдельные конкретные ///алгоритмы выбора хода class Strategy { public: ///функция, делающая выбор, какой ход п...
ALGO
0.981191
4.049766
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2022-04-03T19:12: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": "74fec2f8b...
3b7e6bd7-0c9c-4bdc-be8f-5acd87bdeb91
diesuki4/Algorithm_Learn
프로그래머스/Level 2/연속된 부분 수열의 합/main3.cpp
#include <iostream> #include <vector> #include <map> #include <set> using namespace std; void print(vector<int> result); vector<int> solution(vector<int> sequence, int k); int main(int argc, char* argv[]) { print(solution({1, 2, 3, 4, 5}, 7)); print(solution({1, 1, 1, 2, 3, 4, 5}, 5)); print(solution({2,...
ALGO
0.999963
5.030988
{ "github_metadata": { "branch": "main", "commit_count": 458, "repo_created_at": "2022-07-11T22:39:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f746c68947...
2e178913-9259-4367-8d37-fa8ea2308c5d
Camithilwen/Code-Cloning-Analysis
src/llm-scripts/testing/Project_CodeNet_experimentation_dataset/data/p02386/s555896724.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; class Dice{ public: long top, front, right, left, back, bottom; Dice(long top, long front, long right, long left, long back, long bottom); void north(); void south(); void west(); void east(); void rightTurn(); void ChangeTop(long ...
ALGO
0.999907
3.649558
{ "github_metadata": { "branch": "main", "commit_count": 243, "repo_created_at": "2025-06-06T16:57:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "e56cdd9903...
fafb01c4-c928-4fc5-8aef-a42d7085a1e3
Biank23/Competitive-Programming
OI/OIA/2024/Certamen de Selección/Día 2/saltarines (v2, idea de charles).cpp
#include <bits/stdc++.h> using namespace std; #define sz(x) int(x.size()) #define all(x) begin(x), end(x) using ll = long long; const ll INF = 1e18; inline void chmax(ll &x, ll v) { if (v > x) x = v; } ll saltarines(int K, vector<int> &elegancias, vector<int> &ubicaciones) { int n = sz(elegancias), c = sz...
ALGO
0.999824
4.673275
{ "github_metadata": { "branch": "main", "commit_count": 227, "repo_created_at": "2024-02-23T02:53: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": "965d0d11da...
1113ac74-8908-43ed-8f9f-3b1688de35c0
xxcxu/CodeSpace
Luogu/P5410.cpp
#include <bits/stdc++.h> #include <algorithm> using ll = long long; static constexpr int N = 2e7 + 5; int n, m; ll ans; char str[N], substr[N]; class Exkmp { private: int n; private: char str[N]; public: int z[N], p[N]; public: auto InitZ(char *s, int n) -> void { this -> n = n; z[1] = n; ...
ALGO
0.999978
4.254272
{ "github_metadata": { "branch": "master", "commit_count": 44, "repo_created_at": "2022-09-13T13:31: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": "b83679a20...
5b33aba0-148e-444b-b097-217ce0ea9799
bibledit/android
gradle/app/src/main/cpp/filter/diff.h
/* Copyright (©) 2003-2025 <NAME>. 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 3 of the License, or (at your option) any later version. This program is distributed in the ...
TOOL
0.904401
6.093154
{ "github_metadata": { "branch": "master", "commit_count": 312, "repo_created_at": "2016-02-01T18:08:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "055db91de...
59d3df21-c1f2-45ae-aad6-be5e830d9342
SumanSudhir/HackerRank-DataStructures
006.ArrayManipulation/main.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int n; int m; int a,b; long int k; cin >> n >> m; vector<vector<long int>> abk(m); for(int i = 0; i < m; i++){ abk[i].resize(3); //create 3 column in each row for(int j = 0; j < 3; j++){ cin >> abk[i][j]...
ALGO
0.999973
3.666023
{ "github_metadata": { "branch": "master", "commit_count": 53, "repo_created_at": "2019-12-02T12:17: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": "55a287471...
950b2e74-93b5-4f59-85b8-cb019ad56ff7
chenluyao/myLeetcodeSolution
leetcodes/Binary Tree Preorder Traversal.cpp
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ class Solution { public: vector<int> preorderTraversal(TreeNode *root) { // IMPORTANT: Please reset any memb...
ALGO
0.999996
5.804649
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-09-26T07:34: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": "d4d72e497a...
d256f417-8967-4f1d-9c94-4ca469b0b541
bitnbyte101/450DSA
A. Array/22. Find factorial of large number/Solution.cpp
/*-------- Bit-N-Byte ----------*/ #include<bits/stdc++.h> using namespace std; vector<int> factorial(int N){ vector<int>fact; fact.push_back(1); for(int i=2;i<=N;i++){ int carry = 0; for(int j=0;j<fact.size();j++){ ...
ALGO
0.999949
5.018277
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2023-07-30T08:03: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": "18e098ac7a9...
9fd5cbff-7c70-4756-9884-735eb8fcc26b
ishandutta2007/codeforces-b
brunovsky/normal/1646/C.cpp
#include <bits/stdc++.h> #ifdef LOCAL #include "code/formatting.hpp" #else #define debug(...) (void)0 #endif using namespace std; template <typename Fun> class y_combinator_result { Fun fun_; public: template <typename T> explicit y_combinator_result(T&& fun) : fun_(std::forward<T>(fun)) {} templa...
ALGO
0.999727
5.176031
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8291449037ed...
ac1992f7-6914-477a-a0a5-77621e7dcf3a
kyleyee23/CIPs
CIP_lensing.cpp
#include <vector> #include <string> #include <fstream> #include <sstream> #include <iostream> #include <stdlib.h> #include "globaldata.h" #include "wignerSymbols.h" using namespace std; #define pi 3.14159265358979323846 /* pi */ #define ellmax 2000 #define TT 1 #define gamma 1 namespace GlobalData { ...
ALGO
0.988864
3.482077
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2016-11-03T18:58:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9ff1c624...
9dc12f18-9bdf-4b4d-9f19-2976674eee7a
sl1296/acm-code
poj-2375-12 RuntimeError.cpp
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; int mapp[1010][1010]; int addx[6]={0,0,1,-1}; int addy[6]={1,-1,0,0}; int point[510][510]; struct ee{ int next,to; }; ee edge[1000010]; int head[1000010],ec; int dfn[1000010],low[1000010]; int stak[1000010],sp; bool instak[1000010]; int id...
ALGO
0.999865
3.343961
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-10-20T16:02: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": "47fcde526a...
060549b0-ec75-45c9-80ce-49081af56811
Cupcc/algorithm-training
day25/17. Letter Combinations of a Phone Number.cpp
/** * @Date: 2023 Dec 19 * @Time: 11:03 * @Author: Chris * @Title: 17. Letter Combinations of a Phone Number * @Link: *https://leetcode.cn/problems/letter-combinations-of-a-phone-number/description/ **/ #include <iostream> #include <string> #include <vector> using namespace std; const string letterMap[10] = {"",...
ALGO
0.999818
6.592195
{ "github_metadata": { "branch": "main", "commit_count": 97, "repo_created_at": "2023-11-11T17:30: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": "60b913fe759...
abbc5e6c-8a08-4a7c-b8b2-abb851245d97
KarimAboshamia/CodeForces-Problems
Officer Anany Collecting String Subsequences/main.cpp
#include <iostream> using namespace std; int main() { int k; cin>>k; int arrRes[k]; for(int i = 0;i<k;i++) { int m; cin>>m; int first,endEl; int A = 0; int B = 0; int counter = 0; for(int j= 0; j<m;j++) { char temp; ...
ALGO
0.999565
3.221946
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-03-09T05:06: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": "c48e774f0d...
ff69fb5c-b724-408b-97a9-0a7cd44da61d
freitagfelipe/neps-academy
cpp/0043.cpp
#include <bits/stdc++.h> using namespace std; #define MAXN int(1e5) + 10 int n; int BIT[MAXN]; int v[MAXN]; void update(int idx, int k) { int delta {k - v[idx]}; v[idx] = k; for (; idx <= n; idx += idx & -idx) { BIT[idx] += delta; } } int query(int idx) { int ans {}; for (; idx >...
ALGO
0.999816
5.476928
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2021-04-26T00:22: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": "a5e61288de9...