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
0672fe18-80cf-453c-a0f5-6c50f0edca19
yuntan/WaveRoom
wavecalculator.cpp
#include <QVector3D> #include <QtConcurrent> #include <QScriptEngine> #include <QScriptValue> #include <QScriptValueList> #include <QThread> #include <QDebug> #include "facedata.h" #include "wavecalculator.h" WaveCalculator::WaveCalculator(QScriptValue ini_dist, QScriptValue ini_velo, i...
ALGO
0.986284
5.551435
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2014-10-04T14:26: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": "87dad2f8fe...
614e4622-569a-439c-987a-93d80a5b0f0b
bindscha/x-stream
algorithms/bfs/bfs.hpp
/* * X-Stream * * Copyright 2013 Operating Systems Laboratory EPFL * * 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 requi...
ALGO
0.993967
4.189009
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2015-08-29T14:28:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 82, "forks": 40, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "dbe85d0...
28175449-ccbd-4ba5-a28e-cfc5134d07cd
ibudiselic/contest-problem-solutions
tc 160+/BalancingAct.cpp
#include <algorithm> #include <cassert> #include <cstdio> #include <iostream> #include <sstream> #include <string> #include <vector> #include <cstring> #include <utility> #include <set> using namespace std; const long long oo = 100000000000LL; // 10^11 void gen_sums(int p, long long cur, const vector<int> &v, vector<...
ALGO
0.999848
4.433345
{ "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": "c56fc2a6b...
5f18b7e3-beda-4272-aa31-92feecd6cfb3
AkashPatel01p/Curve-Program
Main.cpp
#include <iostream> //for standard input and output #include <string> //for C++ strings /* Why this project would not be used in car computing things Caclus III / Mulitivariable numerical methods are open reserch problem Outside of monte carlo methods, open problem for centuries One gaint problem is vector qua...
ALGO
0.999486
4.506435
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2018-12-05T19:56: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": "f7f6840ed...
2fa8aa3a-242d-4932-a7cd-2be08835eb20
zh-hang/compiler
LexicalAnalysis.cpp
#include "LexicalAnalysis.h" int currentChar; // 当前标记 int lineNum = 1; // 源码行号 int charNum = 0; //字符总数 // struct node *next(struct node *p, char *fp, int *fpos) { int type, i, j; char value[255] = {0}; while (1) { charNum++; currentChar = fp[*fpos]; (*fpos)++; if (cur...
ALGO
0.994275
3.564784
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2020-10-21T05:59: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": "83a208206...
820bf204-19db-45cd-9632-11897bd2f6db
Shivaram35144/IEEERAS
obstacleAvoid.ino
const int trigPin1 = 11; const int echoPin1 = 10; const int trigPin2 = A3; //13; const int echoPin2 = A4; const int trigPin3 = A2; const int echoPin3 = A5; const int in1 = 9; const int in2 = 8; const int in3 = 4; const int in4 = 3; const int enA = 5; const int enB = 6; #define PWM 200 #define DIS 25 void s...
ALGO
0.990629
4.390144
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-05-12T15:58:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8f56145b03...
8bc13e0e-45de-43d3-977a-fb902d53b523
adahi-oval/binaryTrees
include/ArbolEq.h
#pragma once #include "Nodo.h" #include "ArbolBin.h" #include <queue> #include <iostream> template <class Key> class ABEquilibrado : public AB<Key> { public: // Constructor ABEquilibrado() { this->raiz = nullptr; } int getNumNode() const { return this->numNodos; } // Método insert bool insert(...
ALGO
0.99959
4.452845
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2024-04-21T11:51:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "20a15c56b1...
f7332c98-51b9-4460-a19e-3d3a971902cd
AMReX-Codes/amrex
Src/Base/AMReX_FabArrayUtility.H
#ifndef AMREX_FABARRAY_UTILITY_H_ #define AMREX_FABARRAY_UTILITY_H_ #include <AMReX_Config.H> #include <AMReX_FabArray.H> #include <AMReX_LayoutData.H> #include <AMReX_Print.H> #include <AMReX_ParReduce.H> #include <limits> namespace amrex { template <class FAB, class F, class bar = std::enable_if_t<IsBase...
ALGO
0.994574
5.994262
{ "github_metadata": { "branch": "development", "commit_count": 27456, "repo_created_at": "2017-04-28T19:37:00.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 637, "forks": 407, "issues": 21, "pull_requests": 19 }, "file_meta": { "content_id...
2ee2d006-035a-4faa-8e87-82668b06791b
DIR-LAB/ycsb-storedsbench
storeds/rbtree/rbtree_vmem.cc
// // Created by anarayanan on 10/25/19. // #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <assert.h> #include<stdbool.h> #include <libvmem.h> #include "rbtree_common.h" namespace ycsbc { class RbtreeVmem : public StoredsBase { public: RbtreeVmem(const char *pat...
TOOL
0.961643
5.119341
{ "github_metadata": { "branch": "master", "commit_count": 385, "repo_created_at": "2019-09-28T12:30:56.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 20, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "dbfd212...
1cdedbe2-7416-473b-b4a2-de84fd584516
ChingSsuyuan/Image-Segmentation-By-Network-Flow
Compression_dinic.cpp
#include <opencv2/opencv.hpp> #include <vector> #include <cmath> #include <algorithm> #include <iostream> #include <queue> #include <climits> #include <unordered_map> using namespace std; using namespace cv; // Constants const int BLOCK_SIZE = 2; const int C = 100; // Weight upper bound const double SIGMA...
ALGO
0.999881
6.904181
{ "github_metadata": { "branch": "main", "commit_count": 271, "repo_created_at": "2024-10-31T15:14:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9dd234745c...
bc5b9e2e-6b35-4e0d-a022-ab371197e849
ttzztztz/leetcodeAlgorithms
排序/1366. Rank Teams by Votes.cpp
class Solution { public: string rankTeams(vector<string>& votes) { if (votes.empty()) return ""; const int n = votes.size(), m = votes[0].size(); unordered_map<char, vector<int>> data; for (const string& vote : votes) { for (int j = 0; j < m; j++) { if (!d...
ALGO
0.999998
6.034842
{ "github_metadata": { "branch": "master", "commit_count": 872, "repo_created_at": "2019-09-03T06:57:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "78df23a...
a53e58d9-e725-439d-bf85-5c5d2b66a492
Xilinx/Vitis_Accel_Examples
host_py/hello_world_py/src/vadd.cpp
/** * Copyright (C) 2019-2021 Xilinx, Inc * * Licensed under the Apache License, Version 2.0 (the "License"). You may * not use this file except in compliance with the License. A copy of the * License is located at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in ...
ALGO
0.997311
6.072834
{ "github_metadata": { "branch": "main", "commit_count": 1899, "repo_created_at": "2019-10-13T20:04:24.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 548, "forks": 219, "issues": 9, "pull_requests": 1 }, "file_meta": { "content_id": "65ee87...
8d4aad47-e8c2-45d5-b139-1ba86e8d6be8
zilliztech/BBAnn
include/util/merge.h
#pragma once #include "heap.h" // Id Type: C::TI // Distance type: C::T template <class C> void merge(typename C::T *dis1, typename C::TI *id1, typename C::T *dis2, typename C::TI *id2, int64_t nq, int64_t topk, int64_t data2_base) { using DIS_T = typename C::T; using ID_T = typename C::TI; #pragma ...
ALGO
0.999455
4.91608
{ "github_metadata": { "branch": "master", "commit_count": 184, "repo_created_at": "2021-05-27T07:19:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 35, "forks": 13, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "1366c59...
9883c653-6ab3-42a5-a4d4-92b5c16f0d95
KenJi544/unIII
Hancu/18-09-2018_14-22-45/Exemplu1.2.1.cpp
/* Exemplu 1.2.1 Sa se elaboreze un program OpenMP in care se determina suma a doi vectori. Firele vor calcula cite 100 de elemente ale vectorului. Sa se determine cate elemente ale vectorului suma vor fi determinate de fiecare fir in parte. */ #include <omp.h> #include<stdio.h> #include <iostream> #define CHUNKSIZE 1...
ALGO
0.993521
3.527645
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2018-09-16T11:23:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "061ec79d5...
1dc8bdae-b98a-4ced-a0c6-196a100b6f7d
haru210/atcoder
ABC329/B.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; using pint = pair<int,int>; using pll = pair<long long, long long>; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep2(i,n) for (int i = 1; i <= (int)(n); i++) #define YesNo(bool) if(bool) cout << "Yes" << endl; else cout << "No" << end...
ALGO
0.999971
3.631833
{ "github_metadata": { "branch": "master", "commit_count": 439, "repo_created_at": "2023-05-18T08:20:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "90282613...
af788cff-a3f2-4cdf-8caf-99049db53443
Luattapcode/Fubonong
WORD.cpp
/*The best way to get something done is to begin*/ #include <bits/stdc++.h> #define ll long long #define int long long #define fr(i,a,b) for(int i=a;i<=b;i++) #define frd(i,a,b) for(int i=a;i>=b;i--) #define pb push_back #define fi first #define se second #define el '\n' #define dembit1(x) __builtin_popcount(x) #define...
ALGO
0.99993
3.476073
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-08-06T09:59:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9302abb08e7...
5b059b8c-fb37-4f61-b2e6-6f47a8d3cf27
notreallystatic/competitive-programming
Dynamic Programming/palindrome-partitioning-problem.cpp
/* Author : sk92907/notreallystatic github:https://github.com/notreallystatic linkedin : https://www.linkedin.com/in/notreallystatic/ */ /* Problem Statement: Given a string, a partitioning of the string is a palindrome partitioning if every substring of the partition is a palindrome. For example, “aba|b|bbabb|a|b|aba...
ALGO
0.999984
5.199952
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2020-05-21T03:35:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e69f52aeb...
6be91987-9b56-4815-a2b6-59223b899828
thenikhilsharma/DSA-cpp
L21sumOfTwoArrays.cpp
#include<iostream> #include<bits/stdc++.h> using namespace std; int addition(vector<int> &arr1, vector<int> &arr2){ int i = arr1.size() - 1, j = arr2.size() - 1; int res = 0, carry = 0, temp = 0, multiplier = 1; while (i >= 0 || j >= 0 || carry) { int digit1 = (i >= 0) ? arr1[i--] : 0; int digit2 = (j...
ALGO
0.999919
5.331287
{ "github_metadata": { "branch": "main", "commit_count": 117, "repo_created_at": "2024-06-21T15:07: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": "6ec0b36305...
7623b81b-deaa-42bc-8c58-ce11183bee83
abhirup-roy/cuda-cpp
03.06-Cooperative-Algorithms/Sources/maxwell.h
#pragma once #include <algorithm> #include <vector> #include <fstream> #include <thrust/universal_vector.h> #include <thrust/sequence.h> #include <thrust/for_each.h> #include <thrust/transform.h> #include <thrust/iterator/zip_iterator.h> #include <thrust/iterator/transform_iterator.h> #include <thrust/iterator/counti...
ALGO
0.972459
4.969366
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2025-07-08T16:05: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": "2b4a3949d22d...
01b87760-03bb-4a51-8d95-d25e76433e79
Altu-Bitu/AlgorithmStudy_LYJ
12월 07일 - 위상 정렬/23059.cpp
// // 23059번 - <NAME> // #include <iostream> #include <vector> #include <map> #include <queue> #include <algorithm> using namespace std; //위상정렬 vector<string> topologicalSort(int n, map<string, int> &indegree, map<string, vector<string>> &graph) { vector<string> result; priority_queue<string, vector<string>,...
ALGO
0.999988
4.245886
{ "github_metadata": { "branch": "main", "commit_count": 295, "repo_created_at": "2021-08-26T08:09:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2cc4542968f...
3acb6cf8-fa72-4054-992c-d8544a0ba58b
Adityacdev/FOC-CSA5778
FOC(Experiment 36).cpp
#include <stdio.h> int main() { int num_students = 200; int total_as = 0, total_bs = 0, total_cs = 0, total_ds = 0, total_fs = 0; for (int i = 1; i <= num_students; i++) { int student_num, num_grade; printf("Enter student number and number grade for student %d: ", i); scanf("%d...
TOOL
0.966957
3.390569
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2023-05-05T07:50: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": "6a3e4b4d88c1...
055c2bdd-c502-4adf-bd14-a0f3e7aed6ba
RuhulAminSharif/UVA
Submissions/10099.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long int #define ld long double #define endl "\n" #define inf 1e18 int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); ll n, m, test = 0; while( cin >> n >> m && (n+m) ) { cout << "Scenario #" << ++test << endl; cou...
ALGO
0.999894
4.366659
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-10-22T06:56:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1dda81d1da8...
a4194675-0614-4806-95f8-7f9a1bea6f19
ZenSepiol/ZenSepiol
programs/connect_four/connect_four_game/connect_four_game.hpp
#pragma once #include <array> #include <set> enum class Player { red, blue, none }; class ConnectFourGame { public: using GameState = std::array<std::array<Player, 7>, 6>; ConnectFourGame(); // Makes a move for the current player between 1 and 7 // Changes the game state // Evalua...
ALGO
0.912533
6.487394
{ "github_metadata": { "branch": "main", "commit_count": 78, "repo_created_at": "2021-10-05T09:35:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5395e2bcba...
08565760-f721-4adc-a8e3-b07746af0769
Seungchan0325/ioikorea
fall2024/week 1/A.cpp
#include <bits/stdc++.h> using namespace std; const int MAXN = 55; bool visited[MAXN]; int N, mat[MAXN][MAXN], dist[MAXN]; int bfs(int u) { memset(visited, 0, sizeof(visited)); memset(dist, 0, sizeof(dist)); queue<int> q; q.push(u); visited[u] = true; while(!q.empty()) { auto u = q....
ALGO
0.999945
3.659762
{ "github_metadata": { "branch": "main", "commit_count": 40, "repo_created_at": "2024-08-18T06:12: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": "2922b8cf2e4...
fdd8f7b3-15a2-4334-9ec0-999cab9fc5ad
yashko-9/Data-Structures-And-Algorithms
Sorting Algorithms/InsertionSort.cpp
#include <iostream> #include <cstdlib> #include <ctime> using namespace std; void insertionSort(int *arr, int size) { int tmp, j; for (int i = 1; i < size; i++) { tmp = arr[i]; j = i - 1; while (tmp < arr[j] && j >= 0 ) { arr[j + 1] = arr[j]; j = j - 1; } arr[j + 1] = tmp; } } int main() { ...
ALGO
0.999385
4.486722
{ "github_metadata": { "branch": "master", "commit_count": 33, "repo_created_at": "2019-07-07T12:48:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "670e562bc...
0f413f97-ab0e-4ba1-925c-d7ffefd1d3d7
ishandutta2007/codeforces-e
eden_cy/normal/1662/I.cpp
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 2e5 + 10; int n, m, s[N]; int x[N]; signed main() { scanf("%lld%lld", &n, &m); for (int i = 1; i <= n; ++i) { scanf("%lld", s + i); s[i] += s[i - 1]; } for (int i = 1; i <= m; ++i) scanf("%lld", x + i); ...
ALGO
0.999401
3.328853
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34: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": "095beaa1f636...
bdc18e2d-d634-4855-9765-76a79769e1fd
txstc55/voronoi-minesweep
src/Helpers.cpp
#include "Helpers.h" #include <iostream> #include <fstream> #define PI 3.14159265 void VertexArrayObject::init() { glGenVertexArrays(1, &id); check_gl_error(); } void VertexArrayObject::bind() { glBindVertexArray(id); check_gl_error(); } void VertexArrayObject::free() { glDeleteVertexArrays(1, &id); check_gl...
TOOL
0.981311
5.429365
{ "github_metadata": { "branch": "master", "commit_count": 26, "repo_created_at": "2019-01-01T22:08:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 8, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fe475d09d...
dc5bf8f1-c592-4b29-8c5a-e77cf227e4f3
JimWright4089/Contest
2020/ICPC_PacNW/ContestData/longestcommonsubsequence/submissions/accepted/lcs_tgr.cpp
#include <iostream> #include <string> using namespace std ; int cnt[26][26] ; int main() { int n, k ; cin >> n >> k ; string s ; for (int i=0; i<n; i++) { cin >> s ; for (int j=0; j<k; j++) for (int m=j+1; m<k; m++) cnt[s[j]-'A'][s[m]-'A']++ ; } int r = 0 ; for (int...
ALGO
0.999954
3.495252
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2023-02-28T19:54: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": "e2c96f088d86...
f4380919-6fd2-4963-92fb-b53e4c879cf6
Altman-S/Leetcode
BinaryTree/0530_getMinimumDifference.cpp
// created by Pi on 30/5/2021 // 给你一棵所有节点为非负值的二叉搜索树,请你计算树中任意两节点的差的绝对值的最小值。 // input: 1 // \ // 3 // / // 2 // output: 1 // https://mp.weixin.qq.com/s/Hwzml6698uP3qQCC1ctUQQ /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeN...
ALGO
0.999991
6.062285
{ "github_metadata": { "branch": "main", "commit_count": 56, "repo_created_at": "2021-04-18T15:45: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": "0fa4a2e511e...
26241604-1f8a-4656-806c-45cddc1540d6
BackupTheBerlios/smx-svn
branches/smxgroup/smx/libsmx/qpriq.h
/* COPYRIGHT 1998 Prime Data Corp. All Rights Reserved. Duplication of this file without prior written authorization is strictly prohibited. */ #ifndef _QPRIQ_H #define _QPRIQ_H #include <memory.h> #include <math.h> template <class compType, class storType> class qPriQ { private: struct posType { compType c; ...
ALGO
0.992711
4.001144
{ "github_metadata": { "branch": "master", "commit_count": 280, "repo_created_at": "2015-08-15T06:29: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": "769ffdb1...
75ad190e-98d1-4c9a-bb03-cab8f9675ef6
midjji/mlib
utils/configuration.h
#pragma once #include <string> #include <map> #include <vector> #include <assert.h> #include <iostream> #include <sstream> namespace mlib{ /** * @brief The Configuration class - Simplified runtime configuration. * * * # Configurationsfile * # Assumed UTF8 * # CaSe SensitivE! * # rows beginning with # wi...
CONFIG
0.926922
5.030173
{ "github_metadata": { "branch": "master", "commit_count": 159, "repo_created_at": "2020-12-01T18:04:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "fb119b5d...
723aa3d8-d825-4f56-8c67-83bdd76d2939
opengm/opengm
include/opengm/utilities/partitions.hxx
#pragma once #ifndef OPENGM_PARTITIONS_HXX #define OPENGM_PARTITIONS_HXX #include <vector> #include <algorithm> namespace opengm { /// Enumaration of partitions of a set of N nodes template<class I=size_t, class L=size_t> class Partitions { public: typedef I EdgeLabelType; typedef L NodeLabelT...
ALGO
0.990101
6.273409
{ "github_metadata": { "branch": "master", "commit_count": 2107, "repo_created_at": "2012-06-01T11:37:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 421, "forks": 153, "issues": 58, "pull_requests": 9 }, "file_meta": { "content_id": "0f...
07021b50-c008-4b6e-9d94-4209bc38984c
tmpoe/AlgorithmsAndDataStructures
sorts/sorts/MergeSort.cpp
#include "pch.h" #include "MergeSort.h" #include <iostream> MergeSort::MergeSort(int *array, int size): m_size(size), m_arr(array) { m_temp = new int[m_size]; split(0, m_size - 1); } MergeSort::~MergeSort() { delete[] m_temp; } void MergeSort::split(int low, int high) { ///if 1 element remains if (low == high) ...
ALGO
0.999567
5.353939
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2018-10-29T16:09: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": "cea2e34e2d...
895e2e82-2f06-4742-bea4-3263d93222fa
Lipika-M/DSA-series
DAY32.cpp
//Problem:reverse nodes in k groups //https://leetcode.com/problems/reverse-nodes-in-k-group/description/ class Solution { public: int length(ListNode* head) { ListNode* temp = head; int len = 0; while (temp != NULL) { len++; temp = temp->next; } retur...
ALGO
0.999604
4.731265
{ "github_metadata": { "branch": "main", "commit_count": 127, "repo_created_at": "2025-02-25T20:58: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": "8948690d23...
7cfc13e6-1042-4586-9359-635332c5e84c
AbhinavTiwari2705/Leetcode
743. Network Delay Time.cpp
class Solution { public: int networkDelayTime(vector<vector<int>>& times, int n, int k) { vector<vector<pair<int, int>>> adj(n + 1); vector<int> distance(n + 1, 1e9); // Build adjacency list for (int i = 0; i < times.size(); i++) { adj[times[i][0]].push_back({times[i][1]...
ALGO
0.999944
5.923683
{ "github_metadata": { "branch": "master", "commit_count": 369, "repo_created_at": "2023-05-01T19:21:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "39ab4427...
f261b996-3f33-46b0-bcfb-5152bfd37344
a3X3k/B-Tech
S3/Advance Programming/Lab/4/Week4-5-6/sample programs/Sequence containers/vector-tuples.cpp
#include <iostream> #include <vector> #include <tuple> #include <algorithm> using namespace std; bool sortbysec(const tuple<int, int, int>& a, const tuple<int, int, int>& b) { return (get<1>(a) < get<1>(b)); } int main() { vector<tuple<int, int, int> > v; v.push_back(make_tuple(10...
ALGO
0.999803
5.363797
{ "github_metadata": { "branch": "main", "commit_count": 148, "repo_created_at": "2021-05-20T16:48:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "954a6e5cb...
85c11952-c583-48c8-a1fe-7286e7c76d19
rafaelcsva/CompetitiveProgramming
code/CodeForces/GlobalRound1/c.cpp
#include <bits/stdc++.h> using namespace std; const int D = 25; int get_resp(int number){ int best = -1; for(int i = 1 ; i < number ; i++){ best = max(best, __gcd(number ^ i, number & i)); } return best; } int main(){ ios::sync_with_stdio(false); cin.tie(NULL); int pre[] = {1,...
ALGO
0.999956
4.519954
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-08-30T23:18: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": "413458cd3...
b19d1b99-bcf3-47ae-997c-74778f4022c5
av-novikov/diffusion_solver
model/3D/GasOil_3D_NIT/GasOil3DNITSolver.cpp
#include "model/3D/GasOil_3D_NIT/GasOil3DNITSolver.h" using namespace std; using namespace gasOil_3d_NIT; GasOil3DNITSolver::GasOil3DNITSolver(GasOil_3D_NIT* _model) : AbstractSolver<GasOil_3D_NIT>(_model) { Initialize(model->cellsNum_r+2, 2*(model->cellsNum_z+2)*model->cellsNum_phi); plot_Tdyn.open("snaps/T_dyn.d...
ALGO
0.99961
3.734812
{ "github_metadata": { "branch": "master", "commit_count": 72, "repo_created_at": "2015-12-18T08:07:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "9a8e38bb0...
26db7d08-7e04-43fb-8dae-44ec9c77956a
chin-herng/competitive-programming
Codeforces/519/B.cpp
#include <bits/stdc++.h> #pragma GCC optimize("unroll-loops,no-stack-protector") #pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define watch(x) cout << (#x) << " is " << (x) << endl #define debug cout << "hi" << endl using namespace std; typedef long long ll; typedef long double ld; typedef ...
ALGO
0.999958
3.114895
{ "github_metadata": { "branch": "main", "commit_count": 7, "repo_created_at": "2022-05-07T10:56: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": "165105c426ed...
34827bdf-8f7e-44c3-b196-14c703c3db5b
yutarchery/GitCoder
ABC/201-250/abc235/B.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int, int> Pii; typedef pair<int, ll> Pil; typedef pair<ll, ll> Pll; typedef pair<ll, int> Pli; typedef vector<vector<ll>> Mat; #define fi first #define se second const ll MOD = 1e9 + 7; const ll MOD2 = 998244353; c...
ALGO
0.99999
3.975668
{ "github_metadata": { "branch": "main", "commit_count": 1429, "repo_created_at": "2021-04-20T14:39: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": "14b1e8364...
f376550a-18c5-456e-8ddf-91a9fd2d4a00
zgoreck4/TI-NBC
code/TikNNAlgorithm.cpp
#include "TikNNAlgorithm.h" #include "DataSample.h" TikNNAlgorithm::TikNNAlgorithm(int k, std::vector<DataSample> data, std::chrono::microseconds::rep& sort_time, std::vector<double> ref_coords): k(k), data(data), sort_time(&sort_time), ref_coords(ref_coords){ } TikNNAlgorithm::~TikNNAlgorithm() { } std::vector...
ALGO
0.999603
5.414816
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-08-29T10:37:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "35ebf2160e3c...
a7273795-3c14-4195-9a7c-6d8d8edbba2b
thisisshub/HacktoberFest
cpp/sort_0_1_2_array.cpp
/* Sort an array of 0s, 1s and 2s Given an array of size N containing 0s, 1s, and 2s; sort the array in ascending order. Input: First line of input contains number of testcases T. For each testcase, there will be two lines, first of which will contain N. The second lines contains the elements of the array. Output: ...
ALGO
0.999871
5.51718
{ "github_metadata": { "branch": "master", "commit_count": 3643, "repo_created_at": "2020-09-29T10:51:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 48, "forks": 659, "issues": 8, "pull_requests": 17 }, "file_meta": { "content_id": "f3e...
e62b938e-3ea8-41d3-ad39-fde9dd61cfda
habibrahmanbd/Code-Lab
Important Algorithm (Habib)/Data Structure/Segment Tree/Segment Tree - Init.cpp
#define mx 10001 ll arr[mx]; ll tree[mx*3]; void init(ll node, ll b,ll e) { if(b==e) { tree[node] = arr[b]; return; } ll left = node*2; ll right = 2*node+1; ll mid = (b+e)/2; init(left, b, mid); init(right, mid+1, e); tree[node]=tree[left]+tree[right]; } ll query(ll n...
ALGO
0.999796
4.393587
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2017-08-06T08:36:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2b351739f6...
b7c3643b-dd4b-4a1b-9596-4875a2bdba36
Kodsport/testdata_tools
examples/lampswitches/submissions/partially_accepted/sl_nocommon.cpp
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for(int i = a; i < (b); ++i) #define trav(a, x) for(auto& a : x) #define all(x) x.begin(), x.end() #define sz(x) (int)(x).size() typedef long long ll; typedef pair<int, int> pii; typedef vector<int> vi; struct Bits { vector<uint64_t> words; Bits(int...
ALGO
0.999704
3.491554
{ "github_metadata": { "branch": "master", "commit_count": 82, "repo_created_at": "2016-01-20T19:52:26.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 5, "forks": 6, "issues": 7, "pull_requests": 1 }, "file_meta": { "content_id": "13f6941faf...
a487e363-90e5-4afe-8e1a-094a0dbd9c18
alexandraback/datacollection
solutions_2463486_0/C++/pelajesh/fairsquare.cpp
#include <fstream> #include <sstream> #include <math.h> using namespace std; ifstream sf("fs.in"); ofstream vf("fs.out"); bool isPali (long long int x) { string s; stringstream ss; ss << x; s = ss.str(); for (int i = 0; i < s.length()/2; i++) { if (s[i] != s[s.length()-i-1]) return false; ...
ALGO
0.999344
3.868387
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9c24b768a...
c23787af-2229-45e9-930a-0f0ce5f6e8fd
MuhammadBurhanHaseeb/ProgramingDaysSemester1
pd assignment rg #129/border.cpp
#include <iostream> using namespace std; main() { int h, x, y; cout << "Enter value of h: "; cin >> h; cout << "Enter cordinates of x: "; cin >> x; cout << "Enter cordinates of y: "; cin >> y; if ((x >= 0 && x <= 3 * h) && y == 0) { cout << "Point is on the border"; } ...
ALGO
0.998758
3.027337
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-06-26T15:48:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e039424f0e...
b36b3ccf-1e32-4a00-abd9-0a6a4b02f341
priyalbhatewara123/May-LeetCoding-Challenge-2021
Day25-Evaluate Reverse Polish Notation.cpp
class Solution { public: int evalRPN(vector<string>& tokens) { stack<int> s; for (auto & t : tokens) { if (t == "+" || t == "-" || t == "*" || t == "/") { int a = s.top(); s.pop(); int b = s.top(); s.pop(); if (t == "+") a = b + a; ...
ALGO
0.999932
5.968427
{ "github_metadata": { "branch": "main", "commit_count": 15, "repo_created_at": "2021-05-03T07:56: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": "f7bc3aa10b4...
d9ef5962-0151-4bc2-bd4c-eb8a66a0e9f4
JK54/Code
Data_Struct/Include/BinaryTree.hpp
#ifndef _BINARY_TREE_H #define _BINARY_TREE_H #include "sys_comm.h" #include "Stack.hpp" #include "Queue.hpp" template<typename T> class BinTreeNode; template<typename T> class BinTree; template<typename T> class Forest; template<typename T> BinTreeNode<T>* CreateTreeByInPostOrder(T*,T*,int); template<typename T>...
ALGO
0.999523
3.979614
{ "github_metadata": { "branch": "master", "commit_count": 235, "repo_created_at": "2018-03-27T06:43: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": "da07d3bc...
4262db2e-c70a-4f3d-97e9-6be905da2967
ishikkkkaaaa/DSA
CLUTTER/CP/HackerRank/DS/Dynamic Array-not done/ans.cpp
#include <bits/stdc++.h> using namespace std; string ltrim(const string &); string rtrim(const string &); vector<string> split(const string &); /* * Complete the 'dynamicArray' function below. * * The function is expected to return an INTEGER_ARRAY. * The function accepts following parameters: * 1. INTEGER n ...
ALGO
0.999057
5.057372
{ "github_metadata": { "branch": "main", "commit_count": 68, "repo_created_at": "2021-05-08T14:47:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 28, "forks": 12, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "59982365c...
ab42f3c0-3ec9-44ff-839c-4dc9e16f9323
Sensrdt/Geeks-For-Geeks-Solution
Tree/k-th smallest element in BST.cpp
{ #include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; #define ARRAY_SIZE(arr) sizeof(arr) / sizeof(arr[0]) typedef struct Node Node; struct Node { int data; int lCount; Node *left; Node *right; }; int KthSmallestElement(Node * root, in...
ALGO
0.999997
5.560313
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2019-07-25T07:47:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3373e276a...
8a8cc2f5-35db-4d9f-8658-3a0adca77f96
huangkang314/Behavior-Atlas
src/aca/src/seg/dtak/dtakFord.cpp
#include "mex.h" #define max(a, b) (((a) > (b)) ? (a) : (b)) #define argmax(a, b) (((a) > (b)) ? 0 : 1) /* * The most general implementation of DTAK via Dynamic Programming. */ double dtakDP(double *K, double *P, double *KC, int n1, int n2, double *wF1s, double *wF2s); /* * Dynamic Programming with local constr...
ALGO
0.999995
5.888893
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-07-19T05:57:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 35, "forks": 0, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "d746aa5a...
bf14865a-283c-4546-9705-e9a5f7ff7238
pereman2/bou
compiler.cc
#include "compiler.h" #include <stdlib.h> #include <cstdarg> #include <cstring> #include "darray.h" #include "debug.h" #include "elf.h" #include "parser.h" #include "scanner.h" #include "token.h" compiler_state state; // this array contains the registers ordered by code: // 000 eax 001 ecx 010 edx 011 ebx 100 esp /...
ALGO
0.93166
3.971352
{ "github_metadata": { "branch": "main", "commit_count": 43, "repo_created_at": "2021-12-12T22:56:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1b6a3a0eae4...
0b968c59-2ee3-4932-8c10-acb5e461a12d
vandit98/data-structure-and-algorithm
linked_list/single_linked_list_c++/deletion_wrt_value.c++
#include <bits/stdc++.h> #include <iostream> using namespace std; class Node { public: int data; // it will contain data Node *next; // it will point to next-this is a pointer // defining constructor Node(int data) { this->data = data; // next pointer will point to next th...
ALGO
0.999509
4.424771
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2022-08-15T14:08: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": "3024b002cb22...
60c64b6c-453b-425d-b594-ad05d944f0b7
ChouUn/CodeWorld
Template/fourier.h
// Name : Fast Fourier Transform 快速傅里叶变换 // Copyright : <EMAIL> #ifndef FOURIER_H_ #define FOURIER_H_ 20151229L #include <vector> #ifndef CSL_MATH_H_ #pragma message("need : csl_math.h"); #include <csl_math.h> #endif namespace csl { template <typename _Tp> struct fourier { public: typedef _Tp value_type; ...
ALGO
0.998647
5.663849
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2016-04-30T08:01:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "282ffc9ec...
510eb98f-6023-4bb1-8bc5-7cf98e0eb624
checkoutb/LeetCodeCCpp
ge1900/LT1944_2021-08-25_Number_of_Visible_People_in_a_Queue.cpp
#include "../header/myheader.h" class LT1944 { public: // D // for (int i = heights.size() - 1; i >= 0; --i) { // int h = heights[i], cnt = 0; // for (; !mono.empty() && mono.back() < h; ++cnt) // mono.pop_back(); // heights[i] = cnt + !mono.empty(); // mono.push_back(h); /...
ALGO
0.999979
5.372425
{ "github_metadata": { "branch": "master", "commit_count": 285, "repo_created_at": "2019-04-22T09:20:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8039fc4...
557437fc-b27b-4efd-b97b-01878e2bca1a
youndge/leetcode
cpp/src/ltc2.cpp
/* * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git * @Date: 2025-06-14 17:08:21 * @LastEditors: error: error: git config user.name & please set dead value or install git ...
ALGO
0.999555
5.915703
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2020-10-03T10:08:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1e8c6945d17...
f1bb92be-b9ec-457a-baad-c27db22eb006
miquelt9/PRO2-FIB
Stack & Queue/X13425/program.cc
#include "CuaIOParInt.hh" int temps_cua(queue<ParInt> c) { int r = 0; while(not c.empty()) { r += c.front().segon(); c.pop(); } return r; } void solve(queue<ParInt> c) { queue<ParInt> primera; queue<ParInt> segona; ParInt a; while(not c.empty()) { a = c.front(); /* cerr << "Afegint : ...
ALGO
0.999648
4.032889
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2021-11-11T09:03: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": "8da8b07ed84...
8a6d892c-439e-4380-b9f3-2650a3e78c7e
Ashishh0007/Ashish0007_LeetCode_Journey
Min Cost Climbing Stairs - GFG/min-cost-climbing-stairs.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> using namespace std; // } Driver Code Ends //Back-end complete function Template for C++ class Solution { int solve(vector<int>& cost, int n) { int prev2 = cost[0]; int prev1 = cost[1]; for(int i=2; i<n; ...
ALGO
0.999857
5.702038
{ "github_metadata": { "branch": "main", "commit_count": 153, "repo_created_at": "2022-10-19T18:46: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": "a12f077d62...
4df0f079-7085-48f8-bdf8-69089f42da7f
onisac-K/ACM-ICPC.etc
SHUOJ/1907.cpp
/* n阶方形矩阵快速幂模板,如果m*n的矩阵可以考虑将m,n存入结构体matrix中 函数分为3个,分别是矩阵相乘,转化单位矩阵,快速幂。 测试结果 AC BY SHU_ONISAC */ #include<iostream> #include<cstring> using namespace std; int mod; struct matrix{ long long a[15][15]; }; matrix matrix_muti(matrix a,matrix b,int n)//矩阵相乘(这个只要注意i,j,k的顺序就行了) { m...
ALGO
0.999812
3.491595
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2016-06-26T02:36:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df37f0850...
07d026e7-4ad3-4658-b171-6a5027aeb136
cramaechi/wind-chill-factor
main.cpp
#include <iostream> #include <cstdlib> #include <cmath> using namespace std; double computeWCF(double v, double t); //Precondition: v and t are both non-negative, non-zero numbers. //Returns the wind chill factor. //void clearScreen(); //Clears the console screen; int main(int argc, char* argv[]) { char ans; ...
TOOL
0.995629
4.532166
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-12-01T06:04:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a902366ba8...
432c10fa-69fe-4d2d-af83-0b5bfc1fee91
kumasento/VELVET-PROGRAMMING
WikiOI/Old/wiki_1154.cpp
#include <iostream> #include <cstdlib> #include <cstdio> #include <cmath> #include <cstring> #define MAXN 210 using namespace std; struct segment{ int l, r; } q[MAXN]; int main(){ freopen("1154.in", "r", stdin); int n; cin>>n; memset(q, 0, sizeof(q)); int seq[n]; memset(seq, 0, sizeof(seq)); for(int i = 0; i ...
ALGO
0.999966
3.231333
{ "github_metadata": { "branch": "master", "commit_count": 69, "repo_created_at": "2014-11-10T05:45:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5598ac61d...
5c0d3ba9-383f-4398-aada-d4b8560d8ec8
Mjaiswal117/QuadTree
src/GeometryBoundary.cpp
#include "GeometryBoundary.hpp" #include <vector> GeometryBoundary::GeometryBoundary( const std::vector<std::array<double, 2>> &vertices, const std::vector<std::array<int, 2>> &connectivity) { for (const auto &conn : connectivity) { mLineSegments.push_back({{vertices[conn[0]][0], vertices[conn[0]][1]}, ...
ALGO
0.999154
7.255369
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2025-03-31T03:17:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a664f2bbf075...
a4dc7ed4-3765-4833-88ae-445888a22169
rajashekarkasturi/CppProgramming
Cpp11/RandomNumbers/RandomNumberDistribution.cpp
#include<iostream> #include<random> #include<chrono> using std::cin; using std::cout; using std::endl; int main() { unsigned seed = std::chrono::steady_clock::now().time_since_epoch().count(); std::default_random_engine __engine3(seed); cout << __engine3 << endl; //But only generates the values betwe...
TOOL
0.956531
3.890351
{ "github_metadata": { "branch": "master", "commit_count": 57, "repo_created_at": "2020-10-14T11:33:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f85af6daf...
629ebcc7-512d-440b-8326-19b7fc800401
Pabfigueira/Maratona
Codeforces/2015-2016_Samara_Regional_Intercollegiate_Programming_Contest_B.cpp
#include <bits/stdc++.h> using namespace std; #define sc(a) scanf("%d", &a) #define sc2(a, b) scanf("%d%d", &a, &b) #define sc3(a, b, c) scanf("%d%d%d", &a, &b, &c) #define scs(a) scanf("%s", a) #define pri(x) printf("%d\n", x) #define prie(x) printf("%d ", x) #define mp make_pair #define pb push_back #define BUFF io...
ALGO
0.999938
3.449894
{ "github_metadata": { "branch": "master", "commit_count": 433, "repo_created_at": "2016-08-13T20: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": "c21b5326...
f05d68d6-02a2-44fc-a1f5-4c7a23041597
siosio34/AlgorithmStudy
z_unclassified/2490.cpp
#include <iostream> using namespace std; void solve(int sum) { if(sum == 0) { cout << "D" << endl; } else if(sum == 1) { cout << "C"<< endl; } else if(sum == 2){ cout << "B" << endl; } else if(sum == 3){ cout << "A" << endl; } else if(sum == 4){ cout << "E" << endl; } } int main() { int arr[12]; ...
ALGO
0.999867
3.494265
{ "github_metadata": { "branch": "master", "commit_count": 656, "repo_created_at": "2018-06-06T04:32:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "e372b706...
94b0b55d-cd44-46ed-9969-e48a63a1a6b6
EmoryHuang/myLeetCode
Solution/386.字典序排数/386.字典序排数.cpp
/* * @Descroption: LeetCode 386. 字典序排数 * @Author: EmoryHuang * @Date: 2022-04-18 08:47:52 * @Method: * dfs * 对于当前数字 num * 若 num * 10 <= n, 则下一个数字为 num * 10 * 若到达最大值, 即 num % 10 == 9 or num + 1 > n, 则退回上一位 * 否则下一个数字为 num + 1 */ class Solution { public: vector<int> lexicalOrder(int n) { vector<i...
ALGO
0.999979
6.5613
{ "github_metadata": { "branch": "master", "commit_count": 327, "repo_created_at": "2021-05-03T09:10:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ae42560b...
b59266c9-cc7c-4113-b533-0067b056c860
angel-utn/laboratorio1-20232c
Clase 04/Sabado Virtual/Ejemplo01.cpp
/* Hacer un programa que simule tres operaciones de un cajero automático. Debe solicitar el importe (negativo para extraccion, positivo para depósito) El programa debe informar: A- Si hubo al menos un deposito mayor a $50000 B- La cantidad de depósitos realizados C- El total de dinero operado */ #i...
TOOL
0.936984
4.113464
{ "github_metadata": { "branch": "main", "commit_count": 49, "repo_created_at": "2023-07-28T21:06:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e7af8536938...
2f6b3dec-4e48-4431-9cb0-3a59fc6dc6b8
CodeWithIsmail/Competitive-Programming
CP Algorithms & Templates/Number Theory/Harmonic Series.cpp
/// *** --- || In the name of ALLAH ||| --- *** /// /// *** --- || Author: Code_with_Ismail ||| --- *** /// /* sample problem: https://cses.fi/problemset/task/1713 https://atcoder.jp/contests/abc172/tasks/abc172_d */ #include <bits/stdc++.h> using namespace std; ty...
ALGO
0.993926
4.480919
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2023-03-18T16:28: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": "a880eeb6c8...
30cdf8ab-9cf5-4b6a-a312-8e7e8c1134d4
TURING132/Game
leetcode/n0015-3Sum.cpp
#include <vector> #include <algorithm> using namespace std; class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { sort(nums.begin(), nums.end()); vector<vector<int>> res; for (int l = 0; l < nums.size(); l++){ if(l > 0 && nums[l] == nums[l - 1]) continue; ...
ALGO
0.999907
5.987267
{ "github_metadata": { "branch": "main", "commit_count": 89, "repo_created_at": "2024-04-01T11:04:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c8afaeccc06...
f09a5aaf-35e3-4d6d-b18b-4d5fe9ef0d38
18carica/IFSP
LIPA/TREINAMENTO-master/C03EX4/C03EX4S.CPP
#include <iostream> using namespace std; int main() { double A, B, R1, R2, R3, R4; // Leia A e B cout << "Digite A e B: "; cin >> A >> B; // R1 recebe A + B R1 = A + B; // R2 recebe A - B R2 = A - B; // R3 recebe A * B R3 = A * B; // R4 recebe A / B R4 = A / B; // Imprima R1, R2, R3 e ...
ALGO
0.994972
3.88125
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2023-09-06T00:22:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c026a777ff8...
327ab9ad-1714-4601-bf35-a375403fd135
aomarai/IT279
Assignment 5/a05_q3/src/q3_app.cpp
#include "SplayTree.h" #include "flags.h" #include "SplayTree.cpp" #include <iostream> #include <fstream> #include <string> #include <list> #include <iterator> #include <map> using namespace std; // Testing program int main() { cout << "\nAssignment 03, Question 03 (<NAME>): " << endl; cout << "Part A:" << end...
ALGO
0.975692
3.573998
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2022-04-07T19:01: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": "22735bb92ef...
67ea2fe7-96a0-461c-a8dc-ac9af6b6344b
mtao/AnotherRayTracer
src/geometry/Box.cpp
#include "art/geometry/Box.hpp" #include <array> #include <zipper/views/nullary/UnitView.hpp> #include "art/Ray.hpp" namespace art::geometry { std::string format_as(const Box& r) { return fmt::format("Box[{}:{}]", r.min(), r.max()); } Box Box::bounding_box() const { return *this; } bool Box::intersect(const Ray...
TOOL
0.936149
7.558809
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2020-04-09T00:25:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "00e31e97393...
b1763804-aae2-4977-b3f0-ceb51faa7583
AU-PSL/demon_simulation_code
ElectricForce.cpp
/** * @file ElectricForce.cpp * @class ElectricForce ElectricForce.h * * @brief Computes a radial electric force * * @license This file is distributed under the BSD Open Source License. * See LICENSE.TXT for details. **/ #include "ElectricForce.h" void ElectricForce::force1(const double currentTime) { ...
ALGO
0.978144
5.118946
{ "github_metadata": { "branch": "master", "commit_count": 403, "repo_created_at": "2015-06-04T18:48:30.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 11, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6d352552...
12e1a748-6c3a-495d-b59a-11e2862ea94b
Stoyan-Zlatev/Data-Sructures-and-Algorithms
Exams/Exam 06/2018-2019/Task 01/Stoyan.cpp
#include <bits/stdc++.h> using namespace std; struct Edge { size_t to, weight; bool operator>(const Edge& other) const { return this->weight > other.weight; } }; unordered_map<size_t, vector<Edge>> townMap; void findShortestPath(const size_t& value, vector<size_t>& distances) { distances[va...
ALGO
0.999965
4.501295
{ "github_metadata": { "branch": "main", "commit_count": 386, "repo_created_at": "2022-09-19T13:08:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 52, "forks": 7, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3ed026e61...
c85f6754-ceb8-4456-93d9-8df0550fb212
kimbsu00/Algorithm
Baekjoon/1987_알파벳.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; // left, top, right, bottom const int dr[4] = {0, -1, 0, 1}; const int dc[4] = {-1, 0, 1, 0}; bool visited[26]; int R, C; char map[22][22]; int solve(int row, int col) { char ch = map[row][col]; visited[ch - 'A'] = true; in...
ALGO
0.999586
4.015748
{ "github_metadata": { "branch": "master", "commit_count": 422, "repo_created_at": "2019-11-25T11:30: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": "2632b0a0...
2528579b-1de5-4797-aec7-84445bffb37e
Hartwelg/CS325_Analysis-Of-Algorithms
BabyFaceHeels.cpp
#include <iostream> #include <fstream> #include <string> #include <vector> #include <algorithm> using namespace std; void printArrays(vector<string>& babyFaces, vector<string>& heels) { cout << "BabyFaces: "; for (vector<string>::iterator it = babyFaces.begin(); it != babyFaces.end(); it++) { cout...
ALGO
0.999844
3.782938
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2020-10-19T22:45: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": "17e25ffcc4dd...
b74183e8-426f-40f7-a8f4-88717a6b96cb
qkja/DailyCode
代码/2024_06_24/test.cc
#include <iostream> int sum(int n) { int i, partialSum; partialSum = 0; for (i = 0; i <= n; i++) partialSum = i * i * i; return partialSum; } long int factorial(int n) { if (n <= 1) return 1; else return n * factorial(n - 1); } long int fib(int n) { if (n <= 1) ...
ALGO
0.99927
3.243672
{ "github_metadata": { "branch": "main", "commit_count": 308, "repo_created_at": "2021-08-28T08:57: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": "8ad9cea9a4...
293b9227-9be2-43a1-9257-62f70a552401
OuluBSD/libtopside
src/ComputerVision/OnepassStabilizer.h
#ifndef _ComputerVision_OnepassStabilizer_h_ #define _ComputerVision_OnepassStabilizer_h_ NAMESPACE_TOPSIDE_BEGIN int GetAreaSign(const Keypoint& a, const Keypoint& b, const Keypoint& c); bool IsSegmentIntersect(const Keypoint& a, const Keypoint& b, const Keypoint& c, const Keypoint& d); int IsRectInside(const Vec...
ALGO
0.976359
6.393482
{ "github_metadata": { "branch": "main", "commit_count": 939, "repo_created_at": "2021-04-15T19:41:48.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "38a1a36509a...
24569ceb-0b33-464c-8eb0-993e1df1ff0a
AndresRomeroCollaguazo/-Team3-DataStructure-3688
II-PARCIAL/Homework_03_Ordenamientos/CountSort.h
#pragma once template <class T> class CountSort { private: public: void countSort(T*, int); void imprimir(T*, int); }; template <class T> void CountSort<T>::countSort(T* vector, int n) { int *arr1; int* count_arr; arr1 = (int*)malloc(n * sizeof(int)); count_arr = (int*)malloc(n * sizeof(int)); ...
ALGO
0.999947
5.458877
{ "github_metadata": { "branch": "main", "commit_count": 629, "repo_created_at": "2021-05-19T22:51:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1155a531d9...
32e42e86-3a06-4fac-908b-d923dfd1a158
kosssshhhh/coding_test
백준/Gold/1509. 팰린드롬 분할/팰린드롬 분할.cc
#include <bits/stdc++.h> using namespace std; const int INF = 987654321; string s; int dp1[2504][2504], dp2[2504]; int go(int here) { if (here == s.size()) return 0; if (dp2[here] != INF) return dp2[here]; int &ret = dp2[here]; for (int i = 1; here + i <= s.size(); i++) { if (dp1[here][i]) ret = min(ret,...
ALGO
0.999987
3.662551
{ "github_metadata": { "branch": "main", "commit_count": 447, "repo_created_at": "2023-12-27T05:12: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": "64018ed3c6...
dd6f34a9-895d-461b-8b34-97b32595a284
mjhmilla/pendulumRbdlMuscod
SRC/pendulum.cc
/* @author M.Millard 2019 A simple example of pairing an RBDL model with a minimization OCP, and a least-squares OCP that is solved using MUSCOD-II. Single pendulum: ic: rest at 9 o'clock (gravity points at 6 o'clock) ec: rest at 12 o'clock cost: integral of torque squared State vector: x[0] = d/dt ...
ALGO
0.99258
5.978596
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2020-02-05T11:45:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bf73fd9309...
239c19c6-02af-49c5-b811-ad637b8ebaa9
hsj4436/Algorithm
프로그래머스/3/43163. 단어 변환/단어 변환.cpp
#include <string> #include <vector> #include <queue> #include <map> #define INF 987654321 using namespace std; map<string, int> visited; int solution(string begin, string target, vector<string> words) { int answer = 0; bool possible = false; for (string word : words) { visited[word] = INF; ...
ALGO
0.999989
5.058106
{ "github_metadata": { "branch": "master", "commit_count": 623, "repo_created_at": "2023-12-12T13:04:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1ceecba0...
eb8c3e85-8c54-426f-b26a-ce08aca06b3c
jnalanko/bufboss
src/BOSS/BOSS_construction.hh
#pragma once #include "BOSS/BOSS.hh" #include "util/globals.hh" #include "Kmer.hh" vector<LL> char_counts_to_C_array(vector<LL> counts){ vector<LL> C(256); // Cumulative sum of counts // Compute cumulative sum of counts for(LL i = 0; i < (LL)C.size(); i++){ C[i] = counts[i]; if(i > 0) C[i]...
ALGO
0.99911
5.361068
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2021-03-15T20:44:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a5ff6c6f8...
37d57a60-8870-4fc8-ae09-a3acf9d72458
Kawser-nerd/CLCDSA
Source Codes/AtCoder/arc052/C/1406157.cpp
#include <iostream> #include <vector> #include <queue> template<class T> std::vector<T> dijkstra(std::vector<std::vector<unsigned>> &A, std::vector<std::vector<unsigned>> &B, unsigned s) { using edge_t = std::pair<unsigned, T>; auto comp = [](edge_t i, edge_t j) -> b...
ALGO
0.999917
3.887971
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2019-09-30T05:38:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "c3fc5ed9...
8813ad7f-8dca-4f68-96f1-3f656dbbe8bd
kartikeyagg/Practice-Cpp
check_bipartite_dfs.cpp
#include<bits/stdc++.h> using namespace std; #define mod int(1e9+7) #define ll long long bool dfs(int curr,vector<int> &color,int n,vector<vector<int>> &vec){ // return 1 when bipartite; // if(color[curr] !=-1){ // return 1; // } bool t; for (int i = 0; i < n; i++) { if(vec[curr]...
ALGO
0.999943
5.061471
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2022-08-13T10:15:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f7c0f2cdd3...
c948901c-f84b-47e5-b561-aa153647985f
shr3012/code_daily
functions/binomialCoefficient.cpp
#include<bits/stdc++.h> using namespace std; int factorial(int n){ int fact = 1; for(int i=1;i<=n;i++){ fact = fact*i; } return fact; } int nCr(int n, int r) { if (r > n) return 0; // Binomial coefficient is 0 if r > n int nFact = factorial(n); // n! int rFact = factorial...
ALGO
0.999932
5.964117
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-09-05T15:52: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": "19fa30d890f0...
a35b5a2b-a583-4ab8-9276-b4e710be8743
gbakkk5951/OriginalProblems
20190709/source/EZN-lym/hss.cpp
#include<bits/stdc++.h> using namespace std; int n,m; char c[3050000]; int p=1000005,q=1000004; int mxs=0; int lmx[3050000]; int rmx[3050000]; int main() { freopen("hss.in","r",stdin); freopen("hss.out","w",stdout); cin >> n >> m; stack<int> stk; for(int i = 0; i < n; i++) { cin >> c[++q]; if(c[q] == 's') ...
ALGO
0.998499
3.479645
{ "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": "8e458b8498...
58ae30b8-30c3-4935-8361-72d1850103e7
Rauks/FuzzyFramework
src/fuzzy/ThenSugeno.h
/* * File: ThenSugeno.h * Author: Karl * * Created on 8 avril 2013, 16:34 */ #ifndef THENSUGENO_H #define THENSUGENO_H #include "../core/Expression.h" #include "Then.h" namespace fuzzy{ template<class T> class ThenSugeno : public Then<T>{ private: mutable T _premise; public: T...
TOOL
0.94278
6.39779
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2013-03-05T16:22: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": "c9b9ad91...
f0b4ba8f-2856-453d-ab96-c3d222c57364
733amir/acm
UVa/11935 - Through the Desert/solution.cpp
#include <iostream> #include <string.h> using namespace std; int ld, d, t, a, leak; // last distance, distance, type, amount, decrease float tank, minimumTank = 0, decrease; char temp[20]; void read() { // Read distance that the event happens scanf("%d", &d); // Find out what event happend scanf("%s"...
ALGO
0.991525
3.497628
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2016-05-18T10:13:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "2c9afb746...
feed1375-976c-4466-8b69-5314f1098987
nettee/leetcode
solutions/0928.surface-area-of-3d-shapes/0928.surface-area-of-3d-shapes.1541399876.cpp
/* * [928] Surface Area of 3D Shapes * * https://leetcode.com/problems/surface-area-of-3d-shapes/description/ * * algorithms * Easy (54.67%) * Total Accepted: 5.9K * Total Submissions: 10.7K * Testcase Example: '[[2]]' * * On a N * N grid, we place some 1 * 1 * 1 cubes. * * Each value v = grid[i][j] r...
ALGO
0.993317
5.752682
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2019-12-19T05:04:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3b89b2c16...
7191d979-56b0-4157-ab2c-4a1e58db7991
BackofenLab/CAM
src/AlternatingCycle.cpp
#include "AlternatingCycle.h" #include "GC_StlSetRangeIterator.h" using namespace Gecode; AlternatingCycle:: AlternatingCycle( Gecode::Space & home , Int::IntView _eduFirst , Int::IntView _eduSecond , Int::IntView _proFirst , Int::IntView _proSecond , const ValenceMatrix& eduMatrixS , const Valenc...
ALGO
0.992862
6.116671
{ "github_metadata": { "branch": "master", "commit_count": 21, "repo_created_at": "2016-03-31T13:51:54.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a8f44759ed...
be08a5d9-315b-4c66-9fce-ec1e6889dd21
younes38/my-competitive-programming-library
math/fundamentals/matrix_powmod.cpp
#include <bits/stdc++.h> using namespace std; // TODO it is not tested // multiply a and b, values are calculated modulo mod template <typename T = int64_t> vector<vector<T>> mul(const vector<vector<T>> &a, const vector<vector<T>> &b, T mod) { int rows_a = (int)a.size(); int cols_a = (int)a[0].size(); int rows_...
ALGO
0.999674
4.999344
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-06-06T11:43:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "48c7191a7ff9...
8b91f148-608e-4c44-97c6-ed4564e63d8f
nmtien1801/C
54_CTDL/TH_CTDL/bai2/NguyenMinhTien_21044611/main.cpp
#include <stdio.h> #include <math.h> void menu(){ printf("\n\n======{12,2,15,-3,8,5,1,-8,6,0,4,15}========\n"); printf("\n1. sap xep tang dan"); printf("\n2. tim so lon thu 3 trong day"); printf("\n3. dem so phan tu lon nhat trong day"); printf("\n4. sap xep theo tri tuyet doi tang dan"); printf...
ALGO
0.999931
3.200104
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-08-31T11:14: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": "3dd650b0e3...
830c3dc4-5fef-432b-b27b-ac984b0c4667
Yang-33/competitive-programming
atcoder/ABC/049_ABC_D.cpp
#include <bits/stdc++.h> using namespace std; using VS = vector<string>; using LL = long long; using VI = vector<int>; using VVI = vector<VI>; using PII = pair<int, int>; using PLL = pair<LL, LL>; using VL = vector<LL>; using VVL = vector<VL>; #define ALL(a) begin((a)),end((a)) #define RALL(a) (a)....
ALGO
0.999949
4.11134
{ "github_metadata": { "branch": "master", "commit_count": 2978, "repo_created_at": "2017-01-06T04:52:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 11, "pull_requests": 0 }, "file_meta": { "content_id": "a31c31...
bffa7b1d-244b-4a7e-9a8b-1fcec7ea2697
JuanCaceresDL/Repositorio-Jorge-Marroquin-y-Juan-Caceres
Laboratorio 3/Tarea.cc
#include <iostream> using namespace std; int main(){ char cuerpo, respuesta = 'n'; float tiempo, cont = 0, velocidad = 0, aceleracion, distancia = 0; while (cuerpo != 's'){ printf("\n"); printf("Cuerpo Caracter\n"); printf("Tierra: t\n"); printf("Venus: v\n"); printf("Luna: ...
ALGO
0.935954
3.397401
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2019-01-17T14:51:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f349b0e2e...
7b1c8361-f722-44c3-be9f-e03d24b30b06
DuyTaDinh/Code.ptit.TaDuy
C++/CPPORD07.cpp
#include <bits/stdc++.h> using namespace std; void KMax(int arr[], int n, int k) { deque <int> Qi(k); int i; for (i = 0; i < k; ++i) { while ((!Qi.empty()) && arr[i] >= arr[Qi.back()]) Qi.pop_back(); Qi.push_back(i); } for (; i < n; ++i) { cout << ar...
ALGO
0.999994
4.92403
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2020-11-22T15:51:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 16, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2182e84af8...
1bf7cd98-3e49-4eb6-9b79-301eca755893
onww1/Problem-Solving
LeetCode/Medium/lc516.cpp
#include <algorithm> #include <vector> #include <cstdio> #include <string> #include <cassert> using namespace std; /* Solution Class */ class Solution { public: int longestPalindromeSubseq(string s) { int n = s.length(); vector<vector<int>> dp(n, vector<int>(n, 0)); for (int i = 0; i < n; i...
ALGO
0.999963
5.507014
{ "github_metadata": { "branch": "master", "commit_count": 2975, "repo_created_at": "2018-04-22T02:22:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "91109c1...
e62e4c56-20c0-408c-b685-a02b13f80728
frcepeda/Contest-Archive
UVa/10655 - Contemplation! Algebra.cpp
#include <cstdio> using namespace std; long long p, q, n; int A[2][2]; void mult(long long a[2][2], long long b[2][2]){ int i, j, k; long long c[2][2] = {{0}}; for (i = 0; i < 2; i++) for (j = 0; j < 2; j++) for (k = 0; k < 2; k++) c[i][j] += a[i][k] * b[k][j]; for (i = 0; i < 2; i++) for (j = ...
ALGO
0.999952
4.115349
{ "github_metadata": { "branch": "master", "commit_count": 494, "repo_created_at": "2012-10-23T21:10:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 24, "forks": 14, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "debf29...
7e14662a-f386-4a89-9955-1e275abe97fd
alexandraback/datacollection
solutions_5769900270288896_0/C++/AugustusLi/BTest.cpp
#include <iostream> #include <algorithm> using namespace std; bool mp[16][16]; bool used[16][16]; int dir[4][2] = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}}; void buildMap(int r, int c, int bitNum) { memset(mp, 0, sizeof (used)); int pos = 0; for (int i = 0; i < r; i++) { for (int j = 0; j < c; j++) { if (bitNum%2 ...
ALGO
0.999891
4.369687
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2017-03-08T11:33:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 4, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ebd475c52...
63d46b5e-3bf4-4cc7-ac1f-d88914d365af
theme222/LearningC
CUICPCPractise-032025/E.cpp
#include <iostream> #include <queue> #include <vector> using pair = std::pair<int, int>; #define NULLPAIR pair(-1,-1) int plane[1001][1001]; // std::vector<bool> inhabitX(1001); // std::vector<bool> inhabitY(1001); pair HasNeighbors(int x, int y, int val) // Returns the first coordinate that is equal to val { //...
ALGO
0.999509
4.347772
{ "github_metadata": { "branch": "main", "commit_count": 22, "repo_created_at": "2024-01-04T07:10: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": "9cf5e036ff2...