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 |
|---|---|---|---|---|---|---|---|
ce692234-5df7-47c8-b343-b8d716285d1f | ivanhu42/p | codeforces/cpp/519a.cpp | #include <iostream>
#include <string>
#include <cctype>
using namespace std;
int main()
{
string str;
int i, w = 0, b = 0;
while (cin >> str)
for (i = 0; i < 8; i++)
{
if (str[i] == 'Q')
w += 9;
else if (str[i] == 'R')
w += 5;
else if (str[i] == 'B' || str[i] == 'N')
... | ALGO | 0.999495 | 4.113679 | {
"github_metadata": {
"branch": "master",
"commit_count": 54,
"repo_created_at": "2016-06-22T12:02: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": "ed498dc52... |
7a6859d4-561b-4b3f-8755-4984c5670d44 | aflag/spoj | shpath.cc | #include <string>
#include <iostream>
#include <tr1/unordered_map>
#include <tr1/unordered_set>
#include <vector>
#include <set>
using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::tr1::unordered_map;
using std::tr1::unordered_set;
using std::pair;
using std::vector;
using std::make_pair;
u... | ALGO | 0.999686 | 4.689428 | {
"github_metadata": {
"branch": "master",
"commit_count": 60,
"repo_created_at": "2014-11-18T01:01:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8837eef39... |
ec2e4bdf-2359-4837-828d-1dfe444018c9 | 0dyk/algorithm | 백준/Gold/2251. 물통/물통.cc | #include <iostream>
#include <set>
#include <queue>
using namespace std;
struct bottle {
int a, b, c;
};
bool visited[201][201][201];
set<int> s;
int main() {
ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
int A, B, C;
cin >> A >> B >> C;
queue<bottle> q;
q.push({ 0,0,C });
while (!q.empty()... | ALGO | 0.99998 | 3.924742 | {
"github_metadata": {
"branch": "main",
"commit_count": 387,
"repo_created_at": "2023-07-29T14:12:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ca276c3716... |
de87f8d9-8579-469d-98ce-e22fd26e7837 | flaviu2001/High-School-Small-Projects | ONI/ONI 2017/Probleme Rezolvate/Recursivitate/reziston.cpp | #include <fstream>
#include <cstdio>
#include <cstring>
using namespace std;
char s[1005];
int p, n;
void read()
{
ifstream fin ("reziston.in");
fin.getline(s, 1005);
n = strlen(s);
fin.close();
}
int calc_serie();
int calc_paralel()
{
//++p; //trec de (
int prod = 1, sum = 0, x;
do{
... | ALGO | 0.9983 | 3.55575 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2020-04-09T13:40: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": "9f22db181... |
674991b4-cc9d-4b7e-bd38-a6c797447bd2 | SergeiRogov/Game-Of-Life | Life.cpp | /** \file Life.cpp
* \brief Life class functions.
* \details Contains class functions definitions
* \author <NAME>
* \version 0.1
* \date 2023-2023
* \bug No bugs so far
* \copyright University of Nicosia.
*/
#include <iostream>
#include "Life.h"
using namespace std;
void Life::in... | ALGO | 0.968398 | 4.846366 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-02-20T14:38: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": "3bd4e1044db5... |
0406dc59-3647-4b0c-8784-ceececc18506 | qtwebkit/qtwebkit | Source/ThirdParty/libwebrtc/Source/webrtc/modules/audio_processing/aec3/erl_estimator.cc | /*
* Copyright (c) 2017 The WebRTC 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 in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... | ALGO | 0.998875 | 7.583807 | {
"github_metadata": {
"branch": "qtwebkit-dev-wip",
"commit_count": 219621,
"repo_created_at": "2015-12-31T17:38:35.000Z",
"is_fork": true,
"is_org_owned": true,
"forked_from": "WebKit/WebKit-http",
"stars": 485,
"forks": 134,
"issues": 517,
"pull_requests": 23
},
"file_me... |
7d7185ba-306a-4819-93c4-d5eba1ebce30 | akash350poria/CodingBlocks | Number Theory/primeNumberSegmentSieve.cpp | #include <iostream>
#include <vector>
using namespace std;
const int N = 100000;
vector<int> primes;
int p[N] = {0};
void sievePrime()
{
for (int i = 2; i <= N; i++)
{
if (p[i] == 0)
{
primes.push_back(i);
for (int j = i; j <= N; j += i)
{
p[j] = 1;
}
}
}
}
void pr... | ALGO | 0.999918 | 4.160563 | {
"github_metadata": {
"branch": "master",
"commit_count": 77,
"repo_created_at": "2020-09-01T06:50:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9db43dd30... |
7d66780c-db7f-47d7-949a-9ed476d2240b | Shubham-ncu/FOCP_2_Lab | c++ Assignment/A2_Q1.cpp | //Create a program to print a butterfly pattern for a given size n.
#include <iostream>
using namespace std;
void butterflyPattern(int n) {
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= i; j++) cout << "*";
for (int j = 1; j <= 2 * (n - i); j++) cout << " ";
for (int j = 1; j <= i; j+... | ALGO | 0.99984 | 5.638641 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2025-01-31T07:03: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": "5fc6dfe8390... |
ab7b9f3f-705f-4f9b-a5b2-894c5ac51f85 | arthurherbout/crypto_code_detection | data/code-jam/files/32015_Terence_24487_0_extracted_B.cpp | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <string>
using namespace std;
#define N 100
char expr[N];
int d;
int pow3[13];
long long calculate(char *expr, int d, int m)
{
long long s = 0, r = expr[0]-'0', op = 1;
for(int i = 1; i < d; i++, m/=3)
if(m % 3 == 1) {
s... | ALGO | 0.999587 | 3.803481 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2019-09-20T18:35:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 4,
"issues": 10,
"pull_requests": 1
},
"file_meta": {
"content_id": "ea1245dc... |
115862d2-eebf-4ed3-b90a-fdbebfa888b6 | ibrahim1118/LeetCode-Solutions | 2058-find-the-minimum-and-maximum-number-of-nodes-between-critical-points/2058-find-the-minimum-and-maximum-number-of-nodes-between-critical-points.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
vector<int> nodesBetw... | ALGO | 0.99994 | 5.004202 | {
"github_metadata": {
"branch": "main",
"commit_count": 1631,
"repo_created_at": "2023-09-20T15:46: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": "42d0c2023... |
1085cfbc-9aa3-4d9b-9573-7afa9de98839 | juandesant/WSClean | wsclean/wsclean/imageweightcache.h | #ifndef IMAGE_WEIGHT_CACHE_H
#define IMAGE_WEIGHT_CACHE_H
#include "inversionalgorithm.h"
#include "logger.h"
#include "../imageweights.h"
#include "../weightmode.h"
#include <limits>
class ImageWeightCache
{
public:
ImageWeightCache(const WeightMode& weightMode, size_t imageWidth, size_t imageHeight, double pixel... | TOOL | 0.902201 | 6.732646 | {
"github_metadata": {
"branch": "master",
"commit_count": 243,
"repo_created_at": "2017-05-19T16:45:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c78b7e8... |
e774627a-6b94-4c2c-9491-177865a453d4 | dikshachaudhari4/Laboratory-Practice-II | Ass3__prims.cpp | #include <bits/stdc++.h>
using namespace std;
#define V 5
//minimum weighted node
int minKey(int key[], bool mstSet[])
{
int min = INT_MAX, min_index;
for (int v = 0; v < V; v++)
if (mstSet[v] == false && key[v] < min)
min = key[v], min_index = v;
return min_index;
}
void printMST(... | ALGO | 0.999964 | 4.487967 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-05-18T19:09: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": "a0afcdb59b81... |
b3e1e944-637d-4d3d-87e5-22573d1eb84c | TazzerLabs/School-Coding | inLineAsm.cpp | // ==================================================================
//
// Program: Inline_Assembly_Prime_Check
// Programmer: <NAME>
// Language: C++
// Date: May 14, 2015
// Professor: <NAME>
// Description: Just practicing asm in c++ programming with a prime
// checker.
//
// Last edited: 5/14/2015 3:3... | ALGO | 0.950531 | 4.361025 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-07-28T22:00:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f5d4528dd6... |
c6548531-a760-409b-a860-d0b7793ed8fc | ishandutta2007/codeforces-k | kostia244/normal/1446/B.cpp | #pragma GCC optimize("O2,unroll-loops")
#pragma GCC target("avx,avx2,sse,sse2,ssse3,sse4.1,sse4.2,popcnt")
#include<bits/extc++.h>
#define all(x) begin(x), end(x)
using namespace std;
using ll = long long;
const int maxn = 5050, mod = 1e9 + 7;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int dp[... | ALGO | 0.999912 | 3.755069 | {
"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": "f090e1a223e9... |
0df9ead5-88eb-40b9-8e02-23b7fa783332 | yamashita-tiemi/Estrutura-de-Dados-UFJF | ListaCont/main.cpp | #include <iostream>
#include "Ponto.h"
#include "ListaCont.h"
#include "ListaCont.cpp"
#include "ListaContPonto.h"
#include "ListaContPonto.cpp"
using namespace std;
int main()
{
ListaCont l(5);
l.insereFinal(24);
l.insereFinal(3);
l.insereFinal(2);
l.insereFinal(-1);
l.insereFinal(99);
... | ALGO | 0.933891 | 4.210678 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2023-04-12T01:43:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "10f6037adc6... |
397d0150-a4fc-411d-9996-06149cea9290 | mustafamaaz/Data-Structure | linked_List.c++ | #include <iostream>
#include <string>
#include <cstring>
using namespace std;
struct node
{
public:
int info;
node *next;
node()
{
// cout << "\nnode call\n";
next = NULL;
}
~node() { delete next; }
};
class list
{
private:
node *head, *temp1, *temp2;
public:
list()
... | ALGO | 0.999445 | 3.719825 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-01-07T18:11:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "da334f73bc14... |
ca8534e7-fb10-4817-ba72-da555a0c7087 | 921kiyo/programming-languages | cpp/ICL/maze/second/maze.h | /* You are pre-supplied with the functions below. Add your own
function prototypes to the end of this file. */
#include <string>
using namespace std;
/* helper functions to allocate and deallocate dynamic 2D arrays */
char **allocate_2D_array(int rows, int columns);
void deallocate_2D_array(char **m, int rows);
/*... | ALGO | 0.999587 | 4.111299 | {
"github_metadata": {
"branch": "master",
"commit_count": 92,
"repo_created_at": "2017-12-13T13:34:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5fc3e544a... |
61af5644-a5cd-4dda-bca6-f8af5a8357ae | 33-cl/cpp09 | ex02/src/PmergeMe.cpp | #include "../inc/PmergeMe.hpp"
template <typename Container>
void print_container(const Container& container)
{
for (typename Container::const_iterator it = container.begin(); it != container.end(); ++it) {
std::cout << *it << " ";
}
std::cout << std::endl;
}
template <typename Container>
Container... | TOOL | 0.931579 | 5.673851 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-01-21T19:04: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": "ea41bc3c9de9... |
f3b4268b-6caa-457b-ab12-ed5102e21bfb | NividhSingh/USACO-practice | Past USACO Problems/2018-19/February 2019/Gold/PaintingTheBarnGold.cpp | #include<iostream>
#include<cstdio>
using namespace std;
int main () {
freopen("paintbarn.in", "r", stdin);
freopen("paintbarn.out", "w", stdout);
int N, K;
cin >> N >> K;
int strokes[N][2][2];
int size = 200;
int barn[size + 1][size + 1];
for (int i = 0; i <= size; i++) {
... | ALGO | 0.999853 | 3.922283 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2022-06-25T18:41:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bfb94dc15ee... |
17c9849e-e268-49aa-95d5-2de957b75541 | OwaisK4/Competitive-Programming | FDSS/Brainiac 2024/Snakes and Ladders: The Quickest Way Up.cpp | #include <bits/stdc++.h>
#define int long long
#define all(a) a.begin(), a.end()
#define seed chrono::high_resolution_clock::now().time_since_epoch().count()
#define file_read(filepath) freopen(filepath, "r", stdin);
#define file_write(filepath) freopen(filepath, "w", stdout);
#define fastio \
ios... | ALGO | 0.999668 | 4.102144 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-01-04T18:41:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8be3197a1e41... |
c2696de7-26f9-43e0-988f-c2dede052562 | dslrsiddesh/DAA-LAB | lab_08/lab8_q3.cpp | #include <iostream>
#include <vector>
using namespace std;
int greedy(int n,int a[],int k)
{
int i = k-1,count = 0;
while(i >= 0)
{
count += n/a[i];
n %= a[i];
i--;
}
return count;
}
int main()
{
int x,k;
cout << "Enter 'x' : ";
cin >> x;
cout << "Enter the nu... | ALGO | 0.999943 | 4.106515 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-10-14T14:29: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": "4d0097aaa5bb... |
253c4f92-89fb-4aab-8740-5094785cb3e3 | amritpandey23/PSCP_CS5303 | 3_psp_lab/assignment-3/6.triangle.cpp | /*
TITLE: Question 6.triangle, Assignment 3, PSP Lab
AUTHOR: <NAME> MC20103
DATE: 13 Jan 2021
*/
#include <iostream>
using namespace std;
bool isTriangle(int, int, int);
void typeCheck(int, int, int);
int main()
{
int a, b, c;
cout << "Enter sides of triangle: ";
cin >> a >> b >> c;
if (isTriangle(a,... | ALGO | 0.990501 | 4.240943 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2021-01-02T06:53: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": "efd761583... |
6caf9764-75b4-4f41-b1c6-fb2aac337216 | FinityFly/cp | P_1_-_Redistributing_Gifts.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;
/*
*/
int n;
int a[500][500];
vector<vector<int>> adj;
bool vis[500][500];
void bfs(int a, int n) {
queue<int> q;
vector<bool> v(n);
q.push(a);
fill(v.begin()... | ALGO | 0.999959 | 3.62064 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2024-02-19T19:39:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b03933e8e52... |
e067af83-3503-4331-a3da-bf8e213143ff | udit043/little_bit_competitive | he/seg_roy_and_coin_boxes.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mx 1000007
ll a[mx];
ll tree[mx];
void build(ll node, ll start, ll end)
{
if(start == end)
{
tree[node] = a[start];
}
else
{
ll mid = (start+end)/2;
build(2*node, start, mid);
build(2*node+1, mid+1, end);
tree[node] = tree[2*no... | ALGO | 0.999913 | 4.064563 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2017-03-25T20: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": "8d89fd65c... |
062ee3a9-3d0d-4cfd-96f5-e67a02e5ec52 | fangbaorui/Cplusplus | test.cpp3_30/test.cpp | #define _CRT_SECURE_NO_WARNINGS
#include<algorithm>
#include<list>
#include<iostream>
#include<assert.h>
using namespace std;
struct A
{
public:
A(int a = 1)
:_a(a)
{
cout << "A(int)" << endl;
}
private:
friend ostream& operator<<(ostream& out, const A& a);
int _a;
};
ostream& operator<<(ostream& out, const A... | TOOL | 0.910236 | 4.480614 | {
"github_metadata": {
"branch": "master",
"commit_count": 60,
"repo_created_at": "2021-01-29T11:58: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": "719e6ec6f... |
bc6d59c0-7dcc-4609-8c4b-582121857c9e | xyzqm/cp | misc/range_sort.cc | #include <iostream>
#include <vector>
#include <tuple>
#include <algorithm>
using namespace std;
#define int long long
const int inf = 1e18;
using P = pair<int, int>;
const int N = 1e5 + 1;
int n, q, k, t[N], l[N], r[N], a[N], A[N], S[4 * N], L[4 * N];
void pull(int x) { S[x] = S[2 * x] + S[2 * x + 1]; }
void apply(int... | ALGO | 0.999986 | 4.892346 | {
"github_metadata": {
"branch": "main",
"commit_count": 337,
"repo_created_at": "2023-03-21T00:27:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bf551e5205... |
622009d1-99fc-4b7a-878e-536a6854e1ef | String10/Visual-Studio-Code | ProgrammingHomework/DataStructure/20211111/B_4.cpp | #include <stdlib.h>
#include <time.h>
/**
* @brief An algorithm collection for DS course.
*
* @tparam T Type of data to be operated.
*/
template <typename T>
class Algorithm {
public:
Algorithm();
void swap(T&, T&);
void quick_sort(T*, const unsigned int);
};
template <typename T>
Algorithm<T>::Algorithm() {
... | ALGO | 0.999985 | 3.327635 | {
"github_metadata": {
"branch": "main",
"commit_count": 125,
"repo_created_at": "2021-02-28T08:26: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": "3ad9f2de61... |
e765b5e1-50f3-4a72-92b0-3a92bca84389 | cllanjim/Swifticles | Reference Files/Legacy Framework [GL2]/Framework2/FMath.cpp | //
// FMath.cpp
// CoreDemo
//
// Created by <NAME> on 10/11/13.
// Copyright (c) 2013 <NAME> Inc. All rights reserved.
//
#include "FMath.h"
#include "stdafx.h"
const float fmath_pi = 3.1415926535897932384626433832795028841968;
float fmath_radiansToDegrees(float pRadians)
{
return pRadians * 57.295779513082... | TOOL | 0.974463 | 6.336032 | {
"github_metadata": {
"branch": "master",
"commit_count": 147,
"repo_created_at": "2016-11-08T07:18: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": "421e92ef... |
21cc7517-b151-4113-98a6-aa828968feaf | sajid-ayman/Codeforces-problems-solution | B. Dreamoon and WiFi.cpp | // author : <NAME>
// problem : https://codeforces.com/contest/476/problem/B
#include <bits/stdc++.h>
#define ve vector
#define ll long long
#define ld long double
#define fi first
#define se second
#define tc ll tc;cin>>tc;while(tc--)
#define to ... | ALGO | 0.999943 | 3.825171 | {
"github_metadata": {
"branch": "main",
"commit_count": 31,
"repo_created_at": "2024-06-22T14:37:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f4748498bc... |
4c90e72b-62f1-43a1-9a42-53b1b55831a5 | etascale/daedal | compiler/projects/src/DAE/Utils/SkelUtils/HandleVirtualIterators.cpp | //===- HandleVirtualIterators.cpp - Utility to add virtual iterator -------===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===-------------------------------------------------------... | TOOL | 0.920343 | 6.053902 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2016-03-17T10:03:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1cafd6b2ea... |
5b51d5d3-66a0-4ec8-afea-bc8cb13d0cf3 | vvip-68/GyverMatrixWiFi | libraries/GyverFilters/src/filters/linear.h | #pragma once
#include <Arduino.h>
// линейная аппроксимация методом наименьших квадратов
template < typename TYPE >
class GLinear {
public:
GLinear(){};
void compute(TYPE *x_array, TYPE *y_array, int arrSize) { // аппроксимировать
int32_t sumX = 0, sumY = 0, sumX2 = 0, sumXY = 0;
arrSize /= sizeof(int);
for ... | ALGO | 0.929468 | 4.217938 | {
"github_metadata": {
"branch": "master",
"commit_count": 279,
"repo_created_at": "2019-02-19T04:31:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 156,
"forks": 49,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e1848... |
118d8d38-d02e-4b2b-9d18-9f0644b668e7 | Maxeg13/universal_interface | checkEig0.cpp | //#include <iostream>
#include <vector>
//#include <Eigen/Eigenvalues>
//#include <Eigen/Dense>
//using namespace Eigen;
using namespace std;
//typedef std::complex<double> cd;
vector<float> v;
#include "pca.h"
int main(int argc, char **argv)
{
PCA myPCA(200,2);
v.resize(2);
for (int i=0; i<200; i++)
{
for(int... | ALGO | 0.999515 | 3.5153 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-08-07T10:52: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": "56fd4e6d5a... |
7eaa2f9f-2e4e-4e73-b4f7-14c942b76cbf | Anothermmm/Data-Structures-and-Program-Design | single_linked_queue/circle_linked_queue.h | #ifndef CIRCLE_LINKED_QUEUE_H_INCLUDED
#define CIRCLE_LINKED_QUEUE_H_INCLUDED
using namespace std;
enum Error_code{success, underflow, overflow};
typedef double Node_entry;
typedef double Queue_entry;
struct Node//节点
{
// data members
Node_entry entry;//内容
Node *next; //指向下一个节点的指针 use before definition
// con... | TOOL | 0.991186 | 4.134806 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2020-02-11T07:53:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "067077764... |
78d57bb0-45ff-4254-b671-4dfa3787b5ff | Inapt19/Daiziguizhong | 180708/Monotone/C.cc | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#define print(x) cout << x << endl
#define input(x) cin >> x
typedef long long llint;
const int N = 22222;
struct Worker {
Worker(int l_, int p_, int s_): \
l(l_),... | ALGO | 0.999613 | 3.897383 | {
"github_metadata": {
"branch": "master",
"commit_count": 145,
"repo_created_at": "2018-05-08T10:27:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 18,
"forks": 2,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b7629e... |
30629fbf-d09a-45c7-9966-c793bc592395 | silvertoml/core | test/score_reference.h | #pragma once
#include "../src/platform/memory.h"
#include "../src/four_q.h"
////////// Original (reference) scoring algorithm \\\\\\\\\\
template<
unsigned int dataLength,
unsigned int infoLength,
unsigned int numberOfInputNeurons,
unsigned int numberOfOutputNeurons,
unsigned int maxInputDuration... | ALGO | 0.998805 | 4.712077 | {
"github_metadata": {
"branch": "testnet",
"commit_count": 482,
"repo_created_at": "2024-04-29T04:01:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "de5f744... |
35de6246-2265-49c0-afda-ce48a70b42cb | ritiknayan/LeetCode | 1408-find-the-smallest-divisor-given-a-threshold/1408-find-the-smallest-divisor-given-a-threshold.cpp | class Solution {
private:
bool check(vector<int>& nums, int divisor, int threshold) {
int sum = 0;
for(auto&num : nums){
sum +=(num + divisor - 1) / divisor; //to divide num by divisor and round up the result.
if (sum > threshold) return false; // Early exit if sum exceeds th... | ALGO | 0.999964 | 6.316544 | {
"github_metadata": {
"branch": "main",
"commit_count": 494,
"repo_created_at": "2024-07-20T09:23: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": "bb15d1cf79... |
d50b39ad-dd79-4787-817f-dab009bd5f3e | PennyBlack2008/WebservNote | 99_연습폴더/01_연습3번/srcs/config/ConfigServer.hpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ConfigServer.hpp :+: :+: :+: ... | WEB | 0.931995 | 3.292191 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2021-04-13T12:46: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": "69feea91ce7... |
54717f03-c52f-4a53-ba9c-c50a5a6f3752 | akhilesh-rai/Hackerrank-Solutions | libs/Algorithms/Implementation/OrganizeContainer/OrganizeContainer.h | /**
* @file OrganizeContainer.h
* @brief https://www.hackerrank.com/challenges/organizing-containers-of-balls/problem
*/
#ifndef ORGANIZECONTAINER_H
#define ORGANIZECONTAINER_H
#include <iostream>
#include <string>
#include <vector>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <algorith... | ALGO | 0.999373 | 4.922154 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2023-04-30T14:06: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": "9944d7532e1... |
452588fb-2daa-4071-9fe8-bb1d5a00f942 | EwersonNeias/poo | retangulo.cpp | #include <iostream>
using namespace std;
int main() { //int main usado para abertura do codigo
float base, altura, area;//float usado para especificar os valores
cout << "Digite a base do retangulo: ";//cout usado para se comunicar com o usuario
cin >> base;//cin usa o valor especificado pelo usuario ... | TOOL | 0.943641 | 3.965117 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2023-03-21T01:29: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": "26284e4e295... |
be71ae12-2ece-4e59-8515-4ea469e6feae | white-peed/C-plus-plus-codes | Codeforces/Codeforces Round #760 (Div. 3)/c.cpp | #include<bits/stdc++.h>
#define ff(i,a,n) for(int(i) = int(a);i <= int(n);i++)
#define fb(i,a,n) for(int(i) = int(a);i >= int(n);i--)
#define lli long long int
#define vi vector<int>
#define vlli vector<lli>
#define pb push_back
#define vii vector<vi>
#define pii pair<int,int>
#define endl "\n"
#define mp make_pair
#de... | ALGO | 0.999986 | 3.751721 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2021-11-20T17:39: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": "1433672fc... |
fc13be06-0f53-401b-bf5e-50fd220f6983 | tranhoangcore/LeetCode | C++/0108-convert-sorted-array-to-binary-search-tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999993 | 6.453799 | {
"github_metadata": {
"branch": "main",
"commit_count": 171,
"repo_created_at": "2021-03-30T06:34: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": "c2ee2b0db7... |
33d4cc8d-6e39-4963-b339-66c514afc439 | Feavy/Darkorbit-main.swf-decrypter | juge.cpp | #include "juge.h"
#include "math.h"
#include <QDebug>
Juge::Juge(QByteArray param1) : zekep(0),
paf(0) {
QList<int> _loc3_ = {1,2,3,4,5,6,7,8,9,10};
key = pufy(param1);
nake(_loc3_);
}
QList<int> Juge::pufy(QByteArray param1) {
param1 = cagij.hash(param1);
QList<int> _loc2_;
int _loc3_= ... | ALGO | 0.982682 | 3.178022 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-02-25T20:08:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "77f0c5d1d9... |
6ba293aa-f5b5-4bb3-9655-6fa4fab03074 | gamer-project/gamer | src/Model_ELBDM/ELBDM_GetTimeStep_Fluid.cpp | #include "GAMER.h"
#include "CUFLU.h"
#if ( MODEL == ELBDM )
//-------------------------------------------------------------------------------------------------------
// Function : ELBDM_GetTimeStep_Fluid
// Description : Estimate the evolution time-step from the ELBDM kinematic energy solver
//
// Note ... | ALGO | 0.983389 | 4.547028 | {
"github_metadata": {
"branch": "main",
"commit_count": 7047,
"repo_created_at": "2017-12-13T20:44:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 86,
"forks": 70,
"issues": 99,
"pull_requests": 32
},
"file_meta": {
"content_id": "3c82c8... |
b5f77b1e-669b-4956-8db4-543326034133 | AlgorithmSWUtudy/AlgorithmSWUtudy | Yunhyunjo/Codingtest/Programmers/kakao_2018_11.cpp | #include <string>
#include <vector>
#include <algorithm>
#include <iostream>
using namespace std;
struct FileName{
string h, n, t, lh;
FileName(string h, string n, string t){
this->h = h;
this->n = n;
this->t = t;
this->lh = h;
transform(lh.begin(), lh.end(), lh.begin()... | ALGO | 0.998361 | 4.269924 | {
"github_metadata": {
"branch": "main",
"commit_count": 277,
"repo_created_at": "2021-04-07T06:14: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": "9a0ce7d3dcc... |
70666d19-2ff4-426e-99de-ef0d6bc954e6 | rutsky/semester06 | Mathematical_programming/numeric/potentials_alg.hpp | /*
* potentials_alg.hpp
* Method of potentials for solving transportation problem.
* <NAME> <<EMAIL>>
* 25.05.2009
*/
#ifndef NUMERIC_POTENTIALS_ALG_HPP
#define NUMERIC_POTENTIALS_ALG_HPP
#include <algorithm>
#include <vector>
#include <map>
#include <utility>
#include <queue>
#include <list>
#include "numeric_... | ALGO | 0.998571 | 4.179557 | {
"github_metadata": {
"branch": "master",
"commit_count": 750,
"repo_created_at": "2009-02-13T12:16:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec3f8ac3... |
7d5aa147-61de-4670-9905-3385a2e17240 | hphp/Algorithm | Contest/ACM/ICPC_Regional_Contest/WHU2009Regional/7.cpp | #include <stdio.h>
#define V1 510
#define V2 51
int v1, v2, n;
int max[2][V1][V2][2], q;
int main()
{
int test = 1;
while (1)
{
scanf("%d %d %d", &v1, &v2, &n);
if(!(v1 || v2 ||n))break;
q = 0;
for (int i = 0; i <= v1; i++)
for (int j = 0; j <= v2; j++)
for (int k = 0; k < 2; k++)
max[0][i][j]... | ALGO | 0.999608 | 3.606351 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2013-10-31T07:05:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "026b2256b5... |
2cfb88d2-fc6b-467d-8064-fd410b774190 | wenqf11/distributed-faiss | Cplusplus/crow.h | #pragma once
#include <stdio.h>
#include <string.h>
#include <string>
#include <vector>
#include <unordered_map>
#include <iostream>
#include <boost/optional.hpp>
namespace crow
{
// ----------------------------------------------------------------------------
// qs_parse (modified)
// https://github.com/bartgrantham/... | TOOL | 0.935314 | 5.866102 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2018-01-03T02:32:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 20,
"forks": 9,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ca576b7e... |
55eb4774-e138-4bd7-a264-55d2ea478e16 | yokonao/atcoder | ABC/086/c.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
string ans = "Yes";
int N;
cin >> N;
vector<int> x(N), y(N), t(N);
for (int i = 0; i < N; ++i)
{
cin >> t[i] >> x[i] >> y[i];
}
for (int i = 0; i < N; ++i)
{
if (i == 0)
... | ALGO | 0.999886 | 4.136515 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-11-02T23:58:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ff16b02a53... |
6a2e25f6-31d6-4cf8-82f5-c12e22936fff | YXalix/CF | Solutions/337.hpp | #include "utils.hpp"
#include <vector>
/*
* @lc app=leetcode.cn id=337 lang=cpp
*
* [337] 打家劫舍 III
*/
// @lc code=start
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* T... | ALGO | 0.999577 | 5.897142 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2024-01-21T11:55: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": "406cb9e503... |
a0a4ae9e-aac6-4bfa-bcc9-f5e1ce43b8b8 | scp-fs2open/fs2open.github.com | code/object/collideshipweapon.cpp | /*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
#include "hud/hudshield.h"
#include "hud/hudwingmanstatus.h"
#include "... | TOOL | 0.937336 | 6.161395 | {
"github_metadata": {
"branch": "master",
"commit_count": 23296,
"repo_created_at": "2013-01-19T06:10:53.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 430,
"forks": 174,
"issues": 398,
"pull_requests": 28
},
"file_meta": {
"content_id": "... |
a7801138-a0d8-4403-835f-750aa2ce297a | Ved1103/LEETCODE-SOLUTIONS | 2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level/2558-minimum-number-of-operations-to-sort-a-binary-tree-by-level.cpp | class Solution {
public:
int helper(vector<int>& vec) {
vector<pair<int, int>> res;
int swaps = 0;
for (int i = 0; i < vec.size(); i++) {
res.push_back({vec[i], i});
}
sort(res.begin(), res.end());
for (int i = 0; i < res.size(); i++) {
while (... | ALGO | 0.999985 | 6.41051 | {
"github_metadata": {
"branch": "main",
"commit_count": 1128,
"repo_created_at": "2023-07-29T20:23: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": "3378e88fb... |
0b0bf355-de48-4523-b619-967f056c534d | YuCrazing/ACM-solutions | LightOJ/1095 - Arrange the Numbers (Inclusion-Exclusion).cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1011;
const ll mod = 1000000007;
void add(ll& a, ll b) {
a += b;
if(a > mod) a -= mod;
}
void mul(ll& a, ll b) {
a *= b;
if(a > mod) a %= mod;
if(a < 0) a += mod;
}
ll f[N], c[N][N];
int n, m, k, T;
void init() {
... | ALGO | 0.999912 | 4.180463 | {
"github_metadata": {
"branch": "master",
"commit_count": 552,
"repo_created_at": "2016-03-07T11:11:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1846a230... |
09ff17ea-468a-44ad-b2f2-886988c25210 | AlyElashram/PryLLVM | Compiler.cpp | #include "Compiler.hpp"
#include "Expr.hpp"
using namespace llvm;
Value *Compiler::emitNegation(Value *value) {
return Builder->CreateFNeg(value);
}
void Compiler::StoreValueInVariable(Value *val, Value *variable) {
Builder->CreateStore(val, variable);
}
void Compiler::createScope() {
NamedValues.push_back({});
... | TOOL | 0.970498 | 6.4831 | {
"github_metadata": {
"branch": "master",
"commit_count": 61,
"repo_created_at": "2024-04-27T17:23: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": "58903aa2a... |
869737ce-f48b-4ceb-8c49-1d1f02cd9577 | deepblueparticle/cisst-saw | sawIntuitiveResearchKit/components/code/mtsVFFollowJacobian.cpp | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
/*
Author(s): <NAME>
Created on: 2014
(C) Copyright 2014 Johns Hopkins University (JHU), All Rights Reserved.
--- begin cisst license - do not ... | ALGO | 0.96186 | 6.113444 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-06-28T12:02:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fbb47a5934... |
6b552619-e185-4d84-bf1b-438edc4147b5 | IRMV-Manipulation-Group/SpherizedURDFGenerator | third_party/header_only/igl/copyleft/cgal/incircle.h | // This file is part of libigl, a simple c++ geometry processing library.
//
// Copyright (C) 2016 <NAME> <<EMAIL>>
//
// This Source Code Form is subject to the terms of the Mozilla Public License
// v. 2.0. If a copy of the MPL was not distributed with this file, You can
// obtain one at http://mozilla.org/MPL/2.0/.
... | ALGO | 0.940395 | 6.846044 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-11-01T15:33:57.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 23,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c09e377687a... |
0c362ca8-3b72-416b-ba3e-0ac4d0479ac6 | Hel-N/Diploma | CreatureNeuroNet/CreatureNeuroNet/Creature.h | #pragma once
#define _USE_MATH_DEFINES
#include "Common.h"
#include "NeuroNet.h"
#include <iostream>
#include <vector>
#include <iomanip>
using namespace std;
class Creature {
private:
double fall_unit_angle = M_PI / 30; // единичный угол падения
int num_turn_states = 11; // на какое количество секторов будут разбит... | TOOL | 0.918598 | 3.101656 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2018-03-13T15:45: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": "8c644c92eb... |
6e88531d-0cdc-4ed5-a24e-1d4877003ff1 | toSpace/mobile-game | Development/Export/android/obj/src/zpp_nape/dynamics/ZPP_ColArbiter.cpp | #include <hxcpp.h>
#ifndef INCLUDED_hxMath
#include <hxMath.h>
#endif
#ifndef INCLUDED_nape_Config
#include <nape/Config.h>
#endif
#ifndef INCLUDED_nape_dynamics_Arbiter
#include <nape/dynamics/Arbiter.h>
#endif
#ifndef INCLUDED_nape_dynamics_CollisionArbiter
#include <nape/dynamics/CollisionArbiter.h>
#endif
#ifndef ... | ALGO | 0.929122 | 6.393768 | {
"github_metadata": {
"branch": "master",
"commit_count": 121,
"repo_created_at": "2013-03-09T12:23:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "02fe2725e... |
cd6e0f6b-eba9-4c8d-90b5-3838c61aadbf | Ralina-s/Multithreading_C | p11/function.cpp | #include <stdio.h>
#include <stdlib.h>
#include <string>
#include <math.h>
#include <time.h>
#include <openacc.h>
#include <iostream>
std::string welcome = "Функция для табулирования: 1 / exp(x) + cos(x) ^ 2 \n "
std::string input_data = "Ожидается ввод границ... \n";
#define PARTS_N 10000000
#define STEP_PRINT 100... | ALGO | 0.974585 | 4.427531 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2017-01-13T12:05: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": "0f492bf14... |
e1ebd428-b056-4f91-af1c-f5b69f81f6d5 | yvonne3323/cpp-arith | club_txt_end.cpp | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX_LINE_LENGTH 100
struct Node {
char data[MAX_LINE_LENGTH];
struct Node *next;
};
int main() {
FILE *fp;
char line[MAX_LINE_LENGTH];
struct Node *head, *p, *q;
// 以读方式打开文件
fp = fopen("example.txt", "r");
if (fp == N... | ALGO | 0.993564 | 4.136118 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2023-03-20T15:12:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b0a139944... |
00f89dab-5f5d-4617-b6d2-aba7f595468a | Teddies/LeetCode | DFS/Graph/Undirected Graph/261-Graph Valid Tree.cpp | // Note this problem could be also easily solved with union-find method
// Time complexity: O(vertex * edges)
// Space complexity: O(n)
class Solution {
public:
bool DFS(unordered_map<int, vector<int>>& graph, unordered_map<int, int>& visited, int node, int parent) {
visited[node] = 1;
vector<int> l... | ALGO | 0.99998 | 6.435278 | {
"github_metadata": {
"branch": "master",
"commit_count": 64,
"repo_created_at": "2018-04-11T21:53:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5cfbd12cf... |
49d85a35-8508-4d45-93fb-ca3c9cc14c07 | high-performace-source/high-performance-source-classroom-hse-spring-2025-04-hse-spring-2025-actor-system-07-ydb-actor-syste | ydb/core/tx/columnshard/engines/reader/order_control/pk_with_limit.h | #pragma once
#include "abstract.h"
#include <ydb/core/tx/columnshard/engines/reader/read_filter_merger.h>
namespace NKikimr::NOlap::NIndexedReader {
class TGranuleOrdered {
private:
bool StartedFlag = false;
std::deque<TGranule::TBatchForMerge> OrderedBatches;
TGranule* Granule = nullptr;
public:
bool... | TOOL | 0.959719 | 6.635201 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-02-23T11:51:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c40419dd36a6e... |
fe90549f-fa2c-4758-abd1-e48bb5d3cdac | shafayethossai/Data-Structure | CF_EDU_Segment-tree-part1_C.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define y push_back
#define fast ios::sync_with_stdio(false);cin.tie(nullptr)
//ll gcd(ll a, ll b) {
// if (b == 0)
// return a;
// return gcd(b, a % b);
//}
//
//ll lcm(ll a, ll b) {
// return a / gcd(a, b) * b;
//}
//
//string touppe... | ALGO | 0.999919 | 5.125685 | {
"github_metadata": {
"branch": "main",
"commit_count": 45,
"repo_created_at": "2023-09-14T18:48: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": "3d422b5aaba... |
ea31a724-1884-47e8-9e6a-9cb65a1a56a8 | LiLiParty/AtCoder_Archive | atcoder.jp/typical90/typical90_l/Main.cpp | #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#incl... | ALGO | 0.999426 | 4.166836 | {
"github_metadata": {
"branch": "main",
"commit_count": 669,
"repo_created_at": "2021-09-14T07:16: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": "0f2c63ec3d... |
74bd2cfa-fdfc-4684-8f46-095c9900ddec | smillingrainbow/PFE | Dev/Test/ValidationFB/main.cpp | #include <iostream>
#include <time.h>
#include <fstream>
#include <string>
#include <sstream>
#include "include/CImg.h"
#include "include/filtrebilateral.h"
using namespace cimg_library;
using namespace std;
template <typename T>
inline std::string to_string (const T& t)
{
std::stringstream ss;
ss << t;
return ss... | TOOL | 0.971719 | 5.259606 | {
"github_metadata": {
"branch": "master",
"commit_count": 123,
"repo_created_at": "2014-10-09T07:17: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": "a998fbed... |
40d6d528-5623-4b41-9f7f-9f6f053d00a3 | Z3Prover/z3 | src/qe/qsat.cpp | /*++
Copyright (c) 2015 Microsoft Corporation
Module Name:
qsat.cpp
Abstract:
Quantifier Satisfiability Solver.
Author:
<NAME> (nbjorner) 2015-5-28
Revision History:
Notes:
--*/
#include "params/smt_params.h"
#include "ast/expr_abstract.h"
#include "ast/ast_util.h"
#include "ast/occurs.h"
#includ... | ALGO | 0.998813 | 3.123348 | {
"github_metadata": {
"branch": "master",
"commit_count": 19811,
"repo_created_at": "2015-03-26T18:16:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 11200,
"forks": 1542,
"issues": 160,
"pull_requests": 6
},
"file_meta": {
"content_id":... |
c6f37b76-de9a-45be-8943-1cd96ba0bfbc | Saifu0/Competitive-Programming | CP/1500/jury_marks.cpp | // ----- In the name of ALLAH, the Most Gracious, the Most Merciful -----
#include<bits/stdc++.h>
using namespace std;
#define NINJA ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define fo(i,n) for(int i=0;i<n;i++)
#define Fo(i,k,n) for(int i=k;i<n;i++)
#define for1(i,n) for(int i=1;i<=n;i++)
#define dloop(i... | ALGO | 0.999697 | 3.439008 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-09-08T08:09:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b3a7f8d359... |
ee73a504-cf9f-4d51-860f-419b72326c6d | IIllllIll/osier_star | 백준/Diamond/14180. 배열의 특징/배열의 특징.cc | #include<bits/stdc++.h>
using namespace std;
#define point pair<long long, long long>
#define x first
#define y second
long long arr[200001];
long long inf = 1e9;
long long dp1[200001];
long long dp2[200001];
long long sum[200001];
struct line{
long long a,b;
double mx;
};
vector<line> st1;
vector<line> st2;
do... | ALGO | 0.999962 | 3.62694 | {
"github_metadata": {
"branch": "main",
"commit_count": 164,
"repo_created_at": "2024-03-30T12:50:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f088a240af... |
f97332e0-6423-4aaa-9e37-0cff6e92c964 | raincross7/code-similarity | codes/train_code/problem010/problem010_94.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n-1; i >= 0; i--)
#define ALL(x) x.begin(), x.end()
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
const int mod = 1e9+7;
const int INF = 1e9;
const int MAX = 1e6;
int ... | ALGO | 0.999988 | 4.156564 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-03-06T05:07:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3aad1b7588ac... |
38c44ab6-3730-449d-b691-da2a5fee592f | praserocking/CodeChef | DCE05.cpp | #include<iostream>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<queue>
#include<cstring>
#include<cctype>
#define mn(a,b) a>b?b:a
#define loop(n,i) for(int i=0;i<n;i++)
#define mx(a,b) a>b?a:b
#define PI 3.14159
#define put printf
#define get scanf
#define all(a) a.be... | ALGO | 0.998136 | 3.408717 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2013-05-15T05:14: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": "1041ac2b19... |
23907975-2407-4f1e-8bf5-66855ed6574c | Aaricis/Cpp_primer | Chapter17/17_26.cpp | #include <iostream>
#include <string>
#include <regex>
using namespace std;
bool valid(const smatch &m)
{
if(m[1].matched)
return m[3].matched && (m[4].matched == 0 || m[4].str() == " ");
else
return !m[3].matched && m[4].str() == m[7].str();
}
int main()
{
string phone = "(\\()?(\\d{3})(\... | ALGO | 0.996719 | 3.883138 | {
"github_metadata": {
"branch": "master",
"commit_count": 152,
"repo_created_at": "2020-09-26T04:19:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d7b9e29a... |
6dacb81f-7475-4f43-9dc7-750c953d55e3 | supersupercoconut/leetcode | leetcode/editor/en/[344]Reverse String.cpp | //import universal *.h
#include "../../../stdc.h"
using namespace std;
//Write a function that reverses a string. The input string is given as an
//array of characters s.
//
// You must do this by modifying the input array in-place with O(1) extra
//memory.
//
//
// Example 1:
// Input: s = ["h","e","l","l","o... | ALGO | 0.996712 | 4.735917 | {
"github_metadata": {
"branch": "master",
"commit_count": 259,
"repo_created_at": "2024-01-16T12:16: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": "f86a1b12... |
792cf135-89a2-457c-8672-48428868e791 | GyosunShin/ProblemSolving | 백준 유형별 문제풀이/다익스트라/1261알고스팟(3rd).cpp | // (1 ≤ N, M ≤ 100)
// OUTPUT
// (N, M)으로 이동하기 위해 벽을 최소 몇 개 부숴야 하는지
#include <cstdio>
#include <queue>
#include <cstring>
#include <algorithm>
using namespace std;
int R, C;
int pan[100][100];
int cache[100][100];
const int dr[] = {-1,1,0,0};
const int dc[] = {0,0,-1,1};
// (sofarWeight, vertexIndex)
priority_q... | ALGO | 0.999159 | 3.654606 | {
"github_metadata": {
"branch": "master",
"commit_count": 122,
"repo_created_at": "2020-02-14T11:32: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": "535c2153... |
8ba023d8-11b6-45ad-ba6b-25b92d7f395c | godotengine/godot | core/math/math_funcs.cpp | /**************************************************************************/
/* math_funcs.cpp */
/**************************************************************************/
/* This file is part of: */
/* ... | ALGO | 0.972077 | 7.158095 | {
"github_metadata": {
"branch": "master",
"commit_count": 76043,
"repo_created_at": "2014-01-04T16:05:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 98972,
"forks": 22820,
"issues": 5000,
"pull_requests": 3866
},
"file_meta": {
"content... |
48736a1d-1e36-4dbb-a587-ff1bfb69bf93 | RedwanPlague/CodeForces | C++/1336A | Linova and Kingdom.cpp | #include <bits/stdc++.h>
using namespace std;
#define MX 35
#define MOD 1'000'000'007
#define F first
#define S second
#define invmod(x) bigmod(x,MOD-2)
#define br '\n'
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pii;
void dfs(int u, const vector<vi> &adj, vi &dist, vi &sz)
{
sz[u] = 1;... | ALGO | 0.999947 | 3.993199 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-06-26T14:19: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": "9e4be8e1b64d... |
b4b6a728-33c4-4d3d-ba1d-9d8d6a76266f | ishandutta2007/codeforces-r | realcomplex/normal/981/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef double db;
#define fi first
#define se second
#define mp make_pair
#define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define TEST freopen("in.txt","r",stdin);
#define ab(a) ((a < 0) ? (-(a)) : (a... | ALGO | 0.999792 | 3.713207 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:58: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": "60a763e7e305... |
cf10c83c-c356-46ff-a4fb-c8dcdb5e6598 | yes-ee/PS-Algorithm | 백준/10830.cpp | #include <iostream>
#include <vector>
using namespace std;
long long n;
long long b;
void print(vector<vector<long long>> a) {
for (long long i = 0; i < a.size(); i++) {
for (long long j = 0; j < a.size(); j++) {
cout << a[i][j] % 1000 << " ";
}
cout << "\n";
}
}
// 행렬 간 곱셈
vector<vector<long long>> mpow... | ALGO | 0.999904 | 4.340778 | {
"github_metadata": {
"branch": "main",
"commit_count": 700,
"repo_created_at": "2022-07-19T08: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": "52018fb90b... |
c7faaf15-bdb3-4565-bd13-d7ae79db2f73 | BartSteen/AdventOfCode | 2023/day16/d16.cpp | #include <iostream>
#include <fstream>
#include <vector>
#include <queue>
using namespace std;
#define filename "input.txt"
const vector<int> vup = {-1, 0};
const vector<int> vdown = {1,0};
const vector<int> vleft = {0,-1};
const vector<int> vright = {0,1};
bool posContainsDir(vector<vector<int>> &vec, vector<int> ... | ALGO | 0.999887 | 4.159054 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2024-01-02T17:39: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": "bb2162bde0... |
06eb4dca-ec8f-4180-ad16-99dfcc352283 | SashiRin/protrode | atcoder/disco-2019-qual/B.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<int> vi;
const ll MOD = 1e9 + 7;
const int maxn = 1e6 + 10;
bool check(int i, int j, int c) {
if (abs(c - i) + abs(c - j) > c) return false;
if (abs(c - (i + 2)) + abs(c - j) > c) return false;
if (a... | ALGO | 0.999973 | 4.397544 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2018-04-02T11:20:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c372b51cc... |
a50ce9c7-4c83-4fdf-9973-2aeea4f5e1c4 | 135meherab/Algorithm | week3practice1/practice_problem_3.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e3+10;
vector<string> g;
int n,m;
vector<pair<int,int>> direction = {{0,-1},{0,1},{1,0},{-1,0}};
bool visited[N][N];
int level[N][N];
bool is_valid(int i,int j)
{
return (i>=0 && i<n && j >= 0 && j < m);
}
void bfs(int si,int sj)
{
queue<pair<int,int... | ALGO | 0.999868 | 4.536494 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2023-08-29T16:20: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": "e2df582b185... |
00eafc46-50ff-4e53-bc87-433805f6d82e | vvidetta/WordWheel | WordWheelTests/WordWheelTests.cpp | #include <algorithm>
#include <chrono>
#include <iostream>
#include <vector>
#include <string_view>
bool IsWord(std::string_view const& str)
{
return true; // TODO: implement dictionary check
}
template <
typename Callback
>
void FindWordsWithPrefix(Callback const& callback, std::vector<char>& letters, size_t pre... | ALGO | 0.996337 | 6.18257 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2023-09-03T20:36:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7905bffa96... |
a4ac2c23-4af8-4145-b06e-eb06445fde1a | mfs6174/MCMToolkit | 11B/p2a2.cpp | /*
ID: mfs6174
email: <EMAIL>
PROG: P1A1
LANG: C++
*/
#include<iostream>
#include<fstream>
#include<string>
#include<sstream>
#include<cstring>
#include<algorithm>
#include<map>
#include<vector>
#include<queue>
#include<deque>
#include<iomanip>
#include<cmath>
#include<set>
#define sf scanf
#define pf printf
#define l... | ALGO | 0.999668 | 3.183762 | {
"github_metadata": {
"branch": "master",
"commit_count": 220,
"repo_created_at": "2011-07-29T03:01:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c21a70e4... |
9d79f9f0-03a8-4a1b-a0dd-61a137faadd9 | COSCS340/QuantumStockOptimization | Markowitz/markowitz.h | #pragma once
#include <vector>
#include <boost/dynamic_bitset.hpp>
#include "stock_data.h"
#include "DWGraph.hpp"
namespace markowitz {
enum operation {quantum, classical};
class Quantum {
protected:
std::vector <std::vector <float> > Qmatrix; // Matrix to hold QUBO data
std::vector <std::vector <float> > ... | ALGO | 0.98548 | 4.665771 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2018-01-26T17:30:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "096d86cd2b... |
2aaa56b4-9d50-42e2-ab9c-f4963e2f4203 | PratyakshAgg/Complete-DSA-Prep | Codeforces/1200/1834C.cpp | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define allr(x) (x).rbegin(), (x).rend()
#define ff first
#define ss second
#define u_map unordered_map
typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
#define MOD 1e9+7
#define pb push_back
#define MP make_pair
... | ALGO | 0.999995 | 4.512798 | {
"github_metadata": {
"branch": "master",
"commit_count": 94,
"repo_created_at": "2022-11-06T07:24: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": "cf6c5c4ec... |
1d2acaa7-dccd-44c5-882d-7c4d7cc77577 | Yandong-Luo/Multi-Robot-Search--RNN | controllers/footbot_rnn/footbot_rnn_controller.h | #ifndef FOOTBOT_RNN_CONTROLLER
#define FOOTBOT_RNN_CONTROLLER
/*
* Include some necessary headers.
*/
#include <argos3/core/utility/math/rng.h>
/* Definition of the CCI_Controller class. */
#include <argos3/core/control_interface/ci_controller.h>
/* Definition of the differential steering actuator */
#include <argo... | ALGO | 0.929166 | 5.340621 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2021-03-28T06:25: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": "936fe63b950... |
036b7e36-ece1-424c-b5e9-2e5023717795 | shubhijain106/dijikstras-Advanced-data-Structures- | routing.cpp | #include <stdlib.h>
#include <string.h>
#include <fstream>
#include <vector>
using namespace std;
class Edge;
enum Mark
{
Visit, Uvisit, Seen, Noted
};
class Node //defining node
{
public:
int data;
int key;
int degree;
Node * par;
std::vector<Edge*... | ALGO | 0.999921 | 3.435282 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-01-25T14:59:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c03cffbdb7... |
9fe72f0b-7284-41f0-918a-2a4795802b84 | prajwal1210/HP3-CNN-Inferencing | forward/cnn_forward.cc | /************************************************************
* cnn_forward.cc: *
* Implementation of cnn_forward.h *
* *
* Author: <NAME> *
*************************************... | DATA | 0.938819 | 6.25499 | {
"github_metadata": {
"branch": "master",
"commit_count": 268,
"repo_created_at": "2020-03-24T09:58:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 10,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4428348... |
5d3f2c81-7839-4804-a616-3aed79b3b6c5 | ssk4988/Coding | CSES/advancedtechniques/cornersubgridcheck.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using pd = pair<ld, ld>;
using vi = vector<int>;
using vl = vector<ll>;
using vd = vector<ld>;
using vpi = vector<pi>;
using vpl = vector<pl>;
using vpd = vector<pd>;
using vv... | ALGO | 0.999984 | 4.494871 | {
"github_metadata": {
"branch": "main",
"commit_count": 189,
"repo_created_at": "2021-11-02T23:44:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c9dbc4e1a6... |
87de0f51-c899-4d8c-a72a-b3b0477c0b06 | SmallLars/ma-sha256 | cnf_gen/bitcoin_eval.cpp | #include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <iomanip>
#include <signal.h>
#include <time.h>
#include <ctime>
#include <sys/stat.h>
#include <sys/types.h>
#include "cryptominisat4/cryptominisat.h"
#include "common/sha256tools.h"
#include "common/dimacsparser.h"
#include "common/solvertools.h"
#in... | ALGO | 0.998217 | 3.182419 | {
"github_metadata": {
"branch": "master",
"commit_count": 384,
"repo_created_at": "2016-03-02T17:11:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "948aaec2... |
3131f0ee-e717-4acf-afc2-60e4234d1758 | kojea0919/algorithm | Crain.cpp | //#include <vector>
//#include <string>
//
//using namespace std;
//
//int solution(vector<string> storage, vector<string> requests) {
// int answer = 0;
//
// int Width = storage[0].size();
// int Height = storage.size();
//
// bool JiGae[50][50] = { false };
// for (size_t Idx = 0; Idx < Width; ++Idx)
... | ALGO | 0.999794 | 4.971514 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2025-03-25T05:15:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eec8cdfe1... |
f308b037-1210-47b5-bc4d-6d787038290b | rjenez/W266-final-project | data/programming-homework-dataset-plagiarism-detection/src/B2017/Z5/Z6/student3315.cpp | /B2017/2018: Zadaća 5, Zadatak 6
#include <iostream>
#include <vector>
#include <stdexcept>
#include <algorithm>
#include <functional>
#include <iomanip>
class Berza
{
int min, max;
std::vector<int> cijene;
void Sortiraj() {
std::sort(cijene.begin(), cijene.end(), std::bind(std::less<int>(), std::p... | TOOL | 0.921062 | 4.343167 | {
"github_metadata": {
"branch": "main",
"commit_count": 125,
"repo_created_at": "2022-02-09T00:45:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "09db6f91ed... |
985e248a-b8a6-42c1-8c6d-5d78efc8b190 | jk983294/Store | competitions/cpath_second_competition_Project/cpath/main.cpp | #include <iostream>
#include <string>
#include <time.h>
#include <sstream>
#include "Graph.h"
using namespace std;
void test_pass_spefixed_nodes_samle(); //复赛测试样例
void get_middle_nodes(string para, vector<int> &middlenodes); //从命令行获得中间节点
int main(int argc, char* argv[])
{
if (argc > 1){
string topofile,out... | ALGO | 0.930498 | 3.38168 | {
"github_metadata": {
"branch": "master",
"commit_count": 89,
"repo_created_at": "2014-06-20T15:20:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b90201a3b... |
3f1bd037-45bd-4c01-b096-073ecef8db58 | gongsy1221/Baekjoon | 백준/Silver/18258. 큐 2/큐 2.cc | #include <iostream>
#include <queue>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
queue<int> q;
string str;
int a, temp;
cin >> a;
while (a--)
{
cin >> str;
if (str == "push")
{
cin >> te... | ALGO | 0.998544 | 4.406131 | {
"github_metadata": {
"branch": "main",
"commit_count": 136,
"repo_created_at": "2024-02-11T14:31: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": "1d542caa05... |
1c32f922-60c8-4633-8d77-9446c55f34d5 | yashwanthguguloth24/Cpp-Practice | FINAL450/Searching and Sorting/eko_spoj.cpp | // https://www.spoj.com/problems/EKO/
// using binary search for heights
#include<bits/stdc++.h>
using namespace std;
#define int long long
int compDiff(vector<int>arr,int h)
{
int ans = 0;
for(int i = 0;i<arr.size();i++)
{
ans += (arr[i]>h)?(arr[i]-h):0;
}
return ans;
}
int32_t main()
{... | ALGO | 0.999997 | 3.99463 | {
"github_metadata": {
"branch": "master",
"commit_count": 506,
"repo_created_at": "2021-01-26T13:59: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": "37c02703... |
782a6ba0-99db-4dce-98d1-edfbed7790bb | Dharmesh177/Leetcode_problems | 2523-closest-prime-numbers-in-range/2523-closest-prime-numbers-in-range.cpp | class Solution {
public:
int N = 1000001;
vector<bool>sieve = vector<bool>(N + 1,true);
void createSieve() {
sieve[0] = sieve[1] = false;
for(int i = 2; i * i <= N; i++) {
if(sieve[i] == true) {
for(int j = i * i; j <= N; j += i) {
sieve[j] = f... | ALGO | 0.999985 | 5.332865 | {
"github_metadata": {
"branch": "main",
"commit_count": 1173,
"repo_created_at": "2022-06-01T08:48: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": "01dd6fb63... |
d99f37c1-5da7-4658-850b-6ff5b221b38d | ashaniray/CodeContest | UVa/LongestPaths/paths.cpp | #define TEST 1
#include <iostream>
#ifdef TEST
#include <fstream>
#endif
#include <vector>
#include <map>
#include <iterator>
using namespace std;
void ReadInputStream(istream &is);
void Process(int nCaseNo, int nMaxPoints, int nStart, vector<pair<int, int> >& vpEdges);
int main()
{
#ifdef TEST
ifstream ifs("inpu... | ALGO | 0.999435 | 3.949808 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2011-05-29T12:30:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "60f359eba2... |
2c88fa16-4ed6-4e6d-8455-1f875ff5b40f | side-projects-all/works | Leetcodes/shortest_path/q_2045.cpp | /*
A city is represented as a bi-directional connected graph with n vertices where each vertex is labeled from 1 to n (inclusive). The edges in the graph are represented as a 2D integer array edges, where each edges[i] = [ui, vi] denotes a bi-directional edge between vertex ui and vertex vi. Every vertex pair is connec... | ALGO | 0.999988 | 5.911427 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2025-01-03T05:24: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": "8d5a80d71f7... |
00d312ed-5210-4048-86bc-ff49ac65f00b | rahulbarhate/Data-Structures | Maps/maps.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
//define an empty map container
map<int, int> mapex;
//inserting elements in the map
mapex.insert(pair <int, int> (9, 90));
mapex.insert(pair <int, int> (10, 100));
mapex.insert(pair <int, int> (1, 10));
mapex.insert(pair <int, in... | ALGO | 0.983542 | 3.33335 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-05-08T04:59: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": "01123a6f9... |
31280e26-033c-40aa-b17a-aed2fd756958 | ruippeixotog/uva | src/657.cc | #include <algorithm>
#include <iostream>
#include <vector>
#define MAXW 50
#define MAXH 50
using namespace std;
int w, h;
string image[MAXH];
int di[] = {1, 0, -1, 0};
int dj[] = {0, 1, 0, -1};
int floodFill(int i, int j, bool dot) {
if(i < 0 || i >= h || j < 0 || j >= w) return 0;
if(dot && image[i][j] != 'X'... | ALGO | 0.999345 | 3.88692 | {
"github_metadata": {
"branch": "master",
"commit_count": 123,
"repo_created_at": "2016-01-28T23:00:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "83ff638e... |
23dd59f0-9dde-4d34-8cb2-b24a7d155e10 | urotanke95/CoM | main.cpp | #include "VisualHull.h"
#include "Seg.h"
//視点の数
const int USED_CAMERANUM = 4;
/**
* 必要なファイル
* cameraMat カメラパラ=3×3のcsv
* disCo 歪み係数=1×5のcsv
* rvec 回転ベクトル=3×1のcsv
* tvec 移動ベクトル=3×1のcsv
* csvfile 推定重心位置xyzの記録したいファイル名
* filename visualhullのファイル名点群
*
* あとopenposeのキーポイント座標が必要
*
* VisualHull.cpp, Seg.cppにも数カ所パスがハ... | ALGO | 0.910735 | 3.981421 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2018-10-22T10:01:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6c89dc9a5d... |
ceb6a402-2f77-43b4-a036-cd474b8a71f7 | YuweiXiao/Algorithm | union_set/union_set.cpp | /**
* Algorithm: Union_set
*
* Author: <NAME>
* Date : 2016.3.22
* Language: C++11
*
* Description: Union_set
* 1.Support union of set, query of whether in the same set.
* 2.Use path compression and weighted tree
* 3.Each set, its root is a negative number, and the absolute
* ... | ALGO | 0.999658 | 4.970513 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2016-03-17T14:39:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "491fcfcc7... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.