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 |
|---|---|---|---|---|---|---|---|
adf8e1bd-22e3-40bb-9d88-159b9735e9e7 | mamun4122/My-Online-Judge-Submission | Codeforces/Manthan, Codefest 16 - 633/633C-Spy Syndrome 2.cpp | #pragma comment(linker, "/stack:640000000")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <iterator>
#include <list>
#include <map... | ALGO | 0.999695 | 3.183055 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2016-07-15T03:28: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": "555028148... |
10c8bcce-1cb0-4725-8315-5b7a32fc99c7 | SideShowBoBGOT/AlgorithmsThirdSemester | lab6/Logic/AI/TAI.cpp | //
// Created by choleraplague on 05.12.22.
//
#include <random>
#include "TAI.h"
#include "../../GameSingletons/TLogic.h"
#include "../Notify/SAIEndTurn.h"
#include "../../Other/TPermutator.h"
static constexpr std::array<int, 3> s_arrDifficulties = { 3, 4, 5 };
static constexpr int s_iMaxEvalueate = 10000000;
void ... | ALGO | 0.99369 | 4.532405 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2022-09-20T20:36: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": "647cc1c4738... |
ceb3bb3e-c7bc-4a56-8df1-3d64f4fd48af | yakovlevia/Programming-tasks | geom.cpp | #include <bits/stdc++.h>
double EPS = 1e-12;
std::ifstream good_test("test.txt");
std::ifstream good_ans("ans.txt");
std::ofstream my_ans("myans.txt");
auto c_start = std::chrono::high_resolution_clock::now();
auto c_end = std::chrono::high_resolution_clock::now();
struct Sector {
double x;
double y;
do... | ALGO | 0.999556 | 3.587104 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-11-02T19:09: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": "08f743629774... |
560d3e75-70ca-424f-937e-1d1eab626394 | reflectometry/refl1d | refl1d/lib/c/rebin.h | #ifndef _REBIN_H
#define _REBIN_H
//#include <iostream>
#include <vector>
#include <stdexcept>
#include <algorithm>
// Define a bin iterator to adapt to either forward or reversed inputs.
template <typename T>
class BinIter {
bool forward;
size_t n;
const T *edges;
public:
size_t bin; // Index of the corr... | ALGO | 0.915114 | 6.6272 | {
"github_metadata": {
"branch": "master",
"commit_count": 2431,
"repo_created_at": "2011-05-16T18:57:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 22,
"forks": 23,
"issues": 97,
"pull_requests": 14
},
"file_meta": {
"content_id": "8a6e... |
e8af6bf8-7221-4d0d-9961-c04c0345ad86 | UIUC-ChenLab/Chrysalis-HLS | HLS_Bug_Dataset/Vitis-HLS-Introductory-Examples/dut_9/Source_Code/dut_9.cpp | void dut(int a[128], int b[128], int tmp3[128]) {
#pragma HLS DATAFLOW
int tmp1[128], tmp2[128], tmp4[128];
int tmp5[128];
pass(a, b, tmp1, tmp2);
Double_pass(tmp2, tmp1, tmp4, tmp5);
add_kernel(tmp4, tmp5, tmp3);
}
// Content of called function
void pass(int a[128], int b[128], int tmp1[128], in... | ALGO | 0.975587 | 4.376507 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2023-11-02T21:24:04.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 14,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "07566852792... |
1c31eaf4-dd19-4183-8b0c-7a9457bd66fc | Noobgods/ProblemSolving_ | JunHyun_Park/Programmers/Lv3_ 단어 변환.cpp | #include <string> // Level3_ 단어변환 [dfs]
#include <vector>
#include <iostream>
using namespace std;
bool visit[52];
bool node[52][52];
int answer = INT_MAX;
void dfs(int n, int begin, int target, vector<string>& words){
if(words[begin] == words[target]) {
if (answer > n)
answer = n;
... | ALGO | 0.999989 | 4.716343 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2020-01-04T20:10:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eee84ef64... |
18a24a7a-d5de-40fc-9cfc-0681420b69c4 | HimanshuPandey2002/VA-Week2 | Hartal.cpp | #include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
void hartal(int n, int p, int arr[])
{
int days[n];
for(int i=0; i<n; i++) days[i]=0;
for(int i=0; i<p; i++)
{
int x = arr[i];
if(x > n)
break;
... | ALGO | 0.999797 | 3.741427 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2021-09-22T10:24: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": "5f885c60c7c... |
e33de3b2-3040-4528-a18c-f01c1c7fa4d4 | rahulgoyal911/cPlusPlus | templates.cpp | using namespace std;
#include<iostream>
/*template<class T1,class T2>
void add(T1 a,T2 b)
{
//T1 c;
cout<<a<<b<<endl;
//cout<<c;
}
void add(float a,char b){
cout<<a<<b<<"Overloaded"<<endl;
}
int main()
{
//char a='a';
add(4,1.1);
add(6.1f,'a');
}
*/
//class templates
/*
template<class T>
class abc{
T a,b;
public:
ab... | ALGO | 0.967833 | 4.420265 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2018-09-29T16:06:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e9e42109... |
fd788e8d-5bf9-407d-af3e-ec303b32e92b | qqqqq4545/LeetCode | week7/752_Open_the_Lock.cpp | class Solution {
public:
int openLock(vector<string>& deadends, string target) {
unordered_set<string> deadendSet(deadends.begin(), deadends.end());
if (deadendSet.count("0000")) return -1;
if (target == "0000") return 0;
queue<string> q;
unordered_... | ALGO | 0.999932 | 5.980909 | {
"github_metadata": {
"branch": "main",
"commit_count": 52,
"repo_created_at": "2025-03-02T17:44: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": "81201cec8cd... |
380ff6c7-59a2-4fa6-ab40-a2b1ad9143ff | ishandutta2007/codeforces-b | bohdanpastuschak/normal/898/B.cpp | #include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
typedef long long LL;
typedef pair<int, int> PII;
typedef vector<int> VI;
#define MP make_pair
#define PB push_back
#define X first
#define Y second
#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define RFOR(i, b... | ALGO | 0.99988 | 3.637877 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-04-11T01:05:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "324f83ff74b2... |
17508104-a754-4dcd-8945-381c79d14f18 | drlongle/leetcode | algorithms/problem_0488/other.cpp | /*
Notes -
1. if(j > 0 && curHand[j] == curHand[j - 1]) continue; - This is an optimisation
which skips the balls of same colour in hand, as they will lead to same results.
This is the reason why sorting hand is necessary in beginning. eg - board =
"GRG", hand = "RRG", so skip the second R for each i as it will lead t... | ALGO | 0.999962 | 4.961595 | {
"github_metadata": {
"branch": "master",
"commit_count": 1430,
"repo_created_at": "2017-02-08T14:00:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a35e202... |
0d70769a-51fd-4820-b799-7d211a33bf36 | Jske25/Competitive-Computing | Usaco/SilverPractice/PB/Unit 6/FunnyFrog.cpp | #include <bits/stdc++.h>
using namespace std;
int r, c;
vector<vector<char>> v;
int ans = 0;
void dfs(int a, int b) {
if (a == r-1 && b == c-1) {
ans++;
return;
}
int row = a+1; int col = b+1;
for (int x = row; x < r; x++) {
for (int y = col; y < c; y++) {
... | ALGO | 0.999884 | 5.127611 | {
"github_metadata": {
"branch": "branch1",
"commit_count": 10,
"repo_created_at": "2025-07-11T00:19: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": "10d5cf58... |
01eeaa27-7c86-4a78-8247-fd4d005e5664 | ysk24ok/leetcode-submissions | 1446/linear_search.cpp | #include <gtest/gtest.h>
#include <cstdlib>
#include <string>
using namespace std;
class Solution {
public:
int maxPower(string s) {
char prev = '-';
int ret = 0, count = 0;
for (const char& c : s) {
if (c == prev) {
count++;
} else {
prev = c;
ret = max(ret, count)... | ALGO | 0.999642 | 5.863613 | {
"github_metadata": {
"branch": "master",
"commit_count": 661,
"repo_created_at": "2016-08-27T14:51:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 89,
"pull_requests": 0
},
"file_meta": {
"content_id": "35028f8... |
b7c4eb3c-88be-4a97-9ac3-80962c3fefe6 | gphalkes/t3widget | src/modified_xxhash.cc | /* Copyright (C) 2018 <NAME>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 3, as
published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; withou... | ALGO | 0.995747 | 6.704013 | {
"github_metadata": {
"branch": "master",
"commit_count": 871,
"repo_created_at": "2013-02-02T13:55:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 7,
"issues": 2,
"pull_requests": 1
},
"file_meta": {
"content_id": "60630eac... |
ca2b44ed-1016-42de-93ef-2d4cde70951b | Shruhil/cses-solutions | Trees/CompanyQueries!.cpp | #include <bits/stdc++.h>
using namespace std;
/* TYPES */
#define ll long long
#define pii pair<int, int>
#define pll pair<long long, long long>
#define vi vector<int>
#define vvi vector<vector<int>>
#define vll vector<long long>
#define vvll vector<vector<long long>>
#define vvpii vector<vector<pair<int,int>>>
#defi... | ALGO | 0.9998 | 4.175251 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2025-05-13T02:36:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "edb8950d525... |
ae3bddfe-77c2-49f1-93c1-b0054c496710 | jianglab/motioncorr | src/SP++3/include/nlfunc.h | /*
* Copyright (c) 2008-2011 <NAME> (<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 2 or any later version.
*
* Redistribution and use in source and bin... | ALGO | 0.981022 | 5.397973 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2015-07-24T20:50:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 14,
"forks": 8,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "12b68726a... |
cce32b60-4413-4c19-a35a-fa2589a469a3 | RicLourenco/cpp-book-exercises | 02. Data Structures and Algorithms/02. Storing Data in Lists and Linked Lists/06. applying list and linkedlist using stl/02. std::vector/main.cpp | /* A vector, which is like an array, is a container to store a bunch of items
contiguously. However, the vector can double its size automatically if we insert a
new item when its capacity has been reached. Also, vectors have many member
functions that arrays don't have, and provide iterators that act like pointers but
... | ALGO | 0.99152 | 4.80372 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2024-10-21T11:12: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": "a3c80df0872... |
b4a20700-bcb6-4a34-8827-031e8901f2b2 | SamuelMarks/bloomierFilterCpp | src/core/utilEncode.cpp | #include "utilEncode.h"
namespace bloomier {
//using namespace std;
void UtilEncode::encode(int value, int length, unsigned char array[])
{
int size_value = sizeof value;
unsigned char bytes[size_value];
//std::cout << size_value << std::endl;
for (int i = 0; i < size_value; i++)
{
... | TOOL | 0.952506 | 4.556031 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2014-11-24T05:11:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "30f62ea88... |
73cba464-01a9-4bfa-b4e1-27d53492d865 | dilipkay/hsc | mex_funs/multilevel.h | #include "mex.h"
#include<list>
using namespace std;
// matrix-vector multiplication
void Ax(mxArray *A, mxArray *x, mxArray *b, list<int> idx);
// Sparse matrix declarations
// Borrowed from CMG
typedef struct smatrix {
double *pr;
mwIndex *irow;
mwIndex *jcol;
unsigned int n;
unsigned int issym;
} matrix... | ALGO | 0.999251 | 4.001089 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2013-07-06T13:55:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 19,
"forks": 11,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "afe933e... |
bc79e6a7-bf6c-4c13-95a2-e68f87087fc6 | imalgorithmgeek/matrix | main.cpp | #include "matrix.h"
int main(int argc, char* argv[]) {
/* declare the row and column of a matrix */
size_t row{3};
size_t column{3};
/* set-up for first matrix */
Matrix<ssize_t> first {row, column};
first.initialize_matrix();
std::cout << "\nfirst matrix: " << std::endl;
first.print_... | ALGO | 0.982427 | 5.215682 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-09-10T08:39: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": "d39054f489... |
53563079-e862-440f-8070-cd849eb0c32d | danielbis/MStream | ClusterFeatureVector.cpp | //
// Created by danielbis on 11/8/19.
//
#include "ClusterFeatureVector.h"
#include <map>
#include <stdexcept>
using namespace std;
/*
* cluster feature (CF) vector implementation. Per authors, it essentially
is a big document combined with its documents. The definition of
the CF vector of a cluster is de... | ALGO | 0.970658 | 6.991883 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2019-11-08T23:47:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "67c83a1fb... |
21144cfd-54a8-4ed8-abb8-2cbd0a530693 | md-jonayed/Phitron_Course | Semester 2/Introduction to Algorithm/Module 15 (Graph Traversal on 2D Matrix)/3.countingRooms.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5;
char grid[N][N];
bool visited[N][N];
int row, col;
vector<pair<int, int>> path = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
bool isValid(int ci, int cj)
{
if (ci >= 0 && ci < row && cj >= 0 && cj < col && grid[ci][cj] == '.')
{
return true;
... | ALGO | 0.999839 | 5.143765 | {
"github_metadata": {
"branch": "main",
"commit_count": 141,
"repo_created_at": "2023-06-09T17:07: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": "77249a8aad... |
d54c1fae-77a4-4976-bbb5-54a61691bb25 | linhongyi0726/LeetCodePractice | 0169.cpp | // Second time
/*
remove majority and non-majority number together, the remain number is answer
T: O(n)/S: O(1)
*/
class Solution {
public:
int majorityElement(vector<int>& nums) {
int maj = 0, cnt = 0;
for (int num : nums) {
if (num == maj) {
cnt++;
}... | ALGO | 0.999992 | 6.040414 | {
"github_metadata": {
"branch": "master",
"commit_count": 78,
"repo_created_at": "2020-07-14T04:37: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": "6d3f93256... |
6b145c11-9a38-4e7e-ad5b-ec63193a1a75 | agomezomg/lab5anagomez | main.cpp | #include <iostream>
#include <vector>
#include "matrix.h"
using namespace std;
int main()
{
int choice;
vector<matrix*> matrixList;
vector<matrix*> matrixList2;
do {
cout << "1. Agregar matriz. \n"; //ya
cout << "2. Sumar matrices. \n"; //ya
cout << "3. Menos unario. \n"; //ya
cout << "4. Restar matrices.... | ALGO | 0.988888 | 3.936352 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2016-08-26T19:30: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": "4ccecef56... |
36cd2660-075b-428e-8050-fd74779eddcd | nikhileshj23/AlgoArena-2.0-Codes | PS 4/CF 543A.cpp | #include<iostream>
#include<fstream>
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ff first
#define ss second
#define all(x) x.begin(),x.end()
#define rall(x) x.rbegin(),x.rend()
#define FOR(i,b) for(int i=0;i<b;i++)
#define FORwi(i,a,b) for(int i=a;i<b;i++)
#define get(v) FOR(i,(int)v.size(... | ALGO | 0.999941 | 4.087042 | {
"github_metadata": {
"branch": "main",
"commit_count": 73,
"repo_created_at": "2024-05-09T08:32: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": "566dd513675... |
77730084-c41f-4ce4-b7ee-f45a68c4a45e | HekpoMaH/Olimpiads | bubble cup/spiralgr.cpp | #include<iostream>
#include<cstring>
#include<queue>
using namespace std;
int er[10009],tab[303][303],cn,iy,ix,px,py,sp,sw,br,wx,wy,wx2,wy2,used[303][303];int x,y;
void solve()
{
for(int i=1;i<=300;i++)
{
for(int j=1;j<=300;j++)
{
if(tab[i][j]==x)wx=i,wy=j;
if(tab[i][j]=... | ALGO | 0.999396 | 3.533988 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-10-04T16:17:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d37cf622b6... |
e8daf7ef-7a2f-4906-b7d7-7499656938c8 | OsvaldoRodriguez/Competitive_Programming | Contests/Codeforces/295B.cpp | #include <bits/stdc++.h>
#define FIN ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ii pair<int,int>
#define F first
#define S second
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define fore(i,a,b... | ALGO | 0.999941 | 4.015897 | {
"github_metadata": {
"branch": "master",
"commit_count": 1457,
"repo_created_at": "2020-07-31T19:59: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": "8549353... |
ddaf1383-7f68-460c-b7ee-687e694fdf04 | fitzbertp/CPP | fibonacci.cpp |
#include <iostream>
#include <vector>
using namespace std;
int fib(int n) {
vector<int> seq = {1, 1};
for (int i = 1; i < n - 1; i++) {
seq.push_back(seq[i] + seq[i - 1]);
}
return seq[n - 1];
}
void printFib() {
bool running = true;
while (running) {
long n;
cout << ... | ALGO | 0.998235 | 4.490401 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2020-10-20T16:34: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": "1099b918552a... |
74153ce1-b35b-41e2-9296-362bfcd17230 | saifullah3396/team-nust-robocup-v2 | src/Utils/include/Solvers/MotionEquationSolver.h | /**
* @file PlanningBehaviors/KickSequence/MotionEquationSolver.h
*
* This file declares the class MotionEquationSolver
*
* @author <A href="mailto:<EMAIL>">Saifullah</A>
* @date 17 Jul 2018
*/
#pragma once
#include "Utils/include/Solvers/NLOptimizer.h"
#include "Utils/include/MathsUtils.h"
#include "Utils/i... | ALGO | 0.999848 | 6.125296 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2019-03-08T15:14:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8fb72f11c... |
e356267f-cff9-4821-b757-c320261348d1 | alikahawa/Ray-Tracing | Code/src/main.cpp | #ifdef __APPLE__
#include <GLUT/glut.h>
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/glut.h>
#endif
#ifdef WIN32
#include <windows.h>
#endif
#include <stdlib.h>
#include <math.h>
#include <assert.h>
#include <thread>
#include "raytracing.h"
#include "mesh.h"
#include "mouse.h"
#include "imageWriter... | TOOL | 0.964723 | 4.869535 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-05-03T12:21:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9dc04046e8... |
c5ea9858-a92d-4d5a-bb78-f52beac803c5 | Princechorasiya/programming_practice | cpp/daa/new/greedy/greedy.cpp | #include <bits/stdc++.h>
#include "print.h"
using namespace std;
// defination of print function print the vector
// knap sack greedy about the profit
vector<float> fillKnapSack(vector<int> profit, vector<int> weight, int n, int m)
{
// greedy for profit
double total_profit = 0;
vector<float> ans(weight.size()... | ALGO | 0.999943 | 3.814035 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-06-29T11:32: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": "621cfa810138... |
eeab1bcb-0e53-43b6-990f-96c654b07e59 | iamnotalone1993/test | laptop/reclamation/stack_treiber.cpp | #include <cstdint> // uint64_t...
#include <iostream> // std::cout...
#include <thread> // std::thread...
#include <atomic> // std::atomic...
#include <cassert> // assert...
#include <iostream> // std::cout...
#include "HEBR.h" // mem_manager...
/* Shared constants */
const uint64_t NUM_OF_THREADS = std::thread::hard... | ALGO | 0.908135 | 5.659398 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2020-11-08T11: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": "f8aaefc07... |
256de685-65b2-4672-a808-8a4c5bb49144 | McCoyGroup/Psience | ci/tests/TestData/LegacyMBPol/libs/mbpol/mbpol/ttm4-smear.cpp | #include <cmath>
#include <cassert>
#include <iostream>
#include "gammq.h"
#include "macros.h"
////////////////////////////////////////////////////////////////////////////////
namespace ttm4 {
//----------------------------------------------------------------------------//
void smear01(const double& RESTRICT r12,... | ALGO | 0.998849 | 5.024255 | {
"github_metadata": {
"branch": "master",
"commit_count": 712,
"repo_created_at": "2019-05-27T23:23:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "78b47612e... |
c793311f-7ff4-456b-8b1f-574d75e1e2ec | 984727216/oj1 | HDU/3085/13362890_AC_452ms_2956kB.cpp | #include <iostream>
#include <cstdio>
#include <queue>
#include <cmath>
#include <cstring>
using namespace std;
const int MAXN = 1000;
int dist[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
char key[MAXN][MAXN];
struct _Node {
int x, y;
};
_Node ghosts[2];
int step;
int t, n, m;
bool check(_Node t) {
if(t.x < 1 || t.x... | ALGO | 0.999785 | 3.672868 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2018-04-07T13:21: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": "806a0e386... |
17a88d55-2db3-42c4-af8f-27fef7a0284f | tanmay-pro/CompProg | cses/stick_lengths.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define PI 3.14159265
#define br cout << endl
#define fo(i, n) for (int i = 0; i < n; i++)
#define Fo(i, k, n) for (int i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1)
#define tr(container, it) \
for (auto it = container.begin(); it != contai... | ALGO | 0.999842 | 4.062886 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2023-03-09T17:11: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": "a23e8461775f... |
daf1fc04-a1e3-4c85-8c68-73b2b7f82ea4 | beliefy/luogu | Graph/ziliaofenfa.cpp | #include<bits/stdc++.h>
using namespace std;
int n, m, fa[100010], ans;
bool vis[100010];
inline int find(int x)
{
return (fa[x] == x ? x : fa[x] = find(fa[x]));
}
inline void unionn(int x, int y)
{
int xx = find(x);
int yy = find(y);
if (xx != yy)
fa[xx] = yy;
return;
}
int main()
{
ci... | ALGO | 0.99994 | 3.776954 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2020-08-14T13:50:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2b4315f88... |
78002dec-7df8-4f8f-b5d5-e32197e96528 | stew-pouch/dont-burn-bridges | homework/Crappy_Binary_Numerals.cpp | #include <iostream>
int main() {
using namespace std;
int decimalInput = 0, placeholder = 0, stack = 0, lead = 1;
cout << "Please enter a positive integer: ";
cin >> decimalInput;
if (decimalInput < 0){
cout << "Invalid input." << endl;
return 200;
}
cout << endl;
cout <... | ALGO | 0.999474 | 5.098154 | {
"github_metadata": {
"branch": "main",
"commit_count": 97,
"repo_created_at": "2021-08-20T02:03: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": "13d7e3d4a32... |
1c085c45-f9b1-4568-97ef-d143ef57c486 | EmranZZ/2020831040_AI-Assignment | AI SEARCH TECHNIQUES/DLS/DLS.cpp | #include <iostream>
#include <vector>
using namespace std;
const int N = 100;
vector<int> g[N];
bool visited[N];
vector<int> path;
// DLS function with depth limit
bool dls(int vertex, int goalNode, int limit) {
visited[vertex] = true;
path.push_back(vertex);
// Check if we reached the goal node
if (... | ALGO | 0.999992 | 6.291099 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2024-02-20T17:50: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": "adfe1b60af5... |
c7088a61-3eeb-49a7-b4d4-67a22afc9a7d | TianfaYao/ADRC_AutoQuadrotor | 1.code/uav/uav_filter.cpp | #include "uav_filter.h"
Filter filter;
/*----------------------一阶低通滤波器系数计算-------------------------*/
float Filter::LPF_1st_Factor_Cal(float deltaT, float Fcut)
{
return deltaT / (deltaT + 1 / (2 * M_PI * Fcut));
}
/*----------------------一阶低通滤波器------------------------*/
Vector3f Filter::LPF_1st(Vector3f oldData, ... | ALGO | 0.986494 | 4.273072 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2017-10-24T02:36:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 38,
"forks": 38,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5111833e... |
e471ab5f-a47f-483f-89ed-32bb262fa759 | faterazer/LeetCode | 2658. Maximum Number of Fish in a Grid/Solution.cpp | #include <functional>
#include <vector>
using namespace std;
class Solution {
public:
int findMaxFish(vector<vector<int>>& grid)
{
int m = grid.size(), n = grid[0].size(), ans = 0;
function<int(int, int)> dfs = [&](int r, int c) -> int {
if (r < 0 || r >= m || c < 0 || c >= n || gr... | ALGO | 0.999942 | 5.399406 | {
"github_metadata": {
"branch": "master",
"commit_count": 2063,
"repo_created_at": "2018-04-10T01:40:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "038050d... |
4d225992-3448-4c30-bdd5-174199baf565 | MaxSprog/infa | first_semester11/132pre-post-.cpp | #include <iostream>
using namespace std;
class BinTree{
private:
typedef struct node {
int data;
struct node* rt;
struct node* lt;
}tree;
void free(struct node* leaf){
if(!leaf) return;
struct node* lt = leaf->lt, *rt = leaf->rt;
... | ALGO | 0.999958 | 4.660902 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2021-03-02T06:23:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec05dc4d1... |
47853681-0b25-42c0-911f-e38681924046 | jonatas57/maratona | uva/11281-TriangularPegsInRoundHoles.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef map<int, int> mii;
typedef pair<int, int> ii;
#define INF 0x3f3f3f3f
#define INFLL 0x3f3f3f3f3f3f3f3... | ALGO | 0.999767 | 3.9912 | {
"github_metadata": {
"branch": "master",
"commit_count": 225,
"repo_created_at": "2019-02-13T13:09: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": "3c8e57a4... |
faa4f745-0fe1-47f3-bc2a-34dc984044b1 | KenAuXD/PolyU-work | COMP1011/Comp1011 A5.cpp | #include <bits/stdc++.h>
using namespace std;
int total(int arr[], int n){
int total = 0;
for(int i = 0; i < n; i++) total += arr[i];
return total;
}
int largest(int arr[], int n){
int max = arr[0];
for(int i = 1; i < n; i++){
if(max < arr[i]) max = arr[i];
}
return max;
}
int smallest(int arr[], int n){
i... | ALGO | 0.996037 | 3.178595 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2024-02-05T05:02:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "156d1106629... |
9368afff-0c3d-4dd0-9edb-87d860adf5f1 | kkruskamp/211 | p7/main.cpp | //BINARY SEARCH TREE
//Kkruskamp, Kyle
//kkruskamp
#include <iostream>
#include <vector>
#include "bst.h"
using namespace std;
int main()
{
Tree tree;
string arg;
string command;
while (cin >> command)
{
if (command == "echo")
{
cin.ignore();
getline(cin, arg);
... | ALGO | 0.998551 | 4.558834 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-09-13T06:06: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": "5fcfa42e3e... |
9b9fdc19-8bed-4d64-9734-cf81659053b4 | hobin01/baekjoon | c++/2210.cpp | #include <iostream>
#include <algorithm>
#include <queue>
#include <set>
#include <string>
using namespace std;
int numbers[5][5];
int dy[4] = { 1,-1,0,0 };
int dx[4] = { 0,0,1,-1 };
set<int> s;
void init()
{
for (int i = 0; i < 5; i++) {
for (int j = 0; j < 5; j++) {
cin >> numbers[i][j];
}
}
}
void bfs(i... | ALGO | 0.998653 | 4.076623 | {
"github_metadata": {
"branch": "master",
"commit_count": 298,
"repo_created_at": "2020-11-07T14:59:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "be04df71... |
bb6e693d-9b39-4283-9159-66cad7f2c480 | NovaMods/rex_core | include/rx/math/vec3.h | #ifndef RX_MATH_VEC3_H
#define RX_MATH_VEC3_H
#include "rx/core/types.h" // rx_size
#include "rx/core/format.h" // format
#include "rx/core/hash.h" // hash, hash_combine
#include "rx/core/assert.h" // RX_ASSERT
#include "rx/core/math/sqrt.h"
#include "rx/core/math/sign.h"
#include "rx/core/math/abs.h"
#include "rx/co... | TOOL | 0.909512 | 7.396859 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2020-02-28T06:11:55.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b9dde75205... |
4b1ec2d4-e55e-4e57-96af-266e58b94fbb | SarthakPatil11/DSA-CP | 006_Mentoring/add_one.cpp | #include<iostream>
#include<stdlib.h>
using namespace std;
struct node {
int val;
struct node *next;
}*head = NULL, *tail = NULL;
int ct = 0;
string pal1, pal2;
void insert(int val) {
struct node *temp = (struct node*) malloc(sizeof(struct node));
temp->val = val;
temp->next = NULL;
if(head == NULL) {
head = t... | ALGO | 0.999907 | 3.912273 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-02-07T07:50: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": "13878733e285... |
a94e8492-88ff-4f15-9de7-2a44a8b1d979 | mission-rnd/MRNDC2017_MockTest1 | spec/Problem4Spec.cpp | #include "stdafx.h"
#include "../src/Problem4.cpp"
using namespace System;
using namespace System::Text;
using namespace System::Collections::Generic;
using namespace Microsoft::VisualStudio::TestTools::UnitTesting;
namespace spec
{
[TestClass]
public ref class Problem4Spec
{
private:
TestContext^ testContextIn... | TEST | 0.985957 | 4.244275 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-11-05T12:25: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": "189f4f14919... |
124b6136-47fa-433b-b610-1dc26d585a92 | Xilinx/SDAccel_Examples | getting_started/clk_freq/split_kernel_c/src/sketch.cpp | /**********
Copyright (c) 2018, Xilinx, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the fol... | ALGO | 0.996096 | 4.808099 | {
"github_metadata": {
"branch": "master",
"commit_count": 1731,
"repo_created_at": "2016-08-05T17:34:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 358,
"forks": 210,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "0669... |
8002e6f8-a588-4d75-8621-9e4b371bf241 | masterace007/codeforces_harwest | codeforces/122/A.cpp | #include "bits/stdc++.h"
#define endl '\n'
#define pb push_back
#define mod 1000000007
#define int long long int
#define hii cout<<"yes\n";
#define all(x) x.begin(),x.end()
#define deb(x) cout<<#x<<" : "<<x<<"\n";
#define FASTIO ios_base::sync_with_stdio(0);cin.tie(0);cout... | ALGO | 0.999123 | 3.949735 | {
"github_metadata": {
"branch": "master",
"commit_count": 827,
"repo_created_at": "2021-01-16T12:40:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "261f27e7... |
71bd48fc-8b0e-4e7c-a2ef-42dc4e9b25c0 | MostakemHossain/Tree-Ds | createTreeBinary.cpp | #include<bits/stdc++.h>
using namespace std;
class node{
public:
int date;
node*left;
node* right;
node(int data){
this->date=data;
this->left=NULL;
this->right=NULL;
}
};
node* buildTree(node *root){
cout<<"Enter the data"<<endl;
int data;
cin>... | ALGO | 0.999809 | 4.556763 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-11-06T16:33: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": "f490cfa08e28... |
2a187b1f-40c2-4a5f-9213-79cdaedf62b9 | Teamforalgorithm/study_codes | rokwon/3-2_기초_다이나믹프로그래밍_1/1149_RGB거리.cpp | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int N;
int min_value = 2100000000;
cin >> N;
vector< vector<int> > arr(3, vector<int> (N,0));
vector< vector<int> > sum_arr(3, vector<int>(N, 0));... | ALGO | 0.999812 | 3.710652 | {
"github_metadata": {
"branch": "master",
"commit_count": 121,
"repo_created_at": "2020-01-07T08:22:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "29777f86c... |
9d58804d-5fc2-420d-a53b-01a20074d203 | jansv7/UTS | Soal UTS NO.3.cpp | #include<iostream>
using namespace std;
int penjumlahan(int x, int y)
{
return x+y;
}
int pengurangan(int x, int y)
{
return x-y;
}
int perkalian(int x, int y)
{
return x*y;
}
double pembagian(int x, int y) {
if (y != 0) {
return static_cast<double>(x) / y;
} else {
cout << "Error: ... | TOOL | 0.935369 | 4.057383 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-04T01:56: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": "f34a10c1c39a... |
996638c5-9acb-4483-8dd9-6687559b96fa | ivankra/acm | third_party/abednego/number.cpp | /**
* /////////////////////////////////
* // Number Theoretic Algorithms //
* /////////////////////////////////
*
* Contents:
* - GCD (Euclidean algorithm)
* - extended GCD
* - modular linear equation solver
* - linear Diophantine equation solver
* - modular inverse
* - su... | ALGO | 0.99977 | 5.290602 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2010-01-03T06:51:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 118,
"forks": 43,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "5ff95c... |
c3846445-4220-4883-a554-440e3dd42f95 | Altynai/LeetCode | number-of-increasing-paths-in-a-grid/answer.cpp | const int N = 1002;
const int MOD = 1e9 + 7;
const int dx[] = {-1, 0, 1, 0};
const int dy[] = {0, 1, 0, -1};
inline bool inside(int n, int m, int r, int c) {
return r >= 0 && r < n && c >= 0 && c < m;
}
int dp[N][N];
class Solution {
public:
int countPaths(vector<vector<int>> &a) {
int n = a.size(), m = a[0]... | ALGO | 0.999978 | 5.310568 | {
"github_metadata": {
"branch": "master",
"commit_count": 2981,
"repo_created_at": "2014-02-07T14:14:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 21,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "6b0bbc... |
9b2beb9b-74f8-47e1-95d6-c6728605544f | eat-swap/LeetCodeDaily | cpp/more/0005.cpp | #include <string>
#include <iostream>
class Solution {
public:
static std::string longestPalindrome(const std::string& s) {
int n = s.length(), centre, len = 0;
for (int i = 0; i < n; ++i) {
int L = i, R = i;
while (L - 1 >= 0 && R + 1 < n && s[L - 1] == s[R + 1]) {
--L, ++R;
}
if (len < R - L + 1... | ALGO | 0.999809 | 6.187916 | {
"github_metadata": {
"branch": "master",
"commit_count": 613,
"repo_created_at": "2021-12-25T04:02:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "19720d18... |
9627111e-96e2-4e32-846d-4613c0c229ba | VivekKumarMishra1301/competative-coding | Codechef Contests/starter63_avoid_sqaure.cpp | #include <iostream>
using namespace std;
bool isperf(int x)
{
int i = 1;
while (i * i <= x)
{
if (i * i == x)
{
return true;
}
i++;
}
return false;
}
int main()
{
// your code goes here
int t;
cin >> t;
while (t--)
{
int n;
... | ALGO | 0.999979 | 4.386359 | {
"github_metadata": {
"branch": "master",
"commit_count": 608,
"repo_created_at": "2022-08-19T19:24: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": "85c31680... |
31b1056b-1c25-47c3-836d-d1056321420d | iYiYaHa/coding-practices | coding-interviews/cpp/59.1.maximum-in-sliding-windows.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
// Leetcode 239.
class SolutionA
{
public:
vector<int> maxInWindows(const vector<int> &nums, unsigned int size)
{
deque<int> maximum;
vector<int> ans;
for (int i = 0; i < nums.size(); ++i)
{
... | ALGO | 0.999968 | 6.491431 | {
"github_metadata": {
"branch": "master",
"commit_count": 577,
"repo_created_at": "2018-09-23T16:28:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "262bf853... |
509a07b4-9387-4b31-ac35-947351bcc43d | StevenEnsea/plt | src/shared/engine/Attack.cpp | #include "Attack.h"
#include <iostream>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <tuple>
#include <vector>
using namespace engine;
using namespace state;
using namespace std;
Attack::Attack (std::pair<int,int> newPosTarget, int newnSkill){
id = ATTACK;
n = newnSkill;
nSkill = newnSkill... | TOOL | 0.973828 | 3.904696 | {
"github_metadata": {
"branch": "master",
"commit_count": 212,
"repo_created_at": "2019-09-18T15:03:02.000Z",
"is_fork": true,
"is_org_owned": false,
"forked_from": "cbares/plt",
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4... |
caff0448-a477-4c0e-a433-c787ecf28a75 | AlexUmyskov/Video_compare | Utils.cpp | #include <fstream>
#include <nlohmann/json.hpp>
#include "Utils.h"
using json = nlohmann::json;
pair<int, float> correlation(const vector<float>& signal, const vector<float>& pattern)
{
Mat mat_signal(1, static_cast<int>(signal.size()), CV_32F, const_cast<float*>(signal.data()));
Mat mat_pattern(1, static_c... | ALGO | 0.923311 | 5.258458 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-05-26T20:05:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 13,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f90a5e894c... |
99983ba5-b70a-458b-86d1-a4dee5255e38 | thighburger/CPP2409-P | Sources/baek/10845/baek_10845_input_code.cpp | #include <iostream>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <random>
#include <string>
#include <chrono>
using namespace std;
int main(int argc, char* argv[]) {
// 명령 개수 설정 (명령행 인자로 받을 수 있도록 수정)
int N;
if (argc > 1) {
try {
N = stoi(argv[1]); // 명령행 인자 파싱
... | TOOL | 0.930999 | 5.168449 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2024-11-17T12:08: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": "f0e02755efa... |
94b486cd-5ff5-4947-bb1c-63fdc6ee80c8 | hasib9963/OPP-task | 5_polymorphism.cpp | // Polymorphism in C++ allows objects of different classes to be treated as objects of a common superclass.
#include<bits/stdc++.h>
using namespace std;
// Base class
class Shape {
public:
// Virtual function for calculating area
virtual float calculate_area() {
return 0;
}
};
// Derived class f... | ALGO | 0.997465 | 6.616852 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-05-14T04:52: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": "31c7f0b42d24... |
79ff9d6a-42c3-4661-96c2-6589d181e8cc | phuong-dinhmai/Cpp | codeforce/484D.cpp | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll inf = 1e18, N = 1e6+7;
int n, a[N];
ll f[N][2][2];
main(){
//freopen("in.inp","r",stdin);
scanf("%d", &n);
for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
for (int i = 0; i <= n; i++)
for (int j = 0; j < 2; j++)
for (int k = 0; k... | ALGO | 0.999942 | 3.463779 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-01-08T04:54: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": "5a9af7a45b... |
9ef4ddd2-c45a-4e4e-9096-6d3a4877f38c | Sh3ra/MyOwnCoding | Problem Solving/C++/codeforces_problems/cifera.cpp | #include<bits/stdc++.h>
#define MOD 1000000007
using namespace std;
long long fast_power(long long base, long long power) {
long long result = 1;
while(power > 0) {
if(power & 1) { // Can also use (power & 1) to make code even faster
result = (result*base) % MOD;
}
base = (b... | ALGO | 0.999985 | 3.81903 | {
"github_metadata": {
"branch": "master",
"commit_count": 68,
"repo_created_at": "2020-02-28T05:54:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 6
},
"file_meta": {
"content_id": "2cbc5dbca... |
0a6f9191-58d2-4d1a-8ac1-fd509ebe0b90 | ishandutta2007/codeforces-l | lomienyeet/normal/1373/G.cpp | #include <iostream>
#include <set>
#include <cmath>
using namespace std;
#define int long long
const int mxN=1e6+5;
struct node{
int sum,lazy;
}segtree[mxN<<2];
void pushdown(int idx){
if(segtree[idx].lazy){
segtree[idx<<1].sum+=segtree[idx].lazy;
segtree[idx<<1].lazy+=segtree[idx].lazy;
... | ALGO | 0.999955 | 3.911999 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:17: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": "500985ad227c... |
772c6b3c-f618-4f8f-a7c0-0baafcd26c4a | sagarpawardev/ccdsap | disjoint set union/DISHOWN.cpp | //
// Created by <NAME> on 18/04/20.
//
/**
* Problem: DISHOWN
*
* Basic Logic:
* Use a disjoint set to keep the record of groups initially assigning leader as itself
* if query type = 1 -> merge the two groups and assign leader with max value
* if query type = 2 -> show the leader of the group
*
* Time Complex... | ALGO | 0.999951 | 4.876172 | {
"github_metadata": {
"branch": "master",
"commit_count": 90,
"repo_created_at": "2020-03-21T19:20: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": "103da4379... |
1d66158f-4333-46c3-9fc5-2e3bfdf8b172 | ashrwin/Spoj-Solutions | solutions/ChopAhoy!Revisited!.cpp | #include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cst... | ALGO | 0.999623 | 3.514717 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2016-02-13T10:25:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6fc1756db0... |
eac903ec-a16b-4030-89fb-493f31cadbf0 | Hong-kee/Algorithm-Study | Hongki/BruteForce/Programmers42840.cpp | #include <string>
#include <vector>
#include <algorithm>
using namespace std;
vector<int> solution(vector<int> answers) {
vector<int> answer;
vector<pair<int, int>> ranking;
int giveUp1[5] = { 1, 2, 3, 4, 5 };
int giveUp2[8] = { 2, 1, 2, 3, 2, 4, 2, 5 };
int giveUp3[10] = { 3, 3, 1, 1, 2, 2, ... | ALGO | 0.999966 | 5.033795 | {
"github_metadata": {
"branch": "main",
"commit_count": 355,
"repo_created_at": "2021-12-21T11:00:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1f99c5fe59... |
38cb81d7-7e63-472d-b9ee-95a265ef997a | sharc-lab/FPGA_ECE8893 | 2022_Spring/Final_Projects/LSTM-inference/source_code/Golden_C++/main.cpp | #include <iostream>
#include "LSTM_Unit.h"
const int NUM_UNITS = 5;
const int SEQ_LENGTH = 59;
double lstmInference(const double inputs[SEQ_LENGTH], const double w_array[NUM_UNITS*4], const double w_bias[NUM_UNITS*4],
double u_array[NUM_UNITS][NUM_UNITS*4], const double u_bias[NUM_UNITS * 4],
... | ALGO | 0.999832 | 6.641387 | {
"github_metadata": {
"branch": "main",
"commit_count": 218,
"repo_created_at": "2022-01-25T19:25:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 36,
"forks": 37,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b36f8b102... |
35d7f8a4-5ff2-4929-935d-20122534e1b1 | luckqk/OJ-EXERCISE | 清华算法训练营自己的代码/道路升级.cpp | //最小支撑树,Kruskal 算法,其中还包含并查集、路径压缩等知识
#include <bits/stdc++.h>
using namespace std;
const int N = 300005;
vector<int> roadChosen;
int Father[N];
int Find(int son)
{
if (Father[son] != son) {
Father[son] = Find(Father[son]);
}
return Father[son];
}
vector<int> getAnswer(int n, int m, vector<int> U, vector<int> V) ... | ALGO | 0.99999 | 4.464878 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2019-04-04T06:23:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "13dea66c8... |
4749cddb-a2d6-46cd-9f5e-593d354eb81d | imperator765/atcoder | atcoder/abc328/abc328_b/47481138.cpp | #include<bits/stdc++.h>
using namespace std;
bool is_zorome(int x, int y) {
int d = x % 10;
while (x > 0) {
if (x % 10 != d) return false;
x /= 10;
}
while (y > 0) {
if (y % 10 != d) return false;
y /= 10;
}
return true;
}
int main() {
int N;
cin >> N;
int D[N];
for (int i = ... | ALGO | 0.999535 | 3.701758 | {
"github_metadata": {
"branch": "master",
"commit_count": 221,
"repo_created_at": "2023-12-22T14:08: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": "57115ecc... |
8c397f4c-5df6-49c4-b580-59d685c57eb9 | edsomjr/TEP | convert_pdf_to_md/SSP-2/cpp/code_0.cpp | #include <bits/stdc++.h>
using namespace std;
using ii = pair<int, int>;
using edge = tuple<int, int, int>;
const int MAX { 100010 }, oo { 1000000010 };
int dist[MAX];
vector<ii> adj[MAX];
bitset<MAX> processed;
void dijkstra(int s, int N)
{
for (int i = 1; i <= N; ++i)
dist[i] = oo;
dist[s] = 0;
pr... | ALGO | 0.999969 | 4.735248 | {
"github_metadata": {
"branch": "master",
"commit_count": 2072,
"repo_created_at": "2016-07-12T18:57:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 475,
"forks": 155,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "92c... |
2e6e8eb4-bf9b-4ce8-8a3b-d25e1f6e0890 | nachiketkanore/Atcoder-DP-Topdown | S-Digit-Sum/sol.cpp | /**
* Author: <NAME>
* Created: Sunday 15 October 2023 04:07:45 PM IST
**/
#include "bits/stdc++.h"
using namespace std;
#ifdef DEBUG
#include "debug.h"
#else
#define see(...) ;
#endif
#define int int64_t
#define sz(x) (int)(x.size())
#define ALL(x) (x).begin(), (x).end()
#define F0R(i, R) for (int i = (0); ... | ALGO | 0.999898 | 5.184135 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2020-06-09T14:38:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1ff346046... |
7ed90a5d-a2e0-43eb-ac55-dd8172d6de98 | zhouby-zjl/heumpsg | ndnSIM/ns-3/src/ndnSIM/model/lltc/lltc-resilient-routes-generation-for-drtp.hpp | /*
* This work is licensed under CC BY-NC-SA 4.0
* (https://creativecommons.org/licenses/by-nc-sa/4.0/).
* Copyright (c) 2021 <NAME>
*
* This file is a part of "Disruption Resilient Transport Protocol"
* (https://github.com/zhouby-zjl/drtp/).
* Written by <NAME> (<EMAIL>)
*
* This software is protected by the ... | ALGO | 0.949605 | 7.082185 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-08-11T06:41: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": "5c28d7e69575... |
63cfcdaf-9931-4062-a33b-22a5114ca50a | gjamesli2126/leetcode | lc119.cpp | #include <bits/stdc++.h>
#define testMain main
using namespace std;
/*
// Definition for a Node.
class Node {
public:
int val;
Node* left;
Node* right;
Node* next;
Node() : val(0), left(NULL), right(NULL), next(NULL) {}
Node(int _val) : val(_val), left(NULL), right(NULL), next(NULL) {}
N... | ALGO | 0.999931 | 6.055628 | {
"github_metadata": {
"branch": "main",
"commit_count": 51,
"repo_created_at": "2023-03-23T15:46: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": "d8e489ba8bb... |
31982f2f-25bc-4a7a-8eb1-b7bffb9e581e | qtumproject/qtum | src/libff/libff/algebra/exponentiation/exponentiation.tcc | /** @file
*****************************************************************************
Implementation of interfaces for (square-and-multiply) exponentiation.
See exponentiation.hpp .
*****************************************************************************
* @author This file is part of libff, develope... | ALGO | 0.991996 | 7.082549 | {
"github_metadata": {
"branch": "master",
"commit_count": 46429,
"repo_created_at": "2017-03-03T08:17:11.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1215,
"forks": 404,
"issues": 37,
"pull_requests": 3
},
"file_meta": {
"content_id": "4... |
f04b06a2-340f-49f0-bf37-897d1d26a2e8 | sarveshhiwase/CP-Journey | Ladders/A2OJLadders/Ladder1/Panoramix's Prediction 80.cpp | #include<bits/stdc++.h>
#define ll long long int
#define mod 1000000007
#define add insert
#define pb push_back
#define rep(start,n) for(int i = start; i < n; i++)
#define dis(x) cout << x << " ";
#define disnew(x) cout << x << "\n";
#define negmod(a) (a%mod + mod) % mod
using namespace std;
vector<bool> primes(10... | ALGO | 0.999968 | 4.204911 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2021-05-28T05:40: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": "595155e48e... |
ef24d9f3-b128-4e13-8b98-9b5453094a1e | chinhhi102/GiaiThuat | ChuyenTin/Quyen1/ch02_bt22_sieve_miller_rabin.cpp | #include<bits/stdc++.h>
using namespace std;
#define MAXN 10000001
#define int long long
bitset<MAXN> isPrime_Era;
void sieve_Eratosthene(){
isPrime_Era.set();
isPrime_Era[0] = isPrime_Era[1] = 0;
for(int i = 4; i < MAXN; i += 2)
isPrime_Era[i] = 0;
for(int i = 3; i < MAXN; i += 2){
if(isPrime_Era[i]){
for(i... | ALGO | 0.994179 | 3.601801 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-12-01T05: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": "abc8fe54f2... |
eb47a2e4-b9c2-483f-a37e-720d3ce14b1e | omkar-107/base64 | asg6/fractknap.cpp | #include <iostream>
#include <vector>
using namespace std;
// Structure to represent an item
struct Item {
int weight;
int profit;
double ratio; // Profit-weight ratio
};
// Function to solve Fractional Knapsack problem using Largest-profit strategy
double knapsackLargestProfit(vector<Item>& items, int c... | ALGO | 0.999988 | 6.948271 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-12-08T04:13: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": "8780257b61ef... |
cb301e16-90a9-4c69-9d67-03861ae97ea7 | pmhmist/AlgorithmStudy | 백준/단계별 문제풀이(C++)/백준-동적 계획법 1/01932 정수 삼각형.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#define FAST cin.tie(NULL); ios::sync_with_stdio(false);
int arr[501][501] = { 0, };
int main()
{
FAST;
int N;
int temp[501];
int ans = -1;
cin >> N;
for (int i = 1; i <= N; i++)
{
for (int j = 1; j <= i; j++)
{
cin >> te... | ALGO | 0.999985 | 3.449698 | {
"github_metadata": {
"branch": "master",
"commit_count": 225,
"repo_created_at": "2021-07-10T03:32: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": "ba8e6fbf... |
c2981c76-ce80-41dc-b956-fb75bf001bf8 | flylofty/coding_test | 200819Baek1063.cpp | #include <iostream>
#include <string>
typedef struct {
int x, y;
}position;
using namespace std;
position k, s;
string king{ NULL };
string stone{ NULL };
int N;
int dir[4][2]{ {-1, 0}, {0, 1}, {1, 0}, {0, -1} }; // 위, 오른, 아래, 왼
int main() {
cin >> king >> stone >> N;
k.x = 8 - (king[1] - '0');
k.y = king[0]... | ALGO | 0.99979 | 3.521682 | {
"github_metadata": {
"branch": "master",
"commit_count": 182,
"repo_created_at": "2020-07-06T14:26: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": "65bccee4... |
45296d53-13cb-4120-9c7b-c274d4395f53 | uzh-rpg/rpg_dvs_evo_open | dvs_mapping/include/dvs_depth_from_defocus/depth_vector.hpp | #include "evo_utils/geometry.hpp"
namespace depth_from_defocus {
// Stores a set of data associations index <-> depth
// Used to abstract how the depth is sampled
// Uses the "Curiously Recursive Template Pattern" to allow static polymorphism
// for performance (since these functions will be called very often)
// T... | TOOL | 0.910387 | 6.763239 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2021-05-26T17:07:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 175,
"forks": 43,
"issues": 23,
"pull_requests": 1
},
"file_meta": {
"content_id": "865e7a... |
b1310975-f9cb-43a1-af6d-b5f3ae9cda3d | devosoft/avida | avida-core/source/cpu/cCodeLabel.cc | /*
* cCodeLabel.cc
* Avida
*
* Called "code_label.cc" prior to 11/22/05.
* Copyright 1999-2011 Michigan State University. All rights reserved.
* Copyright 1993-2003 California Institute of Technology.
*
*
* This file is part of Avida.
*
* Avida is free software; you can redistribute it and/or modify i... | TOOL | 0.92851 | 3.867589 | {
"github_metadata": {
"branch": "master",
"commit_count": 4555,
"repo_created_at": "2010-11-05T14:27:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 625,
"forks": 116,
"issues": 26,
"pull_requests": 3
},
"file_meta": {
"content_id": "248... |
b3feede3-b06f-4fe6-9fab-e70bfd085c24 | raincross7/code-similarity | codes/train_code/problem174/problem174_260.cpp | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define Rep(i, n) for(int i=0... | ALGO | 0.999961 | 4.073164 | {
"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": "dd318c93a060... |
c9676258-6ea5-40a8-bdbc-f5544f4f7a8d | matheushjs/ElfPSP_AntColony | src/acopredictor_ant_cycle.cc | #include <iostream>
#include <vector>
/** \file acopredictor_ant_cycle.cc */
#include "acopredictor.h"
using std::cout;
using std::cerr;
using std::vector;
using std::string;
void ACOPredictor::perform_cycle(vector<ACOSolution> &antsSolutions, int *nContacts){
// Let each ant develop a solution
for(int j = 0; j <... | ALGO | 0.999962 | 4.743164 | {
"github_metadata": {
"branch": "master",
"commit_count": 149,
"repo_created_at": "2019-01-02T06:41: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": "5987efd1... |
a18d041d-a942-4038-96cc-a6967e89f9d8 | Xilinx/Vitis_Libraries | codec/L2/demos/jxlEnc/third_partys/lib/jxl/base/descriptive_statistics.cc | // Copyright (c) the JPEG XL 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.
#include "lib/jxl/base/descriptive_statistics.h"
#include <stdio.h>
#include "lib/jxl/base/status.h"
namespace jxl {
void Stats::Assimilate(c... | ALGO | 0.922376 | 7.664536 | {
"github_metadata": {
"branch": "main",
"commit_count": 471,
"repo_created_at": "2019-09-23T19:13:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 988,
"forks": 381,
"issues": 0,
"pull_requests": 12
},
"file_meta": {
"content_id": "4b2a07... |
3986f144-7a1b-4ca0-84e8-cebd2a26d284 | sakshamsood3/DataStructures-and-Algorithms | Trees/TreeFromTraversals.cpp | #include <iostream>
using namespace std;
class Node
{
public:
Node *lchild;
int data;
Node *rchild;
Node(){};
Node(int data)
{
lchild = NULL;
this->data = data;
rchild = NULL;
}
};
class Queue
{
int size;
int rear;
int front;
Node **Q;
public:
Que... | ALGO | 0.999998 | 4.789978 | {
"github_metadata": {
"branch": "main",
"commit_count": 186,
"repo_created_at": "2021-08-04T15:17: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": "1a6cf24bb5... |
38adafee-5d01-4b16-b69d-d73fd64f1e09 | MrCubble/Programas | Festival de Estátuas de Gelo.cpp | #include "bits/stdc++.h"
using namespace std;
int minCoins(int coins[], int m, int V)
{
int table[V+1];
table[0] = 0;
for(int i=1; i<=V; i++)
table[i] = INT_MAX;
for(int i=1; i<=V; i++)
{
for(int j=0; j<m; j++)
{
if(coins[j]<=i)
{
int... | ALGO | 0.999963 | 3.561154 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-07-10T15:57: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": "321fa71178... |
ffbd499c-845a-4192-ab99-507ab4a7c881 | ouassarnifahd/NEACISNE-reverse-it | C++/TP3/src/diffraction.cpp | /**
* @mainpage
*
* Diffraction of a Laguerre-Gaussian LG_p0 beam through an aperture.
*/
#include <gsl/gsl_sf_exp.h>
#include <gsl/gsl_sf_laguerre.h>
#include <gsl/gsl_integration.h>
#include <gsl/gsl_sf_bessel.h>
#include <iostream>
#include <fstream>
#include <cmath>
#include <algorithm>
#include <complex>
#in... | ALGO | 0.998262 | 5.546138 | {
"github_metadata": {
"branch": "master",
"commit_count": 114,
"repo_created_at": "2017-04-07T07:07:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "64755a1d... |
88ee2872-016b-489c-b194-917d2a33f1ad | belight2/bigInteger | big_integer_sub.cpp | #include <string>
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define pb push_back
using namespace std;
bool cmp(string const &a, string const &b){
if(a.size() != b.size()) return a.size() < b.size();
int idx = 0;
while(a[idx] == b[idx]) idx++;
return a[idx] < b[idx];
}
string sub(con... | ALGO | 0.999795 | 4.515259 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-03-24T08:46:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4eb393b54a3e... |
687fb709-7ca5-47e0-ac13-ff805be81ad8 | Odyflame/ProgrammersCodingPractice | 2019 카카오 개발자 겨울 인턴십/Q3.cpp | /* 2015112119 이현재 */
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <sstream>
#include <map>
#include <set>
using namespace std;
vector<int> solution(vector<string> gems) {
vector<int> answer;
vector<string> gems2 = gems;
pair<int, int> tempAnswer = { 0, 100001 };
sort(g... | ALGO | 0.999874 | 4.269145 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2020-03-15T11:41: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": "de3f6f6da... |
ada6a3df-aefd-4a9e-b977-66575f2809f5 | JeremyHepker/GlowCurveAnalysis | src/smartPeakDetect.cpp | //
// smartPeakDetect.cpp
// GlowCurveAnalsys
//
// Created by <NAME> on 7/9/19.
// Copyright © 2019 <NAME>. All rights reserved.
//
#include "smartPeakDetect.hpp"
void smartPoints(std::vector<double>& x, std::vector<double>& y, std::vector<int>& minimum,std::vector<int>& maxima,std::vector<double> derivative,std... | ALGO | 0.9991 | 3.743249 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2019-01-09T22:25: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": "d813727d9... |
c3719bae-4d50-4dd0-a8d1-cac5d72fe8ee | jessechoe10/USACO | Plat/nocross.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
#define forn(i, n) for(ll i = 0; i < n; i++)
#define rofn(i, n) for(ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for(ll i = a; i < b; i++)
#define all(x) begin(x), end(x)
#define sor(x) sort(all(x))
#define rsor(x) sort(all(... | ALGO | 0.999939 | 3.917619 | {
"github_metadata": {
"branch": "main",
"commit_count": 59,
"repo_created_at": "2022-09-04T16:22:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7c403b9d3eb... |
b03d3b25-743a-4c9d-97fc-9a74fb92ad72 | Park-jung-ho/algorithm | 백준/Bronze/31458. !!초콜릿 중독 주의!!/!!초콜릿 중독 주의!!.cc | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ip = pair<int, int>;
using ld = long double;
using lp = pair<ll, ll>;
#define all(v) (v).begin(), (v).end()
#define f first
#define s second
#define mp make_pair
#define pb push_back
#ifndef ONLINE_JUDGE
#include... | ALGO | 0.997401 | 3.80854 | {
"github_metadata": {
"branch": "main",
"commit_count": 453,
"repo_created_at": "2023-02-03T08:23: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": "ffcc3ec79a... |
796229e3-ed83-45fc-a1b7-2a05b869e9f6 | renweizhukov/LeetCode | L275_H-IndexII/Solution.cpp | class Solution
{
public:
int hIndex(vector<int>& citations)
{
int n = citations.size();
// If the vector is empty, return 0 immediately.
if (n == 0)
{
return 0;
}
// The range of the maximum hIndex is [0, n]. Except for the
// case that h = 0... | ALGO | 0.999975 | 6.019426 | {
"github_metadata": {
"branch": "master",
"commit_count": 59,
"repo_created_at": "2015-06-28T01:34: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": "f1995a8fd... |
99996287-5e72-469f-9a45-e8eeff35bbc2 | Pranto2003/Codeforces | PlusMinusSplit.cpp | #include <iostream>
#include <cmath>
#include <vector>
using namespace std;
int main()
{
int t;
cin >> t;
vector<int> results;
while (t--)
{
int size, plus = 0, minus = 0, answer;
cin >> size;
char *arr = new char[size];
for (int i = 0; i < size; i++)
{
... | ALGO | 0.999842 | 4.023648 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-04-06T01:41: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": "e6c1c4d33a2... |
c3ba34eb-f793-403d-8101-399ee58f2205 | Le-Thi-Kieu-Giang/Design-a-system-of-watering-the-plants-by-mobile-SeniorProject2 | Main_Uno.ino | /*
#################################################################
# SENIOR PROJECT 2 #
# TOPIC : DESIGN A SYSTEM OF WATERING THE PLANTS BY MOBILE #
# #
# Advisor: Assoc. Prof. <NAME> #
... | TOOL | 0.914956 | 5.459142 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-08-02T16:49:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "a1ab5de95896... |
8b9278e0-175c-49da-b5ea-e82d13c1ec92 | DmitryVlasov30/TinkoffCourseC | Tree of segments of mass operations/C-Preparing for Arm Warm-Up 2.cpp | //#define _GLIBCXX_DEBUG
#include <iostream>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <algorithm>
#include <set>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <limits>
#include <cmath>
#include <stdio.h>
#include <strstream>
#include <unordered_map>
#include <unor... | ALGO | 0.999876 | 5.742008 | {
"github_metadata": {
"branch": "main",
"commit_count": 131,
"repo_created_at": "2024-12-01T11:02: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": "d0a57e576c... |
87973720-f8c4-42c9-8c79-c8d87dd4a912 | parthasarathi94/LeetCode | 2471. Minimum Number of Operations to Sort a Binary Tree by Level.cpp | //Question Link: https://leetcode.com/problems/minimum-number-of-operations-to-sort-a-binary-tree-by-level/description/
/**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeN... | ALGO | 0.999981 | 6.216647 | {
"github_metadata": {
"branch": "main",
"commit_count": 238,
"repo_created_at": "2024-10-17T13:46: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": "919e6e334f... |
50eda3f2-b84b-4393-ad06-27eb0c627a20 | samofuture/XY-Petri-Scanner | stepper_Petri/stepper_Petri.ino |
/*
Stepper Motor Control - XY Petri Dish
Grid Sizes: [2.172, 1.577], [1.86, 1.351]
Potential Grid Sizes: [2.25, 1.6875], [1.85, 1.3875], [2, 1.5]
*/
#include <AccelStepper.h>
//Make PIE_MOD_X 1 and PIE_MOD_Y 1 to do all of Petri Dish
//Make PIE_MOD_X 1 and PIE_MOD_Y 2 to do 1/2 of Petri Dish
//Make PIE_MOD_... | TOOL | 0.965159 | 6.274861 | {
"github_metadata": {
"branch": "main",
"commit_count": 21,
"repo_created_at": "2022-02-24T03:03: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": "6b54fb5846e... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.