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 |
|---|---|---|---|---|---|---|---|
ed2b3ec2-b7e4-4aab-a7fb-3e91240b220c | Yasiraalam/DSA | dataStructure/freq-LL.cpp | #include <bits/stdc++.h>
using namespace std;
class node
{
public:
int data;
node *next;
node(int data)
{ // constrctor
this->data = data; // getting the data
this->next = NULL;
}
};
void insertAtHead(node *&head, int d)
{
// create a new node
node *t... | ALGO | 0.999577 | 4.68799 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2022-09-03T07:16: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": "72a67c0156d... |
cc9c95f3-bb2d-429e-bb4c-710e338c9148 | AvinashAgarwal14/password_encrypter | main.cpp | #include <iostream>
#include <ctype.h>
#include <stdio.h>
using namespace std;
char* encrypt(char encrypt[80]);
int sumfinder(int a);
int main()
{
//Taking Name as Input
int i,j;
char name[80];
cout<<"Enter Your Name:"<<endl;
cin>>name;
/*char *nameptr;
nameptr = encrypt(name);
char e... | ALGO | 0.999569 | 3.568528 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-01-23T19:37: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": "50c1f71d47... |
5675590e-5ac6-4dab-b2c9-db402fd962c2 | goffersoft/algs4cc | src/edu/princeton/cs/algs4/cc.h | /******************************************************************************
* Dependencies: none
*
* template header file
*
* G= Graph is made up of a set of vertices connected by edges.
* V= Vertex is a point on a Graph
* E= Edge connects two Vertices
* P= Path is a sequence of vertices connected b... | ALGO | 0.983888 | 7.01572 | {
"github_metadata": {
"branch": "master",
"commit_count": 94,
"repo_created_at": "2016-03-18T00:47:41.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "865d92e0ba... |
c927cb22-ed1e-4e52-aa80-f13dc50c0b24 | IsaacLyh/Movie-Suggesting-System | disjoint.cpp | //Name: <NAME>
//Pid: A91018743
//Name: <NAME>
//Pid:A91115104
//this file implement certain methods called on disjoint set
#include <iostream>
#include <vector>
#include <unordered_map>
#include "disjoint.hpp"
bool connected(set* in ,string name1, string name2);
//this method will union two input string
//by finding... | ALGO | 0.991837 | 3.718973 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-08-10T23:17: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": "bcde85f4b3... |
ea9bdad5-105c-4f30-97cf-3987cd0d19f7 | benroberts999/ampsci | src/DiracOperator/TensorOperator.hpp | #pragma once
#include "Angular/Wigner369j.hpp"
#include "Maths/Grid.hpp"
#include "Maths/NumCalc_quadIntegrate.hpp"
#include "Maths/SphericalBessel.hpp"
#include "Physics/PhysConst_constants.hpp"
#include "Potentials/NuclearPotentials.hpp"
#include "Wavefunction/DiracSpinor.hpp"
#include "qip/Vector.hpp"
#include <cmat... | ALGO | 0.966249 | 6.821326 | {
"github_metadata": {
"branch": "main",
"commit_count": 1717,
"repo_created_at": "2017-07-11T05:41:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 24,
"forks": 9,
"issues": 7,
"pull_requests": 1
},
"file_meta": {
"content_id": "5d43d1cf... |
168e7759-7717-472d-a8e7-7a1942d22c4f | zc1036/project-euler | problems/1/soln.cc |
/*
Problem 1: Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3
or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
*/
#include <iostream>
int main() {
constexpr unsigned int limit = 1000;
int ... | ALGO | 0.999638 | 5.530219 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-10-05T01:14: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": "2eed1890cb... |
01a5a765-f512-42b6-80b4-9d625ecfb4a8 | FangGet/BundleFusion_Ubuntu_Pangolin | include/FreeImage/include/CGAL/internal/Intersections_3/Bbox_3_Triangle_3_do_intersect.h | // Copyright (c) 2008 INRIA Sophia-Antipolis (France), ETH Zurich (Switzerland).
// Copyright (c) 2010, 2014 GeometryFactory Sarl (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public License as
//... | ALGO | 0.970328 | 6.202012 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-06-29T03:53:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 132,
"forks": 34,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f9139c... |
1db65b5d-b004-45c3-bbfe-8fc1f8b2549a | reisenx/2110211-INTRO-DATA-STRUCT | G66 CEDT Quiz/Heap Before Node/d66_m1_heap_before_node.cpp | #include<iostream>
#include<vector>
using namespace std;
int nodes, currentNode;
vector<int> descendants;
int main()
{
// This makes std::cin and std::cout faster
ios_base::sync_with_stdio(false); cin.tie(0);
// Input nodes and current node
cin >> nodes >> currentNode;
/* Heap Before Node
... | ALGO | 0.999944 | 3.952593 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2024-08-16T08:20:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "10fd696b0ec... |
2401a9ea-3865-416c-9620-d5dd1f5ca1eb | hoangkhoi2k4/C-PLUS-PLUS-PTIT | KhaiBaoLopPhanSo.cpp | #include <iostream>
using namespace std;
typedef long long ll;
ll gcd(ll a, ll b) {
if (a == 0) return b;
return gcd(b % a, a);
}
class PhanSo {
private:
ll tuSo;
ll mauSo;
public:
PhanSo(ll tu = 0, ll mau = 1) {
tuSo = tu;
mauSo = mau;
}
friend istream& operator>>(istrea... | ALGO | 0.99839 | 4.2377 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2024-11-05T06:09:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9e19d14352... |
a8d29a90-b9db-4eac-9f7d-21a59da6fbbb | 5j1n/programmers | 디스크 컨트롤러.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
struct work {
int num;
int start;
int length;
};
vector<work>wait_queue;
work hdd;
bool cmp(work a, work b) {
if (a.length == b.length) {
if (a.start == b.start) {
return a.num < b.n... | ALGO | 0.999915 | 4.500032 | {
"github_metadata": {
"branch": "main",
"commit_count": 51,
"repo_created_at": "2024-12-31T05:05: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": "51ebbe463d9... |
92b5707c-ed56-43db-8929-f43b8e87e40c | tangjz/acm-icpc | uvalive/7219.cpp | #include <queue>
#include <stdio.h>
#include <algorithm>
const int maxn = 101, INF = 0x3f3f3f3f;
int t, n, a[maxn][3], busy[3], tim[3], total;
std::priority_queue<int> Q[3];
int main()
{
scanf("%d", &t);
for(int Case = 1; Case <= t; ++Case)
{
for(int i = 0; i < 3; ++i)
{
tim[i] = 0;
busy[i] = -1;
for( ;... | ALGO | 0.999832 | 3.656968 | {
"github_metadata": {
"branch": "master",
"commit_count": 293,
"repo_created_at": "2013-10-06T18:57:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 45,
"forks": 13,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "086e29... |
1b935f18-b75e-46a1-9628-df21ef71a9e3 | YotaArai/atcoder | abc221/C/main.cpp | #include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cs... | ALGO | 0.999958 | 4.160246 | {
"github_metadata": {
"branch": "main",
"commit_count": 69,
"repo_created_at": "2021-05-26T12:01: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": "49abdeb6543... |
a715783b-376f-40b7-87fe-0e7a91afd309 | mvshmakov/junk | olymps/tinkoff/TinkoffTask3/TinkoffTask3/TinkoffTask3.cpp | // TinkoffTask3.cpp: определяет точку входа для консольного приложения.
//
#include "stdafx.h"
#include <iostream>
#include <cmath>
int isPrime(unsigned long number);
int isEven(unsigned long number);
int main() {
int Q, K, C;
int counter = 0;
std::cin >> Q;
for (int i = 0; i < Q; i++) {
std::cin >> K;
std:... | ALGO | 0.999279 | 3.882881 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-03-23T20:02:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 11
},
"file_meta": {
"content_id": "84cd5e4b9... |
5c59651a-ebfe-4ce9-92ff-f040c643a60f | naufalfmm/Prak_Basprog | UAS/OOP03_Class_Person.cpp | #include <iostream>
#include <string>
#include <iomanip>
using namespace std;
class Person {
string name;
int age,height;
double weight;
public:
Person() {name="";age=0;height=0;weight=0;}
void masukData(string n, int u, int h, double w) {
name=n;
age=u;
height=h;
w... | ALGO | 0.987402 | 3.372174 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-03-21T21:35: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": "0e7726bfbe... |
5ee12845-28b9-4a9e-a2bd-e29313312da7 | himanshu-code/AmazonTestSeries | Strings/PrintAllPossibleStrings.cpp | #include <bits/stdc++.h>
using namespace std;
void permute(string S, int start, int end, string current, vector<string> &result)
{
if (start > end)
{
result.push_back(current);
return;
}
current.push_back(S[start]);
permute(S, start + 1, end, current, result);
current.insert(curr... | ALGO | 0.999489 | 5.577284 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-10-27T17: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": "eb7381d500c5... |
f8135885-76d6-47ec-8819-7c897e5d0a8a | theAnton-forks/Competitive-Programming-Portfolio | Toys/src.cpp | #include <bits/stdc++.h>
typedef long long ll;
const int maxn = 2e4 + 100;
int val[maxn];
std::vector<int> extra[maxn];
std::unordered_set<int> pushed[maxn];
std::set<int> m;
ll res = 0;
int main(){
std::ios::sync_with_stdio(false);
int n;
std::cin >> n;
std::vector<int> v;
for(int i = ... | ALGO | 0.999928 | 4.00494 | {
"github_metadata": {
"branch": "master",
"commit_count": 417,
"repo_created_at": "2020-11-07T06:54:09.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9fef57cb5... |
34cb973c-d204-45e5-a31f-0a036cd7dc7e | yangmingzi/MyLeetcode | 81-Search in Rotated Sorted Array II.cpp | //经典题目,参考博客:http://www.cnblogs.com/TenosDoIt/p/3465240.html
class Solution {
public:
bool search(vector<int> nums, int target) {
int n=nums.size();
int l = 0, r = n - 1;
while (l <= r) {
int m = l + (r - l)/2;
if (nums[m] == target) return true; //return m in Search in Rotated Array I
... | ALGO | 0.999998 | 5.56438 | {
"github_metadata": {
"branch": "master",
"commit_count": 121,
"repo_created_at": "2015-03-09T12:59:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "70eab9d5... |
55d115b9-232e-44ec-8f89-b222ea50832c | lonyliu/tfhe-10ms | src/libtfhe/fft_processors/spqlios/lagrangehalfc_impl.cpp | #include <polynomials.h>
#include "lagrangehalfc_impl.h"
using namespace std;
LagrangeHalfCPolynomial_IMPL::LagrangeHalfCPolynomial_IMPL(const int N) {
assert(N==1024);
coefsC = new double[N];
proc = &fftp1024;
}
LagrangeHalfCPolynomial_IMPL::~LagrangeHalfCPolynomial_IMPL() {
delete[] coefsC;
}
//i... | ALGO | 0.976521 | 5.394804 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2017-10-31T12:26:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "666a14ecfb... |
4069121e-27b8-4e4b-9629-17a3dc4963c2 | jdiogenes/B16-Software-Engineering-Laboratory | springmass.cpp | /** file: springmass.cpp
** brief: SpringMass simulation implementation
** author: <NAME>
**/
#include "springmass.h"
#include <iostream>
/* ---------------------------------------------------------------- */
// class Mass
/* ---------------------------------------------------------------- */
Mass::Mass()
: posi... | ALGO | 0.991922 | 5.388438 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2017-04-16T15:51: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": "e8a587e28... |
5f758cbf-f2d8-4ff6-a9ef-ddabf75610f1 | SuHyeonOk/SuHyeonOk | 백준/Gold/2146. 다리 만들기/다리 만들기.cc | #include <iostream>
#include <algorithm>
#include <queue>
#include <cstring>
using namespace std;
int N, res = 987654321;
int A[101][101];
int dy[4] = { -1,1,0,0 };
int dx[4] = { 0,0,-1,1 };
bool visit[101][101];
void findLand(int i,int j, int count) {
queue<pair<int, int>> q;
A[i][j] = count;
q.push({ ... | ALGO | 0.999794 | 4.217224 | {
"github_metadata": {
"branch": "main",
"commit_count": 802,
"repo_created_at": "2022-01-21T08:44: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": "cc544365bf... |
666269e1-5bdf-4946-bfb0-a90a74c97868 | SAITPublic/PNMLibrary | PNMLibrary/tools/datagen/imdb/general/predicate_vecs_info.cpp | /*
* Copyright (C) 2023 Samsung Electronics Co. LTD
*
* This software is proprietary of Samsung Electronics.
* No part of this software, either material or conceptual may be copied or
* distributed, transmitted, transcribed, stored in a retrieval system or
* translated into any human or computer language in any f... | TOOL | 0.965008 | 7.25077 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-06-29T00:48:31.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21cd33b0f5669... |
7e3ccee9-68b0-48b5-9fac-1d3fe40e842a | Ajax-07/DSA-Competitive-Programming-by-Ajay | DSA with C++/6 Binary Tree/binaryTree9.cpp | // ............. level order traversal Linked List .............
#include<bits/stdc++.h>
using namespace std;
#include "BinaryTree.h"
static vector<node<int>*> headArr ;
template <typename T>
class node{
public:
T data;
node<T>* next;
node(T data){
this->data = data;
next = NULL;
... | ALGO | 0.999936 | 5.351591 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2021-01-05T15:03: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": "177a0e2fb... |
a9d8d2d4-4a34-4d06-830d-031ea2e55021 | tiankonguse/leetcode-solutions | other/season/2022-spring/cmbchina/C.cpp | #include <bits/stdc++.h>
#include "base.h"
using namespace std;
typedef __int128_t int128;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<pll> vpll;... | ALGO | 0.999945 | 4.004343 | {
"github_metadata": {
"branch": "master",
"commit_count": 1037,
"repo_created_at": "2015-04-11T09:31:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 81,
"forks": 26,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "73fd7... |
29c561d8-2826-44b7-842f-ab477d9ff5a2 | kangkyunghyun/baekjoon-online-judge | code/04900~04999/4920.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
cin.tie(0)->sync_with_stdio(0);
int cnt = 1;
while (1) {
int n, ans = -1e12;
cin >> n;
if (!n)
break;
int arr[101][101] = {0};
for (int i = 0; i < n; i++)
for ... | ALGO | 0.999738 | 3.840701 | {
"github_metadata": {
"branch": "master",
"commit_count": 1223,
"repo_created_at": "2022-09-01T13:47: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": "7323b75... |
96d6d4da-bd37-4bbc-8470-5f8d5e653cfe | masal9pse/atcoder-practice | abc/301~350/336/c02.cpp | #include <iostream>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <set>
#include <regex>
#include <iomanip>
#include <map>
#include <cassert>
#include <stack>
#include <queue>
#include <deque>
using namespace std;
using ll = long long;
// using P = pair<int, int>;
template<class T... | ALGO | 0.999861 | 3.79003 | {
"github_metadata": {
"branch": "master",
"commit_count": 221,
"repo_created_at": "2022-03-11T08:41: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": "0277834f... |
81281e45-9ed5-47a2-b3a0-f1367b7277a4 | rouman321/code-practice | 0921-minimumAddtoMakeParenthesesValid.cpp | /*
Given a string S of '(' and ')' parentheses, we add the minimum number of
parentheses ( '(' or ')', and in any positions ) so that the resulting parentheses
string is valid.
Formally, a parentheses string is valid if and only if:
It is the empty string, or
It can be written as AB (A concatenated with B), where A a... | ALGO | 0.998681 | 4.871441 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2019-09-20T03:38: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": "c46027b94... |
a0939b64-5883-4f0e-8d9a-76aad0c848d2 | PRANAVJARANDE/CodeForces | C_Barcode.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long int int32;
typedef unsigned long int uint32;
typedef long long int int64;
typedef unsigned long long int uint64;
typedef long long ll;
typedef long double ld;
typedef unsigned int ui;
typedef unsigned long long ull;
typedef pair<ll, ll> pl;
typedef vector<int... | ALGO | 0.999959 | 4.418266 | {
"github_metadata": {
"branch": "main",
"commit_count": 674,
"repo_created_at": "2023-09-08T10:11: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": "2a7241c71c... |
e900e450-fbc8-488b-88e9-d778bcf0bfcb | BelaPlatform/Bela | examples/terminal-only/filter-IIR/render.cpp | /*
____ _____ _ _
| __ )| ____| | / \
| _ \| _| | | / _ \
| |_) | |___| |___ / ___ \
|____/|_____|_____/_/ \_\
http://bela.io
*/
/**
\example terminal-only/filter-IIR/render.cpp
Infinite Impulse Response Filter
------------------------------
This scripts needs to be run in a terminal because it ... | ALGO | 0.911951 | 5.902251 | {
"github_metadata": {
"branch": "master",
"commit_count": 3376,
"repo_created_at": "2016-06-22T14:43:22.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 511,
"forks": 139,
"issues": 189,
"pull_requests": 37
},
"file_meta": {
"content_id": "2... |
111655f7-7c34-46ff-b481-5428c50d73de | emilyju0314/gpt_code_plagiarism | dataset/code_content_classifier/allpro_train/0_0_2761.cpp | #include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
bool dfs(int node, unordered_map<int, vector<int>>& adj_list, unordered_map<int, vector<int>>& rev_adj_list, vector<bool>& visited, vector<int>& order) {
visited[node] = true;
for (int next : adj_list[node]) {
if (!vis... | ALGO | 0.999997 | 4.735406 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2024-04-28T03:59:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c66fdcb12f3... |
2323116f-ff92-42c7-95cc-5fe31a1c5d63 | alex-sandalov/archiver | lib/HammingCode.cpp | #include "HammingCode.h"
std::vector<uint8_t> EncodeHamming(const std::vector<uint8_t>& array, int len_array) {
int extra_bits = HammingCodeExtraBits(len_array);
int size_bits = len_array + extra_bits;
std::vector<uint8_t> result(size_bits / kSizeOneByte + 1, 0);
int index = 0;
int index_array = 0;
while (ind... | ALGO | 0.993367 | 4.3827 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-09-04T16:58: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": "5c16cf8a12fa... |
cb0eef29-62c7-478c-ac82-1442acf37690 | fredgod628/PracticasLenguajeCpp | LOOPS/Ciclo While/Recorrer una cadena y contar la cant de vocales.cpp | /*RECORRER UNA CADENA Y CONTAR LA CANTIDAD DE VOCALES Y CONSONANTES QUR TIENE,
INDICAR LUEGO LA FRECUENCIA DE LAS VOCALES Y DE LAS CONSONANTES SOBRE EL TO-
TAL DE CARACTERES DE LA CADENA*/
#include<iostream>
#include<conio.h>
#include<stdio.h>
#include<string.h>
using namespace std;
char p[]="";
char c... | ALGO | 0.99665 | 3.511616 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-09-23T17:36: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": "ed01e14653... |
ec99ed36-e423-4f2a-8641-3a9d15d628b3 | miaozhendaoren/ygomi_vscpp | Tools/XML_GEN/gen_segment_XML/gen_segment_xml/gen_segment_xml/main.cpp | #include <string>
#include <stdio.h>
#include <complex>
#include <vector>
#include <iostream>
#include <sstream>
#include "XMLParser.h"
using std::vector;
using namespace std;
#define uint8 unsigned char
#define uint32 unsigned int
#define MAX_LINE_NUM 20
#define MAX_LANE_NUM 5
#define MAX_CONN_SEGMENT_NUM 4
#define ... | TOOL | 0.9239 | 3.010579 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2016-03-07T16:46:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "80d681472... |
fac5d0e4-62ae-4b84-b9ec-317769a8f558 | SupPanda9/Object-oriented_programming_FMI_2021-2022_Nikolay_Nikolaev | Sem. 01/Practicum/task4.cpp | #include <iostream>
enum Year {
first,
second,
third,
fourth
};
struct Student {
int fn;
Year year;
double averageGrade;
};
void printStudent(const Student& student) {
std::cout << "Faculty number: " << student.fn << std::endl << "Year: ";
switch (student.year) {
case first: s... | TOOL | 0.986687 | 4.207217 | {
"github_metadata": {
"branch": "main",
"commit_count": 144,
"repo_created_at": "2022-04-15T07:23:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 19,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8a3ad14c6... |
fcc95c96-b7dd-47a9-bbd2-158dcfdac8a1 | himanish-star/cp_codes | pep_coding_ip/sun_nov_03/longest_consecutive_sequence.cpp | class Solution {
struct Subset {
int parent;
int rank;
};
int find(Subset subsets[],int i) {
if(i!=subsets[i].parent) {
subsets[i].parent=find(subsets,subsets[i].parent);
}
return subsets[i].parent;
}
void unite(Subset subsets[],int x,int... | ALGO | 0.999983 | 5.492565 | {
"github_metadata": {
"branch": "master",
"commit_count": 320,
"repo_created_at": "2018-12-19T09:19: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": "63ab2655... |
94899785-7e57-48df-a154-14831e764fdb | mrcchef/CP | Coding Platform/Coding_blocks/Competative_Programming/DP/Minimum_cost_path.cpp | #include <bits/stdc++.h>
using namespace std;
#define fo(i,n) for(i=0;i<n;i++)
#define Fo(i,k,n) for(i=k;i<=n;i++)
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define mii map<ll,ll>
#define pii pair<ll,ll>
#define vi vector<ll>
#define endl "\n"
#define deb(x) cout ... | ALGO | 0.99997 | 3.776595 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2022-06-12T05:00:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ce6b5f6834... |
38027229-93f6-4481-b2a7-b2a913ea17cf | samuelzq/cpp_lesson | search/P1596.cpp | /**
* https://www.luogu.com.cn/problem/P1596
*
* @File: P1596.cpp
* @Author: <NAME> <EMAIL>
* @Date: 2024-04-24
*
*/
#include <bits/stdc++.h>
using namespace std;
char f[110][110];
int w[8][2] = {{-1, 0}, {0, -1}, {1, 0}, {0, 1}, {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
int cnt = 0;
void dfs(int x, int y)
{
... | ALGO | 0.999714 | 4.610036 | {
"github_metadata": {
"branch": "main",
"commit_count": 55,
"repo_created_at": "2023-11-06T09:31: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": "1089eee976a... |
9d6b944d-44e4-4d4e-8fe2-daaccf25b583 | FistOfHit/CUDAlts_playground | libreCUDA/src/main.cpp | #include <iostream>
#include <vector>
#include <librecuda.h>
// Declaration of the Kahan summation function (implemented in kahan_sum.cu)
float kahan_sum(const float* data, int size);
int main() {
// Initialize LibreCUDA
libreCuInit(0);
// Get device count
int device_count = 0;
libreCuDeviceGetCo... | ALGO | 0.905659 | 6.612813 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-08-21T13:13:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc3f89babbaa... |
b476c508-7741-44ca-99f7-fe2dc38221cf | CharlzKlug/st | ACMP/ex015/ex015.cpp | #include <iostream>
#include <fstream>
int main ( ) {
int towns, ways = 0, temp ;
std::ifstream inputFile ( "input.txt" ) ;
if ( !inputFile.bad ( ) ) {
inputFile >> towns ;
for ( int i = 0; i < towns - 1; ++i ) {
for ( int j = 0; j <= i; ++j ) inputFile >> temp ;
for ( int j = i + 1 ; j < tow... | ALGO | 0.998763 | 4.069271 | {
"github_metadata": {
"branch": "master",
"commit_count": 215,
"repo_created_at": "2015-09-14T13:52:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc106335... |
efbf7e72-7558-4410-b60b-739573a9e2e8 | Priyo002/DSA | CSES/Graph/Flight_Discount.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 int long long
#define pb push_back
#define endl '\n'
const... | ALGO | 0.999942 | 4.154321 | {
"github_metadata": {
"branch": "master",
"commit_count": 238,
"repo_created_at": "2023-06-21T09:23:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "02f7da58... |
02b64499-cf95-4f8d-aa5e-7e4125d55844 | Kawser-nerd/CLCDSA | Source Codes/CodeJamData/14/22/20.cc | #include <bits/stdc++.h>
using namespace std;
long long dp[40][2][2][2];
int a[100], b[100], c[100];
long long f(int x, int uA, int uB, int uK) {
if (x == -1) {
return 1;
}
if (dp[x][uA][uB][uK] != -1) return dp[x][uA][uB][uK];
int upA = 1, upB = 1, upK = 1;
if (uA) upA = a[x];
if (uB)... | ALGO | 0.999916 | 4.503386 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-09-30T05:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 8,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "11188f69... |
bb2fc163-e9b5-4aa2-a391-41f227cbab87 | uxlfoundation/oneDAL | cpp/oneapi/dal/algo/triangle_counting/vertex_ranking.hpp | /*******************************************************************************
* Copyright 2020 Intel 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.o... | ALGO | 0.967872 | 7.774193 | {
"github_metadata": {
"branch": "main",
"commit_count": 2361,
"repo_created_at": "2016-03-28T22:39:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 636,
"forks": 224,
"issues": 23,
"pull_requests": 37
},
"file_meta": {
"content_id": "aa76... |
55c43a99-c72b-4417-a81e-383bcbe62b89 | TOMsworkspace/Leetcode | Leetcode-template/string/Manacher.cpp | #include<iostream>
#include<vector>
using namespace std;
string init(const string &s){
string res;
for(auto c : s)
{
res.push_back('#');
res.push_back(c);
}
res.push_back('#');
return res;
}
int Manacher(const string & str){
int n = str.size();
vector<int>p(n,1);
... | ALGO | 0.999965 | 4.636483 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2022-06-01T08:28:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7972c0bf76... |
9bf61426-9b6a-4b83-bf7e-7261e032238b | ishandutta2007/codeforces-a | alireza_kaviani/normal/157/B.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef pair<double,double> pdd;
typedef pair<ld,ld> pld;
#define all(x) ... | ALGO | 0.999772 | 4.589684 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f2ca05eeb1f4... |
00435489-83a3-4674-ba5b-c0068a3497ac | Kkackit02/Baekjoon_Code | Code/Graph/BFS/1707(adjType).cpp | #include <bits/stdc++.h>
using namespace std;
//반례모음 https://www.acmicpc.net/board/view/77198
vector<int> vec[200001];
int visited[200001];
int flag = 1;
int K , V, E;
int bfs(int value)
{
queue<int> queue;
queue.push(value);
visited[value] = flag;
while(!queue.empty())
{
int x = queue.front();
queue.pop(... | ALGO | 0.999959 | 5.045627 | {
"github_metadata": {
"branch": "main",
"commit_count": 86,
"repo_created_at": "2021-03-18T08:47: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": "7aa4b80e77f... |
98db50e3-22f7-4e4d-a47b-ab4baa21dc1c | tmoux/prog-contests | codeforces/1559/C/c.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define sz(x) (int)(x).size()
#define all(x) x.begin(), x.end()
template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0... | ALGO | 0.999822 | 3.989265 | {
"github_metadata": {
"branch": "master",
"commit_count": 288,
"repo_created_at": "2018-10-21T03:33:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c5cd7df1... |
56226705-8362-48e2-b49a-b3cff90ca8f1 | singhkunal01/Tree-Codes | Binary Search Trees/Delete a node in BST.cpp | //----------------------------- F I R S T A P P R O A C H -------------------------
//This approach will always attach the right subtree of target(to be delete node) into the left subtree at last and righmost node
Node *findRightmostNode(Node *root){
if(root->right == NULL) return root;
return findRightmostNode(roo... | ALGO | 0.99999 | 3.800346 | {
"github_metadata": {
"branch": "main",
"commit_count": 106,
"repo_created_at": "2021-08-22T18:20:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "37bd52d493... |
dd15946b-f86a-4800-84e3-04c3197d92f1 | ignite312/CSES-Solutions | Tree Algorithms/Finding a Centroid.cpp | /*
Problem Name: Finding a Centroid
Problem Link: https://cses.fi/problemset/task/2079
Idea: Subtree
Complexity:
Resource:
*/
#include<bits/stdc++.h>
using namespace std;
const int N = 2e5 + 1;
vector<int> adj[N];
int subtree[N], n;
int ans = -1;
void dfs(int u, int p) {
subtree[u] = 1;
bool is_centroid = t... | ALGO | 0.999988 | 4.716626 | {
"github_metadata": {
"branch": "main",
"commit_count": 84,
"repo_created_at": "2023-11-02T11:56:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2b32695635... |
3e1ef5a3-db78-4712-aa82-5a52c09cca94 | dtcxzyw/OI-Source | Source/Network Flows/2766.cpp | #include <algorithm>
#include <cstdio>
#include <cstring>
int read() {
int res = 0, c;
do
c = getchar();
while (c < '0' || c > '9');
while ('0' <= c && c <= '9') {
res = res * 10 + c - '0';
c = getchar();
}
return res;
}
const int maxn = 505, size = 2 * maxn, S = 0;
int T... | ALGO | 0.999901 | 3.258624 | {
"github_metadata": {
"branch": "master",
"commit_count": 288,
"repo_created_at": "2018-07-11T09:33:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 57,
"forks": 14,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "37c6e2... |
8ee91d64-9b1f-4693-a512-4773a5d75793 | CanoeByGuitar/GamePhysicsEngine | src/Geometry/TetBoolean.h | //
// Created by 王晨辉 on 2023/7/28.
//
#ifndef GAMEPHYSICSINONEWEEKEND_TETBOOLEAN_H
#define GAMEPHYSICSINONEWEEKEND_TETBOOLEAN_H
#include "TetrahedronMesh.h"
#include <poly2tri.h>
#include <utility>
#include <Base/DataStructure.h>
namespace SimpleComplex {
struct BooleanTet {
TetrahedronMesh* m_tetMesh;
std::ve... | ALGO | 0.937658 | 5.983492 | {
"github_metadata": {
"branch": "main",
"commit_count": 49,
"repo_created_at": "2023-05-23T07:15: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": "d6d97824e18... |
6a4c7f58-663a-4de8-baec-bd2a617aa562 | itdar/algorithm_problems | src/main/java/cpp_algorithms/Problems_0884_UncommonWordsFromTwoSentences.cpp | #include <vector>
#include <iostream>
#include <string>
using namespace std;
// Process
//1. Input two strings
//2. Make stringVectors separating each strings' space
//3. Iterate each vectors
// 3.1. Check if word is uncommon word or not
//4. Return uncommonWords
class Solution {
public:
vector<string> uncommonFrom... | ALGO | 0.999201 | 5.357794 | {
"github_metadata": {
"branch": "main",
"commit_count": 351,
"repo_created_at": "2021-01-09T09:13:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "823fd3d2c4... |
ae8b3e5e-728d-4653-8f63-2fbcb5e49a55 | kzvd4729/Problem-Solving | codeforces/J - Spelling Check/Accepted.cpp | /****************************************************************************************
* @author: kzvd4729 created: Aug/24/2017 00:47
* solution_verdict: Accepted language: GNU C++14
* run... | ALGO | 0.999994 | 3.857144 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2022-02-01T09:12:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0cfda26969a... |
1aba58af-db69-43d6-81a4-a68d67327366 | arangodb/arangodb | 3rdParty/boost/1.78.0/libs/graph/example/boykov_kolmogorov-eg.cpp | // Copyright (c) 2006, <NAME>
//
// This code may be used under either of the following two licences:
//
// Permission is hereby granted, free of charge, to any person
// obtaining a copy of this software and associated documentation
// files (the "Software"), to deal in the Software without
// restrictio... | ALGO | 0.996523 | 5.208961 | {
"github_metadata": {
"branch": "devel",
"commit_count": 51986,
"repo_created_at": "2011-10-26T06:42:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13878,
"forks": 857,
"issues": 743,
"pull_requests": 38
},
"file_meta": {
"content_id": ... |
a7204c5b-44c6-4dd3-bfb8-c736b13c166d | soedinglab/MMseqs2 | lib/alp/njn_localmaxstat.hpp | #ifndef INCLUDED_NJN_LOCALMAXSTAT
#define INCLUDED_NJN_LOCALMAXSTAT
/* $Id: $
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information
*
* This software/database is a "United States G... | ALGO | 0.996952 | 4.649911 | {
"github_metadata": {
"branch": "master",
"commit_count": 6592,
"repo_created_at": "2016-07-20T06:17:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1732,
"forks": 234,
"issues": 448,
"pull_requests": 15
},
"file_meta": {
"content_id": "... |
69cc2505-6ffd-489a-8743-ccfe4a9cf621 | hhhhaura/competitive-programming | TOI_sim/pA.cpp | #define wiwihorz
#include <bits/stdc++.h>
#define rep(i, a, b) for(int i = a; i <= b; i++)
#define rrep(i, a, b) for(int i = b; i >= a; i--)
#define ceil(a, b) ((a + b - 1) / (b))
#define all(x) x.begin(), x.end()
#define int long long int
#define lld long double
#define pii pair<int, int>
#define random mt19937 rnd(ch... | ALGO | 0.999991 | 4.408024 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-06-13T13:34: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": "67b4fd389ccb... |
5eee967c-ec3b-4c82-86e4-4e62c3b19b9b | PedroDariva36/Desktop | Contests/958/d/a.cpp | #include <bits/stdc++.h>
#include <queue>
#include <vector>
#define ll long long
#define ull unsigned long long
#define endl '\n'
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
using namespace std;
int main (int argc, char *argv[]){
cin.tie(0)->sync_with_stdi... | ALGO | 0.999883 | 3.731123 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-03-30T23:55: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": "d41ed11cc3d... |
1ff4a1b2-0dc8-40bd-aea0-e810a6f4ac15 | dxtvzw/Templates | Number Theory/NTT Large.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
/*
* TESTED ON: https://judge.yosupo.jp/problem/convolution_mod_large
* 130 ms on one multiplication with n = m = 5e5
* 4400ms on one multiplication with n = m = 1.7e7
*
* TESTED ON: https://official.contest.yandex.com/ptz-winter-2024/contest/5... | ALGO | 0.999984 | 4.815787 | {
"github_metadata": {
"branch": "master",
"commit_count": 171,
"repo_created_at": "2020-06-29T07:57:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "486387fc... |
e6226e47-c189-4abf-aed7-9bb231e5654a | HMBL98/Competitive-Programming-Problems | Graphs/SCC/trustGroup.cpp | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
vector<vi> grafo;
vi low,num,visitado,s;
map<string,int> mapper;
int res,counter;
void dfs(int u){
low[u] = num[u] = counter++;
s.push_back(u);
visitado[u] = 1;
for(int i = 0; i < grafo[u].size(); i++){
if(num[grafo[u][i]] == -1) dfs(grafo[u... | ALGO | 0.999659 | 4.047889 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-07-18T19:07:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "39249103f1... |
bccba18a-e7a4-417d-a6a7-7989f8c74cc4 | zukahai/algotithm-training | number_square/random_test_case/random_test_case.cpp | #include <bits/stdc++.h>
using namespace std;
string toString(int n)
{
string ans = "";
while (n > 0)
{
ans = char(n % 10 + '0') + ans;
n /= 10;
}
if (ans.length() == 1)
{
ans = "0" + ans;
}
return ans;
}
long long solve(long long n)
{
long long mod = 10000... | ALGO | 0.999774 | 4.185565 | {
"github_metadata": {
"branch": "main",
"commit_count": 351,
"repo_created_at": "2023-03-23T11:02:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3a99b1cde9... |
9408da7e-7365-47aa-bbab-ada07f16b1ad | Hunter47dj/DSA-PRACTICE | Difficulty: Medium/Tree Boundary Traversal/tree-boundary-traversal.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
#define MAX_HEIGHT 100000
// Tree Node
struct Node
{
int data;
Node* left;
Node* right;
};
// Utility function to create a new Tree Node
Node* newNode(int val)
{
Node* temp = new Node;
temp->data = val;
temp->left = NULL;
... | ALGO | 0.999805 | 5.707833 | {
"github_metadata": {
"branch": "main",
"commit_count": 913,
"repo_created_at": "2024-01-28T19:35: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": "4c5613e3d4... |
4f959758-fc91-463d-b38d-1649737ebdfc | dicengine/dice | src/global/DICe_Global.h | // @HEADER
// ************************************************************************
//
// Digital Image Correlation Engine (DICe)
// Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. ... | ALGO | 0.925277 | 4.642498 | {
"github_metadata": {
"branch": "master",
"commit_count": 1095,
"repo_created_at": "2015-11-17T02:05:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 382,
"forks": 130,
"issues": 181,
"pull_requests": 0
},
"file_meta": {
"content_id": "6... |
b6da87c5-b7fa-47a3-a1b2-b43980bbea4d | leetmdgus/problem-solving | C++/BOJ/플래티넘/플래티넘5/Ex1050/main.cpp | #include <iostream>
#include <math.h>
using namespace std;
int dp[752][752][2];
int arr[752][752];
int R, C;
int solve(int a, int b) {
int minV = min(dp[a][b][0], dp[a][b][1]);
if(minV == 0) return 0;
for(int i = minV; i>=0; i--) {
if(a+i > R || b-i <=0 || b+i > C) continue;
if(dp[a... | ALGO | 0.999842 | 4.227346 | {
"github_metadata": {
"branch": "master",
"commit_count": 91,
"repo_created_at": "2022-04-04T15:25: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": "079cfa374... |
7489ebaf-1051-4e25-8911-c5334d3cdb03 | blackpc/ai-homework2 | include/ai-homework2/MinMaxSearch.h | /**
* Filename: MinMaxSearch.h
* Author: <NAME>
* Date: Dec 12, 2014
*
* The MIT License (MIT)
*
* Copyright (c) 2014
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software withou... | ALGO | 0.999604 | 4.955194 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2014-12-12T16:40: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": "13ce2e3fa... |
9e26f827-fec2-4f8d-b251-85b3840b6d06 | tanzeyl/DAA | Week4/mergeSort.cpp | #include <iostream>
using namespace std;
void quickSort(int [], int, int);
int comp = 0, swaps = 0;
int main()
{
int i, t, n; cin >> t;
while (t--)
{
cin >> n; int a[n];
for (i=0; i<n; i++) cin >> a[i];
quickSort(a, 0, n);
for (i=0; i<n; i++) cout << a[i] << " ";
co... | ALGO | 0.999751 | 4.243842 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-03-04T13:26:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "388e74878e86... |
1a7c300f-1ce7-41b4-90c9-df11ca0410e3 | bqi343/cp-notebook | Contests/USACO Solutions/2019-20/Dec/Silver/meetings.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<pair<int,int>> vpi;
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define F0R(i,a) FOR(i,0,a)
#define ROF(i,a,b) for (int i = (b)-1; i >= (a); --i)
#define R0F(i,a) ROF(i,0,a)
#define trav(a,x) for (auto... | ALGO | 0.999978 | 4.054091 | {
"github_metadata": {
"branch": "master",
"commit_count": 1350,
"repo_created_at": "2017-07-11T03:52:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2642,
"forks": 429,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f... |
610a84ad-b1c5-4029-b92f-331ed1d9e4d8 | Marze000/cplusplus | maze_0725_c++算法/maze_0725_c++算法/test.cpp | #if 1
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <stdlib.h>
#include <algorithm>
#include <cstdio>
using namespace std;
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n = 20;
int m = 20;
vector<vector<char>>v(m, vector<char>(n, '.'));
for (int i = 0... | ALGO | 0.999839 | 3.380452 | {
"github_metadata": {
"branch": "master",
"commit_count": 314,
"repo_created_at": "2019-01-24T02:00:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3551112e... |
4ba0870f-94ed-4502-9aa3-fbc25dda6cd2 | heymesut/SJTU_microe | hls/conv1x1.h |
#pragma once
#include <ap_int.h>
#include <hls_stream.h>
#include "PE_array.h"
using namespace hls;
using namespace std;
/**
* CONV1x1
* just a PE array
* In0, In1: IN_CH_PARA * IN_BIT
* Out0, Out1: OUT_CH_PARA * M_BIT
*/
template <
unsigned IN_ROW,
unsigned IN_COL,
unsigned IN_CH,
unsigned... | ALGO | 0.990739 | 3.854496 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-03-01T11:05:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 28,
"forks": 3,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "da02836fb05... |
99b14d4f-cb00-40ae-aec0-afaf27baa00a | ajfg93/algorithm4th-archive | exercises/1.3.4.cpp | /*
计算括号是否匹配
不匹配:[][, ([})
匹配:([{}])
*/
#include <iostream>
#include <string>
#include <exception>
#include <vector>
#include <sstream>
#include "resizing_array_stack.h"
using namespace ythlearn;
using namespace std;
int main(){
Stack<char> p;
char c;
vector<char> cvec;
while(1){
co... | ALGO | 0.989085 | 5.137537 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-11-24T13:32: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": "35a576b5d7... |
f4c80251-303c-4f2d-8228-8ad5967a470d | andyyang200/CP | Competitive Programming/15-295/Fall 2017/15-295 Fall 2017 3/Painting/painting.cpp | //<NAME>
#include <iostream>
#include <stdio.h>
#include <sstream>
#include <fstream>
#include <string>
#include <string.h>
#include <vector>
#include <deque>
#include <queue>
#include <stack>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <functional>
#inc... | ALGO | 0.999844 | 3.685452 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-10-24T22:41: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": "c4f9bec0d3... |
6b4c88ec-80f7-4b29-825e-cda488e344d6 | pranjalyadav451/place | April/16April2022/C__Kill_the_Monster.cpp | /*
https://codeforces.com/problemset/problem/1633/C
Time Limit: 2000
Memory Limit: 256
Sat Apr 16 2022 13:38:45 GMT+0530 (India Standard Time)
*/
#include <bits/stdc++.h>
using namespace std;
int fastio() { ios_base::sync_with_stdio(false); cout << fixed << setprecision(10); cin.tie(nullptr); return 0; } int __fastio =... | ALGO | 0.999635 | 3.721512 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2022-06-05T08:50: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": "4bf7480d2... |
f9155617-7b79-4829-afa0-5352cbc79e50 | ysxGitHub/Cplusplus | DataStructure/堆栈队列/基本计算器III.cpp | /*
s 由整数和算符 ('(', ')', '+', '-', '*', '/') 组成,中间由一些空格隔开
*/
#include<bits/stdc++.h>
using namespace std;
int helper(string& s, int& index) {
int n = s.size();
vector<int>res;
char sign = '+';
int num = 0;
for(index; index<n; index++){
char c = s[index];
if(isdigit(c)){
n... | ALGO | 0.999943 | 4.094772 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2022-05-05T13:31:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5e8b81da5f... |
57c5ad93-5538-4035-a89c-87da2b7d8e87 | cmuparlay/pbbsbench | benchmarks/ANN/utils/clusterPynn.h | // This code is part of the Problem Based Benchmark Suite (PBBS)
// Copyright (c) 2011 <NAME> and the PBBS team
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, incl... | ALGO | 0.998569 | 5.573959 | {
"github_metadata": {
"branch": "master",
"commit_count": 753,
"repo_created_at": "2019-01-22T14:12:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 95,
"forks": 37,
"issues": 2,
"pull_requests": 4
},
"file_meta": {
"content_id": "bf60848... |
58d4ea58-b5b6-4e9a-b8cf-0b159adf6c52 | ps-kostikov/puzzles | codejam/2011/all/qualification/C/C.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using std::cout;
using std::cerr;
using std::cin;
using std::endl;
using std::vector;
using std::string;
int sum (int x, int y) {
int s = 0;
for (int i = 0; i < 23; ++i) {
int r = 1 << i;
int x1 = x & r;
int ... | ALGO | 0.99989 | 4.180469 | {
"github_metadata": {
"branch": "master",
"commit_count": 96,
"repo_created_at": "2015-11-29T15:21: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": "109db2395... |
4dbf0587-523f-4364-a13a-ce991faeeea0 | japsingh/NN-basics-CPP | Framework/Framework/Framework/NN.h | #pragma once
#include "MatrixOps.h"
class Layer {
public:
Layer(size_t prev_layer_node_count, size_t cur_layer_node_count)
: node_count(cur_layer_node_count),
w(RandomFloatMatrix2d({ prev_layer_node_count, cur_layer_node_count }, 0., 1.)),
b(RandomFloatMatrix2d({1, cur_layer_node_count }, 0., 1.)),
a({... | ALGO | 0.998316 | 5.754253 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-01-15T06:39:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2a54e3611de4... |
376a87b9-5b81-4e2e-bc7a-d89125dfae80 | xoyojank/nebula3 | code/extlibs/OGDF/ogdf/basic/CombinatorialEmbedding.h | /*
* $Revision: 2523 $
*
* last checkin:
* $Author: gutwenger $
* $Date: 2012-07-02 20:59:27 +0200 (Mon, 02 Jul 2012) $
***************************************************************/
/** \file
* \brief Declaration of CombinatorialEmbedding and face.
*
* Enriches graph by the notion of faces
*
* \autho... | ALGO | 0.992404 | 6.752411 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2012-11-23T19:29:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 62,
"forks": 38,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "95290a1c... |
27fa5e1f-7bb2-4fab-ad3b-8987bb3ad76d | ktakanopy/Competitive-Programming | URI/1210/code.cpp | /*
4 2 6 100
30 50 65 80 100 120
60 50 40 30 20 10
R: 260, 1 3
1o ano: venda(100) + custo(30) + venda(50)
2o ano: custo(50)
3o ano: venda(100) + custo(30) + venda(50)
4o ano: custo(50)
i - periodo atual de produção
j - idade da máquina atual
CUSTOMINIMO_ij =
{
0, SE i == 0 ou j == 0,
-V[j-1] + C[0] + P + CUST... | ALGO | 0.99991 | 3.259489 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2016-08-28T04:18: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": "b9ec854e5... |
0b2ad429-a0d4-4ff3-98ae-d29cb6569a90 | mCRL2org/mCRL2 | tools/release/ltsview/rtree.cpp | // Author(s): <NAME>
// Copyright: see the accompanying file COPYING or copy at
// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include <algorithm>
#i... | ALGO | 0.999798 | 6.600282 | {
"github_metadata": {
"branch": "master",
"commit_count": 20251,
"repo_created_at": "2018-04-07T15:35:53.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 99,
"forks": 44,
"issues": 60,
"pull_requests": 5
},
"file_meta": {
"content_id": "bec1... |
2f26a7e1-100e-42bf-921d-66935d1b5643 | ishandutta2007/codeforces-e | ei133333/normal/1607/H.cpp | #include <bits/stdc++.h>
using namespace std;
using int64 = long long;
// const int mod = 1e9 + 7;
//const int mod = 998244353;
const int64 infll = (1LL << 62) - 1;
const int inf = (1 << 30) - 1;
struct IoSetup {
IoSetup() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(... | ALGO | 0.999895 | 4.17328 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:34:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f2b4e2ef510... |
e06d7880-9bcb-48cc-9acb-828b2334deb8 | joseCarlosAndrade/dev-jc | cpp/algavancado/runcodes/novasamizades/myfriends.cpp | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vii;
class Grafo {
public:
vii pais; // vetor de pais
vii tamanho; // vetor de tamanhos dos conjuntos
int maior_conjunto;
// construtor para inicializar o grafo com 'n' nós
Grafo(int n) {
... | ALGO | 0.999854 | 4.369054 | {
"github_metadata": {
"branch": "main",
"commit_count": 91,
"repo_created_at": "2023-04-05T20:30: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": "6abbb7fe1ac... |
87560981-7c1c-4c5c-8cd9-d93f9b661799 | imajeet5/DSA-CPP | geekforgeeks/MDCIQ/dynamicProgramming/longest-common-subsequence.cpp | // { Driver Code Starts
#include <bits/stdc++.h>
const int mod = 1e9 + 7;
using namespace std;
// } Driver Code Ends
// function to find longest common subsequence
class Solution
{
public:
int lcs(int x, int y, string s1, string s2)
{
// create a dp with all element initialized to 0
vector<vec... | ALGO | 0.999995 | 5.784018 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2020-08-22T06:19: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": "54c406ba3... |
898b92e2-aa1c-43ae-a4eb-ea0e4447a17c | DungNguyenCoder/SPOJ_PTIT | CPPLAN03.cpp | #include <bits/stdc++.h>
#define faster() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
using namespace std;
typedef long long ll;
#define mx 1000000
#define mod 1000000007
#define TEST 1
string tich(string s1, string s2)
{
int len1 = s1.size();
int len2 = s2.size();
int len = len1 + len2;
vect... | ALGO | 0.999966 | 4.907338 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2024-08-14T02:57: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": "b360fe84d3... |
0aa2e9ae-5802-46df-9f95-b4dfa2236ddb | wise-toddler/emptyqwerty | Codeforces/edu/D_Number_of_Different_on_Segment.cpp | // https://codeforces.com/edu/course/2/lesson/4/4/practice/contest/274684/problem/D
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define endl '\n'
#define nl cout << endl;
#define IOS ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
#define v vector
#defi... | ALGO | 0.999926 | 4.562074 | {
"github_metadata": {
"branch": "main",
"commit_count": 129,
"repo_created_at": "2023-08-07T21:05: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": "8f3f30e435... |
2b2340ed-e448-4619-ba33-e1cd3ce8bda0 | masnm/compro | Ajudge/37/d.cpp | #include "bits/stdc++.h"
using namespace std;
#define sim template < class c
#define ris return * this
#define dor > debug & operator <<
#define eni(x) sim > typename \
enable_if<sizeof dud<c>(0) x 1, debug&>::type operator<<(c i) {
sim > struct rge { c b, e; };
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
... | ALGO | 0.999954 | 3.497714 | {
"github_metadata": {
"branch": "master",
"commit_count": 86,
"repo_created_at": "2020-10-23T21:12: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": "0471b0c65... |
379c03f6-eb85-4e6e-9c93-dd67837819f3 | GIBIS-UNIFESP/BIAL | bial/src/GeoSumPathFunction.cpp | /* Biomedical Image Analysis Library
* See README file in the root instalation directory for more information.
*/
/**
* @date 2012/Sep/19
* @brief Geodesic restriction sum path function to compute the initial path-values and propagated path-values in IFT
* algorithm. This function is used to compute predec... | ALGO | 0.999713 | 5.27598 | {
"github_metadata": {
"branch": "master",
"commit_count": 186,
"repo_created_at": "2016-10-03T02:55:05.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10,
"forks": 4,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "eebeba12... |
fa154356-d9c3-4906-b720-80ea5a71ce21 | reachanihere/Data-Structures-and-Algorithms | Hashing/Longest Consecutive Subsequence.cpp | /*
You are given with an array of integers that contain numbers in random order. Write a program to find the longest possible sub sequence of consecutive numbers using the numbers from given array.
You need to return the output array which contains consecutive elements. Order of elements in the output is not important.... | ALGO | 0.99998 | 4.932741 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2019-10-05T17:27:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 146,
"forks": 113,
"issues": 2,
"pull_requests": 11
},
"file_meta": {
"content_id": "b6f3... |
276a3d8d-9d44-4686-a20c-d9cec7368bc9 | vrsys/mser-tracking | Clustering/mserclustering.hpp | #ifndef MSERCLUSTERING_H
#define MSERCLUSTERING_H
#include <iostream>
#include <vector>
#include <memory>
#include <utility>
#include <opencv2/opencv.hpp>
#include "Processing/ImageProcessing/MSER/mser.hpp"
#include "blob.hpp"
#include "handmodel.hpp"
struct MSERCluster {
MSERCluster()
:mTopLeft(0,0), ... | ALGO | 0.979075 | 5.595204 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-10-27T07:39:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aa70d28f887... |
eab21149-64af-495e-a885-95acc000527c | mike919192/advent2024 | day17/day17.cpp |
#include <fstream>
#include <string>
#include <sstream>
#include <vector>
#include <tuple>
#include <iostream>
#include <ranges>
#include <cmath>
using int_row_t = std::vector<long>;
using int_rows_t = std::vector<int_row_t>;
std::tuple<int_row_t, int_row_t> read_file()
{
std::ifstream infile("input.txt");
i... | ALGO | 0.999299 | 4.770068 | {
"github_metadata": {
"branch": "main",
"commit_count": 109,
"repo_created_at": "2024-12-02T20:02: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": "b4ba499924... |
41d8b9ca-9a2e-43a6-a4e8-169aabbed911 | kss418/templete | Segtree.cpp | #include <bits/stdc++.h>
#define fastio cin.tie(0), cout.tie(0), ios::sync_with_stdio(0);
#define all(x) (x).begin(), (x).end()
#define x first
#define y second
using namespace std; typedef long long ll;
using ld = long double;
using ull = unsigned long long;
using pll = pair<ll, ll>; using tll = tuple<ll, ll, ll>;
ll... | ALGO | 0.999769 | 3.292713 | {
"github_metadata": {
"branch": "master",
"commit_count": 160,
"repo_created_at": "2024-09-16T11:15: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": "ba77860c... |
4e7d5768-fec0-434d-b3c1-b49f8b7f3c5b | Yawn-Sean/Daily_CF_Problems | daily_problems/2025/02/0208/personal_submission/cf1452d_wangjc.cpp | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int mod = 998244353;
int powmod(int x, int y) {
int res = 1;
while (y) {
if (y & 1) res = x * res % mod;
x = x * x % mod;
y >>= 1;
}
return res;
}
void solve(){
int n;
cin >> n;
vector<int> dp(... | ALGO | 0.999995 | 5.017669 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "adaa... |
d6edac02-01fa-48be-99a5-9c1fdb89455a | NikitaTurbo/ArtGallery | src/components/interface/mpolygon.cpp | #include "boost/geometry/algorithms/detail/intersection/interface.hpp"
#include <cmath>
#include <string>
#include <vector>
#include <istream>
#include <ostream>
#include <iostream>
#include <boost/geometry.hpp>
#include <AGP/components/interface/edge.h>
#include <AGP/components/interface/point.h>
#include <AGP/compo... | ALGO | 0.996139 | 5.206805 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2024-06-10T16:28: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": "f9c0d33bc69... |
cb3d2607-394f-47f1-a97a-7a9233e8f25e | Charllemagne/Projekt4_193171 | Projekt4_193171/src/main.cpp |
#include "funkcje.hpp"
HWND hwndButton;
HWND hwndButton2;
HWND hwndButton3;
HWND hwndButton4;
HWND hwndButton5;
HWND hwndButton6;
HWND hwndButton7;
HWND hwndButton8;
HWND hwndButton9;
HWND hwndButton10;
HWND hwndButton11;
HWND hwndButton12;
HWND hwndButton13;
HWND hwndButton14;
HWND hwndButton15;
HWND hwndButton16;
b... | TOOL | 0.955701 | 4.483305 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-06-26T18:15: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": "b89bcc89ac75... |
f9e2c425-0127-4a97-b9b1-1e3b6cc44859 | sbt4104/Coding-Questions | connect_all_level_siblings.cpp | /*
Given a binary tree, connect each node with its level order successor. The last node of each level should point to a null node.
*/
#include<bits/stdc++.h>
using namespace std;
class TreeNode{
public:
int data;
TreeNode *left, *right, *next;
TreeNode(int data) {
this->data=data;
left=... | ALGO | 0.99995 | 4.691253 | {
"github_metadata": {
"branch": "main",
"commit_count": 175,
"repo_created_at": "2022-05-19T14:11: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": "6ac966bb1e... |
a90f9b86-aa3d-4343-9655-75394a223d28 | GrainRainy/Code-Repositories | [Top] Storage/Exercises/CF479A-Searching Local Minimum.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n;
int nums[N];
int get(int idx)
{
if (nums[idx]) return nums[idx];
cout << "? " << idx << endl; cout.flush();
int tmp;
cin >> tmp;
nums[idx] = tmp;
return tmp;
}
int main()
{
cin >> n;
nums[0] =nums[n + 1] = INT_MAX;
int l = 1, r =... | ALGO | 0.999901 | 3.139355 | {
"github_metadata": {
"branch": "main",
"commit_count": 179,
"repo_created_at": "2023-07-13T12:33: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": "665bb24923... |
d38cf603-217e-4492-aaef-d76256cbbfa9 | scipele/cpp | misc/sort/merge_sort/merge_sort.cpp | // filename: merge_sort.cpp
//
// Purpose: Implementation of merge sort alogorithm for random generated integers
//
// Dependencies: Header Files Class Name
// Timer.hpp TimerCls
//
// By: T.Sciple, 9/8/2024
#include <iostream>
#include <vector>
#include <random>
#i... | ALGO | 0.999851 | 6.240103 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2024-06-03T02:21:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "708c461934f... |
f6e80a17-d562-4b92-8941-24777b33618e | lichao3140/OpenCV_CarPlate | app/src/main/cpp/CarSobelPlateLocation.cpp | //
// CarSobelPlateLocation.cpp
// CarPlateRecognize
//
// Created by liuxiang on 2017/7/28.
// Copyright © 2017年 liuxiang. All rights reserved.
//
#include "common.h"
CarSobelPlateLocation::CarSobelPlateLocation(){
}
CarSobelPlateLocation::~CarSobelPlateLocation(){
}
//出来的效果和和pc上不一样。。。。。。
void CarSo... | ALGO | 0.975783 | 4.411455 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2018-05-25T15:02:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 25,
"forks": 16,
"issues": 5,
"pull_requests": 0
},
"file_meta": {
"content_id": "dcf13a03... |
d31b5e5d-381d-4323-861c-b6f9260c6ca0 | thirofoo/atcoder-archives | abc095/arc096_a_43574372_AC.cpp | /*
* Author: through
* Submission URL: https://atcoder.jp/contests/abc095/submissions/43574372
* Submitted at: 2023-07-15 15:55:12
* Problem URL: https://atcoder.jp/contests/abc095/tasks/arc096_a
* Result: AC
* Execution Time: 8 ms
*/
#include <bits/stdc++.h>
using namespace std;
#if __has_include(<atcoder/all>... | ALGO | 0.998866 | 3.683734 | {
"github_metadata": {
"branch": "main",
"commit_count": 5513,
"repo_created_at": "2022-12-17T09:45:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "1fff9ec64... |
0462d88a-8de2-4f26-8c66-37e1a4ee63bd | researchmm/tasn | tasn-mxnet/src/operator/nn/activation.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 ... | ALGO | 0.944344 | 6.422212 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2019-03-29T02:02:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 218,
"forks": 39,
"issues": 16,
"pull_requests": 6
},
"file_meta": {
"content_id": "d1e293... |
2a96af9c-fb6c-41c8-988b-58fd36a6ad67 | ammar-q/raytracer | scene_object.cpp | /***********************************************************
Starter code for Assignment 3
This code was originally written by <NAME> for
CSC418, SPRING 2005
implements scene_object.h
***********************************************************/
#include <cmath>
#include <iostream>
#include "scene_... | TEST | 0.946815 | 5.339538 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-01-22T18:26:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1e145b2394... |
d04319ba-5291-4a9f-b1b8-0ed0d8b567d9 | Atsu30/ProgramingContest | ABC/128B.cpp | #include <bits/stdc++.h>
using namespace std;
struct Res {
int num;
string S;
int P;
// 演算子オーバーロードで比較関数を定義
bool operator<(const Res& another) const {
if (S != another.S)
return S < another.S; // 高い順に並べたいので演算子を逆に
if (P != another.P)
return P > another.P; // 同様に比較演算子を... | ALGO | 0.999916 | 3.92175 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2019-04-22T04:45: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": "1da5cbfff... |
fb62ef01-909e-4977-a112-f8b29d57f626 | fricai/competitive-programming | codeforces/1200/E.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, a, b) for (auto i = (a); i < (b); ++i)
#define per(i, a, b) for (auto i = (b); i-- > (a); )
#define eb(x...) emplace_back(x)
#define all(x) begin(x), end(x)
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x)... | ALGO | 0.999988 | 4.058707 | {
"github_metadata": {
"branch": "master",
"commit_count": 2301,
"repo_created_at": "2021-09-29T18:57:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "146827c... |
cb234723-fc7d-441d-9cd4-7a1f6d283a9f | Mike-McGivern/C_and_C_plus_plus | ConsoleApplication1/methodsStrPRT.cpp | #include <iostream>
//#include <string>
#include <algorithm>
#include <cctype>
using namespace std;
void Sort(char& str) {
sort(str.begin(), str.end());
}
void getInput(char* arr[3]) {
/*
*/
char[] line;
for (int i = 0; i < 3; i++) {
cout << "Enter line " << i + 1 << ": ";
getline... | ALGO | 0.997112 | 3.478577 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-05-16T03:21:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "912a60f50176... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.