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
3292af51-a829-4e0f-b5bd-3f1027c36db9
KrashM/Introduction_To_Programming
Practicum/Week 11/solutions/task5.cpp
#include <iostream> void Deallocate(int const * const * const matrix, const unsigned int n) { for(unsigned i = 0; i < n; i++) { delete[] matrix[i]; } delete[] matrix; } int** AllocateMatrix(const unsigned int n, const unsigned int m) { int** matrix = new(std::nothrow) int*[n]; if(!mat...
ALGO
0.999904
4.221934
{ "github_metadata": { "branch": "main", "commit_count": 378, "repo_created_at": "2022-09-21T14:38:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 11, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4238bc0b6...
bfb8fa99-4dc5-47cb-8976-87834c01aa8e
chengtianle1997/Nowcoder_implement
JZ61 Serialize and Deserialize the Tree.cpp
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } }; */ class Solution { public: char* Serialize(TreeNode* root) { if (!root) return "#"; char* res; string res_s = to_...
ALGO
0.999401
5.573325
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-07-06T12:48: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": "2ac4c146df...
9b434844-8281-497c-b301-24fae1a902b9
pvr30/Cpp
DS-ALGO/Recursion/Tower_Of_Honai.cpp
/* Tower of Hanoi is a mathematical puzzle where we have three rods and n disks. The objective of the puzzle is to move the entire stack to another rod, obeying the following simple rules: 1) Only one disk can be moved at a time. 2) Each move consists of taking the upper disk from one of the stacks and placing it on to...
ALGO
0.999913
5.562965
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-06-21T16:24:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0a8eb6789b...
883a3a0e-176b-4938-a99d-f4b877e373a8
arnadd72/Struktur-Data-Assignment
MODUL 8 SEARCHING/unguided modul 8/Unguided 2 modul 8.cpp
//2311102180 #include <iostream> #include <string> using namespace std; bool isVowel(char c) { c = tolower(c); return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u'; } int main() { string kalimat; int count = 0; cout << "Masukkan sebuah kalimat: "; getline(cin, kalimat); for (...
ALGO
0.999386
5.725255
{ "github_metadata": { "branch": "main", "commit_count": 180, "repo_created_at": "2024-03-07T01:02: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": "22db01753d...
9c6a4465-6780-4c78-99b8-b1078a6272f2
rawbby/WS24-Scheduled-Linear-Equation-Solving
solver/include/solver/lu_solver_parallel.hpp
#pragma once #include "../linear_equation.hpp" #include "./lu_solver.hpp" #include <algorithm> #include <cstddef> #include <cstdlib> #include <memory> #include <thread_pool.hpp> #include <utility> #include <vector> class LUSolverParallel final : public Task { private: LinearEquation le_; std::shared_ptr<ThreadPo...
ALGO
0.997633
6.719879
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-02-09T22:57: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": "efb859258016...
6afae374-8ec2-4e25-94f0-add1e24e097c
hoanpvpv/BasicCpp
classCODEPTIT/CPP0615 - SẮP XẾP DANH SÁCH ĐỐI TƯỢNG NHÂN VIÊN.cpp
#include <bits/stdc++.h> using namespace std; class NhanVien { public: string msv,ten,gt,mst,dc,ns,nk; int ngay, thang, nam; static int dem; friend istream& operator >> (istream&, NhanVien&); friend ostream& operator << (ostream&, NhanVien); }; int NhanVien::dem=1; istream& operator >> (istream& in, NhanVie...
ALGO
0.99839
3.55895
{ "github_metadata": { "branch": "main", "commit_count": 21, "repo_created_at": "2023-08-31T09:40: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": "4608c73b0fe...
9fb5b4b8-2fb2-4cf1-a105-6f0ce53a1dcc
CMEducations/tic-tac-toe-PappaBjorn
TicTacToe.cpp
#include "pch.h" #include <iostream> #include <iomanip> #include <algorithm> #include <limits> #define gridSize 3 class Game { enum class Player { empty = '-', player = 'X', ai = 'O' }; struct Move { unsigned int x = 0; unsigned int y = 0; }; Player board[gridSize][gridSize]; public: Game() { ...
ALGO
0.971301
6.132001
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2019-10-18T00:05:49.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3f894a844aa...
296766df-3398-4f47-9696-afd527ae92ef
Gowtham-cs19b023/Object-Oriented-Analysis-And-Algo
CS19B023_A8.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int min(int a,int b,int c){ //function to find minimum of three integers return min(min(a,b),c); } class EDD{ private: string s1; string s2; int **matrix; int flag1=0; ...
ALGO
0.999082
3.699929
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-07-19T13:10: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": "604df5c2457b...
fb0bcf8d-fc2b-47c1-96f4-f28124b27127
redhd0410/coding_study
9주차/양념반후라이드반/양념반후라이드반_16917_김정현.cpp
#include <iostream> using namespace std; int MAX(int x, int y) { return x > y ? x : y; } int MIN(int x, int y) { return x < y ? x : y; } int main() { long int A, B, C, X, Y; long int value = 0; long int temp = 0; cin >> A >> B >> C >> X >> Y; temp = (5001 * 100001) + (5001 * 100001); for (int i = 0;i <= MIN(X,...
ALGO
0.998889
3.192359
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2020-07-11T02:16:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "debbdb44...
4034f1ac-1a17-4739-bcac-48874327aab1
kamusarj/udtt_tx2
vantai2.cpp
#include <bits/stdc++.h> using namespace std; void algorithm(int **f, int n, int k, int x[], int y[]) { for (int j = 0; j <= k; j++) f[0][j] = 0; for (int i = 1; i <= n; i++) { for (int j = 0; j <= k; j++) { f[i][j] = f[i-1][j]; if (y[i-1] <= j) { int temp = x...
ALGO
0.999985
3.855689
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-11-23T20:27: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": "8a67b0c9553d...
28de4a64-f0fb-42c0-a047-6ff78b0f2ea6
20bcs9772/KRG-WINTER-CAMP
DSA/circularqueue_array.cpp
#include<bits/stdc++.h> using namespace std; template <typename T> class QueuesUsingArray { T *data; int nextIndex; int firstIndex; int size; int maxSize; public: QueuesUsingArray(int s){ data = new T[s]; nextIndex = 0; firstIndex = -1; size = 0; ma...
ALGO
0.993845
3.980942
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2022-12-17T16:45:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e5f6aadcf50...
f28173fd-0ec2-4034-b4d6-8c9f08ad545f
raincross7/code-similarity
codes/train_code/problem444/problem444_366.cpp
/* Note: Check constants at the beginning of the code. N is set to 4e5 but be careful in problems with large constant factor. Setting N in every problem is more effective. Check corner cases. N = 1 No def int long lNsong for now. Add something here. */ #include <bits/stdc++.h> #define rep(i, n) for (int ...
ALGO
0.999653
3.494404
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f74be7cb450e...
34499a55-0c78-49a1-b26f-d9bbd1f6180b
amitkvikram/CS2800
week3/topologicalSort.cpp
/* Name: <NAME> Roll No.: 111601001 Problem: topologicalSort Date: 23Jan, 2018 */ #include<bits/stdc++.h> #include "dll.h" #include "stack.h" using namespace std; /*********************Back edge Information***************************************/ class backEdge{ public: int i; int j; }; /********************...
ALGO
0.99999
4.790046
{ "github_metadata": { "branch": "master", "commit_count": 67, "repo_created_at": "2018-01-02T08:49: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": "5db52ae61...
f9b0dd70-2ef0-4d9e-89dd-ffb9372151b9
simongog/sdsl
include/sdsl/lcp_construct.hpp
/* sdsl - succinct data structures library Copyright (C) 2010 <NAME> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later...
ALGO
0.990487
5.452239
{ "github_metadata": { "branch": "master", "commit_count": 334, "repo_created_at": "2012-03-22T04:33:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 106, "forks": 15, "issues": 7, "pull_requests": 1 }, "file_meta": { "content_id": "83af2...
3428c6f7-ff70-4c3a-b09c-e0275ad9cec3
caligari87/metroguelike
map.cpp
//-------------------------------- // Map data structures //-------------------------------- class TileData { public: //Set everything to "floor" initially bool CanWalk=true; bool BlocksVision=false; char Symbol='.'; bool Seen=false; bool Visible=false; int LightLevel=0; }; class MapData { public: ...
TOOL
0.977101
4.62851
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2017-09-28T19:26:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "799cde63e...
69dffacf-2d4c-457e-97cf-7083d71d8f02
vevdokimovm/Code-Directory
A.cpp
#include <iostream> #include <vector> using namespace std; vector<int> fromDectoBin(int a){ int p = 0; int twopow = 1; vector<int> powers(32); while (a){ if (a > twopow){ ++p; twopow *= 2; } else if (a == twopow) { a = 0; powers[p] = 1; break; } // a < twopow else { a -= (twopow / 2)...
ALGO
0.999967
3.473499
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2025-03-04T11:53: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": "5f9828ffb8...
4591a4bf-7339-4d30-8b33-30f1d6c58be7
PASSIONLab/MaskedSpGEMM
multiply.h
#include "CSR.h" #include <omp.h> #include <algorithm> // #include <mkl_spblas.h> template <bool sortOutput, typename IT> int MKLSpGEMM_symbolic(const CSR<IT,float> &A, const CSR<IT,float> &B, CSR<IT,float> &C) { int request = 1; int sort = 7; // don't sort anything int info = 0; // output info flag ...
ALGO
0.99696
4.703475
{ "github_metadata": { "branch": "main", "commit_count": 168, "repo_created_at": "2020-11-09T15:50:27.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 9, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "57af04304f4...
d701e549-fe89-4d1d-9e34-4152e680334e
visionworkbench/visionworkbench
src/vw/Camera/LinescanErr.cc
// __BEGIN_LICENSE__ // Copyright (c) 2006-2013, United States Government as represented by the // Administrator of the National Aeronautics and Space Administration. All // rights reserved. // // The NASA Vision Workbench is licensed under the Apache License, // Version 2.0 (the "License"); you may not use this f...
ALGO
0.958009
6.427773
{ "github_metadata": { "branch": "master", "commit_count": 5012, "repo_created_at": "2010-05-14T02:48:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 487, "forks": 233, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "9659...
3525bc51-ff20-4912-89b4-1587987af361
envyaims/Past-USACO-Solutions
silver/bcount.cpp
// Problem: Problem 3. Breed Counting // Contest: USACO - USACO 2015 December Contest, Silver // URL: http://www.usaco.org/index.php?page=viewproblem2&cpid=572 // Memory Limit: 256 MB // Time Limit: 4000 ms // Input: file bcount.in // Output: file bcount.out // Attempted: 2021-07-31 20:37:03 EST // AC #include <bi...
ALGO
0.999444
4.20361
{ "github_metadata": { "branch": "main", "commit_count": 177, "repo_created_at": "2021-06-25T12:34: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": "ec57d9d705...
525e3162-2df7-48da-a547-afb68db4aaf9
KimDaewWoong/algorithm
1321군인.cpp
#include<cstdio> #include<algorithm> using namespace std; int n, m, valBank[500050],seg[2000200]; int update(int pos, int val, int node, int x, int y) { if (pos<x || pos>y) return seg[node]; if (x == y) return seg[node] = val; int mid = (x + y) >> 1; return seg[node] = update(pos, val, node * 2, x, mid) + update(p...
ALGO
0.999602
4.496151
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2017-03-01T12:06:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c06aa3664d...
1b61cc48-2b2f-44cb-b202-19d69a10a882
Styxx/CS130A-W14
Project-1/hash.h
#include <iostream> #include "linkedlist.h" using namespace std; class Hash { Node **table; public: Hash() { table = new Node*[101]; for (int i = 0; i < 101; i++) { table[i] = NULL; } } //Returns the heapIndex of the value //Otherwise, returns -1. int getHeapIndex(int key) { int ha...
ALGO
0.995648
3.014118
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2015-02-10T22:12: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": "e14190cca...
19b8dd8c-28b2-478d-8482-047dca28ee31
lethienkim/C-Plus-Plus
Exam3/Chapter10LabA.cpp
//***************************************** // Write the program to sort the arrays and then to determines the median of a sorted array // Programmer: <NAME> // Completed:10/22/2023 // Status: Completed // Did your program pass the testing? : Yes // If you answerd "No", what requirements wer not met? // Did your prog...
ALGO
0.999993
5.725946
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2024-06-15T05:04: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": "2eac62169fdf...
cbb917aa-2278-43fc-83ae-61439d501a12
Lalitj2104/cpp
recursion/sumOfarray.cpp
#include <iostream> using namespace std; int sumOfArray(int arr[], int size) { if (size == 0) { return 0; } if (size == 1) { return arr[0]; } int sum = arr[0]; int remain = sumOfArray(arr + 1, size - 1); sum = arr[0] + remain; return sum; } void insertion(int arr...
ALGO
0.998017
5.230986
{ "github_metadata": { "branch": "main", "commit_count": 285, "repo_created_at": "2023-08-21T05:57: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": "6654c42a5a...
7c14aa7a-d826-43f3-a799-522e8e7fa458
devanescent/AdventOfCode
AdventOfCode2021.Solutions/Day13/OrigamiProcessor.cpp
#include "OrigamiProcessor.h" #include <algorithm> #include <sstream> namespace AdventOfCode::Year2021::Day13 { std::pair<std::vector<FoldInstruction>, OrigamiPaper> OrigamiProcessor::Process(std::vector<std::string> input) { auto sepLine = std::find(input.begin(), input.end(), ""); // Paper: OrigamiPaper pap...
ALGO
0.999292
5.882725
{ "github_metadata": { "branch": "main", "commit_count": 262, "repo_created_at": "2021-12-09T05:21: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": "0cf12a4539...
16afcd3c-7e7a-48e5-a029-bd6794da1a73
cymonsgames/CymonsGames
numbrixgenerator/numbrixgen.h
#ifndef NUMBRIXGEN_H_INCLUDED #define NUMBRIXGEN_H_INCLUDED class NpathGen { // Unicursal grid filling path generator for Numbrix Generation public: // constructors NpathGen (int sizex = 9, int sizey = 0, int randseed = 0); ~NpathGen (); // accesors int getXSize () {return maxx;} int getYSize () {return ...
ALGO
0.997107
5.577614
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2014-05-31T02:03:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 37, "forks": 10, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e10ccc34...
5ad4b965-18ec-479d-a4a0-db235075554a
hjwdzh/TextureNet
data/QuadriFlow/3rd/Open-WBO-2.0/code/encodings/Enc_Totalizer.cc
/*! * \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...
ALGO
0.998968
6.946342
{ "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": "7df09c21...
7b79ba54-e9b0-479d-8a45-3bcd65e67a4b
michalcywka/sorting
szybkie.cpp
int partycjonuj(vector<int> &tablica, int poczatek, int koniec) // dzielimy tablice na dwie czesci, w pierwszej wszystkie liczby sa mniejsze badz rowne x, w drugiej wieksze lub rowne od x { { int x = tablica[poczatek]; int i = poczatek, j = koniec; while (true) { while (tablica[j] > x) j--; while (tablica[i...
ALGO
0.999876
4.978398
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-05-11T18:18: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": "7fb2fccb5b...
20303ea7-2e05-4ee9-940a-c0fbdc0c4cc1
tyrolcg/AtCoder_tyrolcg
AtCoder/ABC341/C.cpp
#include<iostream> #include<string> #include<vector> #include<algorithm> #define ll long long int using namespace std; int main(){ int h, w, n; string t; vector<string> s; cin >> h >> w >> n; cin >> t; s.resize(h); for(int i = 0;i<h; i++){ cin >> s[i]; } // i番目の移動における縦横...
ALGO
0.999918
4.173064
{ "github_metadata": { "branch": "main", "commit_count": 93, "repo_created_at": "2023-07-12T14:05: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": "976b578a95d...
6fe452d5-13e0-48b3-a888-286fdc5d9f8e
gbakkk5951/OriginalProblems
奥比岛模拟赛Ⅰ/苍月塔/tagtest.cpp
#pragma GCC optimize(2) using namespace std; int main() {} #include <cstdio> #include <cctype> #include <cstring> #include <cstdlib> #include <algorithm> #include <vector> namespace OI { typedef long long lld; typedef pair<int, int> p; const int MXN = 5e6 + 10; const int X = 0, Y = 1, NXT = 2; int cnt; struct ArrayTree...
ALGO
0.999072
3.008918
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-12-27T14:52:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3deeedb464...
f58aed7e-1682-40ce-99b3-2ac41c58416f
canbal99/development
Coursera/MachineLearning/Prerequisite/Course02_Data_Structures/week1_Basic_Data_Structures/Programming-Assignment-1/tree_height/tree-height.cpp
#include <algorithm> #include <iostream> #include <vector> #if defined(__unix__) || defined(__APPLE__) #include <sys/resource.h> #endif class Node; class Node { public: int key; Node *parent; std::vector<Node *> children; Node() { this->parent = NULL; } void setParent(Node *theParent) ...
ALGO
0.999732
4.476312
{ "github_metadata": { "branch": "master", "commit_count": 41, "repo_created_at": "2017-08-12T12:59: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": "6ec68df2f...
f8ddd913-02fa-4278-88d3-b9bba0f04e7f
a22057916w/Data-Structure
stack/expression/prefix_to_infix.h
/* Algorithm 1. Read the Prefix expression in reverse order (from right to left). 2. If the symbol is an operand, then push it onto the Stack. 3. If the symbol is an operator, then pop two operands from the Stack Create a string by concatenating the two operands and the operator between them. string = (operand1 +...
ALGO
0.999282
6.32937
{ "github_metadata": { "branch": "main", "commit_count": 677, "repo_created_at": "2020-10-06T07:36:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a321a1c067...
6f108ca6-93fb-45d9-84ec-7576224c33ad
baactree/PS
BOJ/10174/10174.cpp14.cpp
///////////////////////////////////////////////////// #ifdef _DEBUG #include "bits_stdc++.h" #else #include "bits/stdc++.h" #endif using namespace std; typedef pair<int, int> pii; typedef vector<vector<pii > > Edge; typedef unsigned long long llu; typedef long long ll; typedef priority_queue<pii > Pq; typedef vector<in...
ALGO
0.999889
3.886599
{ "github_metadata": { "branch": "master", "commit_count": 224, "repo_created_at": "2017-01-14T14:53:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "911ecd12...
1b3fd385-4f6d-4942-8bc1-e1f822bbe44a
swapnil2072/DAA
lab5.cpp
#include<iostream> #include<set> #include<vector> using namespace std; void printBoard(vector<vector<char>> board){ for(auto &row:board){ for(auto &cell : row){ cout<<cell<<" "; } cout<<endl; } cout<<endl; } void placeRemainingQueens(int row,int num,vector<vector<cha...
ALGO
0.999303
4.614423
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-11-13T01:46: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": "1a594ce8be...
463ca95c-8252-44e1-9768-bcbf67aa1187
mascai/exercise
1_arrays/leetCode/6_valid_parentheses.cpp
/* https://leetcode.com/explore/challenge/card/january-leetcoding-challenge-2021/581/week-3-january-15th-january-21st/3610/ Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same ty...
ALGO
0.998913
6.758174
{ "github_metadata": { "branch": "master", "commit_count": 485, "repo_created_at": "2017-06-22T14:58:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38fa3155...
fa34008f-a83e-436d-90d2-4359f8ddbc6c
juppiiiii/algorithm
백준/Silver/#2178 미로 탐색/미로 탐색.cc
#include <algorithm> #include <iostream> #include <string> #include <vector> #include <climits> #include <queue> using namespace std; const int MAX = 100; int visited[MAX][MAX]; int n, m; int dx[] = {0, 0, 1, -1}; int dy[] = {1, -1, 0, 0}; int main() { ios_base::sync_with_stdio(false); cout.tie(nullptr); ...
ALGO
0.999989
3.855244
{ "github_metadata": { "branch": "main", "commit_count": 270, "repo_created_at": "2023-04-16T08:23: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": "f732a20c2f...
18aa5729-7f5e-4834-9aab-7fad2e3d5da6
zzm99/Algorithm-Training
动态规划/区间DP/面试题 08.14. 布尔运算.cpp
class Solution { public: int countEval(string s, int result) { int dp[25][25][2] = {0}; char sign[25]; vector<int> nums; for(int i=0; i<s.size(); i++) { if(i % 2 == 0) nums.push_back(s[i]-'0'); else sign[i >> 1] = s[i]; } for(int i=0; i<nums.si...
ALGO
0.999957
5.389396
{ "github_metadata": { "branch": "master", "commit_count": 94, "repo_created_at": "2020-06-11T13:59: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": "804818646...
2447c97f-cad0-45aa-8113-651695be35d4
onglu1/acm
codelist/Atcoder/AtCoder Regular Contest 068/D.cpp
#include <bits/stdc++.h> #define int long long #define Mid ((l + r) / 2) #define lson (rt << 1) #define rson (rt << 1 | 1) using namespace std; const int N = 2e6 + 1009; const int mod = 1e9 + 7; int n, m, a[N]; signed main() { #ifdef LOCALCOMPILE auto startTime = clock(); freopen("C:\\Users\\onglu\\CLionProjec...
ALGO
0.999986
4.538044
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2022-03-07T10:49:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "94ce54af0...
2743afe9-f69b-432a-85de-966602c6bfcd
balisyin/algor
DynamicProgram/moveGetLongestSameSubString.cpp
/* * * balisyin 20190211 * optimal substructure && overlap subproblem * */ //m次移动得到最长相同字符串 ///DP m move to get longest same substring ///like str = "ababa" m = 2; get str="baaab" #define ALPHA 26 int sameLen(int m, int n, int arr[]){ if(m == n) return 0; if(m + 1 == n) return arr[n] - arr...
ALGO
0.999986
3.737619
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2019-08-13T09:39: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": "29caddc97...
6b0ffc33-7823-4fe6-b713-a8d5146998bb
better-call-vee/XPSC_ARCHIEVE
WEEK 15/Day_3/Green_perm.cpp
/* +----------+ | Better. | | Call.Vee | +----+-----+ | V created: 11th September, 2023 20:39:50 GMT+6 */ #include <bits/stdc++.h> using namespace std; typedef long long ll; #define fast \ ios_base::sync_with_stdio(false); ...
ALGO
0.999987
5.584232
{ "github_metadata": { "branch": "main", "commit_count": 117, "repo_created_at": "2023-06-02T23:08:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c7849349d...
69b0df9f-8b2b-47f0-a3ad-a7ab22664a21
francpp/CarlemanBurgers
src/MainSimulation.hpp
#ifndef MAIN_SIMULATION_HPP #define MAIN_SIMULATION_HPP #include "discretization/Discretization.hpp" #include "error_analysis/ErrorAnalysis.hpp" #include "initial_conditions/InitialConditions.hpp" #include "matrix/CarlemanMatrix.hpp" #include "params/SimulationParameters.hpp" #include "plots/plots.hpp" #include "solve...
ALGO
0.999785
6.436409
{ "github_metadata": { "branch": "main", "commit_count": 106, "repo_created_at": "2024-07-24T21:34:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "abe1b689d7...
20363f3d-070a-4b7c-b677-f6df17d074ed
FaadCoder/Leetcode-Solutions
1632-rank-transform-of-a-matrix/1632-rank-transform-of-a-matrix.cpp
class DSU{ private: unordered_map<int,int> parent,size; public: int findParent(int child) { if(parent[child]==child) return child; return parent[child] = findParent(parent[child]); } void unionSet(int a,int b) { if(!parent.count(a)) paren...
ALGO
0.999992
6.27791
{ "github_metadata": { "branch": "main", "commit_count": 2554, "repo_created_at": "2022-02-27T05:32:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "12540ddf3...
59651c92-02df-4a4d-a537-a1cda6f0fecc
h-hkai/PAT_ADVANCED
1105_Spiral_Matrix.cpp
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> v(n); for (int i = 0; i < n; ++i) cin >> v[i]; sort(v.begin(), v.end(), [](int x, int y) -> bool { return x > y; }); int mid = sqrt(n) + 1; int row, col; for (int i = mid; i >= 1; --i) { if ...
ALGO
0.999996
3.850869
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-08-09T10:09: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": "c7e032a2cf...
2c747b87-182d-4813-99b7-81c573658d97
ShikhTawel/-Library-management-system-with-LinkedList
LinkedList.h
#ifndef PROJECT_LINKED_LIST_H #define PROJECT_LINKED_LIST_H #include <bits/stdc++.h> using namespace std; template<class T> class Node { private: T val; Node<T> *nxt; public: Node() : nxt(NULL) {} T getVal() { return val; } void setVal(T _val) { val = _val; } Node<T> *...
ALGO
0.998327
4.441495
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-06-14T00:11: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": "cbf8965e2bf3...
32908f8d-0ad6-43c8-92bc-cacd1076b07d
evpo/EncryptPad
deps/botan/src/lib/block/serpent/serpent_simd/serpent_simd.cpp
/* * Serpent (SIMD) * (C) 2009,2013 <NAME> * * Botan is released under the Simplified BSD License (see license.txt) */ #include <botan/serpent.h> #include <botan/internal/serpent_sbox.h> #include <botan/internal/simd_32.h> namespace Botan { #define key_xor(round, B0, B1, B2, B3) \ do {...
ALGO
0.999784
4.82393
{ "github_metadata": { "branch": "master", "commit_count": 733, "repo_created_at": "2016-02-21T10:00:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 448, "forks": 65, "issues": 21, "pull_requests": 0 }, "file_meta": { "content_id": "e267...
7685cac9-4b7c-4b25-98d6-72a7af97bfc1
ishandutta2007/codeforces-c
chemthan/normal/723/E.cpp
#include <bits/stdc++.h> using namespace std; #define ms(s, n) memset(s, n, sizeof(s)) #define FOR(i, a, b) for (int i = (a); i < (b); i++) #define FORd(i, a, b) for (int i = (a) - 1; i >= (b); i--) #define FORall(it, a) for (__typeof((a).begin()) it = (a).begin(); it != (a).end(); it++) #define sz(a) int((a).size()) ...
ALGO
0.999571
3.972062
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:17: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": "bdaa36997fac...
b6dc5f5e-05fb-45ef-8807-f3c51384f841
somian/Path64
pathscale/be/cg/mips/sas/modulo.cxx
/* * Copyright (C) 2007 PathScale, LLC. All Rights Reserved. */ /* * Copyright (C) 2007. QLogic Corporation. All Rights Reserved. */ /* * Copyright 2005 PathScale, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of version 2 of the GNU ...
ALGO
0.999102
5.291728
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2010-04-02T02:00:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 23, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6eca3dac...
41d6cf16-1239-4181-9a91-b4b4be2f6160
kamyu104/LeetCode-Solutions
C++/wiggle-sort-ii.cpp
// Time: O(n) ~ O(n^2), O(n) on average. // Space: O(1) // Tri Partition (aka Dutch National Flag Problem) with virtual index solution. (44ms) class Solution { public: void wiggleSort(vector<int>& nums) { int mid = (nums.size() - 1) / 2; nth_element(nums.begin(), nums.begin() + mid, nums.end()); ...
ALGO
0.999998
6.477785
{ "github_metadata": { "branch": "master", "commit_count": 19395, "repo_created_at": "2018-10-11T17:38:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4939, "forks": 1616, "issues": 1, "pull_requests": 55 }, "file_meta": { "content_id": ...
87992937-a948-4705-9aa9-5bf52e1ee4e5
joshdavham/Starting-Out-with-Cpp-Early-Objects-Unofficial-Solutions-Selected-Programming-Challenges
Chapter 10/Q5.cpp
//This program does not include error-checking #include <iostream> #include <cstdlib> #include <ctime> using namespace std; void getInput(int responses[], int length); void sort(int responses[], int length); int findMode(int responses[], int length); void disp(int responses[], int length, int mode); int main() { ...
ALGO
0.999498
3.248088
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2020-06-09T13:03: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": "2c79ca4a9...
e66b7f80-a728-4936-b318-82e7e8baea18
Dan13llljws/CP-Solutions
CSES/2111-apples-and-bananas.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; namespace fft { typedef double dbl; struct num { dbl x, y; num() { x = y = 0; } num(dbl x_, dbl y_) : x(x_), y(y_) {} }; inline num operator+(num a, num b) { return num(a.x + b.x, a.y + b.y); } inline num ope...
ALGO
0.999992
3.847236
{ "github_metadata": { "branch": "master", "commit_count": 339, "repo_created_at": "2020-04-08T22:49:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55b476b1...
e9d5dbfe-592a-45ab-b94b-43c5f766561e
bytedance/byteps
byteps/common/compressor/impl/dithering.cc
// Copyright 2019 Amazon Inc. or its affiliates. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless req...
ALGO
0.98082
7.072581
{ "github_metadata": { "branch": "master", "commit_count": 432, "repo_created_at": "2019-06-25T07:00:13.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 3686, "forks": 492, "issues": 106, "pull_requests": 7 }, "file_meta": { "content_id": "f8...
a27faa8b-d68f-4209-9e60-ef791cd7e82e
vedant-patil07/LP3
bubble.cpp
// Write a program to implement Parallel Bubble Sort using OpenMP. Use existing // algorithms and measure the performance of sequential and parallel algorithms. #include <iostream> #include <vector> #include <algorithm> #include <omp.h> #include <chrono> using namespace std; void sequentialBubbleSort(vector<int>& a...
ALGO
0.999635
6.147607
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-11-06T01: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": "32971cbf9dca...
71db1aeb-2bc5-4865-99d8-460e9f043428
tensorflow/lingvo
lingvo/tasks/car/ops/average_precision_3d_op.cc
/* Copyright 2018 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
DATA
0.988412
7.447316
{ "github_metadata": { "branch": "master", "commit_count": 4728, "repo_created_at": "2018-07-24T22:30:28.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2845, "forks": 450, "issues": 115, "pull_requests": 31 }, "file_meta": { "content_id": "...
c184e88a-8895-4023-88f4-2c68b6c6d422
annacbrandao/2024.2_PI01_T01
codigo arduino motor.ino
//codigo para mover os motores #define M0 8 #define M1 9 #define M2 10 #define dirPin 4 #define stepPin 5 //pwm de pulsos pra passo #define dirPin1 6 #define stepPin1 7 //pwm de pulsos pra passo #define stepsVolta 200 //1.8 grau por passo void setup() { // Motor pin setup pinMode(stepPin, OUTPUT); pinMo...
ALGO
0.91363
5.348398
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2024-11-25T23:09:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e0f3a9987d...
d64aa430-5b56-4af0-b64e-cb84e0aec24b
Md-Rakib-Hassan/PROBLEM-SOLVING
1627_Graph_Connectivity_With_Threshold(LeetCode).cpp
//https://leetcode.com/problems/graph-connectivity-with-threshold class Solution { public: // Function to find the root parent of node 'u' in the Union-Find data structure. // This function implements path compression to make future queries faster by // directly connecting nodes to their root parent. ...
ALGO
0.999875
6.380629
{ "github_metadata": { "branch": "main", "commit_count": 121, "repo_created_at": "2024-03-29T09:42: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": "d2865427c7...
277893a5-22b3-4e0e-9a17-01372f35a449
imanmousaei/CodeForces
1182A. Filling Shapes/1177B.cpp
#include<bits/stdc++.h> #define fastIO ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define CP(s,x) cout<<s<<" "<<x<<endl; #define ER(x) cerr<<"# "<<x<<endl; #define DPT for(int i=0;i<=n;i++){cout << "dp[" << i << "] = " << dp[i] << endl;} #define DPT2 for(int i=0;i<=n;i++){for(int j=1;j<=n;j++){cout...
ALGO
0.999221
3.323683
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2018-06-20T00:49: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": "b59756439f...
bddc3d6a-e60f-4ad2-97f1-3611ccd9929b
peaisge/shortestPath
code/MinHeap.cpp
#include "MinHeap.hpp" // Re-adapted from https://www.codeproject.com/Tips/816934/Min-Binary-Heap-Implementation-in-Cplusplus MinHeap::MinHeap(int length, int* dist) : _vector(length,0), _inverse(length,0) { _d = dist; for(int i = 0; i < length; ++i) { _vector[i] = i; _inverse[i] = i; } //Heap...
ALGO
0.998801
3.796002
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-10-28T23: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": "a68734ee01...
6a1ea873-b0e5-4eb2-b525-451d2cb78236
BaoLamIT1/TaiLieuDH
SEM3/Static/cac phep toan.cpp
/*abs(x: int) là hàm trả về giá trị tuyệt đối của số x. add(x: int, y: int) là hàm trả về tổng 2 số x và y. subtract(x: int, y: int) là hàm trả về hiệu 2 số x và y. min(x: int, y: int) là hàm trả về số nhỏ nhất trong 2 số. max(x: int, y: int) là hàm trả về số lớn nhất trong 2 số. pow(x: int, y: int) là hàm trả về xy. *...
ALGO
0.997592
4.531364
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2025-05-24T08:51:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "124a870bd39...
709fc8e7-422c-46b5-831d-e93a81825270
acostaldi/CSCE4133-HW3
src/graph.cpp
#include <graph.hpp> Graph::Graph(int n) { this->n = n; this->e = std::vector<LinkedList<std::pair<int, int> > >(n, LinkedList<std::pair<int, int> >()); this->reset(); } Graph::~Graph() { this->e.clear(); this->traces.clear(); this->visited.clear(); } void Graph::reset() { this->visited...
ALGO
0.99988
5.48246
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-10-25T12:37: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": "983ee088cf19...
ced5a1a4-3762-4915-ad59-aaaf08916780
ghugesachin0806/Data_Structure_n_Algorithm
06_Binary_Tree/10_check_balanced_tree_01.cpp
// https://practice.geeksforgeeks.org/problems/check-for-balanced-tree/1 #include <bits/stdc++.h> using namespace std; // A binary tree node structure struct Node { int data; struct Node *left; struct Node *right; Node(int x) { data = x; left = right = NULL; } }; class Solut...
ALGO
0.999968
6.05401
{ "github_metadata": { "branch": "master", "commit_count": 135, "repo_created_at": "2023-02-14T21:13:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b0178ae2...
006edadb-d067-42c6-b106-68e0cf5e2d90
task4233/contest
AtCoder/ABC/083/a.cpp
// ------------------------------------ // Date:2018/ 3/ 5 // Problem:ABC 083 Libra a.cpp // // ------------------------------------ #include <bits/stdc++.h> using namespace std; #define EACH(i,a) for (auto&& i : a) #define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i) #define RFOR(i,a,b) for(int i=(int)b-1;i>=(int)a;--...
ALGO
0.999947
3.552115
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2018-03-08T13:28:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "4a54045f...
6fba43b4-9c80-45c1-a598-d2972aeecfe9
nickgillian/grt
GRT/Util/Util.cpp
/* GRT MIT License Copyright (c) <2012> <<NAME>, Media Lab, MIT> 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 restriction, including without limitation the rights to use, copy, modify...
TOOL
0.901612
5.257901
{ "github_metadata": { "branch": "master", "commit_count": 897, "repo_created_at": "2014-01-03T03:16:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 878, "forks": 285, "issues": 80, "pull_requests": 8 }, "file_meta": { "content_id": "909...
d80311e3-cc3a-4f51-a4ba-3d5d2dc7889a
Lamiiine/Competitive-Programming-1
Solutions/-in-progress/00104 Arbitage RTE.cpp
#include<stdio.h> #include<string.h> #include<iostream> #define MAX 25 using namespace std; long double dist[MAX][MAX]; int n; int p[MAX][MAX]; int via; int bell(){ // You just run this once! for (int k = 1; k <= n; ++k) for (int i = 1; i <= n; ++i) for (int j = 1; j <= n; ++j){ if (dist[i][k] * dist[k][j] - dist...
ALGO
0.999978
3.297527
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2019-09-23T14:40:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7ebb5296...
33555ea7-b615-4de5-a523-0a9d7cdb72ca
hasanRafi2002/mixed-cpp-problems
toph12.cpp
#include <iostream> #include <cmath> // Function to check if a number is prime bool isPrime(int num) { if (num <= 1) return false; if (num == 2) return true; if (num % 2 == 0) return false; for (int i = 3; i <= sqrt(num); i += 2) { if (num % i == 0) return false; } return true; } ...
ALGO
0.99994
4.584434
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-03-09T08:49:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "daa405c131d1...
221a7fdf-c0a7-4349-93d4-c76abad903bc
nischaalc/The-CLMDB
Week10HW/Week10HW/movieDB - May be broken.cpp
#include <iostream> #include <algorithm> #include <fstream> #include <vector> #include <sstream> #include <string> #include "Movies.h" #include "List.h" #include "Node.h" using namespace std; void readFromFile(string userFileName, List<Movie>& theMovieList2, vector<string>& theActorList); void merge_sort(List<Movie>...
TOOL
0.952484
4.427213
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2014-05-31T19:40:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92778d0d5...
fc2ce51c-ecba-46e5-b5bd-a9220ebc4d9b
MostafaAE/LeetCode
0948-bag-of-tokens/0948-bag-of-tokens.cpp
class Solution { public: /* * Approach: * Sort the tokens, then use two pointers technique (left, right), always paly the smallest token face up if possible or play the largest token face down while maintaining the highest score (greedy). * * Complexity: * Time Complexity : O(nlogn) * ...
ALGO
0.999925
6.121213
{ "github_metadata": { "branch": "master", "commit_count": 3923, "repo_created_at": "2022-09-06T16:24: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": "9f2de31...
3eb7abcf-b064-42df-b0d5-a9253b49b6a2
TCODeva/Algorithms
Backtracking/Medium/17. Letter Combinations of a Phone Number.cpp
/* LeetCode 17. Letter Combinations of a Phone Number * Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent. * * A mapping of digit to letters (just like on the telephone buttons) is given below. Note that 1 does not map to any letters. * *...
ALGO
0.999558
6.179099
{ "github_metadata": { "branch": "master", "commit_count": 200, "repo_created_at": "2018-06-21T07:25:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2c0a17e5...
63e9da3e-1583-4573-b2df-d7e9081a0ba9
Spiffs/AIE_Programming_Year1
DailyWarmups/14_Othello/Othello.cpp
#include <iostream> #include <vector> struct pos { int x; int y; }; typedef std::vector<std::vector<char>> OthelloBoardState; bool IsValidMove(char player, int y, int x, const OthelloBoardState& grid) { pos temp{ x, y }; if (grid[x + 1][y] != player || grid[x - 1][y] != player || grid[x][y + 1] != player ...
ALGO
0.995375
5.789406
{ "github_metadata": { "branch": "master", "commit_count": 49, "repo_created_at": "2020-07-29T05:32: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": "dd907b9d1...
40e6320f-1483-4d92-9fbe-e96a7bde9a32
ibudiselic/contest-problem-solutions
tc 160+/Cards.cpp
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> using namespace std; class Cards { public: vector <string> deal(int numPlayers, string deck) { vector<string> sol(numPlayers, ""); for (int i=0; i<(int)deck.siz...
TEST
0.999425
4.790643
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2011-08-14T11:43:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b25817af1...
ac63831f-5b87-49c9-9890-b2f190b65f6c
tsfo1489/BOJ
C++/2206.cpp
#include<stdio.h> int g[1005][1005],chk[1005][1005],n,m,ans[2][1005][1005]; struct QUEUE { int x,y,a; }q[1000005]; void F(int sx,int sy,int way) { int i,j,f,r,x,y,k; f=r=0; k=1; x=sx; y=sy; for(i=1;i<=n;i++) for(j=1;j<=m;j++) chk[i][j]=0; while(1) { if(g[x-1][y]==0 && chk[x-1...
ALGO
0.999971
3.039051
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-07-02T08:27:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8fcfba17...
41cbe08d-04a5-412b-a625-d0cb708e57c5
gfattori/applyM_p
main.cpp
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <iostream> #define NPOINTS 10 #define tdimx 4 #define tdimy 4 // | | // | R |T // |-----| // | |1 #define bdimx 3 #define bdimy 10 // |---|---|---| // | x | y | z | // |---|---|---| // |---|---|---| double* applyM_p(double * buf, doub...
ALGO
0.999672
4.004911
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2012-04-02T23:35:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f420fec264...
d26d278b-1359-4621-ba25-04aaf0200bc0
morris821028/UVa
volume132/13260 - Alice's Travels II[opt].cpp
#include <bits/stdc++.h> using namespace std; // same HDU 5052 Yaoge's maximum profit const int64_t INF = 1LL<<60; const int MAXN = 50005; int K; class LCT { // Link-Cut Tree public: static const int MAXN = 65536; struct Node { static Node *EMPTY; Node *ch[2], *fa; int rev; i...
ALGO
0.99993
3.825403
{ "github_metadata": { "branch": "master", "commit_count": 1197, "repo_created_at": "2013-06-14T12:34:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 571, "forks": 269, "issues": 1, "pull_requests": 1 }, "file_meta": { "content_id": "a09...
778d3ec7-2c3e-45da-9dd4-5bd80874482d
raincross7/code-similarity
codes/train_code/problem390/problem390_247.cpp
#include <iostream> #include <fstream> #include <vector> #include <algorithm> #include <string> #include <math.h> using namespace std; long long bins (long long k, long long l, long long r){ long long q = (r+l) / 2; long long qq = r * r; //cout << l << ' ' << r << '\n'; if (r - l <= 1){ if (qq...
ALGO
0.999926
3.287502
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f1ffd9a04f71...
935ce2fd-51b5-4775-813e-7654d96c4f4c
AryanThakur01/DataStructureAndAlgorithm
2d_array/binarySearch.cc
#include <iomanip> #include <iostream> using namespace std; class MatrixFunctions { public: int find(int mat[][4], int value) { int row = 3; int col = 4; int start = 0; int end = row * col - 1; int mid = start + (end - start) / 2; while (start <= end) { int element = mat[mid / col][...
ALGO
0.99987
4.889221
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2023-08-17T16: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": "f7165ecb715...
ec4fd76e-0a9b-44c9-a854-9354182b7c03
omkar-nath/Tree-Data-Structure
vertical_traversal.cpp
#include<bits/stdc++.h> using namespace std; typedef struct node { int data; struct node *left,*right; }Node; Node *newNode(int a) { Node * root=(Node*)malloc(sizeof(Node)); root->data=a; root->left=root->right=NULL; return root; } void hori_cal(Node *root,int hori,map<int,vector<pair<int,int> > > &m,int lev...
ALGO
0.999992
3.838322
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-08-24T15:56: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": "2d868d6cd3...
a4257bac-8e0b-499a-bae7-0a1b2d6551fd
NestZ/competitive-programming
CodeForces/1515C.cpp
#include<bits/stdc++.h> using namespace std; #define endl '\n' typedef long long int ll; #define sim template < class c #define ris return * this #define dor > debug & operator << #define eni(x) sim > typename \ enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) { sim > struct rge { c b, e; }; sim > rge<c...
ALGO
0.999971
3.996811
{ "github_metadata": { "branch": "master", "commit_count": 439, "repo_created_at": "2019-01-23T05:34: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": "5eee5e1f...
df27630d-2307-4509-8e36-fabbb5b0df10
magichear/Calc-method
Lab7/Solver/Main.cc
#include "GaussSeidelSolver.hh" #include "SORSolver.hh" #include <memory> #include <vector> int main() { // 初始化矩阵和右端向量 vector<vector<Value>> A = { { 31, -13, 0, 0, 0, -10, 0, 0, 0}, {-13, 35, -9, 0, -11, 0, 0, 0, 0}, { 0, -9, 31, -10, 0, 0, 0, 0, 0}, ...
ALGO
0.999926
5.316132
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2025-02-28T15:54: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": "3f8a75d436...
f2e16624-dccc-4c5b-95e4-436eb1ce3203
ishandutta2007/codeforces-k
krijgertje/normal/1530/F.cpp
#include <algorithm> #include <iostream> #include <sstream> #include <string> #include <vector> #include <queue> #include <set> #include <map> #include <cstdio> #include <cstdlib> #include <cctype> #include <cmath> #include <cstring> #include <list> #include <cassert> #include <climits> #inclu...
ALGO
0.999905
3.681717
{ "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": "208b4c9d404e...
7012d156-f6f3-41fe-9079-d88112b2e427
Igronemyk/OI
HSDFZ/4562.cpp
#include <cstdio> #include <iostream> using namespace std; template<typename T> T read() { T result = 0;int f = 1;char c = getchar(); while(c > '9' || c < '0') {if(c == '-') f *= -1;c = getchar();} while(c <= '9' && c >= '0') {result = result * 10 + c - '0';c = getchar();} return result * f; } int ma...
ALGO
0.999824
3.334944
{ "github_metadata": { "branch": "master", "commit_count": 109, "repo_created_at": "2017-09-14T04:04:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cd4e1cc7...
e2193311-35ec-46ea-87ca-64a6634f0451
abhaypsxd/neetcode
linkedList/addTwoNumbers.cpp
#include <bits/stdc++.h> #include "classNode.h" using namespace std; int getSize(ListNode* head){ int n = 0; while(head){ n++; head = head->next; } return n; } void padWithZeroes(ListNode* l1, ListNode* l2){ while(l1->next){ if(l2->next)l2 = l2->next; else{ ...
ALGO
0.999964
5.517942
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2025-05-30T05:44:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ad1c64556fb6...
f663eb28-df92-47ca-a5f3-918e88720a72
firewood/topcoder
atcoder/abc_321/e.cpp
#include <algorithm> #include <cctype> #include <cmath> #include <cstring> #include <iostream> #include <sstream> #include <numeric> #include <map> #include <set> #include <queue> #include <vector> using namespace std; int main() { int64_t T; cin >> T; for (int tt = 0; tt < T; ++tt) { int64_t N, X, K, ans = 0, p...
ALGO
0.999705
4.063581
{ "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": "a64497...
e49a21ca-4774-4a29-9ceb-38bb1617a9e5
ishandutta2007/codeforces-n
ngochai94/normal/690/C1.cpp
#include <bits/stdc++.h> using namespace std; #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 REP(i,a) FOR(i,0,(a)-1) #define reset(a,b) memset(a,b,sizeof(a)) #define BUG(x) cout << #x << " = " << x << endl #define mod 1000000007 #define pi acos(-1) #defi...
ALGO
0.99997
4.453432
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T15:35:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "aa2bc9b9033c...
0aff43b0-f17e-4b55-ac69-bf3d726950eb
erleben/OpenTissue
unit_tests/collision/continuous/conservative_advancement/src/unit_conservative_advancement.cpp
// // OpenTissue, A toolbox for physical based simulation and animation. // Copyright (C) 2007 Department of Computer Science, University of Copenhagen // #include <OpenTissue/configuration.h> #include <OpenTissue/core/math/math_basic_types.h> #include <OpenTissue/collision/continuous/continuous_default_motion_policy....
TEST
0.928092
5.816488
{ "github_metadata": { "branch": "master", "commit_count": 78, "repo_created_at": "2018-02-11T18:06:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 101, "forks": 28, "issues": 14, "pull_requests": 0 }, "file_meta": { "content_id": "87ae0...
9dc1d485-d756-4042-a02f-d831c8ac83ea
chobyeongjun/Cpp
Day3.cpp
#include <iostream> using namespace std; int main() { int a = 100; int b = 20; // 1. 산술 연산 cout << "--- 산술 연산 ---" << endl; cout << "a + b = " << (a + b) << endl; cout << "a - b = " << (a - b) << endl; cout << "a * b = " << (a * b) << endl; cout << "a / b = " << (a / b) << " (몫!)" << e...
TOOL
0.955325
3.253046
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-06-11T15:55: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": "883b35436fe...
edabddc7-6715-45fd-a34f-74d503ba32e7
duongnguyen291/DSA
practice in class/week6/ex2.cpp
#include <bits/stdc++.h> using namespace std; struct node{ int data; node *next; }; //makeNode int makeNode(int x){ node *new_node = new node(); new_node->data = x; new_node->next = NULL; return new_node; } //insert node at the head node *InsertToHead(node *head, int X){ node *new_node = ...
ALGO
0.999906
4.125553
{ "github_metadata": { "branch": "main", "commit_count": 118, "repo_created_at": "2023-04-01T08:11:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1d372d05ac...
af6fcb81-0c0a-4b57-bcf0-c39e12e652d7
sepi4/algoritmit2
towers.cpp
#include <iostream> #include <ctime> using namespace std; long long int siirtoja = 0; long long int kutsuja = 0; void print_move(char fr, char to) { siirtoja++; // cout << "move from " + fr + " to " + to << endl; } void towers(int n, char fr, char to, char spare) { kutsuja++; if (n == 1) print_move(fr, ...
ALGO
0.999736
3.83826
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2018-04-12T16:48: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": "84ef9c97c6...
a07ef3fc-8dac-4b3f-ba0b-569722e4b84b
DuyLongg/DataStructure_Algorithms_PTIT
Algorithm/1.Sinh_quaylui_nhanhcan/To_hop_tiep_theo/To_hop_tiep_theo.cpp
#include <iostream> using namespace std; int main (){ int T = 0; cin >> T; while (T--){ int N,K; cin >> N >> K; int a[K+1]; int b[K+1]; int bre = 0; for (int i = 1 ; i <= K ; i++){ cin >> a[i]; b[i] = a[i]; } for (int i = K ; i > 0 ; i--){ if (b[i] != N-K+i){ b[i] = b[i] + 1; for (i...
ALGO
0.999876
3.121455
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2020-06-27T03:19:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "631e7bcb5...
8d450d6c-e400-4789-87e3-320fa95aa064
ishandutta2007/codeforces-t
tinsane/normal/321/E.cpp
#pragma region Template #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <iomanip> #include <cstdio> #include <cstdlib> #include <queue> #include <vector> #include <map> #include <cmath> #include <string> #include <cstring> #include <utility> #include <stack> #include <set> #include <algorithm> #include <bi...
ALGO
0.999678
3.523681
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "73772e995dab...
3c774863-965c-44a3-b52c-420e91abf867
Aqendo/olproga
yandex/do1/I.cpp
#include <bits/stdc++.h> using namespace std; struct Segtree { vector<int> tree; Segtree(vector<int>& a) : tree(2 * a.size() - 1) { build(a, 0, 0, (int)a.size() - 1); } void build(vector<int>& a, int x, int lx, int rx) { if (lx == rx) { tree[x] = a[lx]; return; } ...
ALGO
0.999985
5.05717
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2024-09-05T16:33: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": "bc615a05034...
ba785f9e-c88b-41f8-9710-048833e58894
imgabiii27/reiven
Gabriel_Reiven_lab2.cpp
#include <iostream> using namespace std; typedef struct Node{ string songName; Node *link; }Node; Node *createNode(string data){ Node *newNode = new Node; newNode->songName = data; newNode->link = NULL; return newNode; } void traverse(Node *head){ Node ...
ALGO
0.97307
4.09058
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2025-02-15T03:21: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": "0054a0265eea...
c2a5d801-4ac9-4ba2-b82f-c741562ecf37
dahliaOS/fuchsia-pi4
src/devices/lib/dev-operation/include/lib/operation/helpers/algorithm.h
// Copyright 2021 The Fuchsia Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef SRC_DEVICES_LIB_DEV_OPERATION_INCLUDE_LIB_OPERATION_HELPERS_ALGORITHM_H_ #define SRC_DEVICES_LIB_DEV_OPERATION_INCLUDE_LIB_OPERATION_HELPERS_ALGORI...
ALGO
0.934236
7.558036
{ "github_metadata": { "branch": "main", "commit_count": 106956, "repo_created_at": "2021-05-16T21:27:34.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 8, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "d741a7e2...
ab703d93-6bf3-46b7-9280-3751f44e14d5
leinad1000/Prosjekt1
project1c.cpp
#include <iostream> #include <cmath> #include <fstream> #include <iomanip> #include "project1.h" using namespace std; extern ofstream ofile; void poissonc(int n, int* a, int* b, int* c, double* x,double* f_tilde,double* v,double* c_marked,double* f_marked,double* u){ // Calculating the step size double h; ...
ALGO
0.999945
3.96626
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-09-08T14:39: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": "30093b800d...
80e30431-9017-47ac-8418-510342b48b9b
serna37/asakatu
20240205/d/main.cpp
#include <bits/stdc++.h> using namespace std; int main() { int N, Q; cin >> N >> Q; vector<vector<int>> G(N); for (int i = 0; i < N - 1; i++) { int a, b; cin >> a >> b; a--, b--; G[a].push_back(b); G[b].push_back(a); } vector<int> d(N, 0); while (Q--) ...
ALGO
0.999913
4.922568
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-01-02T11:09: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": "8631f5c9357...
53b85e52-cef6-40dd-b1a6-378ca715dfbf
T0whed/Codeforce-s-Solution
NotaSubstring.cpp
#include<bits/stdc++.h> using namespace std; #define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define int long long int #define endl "\n" const int N = 1e6 + 7; void stdio() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif } void so...
ALGO
0.999769
4.189385
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2024-05-22T07:59: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": "545b2e21377...
1ae89b37-43e2-42d6-a348-e1f229243d81
chenlu11/ETH-Algorithms-Lab---AS16
week3/first_hit.cpp
#include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <iostream> #include <stdexcept> #include <iomanip> using namespace std; typedef CGAL::Exact_predicates_exact_constructions_kernel K; typedef K::Point_2 P; typedef K::Segment_2 S; typedef K::Ray_2 R; double floor_to_double(const K::FT& x) { doubl...
ALGO
0.999614
4.171103
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2017-11-21T10:29: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": "e0fef94482...
da7c1859-c2e5-40b5-b0f1-7615333d409a
77Arafat383/Previous-contest-problem
D_Ynor_s_girlfriend.cpp
//**************<NAME>**************** //*******************<NAME>**************** #include<bits/stdc++.h> using namespace std; #define check cout<<'?'<<endl; #define ll long long const int M = 1e9+7; const ll bM = 998244353; const ll INF = 1e18; #define all(x) x.begin(), x.end() #defin...
ALGO
0.999985
3.479198
{ "github_metadata": { "branch": "master", "commit_count": 25, "repo_created_at": "2024-09-26T12:35: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": "fae76f7d1...
fa50344f-3106-4e9c-8fbd-017f06d80e80
Shriya-Jaiswal/DSA_POTD_Questions_solving
556_Lucky_Numbers_in_a_Matrix_Leetcode_1380.cpp
#include<iostream> #include<vector> #include<limits.h> using namespace std; // // ▶️ Ask by : Apple ✯ Cisco // // ▶️ Approach-1 (Using Simple Traversal and extra space) // // ⏲️ Time Complexity : O(m*n) // // 🛢️ Space Complexity : O(m+n) // vector<int> luckyNumbers (vector<vector<int>>& matrix) { // int m = m...
ALGO
0.999968
6.419942
{ "github_metadata": { "branch": "main", "commit_count": 768, "repo_created_at": "2023-10-01T15:53:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e93a98061c...
b3d671d4-19f3-4733-ba9c-d10e64aff78e
davisking/dlib
dlib/svm/linearly_independent_subset_finder_abstract.h
// Copyright (C) 2008 <NAME> (<EMAIL>) // License: Boost Software License See LICENSE.txt for the full license. #undef DLIB_LISf_ABSTRACT_ #ifdef DLIB_LISf_ABSTRACT_ #include "../algs.h" #include "../serialize.h" #include "kernel_abstract.h" namespace dlib { template < typename kernel_type > ...
ALGO
0.93675
6.782349
{ "github_metadata": { "branch": "master", "commit_count": 8325, "repo_created_at": "2014-01-29T00:45:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 14068, "forks": 3436, "issues": 41, "pull_requests": 5 }, "file_meta": { "content_id": ...
a863e141-1c37-46d3-b063-b274819d4a7d
NervanaSystems/ngraph
src/ngraph/runtime/reference/lrn.hpp
//***************************************************************************** // Copyright 2017-2020 Intel Corporation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://w...
ALGO
0.994139
7.511264
{ "github_metadata": { "branch": "master", "commit_count": 5953, "repo_created_at": "2017-07-25T02:02:38.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1347, "forks": 217, "issues": 5, "pull_requests": 0 }, "file_meta": { "content_id": "79e...
61d37a86-eddf-4e72-b291-863e462cedeb
StevenMaMei/Competitive-Programming
Contest/Codeforces/Div2_604/A/main.cpp
#include <bits/stdc++.h> #define ff first #define ss second #define mp make_pair #define pb push_back #define fore(i,low,n) for(int i=low;i<n;i++) using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); #ifdef LOCAL freopen("input.txt", "r", stdin); #else #define...
ALGO
0.999957
3.441052
{ "github_metadata": { "branch": "master", "commit_count": 75, "repo_created_at": "2019-10-18T23:28: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": "9f34a865e...
cda2b044-3333-4aac-a4ac-291627396246
SharadaShehan/210690B-In21-S2-CS2023
Week_6/StackUsingLinkedList.cpp
#include <iostream> #include <chrono> using namespace std; struct Node { int data; Node *next; }; class StackUsingLinkedList { private: Node* top; int size; int count = 0; public: StackUsingLinkedList(int s) { top = nullptr; size = s; } ...
ALGO
0.999007
6.12152
{ "github_metadata": { "branch": "main", "commit_count": 77, "repo_created_at": "2023-03-27T16:26:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ec68f01ed8c...