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
f029c01a-7b24-4f8c-8fb2-3a92d8c80a08
tangthinker/sorting-algorithm
4_merge_sort.cpp
#include <iostream> #include "print_nums.h" using namespace std; // 归并排序 使用递归+合并算法 // 时间复杂度O(nlogn) 空间复杂度O(n) // 可以使用栈来实现而不使用递归 void merge_nums(vector<int>& nums, int start, int mid, int end){ vector<int> sort_nums; int l_start = start; int r_srtart = mid + 1; while(l_start <= mid && r_srtart <= end)...
ALGO
0.999972
5.254533
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-05-19T09:04: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": "8101b12c6b42...
f8648ac5-b302-4c52-bf2c-018f9f8d553b
notreallystatic/competitive-programming
Dynamic Programming/lcs.cpp
/* Author : sk92907/notreallystatic github:https://github.com/notreallystatic linkedin : https://www.linkedin.com/in/notreallystatic/ */ /* Problem Statement: Given two strings, find the length of longest subsequence present in both of them. Link: https://www.geeksforgeeks.org/space-optimized-solution-lcs/ Input: 6 ...
ALGO
0.999977
4.553768
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-05-21T03:35: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": "da5d77a06...
b5a7f43e-801f-4a49-9541-bbbdae269211
ishandutta2007/codeforces-y
yuukakazami/normal/193/A.cpp
/* * a.cpp * * Created on: 2012-6-12 * Author: mac */ #include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #include <climits> #include <numeric> #define foreach(e,x) for(__typeof(x.begin()) e=x.begin();e!=x.end();++e) #define REP(i,n) for(int i=0;i<n;++i) using namespace std; int n,...
ALGO
0.99987
3.540324
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:40: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": "4695a96a2583...
6cae0ec9-0694-4b76-95d1-a5b04dfed643
yihan-jia/Geant4
geant4_10_06/source/processes/hadronic/models/abla/src/G4AblaInterface.cc
// // ******************************************************************** // * License and Disclaimer * // * * // * The Geant4 software is copyright of the Copyright Holders of * // * the Geant4 Collaboration...
TOOL
0.91724
5.945158
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-12-31T10:16:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6aa464e5e9...
ad87cb2f-5086-4a20-b2b9-445c2f1c4910
bergsteiger/realwork
shared/GCL/alg/counter_operations.h
#ifndef __SHARED_GCL_ALG_COUNTER_OPERATIONS_H__ #define __SHARED_GCL_ALG_COUNTER_OPERATIONS_H__ namespace GCL { // получаем на вход плоское дерево и вызываем на нем заданную операцию, // обходя плоское дерево как бинарное // см. effective programming with componenets lecture 6 template<typename T, class ForwardIterat...
ALGO
0.945339
5.926641
{ "github_metadata": { "branch": "master", "commit_count": 1081, "repo_created_at": "2015-07-15T22:11:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d2c528c...
43988c4a-2907-4e2c-8800-b63e013bc817
thalyssonDEV/beecrowd
BeeCrowd C++/Iniciante/2060.cpp
#include <iostream> #include <vector> #include <tuple> std::tuple<int, int, int, int> getMultiples(const std::vector<int> &listaNumeros) { int multiplos2{}, multiplos3{}, multiplos4{}, multiplos5{}; for (int valor : listaNumeros) { if (valor % 2 == 0) { multiplos2++; } if (...
ALGO
0.999255
4.984736
{ "github_metadata": { "branch": "main", "commit_count": 318, "repo_created_at": "2024-04-23T22:15:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "44f85cadbd...
8dbfbd67-ab73-49ab-9a6d-8c5f56894478
munh-orgil/leetcode
2024/02. feb/(10 best) 647. Palindromic Substrings.cpp
#include<bits/stdc++.h> using namespace std; #define debug(a) cout << #a << " = " << a << endl; #define _ << " " << #define ll long long #define ALL(a) a.begin(), a.end() #define LLA(a) a.rbegin(), a.rend() class Solution { public: int palin(int i, int j, string &s) { int cnt = 0; while (i >= 0 ...
ALGO
0.999988
5.434784
{ "github_metadata": { "branch": "main", "commit_count": 430, "repo_created_at": "2024-01-03T02:25: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": "851c9fa8c0...
c14422fb-4176-4809-8e3d-a76446330f7f
rickyrsn/algoritma-dan-pemrograman
pertemuan-13/pertemuan-13-tugas-3.cpp
#include <iostream> using namespace std; int A[3][2]; int B[2][3]; int C[3][3]; int I, J, K, jumlah = 0; int N = 4; int main(){ cout << "Matriks A" << endl ; for (I = 0; I <= 2; I++) { A[I][0] = 5 ; A[I][1] = N ; for (J = 0; J <= 1; J++) { cout << A[I][...
ALGO
0.999495
3.76613
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2021-04-14T05:23:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8eaf0ba2b...
d39e502b-a4e7-40a4-abcc-e77749e099cb
gnramos/CIC-IIA
libIIA/include/Search/Uninformed/BreadthFirstSearch.h
/** @file BreadthFirstSearch.h * * Definição de algoritmo de busca em largura. * * @author <NAME> (<EMAIL>) * @date 10/2012 */ #ifndef IIA_SEARCH_UNINFORMED_BREADTH_FIRST_H #define IIA_SEARCH_UNINFORMED_BREADTH_FIRST_H #include "Problem.hpp" #include "SearchResult.hpp" namespace IIA { namespace Search { namespa...
ALGO
0.999961
5.988709
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2014-02-02T16:28:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9329269691...
6ab079af-3f92-4c99-803f-4ebc5a51be5a
Hiyabye/Baekjoon
13xxx/13137.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int greedy(int i, int n, vector<int> &p) { int cnt = 0; for (int j=n-1; j>=0; j--) { cnt += i / p[j]; i %= p[j]; } return cnt; } void solve(void) { int n; cin >> n; vector<int> p(n); for (int i=0; i<n; i++) cin >> p[...
ALGO
0.999996
4.275796
{ "github_metadata": { "branch": "main", "commit_count": 5062, "repo_created_at": "2023-12-31T18:40:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ee79fd12...
af84aa75-761a-4520-ba61-3e8d747a8f88
haley-hqyu/Fudan-Univ
Mathematical Modeling Practice/Random Shortest-Path Problem/code/SAP.cpp
#include<iostream> #include<cstdio> #include<cmath> #include<cstdlib> #include<cstring> #include<algorithm> #include<vector> #include<queue> #define MAXN 110000 #define INF 1000000000 using namespace std; struct Edge{ int from,to,cap,flow; }; int n,m,s,t; vector<Edge> edges; vector<int> G[MAXN]; bool vis[MAXN]; ...
ALGO
0.999988
3.647614
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-09-25T08:24: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": "66ecdf14a...
a9718f2c-5fa4-48a0-bf2c-7fe2920c6039
henry0408/Embedded-system
C++/Day8/virtual_class2/main.cpp
/* * * * 1.设计一个虚基类Base 包括:protected数据: 姓名和年龄 成员函数eat(); 2.由Base类派生出领导类Leader 包含:protected数据:职务duty和部门department 成员函数lead(); 3.再有Base类派生出工程师类Engineer 包含:私有数据职称major 专业professional 成员函数develop(); 4.然后由Leader类和Engineer类派生出主任工程师类Boss 5. main里创建Boss */ #include <iostream> using nam...
TOOL
0.910608
3.5668
{ "github_metadata": { "branch": "main", "commit_count": 119, "repo_created_at": "2023-01-05T07: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": "3fa541b203...
fdc0a30c-c337-4f53-9298-05527e6c184d
AleXamuel/Proyecto-Nestor
Problemas/Grafos/Matching/Fast Maximum Matching.cpp
//https://vjudge.net/problem/SPOJ-MATCHING #include <bits/stdc++.h> using namespace std; #define MAX 150007 #define INF (1<<28) vector< int > G[MAX]; int n, m, match[MAX], dist[MAX]; bool bfs() { int i, u, v, len; queue< int > Q; for(i=1; i<=n; i++) { if(match[i]==0) { dist[i] = 0; ...
ALGO
0.999979
3.745796
{ "github_metadata": { "branch": "main", "commit_count": 852, "repo_created_at": "2024-01-27T19:31:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "998ebd64eb...
383d95c9-824e-4dee-88da-f6a6f87f33df
IljaSir/CopilotSolverForLeetCode
C++/Hard/WrongAnswer/count-palindromic-subsequences_4.cpp
class Solution { public: int countPalindromes(string s) { int n = s.size(); vector<vector<int>> dp(n, vector<int>(n)); vector<vector<int>> sum(n, vector<int>(n)); for (int i = 0; i < n; i++) { dp[i][i] = 1; sum[i][i] = 1; } for (int le...
ALGO
0.999971
5.957411
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-07-28T08:23:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e0729a41f18...
1a98f8ae-5d92-4549-8070-f6e0d96b8d15
itohdak/Codeforces
Div2/prev/592/E.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--) #define rrep(i,n) RREP(i,n-1,0) #define REPL(i,m,n) for(ll i=(ll)(m); i<(ll)(n); i++) #define repl(i,n) REPL(i,...
ALGO
0.999992
4.298471
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2018-05-21T14:37: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": "a1f55eeaf...
55c74800-46f4-45b1-a511-bcedd2cca9bf
whuang369/Competitive-Programming
OJ/Codeforces/1994/A.cpp
#include <bits/stdc++.h> using namespace std; const int N = 15; int a[N][N], n, m; void solve () { cin >> n >> m; for (int i = 1; i <= n; i ++) for (int j = 1; j <= m; j ++) cin >> a[i][j]; if (n == 1 && m == 1) { cout << "-1\n"; return ; } for (int i = 1; i <= n;...
ALGO
0.99942
3.787132
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2024-06-23T15:55: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": "23100d5d97...
162c7fbf-6450-44bc-88aa-050031dc494f
littlebearsama/3D-ObjectDetection-and-Pose-Estimation
8.其他/机器人抓取/重构/NCC/squirrel_perception_backup-hydro_dev/v4r/v4r/SurfaceRelations/BoundaryRelationsBase.hpp
/** * Copyright (C) 2012 * <NAME>, <NAME>, <NAME>, <NAME>, <NAME> * Automation and Control Institute * Vienna University of Technology * Gusshausstraße 25-29 * 1170 Vienna, Austria * ari(at)acin.tuwien.ac.at * * This program is free software: you can redistribute it and/or modify * it u...
ALGO
0.937693
6.239816
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-05-06T08:03:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 290, "forks": 77, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "6fa6ee...
4d26a2d7-5163-48aa-aece-81a54c133809
russjohnson09/data_structures_and_algorithms
assignment5/tree/BinarySearchTree.cpp
#include <iostream> using namespace std; #include "BinarySearchTree.h" /** * Implements an unbalanced binary search tree. * Note that all "matching" is based on the < method. */ /** * Construct the tree. */ template <class Comparable> BinarySearchTree<Comparable>::BinarySearchTree( const Comparable & notFound )...
ALGO
0.999606
5.328088
{ "github_metadata": { "branch": "master", "commit_count": 43, "repo_created_at": "2013-01-14T17:33: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": "30410c13d...
eba70cfb-dadf-45f8-880e-521902d80824
zzhan133/leetcode
cplusplus/Palindrome Number/PalindromeNumber.cpp
#include <iostream> using namespace std; class Solution { public: int valueOfNumber(int x, int n) //The value of the nth digit of the value from right to left { int base = 1; while(n!= 1) { base = base*10; n--; } return (x/base)%10; } bool i...
ALGO
0.999969
4.245627
{ "github_metadata": { "branch": "master", "commit_count": 54, "repo_created_at": "2014-09-13T21:56: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": "c0d0dfbb2...
acf50813-bafa-4448-81e2-1ec2311d0c06
AliZainoul/Newton
newton.cpp
#include <iostream> #include <cmath> #include "error.hpp" using namespace std; typedef double (*pfn) (double); bool root(pfn f, double x) { if (f(x)==0.0) return true; else return false; }; bool Solution(double xp, double xn, pfn fd, double delta, double epsilon) { if (((abs(fd(xp)))<epsilon) || ((abs(xn-xp))<=d...
ALGO
0.99995
4.529671
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2019-12-26T18:23: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": "371f25b47c...
fc2a079a-cb90-4cc8-97b3-de4c199ca6e6
Wilson1996/LeetCode-exercise
每日一题/surfaceArea.cpp
/* * @Author: wilson_t(<EMAIL>) * @Date: 2020-03-25 00:27:27 * @Last Modified by: wilson_t * @Last Modified time: 2020-03-25 13:08:35 */ /********************************************************** * 题目[简单]: 在 N * N 的网格上,我们放置一些 1 * 1 * 1  的立方体。 每个值 v = grid[i][j] 表示 v 个正方体叠放在对应单元格 (i, j) 上。 请你返回最终形体的表面积。 示例 1: 输入:[...
ALGO
0.999639
5.001103
{ "github_metadata": { "branch": "master", "commit_count": 176, "repo_created_at": "2020-03-06T02:51:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e2d41c09...
f9f3253a-66ce-47d8-a4a7-8cd80e82fdc9
TimeDA/TimeDA
dataset/cpp_12_18/gcj2012/Zlobober/1842485_1486492_Zlobober_c.cpp
#include <iostream> #include <vector> #include <cstdio> using namespace std; const int N = 100500; int E[N]; #define eprintf(...) fprintf(stderr, __VA_ARGS__) int to[N]; void go(int s, int e, int d) { vector<int> p; if (s == e) return; while (s != e) p.push_back(s), s...
ALGO
0.99991
3.853205
{ "github_metadata": { "branch": "main", "commit_count": 70, "repo_created_at": "2022-10-24T06:47:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91af041c26e...
d8ac04d5-2b57-4968-93a4-335030515d3a
arulkolla/competitive-programming
codeforces/789/B.cpp
// Problem: B. Masha and geometric depression // Contest: Codeforces - Codeforces Round #407 (Div. 2) // URL: https://codeforces.com/contest/789/problem/B // Memory Limit: 256 MB // Time Limit: 1000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++.h> using namespace std; const...
ALGO
0.999959
3.573667
{ "github_metadata": { "branch": "master", "commit_count": 849, "repo_created_at": "2021-01-12T05:23:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4bc2151e...
8db11a7b-b558-4cc9-8125-4de8366e83d5
x-FIREFOUR-x/AlgoLab2
Lab2/Lab2/Fileworker.cpp
#include "Fileworker.h" void Fileworker::write_BD(string filename, Node* root, int t) { ofstream fout; fout.open(filename); string line = to_string(t); fout << line << "\n"; line = ""; queue<Node*> que; que.push(root); while (!que.empty() && que.front()->data.size() != 0) { Node* cur_node = que.front(); ...
DATA
0.914154
3.078737
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2021-10-16T11:34: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": "26981e8a3...
32cd4089-0642-4168-b9cf-cb66f41da1bb
un01s/code-exercises
ex05/05-349.cpp
/* * leetcode 349 * intersection of two arrays * */ class Solution { public: vector<int> intersection(vector<int>& nums1, vector<int>& nums2) { unordered_set<int> result_set; // use set for the result // set can remove the duplicates unordered_set<int> nums_set(nums1.begin(), n...
ALGO
0.999949
5.801847
{ "github_metadata": { "branch": "main", "commit_count": 937, "repo_created_at": "2023-06-21T16:36: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": "c6b892de0d...
9edbcd5a-9d33-4da0-9b25-3afd0f31339d
Craneplayz/CP-Archive
MCO/2023/TwoPointerHard_WrongIdea#1.cpp
#include <algorithm> #include <bitset> #include <climits> #include <cmath> #include <deque> #include <fstream> #include <list> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> using namespace std; #define ll long...
ALGO
0.999966
3.159433
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2021-12-22T19:03: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": "2886da82c22...
f1c53e02-f77b-44dd-99cb-f8389ed60f7a
Maehulkr/Computer-Graphics
Circle/Circle Bresenham.cpp
#include<iostream> #include<graphics.h> #include<conio.h> using namespace std; //function for drawing the circle void drawCircle(int xc, int yc, int x, int y) { putpixel(xc+x, yc+y, RED); putpixel(xc-x, yc+y, RED); putpixel(xc+x, yc-y, RED); putpixel(xc-x, yc-y, RED); putpixel(xc+y, yc+x, RED); putpixe...
ALGO
0.98236
4.657891
{ "github_metadata": { "branch": "master", "commit_count": 48, "repo_created_at": "2020-05-04T04:02: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": "3086d4ede...
ab50b07f-2d10-4d2b-b0b9-9cd11173624c
Akanksha172/SEM-IV
minheap.cpp
#include <iostream> using namespace std; #define MAX 100 class heap { int arr[MAX]; public: heap() { for(int i=0;i<MAX;i++) { arr[i]=0; } } void insert() { int x; cout<<"Enter the element to be inserted : "; cin>>x; int temp,...
ALGO
0.999371
3.781428
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2022-07-23T07:00: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": "466441bf8a...
3ffd1fe4-3d72-4d5a-9d27-4963c3748d4c
metrumresearchgroup/Torsten
cmdstan/stan/lib/stan_math/stan/math/prim/prob/inv_chi_square_log.hpp
#ifndef STAN_MATH_PRIM_PROB_INV_CHI_SQUARE_LOG_HPP #define STAN_MATH_PRIM_PROB_INV_CHI_SQUARE_LOG_HPP #include <stan/math/prim/meta.hpp> #include <stan/math/prim/prob/inv_chi_square_lpdf.hpp> namespace stan { namespace math { /** \ingroup prob_dists * The log of an inverse chi-squared density for y with the specifi...
ALGO
0.927997
6.243452
{ "github_metadata": { "branch": "master", "commit_count": 655, "repo_created_at": "2018-03-09T17:48:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 59, "forks": 13, "issues": 7, "pull_requests": 1 }, "file_meta": { "content_id": "74437c6...
e8d23522-36bd-4b3b-befa-f36099c1ba43
xnmng/LeetCode
2901-longest-unequal-adjacent-groups-subsequence-ii/2901-longest-unequal-adjacent-groups-subsequence-ii.cpp
class Solution { public: vector<string> getWordsInLongestSubsequence(vector<string>& words, vector<int>& groups) { int n = words.size(); vector<int> dp(n, 1); // dp[i] := if we use words[i] whats the longest ss? vector<int> prev(n, -1); // prev[i] := given dp[i], what was the prev element in...
ALGO
0.999984
6.017357
{ "github_metadata": { "branch": "main", "commit_count": 4708, "repo_created_at": "2022-08-08T03:21:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c77925248...
2afc4b26-f145-4140-8c40-4e4885aabf4e
nathansttt/hog2
deprecated/coprobber/Minimax.h
#include <ext/hash_set> #include <map> #include <vector> #include <math.h> #include "MyHash.h" #include "Map2DEnvironment.h" #include "MultiAgentEnvironment.h" #ifndef MINIMAX_H #define MINIMAX_H /*! two players minimax implementation */ template<class state, class action, class environment> class Minimax { publ...
ALGO
0.999969
5.481162
{ "github_metadata": { "branch": "PDB-refactor", "commit_count": 2251, "repo_created_at": "2015-08-19T21:02:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 117, "forks": 62, "issues": 9, "pull_requests": 1 }, "file_meta": { "content_id":...
bd3218c3-a6f9-459a-a5ae-c57aad227b15
chongtzezhao/CompCoding
KickStart/2020/RoundC/Q3_Perfect_Subarray.cpp
// Partial solution, TLE /* Last updated: May 18 2020, 00:24 Problem Cristobal has an array of N (possibly negative) integers. The i-th integer in his array is Ai. A contiguous non-empty subarray of Cristobal's array is perfect if its total sum is a perfect square. A perfect square is a number that is the product of ...
ALGO
0.998952
4.827444
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-05-04T01:53: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": "1c6d2a325...
3caa4e2e-e528-44d4-870d-164d325cae50
Aniket-coder-workspace/DSA_with_Cplus
Practice_of_C++/rough.cpp
#include<iostream> using namespace std; int main(){ // int a = 45; // char b = 'C'; // float num = 567.90; // double num1 = 67.909090; // string name = "Aniket"; // bool value = true; // cout<<a<<endl; // cout<<b<<endl; // cout<<num<<endl; // cout<<num1<<endl; // cout<<name<...
ALGO
0.999589
3.453951
{ "github_metadata": { "branch": "main", "commit_count": 54, "repo_created_at": "2024-07-04T05:58: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": "4a1768c03e7...
47b34d35-5fed-4614-9cfb-2c24dc94598c
robinkalia/Interview-Prep
LeetCode/hammingDist.cpp
// <NAME> // <EMAIL> // Problem: // The Hamming distance between two integers is the number of positions at which the corresponding bits are different. // // Now your job is to find the total Hamming distance between all pairs of the given numbers. // // Example: // Input: 4, 14, 2 // // Output: 6 // // Explanation: I...
ALGO
0.999851
6.230936
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2018-03-11T09:57: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": "0324ee8b56...
2adabed1-3210-44ed-9f45-0288ee8bde0c
ishandutta2007/codeforces-h
heltion/normal/1257/D.cpp
#include<bits/stdc++.h> using namespace std; using LL = long long; constexpr int maxn = 240000; int a[maxn], b[maxn], ma[maxn][20]; int LOG[maxn]; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int t; for(cin >> t; t; t -= 1){ int n, m; cin >> n; ...
ALGO
0.999721
3.563553
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01: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": "91f76c7aaa6a...
a23aef2b-3008-46ac-9804-dea4b49e3d49
shriKishan-21/DSA-with-CPP
ALL CONTENT/14. Linked List/Practise Question/15_Clone_A_LL_With_Next_And_Random_Pointer.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node* next; Node* random; // constructor Node(int data) { this->data = data; this->next = NULL; this->random = NULL; } }; void insertAtTail(Node* &tail, int d) { // create new node ...
ALGO
0.999584
5.208366
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2025-03-05T10:02: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": "e47d7e77cd9...
04c90799-98bc-4eed-9ff7-b64bba34a276
huibosa/programming
languages/cpp/10-generic-algorithms/exersise/18.cpp
#include <vector> #include <string> #include <algorithm> #include <numeric> #include <iostream> void elimDups(std::vector<std::string>& words) { sort(words.begin(), words.end()); auto end_unique = unique(words.begin(), words.end()); words.erase(end_unique, words.end()); } bool isShorter(const std::string&...
ALGO
0.998565
5.611295
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2022-03-20T09:18: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": "6d41a518c88...
a41b50c5-28e8-4a02-a1e7-1c5aafc33cd6
channyHuang/leetcodeOJ
542.cpp
class Solution { public: vector<vector<int>> updateMatrix(vector<vector<int>>& matrix) { rows = matrix.size(); if (rows <= 0) return res; cols = matrix[0].size(); if (cols <= 0) return res; res.resize(rows, vector<int>(cols, 0)); queue<pair<int, int>> qu; for ...
ALGO
0.999973
5.815784
{ "github_metadata": { "branch": "master", "commit_count": 241, "repo_created_at": "2019-11-14T13:27: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": "f02123fd...
9cfa42b0-5515-4982-9996-a4b9ac0ddd60
elitadanilyuk/cs119
homework/week09/hmwk_part1/FallingDistance.cpp
// // Lesson 9 Homework Part 1 Falling Distance Danilyuk // // Created by <NAME> on 25 July 2020. #include <iostream> #include <iomanip> using namespace std; // module prototypes double fallingDistance(double); // global CONSTANTS const double G = 9.8; // start main() int main() { // defined local variables ...
ALGO
0.993637
5.500214
{ "github_metadata": { "branch": "main", "commit_count": 61, "repo_created_at": "2022-04-04T19:18:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "347e623bd80...
120735a7-934e-430d-960b-33c5e70f62a3
jlcarr/ProjectEuler
Problem079/main.cpp
// Solution to Project Euler problem 79 #include <iostream> #include <chrono> #include <fstream> #include <map> #include <set> #include <list> /* If there is only 1 possible solution, then the number orderings must make up a weakly connected graph If every number can only be used one then the problem reduces down to...
ALGO
0.999669
5.08128
{ "github_metadata": { "branch": "master", "commit_count": 103, "repo_created_at": "2020-09-10T02:00:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96f8c7d9...
6bbfb264-33ef-47d3-bab9-08169b43e3e6
uwla/pht
src/pht.cpp
#include <bits/stdc++.h> #define ALPHABET_SIZE 26 // #define int unsigned int using namespace std; int main() { int n, maxlen = 0; cin >> n; vector<string> words(n); for (int i = 0; i < n; i+=1) { cin >> words[i]; maxlen = max(maxlen, (int) words[i].length()); } sort(words...
ALGO
0.999977
3.916145
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-04-01T12:51:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59cf548545...
a54fda9d-2fd3-4e70-b69c-c77838294638
elador/FeatureDetection
libCondensation/include/condensation/ResamplingSampler.hpp
/* * ResamplingSampler.hpp * * Created on: 15.08.2012 * Author: poschmann */ #ifndef RESAMPLINGSAMPLER_HPP_ #define RESAMPLINGSAMPLER_HPP_ #include "condensation/Sampler.hpp" #include "boost/random/mersenne_twister.hpp" #include "boost/random/uniform_int.hpp" #include "boost/random/uniform_real.hpp" #inclu...
ALGO
0.933784
6.852798
{ "github_metadata": { "branch": "master", "commit_count": 803, "repo_created_at": "2012-06-08T20:48:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 160, "forks": 102, "issues": 75, "pull_requests": 2 }, "file_meta": { "content_id": "bec...
39a8ed7c-25e4-4129-8868-a072f02416a5
vinay030901/Algorithms
450/G1/14MergeBetweenLists.cpp
#include <bits/stdc++.h> using namespace std; struct ListNode { int val; ListNode *next; ListNode() : val(0), next(nullptr) {} ListNode(int x) : val(x), next(nullptr) {} ListNode(int x, ListNode *next) : val(x), next(next) {} }; ListNode* mergeInBetween(ListNode* list1, int a, int b, ListNode* list2...
ALGO
0.999959
4.03592
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2021-07-12T04:12: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": "0d0475515...
0c944339-5f52-4dae-b6dc-1d09c6951653
harungunaydin/Competitive-Programming-Solutions
FARIO/(95)Sledge_Track.cpp
#include <iostream> #include <cmath> #include <cstdio> #include <queue> #include <vector> #define FOR(i,a,b) for(i=a; i<=b; i++) #define EKLE(x,s) { qx.push(x); qs.push(s); visited[x] = vis; } #define BAK(x,s) { x = qx.front(); s = qs.front(); qx.pop(); qs.pop(); } #define MAXN 40005 using namespace std; typedef pair ...
ALGO
0.999931
3.698246
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-01-22T08:08:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "babe917eb5...
a5ddcf4d-6d69-40a6-8b99-813aafeffb19
joaopradooo/cienco_PCII
Revisão - Dia 24-02/ex5.1/main.cpp
#include <iostream> using namespace std; int main() { //Desenvolva um programa que leia um número de 1 a 7 e exiba o dia da semana correspondente. int dia; cout << "Digite um dia da semana em números (1 à 7): "; cin >> dia; switch (dia) { case 1: cout << "1 corresponde a Dom...
TOOL
0.970103
3.478997
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-03-25T00:22: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": "729cc3bd4a4c...
1555432b-a1c9-45ab-968f-32529a2763e2
tusherahmadbappy/SortingAlgorithm
SelectionSort.cpp
//Selection Sort Algorithm Implementation in C++ #include <iostream> using namespace std; int main() { int size,temp,i,j; cout<<"Enter the array size: "; cin>>size; int arr[size]; //Array user input for(i=1;i<=size;i++) { cout<<"Enter array index of "<<i<<" is: "; cin>>arr[i...
ALGO
0.999995
4.775503
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-08-05T08:09:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e75ab20eceb7...
3c1e761c-b86c-45bd-ad8b-534f4bd010d7
ThoseBygones/ACM_Code
CodeForces/CodeForces 1006C.cpp
/* ******************************************************************************** * Author: ThoseBygones * Version: V1.0 * Date: 2019-01-02 * Subject: ACM-ICPC * Language: C/C++11 * OJ: CodeForces * Algorithm: ******************************************************************************** * Algo-De...
ALGO
0.999989
3.38548
{ "github_metadata": { "branch": "master", "commit_count": 324, "repo_created_at": "2017-05-12T16:58: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": "73e2c874...
6b3b807f-5900-489c-9b15-39f2a3275958
aatkanova/tasks_2
minEven.cpp
//10. Написать программу, которая включает функцию с переменным числом параметров, //для нахождения минимального аргумента среди четных аргументов функции. #include <iostream> #include <cstdarg> #include <limits> // Функция для нахождения минимального четного аргумента int minEven(int count, ...) { va_list args;...
ALGO
0.998732
6.20103
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-12-18T09:45:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa05b890c1c1...
b0b7738c-3a48-4552-8292-b9720e599ff9
Jyjays/C-algorithm
排序/二分查找.cpp
#include<iostream> using namespace std; const int N = 100000; int num[N]; int n,q,k; int findNumLeft(int _find,int length){ int left = 0, right = length-1; while(left<=right){ int mid = left + right >> 1; if (num[mid] >= _find) { right = mid - 1; } else { left = mid + 1; ...
ALGO
0.999991
4.084475
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2022-12-29T13:03: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": "a58b2896c...
1efff3cf-4de3-42c1-9cff-f5422c0d1759
horizon-research/hvs_vr_encoding
fpga/tile_color_optimizer_hls/tile_color_optimizer_func_tb.cpp
#include <cmath> // 对于 fabs #include <iostream> #include <fstream> #include <string> // #define FP32 // #ifdef FP32 #include "tile_color_optimizer_func.h" // #else // #include "tile_color_optimizer_func_fix.h" // #endif template<typename T> void load(hls::stream<T> &s, int load_num, std::ifstream &ifdata) { ...
DATA
0.904198
4.170001
{ "github_metadata": { "branch": "main", "commit_count": 341, "repo_created_at": "2023-09-12T15:31:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9fc424f0496...
6cc2da8a-617a-476a-afe9-5b570ce27e7e
JarnoVierros/Cross_section_calculation
J_LHC_exclusive_ccbar_cross_section.cpp
#include <stdlib.h> #include <gsl/gsl_math.h> #include <gsl/gsl_monte.h> #include <gsl/gsl_monte_vegas.h> #include <gsl/gsl_sf_bessel.h> #include <gsl/gsl_integration.h> #include <gsl/gsl_errno.h> #include "TGraph.h" #include "TCanvas.h" #include "TLegend.h" #include "TAxis.h" #include "TMultiGraph.h" #include "TGraph...
ALGO
0.998769
3.982425
{ "github_metadata": { "branch": "main", "commit_count": 446, "repo_created_at": "2024-06-19T13:26:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "86fd72e624...
35151d7b-112c-4031-b2c6-cc2b2bc76db1
ethan-enhe/mycode
XCPC/2022ccpcweihai/B.cpp
#include <bits/stdc++.h> using namespace std; const int MXN = 1e5 + 5; int n; int arr[MXN]; map<int, vector<int>> d; vector<int> brr; void fac(int x) { vector<int> tmp; for (int i = 1; i * i <= x; i++) if (x % i == 0) { tmp.push_back(i); if (i * i != x) tmp.push_back(x / i); ...
ALGO
0.999972
3.653842
{ "github_metadata": { "branch": "master", "commit_count": 384, "repo_created_at": "2022-12-02T18:12: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": "921f5bf4...
edd2f3de-7570-4560-84c6-02ea8fd2935c
felixkumafutsa/Internet-of-Things-Projects
SmartBin/SmartBin-CodeReaper.ino
#include <Arduino.h> #include <HC_SR04.h> #include <Servo.h> #include <TinyGPS++.h> #include <SoftwareSerial.h> Servo myservo; // create servo object to control a servo int pos = 0; // variable to store the servo position HC_SR04<3> sensor(4); // sensor with echo and trigger pin HC_SR04<9> sensor1(13); // sens...
TOOL
0.907352
6.298661
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-11-02T11:55: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": "ce8aeeba07b6...
f8b7271a-a4c9-40b4-aa83-dee39a8d74db
firewood/topcoder
atcoder/abc_096/c.cpp
// C. #include <iostream> #include <sstream> #include <vector> using namespace std; int main(int argc, char *argv[]) { int h, w; cin >> h >> w; vector<string> s(h); for (int i = 0; i < h; ++i) { cin >> s[i]; } bool ans = true; for (int i = 0; i < h; ++i) { for (int j = 0; j < w; ++j) { if (s[i][j] == '...
ALGO
0.999941
4.529646
{ "github_metadata": { "branch": "master", "commit_count": 4451, "repo_created_at": "2011-04-18T02:33:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30923b...
01b09ba4-ba9e-4daf-90b1-81381b24eada
KimKyoHwee/CodingTest
백준/Gold/4386. 별자리 만들기/별자리 만들기.cc
#include <iostream> #include <utility> #include <vector> #include <cmath> using namespace std; double graph[101][101]; vector<pair<double, double>> pV; int N; double dist[101]; int nearest[101]; double result = 0; double calculateDistance(pair<double, double> a, pair<double, double> b) { double sum = pow((b.first - a....
ALGO
0.999741
4.137829
{ "github_metadata": { "branch": "main", "commit_count": 232, "repo_created_at": "2023-05-18T02:53: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": "ec97f37640...
03bc14c1-aec3-4006-932d-bd314fbaec3b
alexgan123/dmoj
7p/ccc18j5.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n; vector<int> adj[10001]; bool vis[10001]; int dis[10001]; int k = INT_MAX; int main() { cin >> n; for (int i = 1, m; i <= n; i++) { cin >> m; for (int j = 1, k; j <= m; j++) { cin >> k; adj[i].push_back(k); ...
ALGO
0.999766
3.316355
{ "github_metadata": { "branch": "main", "commit_count": 135, "repo_created_at": "2021-09-12T04:37: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": "1e0ad44190...
50600ef8-ab78-4172-81c6-b9c9be733956
VastoLorde95/Competitive-Programming
Codeforces/321 Division 2/Problem E/E.cc
#include <cstdio> #include <iostream> #include <cmath> #include <algorithm> #include <cstring> #include <map> #include <set> #include <vector> #include <utility> #include <queue> #include <stack> #include <cassert> #define sd(x) scanf("%d",&x) #define sd2(x,y) scanf("%d%d",&x,&y) #define sd3(x,y,z) scanf("%d%d%d",&x,&...
ALGO
0.999946
3.796591
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2017-07-25T11:08:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 171, "forks": 41, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c49f83...
95c32f58-062f-40a3-9a6e-2251c9162980
Shadek07/uva
Solved Category/Geometry/920.cpp
#include<iostream> #include<cstdio> #include<cmath> #include<vector> #include<algorithm> using namespace std; struct point { long int x; long int y; }a[105],c[105]; int n; int comp(point a,point b) { if(a.x<b.x) return 1; else return 0; } double get(int i,int j) { doubl...
ALGO
0.999855
3.705044
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2020-05-20T05:28: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": "9c5644d13...
b3216c14-6bb4-433d-be91-16cfc7343f1f
ishandutta2007/codeforces-a
andrew/normal/1230/B.cpp
#include <bits/stdc++.h> #include<ext/pb_ds/assoc_container.hpp> #include<ext/pb_ds/tree_policy.hpp> #pragma GCC optimize("-O3") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #define fi first #define se second #define p_b push_back #define pll pair<ll,ll> #define pii pair<int,int> #define m_p mak...
ALGO
0.999993
4.288442
{ "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": "8074190ac678...
41088c0d-8b68-410c-a2ab-f6af053d41a6
isspek/Hacker-Rank-Practices
C++/Classes/boxit.cpp
//Implement the class Box //l,b,h are integers representing the dimensions of the box // The class should have the following functions : // Constructors: // Box(); // Box(int,int,int); // Box(Box); // int getLength(); // Return box's length // int getBreadth (); // Return box's breadth // int getHeight (); //...
TOOL
0.991388
3.7937
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2017-07-17T17:33: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": "e12660ac6...
96fcf62e-57b3-4a30-a8f2-3cc20a66717c
IamLupo/Project-Euler
core/src/String.cpp
#include "IamLupo/string.h" bool IamLupo::String::isPalindrome(long long n) { return IamLupo::String::isPalindrome(std::to_string(n)); } bool IamLupo::String::isPalindrome(const std::string &s) { int i, l; l = s.size() - 1; for(i = 0; i < s.size() / 2; i++) if(s[i] != s[l - i]) return false; return tr...
TOOL
0.980573
4.059509
{ "github_metadata": { "branch": "master", "commit_count": 371, "repo_created_at": "2016-03-31T10:49: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": "42914ad4...
636c6217-1bce-41fb-a3d4-21bdbddfd4c4
Ayush110103/My-Competative-programing-Files
Programs/Movie_Festival_II.cpp
#include <bits/stdc++.h> using namespace std; int main() { // int n; long long n, k; cin >> n >> k; // vector<long long> a(n); vector<pair< int , int >> a(n); long long x; multiset<pair<int , int>> s; // set<pair<long long, long long>> s2; for (long long i = 0; i < n;i++){ cin >> a[i].second>>a[i]...
ALGO
0.999973
3.611809
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-08-15T19:25:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a3cb1040c5aa...
7c626fa2-f675-4776-b96a-4e2f8b08e13c
roosephu/project-euler
306.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.999333
3.170842
{ "github_metadata": { "branch": "master", "commit_count": 31, "repo_created_at": "2013-02-09T04:55:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 68, "forks": 27, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5a8ef6f...
294759fc-959a-4912-8547-24ba20be82db
LutzGross/esys-escript.github.io
trilinos_source15/packages/nox/test/epetra/Thyra/ModelEvaluatorRosenbrock.cpp
/* //@HEADER // ************************************************************************ // // NOX: An Object-Oriented Nonlinear Solver Package // Copyright (2002) Sandia Corporation // // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive // license for use of this work by o...
ALGO
0.991043
6.939443
{ "github_metadata": { "branch": "master", "commit_count": 5724, "repo_created_at": "2020-08-10T02:31:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 63, "pull_requests": 0 }, "file_meta": { "content_id": "18a5...
86ef49d5-9165-485a-be43-31c7a68c50a6
SkyLoaderr/xray-engine-repo
SDK/QSlim/mixkit/src/MxFaceTree.h
#ifndef MXFACETREE_INCLUDED // -*- C++ -*- #define MXFACETREE_INCLUDED #if !defined(__GNUC__) # pragma once #endif /************************************************************************ MxFaceTree Copyright (C) 1998 <NAME>. See "COPYING.txt" for details. $Id: MxFaceTree.h,v 1.8 2000/11/28 15:50:14 garl...
ALGO
0.958577
5.969234
{ "github_metadata": { "branch": "master", "commit_count": 83977, "repo_created_at": "2021-04-21T18:03:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f72...
537c9745-8a85-48c9-b748-37cab0840fa1
basvandorst/cryptography-archive
newsapi/News/NewsTree.List.cc
// This may look like C code, but it is really -*- C++ -*- /* Copyright (C) 1988 Free Software Foundation written by <NAME> (<EMAIL>) This file is part of the GNU C++ Library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as publ...
TOOL
0.952633
5.748678
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-12-15T21:46:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "147367a75e0d...
5d6c0e0e-91a3-49ce-8343-6172d538d7ef
burakbayramli/books
NumericalRecipes2/examples/xbalanc.cpp
#include <iostream> #include <iomanip> #include <cmath> #include "nr.h" using namespace std; // Driver for routine balanc int main(void) { const int NP=5; int i,j; Vec_DP c(NP),r(NP); Mat_DP a(NP,NP); for (i=0;i<NP;i++) for (j=0;j<NP;j++) a[i][j] = (!(i &...
ALGO
0.996511
3.400054
{ "github_metadata": { "branch": "master", "commit_count": 652, "repo_created_at": "2016-10-31T17:24:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 325, "forks": 201, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6509...
9438b2ac-b944-4244-865e-db62ce1dde08
lzl124631x/LeetCode
leetcode/777/s2.cpp
// OJ: https://leetcode.com/problems/swap-adjacent-in-lr-string/ // Author: github.com/lzl124631x // Time: O(N) // Space: O(1) class Solution { public: bool canTransform(string start, string end) { int i = 0, j = 0, N = start.size(); for (; i < N && j < N; ++i, ++j) { while (i < N && sta...
ALGO
0.99986
5.873849
{ "github_metadata": { "branch": "master", "commit_count": 5060, "repo_created_at": "2015-05-16T12:48:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1471, "forks": 377, "issues": 12, "pull_requests": 0 }, "file_meta": { "content_id": "a...
54325a67-7ea4-41b0-8bab-090d1097591b
Pr33datorrr/DS-File
Experiment 7.cpp
#include<iostream> using namespace std; struct node { int data; struct node *next; }; struct linked_list { node *front,*rear; linked_list() { front=NULL; rear=NULL; } void insert_begin(); void display(); node* createnode(int); void delete1(); }; node* linked_list...
ALGO
0.999689
3.277747
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-11-12T04:15: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": "ed4c0f76b6...
448ab16d-3ed0-4874-ae9d-9e7a46e33270
osmangoninahid/Online-Judge-Solutions
LightOJ/1093.cpp
#include <cstdio> #define MAX 100009 #define max(a, b) ((a)>(b)?(a):(b)) int maxDeq[MAX][2], maxTop, maxBot; int minDeq[MAX][2], minTop, minBot; int main() { int test, cs, n, d, i, v, maxdiff; scanf("%d", &test); for(cs = 1; cs <= test; cs++) { scanf("%d %d", &n, &d); maxTop = minTop = maxBot = minBot = maxdi...
ALGO
0.999807
3.597573
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-07-04T10:55:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 4, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "84116d8000...
1b4d5521-585f-4ae0-a0ac-d5f8d08094ec
ishandutta2007/codeforces-s
shik/normal/732/D.cpp
// {{{ by shik #include <bits/stdc++.h> #include <unistd.h> #define SZ(x) ((int)(x).size()) #define ALL(x) begin(x),end(x) #define REP(i,n) for ( int i=0; i<int(n); i++ ) #define REP1(i,a,b) for ( int i=(a); i<=int(b); i++ ) #define FOR(it,c) for ( auto it=(c).begin(); it!=(c).end(); it++ ) #define MP make_pair #define...
ALGO
0.999919
3.162899
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "895794a2d80d...
70aca8ad-8544-4da1-a90f-591baa803c4a
NirajD04/DSA
801-is-graph-bipartite/is-graph-bipartite.cpp
class Solution { public: bool bfs(vector<vector<int>>& graph, int node, vector<int>& color, int currentcolor) { color[node] = currentcolor; queue<int> q; q.push(node); while (!q.empty()) { int u = q.front(); q.pop(); for (int& v : g...
ALGO
0.999962
5.934793
{ "github_metadata": { "branch": "main", "commit_count": 911, "repo_created_at": "2025-01-12T18:31: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": "8b230fd19d...
c4a0a6e7-1115-470c-a0be-7869d0ed630b
ishandutta2007/codeforces-u
uryuuu/normal/1466/C.cpp
#include<iostream> #include<stdio.h> #include<cstdio> #include<vector> #include<algorithm> #include<cstring> #include<cmath> #include<queue> #include<string> #include<stack> #include<set> #include<map> #include<bitset> #include<unordered_map> #include<time.h> #include<cstdlib> typedef long long ll; typedef unsigned lon...
ALGO
0.999842
3.564148
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:31: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": "2071d13ea798...
53926c72-1ee0-4673-905b-6accf333544d
FighterKing/TopCoder
SRM573/SkiResortsEasy_Kaiyang.cpp
#include <vector> #include <list> #include <map> #include <set> #include <queue> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cst...
ALGO
0.9999
4.800751
{ "github_metadata": { "branch": "master", "commit_count": 283, "repo_created_at": "2014-04-23T07:23:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92f444838...
daf68be7-23cd-4b20-b556-0460f82bade3
Victor-ONIC/L1S1-Bases-de-la-programmation
TPs/TP3/ex1.cpp
#include <cstdlib> #include <ctime> #include <iostream> using namespace std; int main() { int T[1000] = {}; int boundA, boundB, N, x, min, max, indexOdd = 0, indexEven = 0; float sumOdd = 0, sumEven = 0; srand(time(NULL)); do { cout << "Entrez a, b, N tel que a<b et 1<N<1000:\n"; cin >> boundA >> bou...
ALGO
0.990724
4.025175
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2021-10-08T20:00: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": "71ca588313d...
126a9237-b505-4665-a122-a774b73f35f7
abdelazizSalah/AlgorithmsAndProblemSolving
myPlayGround/Stacks_Queues_Code Examples/1-Stacks/main.cpp
#include "ArrayStack.h" #include <iostream> //To use C++ console I/O functionality //, we need to include iostream which contains necessary declarations. using namespace std; //This statement enables us to use classes and objects in the standard C++ library //without prefixing them with "std::" // This caod h...
ALGO
0.949958
4.204317
{ "github_metadata": { "branch": "main", "commit_count": 348, "repo_created_at": "2022-08-24T09:57:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad047945f2...
e4f41c43-4ad5-4093-9677-ceccbe852167
JuanPabloRN30/Competitive_Programming
Codeforces/813C.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; typedef pair < int , int > ii; vector < vector < int > > tree_bob; vector < vector < int > > tree_alice; vector < int > ans_bob,ans_alice; vector < bool > mark_s; void bfs( int o, vector < vector < int > > &tree, vector < int > &ans ) { q...
ALGO
0.999733
4.329275
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2016-08-21T17:34: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": "56fcddad72...
6818d8db-23cf-4110-932f-11f7c8eab2a1
ykmyou/Algorithm
algorithm/LCA.cpp
#include <iostream> #include <cstdio> #include <string> #include <algorithm> #include <set> #include <map> #include <vector> #include <queue> #include <stack> #include <cstring> using namespace std; const int MAXN=400001; int parent[MAXN][20]={0,}; //버텍스 개수가 50만보다 크면 20보다 큰수로 해야함 int depth[MAXN]={0, }; vector<int> adj...
ALGO
0.999983
4.505033
{ "github_metadata": { "branch": "master", "commit_count": 258, "repo_created_at": "2017-06-11T12:59:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a1c55c0...
e7254789-0789-43d5-a8b1-17204cfa201c
psi4/psi4attic
ccsort/idx_permute.cc
/* * @BEGIN LICENSE * * Psi4: an open-source quantum chemistry software package * * Copyright (c) 2007-2016 The Psi4 Developers. * * The copyrights for code used from other parties are included in * the corresponding files. * * This program is free software; you can redistribute it and/or modify * it under t...
ALGO
0.988732
4.844593
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2016-01-19T18:33:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "63200cd5aa...
a49ec28a-7f26-466c-babb-a77ff4b896fe
cyshang/HDNN
NeuralNetwork/Molecule.cpp
#include "Molecule.h" #include "SymFunction.h" #include "FunctionInfo.h" #include "FuncType.h" #include <Eigen/Core> using namespace Eigen; using std::istream; using std::ostream; using std::ifstream; using std::ofstream; using std::vector; using std::setw; using std::setprecision; using std::left; using std::cout; c...
TOOL
0.950249
4.585546
{ "github_metadata": { "branch": "master", "commit_count": 56, "repo_created_at": "2019-07-13T17:53: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": "69d249b59...
a4d6a670-1f1a-4126-b561-522343bc019b
punithpatil/csci1300-recitation-notes
classes/point-class/distance_driver_arrays.cpp
// To compile: g++ point.cpp distance_driver_arrays.cpp #include "point.h" #include <iostream> #include <cmath> #include <stdlib.h> #include <time.h> using namespace std; double distance_between_points(Point p1, Point p2){ double x1 = p1.getX(); double y1 = p1.getY(); double x2 = p2.getX(); double...
TOOL
0.973226
4.937757
{ "github_metadata": { "branch": "master", "commit_count": 14, "repo_created_at": "2019-02-27T21:09:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0c9c14f5e...
4f3eae4d-b20e-4807-8246-12e069867dd7
tmuttaqueen/MyCodes
Online Judge Code/codeforces/Educational Codeforces Round 65 (Rated for Div. 2)/E.cpp
#include<bits/stdc++.h> using namespace std; #define ld long double #define intl long long #define pii pair<int,int> #define xx first #define yy second #define mp make_pair #define pb push_back #define SZ(x) (int)(x).size() #def...
ALGO
0.999971
3.534195
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-01-27T09:25: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": "b5c3fd04d3...
ada5e34f-7e67-4161-a93c-cadf4db965be
AlvaroLucioRibeiro/C-Plus-Plus-II
Grafos/Ok_2_Ok.cpp
#include <iostream> #include <list> #define INT_MAX 10000000 using namespace std; struct no { int v; // Vertice de destino float peso; // Peso da aresta }; void cria_aresta(list<no>adj[], int u, int v, float p, int orientado) { no aux; // Variavel aux para inserir aresta no grafo aux.v = v; aux.peso = p; adj[u]...
ALGO
0.998145
3.790778
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2023-05-12T14:08: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": "49c4073df2...
6c7e1180-592e-4831-87a1-6726cf55ee0c
mridhosaputraad/Documentation-C-
10.aritmatika/aritmatika.cpp
#include <iostream> using namespace std; int main() { int a = 6; int b = 4; int hasil; // Operatornya +, -, *, /, % // Penjumlahan hasil = a + b; cout << a << " + " << b << " = " << hasil << endl; // Pengurangan hasil = a - b; cout << a << " - " << b << " = " << hasil << end...
ALGO
0.945583
3.637895
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-06-19T12:52: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": "9ab13a226761...
0879538e-e11e-49c2-ae8a-db03f551566f
ArkadebGhosh/Leetcode
0695-max-area-of-island/0695-max-area-of-island.cpp
class Solution { public: bool isSafe(int x, int y, vector<vector<int>>& grid) { int m = grid.size(); int n = grid[0].size(); if(x<0 || y<0 || x>=m || y>=n) return false; return true; } int maxAreaOfIsland(vector<vector<int>>& grid) { int m = grid.size...
ALGO
0.999642
6.245196
{ "github_metadata": { "branch": "main", "commit_count": 893, "repo_created_at": "2022-07-07T18:05: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": "69ea5682be...
d929cb12-2f04-46f2-9100-b81b47ce7ac2
JayantGoel001/LeetCode
2150-kth-smallest-product-of-two-sorted-arrays/2150-kth-smallest-product-of-two-sorted-arrays.cpp
class Solution { public: long long kthSmallestProduct(vector<int>& nums1, vector<int>& nums2, long long k) { int n1 = nums1.size(), n2 = nums2.size(); int pos1 = 0, pos2 = 0; while (pos1 < n1 && nums1[pos1] < 0) { pos1++; } while (...
ALGO
0.999994
6.085606
{ "github_metadata": { "branch": "master", "commit_count": 7444, "repo_created_at": "2021-10-01T11:35:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "09663f...
2121a1e8-bc04-4805-8cc9-aeedfd511969
ishandutta2007/codeforces-k
krijgertje/normal/498/C.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <cstring> #include <vector> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cctype> #include <cmath> #include <list> #include <cassert> #include <ctime> #include...
ALGO
0.99922
4.055677
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "921b651124b5...
9b43e255-118c-4bbf-88e9-c65e6a9bf6e5
ishandutta2007/codeforces-a
aid/normal/769/B.cpp
#ifdef DEBUG #define _GLIBCXX_DEBUG #endif #include <bits/stdc++.h> using namespace std; typedef long double ld; #ifdef DEBUG #define eprintf(...) fprintf(stderr, __VA_ARGS__), fflush(stderr) #else #define eprintf(...) ; #endif #define sz(x) ((int) (x).size()) #define TASK "text" const int inf = (int) 1.01e9; con...
ALGO
0.998242
3.299557
{ "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": "7e133823d4bf...
613c6171-2dee-409b-a9cb-56386e9bc145
FIUP/Programmazione-1
Esami/2012-2013/II Compitino (13-03-2013) + SOL/Altre Soluzioni/v2_esercizio1.cpp
#include<iostream> #include<fstream> using namespace std; struct nodo{int info; nodo* next; nodo(int a=0, nodo* b=0){info=a; next=b;}}; void stampa(nodo* x, ofstream & OUT) { if(x) { cout<< x->info<<' '; stampa(x->next, OUT); } } // PRE=(L e' una lista corretta, dim>=0, INP e' il flusso di input...
ALGO
0.999342
3.152948
{ "github_metadata": { "branch": "master", "commit_count": 163, "repo_created_at": "2017-01-26T16:01:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 14, "forks": 14, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cdc6bbd...
824cab04-660a-45eb-b0f6-f4684a7575bd
ishandutta2007/codeforces-k
kude/normal/1619/C.cpp
#include<bits/stdc++.h> namespace { using namespace std; #define rep(i,n)for (int i = 0; i < int(n); ++i) #define rrep(i,n)for (int i = int(n)-1; i >= 0; --i) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() template<class T> void chmax(T& a, const T& b) {a = max(a, b);} template<class T> ...
ALGO
0.999568
4.043136
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T06:06:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8ad10aeff4eb...
95d12823-d29c-4b49-82c4-12f49afb44a2
henryjchen/Competitive-Programming
codeforces/C.cpp
#include <bits/stdc++.h> using namespace std; int n, k; void solve() { int n; cin >> n; vector<int> v(n); int mx = 0; for (int i = 0; i < n; i++) { cin >> v[i]; mx = max(mx, v[i]); } int ans = -1; for (int i = 0; i < n; i++) { if (i == 0 && v[i+1] != v[i] && v...
ALGO
0.999828
4.409381
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-12-06T17:19: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": "78ec8f548...
34bc599f-19f8-4b78-9872-48ceab3c7d35
OneBitPython/Codeforces
E_Polygon.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define all(c) c.begin(), c.end() #define endl "\n" int sum() { return 0; } template<typename... Args> int sum(int a, Args... args) { return a + sum(args...); } string bin(long n){ long i; string val = "0"; for (i = ...
ALGO
0.999945
4.917544
{ "github_metadata": { "branch": "master", "commit_count": 195, "repo_created_at": "2022-01-06T15:32:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "256258ed...
3234ab40-6b7f-470c-8bdc-f493de5e664f
pandian4github/competitive-programming
spojnew/multq3.cpp
#include<stdio.h> #include<string.h> int tree[1000000],lazy[1000000],tree2[1000000]; void buildtree(int node,int st,int end) { // printf("%d %d %d\n",node,st,end); if(st>end) return; if(st==end) { tree[node]=1; return; } int mid=(st+end)/2; tree[node]=end-st+1; buildtree(2*node,st,mid); bui...
ALGO
0.99993
3.09245
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2014-01-18T23:14: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": "a398002076...
065a818d-600d-4d37-b6dd-42eb621fe4cf
Govind-techie/DSA
Trie/02_Problem1.cpp
/* Problem: Word Break Problem Given a string s and a list of words (dictionary), check if s can be split into a sequence of one or more dictionary words. Example: s = "applepenapple" dict = ["apple", "pen"] Output: true Explanation: "apple pen apple" is a valid split. Return true if possible, else ...
ALGO
0.999695
5.797955
{ "github_metadata": { "branch": "main", "commit_count": 106, "repo_created_at": "2025-01-14T07:56: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": "391c5d63e5...
90eeb117-6208-4989-9d1f-4731b2e79360
V2beach/Algorithm-exercise
浙大PAT/A1027.cpp
#include <cstdio> int main(int argc, char *argv[]) { char base13[15] = "0123456789ABC"; std::printf("#"); for (int i = 0; i < 3; i++) { int decimal; std::scanf("%d", &decimal); std::printf("%c%c", base13[decimal / 13], base13[decimal % 13]);//因为只是两位数,可以选择不用通用的进制转换代码 } return 0; } //int main(int argc, char *a...
ALGO
0.998358
3.842216
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-04-05T10:32: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": "44b550273ee...
78c02633-ff02-4028-abc3-d60ff41d6fe7
tangjz/Three-Investigators
2017-09-10/L.cpp
#include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> using namespace std; namespace fastIO { #define BUF_SIZE 100000 //fread -> read bool IOerror = 0; inline char nc() { static char buf[BUF_SIZE], *p1 = buf + BUF_SIZE, *pend = buf + BUF_SIZE; if(p1 == pend) { p1 = buf; pend = buf...
ALGO
0.999985
3.60145
{ "github_metadata": { "branch": "master", "commit_count": 138, "repo_created_at": "2018-03-31T16:08:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fa556387...
da08009e-9cae-4272-b2b4-12305f20d0fd
haymrpig/Autonomous-Driving-Simulator
findwaypoint_.cpp
#include <iostream> #include <vector> #include <fstream> #include <string> #include <algorithm> #include <climits> #include <unordered_map> using namespace std; struct lane1 { string ID; string fromNodeId; string toNodeId; string rLinkId; string lLinkId; int num_waypoint; int laneNum; int leftLaneIndex = -1;...
DATA
0.929181
3.254244
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2021-12-03T02:05:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "795c7783ac...
7c30e5f5-027c-4996-b86f-e176cd59dcb5
GraphChi/graphchi-cpp
example_apps/communitydetection.cpp
/** * @file * @author <NAME> <<EMAIL>> * @version 1.0 * * @section LICENSE * * Copyright [2012] [<NAME>, <NAME>, <NAME> / Carnegie Mellon University] * * 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 co...
ALGO
0.999759
7.008419
{ "github_metadata": { "branch": "master", "commit_count": 960, "repo_created_at": "2013-07-24T13:36:43.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 808, "forks": 311, "issues": 25, "pull_requests": 8 }, "file_meta": { "content_id": "d640...
e6dbb98b-c1ac-40dc-839c-6b3156cb32d4
rishabh-bhatia/SIT315
Module2/M2.T1P/MatriceMult.cpp
#include <iostream> #include <stdlib.h> #include <fstream> #include <time.h> using namespace std; const int maxNum = 100; const int arrSize = 1500; //Writes an input Array to an external text file void writeFile(long array[arrSize][arrSize]) { int i, j; ofstream ArrayFile; ArrayFile.open("Output.txt"); ArrayFile...
ALGO
0.998233
3.876056
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-03-27T17:59: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": "a7362ba26c...
19d9431d-3cd7-4b54-9a96-ee1c1b4acdf5
dycraft/ArticleRecommendationSystem
ArticleRecommendation/PersonalizedRecommendation.cpp
#include "PersonalizedRecommendation.h" #define BeginPos 0 #define EndPos 17000 #define probleLine 6524 //English with Chinese ////extern function//// vector<WeightArticle> getTopN_P(vector<WeightArticle>& base, ALGO mode, int top_n) { vector<WeightArticle> v(top_n + 1); // + 1 to reserve a temp position int n =...
TOOL
0.994519
4.324695
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2016-05-25T02:58: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": "fba253157...