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 |
|---|---|---|---|---|---|---|---|
bad2beec-2d2c-43c1-bca0-ef096995c234 | Chiki1601/Hackerearth-Solutions | Basic Programming/Basics of Implementation/Fashion Line.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
int t;
cin >> t;
while(t--)
{
int n, k, l, r;
cin >> n >> k >> l >> r;
string str, special;
cin >> str >> special;
int check[257] = {0};
... | ALGO | 0.999815 | 3.410341 | {
"github_metadata": {
"branch": "main",
"commit_count": 1808,
"repo_created_at": "2022-09-09T09:13:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 2,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "6a8e9e52... |
90ccd8ae-2ec2-4f07-abd1-b559ef39a7f3 | Werewolflsp/LeetCode | construct_binary_tree_from_inorder_and_postorder_traversal.cpp | /******************************************
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
*******************************************/
#include <cstring>
#include <vector>
using namespace std;
struct TreeNode {
int val... | ALGO | 0.999953 | 6.060645 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2014-08-15T01:42: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": "8d29aacde... |
3a257d01-0b83-4e3e-93ce-ac7f8755c08a | Sayed-Nahid/Problem_Solving | CodeForces/Contest/OnlineContest/r929d3/c.cpp | /*
Name: <NAME>
CodeForces: Y0urFriend
email: <EMAIL>
Daffodil International University
*/
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
typedef vector<ll> vll;
typedef vector<int> vi... | ALGO | 0.999743 | 4.040169 | {
"github_metadata": {
"branch": "main",
"commit_count": 31,
"repo_created_at": "2023-12-21T15:02:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d75b6e691ac... |
544ac513-cf55-4cc1-9d19-1b88bd4de3a9 | not-solved/CodeStudy | [ SWEA ]/난이도/D2/SWEA_D2_catchTheFly.cpp | #include <iostream>
using namespace std;
int fly[15][15];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int loop;
cin >> loop;
for (int a = 1; a <= loop; a++) {
int n, m;
cin >> n >> m;
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
cin >> fly[i][j];
int sum =... | ALGO | 0.999862 | 3.527083 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2021-01-04T04:26: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": "802433953... |
afce35a0-ec24-4bb8-b19a-97d75c62d6ea | ualiurrahat/complete-data-structure-and-algorithms-using-cpp | 09_OOP/29_multipleInheritance.cpp | /*
multiple inheritance: one derived class is inherited from many base classes.
here, we are creating class TA by inheriting Student and Teacher class.
*/
#include <iostream>
using namespace std;
class Teacher
{
public:
string name;
string age;
void print()
{
cout << "Teacher: " << endl;
... | TOOL | 0.933326 | 6.000639 | {
"github_metadata": {
"branch": "main",
"commit_count": 245,
"repo_created_at": "2023-03-03T14:30:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b82f17722e... |
69fe3cdd-4055-4a3b-973d-b59b359761b2 | raghavgoenka/Competitive-Coding | CodeForces/yetanothercarddeck.cpp | //https://codeforces.com/contest/1511/problem/C
#include <bits/stdc++.h>
#define flash ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)
#define pb push_back
#define pf push_front
#define eb emplace_back
#define ff first
#define ss second
#define endl "\n"
#define EPS 1e-9
#define all(x) (x).begin(), (x).e... | ALGO | 0.999923 | 4.05595 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2021-01-14T17:55:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "14cdc4859... |
650bb30a-2301-49c9-9b18-60379f468e00 | 0xazmi/q | shell sort soal.cpp | #include <iostream>
using namespace std;
int main() {
int arr[] = {12, 34, 54, 2, 3};
int n = sizeof(arr) / sizeof(arr[0]);
cout << "Array awal: ";
for (int i = 0; i < n; i++) {
cout << arr[i] << " ";
}
cout << endl;
int gap = n / 2;
while (gap > 0) {
for (int i = gap; i < n; i++) {
in... | ALGO | 0.999989 | 5.14029 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-01-31T13:24:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c782709b8a8e... |
4e14de2d-1138-4f5c-a06a-9c909bc56e6f | homa1024/ProCon | algorithms/BinaryIndexedTree.cpp | // Binary Indexed Tree
// 参考
// 保坂 和宏, Binary Indexed Tree のはなし, http://hos.ac/slides/20140319_bit.pdf
#include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
#include <array>
#include <cmath>
#include <limits>
using namespace std;
const int MAX_NODES = 100000;
int nodes[MAX_... | ALGO | 0.99979 | 4.674381 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2016-09-26T05:24:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fbc983435... |
0de578c8-aa91-4303-aec9-407d391728e3 | ziminer/game-of-life | utils.cpp | #include <cassert>
#include <iostream>
#include <queue>
#include "utils.h"
using namespace std;
unsigned long
ApplyOffset(unsigned long target,
unsigned long offset,
bool neg) {
if (neg) {
if (offset > target) {
throw out_of_range("Offset causes overflow");
}
return targe... | ALGO | 0.997032 | 5.223009 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2014-05-17T00:22:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "8439c31d4... |
641389fd-7aff-4638-a83e-c2af8ad4c367 | RobertDeBiro/Cpp_Programs | Cpp_syntax_and_practice/15.Functions_and_Lambdas/Lambdas/Usage_in_stl_algorithm.cpp | #include <iostream>
#include <array>
#include <algorithm> // std::max_element
struct Student
{
std::string name{};
int points{};
};
int main()
{
std::cout << "*****************************************************\n";
std::array<Student, 8> stArr{
{
{ "Albert", 3 },
... | ALGO | 0.995774 | 5.842181 | {
"github_metadata": {
"branch": "master",
"commit_count": 137,
"repo_created_at": "2022-08-26T13:51: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": "51b1b372... |
d7d5a1ca-4039-485c-8a5d-9b8a27b0cbfb | v8/v8 | src/compiler/turboshaft/required-optimization-reducer.h | // Copyright 2022 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef V8_COMPILER_TURBOSHAFT_REQUIRED_OPTIMIZATION_REDUCER_H_
#define V8_COMPILER_TURBOSHAFT_REQUIRED_OPTIMIZATION_REDUCER_H_
#include "src/compiler/... | ALGO | 0.92275 | 7.567802 | {
"github_metadata": {
"branch": "main",
"commit_count": 95989,
"repo_created_at": "2014-09-24T15:24:30.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 24276,
"forks": 4126,
"issues": 0,
"pull_requests": 18
},
"file_meta": {
"content_id": "9... |
802c8337-e6be-41d9-ad53-101e706b2467 | mcarmenjc/exercises_with_gtest | src/matrix.cpp | #include "../include/matrix.h"
#include <new>
#include <iostream>
Matrix::Matrix(int num_rows, int num_cols){
if (num_rows * num_cols > 0){
rows = num_rows;
columns = num_cols;
data = new (std::nothrow) int*[rows];
for (int i = 0; i < rows; i++){
data[i] = new (std::nothrow) int[columns];
}
}
}
Matrix:... | ALGO | 0.967561 | 4.395142 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2014-08-05T22:24: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": "567aaa358... |
ca2947a1-08fb-417f-93ba-d23c75681b15 | bwilfong3/VigenereProject | Vigenere.h | // Name: <NAME>
// File Name: Vigenere.h
// Due Date: 2/16/16
// Project Description:
/*
* This is simply a header file for the Vigenere class.
* The only things made public are a getter function
* to obtain the decrypted plaintext (so we can write
* it to a file but not modify it), the decryption function
* in ... | ALGO | 0.983625 | 3.916611 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-05-24T02:12:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b57ca162d9... |
d0524c6f-4e11-42fa-9252-1c7c60a09803 | openvinotoolkit/openvino | src/plugins/template/backend/ops/segment_max.cpp | // Copyright (C) 2018-2025 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
#include "openvino/reference/segment_max.hpp"
#include "element_visitor.hpp"
#include "evaluate_node.hpp"
#include "segment_max_shape_inference.hpp"
template <ov::element::Type_t ET_data, ov::element::Type_t ET_idx>
bool evaluate_... | ALGO | 0.937 | 7.522789 | {
"github_metadata": {
"branch": "master",
"commit_count": 19551,
"repo_created_at": "2018-10-15T10:54:40.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8597,
"forks": 2656,
"issues": 303,
"pull_requests": 258
},
"file_meta": {
"content_id"... |
59f3567d-3f68-4e0e-bac3-14e13f6f18d9 | Orca0917/Algorithm | BaekjoonOnlineJudge/3640.cpp | #include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
#define MAX 2002
using namespace std;
struct Edge {
int destination, cost, capacity, flow = 0;
Edge* rev; // 역방향 간선
// 생성자
Edge(int destination, int cost, int capacity):
destination(destination), cost(cost), capacity(ca... | ALGO | 0.999957 | 4.927269 | {
"github_metadata": {
"branch": "main",
"commit_count": 826,
"repo_created_at": "2021-12-01T08:06:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cca0237096... |
d7cd5541-0c21-442a-acce-b97d2be49714 | solo5star/test | baekjoon/9252.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <utility>
#include <algorithm>
#include <string>
#include <vector>
#include <math.h>
#include <queue>
#include <stack>
using namespace std;
int dp[1001][1001];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
string... | ALGO | 0.999991 | 4.469438 | {
"github_metadata": {
"branch": "main",
"commit_count": 649,
"repo_created_at": "2021-02-09T10:22: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": "b7e1fddf9f... |
283a879e-0632-4284-bc73-f963359a3dce | Kicamon/Note | Algorithm/代码源中级包代码/数论源代码/8/T1.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int pf[1010], t;
ll powmod(ll a,ll b,ll mod) {
ll res = 1; a%=mod;
for(;b;b>>=1) {
if(b&1)res=res*a%mod;
a=a*a%mod;
}
return res;
}
int main() {
int p, T;
scanf("%d%d", &p, &T);
int m = p - 1;
for (int... | ALGO | 0.999831 | 4.486682 | {
"github_metadata": {
"branch": "master",
"commit_count": 94,
"repo_created_at": "2022-11-17T12:40:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8bd0aa74e... |
b3f3872a-8c3b-4ee8-bb15-47916a26c472 | yuchenle/LC | 69_sqrt_e/0ms_answer_fromNet.cpp | #include <iostream>
using namespace std;
class Solution {
public:
int mySqrt(int x) {
if( x == 1){
return true ;
}
double s = 0;
double e = x;
int ans = 0;
while(s<e){
double mid = s+(e-s)/2;
// cout<<mid<<endl;
if(e - s < 1 ){
cout<<e<<"... | ALGO | 0.999899 | 3.63014 | {
"github_metadata": {
"branch": "main",
"commit_count": 131,
"repo_created_at": "2024-08-20T14:56:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0543ceb024... |
0ca90ebf-950d-427d-a7be-87c4a6fe7c7d | thenfour/Clarinoid | src/clarinoid/synth/MultiMixer.hpp |
#pragma once
#include "AudioBufferUtils.hpp"
namespace clarinoid
{
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
template <size_t NInputs>
struct MultiMixerNode : public AudioStream
{
MultiMixerNode() : AudioStream(NInput... | TOOL | 0.91472 | 6.401378 | {
"github_metadata": {
"branch": "master",
"commit_count": 362,
"repo_created_at": "2020-08-13T21:15:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 48,
"pull_requests": 0
},
"file_meta": {
"content_id": "52ccb0d... |
15ab4c06-efb1-4470-aa75-914785cfab6d | JiHyeok-Kim/SAF-AL | 220803 - FloodFill 응용/0803p1-BFS가중치.cpp | //BFS가중치 문제 사진1
/*
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
struct Node {
int num;
int price;
int lev;
};
vector<vector<Node>> alist(6);
queue<Node> q;
int used[10];
int main() {
alist[1] = { {2, 5}, {3, 3}, {4, 15} };
alist[2] = { {3, 7}, {4, 10} };
alist[3] = { {1, 1}, {4, ... | ALGO | 0.999545 | 3.920253 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2022-08-02T11: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": "f1c8c3ccc64... |
5d9d3fb4-e4e9-41ca-ab55-993cb151083d | Abhishek9503/DSA-Love-Babbar | DP/Day2/3.cpp | // minimum number of coins
// Rod of n length cut in size a, b , c the tast is to maximize the number of cuts
#include <iostream>
#include <vector>
using namespace std;
int minCoin(int target, vector<int> &arr)
{
if (target == 0)
return 0;
if (target < 0)
return INT_MAX;
int mini = I... | ALGO | 0.999809 | 4.686077 | {
"github_metadata": {
"branch": "main",
"commit_count": 231,
"repo_created_at": "2023-02-05T18:39:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d0c5153de... |
10df992b-c07d-4e98-8472-1e7c459131cd | UnnamedOrange/Contests | Source Code/李沿橙 2017-6-17/source/李沿橙/expand.cpp | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <set>
using std::cin;
using std::cout;
using std::endl;
inline int readIn()
{
int a=0;
scanf(... | ALGO | 0.999973 | 3.616653 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2017-11-28T07:28:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "43cc4cd75... |
b2381e90-fb78-4a09-b62c-372d30e1e12f | ishandutta2007/codeforces-t | tommyr7/normal/1442/E.cpp | #include <bits/stdc++.h>
using namespace std;
#define Maxn 400007
int T,n;
int col[Maxn],dd[Maxn],d[Maxn];
vector<int> r;
bool flag[Maxn];
int que[Maxn];
int last[Maxn],pre[Maxn],other[Maxn],cnt=0;
int ans;
void insert(int u,int v)
{
other[++cnt]=v,pre[cnt]=last[u],last[u]=cnt;
}
void solve(int x)
{
for (int i=... | ALGO | 0.999851 | 4.529629 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:27:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "702da49c429f... |
72086544-9956-4b39-a0a7-c4943716f196 | ProtonMail/therecipe_env_darwin_arm64_513 | 5.13.0/clang_64/lib/QtContacts.framework/Versions/0/Headers/qcontactfilter.h | /****************************************************************************
**
** Copyright (C) 2015 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtContacts module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL21$
** Commercial License Usage
** Licensees holding valid co... | TOOL | 0.919564 | 5.56886 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-07-07T06:40:15.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "72feca70763... |
036c953c-4eee-4d9c-80d3-a2be52acc54b | Procoder16/linkedList | merge2SortedLists.cpp | //Merge two sorted lists
#include<iostream>
using namespace std;
class node{
public:
int data;
node* next;
node(int val){
data = val;
next = NULL;
}
};
void insertAtTail(node* &head, int val){
node* n = new node(val);
if(head == NULL){
head = n;
return;
... | ALGO | 0.999881 | 5.675399 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2021-05-30T05:16: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": "49a4bd2fbb2... |
458c2c2f-a2da-4283-b378-ea5960ca5573 | itohdak/AtCoder | others/discovery2016_final/B.cpp | #include <bits/stdc++.h>
#include "/home/itohdak/AtCoder/000/print.hpp"
using namespace std;
#define ll long long
#define ld long double
#define REP(i,m,n) for(int i=(int)(m); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define RREP(i,m,n) for(int i=(int)(m); i>=(int)(n); i--)
#define rrep(i,n) RREP(i,n-1,0)
#define a... | ALGO | 0.999994 | 4.27345 | {
"github_metadata": {
"branch": "master",
"commit_count": 172,
"repo_created_at": "2018-05-20T09:26:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "f8eb2f91... |
f08eebb8-bc9a-4b63-8be1-7ff52b44ac4d | ajmarin/coding | euler/e029.cpp | #include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
bool unique[101];
void count_new_powers(int a, int *power){
bool rep = 1;
int mult, n = a, omult = -1;
for(int i = 2; ; ++i){
mult = 0;
if(i * i > a) break;
if(!(a % i)){
mult = 0;
do { a /= i; ++mult; } while(!(a % i));
if(omult ... | ALGO | 0.999628 | 4.035551 | {
"github_metadata": {
"branch": "master",
"commit_count": 1044,
"repo_created_at": "2011-08-06T20:03:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 43,
"forks": 17,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "51abe... |
ff8e5a8f-2c96-4d52-bc07-ad7998e935e5 | amxn18/DSA | GRAPHS/primS.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
typedef pair<int, int> p;
int spanningTree(int V, vector<vector<int>> adj[]) {
priority_queue<p, vector<p>, greater<p>> pq;
pq.push({0, 0});
vector<bool> inMst(V, false);
... | ALGO | 0.999959 | 5.463605 | {
"github_metadata": {
"branch": "main",
"commit_count": 64,
"repo_created_at": "2025-05-19T06:16: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": "775b56494fa... |
38fe08fa-d455-4b0b-a282-21a613beab26 | jasha64/jasha64 | 2015/fibonacci.cpp | #include <iostream>
#include <iomanip>
#include <algorithm>
using namespace std;
struct largeint
{
static const long long N = 2007, W = 16,
B = 10000000000000000;
long long s[N], size;
largeint operator = (long long num)
{
fill(s, s + N, 0);
size = 0;
do {
s[size++] = num % B;
num /= B;
} while (n... | ALGO | 0.999952 | 3.518309 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-10-29T11:14:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8df96921dc... |
a42f4389-8f6f-4560-8584-8d0e1f4154ce | vvaucoul/CodinGame | Spring2022/old/old_cpp_02.cpp | #include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <cmath>
using namespace std;
#define MIN_X 0
#define MIN_Y 0
#define MAX_X 17630
#define MAX_Y 9000
#define MAX_DISTANCE sqrt(pow(MAX_X, 2) + pow(MAX_Y, 2))
#define HERO_VIEW_DISTANCE 2200
#define BASE_VIEW_DISTANCE 6... | ALGO | 0.988806 | 3.358181 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2021-08-30T14:08: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": "56f90fa8d56... |
de3c790b-30ce-4617-a88a-ab3162792872 | ishandutta2007/codeforces-x | xyf007/normal/1005/F.cpp | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
template <typename T>
void checkmax(T &x, T y) {
if (x < y) x = y;
}
template <typename T>
void checkmin(T &x, T y) {
if (x > y) x = y;
}
struct Edge {
int u, v, id;
} e[200001];
in... | ALGO | 0.999954 | 4.139834 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:38:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "af42a5cc8cf2... |
35cb294e-0089-41e2-978e-7074877ccd91 | C5Hwang/Online-Judge-Solutions | CodeForces/CF780D.cpp | #include <stdio.h>
#include <string.h>
#include <stdlib.h>
const int MAX_N = 1e3 + 10 , MAX_H = 1e6 + 10 ;
int n , time , count[MAX_H] , ap[MAX_H] , vis[MAX_N] ;
char a[MAX_N][3] , b[MAX_N][3] , ch[MAX_N][3] , s1[MAX_N] , s2[MAX_N] ;
int Hash(char *c) {
int c1 = c[0] - 'A' , c2 = c[1] - 'A' , c3 = c[2] - 'A' ;
re... | ALGO | 0.999999 | 3.12816 | {
"github_metadata": {
"branch": "master",
"commit_count": 189,
"repo_created_at": "2018-09-23T16:39: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": "6317fd97... |
34ed0599-6b30-4361-932a-8fb09566f47f | VTREEM/Carve | include/carve/convex_hull.hpp | // Begin License:
// Copyright (C) 2006-2011 <NAME> (<EMAIL>).
// All rights reserved.
//
// This file is part of the Carve CSG Library (http://carve-csg.com/)
//
// This file may be used under the terms of the GNU General Public
// License version 2.0 as published by the Free Software Foundation
// and appearing in th... | ALGO | 0.999019 | 5.881465 | {
"github_metadata": {
"branch": "master",
"commit_count": 407,
"repo_created_at": "2013-12-10T15:42:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 118,
"forks": 31,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "af31d8... |
2e9712f4-fea8-41b7-82fb-8ff9c311989f | andrewnyu/competitive-programming | code/codeforces/2b.cpp | //Codeforces 2B: Least Round Way
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
const int MAXV = 1000000;
const long long int INIT = 10000000;
//0-two, 1-five
long long int mat[MAXV+1][2];
long long int d[MAXV+1][2];
int parent[MAXV+1][2];
int n;
int power(long long in... | ALGO | 0.999912 | 3.253746 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2020-04-01T10:54:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f1ca33b8... |
a10d690f-b910-4807-878a-78d1109a7ac2 | Kleinaglfar/LeetCode | 269.cpp | // Topological sort when considering dependencies between
#include <algorithm>
#include <vector>
#include <unordered_map>
#include <string>
#include <unordered_set>
#include <set>
#include <queue>
using namespace std;
struct Node
{
unordered_set<Node *> prev;
unordered_set<Node *> next;
char val;
Node(c... | ALGO | 0.999999 | 5.93838 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2022-09-01T06:06: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": "4516d8ec3... |
80dcad35-a7f5-4d6a-94a6-905ec09d2289 | manojmh/ComputerScience | algorithms/Graph/547NumberOfProvinces.cpp | /**
https://leetcode.com/problems/number-of-provinces/
There are n cities. Some of them are connected, while some are not.
If city a is connected directly with city b, and city b is connected directly with city c, then city a is connected indirectly with city c.
A province is a group of directly or indirectly connected... | ALGO | 0.999992 | 6.147909 | {
"github_metadata": {
"branch": "master",
"commit_count": 413,
"repo_created_at": "2016-07-13T19:49:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a8705f1a... |
8281eab9-61b1-498a-b471-542310413661 | unnatiash27/100DaysOfCode | day4.cpp | // Given an array of positive integers arr, return the sum of all possible odd-length subarrays of arr.A subarray is a contiguous subsequence of the array.
class Solution
{
public:
int sumOddLengthSubarrays(vector<int> &arr)
{
int s = 0;
for (int i = 0; i < arr.size(); i++)
{
... | ALGO | 0.999923 | 4.859552 | {
"github_metadata": {
"branch": "main",
"commit_count": 1666,
"repo_created_at": "2023-05-11T17:34:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "509826b11... |
b03dc93f-e2c4-454d-9a2a-c2bc9c0145be | ishandutta2007/codeforces-m | mff/normal/516/A.cpp | #include <cstdio>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <utility>
using namespace std;
int Fact[11];
int A[10000];
int main()
{
Fact[0] = 1;
for (int i = 1; i < 1... | ALGO | 0.999866 | 3.6488 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-06T01:03: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": "54937b4515ba... |
7f2b7de6-2c3f-4a60-b9b9-86c0376a27ec | Adarsh097/LEETCODE-Daily | 1036-rotting-oranges/1036-rotting-oranges.cpp | class Solution {
public:
int row[4] = {1,0,-1,0};
int col[4] = {0,1,0,-1};
int orangesRotting(vector<vector<int>>& grid) {
int m = grid.size();
int n = grid[0].size();
//{{row,col},timeOfInsertion}
queue<pair<pair<int,int>,int>>q;
//push all the rotten orange... | ALGO | 0.999876 | 5.614558 | {
"github_metadata": {
"branch": "main",
"commit_count": 1329,
"repo_created_at": "2024-09-16T06:34: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": "4595b7a57... |
549bc25d-b24b-4252-b10a-1f5b868b29ba | gabrieljt/competitive-programming | aula3/298573/10050.cpp | // <NAME> - 298573
// Hartals problem - UVa - 10050
// Solution #13424219 - 2014-03-31 23:21:56
// C++11 - compile with -std=c++11 flag
#include <vector>
#include <set>
#include <algorithm>
#include <cstdio>
int main()
{
unsigned int tests, days, parties;
scanf("%u", &tests);
for (auto i = 0u; i < tests;... | ALGO | 0.999719 | 3.987926 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2014-03-16T19:12: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": "8e70b1f28... |
bf45fefb-99cd-4124-95db-3f2675f999dd | ravi-03/AtCoderDP | E/e.cpp | #include<bits/stdc++.h>
using namespace std;
#define int long long
#define fastIO() {ios_base::sync_with_stdio(false); cin.tie(NULL);}
const int inf = 1e18;
void runTests() {
int n, W; cin >> n >> W;
vector<vector<int>> wv(n, vector<int>(2));
for(int i = 0; i < n; i++) {
for(int j = 0; j < 2; j++) {
cin >... | ALGO | 0.999985 | 4.261068 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-06-07T13:00:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "60eb69afe31f... |
553d6a80-aa8b-439e-9df1-71f850293973 | vpuri3/EinsteinToolkit | CT_MultiLevel/src/CT_SolvePsiEquation.cc | #include "cctk.h"
#include "cctk_Arguments.h"
#include "cctk_Parameters.h"
#include "cctk_Functions.h"
#include "carpet.hh"
#include "loopcontrol.h"
#include "Carpet/Carpet/src/modes.hh"
#include "CT_MultiLevel.hh"
// this needs PETSc in ther REQUIRES line of configuration.ccl
// #include "petsc.h"
static void CT_P... | ALGO | 0.999866 | 3.642444 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2018-02-27T22:42:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "11e66c80a... |
0cde1def-8679-4f1f-904c-52c7de1dfa6a | google/gemmlowp | internal/kernel_msa.h | // Copyright 2018 The Gemmlowp 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 ... | ALGO | 0.910834 | 6.653458 | {
"github_metadata": {
"branch": "master",
"commit_count": 678,
"repo_created_at": "2015-07-06T21:15:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1810,
"forks": 457,
"issues": 15,
"pull_requests": 3
},
"file_meta": {
"content_id": "4a2... |
291bbcb8-d881-455b-b4de-e70124ef14a2 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/09/0930/personal_submission/cf946d_tsreaper.cpp | #include <bits/stdc++.h>
#define MAXN 500
#define MAXM 500
#define INF ((int) 1e9)
using namespace std;
int n, m, K, ans;
char A[MAXN + 10][MAXM + 10];
int B[MAXN + 10][MAXM + 10], f[MAXN + 10][MAXM + 10], g[MAXM + 10];
int main() {
scanf("%d%d%d", &n, &m, &K);
for (int i = 1; i <= n; i++) scanf("%s", A[i] +... | ALGO | 0.999604 | 3.521271 | {
"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": "3627... |
4a9caf77-22f3-4483-843a-32387c12a56d | namratasuryavanshi/DataStructures | LinkedList.cpp | #include <iostream>
using namespace std;
// To execute C++, please define "int main()"
struct Node{
int data;
Node* link;
};
Node* head;
void Insert(int x){
Node* temp = new Node();
temp -> data = x;
if(head != NULL){
temp -> link = head;
}
else temp -> link = NULL;
head = temp;
}
void P... | ALGO | 0.998793 | 4.471201 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2016-06-07T23:23: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": "48bf7e362... |
74a2ba2a-11f1-4444-968e-35b85b5fc2ba | Uchiha-Itachi9119/KyThuatLapTrinhC-Cplusplus | BaiTapTuan11/ThiSinh.cpp | #include <iostream>
#include <string.h>
#include <stdlib.h>
using namespace std;
class TS
{
private:
char name[30];
double mark;
public:
TS()
{
strcpy(name, "");
mark = 0;
}
TS(char name[], double mark)
{
strcpy(name, name);
this->mark = mark;
}
doub... | ALGO | 0.996647 | 3.573542 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2020-11-20T16:03: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": "ac8638ced0d... |
202ea4bc-7288-434a-a562-e9cca4606d2f | VisualText/nlp-engine | lite/dsem.cpp | /*******************************************************************************
Copyright (c) 2001-2010 by Text Analysis International, Inc.
All rights reserved.
********************************************************************************
*
* NAME: DSEM.CPP
* FILE: lite/dsem.cpp
* CR: 08/03/99 AM.
* SUBJ: Dynamic... | TOOL | 0.976221 | 6.333835 | {
"github_metadata": {
"branch": "master",
"commit_count": 959,
"repo_created_at": "2019-06-15T14:09:14.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 17,
"forks": 18,
"issues": 90,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa6e13... |
0241bf1f-17de-4b93-9074-dc2ceec64afb | dmkz/competitive-programming | mirea/cources/beginner/2023/constructive-and-operations-level-3/C.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
// читаем исходные данные:
int n, k; cin >> n >> k;
string s; cin >> s;
// используем то, что надо построить любой подходящий ответ
// тогда можно набирать жадно максимальное расстояние для каждого символа
// пока k не закончится
str... | ALGO | 0.999997 | 3.869492 | {
"github_metadata": {
"branch": "master",
"commit_count": 2019,
"repo_created_at": "2018-04-25T11:54:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 41,
"forks": 9,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c99a4a... |
3a73fefa-9198-44e0-8fd3-cc9c878e2e4c | Vishwam36/InterviewBit | DP/Coin Sum Infinite.cpp | // By <NAME>
// https://www.interviewbit.com/old/problems/coin-sum-infinite/
// Decent for O(N) space
/*
You are given a set of coins S. In how many ways can you make sum N assuming you have infinite amount of each coin in the set.
Note : Coins in set S will be unique. Expected space complexity of this problem is O(N... | ALGO | 0.999772 | 4.782869 | {
"github_metadata": {
"branch": "main",
"commit_count": 286,
"repo_created_at": "2020-12-18T13:20:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fd4786b385... |
2fddc5fb-1b84-45a1-969a-025a45ef2473 | Vinu53/-TODO | C Plus +/OLP/EKTA C++/stl_set.cpp | #include <iostream>
#include <iterator>
#include <set>
using namespace std;
int main()
{
set<int, greater<int> > s1;
// insert elements in random order
s1.insert(40);
s1.insert(30);
s1.insert(60);
s1.insert(20);
s1.insert(50);
// only one 50 will be added to the set
s1.insert(50)... | ALGO | 0.986973 | 4.230899 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-12-04T03:48: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": "88e571042f... |
93fbd8d3-50d3-4496-bc2f-5a4c9aa3520f | Shabbir421/DSA-with-Cpp | Looping/Decimal_to_binary.cpp |
#include <iostream>
using namespace std;
int main()
{
// int num;
// cout << "Enter a number: ";
// cin >> num;
// int mult = 1, rem, ans = 0;
// while (num > 0)
// {
// rem = num % 2;
// num = num / 2;
// ans = ans + rem * mult;
// mult = mult * 10;
// }
// cout << ans << endl;
... | ALGO | 0.998362 | 3.801785 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-10-15T16:56:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2593ff7dc145... |
099d2557-2d8c-4cdd-b8ca-1c3c829abd03 | mjbeattie/C-Plus-Plus-Header-Files | HashTable.h | /* HashTable.h
* Date: July 20, 2017
* Author: <NAME> (copied from book)
* Description: This header file contains the abstract class definition for the HashTable
* class.
*/
#include <iostream>
#include "Exception.h"
#include "Enumeration.h"
using namespace std;
class HashTableException : public ... | ALGO | 0.949401 | 5.473955 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-08-24T21:03: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": "2582b9b2ca... |
3145025e-ae67-4aaa-8909-3123b1912258 | liwei2088/oi | 计蒜客/00基础语法/01字符串/T1751.cpp | #include <cstdio>
#include <iostream>
using namespace std;
const int N = 55;
int n;
string s[N], t;
char res[N];
char g[4][8] = {{'*', '*', '*', 'A', 'B', 'C', 'D', 'E'},
{'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M'},
{'N', 'O', 'P', 'Q', 'I', 'S', 'T', 'U'},
{'V', 'W', 'X', '... | ALGO | 0.999992 | 3.228587 | {
"github_metadata": {
"branch": "master",
"commit_count": 183,
"repo_created_at": "2018-09-17T07:02:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d4a99aeb... |
63a15248-a294-4081-b28a-88f5f9e23df2 | jaesimin0903/Baekjoon_hub | 백준/Silver/1991. 트리 순회/트리 순회.cc | #include <iostream>
#include <queue>
#include <vector>
#include <algorithm>
#include <cmath>
#include <set>
using namespace std;
long long N, M;
int choose[10];
class Node{
public:
char value;
char left;
char right;
Node() : value(' '),left(' '),right(' '){}
//Node(int val):value(... | ALGO | 0.999966 | 3.720509 | {
"github_metadata": {
"branch": "main",
"commit_count": 540,
"repo_created_at": "2023-04-04T07:50: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": "a72d914dd7... |
65dbb2b8-02d3-4685-b9ff-471e71bb9e7d | kolamanlee/Self-Driving-Car2 | CarND-PID-Control-Project/src/PID.cpp | #include <limits>
#include <iostream>
#include "PID.h"
/**
* TODO: Complete the PID class. You may add any additional desired functions.
*/
PID::PID() {}
PID::~PID() {}
void PID::Init(double Kp_, double Ki_, double Kd_) {
/**
* TODO: Initialize PID coefficients (and errors, if needed)
*/
PID::Kp = Kp_;... | ALGO | 0.998387 | 6.182504 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2019-05-21T10:49:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 4
},
"file_meta": {
"content_id": "b7c240eda... |
a83f639c-ea4f-4b8e-92f8-64293db4446b | Dr34mT34m/Fabio_Activity3 | Arduino/sketches/PIDTest/PIDTest.ino | #include <PID_v1.h>
#define AVERAGE_WINDOW 6 //size of averaging window
volatile unsigned long microcounter = 0; //used in interrupt for microseconds-between-interrupts computation
volatile float TimerArray[AVERAGE_WINDOW]; //averaging array for microsecond measurements
volatile unsigned char nAverageIndex = ... | TOOL | 0.946973 | 5.702356 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2018-03-19T16:21:56.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2875c7662c... |
dd6e56a8-8614-4d4f-8e2a-c148e452082b | IasonManolas/CompetitiveProgrammingCourse | Lectures/20_lbs.cpp | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
std::vector<int> longestIncreasingSubsequence(int n, int a[]) {
std::vector<int> lis(n);
using Index = int;
using Value = int;
map<Value, Index> dominatingPositions;
int lisSize = 1;
for (int i = 0; i < n; i++) {... | ALGO | 0.999704 | 5.580943 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2020-09-16T09:06: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": "0bac54b09... |
24cf23f5-ee47-4025-b124-f809ccb3ddee | lyfesan/Catatan-Belajar-Informatika | Strukdat/Praktikum/FinalPraktikum/Q.cpp | #include <bits/stdc++.h>
using namespace std;
struct graph{
long vertexCount, edgeCount;
vector<vector<pair<long, long>>> adjList;
void init(long v){
vertexCount = v;
edgeCount = 0;
for(int i=0; i<vertexCount; i++){
adjList.push_back({});
}
}
void ... | ALGO | 0.999932 | 3.911392 | {
"github_metadata": {
"branch": "main",
"commit_count": 52,
"repo_created_at": "2023-02-13T02: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": "b5760da2211... |
ff9ac5e1-5eba-43a4-9c9d-8dc1f3a2085c | BatInGotham/VJudgeCode | UVA-401.cpp | #include <iostream>
#include <cstdio>
using namespace std;
const char * msg[] = {"not a palindrome.", "a regular palindrome.", "a mirrored string.", "a mirrored palindrome."};
const char * rev = "A 3 <NAME> 2TUVWXY51SE Z 8 ";
char com(char ch)
{
if(isalpha(ch)) return rev[ch - 'A'];
return rev[ch - '0'... | ALGO | 0.999659 | 3.207605 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2019-01-29T03:23: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": "5012a3849... |
6216c48c-4d47-4a9d-a0ed-041057e16029 | Xohail69/Leetcode | Swap Kth nodes from ends - GFG/swap-kth-nodes-from-ends.cpp | // { Driver Code Starts
#include <iostream>
using namespace std;
struct Node {
int data;
struct Node *next;
Node(int x) {
data = x;
next = NULL;
}
};
Node *swapkthnode(Node* head, int num, int K);
void addressstore(Node **arr, Node* head)
{
Node* temp = head;
int i = 0;
while(temp){
... | ALGO | 0.999774 | 4.96315 | {
"github_metadata": {
"branch": "main",
"commit_count": 2799,
"repo_created_at": "2021-12-24T13:17: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": "d0ecc023f... |
5b4e2d1d-8bd4-4601-bddd-13380fe22dce | pkp000/VC-programming | 数独求解/SudokuSolver/Sudoku_Solver/sudoku_solver.cpp | #include <iostream>
#include <limits>
using namespace std;
// Excluding rotation, reflection, or rearrangement, the maximum number of results is 5,472,730,538
int number_of_results = 0;
const int N = 9;
int results[1500][N][N];
bool is_feasible(int sudoku[N][N], int row, int column, int figure)
{
// Check: cu... | ALGO | 0.999884 | 5.774751 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2024-09-07T08:36:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7988cdd04b9... |
65746338-2f57-4b37-8553-1459b76d3fc1 | UtkarshChharba/DSA-And-Solutions | DS ALGO/DSA450/Graphs/Number_Of_Operations.cpp | #include <bits/stdc++.h>
#include <vector>
using namespace std;
#define tl(v,size) for(int i=0;i<size;i++){cout<<v[i]<<' ';} cout<<endl
#define int long long
#define pi (3.141592653589)
#define loop(i,a,b) for(int i=a;i<b;i++)
#define loopb(i,a,b) for(int i=b;i>=a;i--)
#define mod 1000000007
#define endl '\n'
#define p... | ALGO | 0.999797 | 5.101596 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2021-11-12T09:44: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": "401294b1f... |
da5f92bf-3ec9-4c16-b167-ea7ef1ec1ec5 | AlexGrim12/cpcfi | 800/helpfulMaths.cpp | #include <bits/stdc++.h>
using namespace std;
void solve()
{
// Add your solution here
string s;
cin >> s;
int numbers[1001], j = 0;
for (int i = 0; i < s.size(); i++)
{
if (s[i] == '+')
{
continue;
}
else
{
numbers[j++] = s[i] - ... | ALGO | 0.999986 | 4.673382 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2023-01-23T15:25:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8c2bf7465dd... |
07158f1d-ef9f-4654-a895-f141b8507642 | mhandley/starlink-htsim | src/xcpnetworktopology.cpp | #include "xcpnetworktopology.h"
XcpNetworkTopology::XcpNetworkTopology(EventList& eventlist,
linkspeed_bps uplinkbitrate, mem_b uplinkqueuesize,
linkspeed_bps downlinkbitrate, mem_b downlinkqueuesize,
linkspeed_bps islbitrate, mem_b islqueuesize) : _constellation(eventlist,uplinkbitrate,uplinkqueuesize,dow... | ALGO | 0.963972 | 4.324953 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2020-11-12T17:10:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "14bff3c3181... |
8f533472-b965-42ff-9aa4-5acec34f4cc6 | saba7764/saba7764 | Source2.cpp | /* #include <mpi.h>
#include <iostream>
using namespace std;
int main(int argc, char* argv[]) {
MPI_Init(&argc, &argv);
int rank, size;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
if (size != 4) {
if (rank == 0) {
cout << "Number of processors m... | ALGO | 0.999895 | 4.445374 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-08-27T12:14: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": "80121743ed61... |
0512207b-7c36-4b42-8e95-32e4d6aede9e | rdstihz/Learning-and-Coding | src/cf/contest/1694/d/d.cpp | /*
Created by godlei at 2022-06-16 23:18:31
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int maxn = 200000 + 100;
vector<int> G[maxn];
int p[maxn];
LL a[maxn], l[maxn], r[maxn];
int ans;
void dfs(int u) {
a[u] = 0;
for(int v : G[u]) {
dfs(v);
a[u] += a[v];... | ALGO | 0.999636 | 3.995689 | {
"github_metadata": {
"branch": "main",
"commit_count": 220,
"repo_created_at": "2021-01-26T13:30:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4aad1c290e... |
9684ae5f-99b4-4913-b6c5-80a1ce966b77 | fevrem/TROPIC | casadi/casadi-osx-matlabR2015a-v3.5.1/include/casadi/core/runtime/casadi_cvx.hpp | // NOLINT(legal/copyright)
// SYMBOL "cvx_house"
/// Computes Householder vector
/// beta: scalar
/// v: vector of length nv
/// Returns 2-norm of v
///
/// Ref: Golub & Van Loan Alg 5.1.1
template<typename T1>
T1 casadi_cvx_house(T1* v, T1* beta, casadi_int nv) {
// Local variable
casadi_int i;
T1 v0, sigma, s, ... | ALGO | 0.99994 | 5.705343 | {
"github_metadata": {
"branch": "develop",
"commit_count": 325,
"repo_created_at": "2020-02-18T15:49:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 55,
"forks": 12,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "6f735... |
45176033-62fc-48b6-90c8-fd4634594fcb | yakuri354/cp | prev/tink/geom/a.cpp | // #pragma GCC optimize("Ofast")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#include "bits/stdc++.h"
using namespace std;
using ll = long long;
using fl = long double;
const ll inf = INT32_MAX;
struct vec2 {
fl x, y;
vec2(fl x, fl y) : x(x), y(y) {}
vec2 operator+(const vec2 &other) {
ret... | ALGO | 0.999898 | 5.061728 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2022-12-29T12:22: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": "adef7b517e85... |
e8b82a2c-2d05-4906-bde0-fc9b32a126db | frankiethekneeman/advent-of-code-2018 | days/13/puzzles/1/program.cpp | #include <functional>
#include <iostream>
#include <list>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <utility>
using namespace std;
enum TrackType {
horizontal='-'
, vertical='|'
, crossing='+'
, corner='/'
, reverseCorner='\\'
, none=' '
};
enum CrossingChoice... | ALGO | 0.99996 | 4.468578 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2018-12-02T04:00: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": "531766429... |
49720ad8-d209-481c-a0a1-98d6a3d40df3 | SananIsmayilov/CoderaAcademy-Lesson | Array.cpp | #include<iostream>
using namespace std;
int main(){
/* Massivler (Array) - Evvelceden olcusu gosterilmis , indekse malik olan , ardicil duzulmus , eyni tipli deyerlerin toplusudur.
---Qeyd : Massivde nomreleme(indekslenme) 0-dan baslayir.
---Umumi sintaksis
1) evvelce massiv daxilinde yerlesecek elementlerin ti... | TOOL | 0.992974 | 3.493431 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2023-11-11T21:10:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "72347bb1c... |
dcdbfe15-557e-4fa9-a2c9-147197093bd2 | JeffersonLab/sim-recon | src/libraries/FDC/DFDCSegment_factory.h | //******************************************************************
// DFDCSegment_factory.h: class definition for a factory creating
// track segments from pseudopoints
//******************************************************************
#ifndef DFACTORY_DFDCSEGMENT_H
#define DFACTORY_DFDCSEGMENT_H
#include "JANA/JF... | ALGO | 0.916094 | 5.217369 | {
"github_metadata": {
"branch": "master",
"commit_count": 8343,
"repo_created_at": "2015-07-16T04:35:19.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9,
"forks": 14,
"issues": 8,
"pull_requests": 0
},
"file_meta": {
"content_id": "d99058a... |
ba6d73f3-dd43-4e30-bcb4-47469388a07f | mauriciopoppe/competitive-programming | UVa/400/433.bank-not-quite-o-c-r.cpp | #include<cstdio>
#include<cstdlib>
#include<cmath>
#include<cctype>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<string>
#include<bitset>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<list>
#include<stack>
#include<sstream>
#include<utility>
#include<numeric>
#include<functi... | ALGO | 0.999629 | 3.583057 | {
"github_metadata": {
"branch": "master",
"commit_count": 67,
"repo_created_at": "2018-02-05T05:31:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "597a12e4c... |
8edc7210-adb0-45df-a6e0-f44b8ef6bb1f | Qaisar-Mateen/Programing-Fundamental-2021- | Assignment 1/Q4_21L_1770.cpp | #include <iostream>
#include <math.h>
using namespace std;
int main ()
{
float x1 = 0.0, x2 = 0.0, x3 = 0.0, y1 = 0.0, y2 = 0.0, y3 = 0.0, d1 = 0.0, d2 = 0.0, d3 = 0;
//taking inputs.
cout << "\tFOR POINT-1" << endl;
cout << "Enter abscissa (x)= ";
cin >> x1;
cout << "Enter ordinat... | ALGO | 0.99816 | 3.993057 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2023-02-04T12:17:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "532de1d6e990... |
50a1fd86-e33f-4f35-bc0c-79b6734ecae5 | jstoja/hell-rush-laviss_f-bordel_j | purgatory/etape4/State.cpp | #include <iostream>
#include "State.h"
State::State() {
_state = _iterate();
}
State::~State() {
}
int State::_iterate() {
static int save_state = 0;
save_state++;
return save_state-1;
}
void State::addNext(int state, Edge &ed) {
_next[state] = ed;
}
void State::setFinal(bool f) {
_final = f;
}
bool S... | ALGO | 0.990002 | 4.066054 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2012-12-14T21:52: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": "c6f39b2c9... |
98dc101b-8581-401c-8870-b91ee6c2ad0f | Noodle3D/ZCookie | algorithm/DOJ 2009/DOJ1287 KMP-problem.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int MAXN = 10005;
const int MAXM = 1000005;
char mod[MAXN];
char s[MAXM];
int next[MAXM];
int len1, len2;
void get_next()
{
int i,j;
next[1]=0;
j=0;
for(i=2;i<=len2;++i)
{
while(j>0 && mod[j+1]!=mod[i])
... | ALGO | 0.999922 | 3.909648 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2013-05-17T09:57:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 17,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5282d364... |
e2952e5b-0f67-4dd4-bbb1-ea154ab07928 | 97joseph/Web_Holder | DefaultCodes/2A/1st assignment/2A/2A/stack.cpp | template <typename T>
class Node
{
private:
T data;
Node<T>* next;
public:
Node()
{
data = 0;
next = NULL;
}
Node(T value)
{
data = value;
next = NULL;
}
Node <T>* getNext()
{
return next;
}
void setnext(Node<T>* ptr)
{
next = ptr;
}
T getData()
{
return data;
}
void setData(T val... | ALGO | 0.950443 | 3.385616 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2022-01-07T02:21:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1fa4797fbfef... |
035d538a-529b-4793-afbe-e009196d5564 | yliu-cs/ACM | PTA/团体程序设计天梯赛-练习集-L3-008.cpp | #include <iostream>
#include <string>
#include <iomanip>
#include <cstring>
#include <vector>
#include <algorithm>
using namespace std;
const int maxn = 10010;
const int INF = 0x3f3f3f3f;
int n, m, k;
int cnt, res;
bool vis[maxn];
bool book = 0;
int min_dis[maxn];
vector<int> adj[maxn];
void dfs(int st, int step) {
... | ALGO | 0.999992 | 4.211084 | {
"github_metadata": {
"branch": "master",
"commit_count": 442,
"repo_created_at": "2018-10-03T10:47:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a2633241... |
e7626431-408c-4ea2-b48f-7181f54bf281 | DanielRanis/gr-wifi-halow | lib/frame_equalizer_impl.h | /*
* Copyright (C) 2016 <NAME> <<EMAIL>>
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This program is d... | ALGO | 0.970654 | 7.296721 | {
"github_metadata": {
"branch": "maint-3.7",
"commit_count": 276,
"repo_created_at": "2019-10-08T20:08:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ca262... |
ba5454d8-54ba-4a35-8e2b-403fbcb5ae4c | HARSHIT2300/LeetCode-Submissions | 1233-remove-sub-folders-from-the-filesystem/1233-remove-sub-folders-from-the-filesystem.cpp | class Node{
public :
map<string,Node*> links;
bool flag;
Node()
{
flag = 0;
}
};
Node* root;
class Trie{
public :
Trie()
{
root = new Node();
}
void insert(string &s)
{ string s1 = "";
Node* tmp = root;
s+="/";
for(int i=0;i<s.size();i++... | ALGO | 0.99674 | 4.812976 | {
"github_metadata": {
"branch": "main",
"commit_count": 911,
"repo_created_at": "2021-10-10T17:13: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": "724a0e96dc... |
46c427ae-7491-478f-99a3-a832a8dd47b8 | kigster/pythagoras | src/cathetus.cpp | #include <iostream>
// std:c++20
using namespace std;
#include <stdio.h> /* printf */
#include <math.h> /* sqrt, pow */
// Given a Pythagorean Theorem
// https://en.wikipedia.org/wiki/Pythagorean_theorem
// For a triangle with a right angle and two equal non-
// diagonal sides (called a "cathetus") this computes,
//... | TOOL | 0.926045 | 4.627085 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-07-22T00:46:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "64f36aa1d158... |
2c0962f0-7614-4b87-bcae-6c7109f7363e | suraj-iitb/algorithm-identification | BERT/Data_Dump/Bubble/C++14/Code/bubble4147066.cpp | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
void print_vec(vector<int> vec) {
cout << "[";
for (int i = 0; i < vec.size(); i++) {
if (i) {
cout << ", ";
}
cout << vec.at(i);
}
cout ... | ALGO | 0.999946 | 4.145212 | {
"github_metadata": {
"branch": "main",
"commit_count": 229,
"repo_created_at": "2020-05-24T06:21:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 2,
"pull_requests": 10
},
"file_meta": {
"content_id": "ca45d3ad6... |
c15c8bfe-547c-42e6-9104-572ea32398e8 | pritykovskaya/max-visualization | GradMethod.cpp | #include "stdafx.h"
#include "Method.h"
#include <string>
#include <math.h>
GradMethod::GradMethod (int _steps, double _eps_grad_abs, double _eps_point_change, double _start_change_coef, bool _is_for_gorge):
numb_of_steps(_steps),
eps_grad_abs(_eps_grad_abs),
eps_point_change(_eps_point_change),
start_change_coef(_... | ALGO | 0.999486 | 5.400147 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2011-07-06T12:07:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e000ab8a5d... |
e64f7de5-f548-437c-97b8-c99614ebc25d | swraj28/Data_Structures | 3.Linked List/Linked_list_interview_questions/Leetcode_23_merge_k_sorted_linked_list.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define ff first
#define ss second
#define pb push_back
#define mp make_pair
#define mod 1000000007
#define ms(arr, v) memset(arr, v, sizeof(arr))
#define bct(x) __builtin_popcountll(x)
#define all(v) (v).begin(),(v).end()
... | ALGO | 0.999924 | 5.436298 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2021-09-27T04:19: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": "5f6ab70c5... |
852ed623-ce00-421e-b52d-ca6090e7ec81 | akhikolla/InformationHouse | imager/src/filtering.cpp | #include <imager.h>
#include "wrappers_cimglist.h"
using namespace Rcpp;
using namespace cimg_library;
//' Apply recursive Deriche filter.
//'
//' The Deriche filter is a fast approximation to a Gaussian filter (order = 0), or Gaussian derivatives (order = 1 or 2).
//'
//' @param im an image
//' @param sigma Stand... | ALGO | 0.996578 | 5.93575 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-12-30T15:51:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 10,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "42917c2a0... |
039b2e51-c084-457c-96e3-c146d125c20c | 1i10/CodinGame | Easy/Defibrillators.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
const float Pi = 3.1416f;
const float RadiusOfTheEarth = 6371.0f;
class Defibrillator
{
private:
int Ident;
string Name;
string Address;
string ContactPhone;
float Longitude;
... | ALGO | 0.941748 | 4.072731 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2021-10-22T15:10:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c377562ad36... |
6b4a7850-69af-4747-bd90-07f2706a14e8 | meetwudi/usaco-solutions | beads/main.cpp | /*
ID: webmast33
PROG: beads
LANG: C++
*/
#include <fstream>
using namespace std;
int main() {
ifstream fin("beads.in");
ofstream fout("beads.out");
// input
int N;
string beads;
fin >> N >> beads;
// init answer
int ans = 0;
// tripple length
beads = beads + beads + beads;
// enumerate, find ... | ALGO | 0.999967 | 3.790534 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2014-12-26T08:01:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "317f4db39b... |
31767f5a-7e03-450c-a98c-75b1a3f0d926 | code233trainee/lijiminbest | CodeForese/div3/1016_div3/F.cpp | #include <bits/stdc++.h>
using namespace std;
void solve()
{
int n, m;
cin >> n >> m;
vector<string> a(n);
for(int i = 0; i < n; i++)
{
cin >> a[i];
}
vector<bool> c(n);
int mx = -1;
for(int i = 0; i < m; i++)
{
int cnt = 0;
for(int j = 0; j < n; j++)
... | ALGO | 0.999959 | 3.730124 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2024-11-26T08:49:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "de352571429... |
342dbfa3-1803-4379-8619-175524bc86a0 | shenzhu/ProgrammingAndAlgorithms | Advanced C Programming/5.4.cpp | /* Copyright <NAME> 2018 */
#include <algorithm>
#include <iostream>
using std::cin;
using std::cout;
using std::endl;
using std::sort;
struct Point {
int x;
int y;
bool is_maxima = false;
bool operator<(const Point& rhs) {
if (x == rhs.x) return y < rhs.y;
return x < rhs.x;
}
};... | ALGO | 0.99998 | 4.753989 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2018-07-09T02:27: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": "acbfd27dc... |
a05fa031-f6a6-4092-969d-cc1ca16a959f | TurakhiaLab/DP-HLS | kernels/profile_alignment/kernel_profile_alignment.cpp | #include "frontend.h"
#ifdef CMAKEDEBUG
#include <vector>
#include <assert.h>
#endif // DEBUG
void Profile::PE::Compute(char_t local_query_val,
char_t local_reference_val,
score_vec_t up_prev,
score_vec_t diag_prev,
... | ALGO | 0.998792 | 5.207834 | {
"github_metadata": {
"branch": "main",
"commit_count": 1574,
"repo_created_at": "2022-11-22T21:50:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3df938408... |
f1a038c3-3760-48af-b960-d406b5b5ca2e | aNamelessMan/leetcode | src/215数组中的第K个最大元素.cpp | #include <bits/stdc++.h>
using namespace std;
// 执行用时:4 ms, 在所有 C++ 提交中击败了99.51% 的用户
// 内存消耗:9.8 MB, 在所有 C++ 提交中击败了69.10% 的用户
int part(vector<int>& nums, int l, int h){
shuffle(nums.begin() + l, nums.begin() + h + 1, std::default_random_engine (2021));//不加这一行会非常慢,复杂度可能退化到O(n^2),实测会消耗200ms左右
int toset = l;
... | ALGO | 0.999979 | 5.091365 | {
"github_metadata": {
"branch": "master",
"commit_count": 263,
"repo_created_at": "2020-05-28T13:47:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bd4b6577... |
0495af35-6d6c-4d8d-832e-7646c1188a35 | sailfishos/nemo-qml-plugin-contacts | src/seasidestringlistcompressor.cpp | /*
* Copyright (c) 2019 - 2020 Jolla Ltd.
*
* You may use this file under the terms of the BSD license as follows:
*
* "Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must ret... | TOOL | 0.978343 | 7.580344 | {
"github_metadata": {
"branch": "master",
"commit_count": 611,
"repo_created_at": "2021-04-16T09:29:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 3,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "b563ab390... |
3fc3f5ea-cb6e-4c54-9a37-94bc793b49f3 | Fahim227/UVA | UVA10699.cpp | #include <bits/stdc++.h>
#define n 1000000
using namespace std;
int a[1000000];
vector<int> prime;
void seive(){
a[1]=1;
/*for(int i=4;i<=n;i+=2){
a[i]=1;
}*/
prime.push_back(2);
for(int i=3;i<=sqrt(n);i+=2){
if(a[i]==0){
for(int j=i*i;j<=n;j+=2*i) a[j]=1;
}
... | ALGO | 0.999821 | 3.821123 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-04-17T17:39: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": "e8e378438f... |
744acd44-4fe7-4664-bd64-3cfed8d47ac0 | FangGet/BundleFusion_Ubuntu_Pangolin | include/FreeImage/include/CGAL/Polynomial/internal/Kernel/Sign_below.h | // Copyright (c) 2005 Stanford University (USA).
// 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
// published by the Free Software Foundation; either version 3 of the License,
// or (at your ... | ALGO | 0.992782 | 6.6018 | {
"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": "3c0bd97... |
78547bef-23bf-46bb-bf22-f1416d418d5b | icecreamovo147/DataStructureLearning | section6-graph/Floyd.cpp | /**
* @file Floyd.cpp
* @author icecreamovo (www.icecreamovo.top)
* @brief 使用Floyd算法求解最短路径
* @version 0.1
* @date 2023-04-19
*
* @copyright Copyright (c) 2023
*
*/
#include <bits/stdc++.h>
#define MAX 100
using namespace std;
// 邻接矩阵存储有向带权图
struct Graph
{
int V; // 顶点数
int E; //... | ALGO | 0.999995 | 5.378764 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2023-03-17T09:17: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": "83c08b1c6... |
34fb3c59-7c5d-4d7e-9c21-f416eabc39a3 | v6854384/simplex_lab3 | main.cpp | #include <iostream>
#include <vector>
#include "simplex.hpp"
using namespace std;
// поиск методом ветвей и границ
void BranchesAndBorders(const vector<vector<double>> &a, const vector<double> &b, const vector<double> &c, SimplexMode mode) {
Simplex simplex(a, b, c, mode);
vector<SimplexSolve> solves = simple... | ALGO | 0.999928 | 4.844659 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2020-11-11T02:31:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "822686232853... |
373ac028-ac06-4189-8ed8-faaf66bae9c8 | kalakris/stomp_motion_planner_icra2011 | stomp_motion_planner/src/covariant_trajectory_policy.cpp | /*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2010, <NAME>, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condit... | ALGO | 0.989589 | 6.538828 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2011-02-03T03:50:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 19,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "011bf5e... |
935d672a-c33c-40a0-86a3-4c3a9fa9cf0b | ishandutta2007/codeforces-k | krk/normal/1389/B.cpp | #include <bits/stdc++.h>
using namespace std;
const int Maxn = 100005;
const int Maxd = 5;
int T;
int n, k, z;
int a[Maxn];
int best[Maxd];
int res;
void addBest(int x)
{
if (best[Maxd - 1] >= x) return;
best[Maxd - 1] = x;
for (int i = Maxd - 1; i > 0 && best[i] > best[i - 1]; i--)
swap(best[i],... | ALGO | 0.999794 | 3.886815 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:06: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": "27c1186b0bcb... |
50970694-2175-48f8-b218-0d5c15362294 | Project-OSRM/osrm-backend | include/customizer/edge_based_graph.hpp | #ifndef OSRM_CUSTOMIZE_EDGE_BASED_GRAPH_HPP
#define OSRM_CUSTOMIZE_EDGE_BASED_GRAPH_HPP
#include "extractor/edge_based_edge.hpp"
#include "partitioner/edge_based_graph.hpp"
#include "partitioner/multi_level_graph.hpp"
#include "util/static_graph.hpp"
#include "util/typedefs.hpp"
#include "storage/shared_memory_owners... | TOOL | 0.914469 | 3.506335 | {
"github_metadata": {
"branch": "master",
"commit_count": 8731,
"repo_created_at": "2011-09-22T10:05:08.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 6955,
"forks": 3646,
"issues": 421,
"pull_requests": 26
},
"file_meta": {
"content_id": ... |
ee9e3aa8-c9f8-4740-a655-cb493c097f16 | Rohan2309/dsa450 | Binary Tree/levelOrder.cpp | /*
Level order traversal
Given a binary tree, find its level order traversal.
Level order traversal of a tree is breadth-first traversal for the tree.
Example 1:
Input:
1
/ \
3 2
Output:1 3 2
Example 2:
Input:
10
/ \
20 30
/ \
40 60
Output:10 20 30 40 60 N N
Your T... | ALGO | 0.99999 | 5.445968 | {
"github_metadata": {
"branch": "main",
"commit_count": 200,
"repo_created_at": "2021-04-04T19:11:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b327de185b... |
2c90920f-e6ad-407d-9aa9-142b4eef0ae3 | hanktran/problem-solving | Plagiarism Checker/returnMatch.cpp | using namespace std;
#include <iostream>
#include <string>
string match(string cheater, string student) {
string window = "";
int j = 0, min = cheater.length() + 1;
for (int i = 0; i < cheater.length(); i++) {
if (cheater[i] == student[j]) {
j++;
if (j == student.length()) {
int end = i ... | ALGO | 0.991165 | 3.649081 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2021-08-09T04:43:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c1b82521498... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.