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 |
|---|---|---|---|---|---|---|---|
734b5741-30d4-4f91-af58-5e5856917a06 | sahadat-11/Spoj | Mixtures.cpp | // //In The Name of ALLAH
// #include<bits/stdc++.h>
// using namespace std;
// const int N = 405, mod = 1e9 + 7;
// #define int long long
// int a[N], dp[N][N];
// const int inf = 1e18;
// int func(int l, int r) {
// if(l == r) return 0;
// int &ans = dp[l][r];
// if(ans != -1) return ans;
// int cur_cost = 0... | ALGO | 0.999958 | 4.670073 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2023-09-11T14:51: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": "ebb2bd082fc... |
71b99505-b3dd-457d-a573-628abae539df | ishandutta2007/codeforces-b | bigbag/normal/1037/D.cpp | #include <bits/stdc++.h>
using namespace std;
const int max_n = 200222, inf = 1000111222;
int n, a[max_n], used[max_n], last[max_n];
vector<int> g[max_n], b;
int main() {
//freopen("input.txt", "r", stdin);
//freopen("output.txt", "w", stdout);
scanf("%d", &n);
for (int i = 1; i < n; ++i) {
... | ALGO | 0.999986 | 4.25939 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-04-11T01:05:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "11bd4d19643b... |
c6d7ce51-9e2c-464c-a311-d23d5ec595bd | sagar1024/mycppjourney | CP/Codeforces/11. Random 800s from recent contests/42. Square(accepted).cpp | // A. Square
// time limit per test1 second
// memory limit per test256 megabytes
// A square of positive (strictly greater than 0) area is located on the coordinate plane, with sides parallel to the coordinate axes. You are given the coordinates of its corners, in random order. Your task is to find the area of the s... | ALGO | 0.999059 | 5.403497 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2024-08-23T11:34:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ccd68c7ae24... |
96c1cf47-335e-4a23-924a-322f0990feaf | gravity101/coding-test-practice | C++/7-14 가장 큰 정사각형 찾기.cpp | #include <iostream>
#include<vector>
using namespace std;
int solution(vector<vector<int>> board)
{
int answer = 1234;
int n = min(board.size(), board[0].size());
for (int t = n; t > 0; t--)
{
for (int i = 0; i <= board.size() - t; i++)
{
for (int j = 0; j <= board[i].siz... | ALGO | 0.999601 | 4.76407 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2021-07-16T04:12:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21078b76c56... |
20a9b2d2-c983-43ec-93d9-4f910a290695 | okaysynthesizer/okay-synthesizer-vcvrack | src/discomfort/DiscomfortInternal/Clipper.cpp | #include <cmath>
#include "Clipper.h"
#include "DryWet.h"
#include "util.h"
float softClip(float y) {
return tanh(y);
}
float hardClip(float y) {
if (y >= 0.8f) {
return 0.8f;
}
if (y <= -0.8f) {
return -0.8f;
}
return y;
}
float sinClip(float y) {
return sin(y);
}
#define THRESHOLD_CLIPBEND... | ALGO | 0.973587 | 5.810299 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2023-10-12T21:43:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 1,
"pull_requests": 2
},
"file_meta": {
"content_id": "47d4efbb09e1... |
8fda6699-5115-4b2d-925a-cfcc42c3f352 | lcheun/Algorithm-Study | 2주차/7576_이채은.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
int dy[4] = {1, -1, 0, 0};
int dx[4] = {0, 0, 1, -1};
int M, N, ans = 0, box[1001][1001];
bool check_tomato(){
for(int i=0; i<N; i++){
for(int j=0; j<M; j++){
if(box[i][j] == 0) return false;
}
}
... | ALGO | 0.999973 | 3.930481 | {
"github_metadata": {
"branch": "main",
"commit_count": 396,
"repo_created_at": "2022-11-06T14:43:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c3a417de5f... |
4fbf3a58-736a-4204-b22c-c6c8e456daba | gauravthapamagar/CPP | C++ Old Is Gold/2021spring/2a.cpp | /*Create classes called classq and class2 with each of having one private member.Add member function
to set a value(say set_value)on each class.Add one more function max()that is friendly to both slasses.The max()
function should compare two private member of the two classes and show maxumum among them.Create one
objec... | ALGO | 0.991336 | 4.876367 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2023-01-08T09:14: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": "cb6ad11882... |
501c4ca7-dd46-47b0-8a66-a859acfb203c | VowpalWabbit/vowpal_wabbit | vowpalwabbit/core/include/vw/core/reductions/epsilon_decay.h | // Copyright (c) by respective owners including Yahoo!, Microsoft, and
// individual contributors. All rights reserved. Released under a BSD (revised)
// license as described in the file LICENSE.
#pragma once
#include "vw/core/estimators/confidence_sequence_robust.h"
#include "vw/core/io_buf.h"
#include "vw/core/learn... | ALGO | 0.936749 | 7.055226 | {
"github_metadata": {
"branch": "master",
"commit_count": 10421,
"repo_created_at": "2009-07-31T19:36:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8581,
"forks": 1934,
"issues": 138,
"pull_requests": 5
},
"file_meta": {
"content_id": ... |
7775d59b-d277-440d-98d9-aef42dc80625 | changmu/StructureAndAlgorithm | POJ/2184/13632309_AC_47MS_916K.cpp | #include <stdio.h>
#include <string.h>
#include <algorithm>
#define maxn 200010
#define delta 1000 * 100
#define inf 0x3f3f3f3f
using namespace std;
int dp[maxn], N, ans; // dp[i] stands when TS is i, the max TF
struct Node {
int s, f;
} arr[102];
int main() {
// freopen("stdin.txt", "r", stdin);
int i, ... | ALGO | 0.999962 | 3.623208 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2015-02-08T13:48:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c2d940318... |
4e8b3e2c-abc3-445d-9187-721a5e94fd07 | Anjali4578/LeetCode | 1267-remove-zero-sum-consecutive-nodes-from-linked-list/remove-zero-sum-consecutive-nodes-from-linked-list.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* removeZeroS... | ALGO | 0.999891 | 5.482345 | {
"github_metadata": {
"branch": "main",
"commit_count": 479,
"repo_created_at": "2023-09-01T14:12: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": "27ff2bb75e... |
ca58e653-6520-48a2-acbc-f53cf1bb7c58 | Beyah96/Algorithms_And_Problem_Solving_Level_4_C_Plus_Plus | Problem16/Problem16.cpp | #include <iostream>
#include <string>
#include <cstdio>
#include <iomanip>
using namespace std;
struct sDay {
short Day, Month, Year;
};
short ReadNumber(string Message) {
short Number;
do {
cout << Message;
cin >> Number;
} while (Number < 0);
return Number;
}
bool isLeapYear(short Year) {
return (((Year %... | TOOL | 0.95285 | 3.416795 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2024-09-11T15:10: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": "2ca032e33d2... |
89f5de92-7a0e-4568-b18c-f8e592f5a3e0 | kamyu104/LeetCode-Solutions | C++/change-minimum-characters-to-satisfy-one-of-three-conditions.cpp | // Time: O(m + n)
// Space: O(1)
class Solution {
public:
int minCharacters(string a, string b) {
vector<int> count1(26), count2(26);
for (const auto& c : a) {
++count1[c - 'a'];
}
for (const auto& c : b) {
++count2[c - 'a'];
}
int result = s... | ALGO | 0.999987 | 5.46295 | {
"github_metadata": {
"branch": "master",
"commit_count": 19395,
"repo_created_at": "2018-10-11T17:38:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4939,
"forks": 1616,
"issues": 1,
"pull_requests": 55
},
"file_meta": {
"content_id": ... |
9b0d4c2e-372c-4dde-9674-4f3e4884dc08 | Zzzode/myLeetCode | 94.二叉树的中序遍历.cpp | /*
* @lc app=leetcode.cn id=94 lang=cpp
*
* [94] 二叉树的中序遍历
*/
#include "Header.h"
// @lc code=start
class Solution {
public:
vector<int> inorderTraversal(TreeNode* root) {
vector<int> res;
TreeNode* predecessor = nullptr;
while (root != nullptr) {
if (root->left != nullptr) {
// predece... | ALGO | 0.999997 | 6.539442 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2020-09-13T20:23:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "974b1e75c... |
ce7b21e7-25f1-45e9-a6c0-eefa66339b04 | Yggdrasill-Moe/Niflheim | NEKOPACK/NEKOPACK/NEKOPACK.cpp | #include "NEKOPACK.h"
NEKOPACK::NEKOPACK(string datname, string dirname, string filename)
{
if (!dirname.empty())
AddExtraName(dirname, "DIR");
if (!filename.empty())
AddExtraName(filename, "FILE");
ReadIndex(datname);
}
NEKOPACK::NEKOPACK(string pathname)
{
strncpy(dat_header.magic, "NEKOPACK", 8);
dat_head... | TOOL | 0.913198 | 3.712278 | {
"github_metadata": {
"branch": "master",
"commit_count": 77,
"repo_created_at": "2018-12-26T02:23:19.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 189,
"forks": 34,
"issues": 2,
"pull_requests": 1
},
"file_meta": {
"content_id": "433f18f... |
ecf69690-dcc1-48a2-8ecd-eff4f6e6ff36 | NH5pml30/WrigglePie | algo/8/plus/E.cpp | /* <NAME>, M3138 */
#include <functional>
#include <iostream>
#include <numeric>
#include <vector>
#include <list>
#include <set>
#include <stack>
#include <algorithm>
#include <ios>
struct empty {
};
template<class NODE_DATA = empty, class EDGE_DATA = empty>
class graph {
private:
struct NODE {
int id;
NO... | ALGO | 0.999988 | 4.279975 | {
"github_metadata": {
"branch": "master",
"commit_count": 136,
"repo_created_at": "2019-12-17T12:06:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ffe11e1d... |
b683261e-4e51-4c6e-b0a8-c25b7d26c104 | ShiliXu1997/ACM_Code | Contest/SDUACM2018_Provincial_Programming_Contest_Selection_Round_2/H.cpp | //************************************************************************
// File Name: H.cpp
// Author: Shili_Xu
// E-Mail: <EMAIL>
// Created Time: 2018年03月24日 星期六 14时29分28秒
//************************************************************************
#include <cstdio>
#include <cstring>
#include <algorithm>
using na... | ALGO | 0.999749 | 3.760794 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-01-17T11:44:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "732e2fe48c... |
f6545619-e51c-4a0b-8119-000112870a98 | pkwww/leetcode | cpp/36_validSudoku.cpp | #include <vector>
#include <iostream>
using namespace std;
class Solution {
using Board = vector<vector<char>>;
private:
bool isVecUnique(vector<int> &v) {
// 1-9
vector<int> counter(9, 0);
for (int value : v) {
cout << "[";
for (auto c: counter) {
cout << c << ", ";
}
c... | ALGO | 0.997451 | 6.1524 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2019-10-02T08:20: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": "3dd50fb52a... |
b41a0a08-6b99-4f55-8874-3cf2898fc7c8 | Pxguin/cpp | olympiads/baltic/2017/day_1/toll.cpp | #include <bits/stdc++.h>
using namespace std;
#define chmin(a, b) a = min(a,b)
#define F0R(i, a) for (int i = 0; i < (a); i++)
#define v vector
const int MAX_N = 50000, l2d = 16, MAX_K = 5;
int dist[MAX_N][MAX_K][l2d][MAX_K];
int INF = 1e9;
int main() {
ios::sync_with_stdio(false); cin.tie(0);
int n, m, k, ... | ALGO | 0.999957 | 3.733207 | {
"github_metadata": {
"branch": "main",
"commit_count": 352,
"repo_created_at": "2024-01-02T19:14: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": "f521d776dd... |
3250e780-cabb-404a-b419-d4e918407cbc | ishandutta2007/codeforces-t | tfg/normal/581/D.cpp | #include <iostream>
char mat[101][101];
int main() {
int xx[3], yy[3];
for(int i = 0; i < 3; i++) {
std::cin >> xx[i] >> yy[i];
}
int n = 0, m = 0;
for(int i = 0; i < 8 && n == 0; i++) {
int x[3], y[3];
for(int j = 0; j < 3; j++) {
x[j] = xx[j];
y[j] = yy[j];
if(i & (1 << j)) std::swap(x[j], y[j])... | ALGO | 0.999788 | 3.744469 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:27:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eec7c851369f... |
ad4dee4a-1014-46e7-9e60-bc17ebcaf7eb | ziglang/zig | lib/libcxx/include/__algorithm/ranges_replace_copy_if.h | //===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------... | TOOL | 0.986395 | 7.322966 | {
"github_metadata": {
"branch": "master",
"commit_count": 34092,
"repo_created_at": "2015-08-06T00:51:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 40012,
"forks": 2915,
"issues": 3389,
"pull_requests": 267
},
"file_meta": {
"content_i... |
08a20f5e-38ef-4a35-9ea3-23465b0e31a3 | Sigmaflo/Algorithm-Study | Baekjoon/jeongyoung/ACM Craft.cpp | #include <iostream>
#include <cstring>
#include <queue>
using namespace std;
int T, N, K, W;
int main(){
cin >> T;
while(T--){
cin.tie(0);
ios_base::sync_with_stdio(0);
int cost[1005];
vector<int> adj[1005];
int indegree[1005];
int ans[1005];
queue<int> q;
memset(indegree, 0... | ALGO | 0.999891 | 3.780085 | {
"github_metadata": {
"branch": "main",
"commit_count": 4050,
"repo_created_at": "2022-12-31T14:34:08.000Z",
"is_fork": true,
"is_org_owned": false,
"forked_from": "aerimforest/Algorithm-Study",
"stars": 0,
"forks": 8,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
... |
98b672de-c8c3-4851-8108-69476e8cc744 | JakeMcDonagh/UniversityAssignmentsandProjects | CS12020 Assignment/jam93_code_for_assignment/jam93_code_for_assignment.ino | //Below is a list of chars that dictate what the ASCII character values look like in MACE code.
//NOTE: MACE code only cosists of the following characters; ^, = or $.
//NOTE: After each sequence of MACE, the separator between two characters forming the same word is a '/' character. This is identical to the separator fo... | TOOL | 0.929634 | 4.38555 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-03-14T07:39:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "99af671e3c... |
b81ca5b0-63dd-42e1-8b5a-141aae6d154c | Karsten1987/code_snippets | cpp/print_range_array.cpp | #include <iostream>
#include <vector>
/*
* [1,2,3,5,10,12,15,95]
* output: 1-3,5,10,12,15,95-100
*/
void print_range( const std::vector<int> vec )
{
// fail check for empty list etc.
auto lhs = vec[0];
auto rhs = vec[0];
for (auto i=1; i<vec.size(); ++i)
{
if (vec[i]-lhs == 1) // two concecutive num... | ALGO | 0.989362 | 5.639124 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2015-03-15T17:08:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "09736327a... |
87f9501e-2869-49d5-8e5d-c00b5914a424 | ishandutta2007/codeforces-nonalphabetic | 74traktor/normal/1338/A.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
int const maxn = 1e5 + 5;
int a[maxn];
int check(int n, int t) {
int lst = (1ll << t) - 1 + a[n];
for (int i = n - 1; i >= 1; --i) {
if (a[i] > lst) return 0;
lst = min(a[i] + (1ll << t) - 1, lst);
}
return 1;
}
main(... | ALGO | 0.99939 | 4.783979 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:49:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "56c0bca1da8b... |
d402c43d-205e-4d39-844d-f6ac229dce69 | notepad-plus-plus/notepad-plus-plus | lexilla/access/LexillaAccess.cxx | // SciTE - Scintilla based Text Editor
/** @file LexillaAccess.cxx
** Interface to loadable lexers.
** Maintains a list of lexer library paths and CreateLexer functions.
** If list changes then load all the lexer libraries and find the functions.
** When asked to create a lexer, call each function until one succeed... | TOOL | 0.945288 | 6.959878 | {
"github_metadata": {
"branch": "master",
"commit_count": 6479,
"repo_created_at": "2015-03-28T00:05:08.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 25163,
"forks": 4882,
"issues": 2664,
"pull_requests": 10
},
"file_meta": {
"content_id"... |
78506dd2-cf89-4924-a829-d23e3426e394 | Cheonilyeong/Baekjoon-Programmers | 프로그래머스/1/250137. [PCCP 기출문제] 1번 / 붕대 감기/[PCCP 기출문제] 1번 / 붕대 감기.cpp | #include <bits/stdc++.h>
using namespace std;
int solution(vector<int> bandage, int health, vector<vector<int>> attacks) {
queue<pair<int,int>> q;
// 공격 저장
for(vector<int> v : attacks) {
q.push({v[0], v[1]});
}
int T = 1;
int B = 0;
int hp = health;
while(1) {
... | ALGO | 0.99991 | 3.950728 | {
"github_metadata": {
"branch": "master",
"commit_count": 610,
"repo_created_at": "2024-01-19T04:47: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": "c59cad07... |
7f17af9c-f7e8-4d9c-a809-2f0e21569f3f | wnwoghd22/PS | BOJ/q11505.cpp | #include <iostream>
typedef long long int ll;
const ll MAX = 1'000'000;
const ll MOD = 1'000'000'007;
ll N;
ll arr[MAX];
ll segTree[MAX * 4];
ll make_seg_tree(int start = 0, int end = N - 1, int index = 1) {
if (start == end) return segTree[index] = arr[start];
int mid = (start + end) / 2;
return segTree[index] =... | ALGO | 0.99996 | 5.314675 | {
"github_metadata": {
"branch": "main",
"commit_count": 1260,
"repo_created_at": "2022-09-22T10:29: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": "66f2be1d3... |
6cd09497-abd3-4852-b06b-05730a096d29 | uriqishtepi/uvaonlinejudge | average_speed_10281.cpp | #include<stdio.h>
#include<math.h>
#include<iostream>
#include<sstream>
#include<algorithm>
#include<functional>
#include<vector>
#include<bitset>
#include<set>
#include<map>
#include <string.h>
#include <iomanip>
#define forl(i,init, max) for(int i = init; i < max; i++)
#define vi std::vector<int>
#define msi std::m... | ALGO | 0.970968 | 3.565973 | {
"github_metadata": {
"branch": "master",
"commit_count": 644,
"repo_created_at": "2015-08-17T03:16:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b2862386... |
22fff0ab-648b-4e62-b848-b9c36eaeb5b4 | 2k0ri/atcoder-workspace | abc169/D/main.cpp | // clang-format off
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
#define rep(i,n) for(ll i=0, i##_len=(n); i<i##_len; ++i)
#define rep1(i,n) for(ll i=1, i##_len=(n); i<=i##_len; ++i)
#define rrep(i,n) for(ll i=n-1; i>=0; --i)
#define rrep1(i,n) for(ll i=n; i>0; --i)
#defin... | ALGO | 0.999949 | 4.671042 | {
"github_metadata": {
"branch": "master",
"commit_count": 69,
"repo_created_at": "2019-10-27T16:42: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": "0c651cf1d... |
e03d0cde-a31f-4109-90f1-2e5d8cb8c432 | Kate-Pikachu/3-week | 1-task/main.cpp | #include <iostream>
#include <array>
#include <vector>
#include <set>
#include <algorithm>
#include <chrono>
using namespace std;
using namespace chrono;
int main() {
auto begin_1 = steady_clock::now();
set<int> st;
st.insert(1);
st.insert(3);
st.insert(5);
st.insert(7);
st.insert(9);
auto end_1 = steady_c... | ALGO | 0.997954 | 5.262377 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2021-02-24T20:13:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "084746020... |
fcf581a4-5c6e-48e7-8ec8-13bfd68a36ea | clivehoggart/HyperLASSO | runHLasso.cc | /*
* This file is part of the HyperLasso program.
* Copyright (c) <NAME> <<EMAIL>>
*
* HyperLasso is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 2,
* as published by the Free Software Foundation.
*
* HyperLasso is distributed in th... | ALGO | 0.939544 | 4.70235 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-02-05T20:47:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "90f2985418a... |
9460b48c-c7a5-4460-9d5c-0331d4838d4c | acvictor/DAA | 2DST.cpp | * Date : 22nd April 2016
* @Author : <NAME>, <NAME>, <NAME>
#include<stdio.h>
#include<stdlib.h>
#include<vector>
#include<algorithm>
#include<iostream>
#include<fstream>
#include<stack>
#include<queue>
#include<math.h>
#include<string.h>
using namespace std;
#define _ ios_base::sync_with_stdio(0);cin.tie(0);cout.t... | ALGO | 0.999662 | 3.229279 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2016-09-05T13:07: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": "1b8c0ba6e5... |
837065dd-70b1-4192-895f-419c8b04a07f | valerii-martell/Parallel-Programming | 2_Threads_Synchronization_Problems/WinAPI/matrix.cpp | #include "stdafx.h"
#include <iostream>
#include <cstdlib>
using namespace std;
Matrix::Matrix(int size, int number)
{
_size = size;
_data = new int*[size];
for (int i = 0; i < size; i++)
_data[i] = new int[size];
for (int i = 0; i < size; i++)
for (int j = 0; j < size; j++)
_data[i][j] = number;
}
Matri... | ALGO | 0.981289 | 3.884296 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2016-09-21T20:22:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "87e84f158... |
f03daff7-5e51-44f9-904e-d39e27e9cc47 | MohamedHaro0on/template_class_linked_list | LinkedList.cpp | #ifndef LINKEDLIST_CPP
#define LINKEDLIST_CPP
#include "LinkedList.h"
template <class T>
LinkedList<T> :: LinkedList(): head(NULL) , tail(NULL) , count(0){ // Empty Constructor
}
template <class T>
LinkedList<T>::LinkedList(T data){ // initialize with node {
head = tail = NULL ;
Node<T> *ptr = new Nod... | TOOL | 0.993274 | 4.008658 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-12-11T12:59: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": "6f0b01b18686... |
b3e51222-15f3-41cf-8fab-e3afb720f5ca | rshlinux/leetcode | lc20_valid_paranthesis.cpp | class Solution {
public:
bool isValid(string s) {
stack<char> C;
int len = s.length();
int i = 0;
char last_pushed = ' ';
char c_from_stack = ' ';
bool result = true;
if (len == 1)
return false;
while (i ... | ALGO | 0.996934 | 5.545754 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2020-01-23T02:02:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0f1759dcf... |
ad4ff5e2-a151-450d-9ba4-8dfa76b1c034 | OFShare/Algorithm-challenger | 洛谷/提高-/P1019.cc | /*
* Author : OFShare
* E-mail : <EMAIL>
* Created Time : 2020-03-21 11:19:26 AM
* File Name : P1019.cc
*/
#include <bits/stdc++.h>
#define ll long long
void debug() {
#ifdef Acui
freopen("data.in", "r", stdin);
freopen("data.out", "w", stdout);
#endif
}
const int N = 20 + 5;
int ... | ALGO | 0.999846 | 3.759621 | {
"github_metadata": {
"branch": "master",
"commit_count": 148,
"repo_created_at": "2019-07-14T05:37:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 61,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "446658... |
06ec13b7-a8b0-45a5-9297-69f691784b7f | darkling39/New_Generation | Lesson_1/Task 2/L1T2/main.cpp | #include <iostream>
using namespace std;
void DrawLTrin(int k, int Size)
{
for(int i = 0; i < k-Size; i++)
{
cout << "*";
}
}
void DrawPenek(int k)
{
for(int d = 0; d < k; d++)
{
cout << " ";
}
cout << "*";
}
void DrawRTrin(int k, int Size)
{
for(int i = 0; i < k-S... | ALGO | 0.999908 | 3.602575 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2021-12-11T14:55: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": "66d6f675403... |
7081b52a-bae7-468b-9011-1020b04c7095 | mialbro/visual-odometry | vo.cpp | #include <iostream>
#include <sstream>
#include <string>
#include <ctime>
#include <cstdio>
#define CERES_FOUND 1
#include <opencv2/sfm.hpp>
#include "opencv2/xfeatures2d.hpp"
#include "opencv2/features2d.hpp"
#include <opencv2/core.hpp>
#include <opencv2/core/utility.hpp>
#include <opencv2/imgproc.hpp>
#include <open... | ALGO | 0.997465 | 5.882471 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2020-05-15T22:30:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ee16164622... |
b0b4b05e-f68c-414d-8bda-2f191d4e686c | PedroH2003/Programacao-Cplusplus | ListaMaratonaUFMG/BFS (busca em largura)/Nivel1/TocaDoSaci03.cpp | #include <bits/stdc++.h>
using namespace std;
int n, m;
int const MAX = 1e3+10;
int M[MAX][MAX];
bool vis[MAX][MAX];
vector<pair<int, int>> mov = {{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
bool val(pair<int, int> u){
return u.first >= 0 and u.second >= 0 and u.first < n and u.second < m and !vis[u.first][u.second] and
... | ALGO | 0.999914 | 4.009168 | {
"github_metadata": {
"branch": "master",
"commit_count": 138,
"repo_created_at": "2023-03-25T20:13:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a3919682... |
b257b01e-a278-4ee5-ad7c-8b564ededd02 | same-lame-name/Competitive | codeforces/609/D.cpp |
#include <bits/stdc++.h>
#define PRECISION(x) cout << fixed << setprecision(x);
#define FAST_IO ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define SZ(X) ((int)(X).size())
#define ALL(X) (X).begin(), (X).end()
#define REP(i,n) for (int i = 0; i < n; ++i)
#define DO(X) while(X--)
#define DRI(X) int (X)... | ALGO | 0.999769 | 3.404272 | {
"github_metadata": {
"branch": "master",
"commit_count": 457,
"repo_created_at": "2021-01-16T14:04:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "61427c4d... |
8732ae3e-c218-4afb-93b3-b1f1a735f3fd | jessejcw/CPP-Toy-Problem | AlienDictionary.h | //
// Created by jesse_wang on 3/5/2017.
//
#ifndef CODING1_ALIENDICTIONARY_H
#define CODING1_ALIENDICTIONARY_H
#include "inc_me.h"
class AlienDictionary {
public:
string alienOrder(vector<string>& words) {
string res = "";
if (words.size() == 0) { return res;}
unordered_map<char, unordere... | ALGO | 0.999221 | 4.587609 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-04-21T05:30:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8745209f1c... |
238bf007-ae9d-4973-8670-febd5980a885 | siddiqui-zeeshan/Leetcode | Code/Check if There is a Valid Path in a Grid.cpp | class Solution {
public:
int r, c;
public:
bool hasValidPath(vector<vector<int>>& grid) {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
r = grid.size();
c = grid[0].size();
return go(0, 0, grid);
}
bool ok(int y, int x) {
if (y >=... | ALGO | 0.999893 | 5.664703 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-09-16T10:31: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": "6b28aec2dd... |
f06c3aee-997c-443a-81a4-b0067dbd5bf9 | perfectionist7/IT-Labs-MIT-Manipal | AL/lab-7/minmax.cpp | // lets go minmax
#include <iostream>
using namespace std;
class mmax
{
public:
int min;
int max;
};
mmax object;
mmax minmax(int arr[], int low, int high)
{
if (low == high)
{
object.min = arr[0];
object.max = arr[0];
return object;
}
if (low + 1 == high)
{
... | ALGO | 0.999574 | 4.990424 | {
"github_metadata": {
"branch": "main",
"commit_count": 269,
"repo_created_at": "2022-08-25T17:25: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": "ed765859fa... |
277b100e-b4a9-42da-a67a-de112ae95bd4 | kevza/LeetCodeProblemSolutions | problem6/main.cpp | #include "gtest/gtest.h"
#include <gtest/gtest.h>
#include <iostream>
#include <iterator>
#include <vector>
using namespace std;
class Solution {
public:
string convert(string s, int numRows) {
int n = s.length();
string r(s);
int k = 0;
int inc = max(2 * numRows - 2, 1);
for (int i = 0; i < nu... | TEST | 0.999652 | 6.801757 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2023-12-12T00:39: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": "1cc04b244... |
88a978bd-cad2-4cc9-9558-142580d4aee0 | dickynovanto1103/CP | Online Judges/Codeforces/Educational Round 56/c.cpp | #include <bits/stdc++.h>
using namespace std;
#define inf 1000000000
#define unvisited -1
#define visited 1
#define eps 1e-9
#define mp make_pair
#define pb push_back
#define pi acos(-1.0)
#define uint64 unsigned long long
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
... | ALGO | 0.999986 | 3.300547 | {
"github_metadata": {
"branch": "master",
"commit_count": 212,
"repo_created_at": "2018-08-22T06:40:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "069a82e1... |
3af73a17-c0f0-42cf-9386-943e65e1927a | DangVanVy23521825/23521825_23521592_BT05 | 23521825_23521592_BT05/23521825_23521592_BT05/Bai078/Bai078.cpp | #include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
struct HonSo
{
int Nguyen;
int Tu;
int Mau;
};
typedef struct HonSo HONSO;
void Nhap(HONSO&);
void Xuat(HONSO);
HONSO Thuong(HONSO, HONSO);
int main()
{
HONSO A, B;
cout << "\nNhap hon so 1 :";
Nhap(A);
cout << "\nNhap hon so 2 :";
... | TOOL | 0.985664 | 3.383566 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-11-12T16:20: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": "5d683a74752c... |
49f1db7e-09ce-4a42-97ab-c53a9b6e9240 | SaraElkadi/competitive-programming- | SPOJ/WEIRDFN.cpp | /* The idea behaind this problem is how to get the median
you need the values of F to be stored and get the element at the middle
To make this ,use two priority_queue to store the values of F:
first queue store the first half of sorted elements with greatest element at top
second queue store the second h... | ALGO | 0.999937 | 4.113338 | {
"github_metadata": {
"branch": "master",
"commit_count": 231,
"repo_created_at": "2017-12-05T15:47:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "78a01d1b... |
0e590ef3-c6a1-4f96-89bd-7e77bc1d1603 | PiyushRajmsit/Competitive-Coding-Solution | Hackerearth/Tricks.cpp | // Date - 12 Jan 2018
/*
Solution By: <NAME>
/=============\ /===========\
|| || || ||
|| || || ||
|| || || ||
||============= ||===========/
|| || \\
|| || \\
|| || \\
|| || \\
... | ALGO | 0.999933 | 4.779832 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2019-01-02T09:25:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b49b59c46... |
9e9e101f-174a-4d19-aae2-6d2fd4851a3e | Gfans/ISPH_NVIDIA_CUDA_CONTEST | IncompressibleFluidsPcisphCUDA/src/ISPH_NVIDIA_CUDA_CONTEST/include/cuda5.5_include/include/thrust/system/cuda/detail/detail/b40c/radixsort_reduction_kernel.h | /******************************************************************************
*
* Copyright 2010 <NAME>
*
* 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.... | ALGO | 0.997825 | 3.247927 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2014-08-03T09:23:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 62,
"forks": 14,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "b5714d2... |
ea2272a5-0cfa-4dfb-8238-96efcc998b80 | pluralism/facebook_hacker_cup_2017 | round1/manic_moving.cpp | #include <iostream>
#include <vector>
#include <fstream>
#include <climits>
using namespace std;
int main(int argc, char **argv) {
ifstream fin("manic_moving.txt");
int t;
fin >> t;
for(int i = 0; i < t; i++)
{
int n, m, k;
fin >> n >> m >> k;
vector<pair<int, int>> request... | ALGO | 0.999923 | 4.095728 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2018-01-06T18:00: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": "08fc97cf5... |
ac4e9b46-0558-4e66-a5b1-b5ab07410e7e | Rupert-WLLP-Bai/LeetCode-Cpp | src/intern/linkedlist/easy/203.cpp | #include <iostream>
#include "../../../../include/list.h"
class Solution {
public:
/**
* @brief LC 203. 移除链表元素
*
* @param head
* @return ListNode*
*/
ListNode *removeElements(ListNode *head, int val) {
// set a dummy head to simplify deleting
auto dummyHead = new ListN... | ALGO | 0.998028 | 5.501576 | {
"github_metadata": {
"branch": "dev",
"commit_count": 46,
"repo_created_at": "2024-01-22T09:18: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": "2f4f2707f5b8... |
9175e347-e29e-43a4-8da4-00ed05e31c93 | Harlinn/Harlinn.Windows | 3rdParty/Harlinn.geos/src/operation/polygonize/EdgeRing.cpp | /**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2005-2006 Refractions Research Inc.
* Copyright (C) 2001-2002 Vivid Solutions Inc.
*
* This is free software; you can redistribute and/or modify it under
* th... | ALGO | 0.997516 | 6.17506 | {
"github_metadata": {
"branch": "master",
"commit_count": 553,
"repo_created_at": "2023-04-05T20:58:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 30,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6bdfee5... |
8a7f1347-d6ab-44c0-96a3-5f7e2a765988 | LeeHyungGeol/Algorithm_BaekJoon | 백준_if문/동적 계획법 2_동전 1.cpp | //다이나믹 프로그래밍(Dynamic Programming): 동적 계획법 - "중복되는 연산을 줄이자"
// 1. 큰 문제를 작은 문제로 나눌 수 있다.
// 2. 작은 문제에서 구한 정답은 그것을 포함하는 큰 문제에서도 동일하다.
//더 이상 사용되지 않는 값을 버림으로써 공간 복잡도를 향상시키는 문제. 메모리 제한에 주목.
//https://yabmoons.tistory.com/491
#include <iostream>
#include <vector>
using namespace std;
vector<int> arr;//동전의 가치
//int dp[100001... | ALGO | 0.999946 | 4.616319 | {
"github_metadata": {
"branch": "master",
"commit_count": 348,
"repo_created_at": "2020-09-17T16:04: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": "d1c30d3c... |
2c81c9ff-8585-4b1a-99c9-2e01bb4547aa | rfeynman/RTX | lintrack.cxx | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <unistd.h>
#include "pmla.hxx"
inline double square(double x) { return x*x; }
inline double cube(double x) { return x*x*x; }
const double clight=2.997824562e8; // m/s
const double elcharge=1.6022e-19; // Coulomb
const d... | ALGO | 0.97436 | 3.296987 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-07-19T16:59: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": "522cb55443... |
11c4b395-ef2e-47e0-8fed-3a955d7a0656 | faamorim/Midterm2 | mymap.hpp | //
// Created by <NAME> on 11/26/2018.
//
#ifndef MIDTERM2_MYMAP_HPP
#define MIDTERM2_MYMAP_HPP
#include <string>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
template <class K = string, class V = int>
class MyMap {
private:
vector<pair<K, V>> container;
public:
bool add(K ... | TOOL | 0.903985 | 4.820641 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-11-26T23:35: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": "a9bc7a512f... |
b03dc1cc-2cec-4734-9033-c7339fb0dcd4 | Purushottam-BCA/C-Language | 1. Data Structure Assignments/Ex. No. 1 Date : 22-12-2020/Q-3. Tollgate_Car_Counter.cpp | /* Q-3. Imagine a tollgate with only one counter, The following cars are waiting in the queue: TN601234, TN010978, TN453452, TN606116
1. What is the position of the car TN010978?
2. What is the position of the newly arrived car TN596754?
3. Identify the car which gets served first
4. Ide... | ALGO | 0.990364 | 3.369501 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2021-05-23T23:55: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": "2f0b299fcdb... |
4dc882a0-7afe-49ba-8678-82ab070a3c5a | vxl/vxl | contrib/brl/bbas/imesh/algo/imesh_imls_surface.hxx | // This is brl/bbas/imesh/algo/imesh_imls_surface.hxx
#ifndef imesh_imls_surface_hxx_
#define imesh_imls_surface_hxx_
#include "imesh_imls_surface.h"
//:
// \file
#include <imesh/imesh_operations.h>
#include <imesh/algo/imesh_intersect.h>
#include <imesh/algo/imesh_kd_tree.hxx>
#include <cassert>
#ifdef _MSC_VER
# in... | ALGO | 0.948508 | 6.563606 | {
"github_metadata": {
"branch": "master",
"commit_count": 42154,
"repo_created_at": "2013-05-02T18:32:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 250,
"forks": 157,
"issues": 49,
"pull_requests": 0
},
"file_meta": {
"content_id": "2c... |
0fb30733-c2b7-41eb-8796-a3e56a1e9303 | Int-Angel/TC1031 | Act 4.2 Grafos/appGrafo2.cpp | /*
Actividad 4.2
Este programa contiene una clase grafo que puede agregar nodos y conexiones, y
te dice si el grafo es ciclico o no.
Autor:
<NAME>queda A01639055
08/11/2021
*/
#include <iostream>
#include <map>
#include <set>
using namespace std;
/*
clase grafo
*/
class Grafo
{
public:
map<string, set<s... | ALGO | 0.995766 | 4.774657 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-11-26T14:48:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b20aa0648368... |
ab65b847-bb7f-4a55-bd0f-f839d53090fb | Xitef156/AIChess | AIChess/LSTMNetwork.h | #pragma once
#include "LSTM.h"
#include <vector>
#include <string>
#include <iostream>
template <typename T>
class LSTMNetwork
{
public:
// Constructeur : Initialise un réseau avec plusieurs couches LSTM
LSTMNetwork(const std::vector<size_t>& layer_sizes)
{
if (layer_sizes.size() < 2)
{
... | ALGO | 0.993711 | 5.859519 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2025-04-30T23:14: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": "ae007e6a46b... |
bf3c0be7-6640-42fd-9148-4b7f0d540f5f | JihoYang/TUM_CSE | HiWi/State-Space Equations/Old/three_body_N_E_formulation/main.cpp | /*
* main.cpp
*
* Created on: Jan 29, 2013
* Author: aditya
*/
#include "body.hpp"
#include "joint.hpp"
#include "numerics.hpp"
#include "field.hpp"
#include <stdio.h>
#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#define dataType double
#define pi (3.1416/180)
/**
* Method for ... | ALGO | 0.996984 | 3.914259 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-07-27T12:04:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c0848529fc... |
3d5781e4-e159-4767-b4b1-cc4f1f839625 | Super262/AcWingSolution | Problem0487.h | //
// Created by <NAME> on 2021/7/11.
//
#ifndef ACWINGSOLUTION_PROBLEM0487_H
#define ACWINGSOLUTION_PROBLEM0487_H
#include <vector>
#include <cstring>
#include <iostream>
using namespace std;
class Problem0487 {
private:
int knapsack(const vector<pair<int, int>> &masters,
const vector<vector<p... | ALGO | 0.999454 | 4.090496 | {
"github_metadata": {
"branch": "master",
"commit_count": 1469,
"repo_created_at": "2021-05-22T13:11:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c615809... |
ffe21f73-cfab-460f-91c1-cf6cbb8fcff1 | kshitijgithb/Segment-Tree | temp.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define lli long long int
#define dv vector <ll>
#define no() cout << "NO" << endl
#define yes() cout << "YES" <<endl
#define all(v) v.begin(), v.end()
#define f(i, n) for( lli i = 0; ... | ALGO | 0.999918 | 4.274644 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2024-02-22T16:24: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": "d7f27e488e... |
518dd79b-e4c8-4e40-a120-cdb4fca6bca5 | vicky2097/datastructure | n-kth node.cpp | #include <iostream>
using namespace std;
int n;
struct node
{
int data;
struct node *next;
}*start=NULL;
class ll
{
public:
node* create_node(int value)
{
struct node *temp;
temp = new(struct node);
temp->data = value;
temp->next = NULL;
... | ALGO | 0.99987 | 3.272369 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-03-07T15:05: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": "8b2c34a04a... |
a256273e-c317-47be-838f-bfc340dfdad7 | ThreeStones1029/leetcode | 106.从中序与后序遍历序列构造二叉树.cpp | // @before-stub-for-debug-begin
#include <vector>
#include <string>
#include "commoncppproblem106.h"
using namespace std;
// @before-stub-for-debug-end
/*
* @Description:
* @version:
* @Author: ThreeStones1029 <EMAIL>
* @Date: 2024-05-11 22:43:17
* @LastEditors: ShuaiLei
* @LastEditTime: 2024-05-17 22:13:34
... | ALGO | 0.999979 | 6.555151 | {
"github_metadata": {
"branch": "main",
"commit_count": 52,
"repo_created_at": "2024-04-26T14:46: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": "8ef224b207f... |
b5aaf919-9756-4a75-b49a-477f29e0cfe1 | mejibyte/live-archive | 4292 - Matchsticks/solutions/i1.cpp | /*
[NWERC'08] WILDWATER RAFTING
by: <NAME>
*/
using namespace std;
#include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
struct point { int x,y; };
point operator - (point p, point q) { return (point) {p.x-q.x, p.y-q.y}; }
int operator * (point p, point q) { return p.x*q.x + p.y*q.y; }
int o... | ALGO | 0.998965 | 4.513163 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2008-08-12T01:47:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 13,
"forks": 10,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "66a6309... |
86b4fd7e-a7fe-4a89-91c0-18ed3e098296 | navneetk2001/CPP_Programs | Geeks for Geeks/Problem of the Day GFG/161. Course Schedule_GFG.cpp | // There are a total of n tasks you have to pick, labeled from 0 to n-1. Some tasks may have prerequisites tasks, for example to pick task 0 you have to first finish tasks 1, which is expressed as a pair: [0, 1]
// Given the total number of n tasks and a list of prerequisite pairs of size m. Find a ordering of tasks yo... | ALGO | 0.99991 | 6.427199 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2022-02-14T06:01:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "db8ec91a4b... |
ba788df9-268b-4db9-812b-e7ef72c0d822 | Meta-Ben/MosaicMaker | src/main.cpp | #include <iostream>
#include <filesystem>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include "Configuration.h"
using namespace cv;
using namespace std;
namespace fs = std::filesystem;
Configuration config;
Size tileSize;
Size outputImageSize;
vector<Mat> bankImages;
vector<int> bankImag... | TOOL | 0.977122 | 4.471945 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-07-16T00:18:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f17719cadd7a... |
d947d778-cb00-4709-85f7-db30f7c52948 | JoseAVillanueva/Intermediate-Programming-Projects1 | PokerGameJV.cpp | // Author: <NAME>
// Course: COSC 1437
// Required Program
// References/Option: The poker PDF provider under the Program set 1 assignment
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
bool Flag = false;
bool HouseFlagPair = false;
bool HouseFlagThree = false;
bool ROYAL_FLUS... | ALGO | 0.992886 | 4.11279 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-03-12T16:36: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": "bb02bbd9226f... |
c8d75101-02c9-4d69-a27d-0f206ce5f808 | 8bitmemory/Parallel_Programming | Project1/tsp.cpp | /*
Genetic algorithm based TSP code for CS 4380 / CS 5351
Copyright (c) 2018, Texas State University. All rights reserved.
Redistribution in source or binary form, with or without modification,
is *not* permitted. Use in source and binary forms, with or without
modification, is only permitted for academic use in CS 4... | ALGO | 0.999925 | 5.188773 | {
"github_metadata": {
"branch": "master",
"commit_count": 110,
"repo_created_at": "2018-10-17T19:29:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "ea8fcb68... |
f743a49b-a522-4ae4-87ab-235d39a86600 | Mohammed-Ihab/Robotics-Program-Codeforces-Tasks | sheet_1_src/math_exp.cpp | #include <iostream>
using namespace std;
int main(){
double A {}, B {}, C {}, TrueValue {};
char S {}, Q {};
cin >> A >> S >> B >> Q >> C;
if(S == '+'){
TrueValue = A + B;
if(C == TrueValue)
cout << "Yes" << endl;
else
cout << TrueValue << endl;
}... | ALGO | 0.999907 | 3.737236 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2024-09-01T10:50: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": "a168636cf... |
8b6ddca0-535c-44f3-add9-7267f6714345 | harshit9270/Leetcode-DSA | 1706-where-will-the-ball-fall/1706-where-will-the-ball-fall.cpp | // DP
class Solution {
public:
int m, n;
vector<int> ans;
void dfs(vector<vector<int>>& grid, int curcol, int currow) {
if(currow == m) {
ans.push_back(curcol);
return;
}
if(grid[currow][curcol] == 1) {
// Check right-side cell
if(curco... | ALGO | 0.999965 | 5.123424 | {
"github_metadata": {
"branch": "main",
"commit_count": 1576,
"repo_created_at": "2022-08-28T15:19:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ff1294abd... |
eca57607-0132-4072-a966-50a186895e88 | kamrulashraf/Vjudge-mixed- | CodeForces/172A/10619335_AC_124ms_26716kB.cpp | #include <bits/stdc++.h>
#pragma comment(linker, "/STACK:1024000000,1024000000")
#define rep(i,x,y) for(int i = x ; i< y ;i++)
using namespace std;
#define ff first
#define ss second
#define N 3000005;
struct node
{
int mark;
node *child[10];
node(){
mark = 0;
rep(i,0,10) child[i] = N... | ALGO | 0.999602 | 3.624664 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-10-03T16:12: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": "5d6c0beab9... |
d32bc681-5e5b-4134-a014-3a88d59e1a0c | mirabl/j | all-nodes-distance-k-in-binary-tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
map<int, vector<int>> G;
set<int> visited;
void buildGraph(TreeNode* root) {
... | ALGO | 0.999981 | 5.939662 | {
"github_metadata": {
"branch": "master",
"commit_count": 904,
"repo_created_at": "2016-12-26T13:22: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": "260f5753... |
0c7f4def-0490-4b84-8b17-bc8123dd1554 | GLAScorpion/LAB_CPLUSPLUS | LAB4/link.h | #ifndef link_h
#define link_h
#include <iostream>
#include <string.h>
template<typename T>
class link{
public:
T value;
//COSTRUTTORI
explicit link(const T& val, link* previous = nullptr, link* successive =nullptr)
: value{val}, prev{previous}, next{successive} {}
~link(){ if... | ALGO | 0.982344 | 4.228189 | {
"github_metadata": {
"branch": "main",
"commit_count": 68,
"repo_created_at": "2022-10-30T13:45:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4fbcbfc40ba... |
1f4558fc-bd09-47c1-b8b1-1f3c894a4164 | rworreby/hpcse1 | exercise03/main_pca.cpp | // #include "network/Network.h"
// #include "network/Optimizer.h"
#include <algorithm>
#include <chrono>
#include <iomanip>
#include <iostream>
#include <list>
#include <mkl_lapack.h>
#include <omp.h>
#include <random>
#include <sstream>
#include <string>
#include <vector>
#include "code/utils.h"
int main (int argc... | DATA | 0.999537 | 5.506349 | {
"github_metadata": {
"branch": "master",
"commit_count": 96,
"repo_created_at": "2020-10-08T21:11:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a78495afb... |
b88fccfe-e63a-4033-a515-b17d570a6058 | kamilszymczak1/my_solutions | cf/contests/1666/e.cpp | #include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
const long long inf = 1ll << 60;
bool CheckMin(int m, vector<int>&x, int l) {
int n = x.size(), last = 0;
for(int i = 0; i < n - 1; i++) {
if(x[i + 1] - last < m)
return false;
last = max(x[i], last + m)... | ALGO | 0.999987 | 3.600317 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2023-04-23T06:54: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": "bb54af9b9b2... |
30162881-5704-4746-b759-5104007ebda8 | Kavendish-arch/PAT | C++语言/5语句/5c7.cpp | #include <iostream>
#include <bitset>
using namespace std;
/**
* 运算符
* 1. 赋值=
* 2.
*
*/
int main(int argc, char const *argv[])
{
cout << "Enter a number (0 - 255): ";
short inputNum = 181;
// cin >> inputNum;
bitset<8> inputBits(inputNum);
cout << inputNum << " in binary is " << inputBits << ... | TOOL | 0.970221 | 3.922079 | {
"github_metadata": {
"branch": "main",
"commit_count": 74,
"repo_created_at": "2021-04-09T01:13: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": "54029c9d76f... |
29ea823f-2a59-4d03-8e48-7444ca02bb7d | hfcrwx/programming-study | algo/30_MinStack/main.cc | // 面试题30:包含min函数的栈
// 题目:定义栈的数据结构,请在该类型中实现一个能够得到栈的最小元素的min函数。
// 在该栈中,调用min、push及pop的时间复杂度都是O(1)。
#include <assert.h>
#include <stack>
template<typename T>
class MinStack {
public:
void push(const T& v);
void pop();
const T& min();
const T& top() const;
T& top();
private:
std::stack<T> data_;
std::st... | ALGO | 0.99764 | 6.030079 | {
"github_metadata": {
"branch": "master",
"commit_count": 265,
"repo_created_at": "2017-05-18T01:41:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ca70c18c... |
a471f38e-b987-4583-8e79-1aa38c5f847d | convexwf/scut-2017-fall-os-labs | exp_3/src/find.cpp | #include <pwd.h>
#include <sys/time.h>
#include "color.h"
#include "find.h"
void init(void)
{
getcwd(dir_name, MAX_SIZE);
//sprintf(dir_name, "/");
sprintf(search_name, "*");
add_slash(dir_name);
use_thread = false;
ignoreCase = false;
is_exec = false;
c_time = 0;
m_time = 0;
printVar = '\n';
thread_arg ... | TOOL | 0.931628 | 3.738904 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2024-05-11T14:23: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": "1b2866091... |
d93ec166-d942-4a5d-aaa2-32da47bce765 | Shyamji07/Leetcode-Solutions | 2305-fair-distribution-of-cookies/2305-fair-distribution-of-cookies.cpp | // Bactracking solution
// class Solution {
// public:
// int ans = INT_MAX;
// void backtrack(int ind, vector<int>& cookies, vector<int> child, int k){
// if(ind == cookies.size()){
// ans = min(ans, *max_element(child.begin(), child.end()));
// return;
// }
... | ALGO | 0.999987 | 5.567602 | {
"github_metadata": {
"branch": "main",
"commit_count": 2948,
"repo_created_at": "2022-11-26T06:54:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f02fd0c5f... |
9a7fbb9d-3295-40e7-abba-b898e32edf5f | NaVIn69/AlgoZenith_DSA | graph2/Bellman_Ford_Revisited.cpp | /*
You have given a graph G with n nodes and m edges. Each edge has an integer weight associated with. The weight of an edge may negative, positive or zero. If the graph contains a cycle with total weight > 0, print -1. Otherwise, find the weight of the highest weighted path from node 1 to n
*/
#include<bits/stdc++.h>
... | ALGO | 0.999956 | 4.216 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-01-31T04:07:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c3fc9f77948... |
7c159a54-19d3-4170-86f5-7b0731c148f3 | gportella/nucleosome_positioning_proxies | utils_common.hpp |
#ifndef PERIOD_ELASTIC_H
#define PERIOD_ELASTIC_H
#include <functional>
#include <iostream>
#include <math.h>
#include <seqan/arg_parse.h>
#include <seqan/file.h>
#include <seqan/find.h>
#include <seqan/sequence.h>
#include <seqan/stream.h>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace seqa... | ALGO | 0.94048 | 5.218208 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2018-04-02T23:14: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": "7e13d057d... |
2860d820-1328-4147-ba74-8d157d8c7907 | taqihaider110/DSA---LeetCode | Sorting/C++/Largest Positive Integer that exists with its negative.cpp | #include <vector> // For std::vector
#include <unordered_set> // For std::unordered_set
#include <algorithm> // For std::max
class Solution {
public:
// Function to find the largest positive integer 'k' such that '-k' also exists in the given list 'nums'
int findMaxK(std::vector<int>& nums) {
// Create... | ALGO | 0.99994 | 5.556552 | {
"github_metadata": {
"branch": "main",
"commit_count": 334,
"repo_created_at": "2023-06-21T17:18: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": "b5f0144b18... |
c3eb3ac7-5db0-4485-b26e-5d186514786a | Half-V/data_structTest | PRELIM/SAMPLEPROB2.cpp | #include <iostream>
using namespace std;
int sum(); // FUNCTION DECLARATION
int diff();
void print();
int main() {
int total, result;
char input;
print();
switch(input) {
case 'A': result = diff(); cout << "The difference of num1 to num2 = " << result << endl; break;
case 'B': total ... | TOOL | 0.927789 | 3.311991 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2025-01-23T00:22: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": "b977a961e11... |
6949e62d-78fa-400f-864a-36e659deb46a | fucfan/code | syllable.cpp | #include<bits/stdc++.h>
#define fi first
#define se second
#define ull unsigned long long
#define ll long long
#define getBit(a , b) ((a) & (1 << (b)))
#define turnOn(a , b) ((a) | (1 << (b)))
#define turnOff(a , b) ((a) ^ (1 << (b)))
#define pii pair<int, int>
#define pb push_back
#define nl cout << "\n";
#define __ <... | ALGO | 0.999908 | 3.49827 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-10-14T14:26: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": "c756482f35d1... |
4fc5f4a0-0c75-4744-877a-c615516aae2d | PraveenKumarRana/Problem-Solving | C_Polygon_for_the_Angle.cpp | #include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define nl "\n"
#define vi vector<int>
#define pi pair<int, int>
#define ll long long int
#define all(x) x.begin(), x.end()
bool ok(int n, int k) {
if (180 % n == 0) {
int ap = 180 / n;
for (int i = 1; i <= (n - 2); i++) {... | ALGO | 0.999764 | 4.21468 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2021-03-26T08:43: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": "e72db81fb... |
14ad8e97-0af0-411b-b35e-cd19476682e0 | dahunlim/Algorithm | Samsung/3421.cpp | // 3421. 수제 버거 장인
#include <iostream>
#include <stdio.h>
#include <cstring>
using namespace std;
int combi[400];
int main() {
int T;
cin >> T;
for(int tc=1; tc<=T; tc++) {
memset(combi, 0, sizeof(combi));
int N, M;
cin >> N >> M;
for(int i=0; i<M; i++) {
int gred... | ALGO | 0.999884 | 4.470911 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2018-12-27T00:52: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": "f7a07ef18d... |
6a8d21de-b4ce-4312-acd7-8dd153beec8b | ZabirovRadik/AISD-IVsemestr-Lab2-var6 | include/Hash_table/Hash_table.h | #pragma once
#include <iostream>
#include <deque>
#include <random>
#include <string>
#include <list>
#define LEN_WORD sizeof(size_t) * 8
#define L 11
#define A 33333
template<typename Key, typename Value, template<typename...> class Container = std::vector>
class HashTable {
struct Pair {
Key key;
Value value;
... | ALGO | 0.985747 | 4.832873 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-04-01T16:01:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c8eb4a853b30... |
06d816a5-9f89-4774-a683-90b1b62a51fa | zjsxzy/algo | Google/Kickstart 2022/Round G/Walktober/main.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
void solve() {
int m, n, p;
cin >> m >> n >> p;
p--;
vector<vector<int>> s(m, vector<int>(n));
vector<int> mx(n);
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
cin >> s[i][j];
mx[j]... | ALGO | 0.999954 | 4.60129 | {
"github_metadata": {
"branch": "master",
"commit_count": 1296,
"repo_created_at": "2013-05-18T10:52:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "086a5b9... |
6efd15dc-e91e-44f3-a609-03f2061bdff9 | sampritipanda/IOI_Repository | Kattis/kastenlauf.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <utility>
using namespace std;
int union_find[110];
vector<pair<int, int> > points;
int find(int a) {
if(union_find[a] == a) return a;
return union_find[a] = find(union_find[a]);
}
void merge(int a, int b) {
union_find[find(a)] = find(b);
}
... | ALGO | 0.999899 | 3.869758 | {
"github_metadata": {
"branch": "master",
"commit_count": 71,
"repo_created_at": "2014-12-27T14:42:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 31,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac97ab6... |
766d90f5-25bc-46e2-92aa-c159e0475375 | 15NgocAnh/C- | chan max le min con tro.cpp | #include <iostream>
void NhapMang(int *a, int n)
{
cout <<"Nhap vao gia tri: "<<endl;
for (int i=0;i<n;i++)
{
cout <<"A["<<i<<"] = ";
cin >>*(a+i);
}
}
void XuatMang(int *a, int n)
{
for (int i=0;i<n;i++)
cout <<" "<<*(a+i);
}
int ChanMax(int *a, int n)
{
int max = 0;
for (int i=0;i<n;i++)
{
if (*(a+i)... | ALGO | 0.999805 | 3.375612 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-01-29T11:55: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": "ecf63712e64f... |
2f6de7a0-8dd1-4012-9888-f30912426a4f | ABHINAB-CHHETRI/DataStructure-Cpp | checksortedarray.cpp | #include <iostream>
#include <cstdlib>
using namespace std;
bool sorted(int arr[], int size)
{
if (size == 1)
{
return true;
}
bool issorted = sorted(arr + 1, size - 1);
return ((arr[0] <= arr[1]) and issorted);
}
int main()
{
#ifndef JUDGE_ONLINE
freopen("input.txt", "r", stdin);
f... | ALGO | 0.99329 | 4.55873 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-07-14T14:08:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c29b39bde471... |
379020be-7936-4c46-bac2-3d109be1fcbd | ishandutta2007/codeforces-s | sserxhs/normal/1470/B.cpp | #include <bits/stdc++.h>
using namespace std;
typedef unsigned int ui;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ldb;
template<typename typC> void read(register typC &x)
{
register int c=getchar(),fh=1;
while ((c<48)||(c>57))
{
if (c=='-') {c=getchar();fh=-1;break... | ALGO | 0.999737 | 4.184748 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:07:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ed6bd3b74fcc... |
a205a95a-4d70-441c-acfe-7c3e2fe5d157 | iigokingii/Algorithms_and_data_structures | labs/lab8/lab08/lab08/Source.cpp | #include<iostream>
#include <cmath>
#include<iomanip>
using namespace std;
void main() {
setlocale(LC_ALL, "ru");
string name[100];
int ArrOfWeight[100];
int ArrOfCost[100];
int capacity;
int count;
cout << "Вместимость рюкзака: ";
cin >> capacity;
cout << "Количество товаров: ";
cin >> count;
for (int i = 0... | ALGO | 0.999789 | 3.404981 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2022-12-13T01:06: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": "5e0330bad... |
37acf4a2-f744-42e8-aa34-a70a34e5d89b | the-punisher-29/leetcode | 1331-path-with-maximum-gold/1331-path-with-maximum-gold.cpp | class Solution {
public:
int getMaximumGold(vector<vector<int>>& grid) {
int maxGold = 0;
for (int i = 0; i < grid.size(); ++i) {
for (int j = 0; j < grid[i].size(); ++j) {
if (grid[i][j] > 0) {
maxGold = max(maxGold, dfs(grid, i, j));
... | ALGO | 0.999729 | 6.453501 | {
"github_metadata": {
"branch": "main",
"commit_count": 2347,
"repo_created_at": "2024-06-18T19:07: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": "38f1106be... |
72bd6d3b-c594-4c38-a0ce-ab6e97648c0e | ishandutta2007/codeforces-h | hank55663/normal/1580/A.cpp | #include<bits/stdc++.h>
#pragma optimize(Ofast)
#define pb push_back
#define x first
#define y second
#define pdd pair<double,double>
#define pii pair<int,int>
#define pll pair<LL,LL>
#define mp make_pair
#define LL long long
#define ULL unsigned long long
#define sqr(x) ((x)*(x))
#define pi acos(-1)
#define MEM(x) mem... | ALGO | 0.999919 | 3.743426 | {
"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": "bd9f92af2bec... |
252e207d-9468-4a55-a32d-636094509448 | si-tm/judgement_system | script/contrib/romano/src/Backends/MCMoves/Reappear.cpp | /**
* @file Reappear.cpp
* @date 30/apr/2014
* @author flavio
*
*/
#include "Reappear.h"
/// traslation
Reappear::Reappear (){
pos_old = LR_vector (0., 0., 0.);
}
Reappear::~Reappear () {
}
void Reappear::init () {
BaseMove::init();
OX_LOG(Logger::LOG_INFO, "(Reappear.cpp) Reappear move initiated wit... | TOOL | 0.961703 | 6.020274 | {
"github_metadata": {
"branch": "main",
"commit_count": 66,
"repo_created_at": "2022-12-22T09:44: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": "d028208c4eb... |
ad5e5c12-a489-4cf1-ad27-3424f33a8312 | 20161104614/project594 | project/main.cpp | //
// main.cpp
// project
//
// Created by 彭皓 on 2018/7/7.
// Copyright © 2018年 彭皓. All rights reserved.
//
#include <stdio.h>
# include<iostream>
# include<iomanip>
# define N 20 //评委的人数最多为20
# define M 50 //参赛选手的人数最多为50
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
# includ... | TOOL | 0.965141 | 3.196744 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-07-07T14:04: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": "8777f61807... |
fd5c511f-e562-45db-bfac-9e001133e092 | EthSJ/TW-Activity-Logger | LinkedList.cpp | #include "LinkedList.h"
#include <fstream>
#include <stdlib.h>
#include <iostream>
//linked list marker.
LinkedList::LinkedList()
{ head = NULL; }
//overloaded linked list constructor.
LinkedList::LinkedList(Node *next)
{ head = next; }
//Linked List obliterator. Deletes all nodes as well.
LinkedList::~LinkedList()... | TOOL | 0.987255 | 3.815208 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-05-03T17:30:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2b6487584a... |
6aa2ee68-0518-4927-8435-ebea5b682d1a | lawrencef2/Song-database | Database.h | #include "Video.h"
#include <string>
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Database{
vector<Video> videos;
public:
void upload_video(int date, int view, string title, string description){
Video v;
v.set_date_uploaded(date);
v.set_viewcount(view);
v... | TOOL | 0.939686 | 4.082434 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-05-09T17:36: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": "ceeda31b9ceb... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.