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
5dca8768-89a5-496e-a8e1-ff563811f48b
z-x-z/leetcode
tags/grapherTheory/p126.cpp
/// author: CagedBird /// date: 2020/04/27 /// place: JiangXi /// description: A code template of leetcode's list graph theory solution #include<bits/stdc++.h> using namespace std; #define INFINITE INT_MAX class Solution { public: vector<vector<string> > bfsHelper(const vector<vector<int> >& pvs, const vector<str...
ALGO
0.99999
5.229278
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-02-27T07:22: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": "3105d7ea94...
3a4cd912-80ed-4025-83a7-b5cac39bd537
gbakkk5951/OI
__history/18.3/计算几何/3533/zhy.cpp
using namespace std; int main() {} #include <cstdio> #include <cctype> #include <cstring> #include <algorithm> #include <cstdlib> #include <cmath> #include <vector> namespace OI { typedef long long lld; typedef double lf; const lf EPS = 1e-6; const int INF = 0x3f3f3f3f; const lld LINF = (lld)INF << 31 | INF; bool eq(lf...
ALGO
0.999643
4.063938
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2017-12-27T10:35:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4acc8b72...
e5ac7fac-f6df-441b-a92e-f88c6f412eba
tiankonguse/ACM
contest/poj/vol_16/2564.cc
#include"iostream" #include"cstdlib" #define max(a,b) (a>b?a:b) #define MAX_SIZE 25001 #define WORD_SIZE 26 #define WORD_LEN 17 using namespace std; int dp[MAX_SIZE]; int idx,cnt; struct Trie_Node{ int num; Trie_Node *next[WORD_SIZE]; void init(); }trie[MAX_SIZE*WORD_LEN],root; void Trie_Node::init(){ n...
ALGO
0.99921
3.272384
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2013-03-25T04:04:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 69, "forks": 40, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2251ab...
c3227a11-201f-4ce6-b099-a0ce3cb0edba
Bug88/decoration_remove
src_c++/color_correlogram.cpp
// // color_correlogram.cpp // pairwise_matching_opencv3 // // Created by liuzhen-mac on 2017/9/12. // Copyright © 2017年 willard. All rights reserved. // #include <stdio.h> #include <opencv/cv.h> #include <opencv/highgui.h> #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <op...
ALGO
0.986811
4.345171
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-09-06T10:13:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "21b2a9f862...
4afb040c-c17a-4dfd-b413-8e9d8b0b9d20
Dsiddhart/cp-800-
ques5.cpp
#include <bits/stdc++.h> using namespace std; int main(){ int t; cin>>t; while(t--){ int n; cin>>n; vector<int>v; for(int i=0; i<n;i++){ int x; cin>> x; v.push_back(x); } for(int j=1;j...
ALGO
0.999901
4.344
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2024-03-03T16:32:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd73ec7cc0...
5725f453-7d82-45cc-93a7-e44a4cb871ab
CLDP/ACM-ICPC
Regional-2013/Europe-Northwestern-Subregional-GCPC/C.cpp
#include <cstdio> #include <vector> #include <cstring> #include <string> #include <cmath> #include <iostream> #include <algorithm> using namespace std; const int MAXN = 1001; const int INF = 1000000000; const double PI = 3.14159265358979323846; int main() { int i, j, a, b, c, d, n; cin >> n; while ...
ALGO
0.998409
3.486893
{ "github_metadata": { "branch": "master", "commit_count": 486, "repo_created_at": "2013-09-24T19:04:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "17bb55f4...
390b24e4-ffde-4af1-bf46-b14b74d07c36
Iliaromanov/Algos-and-DataStructs-Practice
NeetCode_Roadmap/surrounded_regions.cpp
class Solution { public: void mark_uncapturable(vector<vector<char>>& board, int r, int c) { board[r][c] = 'Z'; for (auto [i, j] : {pair(0, 1), pair(1, 0), pair(0, -1), pair(-1, 0)}) { int new_r = r + i; int new_c = c + j; if (0 <= new_r && new_r < boa...
ALGO
0.999308
5.806754
{ "github_metadata": { "branch": "main", "commit_count": 420, "repo_created_at": "2021-08-11T21:58:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8b5c956724...
4c0c8344-ce5a-4a62-9bb3-5859401b724b
ovad4221/sla_equations
src/methods/chebyshev.cpp
#include "../headers_of_meth/chebyshev.hpp" #include <cmath> // tested std::vector<unsigned> search_transposition(unsigned n) { std::vector<unsigned> transp(n, n); unsigned r_0 = static_cast<unsigned>(std::log2(n)); transp[0] = 0; transp[static_cast<int>(n / 2)] = 1; for (unsigned r = 1; r < r_0; +...
ALGO
0.99984
4.256078
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2024-02-07T14:47:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "99bbed325...
3a860870-0c4c-405a-8ea8-0d077db8e4aa
tripathiaishwarya/itpp_repo
itpp_hamm_encode/itpp_hamm_encode.cpp
/*---------------------------------------------------------------------------------------------------------------- Code for Hamming Code Encoding Author: <NAME> May 28,2015 ----------------------------------------------------------------------------------------------------------------*/ /*I/O format of the code for ...
ALGO
0.995014
5.739902
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2015-06-21T15:24:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d6b9d6b67f...
3a5f9f1b-1f2b-4a66-9584-e3dbfe2f80d2
krishnavamsi1045/DSACplusplus
trees/Paths.cpp
#include <iostream> using namespace std; #include <queue> #include <vector> class node { public: int data; node *left; node *right; node(int data) { this->data = data; this->left = NULL; this->right = NULL; } }; node * CreateTree(){ cout<<"enter the data:"<<" "; int data ; cin>>data; if(data == ...
ALGO
0.99988
4.447755
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-06-09T22: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": "4cc85fd456...
e827706c-16b2-43f8-990f-8b647f0460c4
liuyubobobo/Play-Leetcode
0001-0500/0250-Count-Univalue-Subtrees/cpp-0250/main2.cpp
/// Source : https://leetcode.com/problems/count-univalue-subtrees/description/ /// Author : liuyubobobo /// Time : 2018-06-02 #include <iostream> using namespace std; /// Definition for a binary tree node. struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode(int x) : val(x), left(...
ALGO
0.999561
6.34812
{ "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": "00...
791f6c22-85ed-4dc0-ba8c-08249996d7e7
duchenlong/Cpp
零钱兑换.cpp
//给定不同面额的硬币 coins 和一个总金额 amount。编写一个函数来计算可以凑成总金额所需的最少的硬币个数。如果没有任何一种硬币组合能组成总金额,返回?-1。 //? //示例?1: //输入: coins = [1, 2, 5], amount = 11 //输出: 3 //解释: 11 = 5 + 5 + 1 //示例 2: //输入: coins = [2], amount = 3 //输出: -1 //? //说明: //你可以认为每种硬币的数量是无限的。 class Solution { public: int coinChange1(vector<int>& coins, int am...
ALGO
0.999986
5.142715
{ "github_metadata": { "branch": "master", "commit_count": 1006, "repo_created_at": "2020-03-01T15:16:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 18, "forks": 25, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "4668b...
1cf9a9ea-4345-4674-8b53-c6b16e9aa889
snigdhab7/Prims-Kruskals
Kruskals.cpp
#include <algorithm> #include <iostream> using namespace std; const int MAX = 5+ 1e4; pair <long long, pair<int, int> > pairs[MAX]; int n, e, g[MAX]; int root(int d) { while(d != g[d]) { g[d] = g[g[d]]; d = g[d]; } return d; } void merg...
ALGO
0.999987
4.240338
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2022-05-14T19:21: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": "7be22e9dfee4...
c232c9a1-1b3f-42af-8909-3748765e6785
schnedann/linebuffer
src/the_framework/math/control_pid.h
#ifndef CONTROL_PID_H #define CONTROL_PID_H /******************** * Includes * ********************/ //System Includes //Project Includes #include "dtypes.h" //Module Includes #include "iterators.h" #include "ovf_save.h" /******************** * Defines * ********************/ /**************...
ALGO
0.964521
5.23986
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2020-03-07T01:30: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": "ba598dfb5...
1bd27440-1ca3-46ac-b8af-65d037543fee
MustAndy/LeetCodePratice
baimian/110.balanced-binary-tree.cpp
/* * @lc app=leetcode id=110 lang=cpp * * [110] Balanced Binary Tree */ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ // struct TreeNode // { // int val; // T...
ALGO
0.999915
6.513557
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2018-09-06T07:41: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": "dc1b09b97...
da796c28-f157-41dc-88e4-4c90ffe730e1
ishandutta2007/codeforces-f
fallac/normal/1660/F2.cpp
/* */ #include <bits/stdc++.h> #include <cassert> #pragma GCC optimize("O3") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #pragma GCC target("avx,avx2,fma") using namespace std; typedef long long ll; typedef pair<ll, ll> pll; typedef pair<int, int> pii; #define omode T=1 #define tmode cin>>T ...
ALGO
0.999994
4.124676
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43: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": "bbfced7029d9...
8bd98bb7-1f42-4bf8-a74d-860414bb3c3e
blakebachellor/leetcode
robotboundedincircle.cpp
#include <iostream> #include <string> using namespace std; class Solution { private: static void moveRobot(int* x, int* y, int bear) { switch (bear) { case 0: //North case -360: *y += 1; break; case 90: //West case -270: ...
ALGO
0.999907
5.247547
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2023-07-05T02:09: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": "ce41a67d491...
1d5ba545-2e68-4ce1-930f-baf50512165f
ICraZZyBoY/Algorithms-Trainings
UNIVERSITY (ICPC, codeforces, contests, etc.)/2022.05.04/z1_v10/B/main.cpp
#include <iostream> #include <vector> #include <cmath> using namespace std; double a = 0.6, b = 1.4, c = 0.5, d = 2, e = 2.5; double f(double x) { return sin(c * x + d) / (e + cos(a * x * x + b)); } int main() { int n = 10; double exp = 0.001; double ans1 = 0; double ans2 = 0; while(exp > abs...
ALGO
0.999717
3.959563
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-01-13T11:40:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1526dfa7d301...
0bf0f8fc-1f3e-4489-9641-b7bb6f0142d2
PYPARA/Algorithms
RandomizedQuickSort.cpp
#include<iostream> int partition(int *a, int lhs, int rhs); int RandomizedPartition(int *a, int lhs, int rhs) { int rad = (rand() % (rhs - lhs + 1)) + lhs; int pivot = a[rad]; int temp = a[lhs]; a[lhs] = pivot; a[rad] = temp; return partition(a, lhs, rhs); } void RandomizedQuickSort(int *a, int lhs, int rhs) { ...
ALGO
0.999882
5.111557
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2017-01-24T14:19: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": "9819c2955...
7dd58d1b-ffa7-4409-aad9-f75cff228757
zjupure/LeetCode
36_Valid_Sudoku/36_Valid_Sudoku.cpp
class Solution { public: bool isValidSudoku(vector<vector<char>>& board) { int isValid = true; for(int type = 0; type < 3 && isValid; type++) { for(int id = 0; id < 9 && isValid; id++) { isValid = isValidSudo(board, id, type); } ...
ALGO
0.998673
6.295591
{ "github_metadata": { "branch": "master", "commit_count": 132, "repo_created_at": "2015-06-29T05:59: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": "cccf7cf2...
400a6066-652d-40c9-b3e5-5bf3cd507757
ThePunisher04/DSA-in-Cpp
7 Recursion and Backtracking/LinearSearch.cpp
#include <iostream> using namespace std; int search(int *arr, int size, int index, int &key) { if (size == 0) return -1; if (arr[0] == key) return index; int searchAhead = search(arr + 1, size - 1, index + 1, key); } int main() { int arr[] = {16, 28, 36, 45, 54, 62, 77, 88, 97, 10}; ...
ALGO
0.999783
5.140519
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2023-10-12T15:23:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9b3dd85467...
4446eafc-4d9c-41b5-9192-adf1611aa872
askeySnip/OJ_records
KickStart/2020-C-B.cpp
/* ID: leezhen TASK: practice LANG: C++11 */ #include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <fstream> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; typed...
ALGO
0.999941
3.537883
{ "github_metadata": { "branch": "master", "commit_count": 279, "repo_created_at": "2018-01-18T08:36: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": "6b8e7b64...
bc5db5a6-af7a-4428-83ca-664a997a62f9
Rohit2099/computational-geometry
CGAL/Q4/q4.cpp
#include <iostream> #include <boost/format.hpp> #include <QtGui> #include <CGAL/Qt/GraphicsViewNavigation.h> #include <QLineF> #include <QRectF> #include <QApplication> #include <sstream> #include <cstdlib> #include <QGraphicsScene> #include <cmath> #include <QGraphicsLineItem> #include <QGraphicsTextItem> #include <Q...
ALGO
0.999509
5.236941
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-10-12T08:17: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": "1d772188b9d4...
3a0dabf4-b0d3-4cfe-abdb-844b3b84bed4
AhmedGamal2212/CP-templates
Fenwick Tree.cpp
template<typename T> struct fenwick_tree { int n{}; vector<T> bit; const T DEFAULT = 0; fenwick_tree() = default; void init(int n_) { this->n = n_; bit.assign(n_ + 1, DEFAULT); } explicit fenwick_tree(int n) { init(n); } explicit fenwick_tree(vector<T> &v)...
ALGO
0.99977
6.554101
{ "github_metadata": { "branch": "master", "commit_count": 95, "repo_created_at": "2022-05-07T09:06:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "40a57e115...
4e5e9a80-4043-41e1-93e8-1c4ad101ac8c
Noscka/Credit-Card-validation-Program-A-Level-
CreditCardTing/CreditCardTing.cpp
#include <iostream> #include <string> /// <summary> /// https://stackoverflow.com/questions/4654636/how-to-determine-if-a-string-is-a-number-with-c /// </summary> /// <param name="s">String to check</param> /// <returns>if string is numbers</returns> bool is_number(const std::string& s) { return !s.empty() && std::fi...
TOOL
0.94861
4.815147
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2022-09-09T09:25: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": "84b626d969...
fd8abb9a-2865-4d4d-a547-ef9602e3e05a
IticAlexGuzman/node
deps/v8/src/compiler/backend/instruction-selector.cc
// Copyright 2014 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "src/compiler/backend/instruction-selector.h" #include <limits> #include <optional> #include "include/v8-internal.h" #include "src/base/itera...
ALGO
0.959324
3.277341
{ "github_metadata": { "branch": "main", "commit_count": 43421, "repo_created_at": "2025-02-05T17:29: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": "4ffa99a2...
79069f4c-5c29-4af2-b8ce-2259940d1b7c
imxinlei/leetcode
412_Fizz_Buzz.cpp
/* * https://leetcode.com/problems/fizz-buzz/#/description * * Write a program that outputs the string representation of numbers from 1 to n. * But for multiples of three it should output “Fizz” instead of the number and * for the multiples of five output “Buzz”. For numbers which are multiples of * both three an...
ALGO
0.999254
6.627343
{ "github_metadata": { "branch": "master", "commit_count": 261, "repo_created_at": "2017-04-04T05:59:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1ca43f5...
afb81ae8-b999-4378-a2d6-6620b575c810
AshfaqueSami2/problem-solving
codechef div 4 rating/Good Kid.cpp
#include <iostream> using namespace std; int main() { int t; cin >> t; while(t--) { int n; cin >> n; int digit[n]; for (int i = 0; i < n; i++) { cin >> digit[i]; } int minvalue = digit[0]; for (int i = 1; i < n; i++) { ...
ALGO
0.999975
4.594053
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-13T11:07: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": "e47bc0315c72...
33c7707b-b76e-4280-89df-8e611c1a7d53
wisdompeak/LeetCode
Others/794.Valid-Tic-Tac-Toe-State/794.Valid-Tic-Tac-Toe-State.cpp
class Solution { public: bool validTicTacToe(vector<string>& board) { int O=0; int X=0; for (int i=0; i<3; i++) for (int j=0; j<3; j++) { if (board[i][j]=='O') O++; else if (board[i][j]=='X') ...
ALGO
0.999903
5.899144
{ "github_metadata": { "branch": "master", "commit_count": 8912, "repo_created_at": "2017-03-01T10:30:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6018, "forks": 1314, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "5...
496bef98-b06e-4d42-96c9-93a7c71dc667
personalrobotics/lemur
pr_bgl/include/pr_bgl/incbi.h
/*! \file incbi.h * \author <NAME> <<EMAIL>> * \copyright 2015 Carnegie Mellon University * \copyright License: BSD * * \brief Incremental bidirectional Dijkstra's search (pr_bgl::incbi). */ namespace pr_bgl { /*! \brief This class implements incremental bidirectional Dijkstra's * search for the singl...
ALGO
0.999995
7.497709
{ "github_metadata": { "branch": "master", "commit_count": 288, "repo_created_at": "2015-03-20T03:48:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c1e852290...
5467ed80-cc45-4183-b431-5a119b58b8c1
Corvey/Exercise
ACM/巩固/图论/网络流.cpp
#include <cstdio> #include <string.h> #include <queue> using namespace std; const int N = 510, M = 2e4+10, INF = 0x3f3f3f3f; inline int small(int a, int b){ return a < b ? a : b; } struct graph { int u[M], v[M], c[M], first[N], Next[M], num; void init(void) { memset(first, -1, sizeof(first)); ...
ALGO
0.999988
4.167676
{ "github_metadata": { "branch": "master", "commit_count": 228, "repo_created_at": "2019-03-01T00:55: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": "943d19b5...
298da628-b6e8-430e-8080-11054f3528c1
lyh543/Some-Codes
ACM/2018-2019-2 UESTC ACM Training/2019 UESTC ACM Training for Dynamic Programming/A/A.cpp
#include<bits/stdc++.h> #define ll long long using namespace std; const int maxn = 17; int x[maxn], y[maxn], dis[maxn][maxn]; ll dp[1 << maxn][maxn] = {0}; //dp[state][t]表示已经遍历完 state 中位为1的城市,正在t城市,还需要的最小花费 int n, s; //直接递归做,最多只有18层,而且能忽略掉从 s 开始时不可能发生的情形 ll bfs(int state, int cur) { if (dp[state][cur] != 0) retu...
ALGO
0.999936
3.262655
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2020-02-08T06:54:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "372a7478c...
2086ce8d-0509-47c4-8511-077d9d177719
Esteban2135/Repositorio
vs1/Simple.cpp
#include <iostream> struct Nodo { int dato; Nodo* siguiente; Nodo(int valor) : dato(valor), siguiente(nullptr) {} }; class ListaEnlazada { private: Nodo* cabeza; public: ListaEnlazada() : cabeza(nullptr) {} void agregar(int valor) { Nodo* nuevoNodo = new Nodo(valor); nuevoNo...
ALGO
0.999555
5.859586
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2023-08-23T02:01:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e08b52fe5e...
dd16ac55-1520-496e-b6d7-63e2a832b978
Karthik-Nayak98/Codeforces
Codeforces Div. 2, A/19-iWannaBeAGuy.cpp
/* CREATED BY * <NAME> * DATE : 06-May-20 */ #include <iostream> #include <vector> #include <algorithm> #include <map> #include <cstring> #include <cstdio> #include <climits> typedef long long int lli; typedef unsigned int ui; typedef unsigned long long ull; #define mod 1e9+7 #define PI 3.14159265359 #define ss se...
ALGO
0.999899
3.195303
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-06-02T07:30:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55fb5edecc...
e8f564a5-c15b-44ae-847c-5009e564e200
NVIDIA/cutlass
include/cutlass/gemm/kernel/gemm_grouped_per_group_scale.h
/*************************************************************************************************** * Copyright (c) 2024 - 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. * SPDX-License-Identifier: BSD-3-Clause * * Redistribution and use in source and binary forms, with or without * modification, are p...
ALGO
0.990613
7.819837
{ "github_metadata": { "branch": "main", "commit_count": 667, "repo_created_at": "2017-11-30T00:11:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8078, "forks": 1336, "issues": 322, "pull_requests": 54 }, "file_meta": { "content_id": "c2...
27580fb6-6a50-43cf-baf4-22a1808869cf
kishorevarma369/Competitive-Programming
Code-Chef/contests/APRIL19B/4.cpp
#include<bits/stdc++.h> using namespace std; int maze[10000][10000],sol[10000][10000]; int n; string originalpath; void fill(string &s) { int x=0,y=0; maze[x][y]=0; for(auto dir:s) { if(dir=='E') { maze[x][y+1]=1,y++; } else maze[x+1][y]=1,x++; } } bool ...
ALGO
0.999986
4.780528
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-06-21T14:20: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": "76ed04c6e...
177e1a0c-d162-4d65-a995-29710e0039b0
dahyelucy/SWEA
5648/5648.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #define MAX 2001 typedef struct node { int dir; int energy; int atomCnt; }node; int N; node map[2][MAX][MAX]; int energeSum; //상, 하, 좌, 우 int dx[4] = {-1, 1, 0, 0}; int dy[4] = { 0,0,-1,1 }; void init() { N = 0; energeSum = 0; for (int k ...
ALGO
0.999893
4.056707
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-10-23T11:29: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": "44590ac565...
8c642cae-1e12-4cec-9cdb-b54c5f9dcf53
balasanjay/joosc
base/algorithm.h
#ifndef BASE_ALGORITHM_H #define BASE_ALGORITHM_H namespace base { // FindEqualRanges identifies ranges that are comprised of consecutive equal // elements in the range [begin, end). Cmp should be callable and take two // values in the collection. cb should deal with an iterator pair and number of // duplicates. temp...
ALGO
0.987006
7.444916
{ "github_metadata": { "branch": "master", "commit_count": 1216, "repo_created_at": "2015-01-07T16:52:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f4b4f1c...
90c6b428-82a3-4c61-82b9-21ef22b92e93
ssjjitt/SD2sem
lab01_n3/lab01_n3.cpp
// 6. Написать программу, в которой в начало двусвязного списка добавляется n элементов и вывести на экран. #include <iostream> #include <list> using namespace std; int numInput(int num) { // в случае ошибки ввода наша программа не будет останавливаться cin >> num; if (cin.fail()) { cin.clear(...
ALGO
0.986153
3.458789
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-05-28T10:39: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": "62960904ea9b...
5ad7d215-5c9e-419b-875e-edf34eae1567
tsnest/xray-2-2011
sources/WildMagic/LibFoundation/Distance/Wm4DistSegment3Triangle3.cpp
// Wild Magic Source Code // <NAME> // http://www.geometrictools.com // Copyright (c) 1998-2009 // // This library is free software; you can redistribute it and/or modify it // under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 2.1 of the License, or...
ALGO
0.996425
6.502577
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2021-06-02T17:30:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 26, "forks": 11, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8337b2c1b4...
caf39c25-09db-408f-ba69-96af4176ea6c
Kuldeepagrahari/Programming-DSA-Shell-BashScripting-OOPS
CP/A_Maximise_The_Score.cpp
#include <bits/stdc++.h> using namespace std; #define int long long const int mod = 1e9 + 7; template <typename Container> void printer(const Container &container) { // Use iterator to loop through the container for (auto it = std::begin(container); it != std::end(container); ++it) { std::cout << *i...
ALGO
0.999795
3.770519
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2024-02-02T15:45:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c82e789cf35...
7f74ae0d-570c-406c-b85c-20255dce8015
navanathnavaskar/DataStructure
Strings/dateDiff.cpp
struct Date { int d,m,y; }; const int days[] = {31,28,31,30,31,30,31,31,30,31,30,31}; int getLeapDays(Date date) { int y = date.y; //if month is less than or equal 2 then dont count curr year. if(date.m <= 2) y = y-1; return(y/4 + y/400 - y/100); } int dateDiff(Date d1, Date d2)...
ALGO
0.99987
5.124525
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2022-02-11T05:26:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9270501bda73...
2f473915-4500-4ca3-b52e-01ba0ff3d366
marchpoonam/C-Language
c language programs/multipledigitarray.cpp
#include<stdio.h> int main() { int a[5],b[5],i,l,j,k,m,s,sum=0,rem,prm[5],temp,count=0,t,ch; printf("\n1.Sorting in ascending\n2.Decending\n3.Sum of Digits at Same index\n4.store evn no at first and odd at lst\n5.store only prime no at same index of digit\n Enter your choice"); scanf("%d",&ch); switch(ch) { case...
ALGO
0.999795
3.181029
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-07-03T10:19: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": "a24807d30a...
74da92c2-82c0-4056-8c62-00101bcd4672
HAWinther/JordanBransDicke
JBD_background_solver/main.cpp
#include <iostream> #include <fstream> #include <gsl/gsl_errno.h> #include <gsl/gsl_odeiv2.h> #include <gsl/gsl_integration.h> #include <iomanip> //============================================================================= // // // Quick code...
ALGO
0.999727
5.274168
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-03-28T03:24:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "438671ae34...
89378e2b-466a-45a9-b9c3-6b9425056abb
dolgogae/algorithm
programmers/cpp/skill_up_2.cpp
#include <bits/stdc++.h> using namespace std; bool isNum(char a){ return '0'<=a && a<='9'; } int solution(string dartResult) { int answer = 0; vector<string> dartList; int score[3] = {0,}; string cur = ""; cur+=dartResult[0]; for(int i=1; i<dartResult.size(); i++){ if(isNum(dart...
ALGO
0.999679
4.435083
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2018-12-09T07:39:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c6f7d4ec9...
d9099f1c-d43c-4b45-81b8-0fda256e380b
AngleMAXIN/Stack_list
main.cpp
#include <stdio.h> #include <stdlib.h> typedef int ElementType; typedef struct node { ElementType data; struct node *link; } StackNode; struct LinkStack { struct node *top; }; void InitStack(LinkStack &S) { S.top = NULL; } bool IsEmpty(LinkStack S) { if(S.top == NULL) return true; return false...
ALGO
0.999338
3.165045
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-11-30T08:19: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": "8c26b0ea25...
56ad49fb-c312-46af-8872-0596a4fc0347
EngineeringLibrary/BCN3D
Software-Qt/SistemasdeControle/src/primitiveLibs/LinAlg/linalg.hpp
#ifdef testMatrix #include "../../../../headers/primitiveLibs/LinAlg/linalg.h" #else #ifdef testPolynom #include "../../../headers/primitiveLibs/LinAlg/linalg.h" #else #include "SistemasdeControle/headers/primitiveLibs/LinAlg/linalg.h" #endif #endif template <typename Type> void LinAlg:...
ALGO
0.999414
3.913373
{ "github_metadata": { "branch": "master", "commit_count": 148, "repo_created_at": "2017-10-31T20:53:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72b62d304...
29858784-b3fa-4559-8680-478d5edfb725
C0ldSmi1e/CompetitiveProgramming
Contests/Codeforces-CodeCraft-21andCodeforcesRound711Div.2/D.BananasinaMicrowave.cpp
/** * Author: Daniel * Created Time: 2021-03-30 22:07:19 **/ #include <bits/stdc++.h> using namespace std; #define F first #define S second #define ER erase #define IS insert #define PI acos(-1) #define PB pop_back #define MP make_pair #define MT make_tuple #define LB lower_bound #define UB upper_bound #define EB...
ALGO
0.999958
3.132152
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2021-12-04T15:25:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5dff0b6f0...
b6994bf3-00f5-4b38-a6f1-adb5180e243e
nachiketkanore/CP-Trash
solving/CCRR/sol/sqrtdecomp.cpp
#include <algorithm> #include <array> #include <cassert> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <string> #include <vector> #define int lo...
ALGO
0.999933
4.492147
{ "github_metadata": { "branch": "main", "commit_count": 370, "repo_created_at": "2021-08-04T18:15:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "691857e83b...
9cc5e710-eaab-4ed0-80e0-539d7d145bcc
nirz306/MPL
TE/Sem1/LP/1_passOne.cpp
#include <bits/stdc++.h> using namespace std; class Pass1 { public: map<string, pair<string, string>> opcode; map<string, pair<int, string>> symtab; vector<pair<string, int>> littab; vector<string> pooltab; int litindex = 0, lc = -1; void initializeOpcodeMap() { opcode = { ...
TOOL
0.992985
3.988029
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2024-04-25T02:38: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": "175a90eed70...
52bf17bc-5e71-48e4-99c6-2531cf0a17e4
ishandutta2007/codeforces-d
darkkcyan/normal/990/D.cpp
#include<bits/stdc++.h> #define llong long long #define ii pair<int, int> #define xx first #define yy second #define rep(i,n) for (int i = -1; ++ i < n; ) #define rep1(i,n) for (int i = 0; i ++ < n; ) #define len(x) ((int)x.size()) using namespace std; #define maxn 1010 bool m[maxn][maxn] = {0}; int main() { ios_...
ALGO
0.999693
3.227044
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:31: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": "6febc78da231...
17ebfab7-dadf-4678-bc01-1d1a694ee1fb
alaminatcs/Algo-Practice
26- Largest Common Subsequence/lcs_print.cpp
/* Problem Name: Longest Common Subsequence between two string using it(dp). */ #include <bits/stdc++.h> using namespace std; int main() { string a, b; cin >> a >> b; int m = a.size(), n = b.size(); int dp[m+1][n+1]; for (int i = 0; i <= m; i++) dp[i][0] = 0; for (int i = 0; i <= n; i++) dp[0][i] ...
ALGO
0.99999
5.181248
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2023-08-15T07:59: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": "fb144e12257...
934d1ad0-d6d2-4619-beed-25a4e863b36b
dotH55/Data-Structure
CircularLinkedList/main.cpp
#include <fstream> #include <iostream> #include "ItemType.h" #include "CircularLinkedList.h" using namespace std; const char INSERT = 'i'; const char DELETE = 'd'; const char PRINT = 'p'; const char LENGTH = 'l'; const char HELP = 'h'; const char QUIT = 'q'; const char NEXT = 'n'; int main(int argc, char** argv){ ...
TOOL
0.947286
4.382676
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2019-04-07T09:01: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": "8cabb4d06...
973b1b1c-e2da-498d-8a8a-0363d1c90d9f
raynald/coding-contest-all
codejam/2018/CodeJam1C/A.cc
#include<bits/stdc++.h> using namespace std; map<string, int> mmap; int T; int N, L; vector<string> v; set<string> s, t, w; string a; string find() { for (int i = 0;i < L;i ++) { t = w; w.clear(); for (int j = 0 ;j < N;j ++) { w.insert(v[j].substr(0, i + 1)); } ...
ALGO
0.999872
3.574623
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2014-11-24T16:38: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": "dd7f521d8...
1df682dc-7184-409c-9b11-fa32ae3c3e24
ishandutta2007/codeforces-n
nealchen/normal/1270/C.cpp
#include <bits/stdc++.h> #define meow(args...) fprintf(stderr, args) template<class T1, class T2> inline bool cmin(T1 &a, const T2 &b) {return b<a?(a=b, true):false;} template<class T1, class T2> inline bool cmax(T1 &a, const T2 &b) {return a<b?(a=b, true):false;} template<class Type> Type read() { Type a; bool b; u...
ALGO
0.999065
3.189886
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "72342a41b368...
7b6d6f89-7f5e-4514-902b-c469e7b6ab93
hadhadhadhadabettereffect/euler
problems/problem_21.h
#ifndef PROBLEM_21 #define PROBLEM_21 #include "problem.h" #include "shared.h" /************************ Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n). If d(a) = b and d(b) = a, where a ≠ b, then a and b are an amicable pair and each of a and b are called amic...
ALGO
0.99554
5.948444
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-11-23T02:26: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": "a04bb8ffc4...
414b680c-6234-4aee-8850-3a64bd70e6f2
anabcuelbas/AED
Pilhas/Pilha_Din_e_Est/main.cpp
#include <iostream> #include <malloc.h> #include <stdio.h> #define MAX 100 using namespace std; typedef struct s{ int chave; struct s* prox; }NO; typedef struct{ NO* topo; }pilha_din; void inicializarDin(pilha_din* pi){ pi->topo = NULL; } void push_din(pilha_din* pi, int ch){ NO* novo = (NO*) m...
ALGO
0.999702
3.779298
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-05-03T16:05:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b4003ec838...
12972f12-7cf4-45ff-ace0-bdb4bc1ca138
XenonTheInertG/Programmes-and-Codes
C++/OOP/oop/emp_tax.cpp
// Program to calculate tax of an employee using functions #include <iostream> using namespace std; class employee { private: int emp_id, salary, tax; char name[30]; public: void get_data() { cout << "Enter your employee id: "; cin >> emp_id; cin.ignore(); // otherwise it will not ask your name and d...
TOOL
0.971995
4.322597
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2021-09-21T11:25:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c256e9cce2d...
4deb045a-959d-4f10-97f7-168fea15c4cd
Aiemu/naiveRSA
cppArchive/include/BigInteger.h
// // Created by Aiemu on 2021/10/19. // #ifndef NAVIERSA_BIGINTEGER_H #define NAVIERSA_BIGINTEGER_H #include <iostream> #include <vector> #include <cstring> class BigInteger { private: bool sign; std::vector<unsigned int> num; public: static BigInteger Zero; static BigIntege...
TOOL
0.928807
5.51154
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2021-10-19T11:58:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "40661c2d4...
33e74336-cd39-4dce-93d2-018f0280dc88
zobaer-ahmed-zihad/journeyToCode
05_CP_Weekly_Mission/09_Binary Search/B_Closest_to_the_Left.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n, k; cin >> n >> k; vector<int> v(n); for (int i = 0; i < n; i++) { cin >> v[i]; } for (int i = 0; i < k; i++) { int key, l = 0, r = n - 1, mid, ans = -...
ALGO
0.999999
5.667468
{ "github_metadata": { "branch": "main", "commit_count": 360, "repo_created_at": "2024-10-04T03:29: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": "639cd3bbbd...
6255d0ed-d9af-4a61-a7e1-90a9e7723014
liuyubobobo/Play-Leetcode
0001-0500/0254-Factor-Combinations/cpp-0254/main.cpp
/// Source : https://leetcode.com/problems/factor-combinations/description/ /// Author : liuyubobobo /// Time : 2018-03-04 #include <iostream> #include <vector> using namespace std; /// Backtrack /// Time Complexity: O(2^n) /// Space Complexity: O(n) class Solution { public: vector<vector<int>> getFactors(int...
ALGO
0.998628
5.386118
{ "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": "45...
1d03f412-be47-4c1c-89e7-1ecbb5f96894
pkiop/ALGORITHM
Codeforces/Codeforces Round #494 (Div. 3)/B.cpp
#include <iostream> #include <algorithm> #include <queue> #include <string> #include <cstring> #include <set> using namespace std; int main(void) { int a, b, x; cin >> a >> b >> x; bool zerobig = false; if (a > b) { zerobig = true; } vector<int> ans; if (zerobig) { ans.push_back(0); a--; } else { ans...
ALGO
0.999996
3.371037
{ "github_metadata": { "branch": "master", "commit_count": 319, "repo_created_at": "2017-12-25T16:45:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "faf0f68f...
44b9646c-7a22-4935-b731-4a15b8725493
akikoiwamizu/CPlusPlusCode
7_10.cpp
// 7/10/14 #include <iostream> #include <vector> #include <cstdlib> #define RAND(a,b) (a+rand() % (b-a+1)) using namespace std; int main() { bool isSorted(int x[], int n, char order = 'a'); // for descending use order = 'd' int x[] = {9, 12, 14}; if(isSorted(x, 3)) cout << "It is sorted." << endl; els...
ALGO
0.978495
4.197978
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2014-08-08T05:47: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": "55e4948990...
1f0fd62e-55f4-4991-9e8d-5ffcda7d5d8b
JoaoSchittler/QMLCompiler
Unitary.h
#ifndef UNITARY #define UNITARY #include "Complex.h" #include <vector> #include <stack> #include <stdio.h> #include <cmath> #include "Variable.h" class Permutation { public: std::vector<Variable*> vars; Permutation() { } Permutation(std::vector<Variable*> v): vars(v) {} void printVars() { for(auto var :...
ALGO
0.973922
3.740071
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-01-31T20:43: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": "395bb2025308...
67af7cbb-5a73-4be5-9d31-a4ecc5b493d1
emilyju0314/gpt_code_plagiarism
dataset/code_content_classifier/allpro_train/0_0_9035.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; cin >> n; vector<int> b(n); for(int i = 0; i < n; i++) { cin >> b[i]; } vector<vector<int>> dp(n, vector<int>(n, 2)); int ans = 2; for(int i = 0; i < n; i++) { ...
ALGO
0.999947
4.117753
{ "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": "5d213129baa...
290199ff-4678-494d-a8b1-e4eca21a5338
princeofyozgat/networkAnalysis
project/Graph.cpp
#include <iostream> #include "Graph.h" #include "Person.h" #include <utility> #include <queue> #include <algorithm> int Graph::getSize() const { return size; } void Graph::addPerson(int id, const Person &person) { graph.emplace_back(id, person); size++; } Person* Graph::getPerson(int id) const { for ...
ALGO
0.969567
4.444305
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-02-02T05:30: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": "751ffbea5b32...
d70a7fa8-c231-4b21-90a8-e524c6d731e1
Eussy/CodingTest
CodingTest/level1_둘만의암호.cpp
// 230206(월) // https://school.programmers.co.kr/learn/courses/30/lessons/155652 // 문제 해설 : 정답률이 낮아 조금 무서웠던 문제였다. 하지만 천천히 skip 문자열을 제외한 채 set 컨테이너를 만들어 이터레이터로 풀렸더니 쉽게 풀렸다. // 다른 사람 풀이를 보면 색다른 풀이 방법이다. 나머지를 이용해 skip에 없을 때만 + 해주는 방식으로 풀어냈다. // 내 풀이 #include <string> #include <set> using namespace std; string solution(...
ALGO
0.99988
5.504151
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2023-06-21T05:39: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": "269336c1235...
ab16a37f-a7cb-45b8-a9a6-7116b537be98
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/08/0803/personal_submission/cf835c_kamtuo.cpp
/*----------------------------------*/ /* Author : KaMtuo */ /* Email : <EMAIL> */ /* Creation_time : 2024-08-03 09:36 */ /* Software : Visual Studio Code */ /*----------------------------------*/ const int N = 212; #if !KAMTUO_LEETCODE int main() { std::ios::sync_with_stdio(false)...
ALGO
0.999882
5.14264
{ "github_metadata": { "branch": "main", "commit_count": 20410, "repo_created_at": "2024-02-26T01:04:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 478, "forks": 302, "issues": 0, "pull_requests": 7 }, "file_meta": { "content_id": "5605...
2df59c96-9383-4614-931b-4434734a7cee
pandya-ae/ProgI
Week 4/loan2.cpp
#include <iostream> using namespace std; int main() { double monthlyPayment, balance, interestRate, intrestSum; // Input of the program int month = 1; // Starts from month 1 (the first month) // These lines force currency format in output to two decimal points cout.setf(ios::fixed); cout.setf(ios::showpoint)...
TOOL
0.978195
3.657258
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2020-11-25T16:48: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": "cf63acd7b4b5...
248256a5-acd6-482e-a1af-8f4ad382090f
cmeslo/leetcode
solution/1879. Minimum XOR Sum of Two Arrays/1879_03.cpp
class Solution { public: int minimumXORSum(vector<int>& nums1, vector<int>& nums2) { using PII = pair<int, int>; int n = nums1.size(); priority_queue<PII, vector<PII>, greater<>> pq; // {cost, state} pq.push({0, 0}); vector<bool> visited(1 << n, false); ...
ALGO
0.999998
5.54108
{ "github_metadata": { "branch": "master", "commit_count": 3508, "repo_created_at": "2017-07-08T14: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": "4ceea53...
470bd0eb-da58-4b60-a88b-421057b83b5b
InflixOP/DSA
Queue/queueusingstack.cpp
#include <iostream> #include <stack> using namespace std; class Queue{ private: stack<int> e_stk; stack<int> d_stk; public: Queue(){}; ~Queue(){}; void enqueue(int x); int dequeue(); }; void Queue::enqueue(int x) { e_stk.push(x); } int Queue::dequeue() { int x = -1; if (d_stk....
ALGO
0.999887
4.795755
{ "github_metadata": { "branch": "main", "commit_count": 122, "repo_created_at": "2024-05-24T10:43:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bdea483460...
8699bd87-af52-42e7-bc58-3bc3501b4ab8
UltimateKyo/FCSA
Kyo/2-Intensive/prac6/MUgame-userinput.cpp
#include <iostream> #include <string> #include <fstream> using namespace std; //Task 1 bool isaMUString(char* sequence, int size); //Part (a) bool canApplyRule1(char* sequence, int size); //Part (b) bool canApplyRule2(char* sequence, int size); //Part (c) //Task 3 char* applyRule1(char* sequence, int size); //Part (a...
ALGO
0.998948
4.344977
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2014-07-18T07:36: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": "7f5320261...
443909f3-5621-4329-b762-36becc612758
vraman23/CompetitiveProgramming
CPHSet/SortingAndSearching/twoSum.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll,ll> pi; typedef vector<int> vi; #define FOR(i, a, b) for (ll i = a; i < b; i++) #define F0R(i, a) for(ll i = 0; i < a; i++) const int MOD = 1e9+7; // 998244353; const int MX = 2e5+5; // const ll INF = 1e18; // int main() { ios:: ...
ALGO
0.999981
4.482677
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2020-08-05T00:25: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": "e3e0384fb...
c8f3385f-3257-488e-8334-ea57ac2f0e94
MrMagnifico/pixel-art-upscaling
src/2xsai.hpp
#ifndef _2XSAI_HPP #define _2XSAI_HPP #include <framework/disable_all_warnings.h> #include <framework/image.h> #include "common.hpp" /** * Compute if C and D exclusively match either A or B. * * @param A First candidate for majority match * @param B Second candidate for majority match * @param C First value to...
ALGO
0.984851
6.836348
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2024-02-26T12:57:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "aff3c8802...
a62b75ed-0b17-48f6-924a-877f5cbeaa67
tovarishvolkov/TestRev_02
Plugins/Wwise/Source/AkAudio/Private/StringMatchAlgos/StringMatching.h
/******************************************************************************* The content of the files in this repository include portions of the AUDIOKINETIC Wwise Technology released in source code form as part of the SDK package. Commercial License Usage Licensees holding valid commercial licenses to the AUDIOK...
TOOL
0.934272
6.621199
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-08-11T10:17:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6786b904a13...
e2402010-a835-4f05-a3f4-e12bf111e60b
acgessler/blender-assimp
extern/libmv/third_party/ceres/internal/ceres/line_search_direction.cc
// Ceres Solver - A fast non-linear least squares minimizer // Copyright 2012 Google Inc. All rights reserved. // http://code.google.com/p/ceres-solver/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistr...
ALGO
0.999508
7.44861
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2013-04-14T15:43:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "203576711...
1be6aae5-d28c-41e7-a852-b1fb72783680
Ahmad-Nour-Haidar/cpp-project
heap_sort.cpp
/// <NAME> #include <iostream> #define endl '\n' #define type int using namespace std; /// Heap Sort: Time Complexity = (n * log(n)) template<class T> class HeapSort { /* This class only for sorting array * Note: values store in array from index 0 so: * left child = 2*i+1 * right child = 2*i+...
ALGO
0.999814
4.727021
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-03-05T20:19:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3dae2054c6ec...
56852f0f-a1c0-442b-8557-208dbedec556
Tanmay-developer/DSA-Leetcode
Algorithms/0018-valid-perfect-square.cpp
// Problem URL : https://leetcode.com/problems/valid-perfect-square/ // Author : <NAME> // Solved On : 2025-01-12 // Last Updated: [Optional: Last modification date or version number] /************************************************************************************************** * * Problem Description: ...
ALGO
0.999705
5.849852
{ "github_metadata": { "branch": "main", "commit_count": 37, "repo_created_at": "2025-01-11T06:27: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": "d3d412b4955...
a5c004ad-c382-4daf-8148-2eb1fdcc8388
nims11/coding
SPOJ/AGGRCOW.cpp
//GQ /* Objective: given positions of points, assign k objects to those points such that the minimum distance between objects is maximum. Find that value. Solution: A very good application of binary search. Use binary search to go through the solutions and find the maximum possible solution. */ #include<iostream> #inc...
ALGO
0.999999
4.484066
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-03-14T20:16:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6517845bb...
dae80402-cb9b-4dac-b1e9-e3762dccc3da
mohitkadwe19/leetcode-solutions
count-subarrays-with-fixed-bounds.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: long long countSubarrays(vector<int> &nums, int minK, int maxK) { long long n = nums.size(), mni = -1, mxi = -1, li = -1, ans = 0; for (int i = 0; i < n; ++i) { if (nums[i] < minK || nums[i] > maxK) { li = i, mni...
ALGO
0.999702
4.825655
{ "github_metadata": { "branch": "main", "commit_count": 415, "repo_created_at": "2022-10-16T13:19:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "32a02489e1...
0b35035c-0d2b-4255-b3e6-8646f4d8acec
slidemorning/algorithm
SAMSUNG-SW-Test/16234-인구이동.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; int mapSize; int lowerLimit; int upperLimit; int map[50][50]; const int dr[4] = {-1, 1, 0, 0}; const int dc[4] = {0, 0, -1, 1}; int difference(const int x, const int y) { return x < y ? y - x : x - y; } bool bfs(const int r, const int c,...
ALGO
0.999737
4.42547
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2019-09-19T09:32: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": "7635251fc...
b8ae5581-366a-485a-a776-8192edd949a2
vvidhig/Leetcode-Problem-Solutions
Linked List/⭐GFG_ReverseLLInGroups.cpp
//{ Driver Code Starts #include <bits/stdc++.h> #include <iostream> #include <sstream> #include <string> #include <vector> using namespace std; struct Node { int data; Node* next; Node(int x) { data = x; next = NULL; } }; /* Function to print linked list */ void printList(Node* node) ...
ALGO
0.999117
5.785193
{ "github_metadata": { "branch": "master", "commit_count": 247, "repo_created_at": "2024-08-04T05:41: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": "65759be6...
adad763d-9f17-44ab-ba80-14f69c4acaf9
Saurav-Paul/LightOj-Problem-Solution-By-Saurav-Paul
Basic Math/1020 - A Childhood Game.cpp
#include<bits/stdc++.h> #define endl '\n' #define ll long long int #define loop(a,b) for(int i=a;i<=b;++i) #define pb push_back #define F first #define S second #define mp make_pair #define clr(x) x.clear() #define ...
ALGO
0.999524
3.492181
{ "github_metadata": { "branch": "master", "commit_count": 136, "repo_created_at": "2018-02-22T20:22:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "578e9fc1...
8b716aae-7be1-4de9-8396-4ab254601c9d
armabon/UE4_CGAL
ThirdParty/CGAL/includes/CGAL/lloyd_optimize_mesh_2.h
// Copyright (c) 2014-2015 GeometryFactory (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org). // 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 opti...
ALGO
0.998497
6.216681
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2016-11-22T20:39:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 32, "forks": 11, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "ff76e10...
c300d95b-6eb0-4177-9082-cb114e52cde9
Real-Ahmed-Rasheed/DSA-CPP
12-BST's/DeleteNodeFromBinarySearchTree.cpp
TreeNode* deleteNode(TreeNode* root, int key) { if(root == NULL){ return root; } if(root->val == key){ //0 child if(root->left == NULL && root->right == NULL){ //it is a leaf so delete delete root; return NULL; ...
ALGO
0.999953
3.235221
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2025-04-27T03:40: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": "4501829ad51...
f371ead7-31b8-44e3-ac87-4da87fd05527
zhenyiyi/algorithm
LinkedMap/LinkedMap/RemoveDuplicatesfromSortedList.cpp
// // RemoveDuplicatesfromSortedList.cpp // LinkedMap // // Created by fenglin on 2019/7/5. // Copyright © 2019 quanshi. All rights reserved. // #include "RemoveDuplicatesfromSortedList.hpp" void Solution_83::test(){ // { // ListNode *node4 = new ListNode(5); // ListNode *node5 = new ListNode(6); ...
TEST
0.998482
4.250356
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-08-02T00:59:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d44a398a1...
197d1c6c-6327-4c3b-ab0d-ab292ed3893f
Xin546946/computer_vision_course
ch1_kmeans/test_opencv_kmeans.cpp
// This program is writen for using k means algorithm to segment images. #include <chrono> #include <iostream> #include <string> #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> using namespace std; using namespace cv; /** * @brief A function to clurster a image, based on opencv k-means func...
ALGO
0.99756
6.688288
{ "github_metadata": { "branch": "main", "commit_count": 827, "repo_created_at": "2020-10-24T18:40: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": "a84a62b320...
f0f43d6e-ef51-40c7-b270-ee980cdd6d57
maheshjainckd/Hacktoberfest2022-for-everyone
CPP/Graph-patterns/dfs/12-find-eventual-safe-states.cpp
class Solution { int isSafe(int i, vector<vector<int>> &g, int dp[]) { if (dp[i] != 0) return dp[i]; dp[i] = -1; // currently visiting for (auto &n : g[i]) { if (isSafe(n, g, dp) == -1) // if any neighbour is unsafe return dp[i]; ...
ALGO
0.999991
5.848716
{ "github_metadata": { "branch": "main", "commit_count": 1700, "repo_created_at": "2021-10-22T16:00:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 147, "forks": 719, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "06b77...
705074d7-0dca-4626-8a06-6bdad3f70893
JaeNew/Leetcode-MySubmit
169.求众数.cpp
/* * @lc app=leetcode.cn id=169 lang=cpp * * [169] 求众数 * * https://leetcode-cn.com/problems/majority-element/description/ * * algorithms * Easy (58.42%) * Total Accepted: 32.1K * Total Submissions: 54.9K * Testcase Example: '[3,2,3]' * * 给定一个大小为 n 的数组,找到其中的众数。众数是指在数组中出现次数大于 ⌊ n/2 ⌋ 的元素。 * * 你可以假设数组是...
ALGO
0.999936
5.459789
{ "github_metadata": { "branch": "master", "commit_count": 19, "repo_created_at": "2019-03-13T08:24: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": "3ae8d051f...
30e7fa08-15d9-42ae-bde0-5ea107415e94
epsilonlyra/kozlov-2sem
classwork9/E.cpp
#include<iostream> int main(){ int K; std :: cin >> K; int** Congtiguity = new int* [K]; for (int i = 0; i < K; i++){ Congtiguity[i] = new int [K]; } for (int i = 0; i < K; i++){ for (int j = 0; j < K; j++){ std :: cin >> Congtiguity[i][j]; } } int N = K; // количество вершин int M = 0; // к...
ALGO
0.999962
3.773948
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-02-03T14:50: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": "78194e3ba64...
c9bd0e7b-38e7-4468-b3a2-3959b05b8429
jojonicho/algorithms
atcoder/abc/166/c.cpp
#include <bits/stdc++.h> using namespace std; using namespace __detail; typedef long long ll; #define ar array #define vi vector<int> #define vvi vector<vector<int>> #define vll vector<long long> #define fork(i,n) for(ll i=0; i<(n); i++) #define forn for(ll i=0; i<(n); i++) #define fori(i,k,n) for(ll i=k; i<(n); i++) ...
ALGO
0.999965
3.764099
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2020-06-02T14:26:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "54be1fdca...
3d5a52d1-a664-48e5-8f05-1b8057a12349
Katrinnk/7lab
Source.cpp
#include <iostream> #include <iomanip> #include <time.h> using namespace std; void Input(int** a, const int m, const int n); void Print(int** a, const int m, const int n); int main() { srand((unsigned)time(NULL)); int Low = -20; int High = 20; int m, n; cout << "m = "; cin >> m; cout << "n = "; cin >> n; int** a...
ALGO
0.997526
3.515534
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2020-11-23T10:56: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": "3488959fef...
04ed0b4c-589a-4020-a41d-7209c1edaa41
ftiasch/problem-setting-public
2017-sichuan/dynamic-transitive-closure/solution.cpp
#include <cstdio> #include <iostream> #include <vector> const int MOD = (int)1e9 + 7; void update(int& x, int a) { x += a; if (x >= MOD) { x -= MOD; } } int main() { int n, m, q; while (scanf("%d%d%d", &n, &m, &q) == 3) { std::vector<std::vector<int>> graph(n, std::vector<int>(n))...
ALGO
0.99997
4.100399
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-08-15T12:29:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "33aeb4c90...
37ff826a-5ed0-4a99-bad2-88a94dd38818
cacophonix/SPOJ
GONDOR.cpp
/* USER: zobayer TASK: GONDOR ALGO: dijkstra */ #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <sstream> #include <iomanip> #include <string> #include <vector> #include <deque> #include <list> #include <set> #include <map> #inc...
ALGO
0.999831
4.201111
{ "github_metadata": { "branch": "master", "commit_count": 92, "repo_created_at": "2012-11-13T17:07:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 92, "forks": 101, "issues": 0, "pull_requests": 5 }, "file_meta": { "content_id": "b09c9b...
9f894526-102d-430e-8a65-07d77f904ef0
nqdu/SpecSWD
src/mesh/christoffel.cpp
#include <Eigen/Eigenvalues> // Fast Voigt index lookup table const int voigt_lookup[3][3] = { {0, 5, 4}, {5, 1, 3}, {4, 3, 2} }; static int inline Voigt_index(int i, int j) { return voigt_lookup[i][j]; } namespace specswd { /** * @brief find the min/max phase velocity by solving Christoffel equ...
ALGO
0.999925
5.18124
{ "github_metadata": { "branch": "main", "commit_count": 91, "repo_created_at": "2021-03-10T11:16:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "00ab5210cd0...
eb073d5e-223b-40f8-bf09-7ca1c75a72bb
MAKIYAMA-ma/AtCoder
ABC368/A.cpp
#include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace atcoder; using ll = long long; using ull = unsigned long long; #if 1 using mint = modint1000000007; #else using mint = modint998244353; #endif #define rep(i, n) for(int i = 0; i < (int)(n); i++) #define all(vec) (vec).begin(), (vec).e...
ALGO
0.999916
4.087513
{ "github_metadata": { "branch": "main", "commit_count": 473, "repo_created_at": "2024-09-07T23:49:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92ac873f5b...
2cd0a01c-dd4f-4d82-86d2-e01815765472
manu05X/Leetcode
0259-3sum-smaller/0259-3sum-smaller.cpp
class Solution { public: int threeSumSmaller(vector<int>& nums, int target) { int count = 0; int n = nums.size(); // Sort the array std::sort(nums.begin(), nums.end()); for (int i = 0; i < n - 2; ++i) { int left = i + 1; int right = n - 1; ...
ALGO
0.99999
6.764706
{ "github_metadata": { "branch": "main", "commit_count": 5014, "repo_created_at": "2022-04-12T02:34: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": "01993f160...
ec7c54f8-3475-4803-9f5e-85f8110f6135
ehdnd/SCCC
BOJ/graph-traversal/1039.cpp
#include <bits/stdc++.h> #define all(v) v.begin(), v.end() using namespace std; string N; int K, M; unordered_set<string> vis; void Solve() { cin >> N >> K; M = N.length(); queue<string> q; q.push(N); while (K--) { int q_size = q.size(); bool isPoss = false; vis.clear(); while (q_size--)...
ALGO
0.999988
4.155494
{ "github_metadata": { "branch": "main", "commit_count": 553, "repo_created_at": "2024-09-15T14:43: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": "7a72cae8f1...
4e198f7a-7fbd-4f38-a775-f39d5d884a8c
fjnkt98/competitive_cpp
practices/aoj/course/ALDS1/11_b.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> void dfs(std::vector<std::vector<int64_t>>& graph, std::vector<bool>& explored, std::vector<int64_t>& d, std::vector<int64_t>& f, int64_t& time, int64_t node) { explored.at(node) = true; time++; d...
ALGO
0.999851
4.254211
{ "github_metadata": { "branch": "master", "commit_count": 241, "repo_created_at": "2020-08-13T05:58: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": "fd05d8d8...
b1988a61-6311-4f1b-b65d-0c436286774d
cdh981009/Algorithm
baekjoon/15646_2d_fenwick.cpp
// https://www.acmicpc.net/problem/15646 #include <bits/stdc++.h> using namespace std; #define INF 987654321 #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FOR_(i, a, b) for (int i = (a); i <= (b); ++i) using ll = long long; constexpr int N = 5050; int n, m, q; ll tree[N][N]; void upd(int x, int y, ...
ALGO
0.999433
5.302348
{ "github_metadata": { "branch": "master", "commit_count": 850, "repo_created_at": "2020-02-16T08:17: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": "017917de...