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
786b35fb-e9dc-4658-8fa0-57511e18b9f3
luismoax/Competitive-Programming---luismo
SPOJ_ACCEPTED/ACODE.cpp
/* Author: <NAME> (LUISMO) Problem: ACODE Online Judge: https://www.spoj.com/problems/ACODE/ Idea: DP */ #include<bits/stdc++.h> // Types #define ll long long #define ull unsigned long long // IO #define sf scanf #define pf printf using namespace std; typedef pair<int, int> pii; const ll inf = 1e18 + 3; const int...
ALGO
0.999768
3.681853
{ "github_metadata": { "branch": "master", "commit_count": 218, "repo_created_at": "2020-03-28T14:52: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": "564469e7...
fc7cbf3b-4ad7-4976-aaef-68b8b838217c
avcopan/MPACK
mblas/reference/Cher2k.cpp
/* * Copyright (c) 2008-2010 * <NAME> * All rights reserved. * * $Id: Cher2k.cpp,v 1.7 2010/08/07 05:50:10 nakatamaho Exp $ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source cod...
ALGO
0.968189
4.014544
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-12-18T18:49:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a02c990f0...
a5bfac59-03e0-45c2-a6c8-a7f0b7957bae
jatinchowdhury18/KlonCentaur
TeensyCentaur/src/GainStageProcessors/wdf.h
#ifndef WDF_H_INCLUDED #define WDF_H_INCLUDED #include "omega.h" #include <string> #include <cmath> namespace WaveDigitalFilter { /** Wave digital filter base class */ class WDF { public: WDF (std::string type) : type (type) {} virtual ~WDF() {} virtual inline void calcImpedance() {} virtual inline v...
TOOL
0.943675
6.586178
{ "github_metadata": { "branch": "master", "commit_count": 136, "repo_created_at": "2020-05-18T19:50:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 339, "forks": 28, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "5949a...
5dd4ba07-cacd-4f72-9814-831c18de8681
lynn0506/baekjoon
bj_3055.cpp
#include <iostream> #include <algorithm> #include <utility> #include <map> #include <stack> #include <queue> #include <string.h> #include <cstdlib> #include <vector> #include <math.h> using namespace std; int N, M; bool visit[52][52] = {}; int Move[4][2] = { {0, 1}, {0, -1}, {1, 0}, {-1, 0} }; pair<in...
ALGO
0.999858
3.810158
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2020-04-21T06:39: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": "510b9f170...
64ff552e-8d0d-4e9d-a659-91b2c7c70f0d
emthrm/cp-library
test/geometry/geometry.15.test.cpp
/* * @title 計算幾何学/計算幾何学 (2円の共通接線) * * verification-helper: PROBLEM http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=CGL_7_G * verification-helper: ERROR 0.00001 */ #include <algorithm> #include <iomanip> #include <iostream> #include <ranges> #include <vector> #include "emthrm/geometry/geometry.hpp" int ...
ALGO
0.995662
4.417646
{ "github_metadata": { "branch": "main", "commit_count": 429, "repo_created_at": "2021-02-08T19:37:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "356b65bcf...
05099e7a-d93a-4fb7-8d85-433ca509c1c3
Megg01/CSII201-C-Language
Lab11/HW1.cpp
#include<stdio.h> #include<string.h> #include<stdlib.h> struct Student{ char fname[20], lname[20], id[10]; float golch; }; typedef struct Student Student; void read_students(Student a[], int n){ printf("\n"); for(int i=1;i<=n;i++){ printf("First name:"); scanf("%s", (a[i].fname)); printf("Last name:"); scan...
TOOL
0.989609
3.165269
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-04-26T16:28: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": "ee0405d1c3b2...
72f93c19-2e80-42ef-a109-d0c3c2b4be43
jowce-12/workspace
AlgorithmStudy/AlgorithmStudy/1431.cpp
#include<algorithm> #include<string> #include<iostream> using namespace::std; #define NUM_LINE 50 #define LEN_LINE 50 string line[NUM_LINE]; bool compare_line(string& left, string& right) { if (left.length() < right.length()) return true; else if (left.length() > right.length()) return false; int i; int sum_left...
ALGO
0.999801
4.395696
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2021-11-21T11:41: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": "c08bf62c32b...
8b5c9134-dee3-4b7b-9ba1-8ab828f6ce23
RS-codes/DataStructures_Stack
2.3-a_Reversal_using_Stack_STL.cpp
/* 2.3-a Reversal using Stack STL */ /*Reverse a string and Linkedlist using Stack*/ /*using stack to Reverse a string using STL*/ /*Time complexity: O(n) Space complexity: O(n) NOTE: To make space complexity : O(1) , we can use two pointers i,j i->start,j->end; while(i<j) swap elements of i and j ; i++, j--;...
ALGO
0.998738
5.177915
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2020-01-28T02:22: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": "e5d01a3050...
ac999a35-f169-4f3e-abc5-1a7f5934a39a
sclshu3714/MODELWORX.CORE
OCCT.Foundation.NetHost/ModelingAlgorithms/TKTopAlgo/BRepApprox/XXXBRepApprox_MyGradientbisOfTheComputeLineOfApprox_0.cpp
// Created on: 1995-06-06 // Created by: <NAME> // Copyright (c) 1995-1999 Matra Datavision // Copyright (c) 1999-2014 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // // This library is free software; you can redistribute it and/or modify it under // the terms of the GNU Lesser ...
ALGO
0.990578
4.396095
{ "github_metadata": { "branch": "master", "commit_count": 259, "repo_created_at": "2020-09-29T03:16:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "47a0cbae...
08073c27-af54-4443-83a8-57958ea13ac2
iknam/Problem-Solving
Koistudy/Unsolved/Selection/008E.cpp
#include <set> #include <list> #include <queue> #include <stack> #include <cmath> #include <vector> #include <string> #include <iomanip> #include <cassert> #include <sstream> #include <utility> #include <iostream> #include <algorithm> using namespace std; long long int bi_search(long long ...
ALGO
0.999847
3.460996
{ "github_metadata": { "branch": "master", "commit_count": 142, "repo_created_at": "2015-08-03T11:54: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": "1e4ffec1...
ff61e90f-5f46-4883-9f89-495b67d91b92
Abdullah-Official/DSA-CPP
Algorithms Solving/ParathaProblem.cpp
#include<iostream> #include <algorithm> #include <vector> using namespace std; bool minPossible(vector<int> &rank,int mid,int m){ int dishes=0; // loop through the cooks for(int i=0;i<rank.size();i++){ int sum=0; // loop through the dishes for(int j=1;sum<=mid;j++){ s...
ALGO
0.999985
4.495431
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2023-01-07T15:41:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "385915c80...
4a64cdfd-6529-4358-aa1f-4f5d6044a30a
Jaewook-Lee/Kookmin-Codes
C++/Algorithm/sudoku_4*4-hw.cpp
#include <iostream> using namespace std; #define _SUDOKU_SIZE_ 4 int sudokuBoard[_SUDOKU_SIZE_][_SUDOKU_SIZE_]; bool solveSudoku(int, int); void printAnswer(); bool isPossible(int, int); int main() { int numCases; cin >> numCases; for (int i = 0; i < numCases; i++) { for (int j = 0; j < _SUDOKU_S...
ALGO
0.999509
5.86655
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-11-21T12:17: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": "ceedb292b5ce...
c30cda10-ba7f-4262-b77d-637a26c3c868
moshelooks/moses
moses2/util/algorithm.h
/**** Copyright 2005-2007, <NAME> and Novamente LLC 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 l...
TOOL
0.993886
6.694602
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2015-03-23T17:11:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "b8c1c1266e...
0a7188f1-0887-4bf8-81f2-3dc815970a2d
Taara-Sinh-Aatrey/Contests
kickstart/2021/E/B.cpp
#include <bits/stdc++.h> using namespace std; template<typename A, typename B> istream& operator>>(istream &is, pair<A, B> &p) { return is >> p.first >> p.second;} template<typename T_container, typename T = typename enable_if<!is_same<T_container, string>::value, typename T_container::value_type>::type> istream& oper...
ALGO
0.999927
4.256371
{ "github_metadata": { "branch": "main", "commit_count": 260, "repo_created_at": "2021-01-25T08: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": "a25bb152b6...
62907bdb-e6c1-4aa1-bd1a-147de36e157b
artificial-intelligence-department/ai_programming_playground_2024
ai_13/yelyzaveta_osinna/epic_5/algotester_lab_4_task_2_yelyzaveta_osinna.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; // Функція для знаходження різниці A - B vector<int> difference(const vector<int>& A, const vector<int>& B) { vector<int> result; for (int a : A) { if (find(B.begin(), B.end(), a) == B.end()) { // Якщо a не в B ...
ALGO
0.99998
5.438377
{ "github_metadata": { "branch": "main", "commit_count": 2638, "repo_created_at": "2024-09-22T19:14:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 7, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7c1f10f95f...
a3ca51d8-7ee0-4ed8-8f8a-1bbed3ccc053
Ripchic/algorithms
sem-2/BFS/maze/labyrinth.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> int main() { std::ios_base::sync_with_stdio(false); std::queue<std::pair<int, int>> q; std::cin.tie(nullptr); size_t n, m = 0; std::cin >> n >> m; std::vector<std::vector<int>> field(n, std::vector<int>(m, 0)); for ...
ALGO
0.999937
5.284968
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-07-20T15:10:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d61a37ac793b...
35e6fc38-8e4c-4ad6-b527-7545fedd8ee0
spadananupam/Lab4
lab4q5.cpp
#include<iostream> #include<cmath> using namespace std; int isPrime(int num); int isArmstrong(int num); int isPerfect(int num); int main() { int num; cout<<"Enter any number: "; cin>>num; if(isPrime(num)) { cout<<num<<" is a prime number .\n"; } else { cout<<num<<" is...
ALGO
0.996938
3.160895
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-09-15T16:57:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "71bd5dce4f...
368c496b-994b-45e4-b5a0-aca7409d6ae9
fyrsta7/LLM_on_ASAC
result_api_backup/en_without_annotation_mzn/o1-mini/Cultural_Journey.cpp
#include<bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, pair<int, int>> pii; int main(){ ios::sync_with_stdio(false); cin.tie(0); int N, K, M, S, T; cin >> N >> K >> M >> S >> T; vector<int> C(N+1); for(int i=1;i<=N;i++) cin >> C[i]; // Read A vector<vector<...
ALGO
0.999827
4.518017
{ "github_metadata": { "branch": "main", "commit_count": 42, "repo_created_at": "2024-08-11T08:13: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": "a660d7a24bf...
fa6d3659-199c-4281-b4f0-a57804fa8b80
CQCL/tket
libs/tktokenswap/src/DistancesInterface.cpp
// Copyright Quantinuum // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writin...
CONFIG
0.918186
6.574506
{ "github_metadata": { "branch": "main", "commit_count": 1453, "repo_created_at": "2021-09-13T12:46:23.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 282, "forks": 51, "issues": 73, "pull_requests": 3 }, "file_meta": { "content_id": "3287bc...
78fa4332-cb26-44b4-bced-629f50506ed0
matijabelec/cpp-algorithms
prog1-examples/exams/150623_2_rj.cpp
/******************************************************************************* Napravite program koji rješava sljedeći problem: Ulaz: Prirodni broj N. Unos treba ponavljati sve dok nije ispravan. N unosa od kojih se svaki sastoji od dva decimalna broja i stringa. Izlaz: Sortirati unose unose u...
ALGO
0.996496
4.396109
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2015-05-04T12:48:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3ccf4fd77...
3abb34ac-f945-4731-af1b-bb9e1799a993
nmarquesin/CPlusPlusComMarcela
lab01/3-3.cpp
// Lab 01 section 3.3 // Prime Numbers // Write a program to read a number N from the user and then find the first // N primes. A prime number is a number that only has two divisors, one // and itself. #include <iostream> using namespace std; bool isPrime(int num) { for (int i = 2; i<num ; i++) { if (num % i ...
ALGO
0.998684
4.087938
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-03-05T14:59: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": "b1204f941d...
82f7f936-f0a4-4915-ba18-a646fff9b718
luong-komorebi/CS163
1551020_Week07/ex2.2c/main.cpp
// <NAME> 1551020 //for this problem we use breadth first search #include <iostream> #include <list> using namespace std; class Graph { int V; list<int> *adj; bool* visited = new bool[V]; public: Graph(int V); void addEdge(int v, int w); void BFS(int source, int &component); }; Graph::Graph(int V) { this->V...
ALGO
0.999894
5.385892
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2016-06-02T17:13:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "6fc632624...
044c91a1-e7df-4139-8dbf-fbf0e94160d5
ryan-weaverr/CPSC2150-SearchingSorting
Sorts.h
/* * Name: <NAME> * Date Submitted: 9/29/2021 * Lab Section: 05 * Assignment Name: Lab 4: Searching and Sorting */ #pragma once #include <vector> #include <time.h> using namespace std; template <class T> std::vector<T> mergeSort(std::vector<T> lst) { int size = lst.size(); if (size == 1) return lst; //fir...
ALGO
0.999891
5.621062
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-10-18T01:11: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": "8d93391d4ade...
9409fffa-336b-4d8c-a0e2-cb7f73002d23
PublicTvAdvertising/OlympusDictation
app/src/main/jni/DssFundamentals/StandardPlay/sp_Snr.cpp
/***ABS****************************************************************** * snr.c * -------------------------------------------------------------------- * * * snr - computes SNR results during run of abs program. * * ------------------------------------------------------------...
ALGO
0.999183
5.465256
{ "github_metadata": { "branch": "OlympusFinalBuild", "commit_count": 20, "repo_created_at": "2019-07-03T05:42: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":...
e0285228-46f7-4a0f-b978-99e66b08d976
zephyr-fun/LeetCodeSolution
math/2578_Split_With_Minimum_Sum.cpp
// 2023.10.10 class Solution { public: int splitNum(int num) { string n = to_string(num); sort(n.begin(), n.end()); string n1 = ""; string n2 = ""; for (int i = 0; i < n.size(); i += 2) { n1 += n[i]; if (i + 1 < n.size()) { n2 += n[i + ...
ALGO
0.999922
5.168873
{ "github_metadata": { "branch": "main", "commit_count": 2658, "repo_created_at": "2020-11-24T08:19:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3e0d8fd24...
998b81cd-caca-4517-82bb-7087fc6387ed
JKHila/baekjoon-practice
DFS,BFS/7576 - tomato.cpp
#include <cstdio> #include <queue> using namespace std; int main(){ int box[1001][1001]; int check[1001][1001]; queue<pair<int,int> > q; int N,M; scanf("%d %d",&N,&M); for(int i = 0;i<M;i++){ for(int j = 0;j<N;j++){ check[i][j] = -1; scanf("%d",&box[i][j]); ...
ALGO
0.999982
3.256165
{ "github_metadata": { "branch": "master", "commit_count": 215, "repo_created_at": "2017-06-28T14:25: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": "1f8daf55...
b7f30e37-a21c-4490-b7f3-01d18c8f21e8
TaiKonne/Code_Forces
phoenix_and_gold.cpp
#include <bits/stdc++.h> using namespace std; #define nl << '\n' #define vti vector<int> #define vtll vector<long long> #define yep cout << "YES" nl #define nope cout << "NO" nl #define ll long long #define lg long #define db double #define pb push_back #define bg begin() #define ed end() #define rbg rbegin() #define ...
ALGO
0.999977
3.227708
{ "github_metadata": { "branch": "main", "commit_count": 33, "repo_created_at": "2022-05-01T17:16: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": "c250917d4af...
a4d6d8fd-c69d-4004-8055-fee5a075e4ab
Ronald-Gutierrez/competitive_programming
katiis/union_find.cpp
#include <iostream> #include <vector> using namespace std; int find(int a, int* v) { if(v[a] < 0) { return a; } return v[a] = find(v[a], v); } void Union(int a, int b, int* v) { a = find(a, v); b = find(b, v); if(a == b) { return; } if(v[a] == v[b]) { v[a] +=...
ALGO
0.999996
4.407917
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2022-09-19T20:54: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": "fa45df6d684...
523913b1-46b9-4623-a19b-be1629661e65
chopperdodo/leetcode
final/permutations.cpp
class Solution { private: void permute_recursive(vector<int> &vec, int i, vector<vector<int> > &result) { if (i == vec.size()) { result.push_back(vec); } else { for (int j = i; j < vec.size(); ++j) { swap(vec[i], vec[j]); permute_recursive(vec,...
ALGO
0.99997
6.07216
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2014-11-21T06:06:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2a12da738...
ae3ef2b1-243d-4ded-90f2-8d248ac05957
floft/fotoloc
line.cpp
#include "line.h" bool operator==(const Line& l1, const Line& l2) { return l1.p1 == l2.p1 && l1.p2 == l2.p2 && l1.length == l2.length; } bool operator<(const Line& l1, const Line& l2) { return l1.length < l2.length; } bool operator<=(const Line& l1, const Line& l2) { return l1.length <= l2.length; } boo...
ALGO
0.998013
4.523635
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-12-11T04:44:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bbecc7847c...
969d7524-e347-44fa-9c15-7fd8b332e187
josephShokry/CompilersProject
src/LexicalAnalyser/LexicalAnalyser.h
#include <string> #include <vector> #include <bits/stdc++.h> #include "../Node/Node.h" #include "../NFA/NFA.h" #include "../DFA/DFA.h" using namespace std; class lexical_analyser { private: DFA dfa; string code_text = ""; map<string,string> symbol_table; int current_index = 0; map<string, int> to...
ALGO
0.9901
4.251871
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2024-11-28T14:47: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": "b52ba3adfd5...
13b93779-3345-432c-8a03-af3a0c4f19c0
shustrov38/cuddly-goggles
src/solver/selectors/dsatur_dense_selector.h
#pragma once #include "icandidate_selector.h" #include <vector> namespace solver::selectors { class DenseCandidateSelector final: public ICandidateSelector { public: using Info = std::pair<SizeType, SizeType>; struct CompareInfo { bool operator()(Info lhs, Info rhs) const { if (lh...
ALGO
0.975191
6.127609
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2024-12-07T09:13:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "59a6687f0...
ded23d18-6e5e-4ab8-98f0-ac60356bc581
ADJA/PlagiarismDetector
vkcup-2015-wildcard-2-samples-1.1/vkcup-2015-wildcard-2-samples-1.1/09/8686.cpp
#include <cstdio> #include <cstdio> #include <cstdlib> #include <vector> #include <cmath> #include <iostream> #include <algorithm> using namespace std; typedef long long ll; typedef unsigned long long ull; const int maxn = 5; const int maxm = 20; int n, nn, m; int lines[maxn], columns[maxm]; int matrix[1 << maxn][...
ALGO
0.999976
3.255592
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2015-04-19T12:50:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 8, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c256ed74...
352e5c8d-adb2-4a0a-8b99-a63cb5926c78
nagalluri/PathTracer
src/bsdf.cpp
#include "bsdf.h" #include <iostream> #include <algorithm> #include <utility> using std::min; using std::max; using std::swap; namespace CGL { void make_coord_space(Matrix3x3& o2w, const Vector3D& n) { Vector3D z = Vector3D(n.x, n.y, n.z); Vector3D h = z; if (fabs(h.x) <= fabs(h.y) && fabs(h.x) <= fabs...
ALGO
0.995729
4.982322
{ "github_metadata": { "branch": "gh-pages", "commit_count": 5, "repo_created_at": "2016-06-27T04:01: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": "bc0fc03f...
96bc294d-e7a7-42f4-ae88-b4a53d015210
yizhongzhang1989/yzLibrary
yzLib/yz_math/yz_statistics/yz_regression_2d.h
/***********************************************************/ /** \file \brief regression of 2d data \author <NAME> \date 8/27/2013 */ /***********************************************************/ #ifndef __YZ_REGRESSION_2D_H__ #define __YZ_REGRESSION_2D_H__ #include <vector> #include "yzLib/yz_math/yz_matrix.h"...
ALGO
0.988055
5.624874
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2020-05-09T08:13:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5741a996c...
f3bc6be1-d376-4a24-9e9c-95addf190cf8
Yawn-Sean/Daily_CF_Problems
daily_problems/2024/09/0917/personal_submission/cf729e_lengli.cpp
/* lengli_QAQ Hope there are no bugs!!! */ #include <bits/stdc++.h> #define fastio std::ios::sync_with_stdio(0); std::cin.tie(0); std::cout.tie(0) #define all(x) x.begin(),x.end() #define pb push_back void solve(){ int n,m; std::cin>>n>>m; std::vector<int> cnt(n+2,0),a(n+2); int mx=0; for(int i=1;i...
ALGO
0.999963
3.46084
{ "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": "74dd...
06f783ed-e128-4787-8772-9548db873442
inviwo/inviwo
modules/vectorfieldvisualization/include/modules/vectorfieldvisualization/integrallinetracer.h
/********************************************************************************* * * Inviwo - Interactive Visualization Workshop * * Copyright (c) 2015-2025 Inviwo Foundation * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided th...
ALGO
0.988996
6.903283
{ "github_metadata": { "branch": "master", "commit_count": 12742, "repo_created_at": "2017-10-25T11:47:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 492, "forks": 150, "issues": 55, "pull_requests": 12 }, "file_meta": { "content_id": "7...
caa3b1a0-051a-4fab-9202-f5e244cdff06
repos-cl/NumCSE
Assignments/PolishedCodes/IterativeMethods/OrdConvIter/solution/ordconviter.hpp
#ifndef ORDCONVITER_HPP #define ORDCONVITER_HPP #include <Eigen/Dense> #include <cmath> #include <string> #include <vector> #include "matplotlibcpp.h" #include "meshgrid.hpp" namespace plt = matplotlibcpp; /* SAM_LISTING_BEGIN_0 */ void kminplot() { constexpr double p = 1.5; constexpr double C = 2.; const dou...
ALGO
0.972588
5.42989
{ "github_metadata": { "branch": "master", "commit_count": 2989, "repo_created_at": "2023-04-15T08:46: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": "c9aab2f...
d0ffffce-bc83-4c6f-9117-9971a797a4ec
okoks9011/problem_solving
codeforces/personal_round3_10w2/chain/main.cc
#include <iostream> #include <vector> #include <utility> #include <algorithm> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; vector<pair<int, int>> e(n); for (int i = 0; i < n; i++) { cin >> e[i].first >> e[i].second; } sort(...
ALGO
0.99996
3.930032
{ "github_metadata": { "branch": "master", "commit_count": 519, "repo_created_at": "2018-07-18T11:48:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "16c1bcb7...
eaf3ab98-532a-44ad-89de-f129608b096d
AmitThakur045/Leetcode-DSA-Question
LeetCode October/Cousins in Binary Tree.cpp
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), right(nullptr) {} * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {} * TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l...
ALGO
0.999985
5.959363
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2021-08-11T14:10:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a2114d700b...
36efd61c-fe51-4f50-ba48-2964f1f95980
saketh-are/algo-lib
graphs/dijkstra.cpp
#include <cstdlib> #include <queue> #include <cassert> #include <algorithm> #include <cstring> template<typename EdgeWeight> struct WeightedDirectedGraph { struct Edge { int neighbor; EdgeWeight weight; }; int N; std::vector<std::vector<Edge>> adj; WeightedDirectedGraph (int _N) :...
ALGO
0.999809
5.398864
{ "github_metadata": { "branch": "master", "commit_count": 355, "repo_created_at": "2015-06-17T02:49:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 171, "forks": 62, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "a9f37...
2c650826-bf68-47f3-a784-1baff3b0ff2e
wpine215/leetcode
array/two-sum.cpp
#include <iostream> #include <vector> #include <unordered_map> using namespace std; // Given an array of integers, return indices of the two numbers such that they add up to a specific target. // You may assume that each input would have exactly one solution, and you may not use the same element twice. class Solution...
ALGO
0.999821
6.232933
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-06-27T20:45: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": "683aa9188...
04603654-8c88-46ca-ad50-ac2ff63d3efb
thannhf/ALGORITHMS
Algorithms_dataStructures/C++/Disjoint_Set.cpp
#include <iostream> #include <vector> using std::cout; using std::endl; using std::vector; vector<int> root, rank; void CreateSet(int n) { root = vector<int>(n + 1); rank = vector<int>(n + 1, 1); for(int i = 1; i <= n; ++i) { root[i] = i; } } int Find(int x) { if(root[x] == x) { return x; } return root[x]...
ALGO
0.998446
3.85415
{ "github_metadata": { "branch": "main", "commit_count": 195, "repo_created_at": "2024-10-20T09:18: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": "70e425b8df...
27ac1fac-c5a0-454c-8ce9-c8b503a2cda4
karma-riuk/stickfosh
src/model/ais/ai.hpp
#pragma once #include "../board/board.hpp" #include <atomic> #include <chrono> namespace ai { class AI { protected: bool am_white; std::chrono::milliseconds thinking_time; virtual Move _search(const Board&) = 0; public: AI(bool am_white, std::chrono::milliseconds tt) ...
ALGO
0.997042
6.413434
{ "github_metadata": { "branch": "main", "commit_count": 237, "repo_created_at": "2025-01-28T10:33: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": "9f2495da73...
9a5343d8-1452-4504-88be-56c7d7a7e29e
asriniv2-git/interview_prep
top_k_frequent.cpp
/* Given an integer array nums and an integer k, return the k most frequent elements. You may return the answer in any order. Example 1: Input: nums = [1,1,1,2,2,3], k = 2 Output: [1,2] Example 2: Input: nums = [1], k = 1 Output: [1] Constraints: 1 <= nums.length <= 105 k is in the range [1, the number of uni...
ALGO
0.999998
6.878079
{ "github_metadata": { "branch": "master", "commit_count": 127, "repo_created_at": "2020-04-23T02:33:03.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5befd646...
3d17fd8e-eb48-4265-9413-bfb25dff371b
SafaruzzamanShovo/Problem-Solving---Competitive-Programming
CF-solved/C_Tear_It_Apart.cpp
/* Educational Codeforces Round 147 (Rated for Div. 2) Codeforces 1821C Tear It Apart */ #include<bits/stdc++.h> using namespace std; #define ll long long #define endl '\n' #define testcase int t; cin>>t; for(int tt=1;tt<=t;tt++) int main() { ios_base::sync_with_stdio(0); cin.tie(0); ...
ALGO
0.999952
4.120667
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2022-11-22T09:09:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c309dcc71694...
ca994c8d-db33-445a-9d92-273e49fdaeeb
hello-world2005/course
codeforces/1290/c.cpp
#include <algorithm> #include <cstdio> #include <vector> const int N = 6e5 + 10; int n, m; int a[N]; int fa[N], sze[N][2]; int ans; int FindFa(int u) { if (u == fa[u]) return u; return fa[u] = FindFa(fa[u]); } void Merge(int u, int v) { int fu = FindFa(u); int fv = FindFa(v); if (fu == fv) return;...
ALGO
0.999928
3.319059
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2020-05-11T09:44:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3d37ddd7...
382fb5e0-3289-40a9-99c0-554cbe450e0d
ishandutta2007/codeforces-x
xcyle/normal/623/D.cpp
/* _/ _/ _/_/_/ _/ _/ _/ _/_/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/ _/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/ ...
ALGO
0.999502
3.787896
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:38:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0cc0892a2190...
8681a6d4-b0c0-4939-8159-1b7107d6e6a7
Utkarshtiwari100/Graph
Lecture 21 - Graphs 2/code of Algorithms/3. Dijkstra Algorithm/code.cpp
/* Code : Dijkstra's Algorithm Given an undirected, connected and weighted graph G(V, E) with V number of vertices (which are numbered from 0 to V-1) and E number of edges. Find and print the shortest distance from the source vertex (i.e. Vertex 0) to all other vertices (including source vertex also) using Dijkstra's ...
ALGO
0.999987
5.268958
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-10-31T18:01:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "58c8e289a046...
1652e4cb-265e-4131-910c-e11fec785e45
Manoj-kumar-C/Algorithms-Interview-Prep
Data_Structures/Search_Algos/bfs.c++
#include <iostream> #include <vector> #include <queue> using namespace std; void bfs(vector<vector<int>>& graph, int start) { int numVertices = graph.size(); vector<bool> visited(numVertices, false); queue<int> q; visited[start] = true; q.push(start); while (!q.empty()) { int current...
ALGO
0.999995
6.397118
{ "github_metadata": { "branch": "master", "commit_count": 29, "repo_created_at": "2024-01-29T16:43:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b6897c68...
783cd25d-2c74-481c-91a2-468e288f01d1
meSAHAD/Phitron
Algorithms/week 1/module 4/assignment 1/question2.cpp
#include<bits/stdc++.h> using namespace std; int binarySearch(int arr[], int low, int high, int key) { while (low <= high) { int mid = low + (high - low) / 2; if (arr[mid] == key) return mid; else if (arr[mid] < key) low = mid + 1; else high =...
ALGO
0.999973
5.122643
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2023-11-01T19: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": "32cbe38cdff...
613daa47-aada-4ad0-ac81-351c36454809
aaronyang1223/CSC4005_CUHKSZ
N-body Simulation/src/pthread.cpp
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <chrono> #include <pthread.h> #ifdef GUI #include <GL/glut.h> #include <GL/gl.h> #include <GL/glu.h> #endif #include "./headers/physics.h" #include "./headers/logger.h" int n_thd; // number of threads int n_body; int n_iteration; std::chrono::durati...
ALGO
0.999302
4.53364
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-12-07T05:51: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": "ddf908afe63c...
1832f68b-5874-4369-8b01-c5fe757fafa8
enya530/pd2_project3
CandyCrush/vertical.cpp
#include "vertical.h" Vertical::Vertical() { } Vertical::~Vertical() { } int Vertical::condition(Blank *a[10][10], Blank *focus) { int R = focus->row; int C = focus->column; int num = focus->number; if(num != 0 && num != 5){ if(num/10 == 0){ if(R >= 2 && (num...
ALGO
0.969623
3.902542
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-06-28T15:26: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": "e5548b2a07...
8fbe90a4-f8f9-441a-ab91-844ab87b5f75
TranMinhHuy2003/OOP
bai1.cpp
#include <iostream> using namespace std; class ChuNhat { private: float dai; float rong; public: void Nhap (); void Xuat (); float chuvi (); void sosanh (ChuNhat a); int Kiemtra (); }; int main () { ChuNhat a,b; cout <<"\n\n\t\t=====NHAP HINH CHU...
TOOL
0.970639
3.196404
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-11-12T12:26: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": "05ad63c7361d...
277a7c9c-2502-4269-b771-714bb7606a67
Filip-Novak/finding-perfect-matchings
zname_algoritmy/ba-graph/test/snarks/test_colouring_pd_signed.cpp
#include <cassert> #include <iostream> #include <sstream> #include "implementation.h" #include <multipoles.hpp> #include <operations.hpp> #include <snarks/colouring_pd.hpp> #include <io/graph6.hpp> using namespace ba_graph; int main() { PDColorizer pdc; /*************** Petersen graph and almost petersen graph ...
ALGO
0.982442
4.539771
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2020-02-05T14:03:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "acdbc765fc...
28cc6772-cf5a-458e-97d4-1ae0839faaa5
skymer156/atcoder_storage_skymer
abc190/c.cpp
#include <iostream> #include <vector> using namespace std; int main() { int N, M, K; cin >> N >> M; vector<int> A(M); vector<int> B(M); for (int i = 0; i < M; i++) { cin >> A[i] >> B[i]; } cin >> K; vector<int> C(K); vector<int> D(K); for (int i = 0; i < K; i++)...
ALGO
0.999964
3.954571
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-05-23T08:09: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": "07f830321a1...
a46a20c6-f685-4338-b26d-92faf49323ee
Shahid-Fahad/Online-Judge-Solution
Codeforces+Others/B_Han_Solo_and_Lazer_Gun.cpp
///<NAME> //ShzFahad #include<bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define pll pair<ll,ll> #define vp vector<pair<ll,ll>> #define pb push_back #define ff first #define ss second #define case_(tc) cout << "Case " << tc << ": "; #define mem(a,b) memset(a,b,sizeof(a)) #define...
ALGO
0.999891
3.924779
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-06-19T08:00: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": "15399ed4f557...
ad9bfde2-812b-411c-bc8c-0a4b52b5825a
ishandutta2007/codeforces-s
sirshokoladina/normal/142/A.cpp
#pragma comment(linker, "/STACK:32000000") #include <iostream> #include <cstdio> #include <string> #include <cstring> #include <utility> #include <cstdlib> #include <queue> #include <deque> #include <set> #include <map> #include <vector> #include <algorithm> #include <cmath> #include <cassert> #include <memory.h> #incl...
ALGO
0.999914
3.598638
{ "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": "187151a02939...
37a158eb-17c6-40be-b57c-52cbe9f05e0a
redagito/emptyspace
source/math/frustum.hpp
#pragma once #include <glm/glm.hpp> #include <glm/gtc/type_ptr.hpp> enum FrustumSide { RIGHT = 0, // The RIGHT side of the frustum LEFT = 1, // The LEFT side of the frustum BOTTOM = 2, // The BOTTOM side of the frustum TOP = 3, // The TOP side of the frustum BACK = 4, // The BACK side of the frustum FRONT...
ALGO
0.997033
6.730019
{ "github_metadata": { "branch": "master", "commit_count": 80, "repo_created_at": "2019-09-11T19:51:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d8e21e11...
4b542565-9718-4122-9c2a-b249014f0c52
kosar7/NAMD-MAGNETIC-FIELD
ComputeMoa.h
/* * * *** Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by * *** The Board of Trustees of the University of Illinois. * *** All rights reserved. * ** * ===================================================================================== * * Filename: ComputeMoa.h * * Description: * * ...
ALGO
0.934474
4.737994
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2019-04-13T07:12:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 2, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "75c01fe60...
68ee1220-4c18-4ea4-9e3f-c5c14d9b5463
botbw/algo
Solutions/leet_630.cpp
#ifndef FREQ_H #define FREQ_H #include <iostream> #include <cstring> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <cmath> #include <unordered_map> #include <unordered_set> #include <map> #include <set> #include <sstream> using namespace std; typedef long long LL; typedef unsigned...
ALGO
0.999956
4.896051
{ "github_metadata": { "branch": "main", "commit_count": 362, "repo_created_at": "2021-11-16T06:33: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": "cb58fb26d5...
63f26df8-f7f0-4a3b-ab00-db04160a14b0
SMiles02/cp-submissions
codeforces/1027/D.cpp
// #pragma GCC optimize("Ofast,unroll-loops") // #pragma GCC target("avx,avx2,sse,sse2") #include <bits/stdc++.h> #define ll long long #define sz(x) (int)(x).size() using namespace std; const int N = 2e5 + 1; ll ans = 0; int c[N], a[N], cur, done[N]; void addMin(int x) { int y = x, tmp = c[x]; while (a[y] != ...
ALGO
0.999955
3.755014
{ "github_metadata": { "branch": "master", "commit_count": 1368, "repo_created_at": "2024-07-10T12:27:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "57180dd...
3f094488-1de3-4d8a-9755-f6d5600d52e5
ishandutta2007/codeforces-b
bidzilya/normal/540/B.cpp
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int n, k, p, x, y; cin >> n >> k >> p >> x >> y; vector<int> a(k); for (int i = 0; i < k; ++i) { cin >> a[i]; x -= a[i]; } if (x < 0) { cout << -1...
ALGO
0.999883
3.675056
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-04-11T01:05:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da528c834703...
725e3c34-f4a4-473f-82b9-28c509b1e6b4
MintChocoPizza/dodo
baekjoon/c++/25305/temp.cpp
#include <iostream> using namespace std; int arr[1000]; int sorted[1000]; void merge(int list[], int left, int mid, int right); void merge_sort(int list[], int left, int right); int main() { int N,k,x; int i; cin >> N >> k; for(i=0; i<N; i++) cin >> arr[i]; merge_sort(arr, 0, N-1); ...
ALGO
0.999993
3.165692
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2023-03-28T10:20: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": "4a6a452a2...
fcd9dccb-01c3-4a41-ae0b-0f7d309a7704
opcodeer/Data-structure-C-
Expt52.cpp
#include <bits/stdc++.h> using namespace std; class node { public: int data; node* left; node* right; node(int item) { data = item; left = NULL; right = NULL; } }; class BinaryTree { public: node* root; BinaryTree() { root = NULL; } void rightView...
ALGO
0.999979
5.302489
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2023-10-25T18:28:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d0e77c8da409...
4cbd81d9-1e58-4f43-b1df-b0daa92272b7
n29-dev/codeforces-solutions
1300/Party.cpp
#include <bits/stdc++.h> using namespace std; #define fastio() \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL) #define MOD 1000000007 #define MOD1 998244353 #define INF 1e18 #define nline "\n" #define PI 3.141592653589793238462 #define set_bits ...
ALGO
0.999907
4.673358
{ "github_metadata": { "branch": "main", "commit_count": 130, "repo_created_at": "2023-08-05T19:10: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": "5c090485c1...
a858ab11-e982-42c0-9ed2-88f868a47519
rahul-p-007/Data-Structure-Program
Searching and Sorting/Printer_Parition_problem.cpp
#include<iostream> using namespace std; int findFeasible(int boards[],int n,int limit){ int sum =0, painters = 1; for(int i = 0; i<n; i++){ sum += boards[i]; if(sum > limit){ sum = boards[i]; painters++; } } return painters; } int PrinterParition(int board...
ALGO
0.999967
4.615289
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-10-26T04:41: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": "bf6ab734e8d0...
5b856521-a094-4782-afe9-14b4b401471c
theprithwisingh/cpp
1-chapter-loop-pattern/swashtikPattern.cpp
//* **** //* * //* * //******* // * * // * * //**** * // Include header file #include <iostream> using namespace std; class MyPattern { public: // Displaying of swastika Pattern in given size void swastikaPattern(int size) { if (size <= 3 || size % 2 == 0) ...
ALGO
0.999459
5.742569
{ "github_metadata": { "branch": "main", "commit_count": 137, "repo_created_at": "2024-03-07T12:55:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9041c59bfd...
afd06d00-5a6a-4d77-b23d-afb08b0ef5fb
stecarra/lab_simulazione_numerica
esercitazione1/main.cpp
/**************************************************************** ***************************************************************** _/ _/ _/_/_/ _/ Numerical Simulation Laboratory _/_/ _/ _/ _/ Physics Department _/ _/_/ _/ _/ Universita' degli Studi di Milano _/ _/ ...
TOOL
0.978257
3.410542
{ "github_metadata": { "branch": "main", "commit_count": 14, "repo_created_at": "2024-06-21T07:18: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": "001cfca4b77...
d39edf21-643b-4aa5-ae95-9c30426203d1
gtianyi/rationalRealtimeSearch-training
cpp/search/WAStarSearch.h
#pragma once #include <vector> #include <set> #include <functional> #include <unordered_map> #include "SearchBase.h" using namespace std; template <class Domain> class WAStarSearch : public Search { public: typedef typename Domain::State State; typedef typename Domain::Cost Cost; typedef typename Domain::...
ALGO
0.999869
6.572408
{ "github_metadata": { "branch": "master", "commit_count": 224, "repo_created_at": "2020-08-25T20:45:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5ac9193d...
af9fd58c-a589-4d90-b4ab-5da4d372509e
Meoli96/Thesis2022
ModifiedDisk/disk.cpp
#include "../include/disk.h" IsInRange Disk::isInRange(double tlat, double tlon, double r_b) { bool res = 0; double dlat = this->c.getLat(); double dlon = this->c.getLon(); double r_tlat = degree2radians(tlat); double r_tlon = degree2radians(tlon); double sinlat = sin(r_tlat - dlat); doub...
ALGO
0.990577
5.730076
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-12-03T18:08: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": "886fccc8c118...
4c158feb-6cb5-4d42-82d1-27041c6009d4
Lukehututu/leetcode_practice
725.分隔链表.cpp
/* * @lc app=leetcode.cn id=725 lang=cpp * * [725] 分隔链表 */ // @lc code=start /** * 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) : ...
ALGO
0.999802
6.201348
{ "github_metadata": { "branch": "main", "commit_count": 76, "repo_created_at": "2024-04-26T12:46:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c238c799304...
596696b0-e1fc-47d9-8d37-f3d28ecf3093
phoenix-mojo/algorithms_practice
algorithmic_practice/implementations/mergesort_array.cpp
#include<iostream> #include<vector> using namespace std; void displayVector(int arr[], int size) { for(int i=0;i<size;i++) { cout<<arr[i]<<" "; } cout<<endl; } void mergeSplits(int arr[], int left, int mid, int right) { int leftVector[mid-left+1]; int rightVector[right-mid]; for (int i = 0; i < mid-left+1; i...
ALGO
0.999982
5.540703
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2016-09-02T21:42:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ed473faa3...
1e993aec-1937-45d4-b466-f9ef5ab02a01
arrayfire/arrayfire
src/api/cpp/morph.cpp
/******************************************************* * Copyright (c) 2014, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: * http://arrayfire.com/licenses/BSD-3-Clause **********************************************...
ALGO
0.907881
6.875643
{ "github_metadata": { "branch": "master", "commit_count": 6246, "repo_created_at": "2014-10-28T20:58:33.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4739, "forks": 546, "issues": 277, "pull_requests": 18 }, "file_meta": { "content_id": "...
f54b528e-b185-486c-8cbe-74069a845e91
ailuropodaWu/NYCU-Intro-Algorithm
Assignment2/count_pairs.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n; long long ans = 0; long long temp, L, R; long long l, r; vector<long long> nums; cin >> n >> L >> R; for(int i = 0; i < n; ++i){ cin >> temp; nums.push_back(temp); } ...
ALGO
0.99984
3.78926
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2023-03-20T07:04: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": "a57c654e34c...
803803fc-4bd7-4d17-a12c-930d9f612b45
haskellcg/CPlusPlus_Algorithm_DemoFiles
bucket_sort.cpp
/************************************************************************** * author: haskellcg * date: 2020-04-28 * description: bucket sort algorithm *************************************************************************/ #include "bucket_sort.h" class Bucket { public: /** * @brief destructor *...
ALGO
0.999636
5.340149
{ "github_metadata": { "branch": "master", "commit_count": 185, "repo_created_at": "2020-04-21T10:23: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": "94dee2c0...
08d87a25-031b-49b8-ad64-9a2aa818ba70
s9v/toypuct
Codeforces/r192d1/A.cpp
// cfcode v1.6 #include <iostream> #include <fstream> #include <sstream> #include <algorithm> #include <functional> // greater<int>() #include <vector> #include <string> #include <queue> #include <stack> #include <list> #include <map> #include <set> #include <cstdio> #include <cassert> #include <cstdlib> #include <cma...
ALGO
0.999524
3.107717
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2016-08-17T14:16:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f3b51647...
cd1baeaf-08a5-4dbb-b47b-acaba6d5209f
CodelikeC/Practicing_C-17
Cpp17practice/Arrray/smartpointers/calculating_powers.cpp
#include <iostream> using namespace std; #include <iomanip> #include <cmath> double power(double x , int n ) { double result{1.0}; if (n>= 0) { for (int i {1} ; i <= n ; ++i) { result *= x; } } else { // n < 0 // for (int i{1}; i <= -n...
ALGO
0.998599
5.392852
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2025-01-30T09:50:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5c5119f8c20...
2d9c4aa3-9313-4660-aab5-9f849f63be10
pranjal123454/DSA-BUSTED
findcountofmaxno.cpp
// /****************************************************************************** // Online C++ Compiler. // Code, Compile, Run and Debug C++ program online. // Write your code in this editor and press "Run" button to compile and execute it. // ****************************...
ALGO
0.999879
4.833414
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-03-03T19:16: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": "e202cef6d41f...
d24fe80b-b1b0-4739-88f5-4c560912ca93
jfmrod/hpc-clust
eseqclusteravg.cpp
#include "eseqclusteravg.h" #include "cluster-common.h" #include <eutils/efile.h> eseqclusteravg::eseqclusteravg(){} void eseqclusteravg::check(ebasicarray<eseqdistCount>& dists) { long i; estr xystr; bool duplicate=false; eseqdisthash checkmatrix; for (i=0; i<dists.size(); ++i){ if (i%(dists.size()/...
ALGO
0.993568
4.12278
{ "github_metadata": { "branch": "master", "commit_count": 124, "repo_created_at": "2015-08-20T07:47:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "5fbfb73f...
c08b80cd-692a-48b7-a00e-5ac0958ee5a3
clintlang/CS2201
project7/MazeSolver.cpp
// File name: MazeSolver.cpp // Author: <NAME> // userid: langct // Email: <EMAIL> // Class: CS 2201 // Assignment Number: 7 // Honor Statement: I attest that I understand the honor code for this class and have neither given // nor received any unauthorized aid on this assignment. // Description: defin...
ALGO
0.998489
4.389394
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-01-23T20:20:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c4529b74a88...
2f506b41-753e-40c2-8961-9ab08c2cf10a
Akatsukis/ACM_Training
Archive/Wannafly/challenge7/C.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mk make_pair #define ll long long #define ull unsigned long long #define pii pair<int, int> #define fi first #define se second #define ALL(A) A.begin(),A.end() #define sc(x) scanf("%d", &x) #define pr(x) printf(#x":%d\n", x) #define fastio ios:...
ALGO
0.998629
3.740103
{ "github_metadata": { "branch": "master", "commit_count": 409, "repo_created_at": "2017-09-12T14:47: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": "f112a4d4...
81802c33-5546-4253-a0d4-cc8f23feb53e
georgerapeanu/c-sources
izho2019/day2/lyuboyn.cpp
#include <cstdio> #include <iostream> #include <vector> #include <algorithm> using namespace std; int n,k,t,fst; vector<int> v; string s; int main(){ cin >> n >> k >> t; cin >> s; reverse(s.begin(),s.end()); for(auto it:s){ fst = fst * 2 + it - '0'; } if(k % 2 == 0){ ...
ALGO
0.999903
3.195618
{ "github_metadata": { "branch": "master", "commit_count": 177, "repo_created_at": "2018-08-15T14:37:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9e9c9f14...
661c0d48-e958-420e-a21e-86f8586692f0
Cocobio/OnlineJudge
624-CD.cpp
/* Problem: https://onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=565 <NAME> Cocobio2 Generated by <NAME> Asymptotic analysis of solution: temporal: O(tape_length*track_n) : Where tape_length is the size of the tape (in minutes) and track_n is the number of tracks on the CD spatial: O(tap...
ALGO
0.999645
4.216239
{ "github_metadata": { "branch": "master", "commit_count": 42, "repo_created_at": "2020-05-16T23:02: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": "c70568d03...
a14a5db3-a927-49ae-b2f1-cdd54b5be331
KRSSG/kgpkubs-mirosot
Strategy/Tactics/tPositionForPenalty.hpp
#ifndef TPOSITIONFORPENALTY_HPP #define TPOSITIONFORPENALTY_HPP #include <list> #include "comdef.h" #include "tactic.h" #include "skillSet.h" #include "beliefState.h" #include "logger.h" #include "config.h" namespace Strategy { class TPositionForPenalty : public Tactic { public: TPositionForPenalty(const Beli...
ALGO
0.97469
4.870757
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2015-05-01T06:44:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 2, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "ee0d0525737...
6328e147-3509-41cb-b5e3-1b4549bc1f15
rishdas/parallel_programs
sirdas-pa1-submission/pa1.cpp
/* Indiana University * School of Informatics and Computing * Department of Computer Science * * Parallelism in Programming Languages and Systems (B524) * Spring 2017 * * Programming Assignment 1 */ /* * Includes */ // Standard Library Includes #include <iomanip> #include <iostream> #include <limits> #incl...
ALGO
0.997482
4.801745
{ "github_metadata": { "branch": "master", "commit_count": 39, "repo_created_at": "2017-04-18T19:17: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": "e3926b809...
88a0ea2f-5fa0-494c-bf70-b9bdd3c4a07c
mrsac7/CSES-Solutions
src/1724 - Graph Paths II.cpp
/* Problem Name: Graph Paths II Problem Link: https://cses.fi/problemset/task/1724 Author: <NAME> (mrsac7) */ #include<bits/stdc++.h> using namespace std; template<typename... T> #define error(args...) { string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); stringstream _ss(_s); istream_iterator<string> _it(_ss)...
ALGO
0.999879
4.249008
{ "github_metadata": { "branch": "master", "commit_count": 66, "repo_created_at": "2020-05-06T08:18:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 394, "forks": 157, "issues": 1, "pull_requests": 4 }, "file_meta": { "content_id": "b011e...
b7dcf061-8862-4bb5-bf3c-15fe83887284
iaman877/AwesomeCPP
Operator Overloading/+ Operator.cpp
#include <iostream> using namespace std; class marks{ int intmarks; int extmars; public : marks(){ intmarks = 0; extmars = 0; } marks(int in, int ex){ intmarks = in; extmars = ex; } void display(){ cout<<intmarks<<endl<<ex...
TOOL
0.943933
3.983142
{ "github_metadata": { "branch": "master", "commit_count": 276, "repo_created_at": "2019-10-02T17:05:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "406cbe67...
b185716b-88c4-44ee-b2d5-2171c875da49
ishandutta2007/codeforces-j
joeywheeler/normal/722/A.cpp
#include <bits/stdc++.h> #define FO(i,a,b) for (int i = (a); i < (b); i++) #define sz(v) int(v.size()) using namespace std; int tp; string s; int bd; string bu; int main() { cin >> tp >> s; int mn = tp == 12 ? 1 : 0; int mx = tp == 12 ? 13 : 24; bd = 1e9; FO(i,mn,mx) { FO(j,0,60) { ...
ALGO
0.998621
3.839693
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:42: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": "4c87985cb2e5...
a0e9a7e3-b2eb-473d-ad7d-10a0790b564a
momomingzhi/algorithm_c
이분탐색/backjoon_2512.cpp
#include <stdio.h> #include <algorithm> #include <iostream> #include <vector> #include <climits> using namespace std; int city[10001]; /* 2512 예산 예를 들어, 전체 국가예산이 485이고 4개 지방의 예산요청이 각각 120, 110, 140, 150이라고 하자. 이 경우, 상한액을 127로 잡으면, 위의 요청들에 대해서 각각 120, 110, 127, 127을 배정하고 그 합이 484로 가능한 최대가 된다. 여러 지방의 예산요청과 국가예산의 총액이 주어...
ALGO
0.999942
3.856485
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2020-09-13T14:42:23.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7b3846ac4...
814593c6-d02f-4cee-afd9-12f1d8f6aca6
ishandutta2007/codeforces-i
i_love_tanya_romanova/normal/296/E.cpp
/* I can see how you are beautiful, can you feel my eyes on you, I'm shy and turn my head away Working late in diner Citylite, I see that you get home alright Make sure that you can't see me, hoping you will see me Sometimes I'm Wondering why you look me and you blink your eye You can't be acting like my Dana I see yo...
ALGO
0.999195
3.152534
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T05:39: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": "f8179daee83d...
96e442bd-547b-4bbc-879f-6768ce21b454
dipu-bd/OJ-Codes
UVA Codes/Volume 101/10109 - Solving Systems of Linear Equations/10109 - Solving Systems of Linear Equations_v1.cpp
//c headers #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <math.h> #include <limits.h> //c++ headers #include <iostream> #include <sstream> #include <algorithm> #include <vector> #include <set> #include <queue> #include <map> #include <stack> using namespace std; /// STRUCTURE ...
ALGO
0.999392
3.733941
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2015-02-18T17:34: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": "2ff77a58b4...
1c2442b2-843d-427a-9153-187bc6bb5728
sagittariusk2/Leetcode-solutions
Find rectangle with corners as 1 - GFG/find-rectangle-with-corners-as-1.cpp
// { Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> #include <unordered_map> #include <unordered_set> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: bool ValidCorner(const vector<vector<int> >& m) { int n = m.size(); ...
ALGO
0.999812
6.522895
{ "github_metadata": { "branch": "main", "commit_count": 698, "repo_created_at": "2021-12-25T17:16: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": "383722fa59...
6e172f68-f9f6-4f66-ae7a-02c93b4e7bbb
ddemidov/lorenz_vexcl
sm_sweep.cpp
#include <iostream> #include <vector> #include <string> #include <H5Cpp.h> #include <vexcl/vexcl.hpp> #include <boost/program_options.hpp> #include <boost/array.hpp> #include <boost/numeric/odeint.hpp> #include <boost/numeric/odeint/external/vexcl/vexcl.hpp> namespace odeint = boost::numeric::odeint; //-----------...
ALGO
0.99961
5.933661
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2014-05-23T11:21:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e182f350...
7d854a40-42ab-4cee-a2df-23acd6630bed
pbogre/practice
ProjectEuler/012/012.cpp
#include <iostream> #include <cmath> #include <vector> using namespace std; bool is_prime(int n){ for(int i = 2; i < n; i++){ if(n % i == 0) return false; } return true; } int factors(int n){ vector<int> pft; for(int i = 2; i < ceil(sqrt(n)); i++){ if( n % i == 0 && is_prime(i)){ pft.push_back(i); ...
ALGO
0.999824
4.811475
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-08-29T08:00:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4ba451fa4d4...
26ceb924-058c-4d11-a1e0-f972075aa7a7
teodoraschipor/Simple-Algorithms
royfloyd.cpp
#include <iostream> #include <fstream> #define Nmax 101 using namespace std; int matrix[Nmax][Nmax]; ifstream f("royfloyd.in"); ofstream g("royfloyd.out"); int main() { int n; f >> n; for (int i = 1; i <= n; i++) for (int j = 1; j <= n; j++) f >> matrix[i][j]; for (int k = 1; k <= n; k++) for (int i = ...
ALGO
0.999904
3.547187
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2020-10-12T14:40:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "424640677d...
da5d8f18-a948-4f51-aab3-8f8c5072b5ac
ishandutta2007/codeforces-c
cdkrot/normal/584/D.cpp
// Copyright (C) 2015 <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, or (at your option) // any later version. // // This program is distributed in the hope tha...
ALGO
0.999651
3.64947
{ "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": "5b4e4dd256a1...
63199cd3-c3eb-475e-88dc-5905ac354919
Rearcher/OJcodes
leetcode/696.cpp
// 696. Count Binary Substrings #include "leetcode.hpp" using namespace std; class Solution { public: int countBinarySubstrings(string s) { int n = s.size(); int cnt = 0; for (int i = 0; i + 1 < s.size(); ++i) { if (s[i] == '0' && s[i+1] == '1') { int left = i, ...
ALGO
0.999981
6.000794
{ "github_metadata": { "branch": "master", "commit_count": 944, "repo_created_at": "2015-06-04T12:43:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fdac872b...
bd52e0fc-afa6-4875-9c9d-5176ffdd0605
danlee2025/Leetcode
archive0/29.cpp
#include <iostream> #include <vector> #include <map> #include <stack> #include <string> #include <map> #include <algorithm> using namespace std; class Solution { public: int divide(int dividend, int divisor) { if (divisor == dividend) return 1; if (divisor == INT_MIN) return 0; bool sign = true; ...
ALGO
0.999959
5.474213
{ "github_metadata": { "branch": "master", "commit_count": 208, "repo_created_at": "2018-08-20T13:11: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": "f2da56bf...
648bd089-2779-44c8-ad28-31e35a1f1372
loooo139/leetcode-solutions
145.二叉树的后序遍历.cpp
/* * @lc app=leetcode.cn id=145 lang=cpp * * [145] 二叉树的后序遍历 * * https://leetcode-cn.com/problems/binary-tree-postorder-traversal/description/ * * algorithms * Hard (69.13%) * Likes: 205 * Dislikes: 0 * Total Accepted: 44K * Total Submissions: 63.4K * Testcase Example: '[1,null,2,3]' * * 给定一个二叉树,返回...
ALGO
0.999979
6.398372
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2019-06-11T15:45: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": "f77f1a9bfd...