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 |
|---|---|---|---|---|---|---|---|
b5d11412-5eb2-4093-a9c9-9fc59b6a109d | Oneflow-Inc/oneflow | oneflow/core/auto_parallel/sbp_edge.h | /*
Copyright 2020 The OneFlow 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 agre... | ALGO | 0.994368 | 6.762913 | {
"github_metadata": {
"branch": "master",
"commit_count": 9549,
"repo_created_at": "2017-02-11T06:09:53.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9355,
"forks": 1008,
"issues": 444,
"pull_requests": 186
},
"file_meta": {
"content_id":... |
6b0eb9cf-4ae9-44e4-a845-12cc8ae258e8 | CGAL/cgal | Kernel_d/include/CGAL/intersections_d.h | // Copyright (c) 2000,2001
// Utrecht University (The Netherlands),
// ETH Zurich (Switzerland),
// INRIA Sophia-Antipolis (France),
// Max-Planck-Institute Saarbruecken (Germany),
// and Tel-Aviv University (Israel). All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL$
// $Id$
// SPDX-Licen... | ALGO | 0.997156 | 5.739636 | {
"github_metadata": {
"branch": "master",
"commit_count": 113659,
"repo_created_at": "2014-10-01T12:22:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5443,
"forks": 1475,
"issues": 511,
"pull_requests": 136
},
"file_meta": {
"content_id... |
2367c339-6f9b-4845-9715-93f754c40f7b | ishandutta2007/codeforces-h | hos.lyric/normal/15/D.cpp | // Codeforces Beta Round #15
// Problem D
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#i... | ALGO | 0.999482 | 3.14062 | {
"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": "44f04e177ba0... |
3bb26f01-777d-4237-9e72-87ba39938a5e | mavenlin/cuda-convnet | thirdparty/thrust/system/detail/generic/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.999716 | 6.897399 | {
"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": "995cf53... |
04274807-3c3d-483d-8fde-119c80536d8c | rajesh-1920/Competitive_Programming_Problem_Solving | Vjudge/M_Hay_Points.cpp | // Author: <NAME>
// CF : rajesh-1920
// Date : 21.01.2025
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
//----------------------------(definition section)-----------------------------------------
#define dbg(x) cout << #x << " = " << x << '\n'
#define fi first
#define sc second
#defi... | ALGO | 0.997328 | 4.036479 | {
"github_metadata": {
"branch": "main",
"commit_count": 263,
"repo_created_at": "2024-10-21T13:58: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": "66a3249be7... |
e9c09ef2-ef8e-497f-a619-b9bbb9430880 | benmoses-dev/kattis | data-structures/easy/supercomputer.cpp | #include <cstdio>
class FenwickTree {
private:
int biTree[1000001]; // Index from 1
int memArray[1000000]; // Index from 0
int n;
public:
FenwickTree(int size) : n(size) {
for (int i = 0; i <= n; i++) biTree[i] = 0;
for (int j = 0; j < n; j++) memArray[j] = ... | ALGO | 0.99963 | 4.870378 | {
"github_metadata": {
"branch": "main",
"commit_count": 51,
"repo_created_at": "2025-07-06T13:24: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": "d88cce21b87... |
f8786b10-b381-416d-ae1f-9ef262d9cea7 | EricEpilogue/NTUST_OOP-1122 | CS3005302W07/TS0802/Source.cpp | /***********************************************************************
* File: Source.cpp
* Author: B11215002
* Create Date: 2024/4/4
* Editor: B11215002
* Update Date: 2024/4/8
* Description: this program is to do matrix multiplication
***********************************************************************/
#... | ALGO | 0.999498 | 4.680224 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2025-03-14T08:29: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": "42d64ff8901... |
563b1642-5980-4a5f-9f9f-fe43fee00fc8 | giriraj1995/CompetitiveCoding | DS & Algorithms/Practise/Graphs/Deterministic Finite Automaton/Deterministic Finite Automaton/main.cpp | //
// main.cpp
// Deterministic Finite Automaton
//
// Created by <NAME> on 17/01/21.
// Copyright © 2021 <NAME>. All rights reserved.
//
#include <iostream>
#include <cmath>
#include <vector>
#include <map>
#include <unordered_map>
#include <stack>
#include <queue>
#include <set>
#include <unordered_set>
using na... | ALGO | 0.999987 | 5.389379 | {
"github_metadata": {
"branch": "master",
"commit_count": 791,
"repo_created_at": "2020-08-04T11:52:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ea7c30d4... |
8ec2a9d5-2d69-4863-ac69-87e358130985 | JakeGConnor/Advent2022 | Day2_2.cpp | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <bits/stdc++.h>
using namespace std;
int main() {
fstream MyFile("Day2.txt");
string text;
char des[4];
int total = 0;
while (getline (MyFile, text)){
strcpy(des,... | ALGO | 0.999414 | 3.787431 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-08-22T04:01:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2ef0fbff9cfa... |
500c92fb-0957-4291-8e2d-56a3b57564e8 | ishandutta2007/codeforces-b | brovko/normal/1588/B.cpp | #include <bits/stdc++.h>
#define int long long
#define ld long double
#define x first
#define y second
#define pb push_back
using namespace std;
int t, n;
int32_t main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> t;
while(t--)
{
cin >> n;
int L = 1, R =... | ALGO | 0.999665 | 3.53139 | {
"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": "f7544e201877... |
e5f862c7-d9e3-49a7-b4a6-23e0d65ac9e4 | Stanton-Brown/ComputerSim | project1.cpp | /*
Program: Computer Simulator
File: Project1.cpp
Author: <NAME>
Date: February 24, 2024
Desription:
C++ program simulating a computer system with a CPU and memory using two processes and pipes.
The program reads a file containing a program to be executed by the CPU.
CPU and memo... | ALGO | 0.970483 | 6.599553 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-03-05T02:08: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": "fd948ffd87f... |
ec9ad7fb-e8d7-4227-8701-123ab1e122c9 | ASSERT-KTH/Supersonic | predictions/submissions-aizu-coop-gpt4/Codenet/p00266/961063933/response_2.cpp | #include <iostream>
#include <vector>
using namespace std;
const int divisor = 1000000007;
int main() {
long long *factmodary = new long long[100001];
long long fact = 1;
for (int i = 1; i <= 100000; i++) {
fact *= i;
fact %= divisor;
factmodary[i] = fact;
}
int *word = new int[100000]{0};
for (... | ALGO | 0.99983 | 4.6318 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-02-03T10:33:34.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1e71d8a3ae736... |
3ff7c01e-efb1-4f79-af90-99853f125718 | azh248/Competitive-Programming | Platinum/mincross.cpp | /*
ID:azh248
LANG:C++
TASK:mincross
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define FOR(i, a, b) for (int i = a; i < (b); i++)
#define F0R(i, a) for (int i = 0; i < (a); i++)
#define F0R1(i, a) for (int i = 1; i <= (a); i++)
#define FORd(i, a, b) for (int i... | ALGO | 0.999983 | 3.413449 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2021-11-15T19:18: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": "e8ce19933b46... |
1ac1860b-6bd9-46f4-bcaf-aceddb0fb327 | MicheleMiccinesi/Competitive-Programming | PashmakParmida.cpp | #include <iostream>
#include <algorithm>
#include <vector>
class intBIT32{
public:
intBIT32 (uint32_t n){
bit = std::vector<int32_t> (n+1,0);
};
inline int32_t& sum(uint32_t& ii) {
bit[0] = 0; i = ii;
while(i){
bit[0] += bit[i];
i ^= (i&(-i));
}
return bit[0];
};
inline void cadd(int32_t summan... | ALGO | 0.999965 | 3.601979 | {
"github_metadata": {
"branch": "master",
"commit_count": 218,
"repo_created_at": "2017-09-21T11:09: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": "06651468... |
af3cd1da-a0ee-4a5f-a192-82b5453d3454 | BlueEchoV/2D_Project_Chris | Source/Math.cpp | #include "Math.h"
float calculate_distance(V2 p1, V2 p2) {
return (float)sqrt(((p2.x - p1.x) * (p2.x - p1.x)) + ((p2.y - p1.y) * (p2.y - p1.y)));
}
int calculate_manhattan_distance(V2 p1, V2 p2) {
return abs((int)p2.x - (int)p1.x) + abs((int)p2.y - (int)p1.y);
}
// NOTE: COLUMN MAJOR
V3 operator*(const MX3& ... | ALGO | 0.999699 | 5.909162 | {
"github_metadata": {
"branch": "master",
"commit_count": 127,
"repo_created_at": "2024-01-26T20:44: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": "f261251d... |
1d84b91c-e237-402c-a8df-c9de569d4505 | angelo-martinovic/facade3d | code/3rdparty/svlFeatExtract/vision/svlConvolution.cpp | /*****************************************************************************
** STAIR VISION LIBRARY
** Copyright (c) 2007-2010, <NAME>
** All rights reserved.
**
** Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are met:
** ... | ALGO | 0.960373 | 7.078606 | {
"github_metadata": {
"branch": "master",
"commit_count": 56,
"repo_created_at": "2020-06-28T12:27:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "56399cc2c... |
8c1d0eac-5d49-43ec-a63a-ca6d80719d5c | abdelrhmanali29/competitveprogramming | UVA/UVA-11286.cpp | #include<iostream>
#include<algorithm>
#include<cmath>
#include<math.h>
#include<iomanip>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<sstream>
#include<bitset>
#include<cstring>
#include<stdio.h>
#include<math.h>
#include<cmath>
using namespace std;
typedef lo... | ALGO | 0.999929 | 3.806834 | {
"github_metadata": {
"branch": "master",
"commit_count": 147,
"repo_created_at": "2018-02-26T22:58: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": "a3db0a5f... |
069e7c09-ac82-416c-bca1-6191ea539465 | taiyu-len/libren | include/ren/util/key_t.hpp | #include <utility>
namespace ren::util
{
template<typename Domain>
struct key
{
using domain_type = Domain;
using value_type = typename domain_type::value_type;
key() = default;
explicit key(value_type const& x) : value{x} {};
explicit key(value_type && x) : value{std::move(x)} {};
key(key const&) = default;
... | TOOL | 0.938842 | 6.678602 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-02-15T00:43: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": "d1199afeac... |
08232d55-5779-4810-926b-99bbf755a46c | mogun1568/CodingTest | 백준/Silver/4948. 베르트랑 공준/베르트랑 공준.cc | #include <iostream>
using namespace std;
const int Max = 123456 * 2 + 1;
int prime[Max];
int main() {
// 입출력 시간 단축
ios_base::sync_with_stdio(0);
cin.tie(0);
for (int i = 2; i <= Max; i++) {
if (!prime[i]) {
for (int j = i + i; j <= Max; j += i) {
prime[j] = true;... | ALGO | 0.99994 | 4.329202 | {
"github_metadata": {
"branch": "main",
"commit_count": 522,
"repo_created_at": "2023-10-21T06:44: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": "41eed4bca6... |
f7a43648-b127-42b0-b1cf-770d13a1fa54 | cldkfanl/Algorithm | 백준/Gold/1520. 내리막 길/내리막 길.cc | #include <bits/stdc++.h>
#include<iostream>
using namespace std;
int M, N;
int arr[500][500] = {};
int cnt[500][500] = {};
int dx[4] = { 0,0,1,-1 };
int dy[4] = { -1,1,0,0 };
int down_check(int x, int y) {
if (x == M - 1 && y == N - 1) {
return 1;
}
if (cnt[x][y] != -1) {
return cnt[x][y]... | ALGO | 0.999983 | 4.155418 | {
"github_metadata": {
"branch": "main",
"commit_count": 547,
"repo_created_at": "2024-01-03T12:24: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": "da11ae48e6... |
3160e017-0002-492a-9f41-570ef8329e17 | zhangjiahui-buaa/Algolab-2021 | src/Week10/PotW_Golden.cpp | ///4
#include "CGAL/Exact_predicates_inexact_constructions_kernel.h"
#include "CGAL/Delaunay_triangulation_2.h"
#include "CGAL/Triangulation_vertex_base_with_info_2.h"
#include "iostream"
#include "vector"
#include "boost/pending/disjoint_sets.hpp"
#include "queue"
typedef CGAL::Exact_predicates_inexact_constructions_k... | ALGO | 0.999889 | 4.48385 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2022-01-10T15:12:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e81571c41... |
e2b9f57a-3adf-49c0-a485-d3eb44018e9b | sarveshshaha/datastructures | matrix/Matrix.h | /*
* Matrix.h
*
* Created on: Aug 16, 2016
* Author: PRESIDENTTEAM
*/
#ifndef MATRIX_H_
#define MATRIX_H_
#include<iostream>
using namespace std;
class Matrix
{
private:
int mat[50][50];
int row;
int col;
public:
void insertmat();
void displaymat();
void addmat(Matrix);
void submat(Matrix);
voi... | ALGO | 0.992205 | 3.583032 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-02-10T11:52: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": "b6a57a0824... |
26e0d571-004c-493d-a555-253b505b5c9d | shadowcat0202/BeakJoon_solution | C++/문제정리/문제정리/Search(탐색)/백준 Q2583.cpp | /*
문제
눈금의 간격이 1인 M×N(M,N≤100)크기의 모눈종이가 있다.
이 모눈종이 위에 눈금에 맞추어 K개의 직사각형을 그릴 때, 이들 K개의 직사각형의 내부를 제외한 나머지 부분이 몇 개의 분리된 영역으로 나누어진다.
예를 들어 M=5, N=7 인 모눈종이 위에 <그림 1>과 같이 직사각형 3개를 그렸다면, 그 나머지 영역은 <그림 2>와 같이 3개의 분리된 영역으로 나누어지게 된다.
<그림 2>와 같이 분리된 세 영역의 넓이는 각각 1, 7, 13이 된다.
M, N과 K 그리고 K개의 직사각형의 좌표가 주어질 때, K개의 직사각형 내부를 제외한 ... | ALGO | 0.999792 | 4.017897 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2022-03-06T07:02: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": "d6986dc53... |
decfab50-a6cd-4fc8-a584-697d727e07b8 | master-hkshenoycse/CP | Contests/Atcoder/ABC393/F.cpp | #include<bits/stdc++.h>
#include <iterator>
#include <iostream>
#include <numeric>
#include <math.h>
#define ll long long
#define ull long
#define mpa make_pair
#define pb push_back
#define ff first
#define pii pair<ll,ll>
#define dd long double
#define trace(x) cerr << #x << " : " << x << endl
#define ss second
#defin... | ALGO | 0.999877 | 3.700053 | {
"github_metadata": {
"branch": "main",
"commit_count": 138,
"repo_created_at": "2024-03-23T04:22: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": "f49c8172e7... |
a47c02c9-2072-40d0-a14d-bee866e9f001 | KSH-code/Problem-Solving | 11085.cpp | #include <bits/stdc++.h>
#pragma GCC optimize ("O3")
#pragma GCC optimize ("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")
using namespace std;
typedef long long ll;
int xxxx[]={-1,0,1,0,-1,1,1,-1};
int yyyy[]={0,1,0,-1,-1,1,-1,1};
typedef pair<int,int> pii;
struct Node {
int... | ALGO | 0.999994 | 4.317185 | {
"github_metadata": {
"branch": "master",
"commit_count": 117,
"repo_created_at": "2020-07-13T16:12:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dc19cde8... |
e77db581-d770-438e-9e37-44ef373d5620 | thilger1/NYU-Tandon-Bridge-Program | Week 16/th3093_hw16_q1.cpp | #include <vector>
#include <iostream>
#include <string.h>
#include <fstream>
//need to account for if vector is empty BEFORE calling pop
using namespace std;
class Stack {
private:
vector<char> vec;
char popped;
public:
void push(char newItem) { vec.push_back(newItem);}
char pop() {
popped = ... | ALGO | 0.996642 | 4.939395 | {
"github_metadata": {
"branch": "main",
"commit_count": 190,
"repo_created_at": "2023-02-06T00:01:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c931633579... |
fe35b0cc-824e-48b8-85ee-1b8f8ca1cccd | jimyeong/interestedIn... | problemSolving/DFS&BFS/최단경로.cpp | #include <string.h>
#include <iostream>
#include <limits>
#include <queue>
#include <vector>
#include <climits>
using namespace std;
vector<pair<int, int>> v[20001];
queue<pair<int, int>> q;
int dp[20001]{
0,
};
void dijkstra(vector<pair<int, int>> (&v)[20001], int start) {
q.push({ start, 0 });
while (... | ALGO | 0.999938 | 3.912055 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2021-07-31T13:48: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": "a3076415548... |
479e7548-9ceb-404f-b1b1-1110cea71475 | AlekseyKravchuk/cpp | belts_cpp/02_yellow_belt/04_week/10_remove_copy_if.cpp | #include <algorithm>
#include <iostream>
#include <iterator> // std::inserter
#include <map>
#include <set>
#include <sstream>
#include <utility> // std::pair
#include <vector>
using namespace std::literals;
template <typename Collection>
std::string Join(Collection collection, const std::string& delimeter = " "s) ... | ALGO | 0.998584 | 4.648696 | {
"github_metadata": {
"branch": "main",
"commit_count": 505,
"repo_created_at": "2022-08-10T11:17: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": "6bd2779a7f... |
25ccb587-7bfb-4643-960b-3bf5dc086a1b | VastoLorde95/Competitive-Programming | CodeChef/IPC/IPC15P1A/Problem G/G.cc | #include <bits/stdc++.h>
#define sd(x) scanf("%d",&x)
#define sd2(x,y) scanf("%d%d",&x,&y)
#define sd3(x,y,z) scanf("%d%d%d",&x,&y,&z)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define foreach(it, v) for(__typeof((v).begin()) it=(v).begin(); it != (v).end(); ++it)
#define meta __FUN... | ALGO | 0.999978 | 4.286146 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2017-07-25T11:08:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 171,
"forks": 41,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "abb2b0... |
977dde85-d801-43fc-a905-821ac7af847e | ymkwon3/algorithm | c++/2920_musicalScales.cpp | #include <iostream>
#include <vector>
using namespace std;
vector<int> a;
void init()
{
for (int i = 0, j = 0; i < 8; i++)
{
cin >> j;
a.push_back(j);
}
}
void solve()
{
int tmp = 0;
for (int i = 0, pre = 0; i < 8; i++)
{
if (i == 0)
pre = a[i];
el... | ALGO | 0.999894 | 3.450071 | {
"github_metadata": {
"branch": "master",
"commit_count": 346,
"repo_created_at": "2020-11-10T11:26: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": "2e069d56... |
050c7856-4b48-477e-b661-df421883f427 | JuliusPallesen/AoC | 2015/Day05/d5p2.cpp | #include <cstring>
#include <fstream>
#include <iostream>
#include <sstream>
int main(int argc, char const *argv[])
{
std::ifstream inputFile;
inputFile.open(argv[1]);
std::string line;
int ans = 0;
while (std::getline(inputFile, line))
{
bool has_seperated_pair = false;
bool ha... | ALGO | 0.999674 | 4.200627 | {
"github_metadata": {
"branch": "main",
"commit_count": 99,
"repo_created_at": "2023-12-05T17:28: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": "719b3a34c2a... |
08186374-7301-49aa-ba3a-f6f82255f6b9 | ayaanm930/Enchanted-Labrynth-Explorer | Data Project/Code/avlTree.h | #ifndef AVLTREE_H
#define AVLTREE_H
#include "item.h"
class AVLNode {
public:
Item* data;
AVLNode* left;
AVLNode* right;
int height;
bool equiped;
AVLNode(Item* d) : data(d), left(nullptr), right(nullptr), height(0), equiped(false) {}
};
class AVLTree {
public:
AVLNode* root;
AVLTr... | ALGO | 0.984364 | 4.570794 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2024-05-08T12:56: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": "875812b06b... |
213a0fee-02dd-4884-a530-9194354db8cd | aruncode49/Data-Structure-Algorithm | Array.cpp | #include<stdio.h>
#include<iostream>
using namespace std;
class Array
{
private:
int capacity;
int lastIndex;
int *p;
public:
Array(int);
bool is_empty();
bool is_full();
void append(int);
void insert(int,int);
void edit(int,int);
... | ALGO | 0.995342 | 4.016699 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-02-17T10:22:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "422d8a69c1e... |
5fc3bf48-c480-4cce-8db4-5e61f61dc7c5 | Fromhell777/project_euler | problem_0065/main.cpp | #include "timer.hpp"
#include <cstddef>
#include <cstdint>
#include <iostream>
#include <gmpxx.h>
#include <numeric>
#include <string>
long find_convergents_of_e(const unsigned long limit) {
mpz_class numerator_1 = 3;
mpz_class numerator_2 = 2;
mpz_class numerator_temp = numerator_1;
long cycle = 2;
long fr... | ALGO | 0.999755 | 5.337469 | {
"github_metadata": {
"branch": "main",
"commit_count": 103,
"repo_created_at": "2024-08-28T21: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": "6a9f7c5ce4... |
1a3229ec-f1e8-42b3-9526-2d3a6ead0678 | grynevych89/CppHillel | dz11/todo.cpp | #include <iostream>
#include "glfwbgi.h"
int findMinIndexFrom(const int arr[], int size, int startIndex)
{
int minIndex = startIndex;
for (int i = startIndex + 1; i < size; ++i)
{
if (arr[i] < arr[minIndex])
{
minIndex = i;
}
}
return minIndex;
}
void printArra... | ALGO | 0.99965 | 4.624738 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2025-03-11T11:31: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": "0ad823276fa... |
442008d3-6a59-447d-a6a3-e90e081fc2ac | higcompetition/tournament | open_spiel/bots/roshambo/roshambo_bot.cc | // Copyright 2019 DeepMind Technologies Ltd. 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 require... | ALGO | 0.984205 | 6.821283 | {
"github_metadata": {
"branch": "higc",
"commit_count": 2552,
"repo_created_at": "2021-05-19T08:58:35.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "dde5a641bc... |
fa12b414-44d5-4d2c-b669-f42b5ff44458 | SMiles02/CompetitiveProgramming | Codeforces/CF 1900 - 1999/CF1966/CF1966B.cpp | #include <bits/stdc++.h>
#define ll long long
#define sz(x) (int)(x).size()
using namespace std;
// mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
// uniform_int_distribution<int>(1000,10000)(rng)
string to_upper(string a) {
for (int i=0;i<(int)a.size();++i) if (a[i]>='a' && a[i]<='z') a[i]-=... | ALGO | 0.999898 | 4.920933 | {
"github_metadata": {
"branch": "master",
"commit_count": 117,
"repo_created_at": "2020-07-06T09:54:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5e85e1e... |
7909e808-b8ec-478d-9fb3-185d76fa12bf | Gecode/gecode | gecode/set/int.cpp | /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
/*
* Main authors:
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
* Copyright:
* <NAME>, 2004
* <NAME>, 2004
*
* This file is part of Gecode, the generic constraint
* development environment:
* http://www.gecode.org
*
* Per... | TOOL | 0.961473 | 7.147688 | {
"github_metadata": {
"branch": "master",
"commit_count": 5620,
"repo_created_at": "2015-11-06T07:33:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 309,
"forks": 77,
"issues": 40,
"pull_requests": 9
},
"file_meta": {
"content_id": "34b1... |
03ee1b50-0e75-4fd5-be14-6f0e404c362f | embeddedprogrammer/computervision | Lab4_TouringIntoThePicture/TIPSetup.cpp | #include <cv.h>
#include <highgui.h>
#include <iostream>
#include <fstream>
using namespace std;
using namespace cv;
Mat originalImage, imageBillboards;
#define ENTER 10
#define ESC 27
// User parameters
Point points[5]; //Vanishing and corner points
float focalLength = 700; //In pixels
void initPoints()
{
points... | TOOL | 0.983465 | 4.185983 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2015-10-16T20:17:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c5be083e... |
fe741268-2656-492a-a729-38b2f79fd9c1 | Puneethnaik/CompetitiveCoding | Competitions/codeforces/1498/B/main.cpp | #include <bits/stdc++.h>
#define FOR(i, a, b) for(int i = a ; i < b ; i++)
#define FORN(i, n) FOR(i, 0, n)
#define vti vector<int>
#define vt(x) vector<x>
#define all(x) x.begin(), x.end()
#define read(x) cin >> x
using namespace std;
void solve() {
long long N, W;
cin >> N >> W;
map<long long, long long> ... | ALGO | 0.999953 | 3.787731 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2021-07-22T12:58: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": "db437dbd8dfd... |
d94ff0d2-24c6-403e-810e-597d38b03fe5 | OHDSI/RcppXsimd | inst/include/xsimd/math/xsimd_fp_sign.hpp | /***************************************************************************
* Copyright (c) 2016, <NAME> and <NAME> *
* *
* Distributed under the terms of the BSD 3-Clause License. *
* ... | ALGO | 0.988318 | 7.200328 | {
"github_metadata": {
"branch": "master",
"commit_count": 56,
"repo_created_at": "2019-03-20T22:49:17.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 12,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "e299512e3... |
3e64dda8-26fb-42f1-b4c7-bf5081a36461 | mt1ger/SimSDM-EON | ResourceAssignment_FiFM.cpp | /**************************************************
* First-Fit
**************************************************/
// #define DEBUG_print_SrcAvailableSpecSlots
// #define DEBUG_print_resource_state_on_the_path
// #define DEBUG_print_AvailableSpecSlots
// #define DEBUG_collect_eventid_of_blocked_requests //need to ... | ALGO | 0.942369 | 4.529316 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2018-02-05T21:45:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bf03cd4b7... |
92fca2af-db6a-4928-b0db-f3180708f851 | kumar-kshitij/codes | CSES/1131.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pll pair<ll, ll>
#define X first
#define Y second
#define pb push_back
#define nl "\n"
#define vl vector<ll>
#define mod 1000000007
ll min(ll a, ll b) { return a < b ? a : b; }
ll max(ll a, ll b) { return a > b ? a : b; ... | ALGO | 0.999546 | 4.380622 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2021-10-04T12:46: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": "e1759ba5092... |
b78641d2-5b69-482f-bbcf-3440bd63181c | ttamx/Competitive-Programming | vjudge/qoj4636.cpp | #include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int N=2e5+5;
const int M=1e6;
const int K=1<<21;
int n,m;
ll v[N],l[N],r[N];
struct segtree{
struct node{
ll l,vl;
node():l(0),vl(0){}
node(ll l,ll vl):l(l),vl(vl){}
friend node operator+(node l,node r){
... | ALGO | 0.999879 | 3.826828 | {
"github_metadata": {
"branch": "main",
"commit_count": 69,
"repo_created_at": "2023-03-11T10:01:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "82aee245480... |
4d284cb3-efb8-4f03-9d32-fc91f825150e | tlc-pack/relax | src/topi/reduction.cc | /*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... | TOOL | 0.906866 | 6.71038 | {
"github_metadata": {
"branch": "relax",
"commit_count": 10428,
"repo_created_at": "2021-06-22T22:05:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 196,
"forks": 56,
"issues": 43,
"pull_requests": 2
},
"file_meta": {
"content_id": "54cf... |
5a747a1b-08ef-4d45-a666-38ca7f459775 | imcsh313/Algorithm | ProblemSolving/TREE/G1_S2312_토끼와_경주.cpp | #include <iostream>
#include <queue>
#include <vector>
#include <map>
using namespace std;
struct position
{
int sum;
int x;
int y;
};
struct rabbit
{
int movingCount;
position position;
int id;
};
struct disScr
{
int dis;
long long score;
};
struct compareRabbit
{
bool operator()(rabbit x, rabbit y)
{
... | ALGO | 0.999621 | 4.294356 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2023-09-12T09:40: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": "938b9ea687d... |
b06a87e9-1354-4bd7-8ab3-7c6e3cee269f | lilbillybiscuit/CGNPU | main.cpp | #include <iostream>
#include <thread>
#include <chrono>
#include <vector>
#include <random>
#include <chrono>
#define NS_PRIVATE_IMPLEMENTATION
#define CA_PRIVATE_IMPLEMENTATION
#define MTL_PRIVATE_IMPLEMENTATION
#include "metal-cpp/Foundation/Foundation.hpp"
#include "metal-cpp/Metal/Metal.hpp"
#include... | ALGO | 0.998644 | 6.124885 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2025-05-04T19:29: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": "8cb6d8b6b11... |
1b083de6-7986-4f5b-a9d1-0fff9289f4d3 | akdrturan/Cplus | Queue.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <cstdlib>
#include <ctime>
// Gerekli kütüphanelerin tanımlanması
using namespace std;
const int GRID_SIZE = 14; //oluşturulan ızgaranın boyutunu belirtir
const char EMPTY = 'e'; //boş olan (ulaşılabilir olan) karoları temsil eder
const char UNREACHABLE =... | ALGO | 0.999656 | 5.029256 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-10-13T09:12: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": "7bc72b1fd65e... |
8e885fc0-6883-4ea7-9d4e-df41f98689ed | kvdzidev/skillset-portfolio | Understanding of C++ structures/ZAD083_000070_class.cpp | // ----------- ZAD70 -----------
//(class) Dopisz brakującą klasę TreeNode reprezentującą jeden liść drzewa binarnego
//Każdy liść może posiadać wartość liczbową oraz lewe i prawe dowiązanie kolejnych liści
//(rozwiązaniem jest tylko brakujący kod)
//./tree ➞ WYDRUKUJE:
//Root value: 5
//Left child value: 3
//Right ch... | ALGO | 0.990405 | 4.813162 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2023-12-23T15:29:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e53f736440d... |
f1839a51-a10c-4682-bb0b-f39843fdf7ba | Anachor/HellBent | Zahin Bhai's Library/Code Hash.cpp | #include <bits/stdtr1c++.h>
#define clr(ar) memset(ar, 0, sizeof(ar))
#define read() freopen("lol.txt", "r", stdin)
#define dbg(x) cout << #x << " = " << x << endl
#define ran(a, b) ((((rand() << 15) ^ rand()) % ((b) - (a) + 1)) + (a))
using namespace std;
/// Calculate hash of certain codes. Useful in validating co... | ALGO | 0.998525 | 3.555818 | {
"github_metadata": {
"branch": "master",
"commit_count": 209,
"repo_created_at": "2019-09-27T07:37:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 59,
"forks": 17,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "45f431... |
f36f2c96-470c-4063-a6b5-6af64bf690c4 | mrunaltarwatkar018/Coding_Ninjas_Introduction_To-C-and_Data_Structures_and_Algorithm | Milestone 5/D - Lecture 19 - DP 2/1. DP - 2/11_Solution_Edit_Distance_Brute_Force_Approach.cpp | /* =================================================================================================================== */
/*
Question : Code : Edit Distance
Given two strings s and t of lengths m and n respectively,
find the edit distance between the strings.
... | ALGO | 0.999964 | 5.425179 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-06-18T14:56:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5c973ec02b... |
e6a88bbd-aeb5-4976-8c09-8a9b327143ab | KTH-condensed-matter/RCSJ | TriSolve.h | // TriSolve.h - Solve tridiagonal equation systems using LU-factorization.
#ifndef TRISOLVE_H
#define TRISOLVE_H
class TriSolve
{
public:
double *l, *d, *u;
int N;
TriSolve() : l(0), d(0), u(0) {}
TriSolve(double* l_, double* d_, double* u_, int N_) { init(l_,d_,u_,N_); }
void init(double* l_, double* d... | ALGO | 0.999892 | 5.644759 | {
"github_metadata": {
"branch": "master",
"commit_count": 68,
"repo_created_at": "2020-03-25T16:19:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "037d712f96... |
c09b9fde-d0fa-4908-82a6-a405c3b8cc8b | fritzsedlazeck/SURVIVOR | src/phasing/Phasing_vcf.cpp | /*
* Phasing_vcf.cpp
*
* Created on: Sep 26, 2018
* Author: sedlazec
*/
#include "Phasing_vcf.h"
std::vector<snp_str> parse_hapcut2(std::string hapcut_output) {
std::vector<snp_str> snps;
std::string buffer;
std::ifstream myfile;
myfile.open(hapcut_output.c_str(), std::ifstream::in);
if (!myfile.good(... | DATA | 0.938751 | 3.427572 | {
"github_metadata": {
"branch": "master",
"commit_count": 180,
"repo_created_at": "2015-10-27T14:55:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 390,
"forks": 49,
"issues": 85,
"pull_requests": 1
},
"file_meta": {
"content_id": "6870... |
5c38b41f-17e3-4386-8e18-d085965fe406 | Thoutain/Thoutain_Algorithm | leetcode/acwing_基础/六、贪心/905区间选点.cpp | /*
给定 N 个闭区间 [ai,bi],请你在数轴上选择尽量少的点,使得每个区间内至少包含一个选出的点。
输出选择的点的最小数量。
位于区间端点上的点也算作区间内。
*/
#include <iostream>
#include <algorithm>
using namespace std;
typedef pair<int, int> PII;
const int N = 10010;
int cmp(PII a, PII b)
{
return a.second < b.second;
}
PII p[N];
int main()
{
int n;
cin >> n;
for (i... | ALGO | 0.99997 | 4.839292 | {
"github_metadata": {
"branch": "main",
"commit_count": 49,
"repo_created_at": "2021-09-19T04:36: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": "38e409a83a5... |
2282a2ba-ec9a-4519-9e4e-89280d924db1 | OneForward/LeetCode | OJ/utils/kmpv2.cpp | #include <iostream>
#include <string>
#include "LeetCpp.utils.hpp"
using namespace std;
int issubstr(string sub, string s) {
auto m = sub.size(), n = s.size();
vector<int> next(m); next[0] = -1;
int pi = -1;
for (int i=1; i<m; ++i) {
while (pi >= 0 and sub[pi+1] != sub[i]) pi = next[pi];
... | ALGO | 0.99774 | 4.574225 | {
"github_metadata": {
"branch": "master",
"commit_count": 177,
"repo_created_at": "2021-04-15T14:13:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9d4f7cf0... |
49abbc5f-94f6-4289-918f-5346e8e4f67c | bannisa/Fall_2022_CAIS_307 | libraries/C Libraries/Array_Structured.cpp | /*This is a basic library of functions/methods for manipulating an array of integers
it is written using an structured programming approach*/
#include <stdlib.h>
float getAverage(int intArray[], int size)
{
int total = 0;
for (int i = 0; i < size; i++)
{
total += intArray[i];
}
return total/(float)size;
... | TOOL | 0.950558 | 4.74669 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-09-22T18:04: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": "198e46c83edf... |
62f959e5-705a-49d2-8a3c-168640e53983 | yubinbai/leetcode | src/rearrange_string_k_distance_apart/main.cpp | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
class Solution {
public:
string rearrangeString(string str, int k)... | ALGO | 0.999996 | 5.487968 | {
"github_metadata": {
"branch": "master",
"commit_count": 686,
"repo_created_at": "2013-05-08T18:43:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 130,
"forks": 73,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f49a5... |
b404702b-e7fc-4871-a094-75b9b5aef7d1 | gerix0841/Coding-Projects | CPP/exam_sem1.cpp | #include <iostream>
//Szab? Gerg? ASPP08
using namespace std;
void beolvasas(int &n,int R[100]);
void feladat(int n,const int R[100]);
int main()
{
int n;
int R[100];
int olvas;
beolvasas(n,R);
feladat(n,R);
while(1){
cerr<<"Ujra olvasas = 1(igen)/0(nem)"<<endl; cin>>olvas;
... | ALGO | 0.997531 | 3.242411 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-09-08T00:39: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": "fdbe47aaa174... |
7f19ef04-02b9-4a03-8439-ad8b9a2eae75 | Logarithm12/CS3358 | Assign06/Assign06P2SuppliedFiles/btNode.cpp | #include "btNode.h"
void dumpToArrayInOrder(btNode *bst_root, int *dumpArray)
{
if (bst_root == 0)
return;
int dumpIndex = 0;
dumpToArrayInOrderAux(bst_root, dumpArray, dumpIndex);
}
void dumpToArrayInOrderAux(btNode *bst_root, int *dumpArray, int &dumpIndex)
{
if (bst_root == 0)
return;
du... | ALGO | 0.965335 | 3.528413 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2020-01-23T00:35:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "846612899... |
958cdeb4-7d67-4d48-8fa2-6962bc6b7b20 | QuanNM-PTIT/C_plus_plus_PTIT | CPP0129 - ƯỚC SỐ CỦA GIAI THỪA.cpp | // Created by <NAME>
#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
#define pb push_back
#define sz size()
#define ll long long
#define FOR(i, a, b) for(int i = a; i <= b; i++)
#define FORD(i, a, b) for(int i = a; i >= b; i--)
#define faster() ios_base::sync_with... | ALGO | 0.999853 | 4.026639 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2021-10-01T05:15:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 30,
"forks": 8,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "160bc194a01... |
aacb0c8f-fb35-4119-871c-311d67ceded5 | Azure/azure-sdk-for-cpp | sdk/keyvault/azure-security-keyvault-keys/src/keyvault_protocol.cpp | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#include "private/keyvault_protocol.hpp"
#include "private/key_constants.hpp"
#include "private/keyvault_constants.hpp"
#include <azure/core/exception.hpp>
#include <azure/core/http/http.hpp>
using namespace Azure::Security::KeyVault;
using ... | TOOL | 0.902088 | 7.769735 | {
"github_metadata": {
"branch": "main",
"commit_count": 3702,
"repo_created_at": "2020-01-10T23:29:08.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 187,
"forks": 138,
"issues": 243,
"pull_requests": 4
},
"file_meta": {
"content_id": "4683... |
8af8c646-a7ae-4544-96ba-f0310e956786 | msrisujan/DAA-Lab | prims.cpp | #include <bits/stdc++.h>
using namespace std;
#define INF 1e9
vector<pair<int,int>> prims(vector<vector<int>> &graph,int n)
{
vector<pair<int,int>>mst;
int w=0;
vector<int>visited;
visited.push_back(0);
while(mst.size()<n-1)
{
int min=INF;
int v1,v2;
for(int i=0;i<visit... | ALGO | 0.999996 | 4.265205 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-03-26T09:11: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": "250467341fb7... |
5555c5f2-0e38-48ae-bc13-eef1376172d0 | NgocDat09/baitapsgk | xiaoxiao/main.cpp | #include <iostream>
#include <cstring>
using namespace std;
struct SinhVien
{
int maSv;
char hoDem[25];
char ten[9];
char gioiTinh[5];
int namSinh;
double diemTk;
};
struct Node
{
SinhVien infor;
Node *next;
};
typedef Node* TRO;
void KhoiTao(TRO &L)
{
L = NULL;
}
void Nhap1SV(S... | TOOL | 0.991904 | 3.379506 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-11-11T05:49: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": "0b2053f781a... |
c5294b0d-11b6-44cc-a8e0-d1e6c2d2a82f | Lonp-git/VFL-DMCFE | encryption/evaluate_time.cpp | #include "DMCFE.cpp"
#include <iostream>
#include <string>
#include <chrono>
#include <unordered_map>
#include <random>
using namespace std;
int main(){
// int X[2] = {500000, 499999};
// string label = "hello";
// auto start = std::chrono::high_resolution_clock::now();
// setup("./a.param", member_n... | TEST | 0.977562 | 4.417472 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2025-04-19T06:20: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": "0163b9a5a8... |
945c9601-c4bb-429f-91f9-3eb1d31cd349 | ZhanXiaoSheng/github-test | cpp/sfo_46_translate_numbers_into_strings_s2/sfo_46_translate_numbers_into_strings_s2.cpp | /*
* File: sfo_46_translate_numbers_into_strings_s2.cpp
* Created Time: 2021-12-09
* Author: Krahets (<EMAIL>)
*/
#include "../include/include.hpp"
// ===== Solution Code =====
class Solution {
public:
int translateNum(int num) {
string s = to_string(num);
int a = 1, b = 1, len = s.size();
... | ALGO | 0.99948 | 5.387689 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2023-08-02T08:51: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": "e8ecf0e487... |
cf903a22-1ce6-4ecb-acc5-4e4f91bc1245 | riadath/problem-solves | Codeforces/505C.cpp | #include <bits/stdc++.h>
using namespace std;
#ifdef IHAVETOPEE
#include "debug.h"
#else
#define debug(args...)
#endif
// #pragma GCC target("avx2")
// #pragma GCC optimization("O3")
// #pragma GCC optimization("unroll-loops")
long long oll = 0;
#define ll long long
#define ull unsigned long long
#define FIO ... | ALGO | 0.999811 | 3.698519 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2021-03-07T00:19: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": "46f9b7122... |
b01cd058-2b13-4f01-a854-cb05ce9e14e5 | fishpenguin/milvus | core/src/index/thirdparty/faiss/impl/ScalarQuantizerCodec.h | /**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// -*- c++ -*-
#pragma once
#include <cstdio>
#include <algorithm>
#include <omp.h>
#ifdef __SSE__
#include <immintrin.h>
#end... | ALGO | 0.990569 | 4.8912 | {
"github_metadata": {
"branch": "master",
"commit_count": 4798,
"repo_created_at": "2020-03-03T14:04:13.000Z",
"is_fork": true,
"is_org_owned": false,
"forked_from": "milvus-io/milvus",
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_... |
327d33a3-3b34-42b6-8058-563567439228 | sw-AhmedAdel/Data-structure-and-algorithms | 9-Queues/1-4_queuse_using_stack/main.cpp | #include <iostream>
using namespace std;
const int size{5};
int stack_1[size];
int stack_2[size];
int top1=-1;
int top2=-1;
int counter=0;
void push1(int x) {
top1++;
stack_1[top1]=x;
}
void push2( int x) {
top2++;
stack_2[top2]=x;
}
int pop1 () {
return stack_1[top1--];
}
int pop2() {
return st... | ALGO | 0.998145 | 3.901329 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-03-06T12:56:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b93437fca6f7... |
aaab20fc-0446-4193-8d64-754e49890708 | cmcgartl/Hashtable-Analysis | averageProbe.cpp | #include <vector>
#include <algorithm>
#include <random>
#include <iostream>
#include <string>
#include "Hashtable.h"
#include <ctime>
#include <cstdlib>
using namespace std;
int main(){
//string input("a");
int iterations = 0;
int inserts = 0;
cout << "please enter the number of iterations you would ... | ALGO | 0.992729 | 4.646634 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-02-06T04:48: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": "d5f5e736000a... |
ca8e0799-9d3a-403c-a15c-ff78218709b3 | jambagigirish/Programming | Sliding Window/LargestSubarrayOfSumK.cpp | #include "../stdafx.h"
#include <vector>
#include <iostream>
#include <stack>
#include <algorithm>
#include <functional>
#include <queue>
#include <unordered_map>
#include<list>
using namespace std;
pair<int,int> LargestSubArrayOfSumK(vector<int>& nums, int k){
pair<int, int> ret;
int res = INT_MIN;
int n = nums.s... | ALGO | 0.999864 | 4.46114 | {
"github_metadata": {
"branch": "mainline",
"commit_count": 16,
"repo_created_at": "2021-02-01T00:14:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "c4a63b4... |
cbf25645-da10-4156-9e3f-aab7cd9521ad | wangruihan2024/ACMOJ-Assembly | 2507 20241128.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
vector<int> a, dp, step; // dp[i]记录长度=i时最小的a, step记录每一步走的下标;
int length;
int binary_search(vector<int> &dp, int num) {
int l = 1, r = dp.size() - 1, ans = 0;
while (l <= r) {
int mid = (l + r) / 2;
if (dp[mid] <= num... | ALGO | 0.999999 | 3.845647 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2025-03-03T05:30: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": "664a627cfec... |
34fc5c39-5fe3-4132-9563-6af46e70b07c | JeongbinPark/ProblemSolving_BOJ | 2468_safetyField.cpp | #include <iostream>
#include <queue>
#include <algorithm>
#include <set>
using namespace std;
bool isPossible(int, int);
int N, max_field, curr_field, h, curr_r, curr_c, next_r, next_c;
int height[101][101];
bool visited[101][101];
int dr[] = { -1, 0, 1, 0 }, dc[] = { 0, -1, 0, 1 };
queue< pair<int, int> > q;
set<int... | ALGO | 0.999782 | 4.265926 | {
"github_metadata": {
"branch": "main",
"commit_count": 143,
"repo_created_at": "2021-01-21T11:34: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": "e20b5146b8... |
1557a83d-284f-4055-91da-532a8967a662 | sadiqshahariar/PROGRAMMING- | String Algorithm/KMP Algorithm/KMP.cpp | #include<bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define faster ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0... | ALGO | 0.999894 | 4.914995 | {
"github_metadata": {
"branch": "main",
"commit_count": 109,
"repo_created_at": "2020-10-16T00:10:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 36,
"forks": 16,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "403718e4... |
c8098b45-473b-498d-8135-21b55349c1b4 | valmarfina/Stack-Array | main.cpp | #include <iostream>
#include <iomanip>
#include <cctype>
#include "exception"
#include "StackArray.h"
template<class T>
StackArray<T> getStack(StackArray<T> stack)
{
return stack;
}
bool checkBalanceBrackets(const char *text, int maxDeep = 30);
bool getPostfixFromInfix(const char *infix, std::string &postfix, size_... | ALGO | 0.97325 | 4.828107 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2021-04-19T19:26: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": "69da50fff4... |
dad874f7-4789-4796-9489-7b76970616e6 | Kickoman/code | Other/Zbory2017/week1/day4/tasks/CFD.cpp | /**
* gównokod by candelabra
***/
/*────────────────────────────────────
▄▄▄───────────▄▄▄▄▄▄▄─────────────────
█▀░▀█──────▄▀▀▀░░░░░░░▀▀▄▄────────────
█░░░░█───▄▀░░░░░░░░░░░░░░░▀▄───────▄▄▄
█▄░░░▀▄▄▀░░██░░░░░░░░░░░░░░▀█────█▀▀░█
─█░░░░█▀░░░▀░░░░░░░░██░░░░░░▀█─▄█░░░░█
─▀█░░▄█░░░░░░░▄▄▄░░░░▀░░░░░░░███░░░░█▀
──█▄░█... | ALGO | 0.999867 | 4.146436 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2015-11-22T09:20:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9828a040c... |
61ed9ae3-377d-4773-a7db-d9567310565c | lemn09/DSA-CN | 001-DSA/006. OOPS-2/Operator Overloading.cpp | #include<iostream>
using namespace std;
class Fraction{
int numerator;
int denominator;
public:
Fraction(int numerator, int denominator){ //Parameterized Constructor
this->numerator= numerator;
this->denominator= denominator;
}
void simplify(){
int gcd,n=min(nume... | ALGO | 0.996808 | 5.646227 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2021-08-15T08:24:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "09b61576b... |
18b35724-f71a-457f-8779-1e41f793473d | DuyTran1234/leetcode-training | hash-table/minimum-index-sum-to-list.cpp | #include <vector>
#include <unordered_map>
#include <string>
#include <utility>
#include <iostream>
using namespace std;
class Solution
{
public:
vector<string> findRestaurant(vector<string> &list1, vector<string> &list2)
{
unordered_map<string, pair<int, int>> umap; // first: length, second: sum
... | ALGO | 0.999675 | 5.400764 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-04-19T02: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": "c9fc53ea4a... |
4e61bca2-507b-46bc-954c-2e3afa38e230 | talentspsp/audio_analysis | spuc/equalizers/lms_dfe.cpp | //
// author="<NAME>"
// Copyright (c) 1993-1996 <NAME>
/*
* SPUC - Signal processing using C++ - A DSP library
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at ... | ALGO | 0.999387 | 6.838986 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2011-05-17T07:15:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3a3634406... |
0c647679-78a9-489c-a5cb-8cb40448b694 | kkcookies99/UAST | Dataset/Leetcode/valid/2/248.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* XXX(ListNod... | ALGO | 0.999978 | 5.883593 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-03-29T14:30:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "00653bd0efe... |
cb0fb441-75ec-4ed2-bf3e-0e5255d1c204 | DmitryBalakin54/Itmo | programs/term3/Dm/Lab1/D/D.cpp | #include<iostream>
#include<vector>
using namespace std;
void dfs(vector<vector<bool>> &g, int u, vector<bool> &mark, vector<int> &t) {
mark[u] = true;
for (int i = 0; i < g[u].size(); i++) {
if (!mark[i] && g[u][i]) {
dfs(g, i, mark, t);
}
}
t.push_back(u);
}
int main() {... | ALGO | 0.999975 | 4.264117 | {
"github_metadata": {
"branch": "main",
"commit_count": 93,
"repo_created_at": "2023-02-11T09:49:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a90dd325cc1... |
09b60a25-1e5e-4b09-8f76-b61f124c194e | gyoogle/YAPP_Algorithm | code/5주차/숫자야구/다은.cpp | #include <string>
#include <vector>
using namespace std;
vector <string> baseballnum;
int answer = 0;
void countAnswer(string num, vector<vector<int>> baseball) {
int size = baseball.size(); int strikenum = 0, ballnum = 0; bool baseballtrue = true;
for (int i = 0; i < size; i++) {
string comparenum = to_string(base... | ALGO | 0.999295 | 4.652833 | {
"github_metadata": {
"branch": "master",
"commit_count": 373,
"repo_created_at": "2019-08-12T10:17:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "86a47ba9... |
fbb1cc1f-e9d1-4f42-81c6-e732e7a88334 | romanasa/olymp_codes | lksh/lksh2015/lksh2015ch/day2/C.cpp | #define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/STACK:66777216")
#include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <ctime>
#include <map>
#include <set>
#include <string>
#include <queue>
#include <deque>
#include <cassert>
#include <cstdlib>
#include <bitset>
#include <algorit... | ALGO | 0.999801 | 3.947303 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2019-04-11T12:03: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": "4ad9efdc53... |
927a5571-b746-46b3-9b89-c367136c34ff | Silent-Dragon/allProgramsFromCLion | unsortedOldProblems/shortestRoutes2.cpp | /* Floyd Warshall Template
*/
#include <iostream>
#include <cmath>
#include <string>
#include <cstring>
#include <map>
#include <stack>
#include <algorithm>
#include <vector>
#include <set>
using namespace std;
const int N = 1000; //max n we can have
const int iInfinity = 1e9 + 5;
const long long int lliInfinity = ... | ALGO | 0.999865 | 4.332997 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2020-04-30T09:26: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": "9534938b1... |
3b8aa18d-9c2a-4ce9-a837-2c818bb33caf | willtaehwan/Algorithm | 백준/Silver/11723. 집합/집합.cc | #include <iostream>
#include <cstring>
using namespace std;
int DAT[21] = { 0, };
int N,a;
string row="";
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
cin >> N;
for (int i = 0; i < N; i++) {
cin >> row;
if (row == "check") {
cin >> a;
cout << DAT[a] << "\n";
... | ALGO | 0.990245 | 4.407101 | {
"github_metadata": {
"branch": "main",
"commit_count": 562,
"repo_created_at": "2023-09-03T03:26: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": "6772d237b7... |
ff3812e1-e4ab-40fc-a5c0-abcd0a7a3169 | imxinlei/leetcode | 592_Fraction_Addition_and_Subtraction.cpp | /*
* https://leetcode.com/problems/fraction-addition-and-subtraction/description/
*
* Given a string representing an expression of fraction addition and subtraction,
* you need to return the calculation result in string format. The final result
* should be irreducible fraction. If your final result is an integer, ... | ALGO | 0.999464 | 6.34355 | {
"github_metadata": {
"branch": "master",
"commit_count": 261,
"repo_created_at": "2017-04-04T05:59: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": "4c0cb8ce... |
fe4c3c2c-5fba-447e-aa62-7bf1679555db | prafullpandey614/Geeks-For-Geeks-POTD | 11 Jan/Make_array_elements_unique_.cpp | //{ Driver Code Starts
// Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
// User function Template for C++
class Solution {
public:
long long int minIncrements(vector<int> arr, int N) {
// Code here
sort(arr.begin(),arr.end());
// priority_q... | ALGO | 0.999908 | 5.838706 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2023-01-06T08:18:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "da451c6f6b1... |
60c29c65-bb63-40c1-9538-f47d6801a454 | rafipramudya7/CPP2 | 7.DP/polindromSequence.cpp | #include <bits/stdc++.h>
using namespace std;
int n,d,o,panjang,arr[55][55];
vector <int> jawaban;
string s;
void solve(){
for (int i = 0; i < panjang; i++)
{
arr[i][i] = 1;
}
for (int i = 2; i <= panjang; i++)
{
for (int d = 0; d <= panjang - i; d++)
{
o = d + i... | ALGO | 0.999939 | 3.801318 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-10-30T14:44: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": "fc7da5105b... |
77d61c5c-5d97-4ea8-b0ec-191325e324f8 | Ishwarendra/Contests | CODEFORCES_CONTEST/938_Div3/F.cpp | #include "bits/stdc++.h"
#ifdef LOCAL
#include "/Users/ishwar/Debug/debug.h"
#else
#define print(...) 1;
#endif
using i64 = long long;
void solve()
{
std::array<int, 4> p{};
for (int i = 0; i < 4; i++)
std::cin >> p[i];
p[3] -= p[3] % 2;
auto par = [&]()
{
for (int i = 1; i < ... | ALGO | 0.999849 | 4.568429 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-02-11T15:50: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": "1e34a6c400c3... |
a38f3129-0ee3-492b-a861-2ff546f81707 | kabosuMy3a/PracticeProblemSolving | legacy/TRY/baekjoon/platinum/5444_serial_number/5444_serial_number.cpp | #include <iostream>
#include <algorithm>
int num_guitar_by_modulo[2][100000];
int main(){
std::ios_base::sync_with_stdio(0x0); std::cin.tie(0x0);
int T ; std::cin >> T ;
for(int t = 0 ; t < T ; t++){
int N, K ; std::cin >> N >> K ;
for(int i = 0 ; i < K ; i++){
num_guitar_by_modulo[0][i] = 0 ;
num_guit... | ALGO | 0.999956 | 3.966847 | {
"github_metadata": {
"branch": "main",
"commit_count": 125,
"repo_created_at": "2021-09-16T03:58: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": "b5b1643727... |
0f18a7ac-bde6-44aa-abbd-2bb860ec7650 | SakshamSahgal/Competitive-Programming | Codeforces + Codechef/B1. Palindrome Game (easy version).cpp | #include<iostream>
#include<algorithm>
#include<vector>
#include<map>
#define usi unsigned short int
#define ui unsigned int
#define ulli unsigned long long int
#define lli long long int
using namespace std;
int a=0;
int b=0;
bool is_palindrome = 1;
map<int,int> fz;
int c=0;
string s;
void reverse_index(int n)
{
ma... | ALGO | 0.999968 | 3.552277 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2021-12-26T10:02: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": "6c4d4f427c6... |
e571f1e5-87f5-4382-8a28-af1664b49cc6 | chenhongqiao/USACO | homework/homework.cpp | #include <bits/stdc++.h>
using namespace std;
vector<int> h;
vector<int> s;
vector<int> a;
int main()
{
//freopen("homework.in", "r", stdin);
//freopen("homework.out", "w", stdout);
int n;
cin >> n;
for (int i = 0; i < n; i++)
{
int tmp;
cin >> tmp;
h.push_back(tmp);
... | ALGO | 0.999979 | 3.316212 | {
"github_metadata": {
"branch": "master",
"commit_count": 208,
"repo_created_at": "2020-06-10T17:06: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": "fe9e93ab... |
886d8c47-2559-49a8-9785-7e61a498a456 | gods-mack/Competitive-Coding | codechef/april/STRNO.cpp |
// question 3
#include<bits/stdc++.h>
typedef long long int ll;
using namespace std;
int kFactors(ll n, ll k)
{
// A vector to store all prime factors of n
vector<ll> P;
// Insert all 2's in vector
while (n%2 == 0)
{
//P.insert(2);
P.push_back(2);
n /= 2;
}... | ALGO | 0.999935 | 4.474877 | {
"github_metadata": {
"branch": "master",
"commit_count": 315,
"repo_created_at": "2018-02-09T16:51:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 4,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "1ebe4b6a... |
db506e6f-a034-488e-902f-7f6192d9aa21 | b202001162/DSA | Graph/All pairs shortest path (Floyd Warshall).cpp | void floyd_warshall(vector<vector<int>>&matrix){
// Code here
int n = matrix.size();
for(int i = 0; i<n; i++) {
// i is referce to the node which is used to go through the way of j to k
for(int j = 0; j<n; j++) {
for(int k = 0; k<n; k++) {
if(j == i || k =... | ALGO | 0.999988 | 5.536684 | {
"github_metadata": {
"branch": "main",
"commit_count": 129,
"repo_created_at": "2023-06-13T01:36: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": "26314b083b... |
04eb3b73-f724-40da-89b5-a8934e8c91e4 | tangziyi001/competitive-programming | DP/KeyDungeonDiv1.cpp | /*
* TopCoder SRM 588 2
* Created by <NAME>
* dp[bitmask][num of white keys assigned red]
* For each state, assign white keys to red.
*/
//#include <bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <string>
#include <cstring>
#include <cstdlib>
#include <sstream>
#include <cmath>
#include <algorithm... | ALGO | 0.998675 | 3.621744 | {
"github_metadata": {
"branch": "master",
"commit_count": 220,
"repo_created_at": "2015-09-15T13:45:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6b781d20... |
6d738781-b822-438d-8fbb-923ca31d74b1 | HUSS41N/DSA | archive/Binary Tree/maximum-width-of-a-binary-tree.cpp | #include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int data;
Node *left;
Node *right;
Node(int val)
{
data = val;
left = NULL;
right = NULL;
}
};
void maxWidth(Node* root){
if(root==NULL){
return;
}
int ans = INT_MIN;
queue<Node*... | ALGO | 0.999926 | 4.302077 | {
"github_metadata": {
"branch": "main",
"commit_count": 295,
"repo_created_at": "2021-05-25T19:11:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b888cc9810... |
f5493e02-f09f-43f3-b360-4df587ce56a4 | Hanpiyd/CMU15445-Bustub-2024Spring | src/optimizer/seqscan_as_indexscan.cpp | #include <cstddef>
#include <cstdint>
#include <iostream>
#include <memory>
#include <queue>
#include <valarray>
#include <vector>
#include "common/logger.h"
#include "concurrency/transaction.h"
#include "execution/expressions/abstract_expression.h"
#include "execution/expressions/column_value_expression.h"
#include "e... | ALGO | 0.947523 | 6.061867 | {
"github_metadata": {
"branch": "master",
"commit_count": 460,
"repo_created_at": "2024-03-04T08:38: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": "b69aa6a3... |
3d89d852-678b-4af1-9639-ce6f64191133 | vozeo/Code | Contest/ZR/Day3/T3.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i_, s_, t_) for (int i_ = (s_); i_ <= (t_); ++i_)
#define re(i_, s_, t_) for (int i_ = (s_); i_ < (t_); ++i_)
typedef long long ll;
#define N 500005
int T, n, a[N], b[N], c[N];
template <typename T>
inline void read(T &x)
{
char c;
while (!isdigit(c = ... | ALGO | 0.999997 | 3.177769 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-07-20T14:16: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": "d924107403... |
7b81622d-8775-48b5-9fdc-d1f84995a261 | hosokshu000/eTrumpet | Arduino/eTrumpet_prototype/eTrumpet_prototype.ino | int valve1 = 2;
int valve2 = 4;
int valve3 = 7;
int piezo = 8;
int pot = A0;
int tones[] = {233, 349, 466, 587, 698, 932};
int valves[] = {0, 0, 0};
int valvePins[] = {valve1, valve2, valve3};
void setup() {
pinMode(valve1, INPUT);
pinMode(valve2, INPUT);
pinMode(valve3, INPUT);
pinMode(piezo, OUTPUT);
pinM... | ALGO | 0.923449 | 5.711147 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2025-02-09T22:59: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": "fae474158d7... |
92d337a3-14ab-42e1-ae0d-9e704605fca6 | thirdreplicator/project_euler_cpp11 | src/euler-9.cpp | #include <iostream>
#include <cassert>
const int max_i = 100;
constexpr int max_j = (max_i + 1);
bool constraint_1(int a, int b, int c) {
return a + b + c == 1000;
}
void print_result(int a, int b, int c) {
std::cout << "Found the triple. ";
std::cout << "(" << a << ", " << b << ", " << c << ") ";
std:... | ALGO | 0.999295 | 4.163897 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2013-05-13T07:16: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": "b18dff9b7... |
d29214db-bc9b-4742-a783-3ec1506543a6 | mindspore-ai/mindspore | mindspore/lite/tools/converter/quantizer/fse_bit_stream.cc | /**
* Copyright 2021 Huawei Technologies Co., Ltd
*
* 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... | TOOL | 0.932413 | 6.845242 | {
"github_metadata": {
"branch": "master",
"commit_count": 83896,
"repo_created_at": "2020-02-11T08:43:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4559,
"forks": 740,
"issues": 181,
"pull_requests": 20
},
"file_meta": {
"content_id": ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.