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
eb562369-e208-4ff6-97a7-81cb5e0009b5
AlexanderBeckerman/RobotVacuumProject
src/algorithm/smart_algorithm.cpp
#include "smart_algorithm.h" #include "../common/AlgorithmRegistration.h" #include "../common/pathing.h" #include "../common/utils/utils.h" #include <queue> REGISTER_ALGORITHM(A_209639780_207011180); Step A_209639780_207011180 ::nextStep() { if (steps_left == 0) { return Step::Finish; } if (robot...
ALGO
0.999602
6.12218
{ "github_metadata": { "branch": "main", "commit_count": 133, "repo_created_at": "2024-06-06T11:47: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": "3ffc21d23a...
224508d9-efa7-4a1c-85fb-b61ab4473ce0
KangmoonSeo/PS
백준/Silver/2941. 크로아티아 알파벳/크로아티아 알파벳.cc
#include <bits/stdc++.h> using namespace std; string str; void solve() { // function acts here // string mem = ""; string ans = ""; int length = str.size(); ans += str[0]; for (int i = 1; i < length; i++) { ans += str[i]; if (str[i] == '=') { // c=, s=, z=, dz= ans.pop_back(); ans.p...
ALGO
0.999831
3.20402
{ "github_metadata": { "branch": "main", "commit_count": 600, "repo_created_at": "2023-03-11T08:07: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": "0175484a78...
13138383-0081-4c53-9a99-293a06638774
ishandutta2007/codeforces-h
hongzy/normal/613/B.cpp
#include <algorithm> #include <cstdio> using namespace std; typedef long long ll; const int N = 2e5 + 10; struct Node { ll v, id; bool operator < (const Node &b) const { return v < b.v; } } a[N]; int n; ll A, cf, cm, m, ans[N], res(-1), pos, mv, pre[N]; bool check(ll m, int k, ll to) { return to * k - pre[k] <= m...
ALGO
0.999953
3.094786
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T02:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c57bb816c72f...
2dd2cfda-a551-4299-b578-a191a37678dd
rajyan/AtCoder
study/cyan/ARC026-C.cpp
#ifdef _DEBUG #include "../../../library/src/debug_template.hpp" #define DMP(...) dump(#__VA_ARGS__, __VA_ARGS__) #else #define DMP(...) ((void)0) #endif #include <cassert> #include <cstdio> #include <cmath> #include <iostream> #include <iomanip> #include <string> #include <array> #include <vector> #include <set> #inc...
ALGO
0.999983
5.35744
{ "github_metadata": { "branch": "master", "commit_count": 234, "repo_created_at": "2019-06-19T15:52: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": "a4438927...
8ac1b31d-53ac-4024-a169-a9ec6b045d57
GBruzzi/contestQuestions
Codeforces/round 933/A.cpp
// https://codeforces.com/contest/1941/problem/A #include <bits/stdc++.h> #define f first #define s second #define pb push_back #define read(x) \ for (auto &qw : (x)) \ cin >> qw; using namespace std; typedef long long ll; typedef pair<ll, ll> pii; int main() { ios::sync_with_stdio(0); cin.tie(0); ...
ALGO
0.999833
4.512998
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2023-11-27T01:49: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": "8690b5c9b98...
e90ec7f7-c941-45c8-940a-50e75f7c2580
Gilpop8663/Altudy
BOJ/9996_한국이 그리울 땐 서버에 접속하지/Gilpop8663.cpp
#include <bits/stdc++.h> using namespace std; int n; string word; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> n >> word; string st; string en; for (int i = 0; i < word.size(); i++) { if (word[i] != '*') { st += word[i]; } els...
ALGO
0.999955
4.192699
{ "github_metadata": { "branch": "master", "commit_count": 1719, "repo_created_at": "2022-03-01T10:54:28.000Z", "is_fork": true, "is_org_owned": false, "forked_from": "zerochae/Altudy", "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_i...
21da7278-fe61-445b-9021-e49250c9ed65
t6tg/DataStructure
search/search01/search01/main.cpp
#include <iostream> #include <vector> #include <stdlib.h> #include <stdio.h> #include <algorithm> using namespace std; vector<int> v ; vector<int> m ; int i = 0; int meet = 0 ; void BS(int value , int left , int right){ int mid = (right + left) /2; if(v[mid] == value){ meet = 1; return; } ...
ALGO
0.999731
3.415703
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-07-23T15:47: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": "077eba94c2...
9bb0065c-9952-4d76-9031-d62383297063
Hannahjef/CountingWords
WordTree.cpp
// Created by <NAME> -Student No:2279688 [12/04/2022] // Word Tree Implementation File - This file contains methods to add a word into the binary tree, // count unique words of binary tree and print the words and occurances in alphabetical order #include <iostream> #include <string> #include "WordTree.h" using namesp...
ALGO
0.998677
4.452268
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2023-01-07T00:37: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": "16b41b5e81db...
9dba3ea0-826e-4e96-acb6-4e3e6ef91353
emilyju0314/gpt_code_plagiarism
dataset/code_content_classifier/allpro_train/1_6550_129.cpp
#include <bits/stdc++.h> using namespace std; const int N = 3e5 + 7; int n, m; vector<int> g[N]; void eadd(int u, int v) { g[u].push_back(v); g[v].push_back(u); } int t = 0; long long int mx[N]; long long int psum[N]; int dt[N], lw[N]; stack<int> stk; void dfs(int u, int p = -1) { dt[u] = lw[u] = ++t; stk.push(...
ALGO
0.999984
4.494717
{ "github_metadata": { "branch": "main", "commit_count": 50, "repo_created_at": "2024-04-28T03:59:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3ce1f0c73e...
05db1cda-2721-4003-be50-ceb8372d1a8f
CodeMacrocosm/Algo-a-Thon
Algos/C++/Inorder_Traversal_Iterative.cpp
#include <bits/stdc++.h> using namespace std; class Node { public: int data; Node *left; Node *right; Node(int data) { this->data = data; left = right = NULL; } }; void inOrder(Node *root) { stack<Node *> s; Node *curr = root; while (curr != NULL || s.empty() == fa...
ALGO
0.999994
5.714004
{ "github_metadata": { "branch": "main", "commit_count": 461, "repo_created_at": "2022-10-05T14:55:52.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 37, "forks": 86, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "484339677...
36e419ce-5cd8-4685-9390-28d58041a280
crossroadsfpga/pigasus
pigasus/software/src/network_inspectors/appid/appid_utils/sf_multi_mpse.cc
//-------------------------------------------------------------------------- // Copyright (C) 2014-2018 Cisco and/or its affiliates. All rights reserved. // Copyright (C) 2005-2013 Sourcefire, Inc. // // This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public...
ALGO
0.900188
4.918799
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2020-09-05T07:51:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 681, "forks": 78, "issues": 5, "pull_requests": 1 }, "file_meta": { "content_id": "084c7fade...
473ddbbf-db70-4e2f-adb7-727f036c353a
koba-e964/contest
atcoder/arc015/d.cpp
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <cstdlib> #include <iostream> #include <map> #include <string> #include <vector> #define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++) using namespace std; typedef long long int ll; typedef vector<int> VI; const double EPS=1e-9; // ...
ALGO
0.999158
4.365003
{ "github_metadata": { "branch": "master", "commit_count": 2836, "repo_created_at": "2013-09-13T04:48:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 5, "issues": 20, "pull_requests": 0 }, "file_meta": { "content_id": "7e08d...
68ee508b-4837-4d44-b266-68de03f297f7
jasonbunk/JPhysics
Source/RectangleNew.cpp
/* * Author: <NAME> * Web page: http://sites.google.com/site/jasonbunk * License: The MIT License (MIT) (Expat) * Copyright (c) 2015 <NAME> */ #include "stdafx.h" #include "RectangleNew.h" #include "Integrators.h" #include "mathTools.h" #include "Games/CollisionTools.h" #include "Games/EntityEdgeLine.h" #include...
ALGO
0.956853
3.348788
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2015-02-21T08:40: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": "153a3411a1...
ba7f2628-4a6b-4f99-9635-bd0a843644d3
BekzhanKassenov/olymp
codeforces.com/Contests/169 div 2/D/D.cpp
/**************************************** ** Solution by <NAME> ** ****************************************/ #include <iostream> #include <cstdio> #include <fstream> #include <sstream> #include <string> #include <vector> #include <deque> #include <queue> #include <stack> #include <map> #include <set> #include <...
ALGO
0.999937
3.900715
{ "github_metadata": { "branch": "master", "commit_count": 426, "repo_created_at": "2015-07-29T15:25:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "245f1f11...
9fb75f52-46b4-40c5-9a14-7f0423f98120
LilDevsy0117/ProblemSolving
백준/Gold/1759. 암호 만들기/암호 만들기.cc
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cmath> using namespace std; int l, c; vector<char> v; void go(int z, string s, int idx) { if (z == l) { int cnt = 0; if (find(s.begin(), s.end(), 'a') != s.end()) cnt++; if (find(s.begin(...
ALGO
0.99988
3.110576
{ "github_metadata": { "branch": "main", "commit_count": 712, "repo_created_at": "2024-01-22T15:20: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": "cad57d3483...
9f5498ff-912e-400a-b8e8-777f1661f892
A2andil/competitive-programming
URI Solutions/1152.cpp
// in the name of God #include <algorithm> #include <iomanip> #include <vector> #include <cmath> #include <map> #include <stack> #include <string> #include <iostream> #define all(v) v.begin(), v.end() #define min3(a, b, c) min(a, min(b, c)) #define max3(a, b, c) max(a, max(b, c)) #define pi ...
ALGO
0.999964
4.173566
{ "github_metadata": { "branch": "master", "commit_count": 288, "repo_created_at": "2016-06-20T13:49:48.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cf772e4b...
2345e971-6fef-4430-9a88-702ea51c4172
Tovas7/Tic-Tac-Toe-Game
Tic-Tak-Toe.cpp
#include <iostream> using namespace std; char board[3][3] = {{' ', ' ', ' '}, {' ', ' ', ' '}, {' ', ' ', ' '}}; char currentPlayer = 'X'; void drawBoard() { cout << "-------------" << endl; for (int i = 0; i < 3; ++i) { cout << "| "; for (int j = 0; j < 3; ++j) { cout << board[i][...
ALGO
0.999307
6.340216
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-03-02T16:14:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c90eef7f6ac9...
42b1c15b-ecf2-4c46-9fbf-0b9fc5ef4cd8
rapel02/icpc-jakarta-2021
cell-game/scorer.cpp
#include <bits/stdc++.h> using namespace std; constexpr int kNumColor = 26; constexpr char kStartColor = 'z' - kNumColor + 1; constexpr int kUnassignedParity = -1; int ac() { puts("AC"); return 0; } int wa(string message) { fprintf(stderr, "%s\n", message.c_str()); puts("WA"); return 0; } int main(int arg...
ALGO
0.98902
4.616897
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2021-11-26T14:36:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96e1cf881631...
a0052ce1-8e41-470d-937b-515f40fc2c68
sbmaruf/Algorithms-Code-Library
Geometry/PointInPolygon.cpp
/* C[] array of points of convex polygon in ccw order, nc number of points in C, p target points. returns true if p is inside C (including edge) or false otherwise. complexity O(lg n) */ inline bool inConvexPoly(point *C, int nc, const point &p) { int st = 1, en = nc - 1, mid; while(en - st > 1) { mid ...
ALGO
0.999804
5.204223
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-10-17T06:03:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 31, "forks": 14, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "776e1159...
81246954-8d68-4494-98b3-949ae91f9608
Xilinx/Vitis_Libraries
data_analytics/L1/include/hw/xf_data_analytics/classification/decision_tree_predict.hpp
/* * Copyright (C) 2019-2022, Xilinx, Inc. * Copyright (C) 2022-2023, Advanced Micro Devices, Inc. * * 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/licens...
ALGO
0.988519
7.058441
{ "github_metadata": { "branch": "main", "commit_count": 471, "repo_created_at": "2019-09-23T19:13:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 988, "forks": 381, "issues": 0, "pull_requests": 12 }, "file_meta": { "content_id": "42e00a...
893f84ab-7e8b-411e-8e8e-9ec4bdc7e7b0
nlesc-km3net/k40gen
src/generate/generate_avx2.cpp
/* * Copyright 2018-2019 NWO-I * * 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 i...
TOOL
0.964119
5.613557
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2019-02-27T08:56:55.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b37478d002...
dc127c40-6134-4612-90ab-167766124884
mohamedabdelhakem1/UCSD-data-structures-and-algorithms-specialization
3-Algorithms on graph/week1_decomposition1/1_reachability/reachability.cpp
#include <bits/stdc++.h> using namespace std; int found = 0; void dfs(vector<vector<int> > &adj, int x, int y, vector <bool> visited) { visited[x] = true; if(x == y) { found =1; return; } for(int i = 0 ; i < adj[x].size() ; i++) { if(visited[adj[x][i]] == false && found == 0) { ...
ALGO
0.999972
4.076532
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-08-13T03:02: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": "3006edbbcd...
05584392-01ab-4eca-97c1-8246fddd75d7
Choyongbin/algorithm
Implement/집합.cpp
#include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n, num; string cmd; vector<int> arr; cin >> n; for (int i = 0; i < n; i++) { cin >> cmd; if (cmd == "add") { cin >> num; auto it = find(arr.begi...
ALGO
0.997368
4.795917
{ "github_metadata": { "branch": "main", "commit_count": 274, "repo_created_at": "2021-07-25T12:45: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": "46e84f21b4...
7db85c44-9507-4582-9daa-cd860ebd1eff
EmptyDust/Algorithm-Codes-and-writeups
codes/0x60_graphs_and_trees/0x61_search/lgp1004.cpp
#include <bits/stdc++.h> #define int long long using namespace std; constexpr int MAXN = 11; int n, mp[MAXN][MAXN], res = 0, vis[MAXN][MAXN], f[MAXN][MAXN][MAXN][MAXN]; void dfs(int x1, int y1, int x2, int y2, int num) { num += vis[x1][y1] ? 0 : mp[x1][y1]; vis[x1][y1] = 1; num += vis[x2][y2] ? 0 : mp[x2][...
ALGO
0.999869
4.191464
{ "github_metadata": { "branch": "main", "commit_count": 172, "repo_created_at": "2023-11-03T02:38:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "212a6b34cd...
8351060c-5b90-404d-bf4f-986a0cc6140b
ArmstrongYang/mcnn
NNET/nnet/run_cpu/detectionoutput.cc
#include "detectionoutput.h" namespace NNET { void DetectionOutput::SetUp(Tensor& Input, Tensor& Output) { num_class = GetParam_Int32(0, 0); nms_threshold = GetParam_f32(1, 0.05f); nms_top_k = GetParam_Int32(2, 300); keep_top_k = GetParam_Int32(3, 100); confidence_threshold = GetParam_f32...
ALGO
0.960657
5.244932
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2018-09-13T14:40:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "ab4126f78...
8eaeb630-e425-4dd6-bb16-2d4611381cb3
InsightSoftwareConsortium/ITK
Modules/Filtering/ImageStatistics/include/itkBinaryProjectionImageFilter.h
/*========================================================================= * * Copyright NumFOCUS * * 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 * * https://www.apache.o...
ALGO
0.970672
7.5412
{ "github_metadata": { "branch": "main", "commit_count": 57165, "repo_created_at": "2010-07-27T15:48:04.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1517, "forks": 701, "issues": 268, "pull_requests": 49 }, "file_meta": { "content_id": "9...
c860e0a1-bc5d-4576-99fc-e03b74e6caaf
Saikat-S/acm-problems-solutions
Uva/Uva_AC/12563 - Jin Ge Jin Qu hao.cpp
/*************************************************** * Problem Name : 12563 - <NAME> hao.cpp * Problem Link : https://uva.onlinejudge.org/external/125/12563.pdf * OJ : Uva * Verdict : AC * Date : 2018-07-17 * Problem Type : DP (KnapSack) * Author Name : <NAME> * University : CSE, MBSTU...
ALGO
0.999952
3.561687
{ "github_metadata": { "branch": "master", "commit_count": 73, "repo_created_at": "2018-05-10T18:16:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c3f370b8b...
b58f0fbe-9605-449d-8343-8ed36ccf346c
ishandutta2007/codeforces-f
fanache99/normal/915/B.cpp
#include <fstream> #include <vector> #include <algorithm> #include <cmath> #include <cstring> #include <cstdlib> #include <ctime> #include <iomanip> #include <map> #include <set> #include <unordered_map> #include <unordered_set> #include <queue> #include <climits> #include <bitset> #include <cassert> using namespace s...
ALGO
0.999439
3.718651
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:43: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": "10143eec5ed7...
ac8bc167-d394-4a88-9b3f-4d10832e262b
shivam0110/Basic-Short-Games
Snake-Game/snake.cpp
#include <iostream> #include <conio.h> //sleep function #include <Windows.h> using namespace std; bool gameover; const int width = 30, height = 30; int x, y, fruitX, fruitY, score; int tailX[100], tailY[100]; int ntail = 0; enum eDirection {STOP = 0, LEFT, RIGHT, UP, DOWN}; eDirection dir; void setup(){ gameover...
ALGO
0.947803
4.067819
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-06-27T09:15:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81b20b6a03...
da1779ee-397a-415f-91ee-e00d883aa556
szechyjs/dsd
include/ReedSolomon.hpp
#ifndef REEDSOLOMON_HPP_b1405fdab6374ba2a4e65e8d45ec3d80 #define REEDSOLOMON_HPP_b1405fdab6374ba2a4e65e8d45ec3d80 /** * Code taken and adapted from www.eccpage.com/rs.c * Credit goes to Mr <NAME>. * * Tried before with the implementation from ITPP library but couldn't make it produce the same outputs * expected ...
ALGO
0.999771
5.897091
{ "github_metadata": { "branch": "master", "commit_count": 101, "repo_created_at": "2011-08-21T07:42:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 743, "forks": 296, "issues": 60, "pull_requests": 5 }, "file_meta": { "content_id": "e54...
51d23e32-571a-4b9f-bf68-71f0277c43c2
amourkhalfan/assignment2
QUES 3E.cpp
#include <stdio.h> #include <stdlib.h> struct node { int data; struct node* next; }; void insertAtBeginning(struct node** head, int data) { struct node* new_node = (struct node*) malloc(sizeof(struct node)); new_node->data = data; new_node->next = *head; *head = new_node; } void insertAtEnd(str...
ALGO
0.990601
4.906452
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-12-23T19:06: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": "a1b1e5df30a9...
68988081-8e83-44a5-b200-7dfe1feaba6e
evgeniy97/MyOldCode
TaskFromSecondCourse - C++/Списки 1.cpp
//5. Создать и протестировать функцию //void arreySetToList(const vector<set<int>> &src, list<int> &dst), //которая сформирует список целых чисел dst из массива множеств целых чисел src по следующим правилам : //dst содержит только числа из множеств, содержащих числа меньше 10; //числа, принадлежащие одному множ...
ALGO
0.997534
4.272974
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2018-02-17T15: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": "ca577f0f9...
21364171-1ace-49b7-b1ff-b58864ff7289
AlasdairWJ/AdventOfCode
2020/17/aoc2020_17b.cpp
#include <cstdio> #include <utility> constexpr int POW(int base, int exponent) { return exponent == 0 ? 1 : base * POW(base, exponent - 1); } const int N = 20; // board size + 2 * max iterations const int D = 4; const int ND = POW(N, D); const int I = 8; const int MAX_ITERATIONS = 6; using board_type = char[ND]; ...
ALGO
0.999935
4.598446
{ "github_metadata": { "branch": "main", "commit_count": 185, "repo_created_at": "2020-12-09T16:09:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2cbf919be2...
e1d21f9a-2aae-4dda-83df-2629bad661c0
diptangsu/Sorting-Algorithms
Cpp/Cyclesort.cpp
#include <iostream> #include <vector> void cycleSort(std::vector<int> &arr) { for (int currentIndex = 0; currentIndex < arr.size() - 1; currentIndex++) { int item = arr[currentIndex]; int currentIndexCopy = currentIndex; for (int i = currentIndex + 1; i < arr.size(); i++) if (a...
ALGO
0.999876
5.28819
{ "github_metadata": { "branch": "master", "commit_count": 383, "repo_created_at": "2017-11-04T10:39:30.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 167, "forks": 169, "issues": 12, "pull_requests": 18 }, "file_meta": { "content_id": "27...
8fd56444-1f74-44c9-ab32-507187a3e9e4
dreyus95/AVSP_SourceQualityPrediction
CodeJamCrawler/dataset/12_22377_25.cpp
#include <fstream> #include <string> #include <sstream> using namespace std; int getIntFromFile(ifstream &); //Function to get a line from a file and convert it to an int. string convert(char); int main() { ifstream fin; fin.open("input.in"); ofstream fout; fout.open("output.txt"); int testCases = getIntFromF...
ALGO
0.99153
3.677146
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2017-06-08T21:00: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": "e88eccfdc...
dec8a099-71a0-4f58-a108-541b3c665a77
bedjovski/iptool
iptool/iptools/utility/utility.cpp
#include "utility.h" #include<cmath> #include<iomanip> #include<algorithm> #include<cmath> #include<math.h> #define MAXRGB 255 #define MINRGB 0 #define PI 3.14159265 using namespace std; std::string utility::intToString(int number) { std::stringstream ss;//create a stringstream ss << number;//add number to the st...
TOOL
0.957903
3.2322
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-05-04T21:50: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": "e9cbd37565...
fefd0d31-3349-439b-8c92-b6b7e1bc2801
Alex-Tsvetanov/Informatics
codes/Alex/Национални състезание по информатика (България)/kontrolni/2015-2016/JK1/test&author/1-best/author/testgen/best-gen.cpp
//Task: best - test generator //Author: <NAME> & <NAME> #include <bits/stdc++.h> //#define DEBUG_GEN //#define DEBUG_TEST const int SMALL_TEST_COUNT=6; const int BIG_TEST_COUNT=14; const int MAXN=10000; const int SMALL_MAXN=25; const double MAXP=100.0; const double SMALL_MAXP=100.0; const int GREEDY_CHANCE=6; const in...
TEST
0.960351
3.834768
{ "github_metadata": { "branch": "master", "commit_count": 282, "repo_created_at": "2015-09-19T19:14:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "32f1ad25...
f7ba566e-b8ae-46b5-b6f8-338af481c652
ishandutta2007/codeforces-e
enchom/normal/178/B2.cpp
#include <iostream> #include <stdio.h> #include <vector> using namespace std; struct rb { int a,b; }; struct merch { int warehouse,town,tax; }; merch merchants[100001]; vector<int> graph[100001]; rb rebra[100001]; int TFO[100001]; int tL,tail[100001]; int main() { int n,m; int a,b; int i,j,in; ...
ALGO
0.999797
3.138774
{ "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": "490af36991d4...
58c5ece9-20d0-4a08-aedc-1de528672d2c
jaaehun/codetree-TILs
240925/나무박멸/tree-kill-all.cpp
#include<iostream> #include<string.h> using namespace std; int N, K, C; int map[21][21]; int tmp_map[21][21]; int death_map[21][21]; int kill_map[21][21]; int result; int dy[4] = { -1,1,0,0 }; int dx[4] = { 0,0,-1,1 }; int dyy[4] = { -1,-1,1,1 }; int dxx[4] = { -1,1,-1,1 }; void grow() { for (int i = 0; i < N; i++...
ALGO
0.99993
3.654704
{ "github_metadata": { "branch": "main", "commit_count": 152, "repo_created_at": "2024-09-14T07:41:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c250b3a9b1...
a55e6e18-145c-4766-922c-c5c886569f95
Ronak-Dagale/GFG_Solutions
Difficulty: Medium/Evaluation of Postfix Expression/evaluation-of-postfix-expression.cpp
//{ Driver Code Starts #include <bits/stdc++.h> using namespace std; // } Driver Code Ends class Solution { public: int evaluate(vector<string>& arr) { // code here stack<string>s; for(int i=0;i<arr.size();i++){ if(arr[i]=="+" || arr[i]=="-" || arr[i]=="*" || arr[i]=="/"){ ...
ALGO
0.998197
6.190157
{ "github_metadata": { "branch": "main", "commit_count": 1307, "repo_created_at": "2023-10-31T17:27:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7f6a4d383...
aa637772-00d2-43cd-b932-2b5b6da437c6
ISTE-VIT/CodeZap-2020
spec-ops-escape.cpp
#include<bits/stdc++.h> using namespace std; /************************************************************************************************/ static struct IO {char tmp[1 << 10];char cur;inline char nextChar() { return cur = getc_unlocked(stdin); }inline char peekChar() { return cur; } inline operator bool() { return...
ALGO
0.999868
4.528119
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-05-18T05:34:40.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2f097fe7f95...
c638452c-e6a1-4900-a8aa-6884bb10a386
rt-kill/CompetitiveProgramming
CSES/String_Algorithms/Minimal_Rotation/main.cpp
#include <bits/stdc++.h> using namespace std; /* Macros {{{ */ /* Basics {{{ */ using ll = long long; using ull = unsigned long long; using ld = long double; using ii = pair<int,int>; using vi = vector<int>; using vll = vector<ll>; using vii = vector<ii>; using vvi = vector<vi>; using vvll = vector<vll>; using vvii = ...
ALGO
0.999991
4.369062
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-11-27T20:53:47.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "770adadeeed6...
2f23e6dc-21a3-4d82-a27d-0a4fd669aa8b
TornovDutta/data-structures
ArrayADT/maxandmin.cpp
#include<iostream> using namespace std; // Function for displaying the array void display(int a[], int n) { for (int i = 0; i < n; i++) { cout << a[i] << " "; } cout << endl; } // Function for finding the maximum value // Time complexity O(n) int findMax(int a[], int size){ int maxVal = a[0]...
ALGO
0.999464
5.315305
{ "github_metadata": { "branch": "main", "commit_count": 11, "repo_created_at": "2024-03-10T16:41: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": "0be6b54483a...
31d20e0f-da6e-4c48-92d2-c8c3c5bed87d
marvinbian/HyperHeuristicTCP
src/nsga_selection.cc
/* * ===================================================================================== * * Filename: nsga_selection.cc * * Description: * * Version: 1.0 * Created: 06/03/15 16:13:43 * Revision: none * Compiler: gcc * * Author: YOUR NAME (), * C...
ALGO
0.999847
4.503624
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-12-15T15:08:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0612c75d8e...
b276cc12-c97c-4855-aad3-d6a56be0c0a0
arpitrathore055/Leetcode-Solutions
2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph/2403-count-unreachable-pairs-of-nodes-in-an-undirected-graph.cpp
class Solution { vector<pair<int,pair<int,int>>>dsu;//{ parent,rank,number of nodes within component } public: void Union(int u,int v){ int uParent=find(u); int vParent=find(v); cout<<"before "<<u<<" "<<v<<endl; if(uParent==vParent){ return; } if(ds...
ALGO
0.999898
5.274508
{ "github_metadata": { "branch": "main", "commit_count": 369, "repo_created_at": "2024-05-09T07:23: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": "a527aa62d3...
6dce9985-8ed5-44ca-a3ee-2af688cfda65
open-mpi/ompi-www
community/lists/users/att-20580/hello.cpp
#include <iostream> #include <mpi.h> extern "C" void RED(int*,int*); int main( int argc, char* argv[] ) { int ier=MPI_SUCCESS, rank=-1, size=0 ; ier = MPI_Init( &argc, &argv ) ; ier = MPI_Comm_size( MPI_COMM_WORLD, &size ) ; ier = MPI_Comm_rank( MPI_COMM_WORLD, &rank ) ; for( int i=0 ; i<size ; ++i ) { i...
ALGO
0.987349
3.557276
{ "github_metadata": { "branch": "master", "commit_count": 1665, "repo_created_at": "2014-04-08T20:01:51.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 2, "forks": 28, "issues": 5, "pull_requests": 1 }, "file_meta": { "content_id": "815b703...
b0f89d9c-2528-469b-ba26-83174d742c17
cryoco/Paddle-NX
paddle/fluid/operators/flip_op.h
/* Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
ALGO
0.943462
7.462243
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2021-05-17T02:12:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "956b35ce6420...
f1e85963-e2e0-434d-8f0b-de2dbae520e1
aditya-mukherjee-127/Concepts_DSA_CP
Basic Data Structures/Check_BST.cpp
#include <bits/stdc++.h> #define ll long long int #define mod 1000000007 #define inf (long long int)1e18 #define log(args...) { std::string _s = #args; replace(_s.begin(), _s.end(), ',', ' '); std::stringstream _ss(_s); std::istream_iterator<std::string> _it(_ss); err(_it, args); } #define logarr(arr,a,b) for(int z=...
ALGO
0.99995
3.910459
{ "github_metadata": { "branch": "master", "commit_count": 50, "repo_created_at": "2022-06-29T03:41:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "8afeccfe1...
a4b3cbed-745e-4d55-8a14-ee2c71f101a4
haoel/leetcode
algorithms/cpp/cousinsInBinaryTree/CousinsInBinaryTree.cpp
// Source : https://leetcode.com/problems/cousins-in-binary-tree/ // Author : <NAME> // Date : 2019-04-30 /***************************************************************************************************** * * In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1. *...
ALGO
0.999913
6.075455
{ "github_metadata": { "branch": "master", "commit_count": 788, "repo_created_at": "2014-10-20T03:22:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17857, "forks": 4931, "issues": 26, "pull_requests": 28 }, "file_meta": { "content_id": ...
5452ad22-9c0b-4f4b-8c7c-5657b153aac9
crime-story/University-Materials
Anul 1/Semestrul 2/Structuri de date/Teme Laborator/Tema 2/vila 2/main.cpp
#include <fstream> using namespace std; ifstream f("vila2.in"); ofstream g("vila2.out"); int n, k; int v[100001]; long long s = 0; int coada1[100001]; int coada2[100001]; int st1 = 1, dr1 = 0; int st2 = 1, dr2 = 0; int maxi; int main() { f>>n>>k; k++; for (int i = 1; i <= n; i++) f>>v[i]; f...
ALGO
0.999986
3.476177
{ "github_metadata": { "branch": "main", "commit_count": 331, "repo_created_at": "2021-02-05T16:27:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 13, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "93e635740...
5bee21b8-8ece-41c9-899f-c67b38063a14
ustcchaozhang/2DNoise_Adjoint_tomography
seiscode/3D_2D/src/ts/lisousi/tdtapertransformation.cc
/*! \file tdtapertransformation.cc * \brief time domain tapering approaches to transformation (implementation) * * ---------------------------------------------------------------------------- * * \author <NAME> * \date 17/04/2013 * * time domain tapering approaches to transformation (implementation) * * C...
ALGO
0.999582
5.824152
{ "github_metadata": { "branch": "master", "commit_count": 125, "repo_created_at": "2018-01-12T14:05:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 25, "forks": 9, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c37a0a1...
3ca76ea1-c3ff-4855-b6cd-18cbff1a205c
seongwon980/cpp.algorithms
Algorithms/10845.cpp
#include <iostream> #include <queue> #include <string> using namespace std; int main(void) { ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int T; cin >> T; string instruction; int data; queue<int> q; for (int i = 0; i < T; i++) { cin >> instruction; if (i...
ALGO
0.99732
4.499742
{ "github_metadata": { "branch": "main", "commit_count": 101, "repo_created_at": "2021-12-23T08:00: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": "408c2412b4...
172fe7fa-0146-4a90-a4da-6bb6e28c1abf
YrralH/acmTraining
TJU [2019冬季训练] Contest4 最短路And最小生成树/最短路/A_fake_heap.cpp
#include<iostream> #include<vector> #include<queue> using namespace std; #define Vei vector<Edge>::iterator #define Pii pair<int, int> typedef struct EDGE{ int to; int cost; EDGE(int _to, int _cost) { to = _to; cost = _cost; } }Edge; void vec_clear(vector<Edge> v[], const int S);...
ALGO
0.999937
3.921708
{ "github_metadata": { "branch": "master", "commit_count": 20, "repo_created_at": "2020-08-09T05:59:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5e5100afe...
2d15c3ba-c989-473d-bf25-46d88f965bba
zjin-lcf/HeCBench
src/black-scholes-sycl/blackScholesAnalyticEngineKernelsCpu.cpp
//blackScholesAnalyticEngineKernelsCpu.cu //<NAME> //Kernels for running black scholes using the analytic engine #ifndef BLACK_SCHOLES_ANALYTIC_ENGINE_KERNELS_CPU_CU #define BLACK_SCHOLES_ANALYTIC_ENGINE_KERNELS_CPU_CU #include <math.h> //declarations for the kernels #include "blackScholesAnalyticEngineKernelsCpu.h"...
ALGO
0.99459
6.277067
{ "github_metadata": { "branch": "master", "commit_count": 4592, "repo_created_at": "2020-08-06T17:44:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 248, "forks": 89, "issues": 1, "pull_requests": 3 }, "file_meta": { "content_id": "b663...
73fbbe3e-37cb-45ea-a0ef-91eafeb43be2
punipuni21/competitive-programming
Library/binaryTree.cpp
#include<algorithm> #include<bitset> #include<cassert> #include<cfloat> #include<climits> #include<cmath> #include<deque> #include<functional> #include<iomanip> #include<iostream> #include<map> #include<queue> #include<set> #include<stack> #include<string> #include<unordered_map> #include<unordered_set> #include<utilit...
ALGO
0.999526
3.987924
{ "github_metadata": { "branch": "master", "commit_count": 217, "repo_created_at": "2019-04-01T11:29: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": "928e5b58...
7640b43d-5ab6-4d81-b330-45c27e5e68fd
risal-shefin/Competitive-Programming
LightOJ/1129 - Consistency Checker - 1191809.cpp
#include <bits/stdc++.h> using namespace std; #define ll long long ll pwr[15]; string ara[100009]; bool cmp(string s1, string s2) { return s1.length() < s2.length(); } int main() { std::ios::sync_with_stdio(false); pwr[0] = 1; for(ll i = 1; i <= 10; i++) { pwr[i] = pwr[i - 1] * 11; } l...
ALGO
0.999945
3.917691
{ "github_metadata": { "branch": "master", "commit_count": 139, "repo_created_at": "2019-06-28T19:28:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 17, "forks": 6, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b3684ed...
9cb0ef36-6f2c-4be4-809d-7d184007ea98
metodos-computacionales-2/ejercicio-opcional-AndresPerez07
punto1.cpp
#include <iostream> #include <fstream> #include <cmath> #include <vector> #include <cstdlib> #include <algorithm> const double PI = 3.1415923565; // call: ./a.out NITER int main(int argc, char **argv) { const int NITER = std::atoi(argv[1]); const double R_log = 3; const double R_tent = 1.5; const double R_sin...
ALGO
0.998093
4.219604
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-11-26T02:31:50.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f48515f977...
2bdad512-974b-4d9e-b59f-c59b69147558
hans-farnbach/cs235
Lab6/AVLTree.h
#pragma once #include <iostream> #include <fstream> #include <algorithm> #include "LinkedList.h" using namespace std; template <typename T> // allow an AVL tree for any data type class AVLTree { public: class Node { public: Node():left(NULL), right(NULL), height(1) {} T value; // the node...
ALGO
0.960916
4.536602
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2018-03-19T05:41: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": "9d0b84962...
5ebaa832-9088-4300-954e-a669a4ecaf0b
mukesh148/InterviewBit_Codes
Heaps-and-Maps/LeastRecentlyUsedCache.cpp
vector<int> Solution::solve(vector<int> &A, vector<int> &B) { sort(A.begin(), A.end()); sort(B.begin(), B.end()); vector<int> ret; map<int, int> hash; int n = A.size(); int high = n-1; for(int i=n-1; i>=0; i--){ int sum_ = B[i] + A[high]; if(hash.find(sum_)!=hash....
ALGO
0.999992
4.482985
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2018-08-07T18:54: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": "5cd0992a47...
74afed38-e4af-4690-a4fa-f64a90077835
masumr/problem_solve
code/hg.cpp
#include<bits/stdc++.h> using namespace std; typedef pair<int, int> pii; char c[11][11]; bool vis[11][11]; int res[11][11]; int res2[11][11]; int dx[] ={ 1, 1, 2, 2, -1, -1, -2, -2 }; int dy[] ={ 2, -2, 1, -1, 2, -2, 1, -1 }; int n, m; void bfs(int x, int y, int k){ memset(vis,0,sizeof vis); queue<pair<pii,pii>...
ALGO
0.999881
3.791008
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2017-08-12T20: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": "bf64dac556...
0e9f67c1-47fa-41af-b629-6c88b6db2032
Mehedi26696/Data-Structures-and-Algorithm-With-CPP
22.Linked List/2.Doubly Linked List/1.Insertion/5.cpp
// Doubly Linked List // InsertAtMiddle //empty at first #include <bits/stdc++.h> using namespace std; class Node { public: Node *prev; int data; Node *next; // constructor Node(int d) { this->data = d; this->prev = NULL; this->next = NULL; } }; // traverse a ...
ALGO
0.999955
5.515793
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2024-05-31T10:59:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cbd5912b6f8...
452a6327-c471-40d2-b4bd-7a31da5b4e68
OriBenjamin/wet-2
Team.h
// // Created by oride on 31/12/2022. // #ifndef WET_2_TEAM_H #define WET_2_TEAM_H class PlayerNode; class Player; #include "wet2util.h" #include <memory> #include "Player.h" class Team { private: int teamID, points, playersAbilitySum; bool hasGoalKeeper; std::shared_ptr<PlayerNode> teamRoot; ...
ALGO
0.941402
5.442371
{ "github_metadata": { "branch": "main", "commit_count": 23, "repo_created_at": "2022-12-29T20:48:55.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "005c33d7145...
02e6af36-c153-46cf-8f41-1b39a2e44f12
arshabazov/cpp_belts
white/week_4/ReversibleFunction.cpp
#include <iostream> #include <vector> #include <algorithm> class FunctionPart { private: char operation; double value; public: FunctionPart(char new_operation, double new_val) { operation = new_operation; value = new_val; } double Apply(double source_val) const { if (operation == '+') { return source_v...
ALGO
0.990571
5.363981
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-08-14T11:21:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "382e92f2ad92...
2e0c5763-58cc-40df-85e5-34e8eac77745
aakash140799/codetemplate
linesweep.cpp
// define intersect// // define set// const int psize = 100; const int neginf = -1000000; xy points[psize]; // class for line end-points; pi- index of point, ty- first/last end-point; class fst { public: int pi; int ty; }; // less function for fst, according to (y, x); bool operator<(const fst arg1, const fst...
ALGO
0.999931
4.325396
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2019-08-14T14:26:58.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da66afcc4...
b7257976-d219-42b5-ad07-9b045cfe12bb
Natashe4ka/1.27
QUEUE.cpp
#include "QUEUE.hpp" void QUEUE::add_string(const int num, const std::string str) { //num порядковый номер строки if(calc == 0) { sort_string = new std::string[num+1]; sort_num = new int[num+1]; for (int i = 0; i < num+1; i++) { sort_string[i] = ""; so...
ALGO
0.990305
3.488545
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2021-09-27T16:52: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": "31e51b3d4377...
d3db266b-ea37-47be-bca1-dd05ce6a4781
GustavoPolicarpo/maratona
URI/COMPUTATIONAL/1223 - Toboggan of Marbles.cpp
// Author: <NAME> // Name: <NAME> // Level: // Category: COMPUTATIONAL // URL: https://www.beecrowd.com.br/judge/en/problems/view/1223 #include<bits/stdc++.h> //LIFE IS NOT A PROBLEM TO BE SOLVED using namespace std; #define rep(i,a,b) for(int i = int(a); i < int(b) ; i++) #define reo(i,a,b) for(int i = int(a); i ...
ALGO
0.999877
3.707619
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2018-09-30T17:58:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96c712af2...
169cb84d-5981-4005-b874-e4143a375da7
hhatch/feasst
plugin/beta_expanded/include/compute_beta.h
#ifndef FEASST_BETA_EXPANDED_COMPUTE_BETA_H_ #define FEASST_BETA_EXPANDED_COMPUTE_BETA_H_ #include <memory> #include <vector> #include "utils/include/arguments.h" #include "system/include/system.h" #include "monte_carlo/include/criteria.h" #include "monte_carlo/include/trial_stage.h" #include "monte_carlo/include/tri...
ALGO
0.989606
7.135395
{ "github_metadata": { "branch": "main", "commit_count": 227, "repo_created_at": "2018-12-11T21:20:01.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "9dbab36a01...
995e9277-154e-4cd4-9610-6d8e1816549b
Lalit-N97/learning-from-lc
lc-203.cpp
// https://leetcode.com/problems/remove-linked-list-elements/ /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) ...
ALGO
0.999831
6.034368
{ "github_metadata": { "branch": "master", "commit_count": 197, "repo_created_at": "2024-06-24T17:41: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": "948397cd...
990fff80-c0ea-4280-ba83-0124029dbe35
edexmusic/prog12
prog22/prog22/Source.cpp
#include <iostream> #include <iomanip> #include <windows.h> using namespace std; int main() { SetConsoleCP(1251); SetConsoleOutputCP(1251); int n,m; cout << "n = "; cin >> n; cout << "m = "; cin >> m; int** a = new int* [n]; for (int i = 0; i < n; i++) ...
ALGO
0.999776
3.496798
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2020-11-23T12:52:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6974ac0f174d...
20d0a44b-2724-4c77-85d4-e718abd90830
raincross7/code-similarity
codes/train_code/problem228/problem228_247.cpp
#include <iostream> #include <cmath> #include <climits> #include <string> #include <numeric> #include <vector> #include <queue> #include <map> #include <algorithm> #include <functional> #include <iomanip> using namespace std; using ll = long long; template<typename T> void print(T t) { cout << t << endl; } bool chec...
ALGO
0.999301
3.327808
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07:19.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3639f0548cc7...
7485ed65-5e86-4451-8099-2a4390074554
mavenlin/cuda-convnet
thirdparty/thrust/system/tbb/detail/sort.inl
/* * Copyright 2008-2012 NVIDIA Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
ALGO
0.999987
7.025715
{ "github_metadata": { "branch": "master", "commit_count": 70, "repo_created_at": "2014-02-21T06:51:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 43, "forks": 23, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "19c4db2...
bb2f3125-fa63-49b7-aaeb-def29ab6455e
kazunetakahashi/atcoder
2018/0127_soundhound2018/C2.cpp
#include <iostream> #include <iomanip> // << fixed << setprecision(xxx) #include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ; #include <vector> #include <string> // to_string(nnn) // substr(m, n) // stoi(nnn) #include <complex> #include <tuple> // get<n>(xxx) #include <queue> #include <stack> #include <...
ALGO
0.999758
4.280709
{ "github_metadata": { "branch": "master", "commit_count": 5889, "repo_created_at": "2014-11-15T16:16: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": "0ff1dd5...
43e1790c-2793-4f45-a805-243e49d97130
lballabio/QuantLib
ql/methods/finitedifferences/solvers/fdmbatessolver.cpp
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Copyright (C) 2010, 2011 <NAME> This file is part of QuantLib, a free-software/open-source library for financial quantitative analysts and developers - http://quantlib.org/ QuantLib is free software: you can redistribute it and/or...
ALGO
0.992117
6.503982
{ "github_metadata": { "branch": "master", "commit_count": 17543, "repo_created_at": "2015-12-17T16:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6151, "forks": 1964, "issues": 51, "pull_requests": 11 }, "file_meta": { "content_id":...
e74f8a95-79bc-4058-bb15-72e42b333c0a
Shahriar075/Competitive-Programming
Codeforces 749-(D-1+2)_A_Windblume Ode.cpp
//<NAME> #include<bits/stdc++.h> #define m 30000 #define ll long long #define pb push_back using namespace std; ll a[m+1],cnt=0; ll prime(ll x) { ll k,n,count=0; for(ll i=0;i<=m;i++) { a[i]=1; } a[1]=0; vector<long long> v; for(ll i=2;i<=m;i++) { if(a[i]==1){ for(...
ALGO
0.999805
3.232174
{ "github_metadata": { "branch": "main", "commit_count": 67, "repo_created_at": "2021-10-14T16:04: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": "c2932d59262...
b198f86a-2479-4bed-9c61-5a3bd62884c6
Aiden68/PAT
AdvanceLevel/1007. Maximum Subsequence Sum.cpp
#include"iostream" using namespace std; int main() { int n; cin >> n; int *num = new int[n]; int max = 0; int sum = 0; int start = 0; int end = 0; int tstart = 0; int tend = 0; int flag = 0; for (int i = 0; i < n; i++) { cin >> num[i]; } for (int i = 0; i < n; i++) { int tmp = num[i]; if (tmp >= 0...
ALGO
0.999945
3.328693
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2016-12-13T15:29: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": "e67b75672...
ddf511be-4b9c-4c6c-b1e8-f3eb029cc86f
Kuailun/Leetcode
_191_Number_Of_1_Bits/_191_Number_Of_1_Bits.cpp
#include <iostream> #include <algorithm> #include <vector> using namespace std; int hammingWeight(uint32_t n); int main() { uint32_t input = 255, output; output = hammingWeight(input); system("pause"); } int hammingWeight(uint32_t n) { int cnt = 0; while (n != 0) { if (n % 2 == 1) cnt++; n=n >> 1; }...
ALGO
0.999488
5.412181
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2019-05-18T00:29:33.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "df459348c...
33ad886e-539f-4ec5-aa3e-65a6418cc154
mn619/cf-practise
1060E.cpp
#include<bits/stdc++.h> #define int long long #define maxn 200000 #define FLASH cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false); #define FILEIO freopen("/home/aman/Desktop/Kachda/input.txt", "r", stdin); //freopen("/home/aman/Desktop/Kachda/output.txt", "w", stdout); using namespace std; int n, dp[maxn + 1][2...
ALGO
0.999669
3.76894
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2019-06-05T06:27:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "55d08bd6b...
39f3090f-270f-425d-a1a8-4f4651c656e5
sloan-dog/basics
cpp/dtz.cpp
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <deque> #include <map> using namespace std; struct Node { int value; int level; Node(int x, int y) { value = x; level = y; } }; std::vector<int> get_max_factors(int num, std:...
ALGO
0.999878
4.087743
{ "github_metadata": { "branch": "master", "commit_count": 13, "repo_created_at": "2017-07-19T00:46: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": "926ac068c...
c7e06d82-99d6-41b9-8154-c1d961683649
null-void-18/Leetcode-Problems
Algorithms/Medium/529. Minesweeper.cpp
class Solution { public: vector<int> io = {0,-1,-1,-1,0,1,1,1}, jo = {-1,-1,0,1,1,1,0,-1}; int adj_mines(vector<vector<char>>& board, int i, int j) { int count = 0; for(int k=0; k<8; k++) { int r = i + io[k]; int c = j + jo[k]; if(r<0 || c<0 || r>=board.size()...
ALGO
0.999816
5.768872
{ "github_metadata": { "branch": "main", "commit_count": 336, "repo_created_at": "2020-10-29T08:56: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": "297a51665b...
8b2cd5d2-dd07-4f26-9fad-32f20f1f94e1
juniperdiego/LeeetCode
pathSum/main.cpp
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <vector> #include <queue> #include <stack> #include <limits.h> using namespace std; void printArray(int *array, int size) { for(int i = 0; i < size; i++) cout << array[i]<< "\t" ; cout << endl; } void printVector(vector<int> array ) ...
ALGO
0.999827
4.701581
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2015-04-10T03:23: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": "158c1f449...
ea2e23c7-f2f3-443e-a9d0-b42d2039d87c
Abhishekbhardwaj31/DAA-ASSIGNMENTS
WEEK2/modified_binarysearch.cpp
#include<iostream> using namespace std; int firstOccurence(int arr[],int n,int key) { int mid,result=-1; int s=0; int e=n-1; while(s<=e) { mid=s+(e-s)/2; if(key==arr[mid]) { result = mid; e=mid-1; } else if(key<arr[mid]) { e=mid...
ALGO
0.999642
4.195444
{ "github_metadata": { "branch": "main", "commit_count": 19, "repo_created_at": "2021-07-18T06:54: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": "6ecd4f05899...
08cc4c36-731c-4d3f-9fa1-ad5295184b6e
shivprime94/Data-Structure-Algorithms
Tic_Tac_Toe.cpp
//<NAME> #include<bits/stdc++.h> using namespace std; #define COMPUTER 1 #define HUMAN 2 #define SIDE 3 #define COMPUTERMOVE 'O' #define HUMANMOVE 'X' void showBoard(char board[][SIDE]) { printf("\t\t\t %c | %c | %c \n", board[0][0], board[0][1], board[0][2]); printf("\t\t\t-----------\n"); printf("\t\t\t %c | %c | %c ...
ALGO
0.999441
4.209897
{ "github_metadata": { "branch": "master", "commit_count": 1071, "repo_created_at": "2021-10-01T17:57:41.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 39, "forks": 213, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "51ce...
001e62ea-752f-4eaa-bc4f-44a9f6c966c6
rkwhrcjsaud/kibum
백준/Gold/15485. \(a^ib^jc^k\)/\(a^ib^jc^k\).cc
#include <iostream> #include <vector> #include <queue> #include <algorithm> std::string s; int len; int dp[1000001][3]; const int MOD = 1e9 + 7; int main(void) { std::ios::sync_with_stdio(false); std::cin.tie(NULL); std::cin >> s; len = s.size(); dp[0][0] = s[0] == 'a'; for (int i = 1; i < len...
ALGO
0.999961
3.958728
{ "github_metadata": { "branch": "master", "commit_count": 796, "repo_created_at": "2022-06-26T08:54: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": "352d9c31...
115a700b-c36e-45a8-9fa6-63c12e3ca4d4
azharnian/COMPUTERIGS2425
10/INFORMATIKA/C++/10-11/0505/1012.cpp
#include <iostream> #include <iomanip> #include <cmath> using namespace std; double area_triangle(double A, double C) { return A * C / 2; } double area_circle(double C) { return 3.14159 * pow(C, 2); } double area_trapezium(double A, double B, double C) { return (A + B) * C / 2; } double area_square(doub...
ALGO
0.975873
4.319507
{ "github_metadata": { "branch": "main", "commit_count": 92, "repo_created_at": "2024-10-03T14:12:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 9, "pull_requests": 0 }, "file_meta": { "content_id": "c1d5654d804...
cd6b1c95-c90e-4916-84e2-2142ccaa832e
bewuethr/stroustrup-ppp
chapter08/chapter08_ex07.cpp
// Chapter 08, exercise 07: read names and ages, sort names, print out both in // correct order #include "../lib_files/std_lib_facilities.h" vector<string> name; vector<double> age; // enter (name,age) pairs void enter_values() { string s; cout << "Enter list of names, 'done' when done:\n"; while (cin>>s...
ALGO
0.996696
5.029414
{ "github_metadata": { "branch": "main", "commit_count": 222, "repo_created_at": "2014-08-28T01:21:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 328, "forks": 126, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "675377...
d5f506eb-8acd-48bc-9414-7634c632cea8
adityaajay29/LeetCode
105-construct-binary-tree-from-preorder-and-inorder-traversal/105-construct-binary-tree-from-preorder-and-inorder-traversal.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.999997
6.504574
{ "github_metadata": { "branch": "main", "commit_count": 2290, "repo_created_at": "2022-04-01T06:31: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": "85c2c485c...
38692572-a00c-45c0-a3f1-53589672e62a
emon4075/CodeForces
B_Grow_The_Tree.cpp
#include <bits/stdc++.h> using namespace std; #define endl '\n' #define ll long long #define PB push_back #define All(V) V.begin(), V.end() #define F first #define S second const int MOD = 1e9 + 7; const int INF = INT_MAX; void FASTIO() { ios::sync_with_stdio(false); cin.tie(NULL); } int main() { FASTIO(...
ALGO
0.999986
4.820298
{ "github_metadata": { "branch": "master", "commit_count": 114, "repo_created_at": "2023-09-14T14:12: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": "658f92de...
006a828f-5fe1-4d6e-b1a1-8cbe99c48604
rajataneja101/leetcode_August_challenge
Day_13(Iterator_for_Combination)/Solution.cpp
class CombinationIterator { public: vector<string> res; int i, rev_i; void Solve(string input, string output,int combinationLength){ if(output.size()==combinationLength){ res.push_back(output); return; } for(int i=0;i<input.size();i++){ string new...
ALGO
0.999967
5.484833
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2020-08-09T15:54: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": "bf015c049...
03b7e982-e530-4df0-9fc4-f225dac4ddc2
AvtsVivek/LearnCpp
src/apps/431020-SimpleCustomIteratorExThree/main.cpp
#include <iostream> #include <algorithm> #include <vector> #include <ranges> class Integers { public: struct Iterator { using iterator_category = std::forward_iterator_tag; using difference_type = std::ptrdiff_t; using value_type = int; using pointer = int *; // or also value_...
TOOL
0.986384
4.929873
{ "github_metadata": { "branch": "main", "commit_count": 463, "repo_created_at": "2023-11-12T01:32:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "31e582c07b...
f3739c3b-62a0-47db-98ed-85a46394230d
Vasundhra-Gupta/C-Cpp
Templates/first.cpp
#include <iostream> using namespace std; // class vector{ // public: // int* arr; // int size; // vector(int m){ // size=m; // arr= new int[size]; // } // int dotProduct(vector& v){ // int d=0; // for(int i=0; i<size; i++){ // d= d+ this->arr[i] * v.a...
ALGO
0.995761
5.232008
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2024-10-27T05: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": "6b3f8a2d4f5...
71f3352d-c250-4744-8460-696e2133d9f9
BarabasGitHub/DogDealer
BoundingShapes/AxisAlignedBoxHierarchyFunctions.cpp
#pragma once #include "AxisAlignedBoxHierarchyFunctions.h" #include "AxisAlignedBoxFunctions.h" #include <Utilities\MinMax.h> #include <Math\FloatOperators.h> #include <Math\MathFunctions.h> #include <Math\IntegerTypes.h> #include <Utilities\IntegerRange.h> #include <Utilities\VertexReordering.h> #include <Utilitie...
ALGO
0.999415
6.460838
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-02-10T13:32:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "9fd1d44683...
754d963d-8695-4e8f-a906-df630164625d
parth1899/OS-Algorithms-CPP
OS-CP/2-Phase 2.cpp
#include<iostream> #include<vector> #include<fstream> #include<unordered_set> #include<algorithm> using namespace std; struct PCB{ int TLL; int TLC; int TTL; int TTC; }; struct OS{ vector<vector<char>> memory; ifstream inputfile; fstream outputfile; string buffer; int IC; ...
ALGO
0.96008
3.091351
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-11-29T18:33:22.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85cac83b330...
0f362be8-7280-48a2-8eee-a4de1bc29ab3
minwiee/DSA
DSA08005_So_nhi_phan_tu_1_den_n.cpp
/* Cho số tự nhiên n. Hãy in ra tất cả các số nhị phân từ 1 đến n. Input: Dòng đầu tiên ghi lại số lượng test T (T≤100). Mỗi test là một số tự nhiên n được ghi trên một dòng (n≤10000). Output: Đưa ra kết quả mỗi test trên một dòng. Ví dụ: Input 2 2 5 Output 1 10 1 10 11 100 101 */ #include<bits/stdc++.h> usin...
ALGO
0.999962
4.715067
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-04-16T03:57: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": "08e008d9ac05...
22628f52-603a-4d06-86d5-a6aa52b4d8e8
orewa-arun/DSA
stacks/stack_as_an_array/main.cpp
#include<iostream> using namespace std; // alias #define MAX_SIZE 1000 class Stack{ private: int top; int arr[MAX_SIZE]; public: Stack(){ top = -1; } bool push(int ele){ // we add elements to stack from top = 0 to top = 999 if(t...
ALGO
0.999038
4.056481
{ "github_metadata": { "branch": "master", "commit_count": 23, "repo_created_at": "2023-07-31T04:30: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": "cfefd03cb...
976659c3-f9c7-4ce6-a94c-69fc748dc7ae
lhgiang040504/UIT
1st_y/2nd_semester/OOP/employee_manager/employee.cpp
#include <iostream> #include <string> #include <iomanip> #include <vector> #include <algorithm> #include <map> using namespace std; class employee{ private: string employeeCode; string fullName; string department; int baseSalary; int bonus; public: employee(string employeeCode_para = "default",...
ALGO
0.992973
3.831569
{ "github_metadata": { "branch": "main", "commit_count": 32, "repo_created_at": "2023-08-20T12:32: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": "f8d94664506...
273f71ea-ed9d-4b9b-929d-a41ef7687c76
zhouyuhaoat/PAT
2.test/A1116-A1119/A1118-2.cpp
/* * author: zhouyuhao * created: 2023-04-03 00:40:19 * modified: 2023-04-03 00:50:34 * item: Programming Ability Test * site: Yuting */ /* @pintia psid=994805342720868352 pid=994805354108403712 compiler=GXX ProblemSet: PAT (Advanced Level) Practice Title: 1118 Birds in Forest https://pintia.c...
ALGO
0.999899
5.4354
{ "github_metadata": { "branch": "main", "commit_count": 64, "repo_created_at": "2025-05-20T01:36:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4c5eb59d2b9...
a8245aa5-d544-462b-8abf-b6679492fa09
Garyxud/melodic-all
src/mrpt1/libs/slam/include/mrpt/slam/CICP.h
/* +---------------------------------------------------------------------------+ | Mobile Robot Programming Toolkit (MRPT) | | http://www.mrpt.org/ | | ...
ALGO
0.956944
7.460448
{ "github_metadata": { "branch": "melodic-all", "commit_count": 1, "repo_created_at": "2020-09-14T02:37:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 9, "forks": 8, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a675e...
21b3c1c5-9a21-4d70-b785-21ab58445b01
Minnggg/DSA_PTIT_2023
DSA01021.cpp
#include<bits/stdc++.h> using namespace std; int n,k; int a[100]; int sinh() { int i=k; int b[k+2]; for(int j=1;j<=k;j++) b[j]=a[j]; while(i>=1&&b[i]==n+i-k) i--; if(i==0) return k; else { b[i]=b[i]+1; for(int j=i+1;j<=k;j++) { b[j]=b[j-1]+1; } int ans=0; for(int j=1;j<=k;j++) if(a[j]!=b[j]) a...
ALGO
0.999977
3.288967
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2023-02-16T09:27: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": "a92be84b03c...
7737c35b-b669-4239-ad89-1dac31a2b74b
Hoksly/KNU
Year1/1sem/Just_tasks/task_30_11.cpp
#include <vector> #include <iostream> using namespace std; template<class X> void print_2d_vector(vector<vector<X>> A) { int a = A.size(); for(int i = 0; i < a; i++) { for(int j = 0; j < A[i].size(); ++j) cout << A[i][j] << ' '; cout << endl; } cout << endl; } void ...
ALGO
0.999949
3.451719
{ "github_metadata": { "branch": "master", "commit_count": 193, "repo_created_at": "2021-09-10T05:55: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": "d204ace6...
aedfbe34-2baa-49a1-aaee-fca1bdb8c78e
sujitkc/automated-evaluation
data/dsa/et/rbkiphls.cpp
#include <iostream> #include <algorithm> #include <stdlib.h> #include <limits.h> using namespace std; struct adjListNode{ int v; int w; adjListNode* next; }; struct adjList{ adjListNode* head; }; struct Graph{ int v; adjList* array; }; struct heap_node{ int vertex; int key; }; stru...
ALGO
0.999904
3.783584
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2017-05-10T10:49:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3c42f364b...