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
2009e9e5-5786-42a3-865e-3707a72e0a2e
matengyue/image-retrieval
src/Kmeans_y.cpp
/************************************************************************* > File Name: Kmeans.cpp > Abstract: Kmeans聚类 > Author: matengyue > Mail: <EMAIL> > Created Time: 2016年03月31日 星期四 10时11分32秒 当前版本号:1.0 取代版本号:1.0 ************************************************************************...
DATA
0.996409
3.940881
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2016-04-21T07:31: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": "0a658205b...
7014f506-e072-4573-b202-d6f5a3d5d28f
A-Saadat/Algorithm
Contests/CF Contest/Div.2/CF-ED#159 Div.2/A.cpp
#include <bits/stdc++.h> using namespace std; #define IOS ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0) #define fort(itr,map) for(auto itr = map.begin(); itr != map.end(); ++itr) #define pb push_back #define elif else if #define F first #define S second #define all(v) v.begin(), v.end() #define un...
ALGO
0.99918
4.753295
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2022-03-09T13:21: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": "4eedffaf0e9...
cfc4cd23-7d75-4a84-91e5-bd2c18ceacca
mohitkadwe19/geeksforgeeks-solution
transpose-of-matrix.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: // Function to find transpose of a matrix. void transpose(vector<vector<int>> &matrix, int n) { for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { swap(matrix[i][j], matrix[j][i]); } } } }...
ALGO
0.999969
5.303638
{ "github_metadata": { "branch": "main", "commit_count": 411, "repo_created_at": "2022-10-16T16:14:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbfe17db60...
ee556005-5667-4ffc-b776-f0c119dc996f
gittushR/DSA
Largest subarray with 0 sum - GFG/largest-subarray-with-0-sum.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends /*You are required to complete this function*/ class Solution{ public: int maxLen(vector<int>&a, int n) { // Your code here int k=0; unordered_map<long long, i...
ALGO
0.999641
5.559496
{ "github_metadata": { "branch": "main", "commit_count": 3452, "repo_created_at": "2022-11-17T06:34: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": "72a8ca3b8...
8d188084-ee0f-4ab4-a8e8-b99d1ca29ce0
dhruvbhardwaj14/InterviewPrep
LinkedLists/Medium/middleofLL.cpp
#include "bits/stdc++.h" using namespace std; //Problem Statement /*Given the head of a singly linked list, return the middle node of the linked list. If there are two middle nodes, return the second middle node. */ /*Approach- use a slow and fast pointer and fast pointer moves 2 steps and slow moves 1 step only. 1. i...
ALGO
0.99968
5.607047
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2025-04-07T18:39: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": "d30ea7d9f...
cafce16d-bf14-4c57-9171-293e8a7f958d
bcribas/pspd-2020.2
solucoes/GabrielTiveron-LuisTaira/src/main.cpp
#include <pthread.h> #include <unistd.h> #include <csignal> #include <iostream> #include <iterator> #include <string> #include <thread> #include <vector> #include "../inc/atribui.hpp" #include "../inc/global.hpp" #include "../inc/scan.hpp" #include "../inc/verifica.hpp" #define MAX_THREAD 12 using namespace std; in...
ALGO
0.998173
4.464418
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2021-03-09T18:56:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 13, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b39c3fbb...
1dd3b670-b5db-42d8-bc42-0aaa84e80014
wwjszz/learn_agm
堆/堆排序.cpp
#include <iostream> #include <algorithm> // 堆中的父节点一定比它的子节点小,对于每个节点都是如此,所以堆的根是最小的。 // 在down时,必须保证其子节点以及其之后的所有子节点都是保证堆,也就是其两个子节点必须两个子堆的根 // down时,保证其两个子树为堆。 using namespace std; const int N = 100010; int n, m; int h[N], cnt; void down(int u) { int t = u; if (u * 2 <= cnt && h[u * 2] < h[t]) t = u * 2...
ALGO
0.999994
3.469952
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-03-10T06:00: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": "4961aed0051b...
80410427-6355-43f5-95cf-a600518a94cc
pranjalyadav451/CP
Before/Practice/2021/CF/Trees_900-1400/Edu107_2_C.cpp
#include <bits/stdc++.h> using namespace std; int fastio() { ios_base::sync_with_stdio(false); cout << fixed << setprecision(10); cin.tie(nullptr); return 0; } int __fastio = fastio(); template<typename A, typename B> ostream& operator<<(ostream &os, const pair<A, B> &p); template<typename A> ostream& operator<<(ostrea...
ALGO
0.999988
4.344059
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2022-07-22T11:45: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": "009eee8c4...
46912b29-7b3b-4fee-8f79-6059b2ef0e26
FunnyGuilds/FunnyOS
misc/memory_allocator/src/StaticMemoryAllocator.cpp
#include <FunnyOS/Misc/MemoryAllocator/StaticMemoryAllocator.hpp> #include <FunnyOS/Stdlib/Algorithm.hpp> #include <FunnyOS/Stdlib/Memory.hpp> #include <FunnyOS/Stdlib/System.hpp> namespace FunnyOS::Misc::MemoryAllocator { using namespace FunnyOS::Stdlib; MemoryMetaBlock* MemoryMetaBlock::GetNext() const noe...
TOOL
0.936073
6.319385
{ "github_metadata": { "branch": "master", "commit_count": 172, "repo_created_at": "2020-03-23T22:55:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "256bd92d...
596cceb0-23c6-40ff-9e38-6465e0a8130b
SalahAbotaleb/Competitive-Programming
UVA/12655/38904807_AC_100ms_0kB.cpp
#include <bits/stdc++.h> #define ll long long using namespace std; #define FIFO ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0); const ll loo= 0x3f3f3f3f3f3f3f3f; const int N=1e5+2,M=20; int sp[N][M],sp_max[N][M]; int lvl[N]; //sasa vector<pair<int,int>>adj[N]; struct node { node* par = this; ll sz = 1; ...
ALGO
0.999992
4.324623
{ "github_metadata": { "branch": "main", "commit_count": 26, "repo_created_at": "2022-07-05T22:28: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": "41176dbd06a...
24badd9a-d0b7-4294-b122-77d8762c38e9
dduubbee/Introduction_to_Algorithm
Lecture8/Chaining/basic_chained_hash.hpp
#ifndef _BASIC_HASHING_HPP_ #define _BASIC_HASHING_HPP_ #include <iostream> #include <cstdlib> #include <ctime> #include <cmath> #include <random> #include <limits> #define HASH_TABLE_SIZE 100 #define PRIME_NUMBER 113 #define ELEMENT_NUM 1000 #defin...
ALGO
0.995281
4.955168
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2021-08-24T07:47: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": "2b96440ba...
423e1e00-0527-4491-b8c0-b8c5fff6c284
O-Carneiro/contests
CF/952-4/E.cpp
#include <bits/stdc++.h> #define MAC0214 std::ios_base::sync_with_stdio(false); #define coxa std::cin.tie(NULL); #define int long long using namespace std; int achaPrimeiroDivisor(int coord, int k){ for(int i = coord; i > 0; i--){ if(k % i == 0){ return i; } } return k; } void...
ALGO
0.999972
4.547507
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2024-08-30T13:40: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": "5f933a525...
c9782e6a-de13-4d29-8dcc-bc2de91194cc
Slamur/competitive-programming
Codeforces/Rounds/637 (1340)/D.cpp
#pragma comment(linker, "/STACK:66777216") #define _USE_MATH_DEFINES #include <iostream> #include <vector> #include <math.h> #include <algorithm> #include <unordered_set> #include <unordered_map> #include <map> #include <set> #include <bitset> #include <ctime> #include <queue> #include <deque> #include <iomanip> #inc...
ALGO
0.999977
4.27519
{ "github_metadata": { "branch": "master", "commit_count": 423, "repo_created_at": "2020-04-16T17:14:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 26, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec60180...
5a69433c-3c4a-4d6b-bd9c-bdc80d9017d1
imsoumya18/vscode_practice
interviewbit.cpp
// @author Soumya #include <iostream> #include <vector> #include <set> #include <algorithm> using namespace std; int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int i = 1, j, res, flag, cnt = 0, A = 4, B = 7; for (i = 1; i <= A; i++) {...
ALGO
0.999358
4.129662
{ "github_metadata": { "branch": "main", "commit_count": 212, "repo_created_at": "2022-05-13T10:16: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": "279e5f264a...
d073fe9f-e462-4114-81fb-72e3fa0f061e
RAJ4823/Codes
CP Codes/D_Queue.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define vpll vector<pair<ll, ll>> #define vvll vector<vector<ll>> #define vll vector<ll> #define pll pair<ll, ll> #define mll map<ll, ll> #define fauto(i, a) for (auto &i : a) #define f(i, n) for (int i = 0; i < (n); i++) #define ff(i, a, b) for (int i ...
ALGO
0.999945
4.170944
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2022-07-27T10:16:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b1bc5263...
e44defe0-9620-4084-949d-72494920eeb4
ishandutta2007/codeforces-s
shnirelman/normal/1236/C.cpp
#include <bits/stdc++.h> using namespace std; const int M = 1e9 + 7; void solve() { int a, b, c; cin >> a >> b >> c; int res = 0; while(b >= 1 && c >= 2) { b--; c -= 2; res += 3; } while(a >= 1 && b >= 2) { a--; b -= 2; res += 3; }...
ALGO
0.99997
3.355266
{ "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": "5ef0700b7ad9...
db337d91-09cc-4b12-9ef6-eade3a93852a
UtileHomme1/Algorithm_Data_Structures_Compendium_full
Competitive_Programming_and_DS_Codes/C++_Codes/InterviewBit/Strings/Compare_Version_Numbers/Solution1.cpp
// https://www.interviewbit.com/problems/compare-version-numbers/ // https://www.geeksforgeeks.org/compare-two-version-numbers/ #include <iostream> #include <vector> #include <bits/stdc++.h> using namespace std; class Solution { public: int fun(string A, string B) { int i=0,j=0; // when A="01" or B="0...
ALGO
0.998182
4.853643
{ "github_metadata": { "branch": "master", "commit_count": 68, "repo_created_at": "2018-05-23T03:07: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": "06edfd814...
47f41523-4505-46be-af93-2055133c327a
brayancode2004/AlgebraLineal
Matriz_Triangular.cpp
#include <iostream> #include <vector> void mostrarMatriz(const std::vector<std::vector<double>>& matriz) { for (const auto& fila : matriz) { for (double elemento : fila) { std::cout << elemento << " "; } std::cout << "\n"; } } void convertirAMatrizTriangular(std::vector<std...
ALGO
0.999857
5.394714
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2023-11-22T20:21: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": "2cf9520123fb...
577a7907-063e-4856-8cd8-37cc0ee5934f
wooilahn/Baekjoon-Online-Judge
Baekjoon_src/boj_20056/20056.cpp
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <vector> using namespace std; typedef struct fireball { int r; int c; int weight; int velocity; int dir; bool live; } fireball; int N, M, K; vector<fireball> map[55][55]; vector<fireball> tmp_map[55][55]; vector<fireball> split_map[55][55]; voi...
ALGO
0.999603
4.032286
{ "github_metadata": { "branch": "master", "commit_count": 710, "repo_created_at": "2020-03-05T01:36:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "281c4155...
02b979ba-9663-4516-b3a0-f0c22f2397de
zhoujunlingla/ACM_homework
背包问题/1001.cpp
#include <iostream> using namespace std; const int N = 1e3 + 10; int value[N],volume[N], dp[N]; int main() { ios::sync_with_stdio(false); cin.tie(0); int t; cin >> t; while( t --){ int n , v; cin >> n >> v; for(int j = 0 ; j <= v; j ++){ dp[j] = 0; } for(int i = 1;...
ALGO
0.999988
3.763501
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2024-12-01T09:41: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": "0d812c792e...
603e2d4a-2213-4c36-b3f7-aa3646bc54ca
kunal299/Data-Structures-and-Algorithms
SDE Sheet by Striver/Recursion and Backtracking/3. Sudoku Solver/Approach - 1.cpp
/* Time Complexity - O(9 ^ (n^2)) Space Complexity - O(1) */ class Solution { public: bool isValid(int row, int col, char ch, vector<vector<char>> &board) { for(int i=0; i<9; i++) { //row-check if(board[row][i]==ch) { return false; } ...
ALGO
0.999593
6.55119
{ "github_metadata": { "branch": "main", "commit_count": 268, "repo_created_at": "2022-01-13T10:52:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "615d582106...
67aad668-7fde-4078-a319-c37c3402dcc1
jongseok-oh/PS_cpp
repository/leetcode/3097. Shortest Subarray With OR at Least K II_slidingWindow&bit_241110.cpp
class Solution { bool isBigger(vector<int>& bitCnt, int k){ for(int i = 30; i>=0; --i){ if(bitCnt[i] > 0 && !((1<<i) & k)) return true; else if(((1<<i) & k) && bitCnt[i] <= 0) return false; } return true; } void addBit(vector<int>& bitCnt, int num){ fo...
ALGO
0.999949
5.700045
{ "github_metadata": { "branch": "master", "commit_count": 1484, "repo_created_at": "2022-07-24T10:43: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": "15f7896...
c415c9a2-1216-4983-8d0d-994ec4e8ab91
jakobiadam/ComputerSimulationsBSC
ThreeBody/Bolygok/threebody.cpp
#include <cmath> #include <cstdlib> #include <fstream> #include <iostream> using namespace std; #include "vector.hpp" #include "odeint.hpp" using namespace cpl; //const double G = 6.6743 * pow(10,-11); // m^3 / (kg * s^2) ==> át kell váltani AU^3 / (m_bolygo * year^2) //static const double m_bolygo = 6 * pow(10,24) ...
ALGO
0.9989
3.83257
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-07-28T20:17: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": "f538503c1a25...
befffada-0439-4f9f-86b4-f8901b7813eb
ishandutta2007/codeforces-k
kriii/normal/958/A2.cpp
#include <stdio.h> #include <math.h> #include <algorithm> #include <vector> #include <map> using namespace std; void proc() { int N, M; scanf("%d %d", &N, &M); char A[2020][202], B[202][2020]; for (int i = 0; i < N; i++) scanf("%s", A[i]); for (int i = 0; i < M; i++) scanf("%s", B[i]); long long AH[2020],BH[20...
ALGO
0.999996
3.608116
{ "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": "c1a761a7ba47...
99bbbd79-8d3f-4462-9351-6d6e6d8750b7
udacity/CarND-Path-Planning-Project
src/helpers.h
#ifndef HELPERS_H #define HELPERS_H #include <math.h> #include <string> #include <vector> // for convenience using std::string; using std::vector; // Checks if the SocketIO event has JSON data. // If there is data the JSON object in string format will be returned, // else the empty string "" will be returned. stri...
TOOL
0.983024
6.488659
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2017-06-12T20:56:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 351, "forks": 1329, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4f3fb...
3ff7220d-db18-45a1-b143-af70ef4f88be
boragunes/EE441
hw1/src/sort.cpp
#include "sort.hpp" #include <iostream> #include <stdexcept> // will be use for implementation of the defined class //constructor implementation SortedList::SortedList(size_t initial_size) : size(initial_size) { // check initial size if (size > SORTEDLIST_MAX_SIZE) { throw std::out_of_range("Initial ...
ALGO
0.999044
5.172904
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-10-10T11:23: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": "d014bb1ed0...
7a4aab39-fa37-4a90-92b8-6d7efbd1050f
SamplyMIF/samply
src/utils.h
#pragma once #include <iomanip> #include <iostream> #include <vector> namespace utils { inline void ncout(double n, std::ostream& out = std::cout, int spacing = 8, std::string extra = "", bool nline = false) { int s = 1; int ni = static_cast<int>(n); if (ni < 0) ++s; do { // reduce n; ni /= 10; ...
TOOL
0.945026
6.312208
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2019-10-11T12:36:35.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7beb199594...
8bfa1c41-b3a4-4544-a9bc-9f46a44199de
matiego1/sio2
Kółko 2 (22-23)/pio.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> para; const int MAX = 100 * 1000; vector<int> graf[MAX + 1]; vector<int> graf2[MAX + 1]; int wej[MAX + 1]; int poziom[MAX + 1]; int dp[MAX + 1]; int odleg[MAX + 1]; queue<int> q; int main() { ios_base::...
ALGO
0.999824
3.170605
{ "github_metadata": { "branch": "main", "commit_count": 185, "repo_created_at": "2024-02-18T09:50:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ea9cc55a39...
11de52d8-eda5-4b0d-b9fd-fef63441b585
vibhorrawal/code-backup
cc/codeforces/c/515.cc
#include<bits/stdc++.h> using namespace std; #define ll long long #define vi vector<int> #define vvi vector<vector<int>> #define T() int tc;cin>>tc;while(tc--) #define all(x) x.begin(),x.end() #define sz(x) (int) x.size() #define REP(i,n) for(auto i=0;i<(n);i++) #define DEBUG 01 #define pb emplace_back #define db(x) i...
ALGO
0.999959
4.393132
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2019-01-23T05:12: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": "18cf57cc6...
5cf80be4-0f47-406b-b224-7215ce6b735d
ZhongZeng/Leetcode
lc98vldBST.cpp
/* Leetcode 98. Validate Binary Search Tree Related Topics Tree, Depth-first Search Similar Questions Binary Tree Inorder Traversal, Find Mode in Binary Search Tree Test Case: [2,1,3] [1,2,3] [1,1] [2147483647] Runtime: 15 ms Your runtime beats 11.61 % of cpp submissions. */ /** * Definition for a binary tre...
ALGO
1
6.454561
{ "github_metadata": { "branch": "master", "commit_count": 943, "repo_created_at": "2017-03-03T15:41: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": "2c469fc5...
91af71ea-8855-4599-87cc-e9bd75c4449a
shwetawadhwa26/C-
01_basic.c++
// #include <iostream> // using namespace std; // class Node // { // public: // int data; // Node *left; // Node *right; // Node(int val) // { // this->data = val; // this->left = NULL; // this->right = NULL; // } // }; // // it returns root node of created tree // Node *...
ALGO
0.999847
5.29465
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2024-07-04T15:18: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": "1244c62190d...
50f985ee-12d5-42c7-bd30-71753ce9ad1f
Vghxv/LeetStreak
cplusplus/2503.cpp
#include <gtest/gtest.h> #include <queue> #include <tuple> #include <vector> using namespace std; typedef priority_queue<tuple<int, int, int>, vector<tuple<int, int, int>>, greater<>> min_heap; class Solution { public: inline bool isValid(int x, int y, vector<vector<int>> &grid) { ...
ALGO
0.999747
6.290667
{ "github_metadata": { "branch": "main", "commit_count": 130, "repo_created_at": "2024-08-21T13:52:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31396a7490...
5e8dba07-c307-4b6f-8d0f-60056e4e44e2
jungyuha/codingtest
c++/c5419.cpp
#include <bits/stdc++.h> using namespace std; /* 각 테스트 케이스의 첫째 줄에는 섬의 수 n (1 ≤ n ≤ 75000)이 주어진다. 다음 n개 줄에는 각 섬의 좌표 xi, yi가 주어진다. 두 섬의 좌표가 같은 경우는 없다. (-109 ≤ xi, yi ≤ 109) 4 -10 -10 -10 10 10 -10 10 10 3 1 3 2 2 3 1 */ vector<pair<int,int>> isl; vector<int> resultLst; int m,n,a,b,vis[75000],dp[75000]; int dx[]={1,1,0};...
ALGO
0.999917
4.415088
{ "github_metadata": { "branch": "main", "commit_count": 580, "repo_created_at": "2022-06-14T14:00: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": "e005eaa73d...
e04a12b0-f91c-414d-84c6-f5a29dc9612d
cms-sw/cmssw
FastSimulation/SimplifiedGeometryPropagator/src/Trajectory.cc
#include "DataFormats/Math/interface/LorentzVector.h" #include "FastSimulation/SimplifiedGeometryPropagator/interface/StraightTrajectory.h" #include "FastSimulation/SimplifiedGeometryPropagator/interface/HelixTrajectory.h" #include "FastSimulation/SimplifiedGeometryPropagator/interface/ForwardSimplifiedGeometry.h" #inc...
ALGO
0.986606
5.900658
{ "github_metadata": { "branch": "master", "commit_count": 251237, "repo_created_at": "2013-06-26T14:09:07.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1144, "forks": 4480, "issues": 947, "pull_requests": 108 }, "file_meta": { "content_id...
6cea1e83-f8d9-4a13-a126-7c7353a3a062
shahin-shuvo/Data_Structure
Data Structure/BST/BST_student.cpp
#include<bits/stdc++.h> using namespace std; struct student { char nam[100] ; int roll; int marks; }; struct tree { student s; tree *left; tree *right; }; struct BST { tree *root=NULL; tree *get(student st) { tree *p=(tree *)malloc(sizeof(tree)); p->s = st; p->l...
ALGO
0.994501
3.256984
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-02-25T13: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": "2a05e1b736...
21c7c530-d11e-4c1f-813c-14e834144e97
mirzavvip/cp
osn2014/2/b.cpp
#include <bits/stdc++.h> typedef long long ll; using namespace std; #define pb push_back #define mp make_pair int r,c,ju,arr[1002][1002], awx,awy, tujx, tujy,tmp, fi, se; char cah[1002][1002]; vector<int>v[1010]; bool b[1002][1002]; string s; void ffil(int i, int j){ queue <pair <int, int> > q; q.push(mp(i,j)); ar...
ALGO
0.999888
3.840798
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2020-01-03T12:16: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": "0256ab6cf...
b4415fcc-c072-4883-8c08-26184977a24c
mohankarthik/leetcode
problems/0XXX/01XX/015X/0158_read_n_ii.cc
#include "../../../../common/Includes.h" /** * The read4 API is defined in the parent class Reader4. * int read4(char *buf4); */ class Solution { private: queue<char> q; int read4(char buf[4]) { // TODO } public: Solution() { q = queue<char>(); } /** * @param...
ALGO
0.990906
5.379875
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2020-12-22T15:34: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": "6afc9373a...
f8d96e2b-b327-4f20-b029-3830be1e8451
JaekwonHa/problem_solving
BOJ/c++/3055 탈출.cpp
#include <iostream> #include <algorithm> #include <string> #include <queue> using namespace std; struct Point { int x; int y; int cost; }; int R,C,map[55][55],cost[55][55],visited[51][51]; queue<Point> q; queue<Point> fire; int dx,dy,ans; int cx[4] = {1,0,-1,0}; int cy[4] = {0,1,0,-1}; bool isIn(int x, int y) { ...
ALGO
0.999902
3.899456
{ "github_metadata": { "branch": "main", "commit_count": 71, "repo_created_at": "2016-10-25T15:50: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": "a66931edcc6...
ed518efd-f5fb-42c1-9c03-de8832363f4a
ericskim/hscc18_modular
external/vnodelp/tests/test_n5.cc
#include <ostream> #include "vnode.h" using namespace std; using namespace vnodelp; template<typename var_type> void R3body(int n, var_type*Yp, const var_type*Y, var_type t, void*param) { // We encode as close as possible to the AWA encoding #define U1 Y[0] #define U2 Y[1] #define U3 Y[2] #define U4 ...
ALGO
0.998439
3.911438
{ "github_metadata": { "branch": "hscc18_repeatability", "commit_count": 176, "repo_created_at": "2018-01-14T06:57:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_...
aff380a7-39a4-4b20-9cf1-e3b458731b85
Valokoodari/advent-of-code
2019/day-10/10.cpp
#define _USE_MATH_DEFINES #include <algorithm> #include <iostream> #include <fstream> #include <string> #include <vector> #include <cmath> typedef std::vector<std::vector<int> > intVec2D; intVec2D readFile() { std::fstream file("../../inputs/2019/10.txt", std::fstream::in); intVec2D map; std::string lin...
ALGO
0.999825
4.67906
{ "github_metadata": { "branch": "main", "commit_count": 392, "repo_created_at": "2019-11-30T16:45:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d32c3189f3...
3d3024ed-e131-42a9-a77b-bb2340cc1b8b
Yac836/leetcode
UnionFind.cpp
// // Created by zhaohongyan on 2020/9/24. // #include <bits/stdc++.h> using namespace std; class UnionFind { public: vector<int> id; explicit UnionFind(int size) { for (int i = 0; i < size; ++i) { id[i] = i; } } bool isConnect(int p, int q) { return find(p) == fi...
ALGO
0.999743
4.337242
{ "github_metadata": { "branch": "master", "commit_count": 152, "repo_created_at": "2016-12-03T02: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": "9ac646de...
351b113a-b4f2-4723-8162-b048814ffb30
Vlad1000nn/MyGit
competitive/Advent of Code 2024/23_1.cpp
#include <bits/stdc++.h> #define isz(x) (int)x.size() #define all(x) (x).begin(),(x).end() using namespace std; using ll = long long; using vll = vector<long long>; using vi = vector<int>; using vvi = vector<vi>; void solve() { std::ifstream fin("input.txt"); std::string line; // Задан граф, нужно на...
ALGO
0.999699
3.944933
{ "github_metadata": { "branch": "main", "commit_count": 201, "repo_created_at": "2022-11-10T16:53: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": "86642ef13f...
cb083f24-5f92-44dc-8f51-f9f61a713a9f
kasa021/atcoder-archives
agc028/agc028_a_43206209_RE.cpp
/* * Author: kAsA02 * Submission URL: https://atcoder.jp/contests/agc028/submissions/43206209 * Submitted at: 2023-07-02 17:19:17 * Problem URL: https://atcoder.jp/contests/agc028/tasks/agc028_a * Result: RE * Execution Time: 125 ms */ #include <bits/stdc++.h> #include <cmath> #if __has_include(<atcoder/all>) ...
ALGO
0.999985
3.826463
{ "github_metadata": { "branch": "main", "commit_count": 2004, "repo_created_at": "2023-01-16T08:01:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "94869b28b...
f59b4ab9-dcdb-4c16-9438-a379315b8376
Charbel-11/Competitive-Programming
Contests/Codeforces/598 Div3/B.cpp
#include <iostream> #include <string> #include <set> #include <vector> #include <cmath> #include <algorithm> using namespace std; set<pair<int, int>> used; void opNum(vector<int> &nums, int i, int &limit) { int curMin = nums[i]; int curMinIndex = i; for (int a = i+1; a < nums.size(); a++) { if (curMin > nums[a]...
ALGO
0.999973
4.451293
{ "github_metadata": { "branch": "master", "commit_count": 79, "repo_created_at": "2021-02-23T22:39: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": "b8da1be86...
b9585751-051f-4243-b957-fc82a12c5f2b
MIC-DKFZ/MITK-Diffusion
Modules/DiffusionModelling/mitkDiffusionModellingHelperFunctions.cpp
/*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR P...
ALGO
0.949625
6.715618
{ "github_metadata": { "branch": "master", "commit_count": 400, "repo_created_at": "2019-07-05T10:04:06.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 94, "forks": 15, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "a69fe70...
c459e8bf-43d2-4330-8357-b66b3a6026bb
cuom1999/CP
CF/1261/1261B/1261B.cpp
#include <bits/stdc++.h> #define ld long double #define sf scanf #define pf printf #define pb push_back #define PI ( acos(-1.0) ) #define IN freopen("input.txt","r",stdin) #define OUT freopen("output.txt","w",stdout) #define FOR(i,a,b) for(int i=a ; i<=b ; i++) #define FORD(i,a,b) for(int i=a ; i>=b ; i--) #define INF...
ALGO
0.999961
3.744838
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2020-02-24T01:23:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "b45237499...
d12005b2-6b76-4f0d-acb4-f4099ffa3827
liuyubobobo/Play-Leetcode
1001-1500/1093-Statistics-from-a-Large-Sample/cpp-1093/main.cpp
/// Source : https://leetcode.com/problems/statistics-from-a-large-sample/ /// Author : liuyubobobo /// Time : 2019-06-22 #include <iostream> #include <vector> #include <numeric> using namespace std; /// Mathematics /// Time Complexity: O(n) /// Space Complexity: O(1) class Solution { public: vector<double> s...
ALGO
0.998017
4.892055
{ "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": "65...
9fb7956f-a37d-4303-9c82-3a5cd3ee10ea
Tarunagg1/competitive_programing
gfg-problemsoftheday/Roman Number to Integer.cpp
// Roman Number to Integer // EasyAccuracy: 43.31%Submissions: 124K+Points: 2 // Win 2X Geekbits, Get on the Leaderboard & Top the Coding Charts! Register for GFG Weekly Coding Contest // banner // Given a string in roman no format (s) your task is to convert it to an integer . Various symbols and their values are gi...
ALGO
0.999874
5.605124
{ "github_metadata": { "branch": "master", "commit_count": 1108, "repo_created_at": "2021-02-09T15:02:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "b4c30e6...
e4ff5dc1-6b03-4a15-85bf-568fcebdcb2d
Ayush05G/Cpp_DSA
Data Structures & Algorithms/Maps&Tries/trie.cpp
class TrieNode{ public: char data; unordered_map<char, TrieNode*> children; bool isTerminal; TrieNode(char val ) { data = val; isTerminal = false; } }; void insertWord(TrieNode* root, string word) { //base case if(word.lengt...
ALGO
0.999816
5.485397
{ "github_metadata": { "branch": "main", "commit_count": 311, "repo_created_at": "2024-06-01T21:05:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5c440f3b0...
08bed263-7bde-4ae8-bb2c-493f18d9cab0
Jconn/gomo-bot
code/linuxBuild/observepieces.cpp
#include "opencv2/imgcodecs.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <math.h> #include <iostream> #include "../MoveType.h" #include "../Gomoku.h" using namespace cv; using namespace std; static const Size dispSize(640, 480); static const Size inputSize(1024, 860); s...
ALGO
0.996736
4.638274
{ "github_metadata": { "branch": "master", "commit_count": 134, "repo_created_at": "2016-03-09T17:04:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "61fbd0a2...
607d2148-79d7-452b-9d40-f039f0ce1da5
openvinotoolkit/openvino
src/core/reference/src/op/matrix_nms.cpp
// Copyright (C) 2018-2025 Intel Corporation // SPDX-License-Identifier: Apache-2.0 // #include "openvino/op/matrix_nms.hpp" #include <algorithm> #include <cmath> #include <numeric> #include <queue> #include <vector> #include "openvino/core/shape.hpp" #include "openvino/reference/matrix_nms.hpp" #include "openvino/r...
ALGO
0.999574
7.511375
{ "github_metadata": { "branch": "master", "commit_count": 19551, "repo_created_at": "2018-10-15T10:54:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8597, "forks": 2656, "issues": 303, "pull_requests": 258 }, "file_meta": { "content_id"...
469b5e70-c538-4e75-9374-b67ef1676a68
Mari-Jun/BAEKJOON
Code/BFS/2665.cpp
#include <iostream> #include <array> #include <queue> #include <string> using namespace std; struct Point { Point(int y, int x, int count) : y(y), x(x), count(count) {} int y, x; int count; }; bool operator<(const Point& a, const Point b) { if (a.count == b.count) { if (a.y == b.y) return a.x < b.x; r...
ALGO
0.999856
4.482296
{ "github_metadata": { "branch": "master", "commit_count": 84, "repo_created_at": "2020-07-22T11:51:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1a6d208ca...
79977d9b-d233-4bee-a64c-fc172715e13c
anhyunji/sort-c-language
MergeSort.cpp
#include <cstdio> #include<iostream> #include<iomanip> #include <stdlib.h> #include <time.h> using namespace std; int arr[100010]; int n, i, j, k, l; void merge_sort(int left, int right); // left is first index of array, // right is last index of array void merge(int left, int mid, int right); int main(...
ALGO
0.999889
4.619347
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2019-01-28T10:14: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": "217bcdaa2...
d35f44e3-b722-468a-8c98-1d758a182d84
KailasMahavarkar/interview-prep
leetcode/text_justification_leetcode_68.cpp
#include <iostream> #include <vector> #pragma GCC optimize("O3,unroll-loops") using namespace std; class Solution { public: vector<string> fullJustify(vector<string>& words, int maxWidth) { vector<string> result; int start = 0; while (start < words.size()) { int end = start;...
ALGO
0.999917
6.060855
{ "github_metadata": { "branch": "master", "commit_count": 219, "repo_created_at": "2023-02-21T13:25: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": "efbeae69...
aafcdf34-d56e-41d8-881b-bd4c684dc4ea
neeraj-bhadani/100daysofCpp
2returnminandmax.cpp
#include <bits/stdc++.h> using namespace std; // o(n^2) // int main(){ // int n; // cin>>n; // int arr[n]; // for(int i =0; i<n; i++){ // cin>>arr[i]; // } // int max, min; // max = arr[0]; // min = arr[0]; // for(int i =0; i<n; i++){ // if(arr[i]>max){ // max = arr[i]; // } // } // for(int i =0; i...
ALGO
0.999976
4.708213
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-06-27T15:34: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": "9ccfad30d69a...
b28a21b6-269d-4bcc-a317-0816cbc0010c
ishandutta2007/codeforces-y
ynsm/normal/1434/A.cpp
#include <bits/stdc++.h> #define f first #define s second #define pb push_back #define mp make_pair using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<long long, long long> pll; const int N = (int)2e5 + 123, inf = 1e9, mod = 1e9 + 7; const ll INF = 1e18; int n, k = 6, a[N], an...
ALGO
0.999955
3.542531
{ "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": "0ed40d860ea5...
34f73526-9ba9-4989-b7c1-790a21a719bf
vaibhavahuja/summer
extra/LinkedList.cpp
#include <iostream> using namespace std; class Node{ public: int data; Node *next; Node(int d){ data = d; next = NULL; } }; Node *create(){ Node *head = NULL; Node *tail = NULL; while(true){ int x; cin>>x; if(x==-1) break; Node *temp = new Node(x); if(head==NULL){ hea...
ALGO
0.999915
4.39757
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2018-05-16T09:46:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc23d6784...
e7f3f741-4c91-46d1-abc7-183763b7f162
timmyjose-experiments/competitive-programming
lc/coreprep/implementation/practice_iterations/patterns_iterations_3/rearrange_string.cpp
#include <algorithm> #include <cmath> #include <iostream> #include <limits> #include <list> #include <queue> #include <random> #include <string> #include <unordered_map> #include <unordered_set> #include <vector> using namespace std; int next_random(int low, int high) { random_device rd; mt19937 engine(rd()); u...
ALGO
0.99999
5.008138
{ "github_metadata": { "branch": "master", "commit_count": 181, "repo_created_at": "2022-06-14T11:32:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f114c077...
d8593356-11fc-4473-b463-b933032f5c65
tanmay-37/LeetCode
0328-odd-even-linked-list/0328-odd-even-linked-list.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: ListNode* oddEvenList...
ALGO
0.999978
5.81642
{ "github_metadata": { "branch": "main", "commit_count": 375, "repo_created_at": "2025-01-19T13:56: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": "b3987559ef...
83fb88c4-6a21-4e33-8ed6-faa1022833b2
EmilLuta/algo
AOC/2019/day_16/a.cpp
#include <bits/stdc++.h> using namespace std; void step(vector<int> &a) { int n = a.size(); vector<int> e(n, 0); vector<int> sequence{0, 1, 0, -1}; int seq_n = sequence.size(); for (int i = 0; i < n; i++) { int k = 0; int c = 1; e[i] = 0; for (int j = 0; j < n; j++)...
ALGO
0.99998
4.271733
{ "github_metadata": { "branch": "main", "commit_count": 194, "repo_created_at": "2018-06-28T16:09:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "10de25d79a...
8bd4fa97-8b01-410b-9eef-d727df33ef79
kcastrillonc/HolaMundo
Code_langevin/Paso0/langevin.cpp
// langevin.cpp : #include <functional> #include <iostream> #include <fstream> #include <vector> #include <cmath> #include <gsl/gsl_rng.h> #include <gsl/gsl_randist.h> #include <fstream> #include <string> #include <sstream> #ifndef RAND_LF_H_ #define RAND_LF_H_ class particle { private: public: double R; doub...
ALGO
0.997577
4.213905
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-02-26T15:39: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": "366751343a4...
81d7d1c9-b460-4431-9230-9440f867484a
nguyenhoang4875/CompetitiveProgramming
codejam/2024_final_r2/A.cpp
#include <bits/stdc++.h> #define int long long using namespace std; //*** define ***// #define pb push_back #define all(x) (x).begin(), (x).end() #define sz(a) (int)(a).size() #define el '\n' #define F first #define S second #define For(i, a, b) for (int i = (a); i <= (int)(b); i++) #define Rof(i, a, b) for (int i = ...
ALGO
0.999866
3.760664
{ "github_metadata": { "branch": "main", "commit_count": 328, "repo_created_at": "2023-02-28T01:38:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "82aa27a4fd...
928c7a57-8b24-4fd6-8e2c-1ed7157d65a0
zhe-ma/Collection
collection/LearnAlgorithm/37广度优先遍历.cpp
#include <iostream> #include <string> #include <list> #include <vector> #include <map> #include <utility> #include <queue> #include <functional> #include <algorithm> #include <cassert> struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode(int x) : val(x), left(NULL), right(NULL) {} }; void BFS(...
ALGO
0.999909
5.28087
{ "github_metadata": { "branch": "master", "commit_count": 154, "repo_created_at": "2016-11-24T12:35: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": "776a2059...
0e4a6515-9998-4753-9e0e-fb25d97226c2
hjwdzh/TextureNet
data/QuadriFlow/3rd/Open-WBO-2.0/code/encodings/Encodings.h
/*! * \author <NAME> - <EMAIL> * * @section LICENSE * * Open-WBO, Copyright (c) 2013-2017, <NAME>, <NAME>, <NAME> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restrictio...
TOOL
0.985555
6.760184
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-03-30T03:53:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 96, "forks": 13, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "13a5a109...
c729b01d-5f59-4caf-b000-28c2ef21b763
divyashaktipal/DSA-Question-Solved
Array/09_MoveZeros.cpp
// Leetcode: 283 (Move Zeroes) /* Given an integer array nums, move all 0's to the end of it while maintaining the relative order of the non-zero elements. Note that you must do this in-place without making a copy of the array. Example: Input: nums = [0,1,0,3,12] Output: [1,3,12,0,0] */ #include <bits/stdc+...
ALGO
0.999989
6.930092
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2025-03-24T20:42: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": "a98cccc5766...
af026b23-cfb6-4491-bd00-9a719c66d791
daeunchung/cplusplus
boj11053_2.cpp
/* LIS Longest Increasing Subsequence D[i] = A[1], ... A[i] 까지 수열이 있을 때, A[i]을 마지막으로 하는 가장 긴 증가하는 부분 수열의 길이 D[i] = max(D[j]) + 1 (j < i, A[j] < A[i]) 여태 푼 문제들과 다르게 n = 6일때 D[6] 이 답이 아닐 수도있다. 전체 D[i]의 값 중에 최대값이 정답이 된다 => O(N제곱) */ #include <iostream> #include <algorithm> #include <vector> using namespace std; int main()...
ALGO
0.999986
4.969007
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2021-03-14T17:34: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": "21cab362b04...
bd62f9c6-eae5-4ab4-8c2a-c8015e560695
Tanner-Davison/cpp-primer
chapters/_10-generic-algorithms/duplicate-filtering-ops/copy_and_replace/main.cpp
#include <algorithm> #include <iostream> #include <iterator> #include <vector> int main() { // Initialize vectors std::vector<int> my_ints{1, 2, 3, 4, 5}; std::vector<int> copy_ints{2, 4, 6, 8, 10}; // std::copy with C arrays int my_int_arr[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; int my_copy[sizeof(my_int...
TOOL
0.974737
5.777318
{ "github_metadata": { "branch": "master", "commit_count": 369, "repo_created_at": "2024-11-02T06:52:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "44478301...
6cac83e8-df97-4190-b105-39888d16d9c3
Andy1897/Multithreaded_Programming
Lab_1/main.cpp
#include <iostream> #include <chrono> #include "Matrix.cpp" #include "Multiplier.cpp" using namespace std; double multiply(int rows, int columns, int type) { auto A = new Matrix(rows, columns); auto B = new Matrix(rows, columns); A->fillRandom(); B->fillRandom(); Multiplier *multiplier; swit...
ALGO
0.998235
5.011451
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2020-09-20T14:55: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": "a5542f642...
8957e404-2626-466d-b87c-dc7aa9187d5c
Arpan243/CodeForces
Following the String.cpp
#include <iostream> #include <bits/stdc++.h> #include <vector> using namespace std; #define input(a, n) \ for (int i = 0; i < n; i++) \ cin >> a[i]; #define rep(i, a, b) for (int i = a; i < b; i++) #define vi vector<int> #define vvi vector<vector<int>> #define pi pair<int, int> #define vpi vecto...
ALGO
0.999858
3.711733
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2023-08-02T13:57:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9cc0ca7d52a1...
c90b89c2-5959-476f-bf61-0fa280a02236
fly2mars/suCAM
external/lim/UniformLaplacian_LIMSolver2D.cpp
// Copyright 2013 - <NAME> 2013, <EMAIL> // Interactive Geometry Lab - ETH Zurich #include "UniformLaplacian_LIMSolver2D.h" #include "TriangleMesh.h" UniformLaplacian_LIMSolver2D::UniformLaplacian_LIMSolver2D() { } UniformLaplacian_LIMSolver2D::~UniformLaplacian_LIMSolver2D() { } void UniformLaplacian_LIMSolver2D::...
ALGO
0.999454
5.803562
{ "github_metadata": { "branch": "master", "commit_count": 99, "repo_created_at": "2018-10-18T11:37:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 15, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "9b5e401...
d27b9a8c-cc82-4ccd-8bdf-412098c38714
cran/fdaPDE
src/Density_Estimation/Include/Descent_Direction_Factory.h
#ifndef __DESCENT_DIRECTION_FACTORY_H__ #define __DESCENT_DIRECTION_FACTORY_H__ #include <memory> #include "../../Global_Utilities/Include/Make_Unique.h" //! @brief A Factory class: a class for the choice of the direction for the optimization algorithm. template<UInt ORDER, UInt mydim, UInt ndim> class DescentDirecti...
ALGO
0.993356
6.314631
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2016-01-15T11:45:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "28b0a10067...
ea07503f-5017-4fdc-b4bd-7826c6c451f3
adi1506/Leetcode-Progress
239-sliding-window-maximum/sliding-window-maximum.cpp
class Solution { public: vector<int> maxSlidingWindow(vector<int>& nums, int k) { deque<int> dq; vector<int> ans; //Process 1st window for(int i = 0; i<k; i++){ int element = nums[i]; //keep popping from queue until you find an element larger than nums[i] in ...
ALGO
0.99995
6.567816
{ "github_metadata": { "branch": "main", "commit_count": 442, "repo_created_at": "2022-04-12T11:51: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": "67995f7d25...
b7cb8574-d6e5-411b-b2a5-b57b46cb72c0
saurabh060792/comp-prog
Codeforces/102694C SLOTH NAPTIME.cpp
#include <iostream> #include <vector> #include <stack> #define MAX 300010 #define MAXLOG 20 #define UNEXPLORED 0 #define EXPLORING 1 #define EXPLORED 2 using namespace std; typedef long long int lli; void dfs(int start_vertex); void build_ancestor_table(int *a, int n); int log2_floor(int n); int lca(int x, int y); ...
ALGO
0.99999
4.660938
{ "github_metadata": { "branch": "main", "commit_count": 412, "repo_created_at": "2025-03-12T21:45: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": "20098b151a...
269a2db3-9123-46b3-b66e-2c5ce4a3279b
alexfertel/reports
src/grupo_1/equipo_1_seminario_1/Codigo/linkedlist.cpp
#include <iostream> #include <vector> #include <cstdlib> using namespace std; template <class R, class T> class Function{ public: typedef R(*Mapper)(T); }; template <class T> class Node{ public: T value; Node<T> *next, *previous; explicit Node(T item): value(item), next(NULL), previous(NULL){} ...
TOOL
0.98614
4.071975
{ "github_metadata": { "branch": "master", "commit_count": 140, "repo_created_at": "2020-03-21T19:33:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "9dbbe840...
502fb5c7-7c97-48ea-9f07-b45a932e8e6f
VGalaxies/code-repository
freshman/03-树1 树的同构.cpp
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> #include<string.h> #define MaxTree 10 #define ElementType char #define Tree int #define Null -1 struct TreeNode { ElementType Element; Tree Left; Tree Right; } T1[MaxTree], T2[MaxTree]; Tree BuildTree(struct TreeNode T[]) { int n = 0, root = Null; char cl = 0...
ALGO
0.999992
3.205939
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2022-03-19T08:39: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": "408fabd21...
842bf31b-9066-47ec-9c48-d33e82bbf343
HyunV/MyCodeTest
백준/Gold/9935. 문자열 폭발/문자열 폭발.cc
#include <iostream> #include <string> using namespace std; /* 폭발하는 문자열이 주어진다. 모두 폭발하면 FRULA 출력 폭발 문자열 중복되는 문자가 없다. AABB 이런거 없는듯 프로세스 1. 문자열 for문을 돌린다. 2. 각 문자를 스택에 적재한다. 3. 문구가 완성되면 폭발문자 길이만큼 스택을 감소한다. 3.1 ★ 추가 스택의 top이 폭발하는 문자의 끝자락과 일치하면 문자열을 비교한다. 폭발문자 횟수 cnt를 증가시킨다. 한 사이클을 돌면 폭발문자열이 없어질때까지 반복한다. 문자열 사이즈가 폭...
ALGO
0.999963
4.430572
{ "github_metadata": { "branch": "main", "commit_count": 430, "repo_created_at": "2024-05-15T09:15: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": "cd726f0753...
bd816ea2-594c-4f48-8dcb-9487574adb18
sammochen/cp-submissions
codeforces/0797B.cpp
/* Original problem: Author: sammochen */ #define _CRT_SECURE_NO_WARNINGS #include "bits/stdc++.h" using namespace std; #define REP(x,l,u) for(ll x = l;x<u;x++) #define RREP(x,l,u) for(ll x = l;x>=u;x--) #define PII pair<int,int> #define PLL pair<ll,ll> #define MP make_pair string to_string(string s) {return s;} s...
ALGO
0.999961
4.020918
{ "github_metadata": { "branch": "master", "commit_count": 1396, "repo_created_at": "2019-07-26T21:44: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": "6209f4a...
e7e242aa-e6b2-44d4-9428-277b2a702bce
AnasImloul/Leetcode-Solutions
scripts/algorithms/C/Count Unique Characters of All Substrings of a Given String/Count Unique Characters of All Substrings of a Given String.cpp
class Solution { public: int uniqueLetterString(string s) { vector<vector<int>> counting(26); int ans = 0; // step 1: record the position for each char; for(int curr = 0; curr < 26; curr++){ counting[curr].push_back(-1); } for(int curr = ...
ALGO
0.999948
5.838384
{ "github_metadata": { "branch": "main", "commit_count": 5405, "repo_created_at": "2022-08-07T11:14:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 382, "forks": 120, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0019d...
edb756bb-2639-466d-b14e-f8c940182363
LeonardoEmili/ear-recognizer-android
src/utility.cpp
#include "utility.hpp" #define PBSTR "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||" #define PBWIDTH 60 static chrono::steady_clock::time_point START_TIMER; void printProgress(int iteration, int total) { if (iteration == 0) START_TIMER = getCurrentTime(); double percentage = (float)iteration / ...
DATA
0.985965
5.279471
{ "github_metadata": { "branch": "main", "commit_count": 133, "repo_created_at": "2021-01-26T10:42:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66267dd30d...
73e0f90e-b878-485d-ac93-8f0b78154022
Thiagorcostaa/algoritmo2
Aulas/EXPONTEIRO/EXPONTEIRO.cpp
// EXPONTEIRO.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include <math.h> #include <locale.h> void troca(float *a, float *b) { float temp; temp = *a; *a = *b; *b = temp; } void MaximoMinimo(int *v, int n, int *min, int *max) { int...
ALGO
0.996331
3.387706
{ "github_metadata": { "branch": "master", "commit_count": 32, "repo_created_at": "2018-10-03T12:33: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": "fa27b6290...
43498377-e845-4477-b2a8-a562d66daed0
ankiiitraj/questionsSolved
1311-B.cpp
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Author : <NAME> // Problem Name : <NAME> // Problem Link : https://codeforces.com/contest/1311/problem/B // * * * * * * * * * * * * * * * * * * * * * * * * * *...
ALGO
0.999983
3.789026
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2020-02-19T18:09:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "ae3cda0b1...
ffcbff25-d6dd-4b5d-8226-2d1a879ded18
alokprinc/CPP_DS_ALGO
heap/MedianPriority_queue.cpp
#include <iostream> #include <queue> using namespace std; class MedianPriorityQueue { public: priority_queue <int> left; priority_queue <int, vector<int>, greater<int>> right; void push(int val) { if(right.size() > 0 and right.top() < val){ right.push(val); }else{ left.push(val); } ...
ALGO
0.999269
4.587037
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2021-09-22T14:30: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": "662cbb0d8e6...
01710563-ab22-43ef-b1ee-d43de082554b
sharmakavya7/Leetcode_solutions
394-decode-string/394-decode-string.cpp
class Solution { public: string decodeString(string s) { // stack<int>s1; stack<char>st; string ans; for(int i=0; i<s.size(); i++) { if(s[i] != ']') { st.push(s[i]); } else{ string curr_str = ""; ...
ALGO
0.999813
5.583763
{ "github_metadata": { "branch": "master", "commit_count": 1325, "repo_created_at": "2022-06-06T18:57:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "71d8c40...
075aa9c6-7eb7-4e9a-a361-20b673404cea
EarthRabbit/Practice
백준/Gold/1806. 부분합/부분합.cc
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int N, S, num, sum = 0, size = 1, temp, temp_size = 100001, isTrue = 0; vector<int> numset; cin >> N >> S; for(int i = 0; i < N; i++){ cin >> num;...
ALGO
0.999981
3.174538
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2023-01-14T23:30: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": "5adee2dcda1...
4f79c08e-ec23-4edb-adba-6c8607146893
MignonY/1Day1Prac
SWEA/Unrated/2112. [모의 SW 역량테스트] 보호 필름/[모의 SW 역량테스트] 보호 필름.cpp
//#define PRINT printf #define PRINT #include <stdio.h> int T, D, W, K; int arr[15][23]; int oriarr[15][23]; int comb[15]; int ans = -1; void printArr() { PRINT("PRINTARR\n"); for (int i = 0; i < D; ++i) { for (int j = 0; j < W; ++j) { PRINT("%d ",arr[i][j]); } PRINT("\n"); } PRINT("\n"); } void init() {...
ALGO
0.999643
4.157419
{ "github_metadata": { "branch": "main", "commit_count": 704, "repo_created_at": "2023-02-02T01:15: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": "454cbd0b60...
316bd238-24de-40a9-a30f-a51993318749
ishandutta2007/codeforces-m
mip182/normal/1139/C.cpp
#include <bits/stdc++.h> typedef long long ll; #define vstroku() to_string() #define vchislo() to_ulong() #define gcd(x,y) __builtin_gcd(x,y) #define numberof1(x) __builtin_popcount(x) #define povsemelementam(i,mnozh) for(auto i: mnozh) #define podotrezok(i,j) substr(i-1,j) // like prefix sum, (i,j)=s[j]-s[i-1] #define...
ALGO
0.999765
4.374682
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-06-06T01:03:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3166e5a46840...
8e59198b-d72b-47dd-a2fa-599c4d73ec43
vonchuang/ACM_practice
BFS_DFS/UVA-352.cpp
#include<cstdio> #define MAX_SIZE 25 using namespace std; int n; int time = 1; int count = 0; int mat[MAX_SIZE][MAX_SIZE]; int vis[MAX_SIZE][MAX_SIZE]; int dir[8][2] = {{-1, 1}, {0, 1}, {1, 1}, {-1, 0} , {1, 0}, {-1,-1}, {0, -1}, {1,-1}}; void DFS(int cur_x, int cur_y){ int i, j; vis[cur_x][cur_...
ALGO
0.999071
3.42807
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2018-03-09T05:55: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": "236f27bb8...
47bb4217-3a75-4f0d-bfb6-e41a6a6a4ff5
NVIDIAGameWorks/PhysX-3.4
APEX_1.4/common/src/CurveImpl.cpp
// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in bin...
ALGO
0.99908
6.825504
{ "github_metadata": { "branch": "master", "commit_count": 30, "repo_created_at": "2016-10-12T16:34:31.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2383, "forks": 282, "issues": 49, "pull_requests": 9 }, "file_meta": { "content_id": "1264...
b4697c77-352c-419a-8d13-7162292a6eee
kych4n/algorithm
백준/Silver/1652. 누울 자리를 찾아라/누울 자리를 찾아라.cc
#include <iostream> #include <vector> #include <cmath> #include <algorithm> using namespace std; int n; string str; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n; vector<vector<char>> room(n + 1, vector<char>(n + 1)); for (int i = 0; i < n; i++) { cin >> str; room[i][...
ALGO
0.999635
3.646643
{ "github_metadata": { "branch": "main", "commit_count": 237, "repo_created_at": "2024-07-01T04:20:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2e842a6007...
692bc0af-60a9-4de6-b39d-53bb1d01ce14
DuyTran1234/1000ExerciseC-
Chuong 6 - Ma tran/Ky thuat sap xep/bai409.cpp
#include <iostream> using namespace std; void nhapMang(int a[][100], int &m, int &n); void xuatMang(int a[][100], int m, int n); void hoanVi(int &x, int &y); void tangDanTrenXuong(int a[][100], int m, int n); int main() { int mSize; int nSize; int nArray[100][100]; nhapMang(nArray,mSize,nSize); cout<<endl; xuatMa...
ALGO
0.999711
3.351688
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-10-05T03:53: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": "342bcd28dc...
fe0153b5-b30e-41e2-8e36-bdd014abbe4e
lakhanpal185/DSA-with-CPP
CPP/functor/arithmetic_functor.cpp
#include <iostream> #include <functional> #include <algorithm> #include <vector> using namespace std; template <typename T> void disp_v(vector<T> & v) { if(!v.size()) return; for(T e : v) { cout << e << " "; } cout << endl; } int main() { vector<long> v1 = { 26, 52, 79, 114, 183 }; vector<long> v...
ALGO
0.998759
5.083545
{ "github_metadata": { "branch": "main", "commit_count": 38, "repo_created_at": "2023-05-10T17:21: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": "4642015a280...
5f521b6f-5f32-47f6-a6c4-d7ce08378e3b
rengarcia/Data-Structure
Primer Parcial/Ejercicios/Metodos de Búsqueda/BusquedaSecuencial/Codigo/Busqueda.cpp
/****************************************************************** * UNIVERSIDAD DE LAS FUERZAS ARMADAS ESPE * * CARRERA: Ingenieria de Software * * SEMESTRE: Tercer semestre * * MATERIA: Estructura de Datos ...
ALGO
0.999608
3.300825
{ "github_metadata": { "branch": "master", "commit_count": 181, "repo_created_at": "2019-11-09T13:15: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": "5b872daf...
aaccec23-fd36-4198-8be5-ec9d948129cf
habanero-rice/hclib
test/performance-regression/full-apps/qmcpack/src/QMCTools/ppconvert/src/common/NonlinearFit.h
#ifndef NONLINEAR_FIT_H #define NONLINEAR_FIT_H #include "Blitz.h" #include "blitz/tinyvec.h" #include "blitz/array.h" #include "MatrixOps.h" using namespace blitz; // Template class for fitting a function with M nonlinear parameters. template<int M, typename ModelType> class NonlinearFitClass { private: ModelType...
ALGO
0.99541
6.798147
{ "github_metadata": { "branch": "master", "commit_count": 705, "repo_created_at": "2014-08-11T16:15:45.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 71, "forks": 36, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "ce2f4f...
0bf464bb-0e44-47f1-9cea-fd8f6d7b594d
luolizhi/C_plus_plus
string_condition_mutext/wordstatic.cc
#include<iostream> #include<fstream> #include<sstream> #include<vector> #include<string> struct Record { std::string word; int freq; }; class WordStatics { public: void readfile(const std::string &filename); void writefile(const std::string &filename); void quicksort(std::vector<Record> &vec,int low, in...
ALGO
0.997608
4.102509
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2015-12-18T11:22: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": "56fd065ae...
1de6cfcd-396b-4ce2-9b90-4f570820403c
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/07/0709/personal_submission/cf1138b_kamtuo.cpp
/*----------------------------------*/ /* Author : KaMtuo */ /* Email : <EMAIL> */ /* Creation_time : 2024-07-09 17:19 */ /* Software : Visual Studio Code */ /*----------------------------------*/ const int N = 51234; int n; string s1, s2; vector<int> cnt[N]; int sum; int main() { ...
ALGO
0.999889
3.616311
{ "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": "56e7...
55c75ebc-0b15-47e6-9c4e-7cbfdf526b3f
anupam-kumar-krishnan/Competitive_Programming
All Algorithms/Dynamic Programming/LIS/Best Time to Buy and Sell Stock with K Transactions.cpp
#include <bits/stdc++.h> using namespace std; int maximumProfit(vector<int>& stocks, int n, int k) { // dp of size [n+1][2][k+1] --> n represents no of days , 2 --> is for whether to buy or sell , k --> maximum of transactions allowed vector<vector<vector<int>>> dp(n+1,vector<vector<int>>(2,vector<int>(k+1...
ALGO
0.999875
5.374297
{ "github_metadata": { "branch": "main", "commit_count": 1879, "repo_created_at": "2021-01-01T13:15:36.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 219, "forks": 410, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "9ecb9...
6f66819a-a30c-4833-b30e-950b2f701577
sergiorgiraldo/modernCpp
Modern C++ Programming with Test-Driven Development - Code/c9/1/Location.h
/*** * Excerpted from "Modern C++ Programming with Test-Driven Development", * published by The Pragmatic Bookshelf. * Copyrights apply to this code. It may not be used to create training material, * courses, books, articles, and the like. Contact us if you are in doubt. * We make no guarantees that this code is ...
TOOL
0.947926
7.268623
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-01-19T23:46:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2156e5917...
e44e85fd-e4c4-4fe3-86d2-85337e8a9b13
Safwan-Ibrahim/CPP
TLE cp sheet/1600/C_Chocolate_Bunny.cpp
// Created on: 2025-05-30 04:02 // Author: Safwan_Ibrahim #include <bits/stdc++.h> using namespace std; #define ll long long int32_t main() { ios_base::sync_with_stdio(0); int n; cin >> n; vector<int>A(n + 3, 0); set<int>St, Got; for (int i = 3; i <= n; i++) { St.insert(i); } ...
ALGO
0.99998
3.411075
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2025-01-13T11:10: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": "2c310e4c365...
3d304bc8-8807-4626-9e2d-1ec7fbfa33a6
shvmmshr/LeetCode-Practice
2343-count-unguarded-cells-in-the-grid/2343-count-unguarded-cells-in-the-grid.cpp
class Solution { public: int countUnguarded(int m, int n, vector<vector<int>>& guards, vector<vector<int>>& walls) { vector<vector<int>> grid(m, vector<int>(n, 0)); int res = 0; for (auto& it : guards) { grid[it[0]][it[1]] = 1; } for (auto& it : walls) { ...
ALGO
0.999931
5.614827
{ "github_metadata": { "branch": "main", "commit_count": 1867, "repo_created_at": "2024-08-03T07:54:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2219f3b26...
48e4b48d-6ff4-421e-a3bb-d3b67afd47ca
shuoxuanli/USACO
Silver/2022-2023/Feb/bakery.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long #define sz(x) (int)(x.size()) int t, n; ll m, k, a[101], b[101], c[101]; void solve() { cin >> n >> m >> k; for (int i = 0; i < n; i++) cin >> a[i] >> b[i] >> c[i]; auto chk = [&](ll x) { ll l = 0, r = x; while (l <= r) { ll ...
ALGO
0.999979
3.995933
{ "github_metadata": { "branch": "main", "commit_count": 681, "repo_created_at": "2022-04-14T14:59: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": "a667356c94...