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 |
|---|---|---|---|---|---|---|---|
b6a717e6-fdc6-4d80-9b7c-e0391f52d8ef | mongodb/mongo | src/third_party/boost/libs/numeric/odeint/include/boost/numeric/odeint/stepper/adams_moulton.hpp | /*
[auto_generated]
boost/numeric/odeint/stepper/adams_moulton.hpp
[begin_description]
Implementation of the Adams-Moulton method. This is method is not a real stepper, it is more a helper class
which computes the corrector step in the Adams-Bashforth-Moulton method.
[end_description]
Copyright 2011-2012 <NAME... | ALGO | 0.995916 | 7.149256 | {
"github_metadata": {
"branch": "master",
"commit_count": 90314,
"repo_created_at": "2009-01-15T16:15:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 27329,
"forks": 5655,
"issues": 0,
"pull_requests": 82
},
"file_meta": {
"content_id": ... |
c3183c77-af5b-45ac-bbd6-dd0be18ff3a4 | ishandutta2007/codeforces-r | realcomplex/normal/1137/A.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define fi first
#define se second
#define mp make_pair
#define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const int N = 1010;
int A[N][N];
int li[N][N], lj[N][N], ri[N][N], rj[N][N];
int main(){
fas... | ALGO | 0.999978 | 3.199033 | {
"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": "8384820e6bca... |
76d8d279-eba3-488f-b47f-636b4f7a8939 | Nirraaav/CS101 | Lab08/L08_D2_Q03.cpp | #include <simplecpp>
void swap(long long int &a, long long int &b) {
long double temp = a;
a = b;
b = temp;
}
void bubble_sort(long long int a[], long long int n){
for(long long int i = 0; i < n; i++){
for(long long int j = 0; j < n - i - 1; j++){
if(a[j] > a[j + 1]){
... | ALGO | 0.999956 | 4.087697 | {
"github_metadata": {
"branch": "main",
"commit_count": 81,
"repo_created_at": "2024-01-09T21:33: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": "ba2f9a459b3... |
fbc646e9-8948-4d03-831c-64d0661cceac | ahnafwzz/Alpro | train_linked_list.cpp |
#include <iostream>
using namespace std;
// 1. Menggunakan typedef untuk pointer ke struct Node
typedef struct Node* nodePtr;
class Train {
private:
// 2. Node dengan pointer
struct Node {
char data;
nodePtr next;
};
nodePtr head;
public:
Train() {
head = NULL;
}
... | ALGO | 0.998864 | 5.9928 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-04-21T13:59:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5be3faf9eab3... |
466ad74b-e518-4742-9bc7-6f30801e5bde | tsaiJN/CodingInterview | 7_Math/7.6.cpp | /* Given a two-dimensional graph with points on it, find a line which passes the most number of points */
#include <iostream>
#include <utility> // pair
#include <vector>
#include <math.h> // fabs()
#include <limits>
#include <map>
typedef std::pair<double, double> POINT;
class Line {
public:
double sl... | ALGO | 0.99987 | 5.159155 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2016-12-12T06:31:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6cfeec42c... |
9928e6e2-1ad3-44ba-a208-8102bac6341f | liuyubobobo/Play-Leetcode | 1001-1500/1185-Day-of-the-Week/cpp-1185/main.cpp | /// Source : https://leetcode.com/problems/day-of-the-week/
/// Author : liuyubobobo
/// Time : 2019-09-08
#include <iostream>
#include <vector>
using namespace std;
/// Brute Force
/// Time Complexity: O(year + month + day)
/// Space Complexity: O(1)
class Solution {
public:
string dayOfTheWeek(int day, int ... | ALGO | 0.999857 | 5.000137 | {
"github_metadata": {
"branch": "master",
"commit_count": 2592,
"repo_created_at": "2016-12-01T17:08:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2732,
"forks": 718,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "8d... |
790db40f-c007-44de-8604-8e90b5c8b162 | Enoch2090/VE280 | Lab3/ex3.cpp | #include <iostream>
#include <string>
using namespace std;
int add(int count, int arr[])
{
int ans = 0;
for (int i = 0; i < count; i++)
{
ans += arr[i];
}
return ans;
}
int small(int count, int arr[])
{
int ans = 2147483647;
for (int i = 0; i < count; i++)
{
if (arr[i] ... | ALGO | 0.992644 | 5.166554 | {
"github_metadata": {
"branch": "master",
"commit_count": 78,
"repo_created_at": "2020-05-12T02:41:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1ff410c0d... |
8ec5f812-4f26-4a24-a0da-5aff4aba8408 | Germano-Silva/Programming | Programming in C++/Trilha 1 - Introdução ao C++/04_Estruturas de controle condicional/01_if e else/if_else_v08.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using std::cout;
using std::cin;
using std::endl;
using std::vector;
using std::find;
int main()
{
vector<int> int_vector;
int_vector.push_back(34);
int_vector.push_back(55);
int_vector.push_back(17);
int_vector.push_back(7);
int x;
cout << "... | ALGO | 0.996062 | 4.083569 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2022-11-27T16:44: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": "e41359e6230... |
58f360b1-76c5-4e62-9aba-612af0fd9169 | hakula139/Online-Judge-Solutions | C++/LeetCode/81.search-in-rotated-sorted-array-ii.cpp | /*
* @lc app=leetcode id=81 lang=cpp
*
* [81] Search in Rotated Sorted Array II
*/
// @lc code=start
#include <vector>
class Solution {
public:
bool search(std::vector<int>& nums, int target) {
int begin = 0, end = nums.size();
while (begin < end) {
int mid = begin + (end - begin) / 2;
if (... | ALGO | 0.999975 | 6.756523 | {
"github_metadata": {
"branch": "master",
"commit_count": 178,
"repo_created_at": "2019-08-20T18:23: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": "ed04d682... |
07d32b25-deae-4abd-a999-5abef031420b | omdaelsfa7/ICPC | level 0/J_Thorns_and_Coins.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define FIO \
ios_base::sync_with_stdio(false); \
cin.tie(nullptr); \
cin.tie(nullptr);
void sol()
{
int n = 0, coins = 0;
cin >> n;
string s;
vector<char> v(n);
cin >> s;
... | ALGO | 0.999086 | 3.95069 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2025-03-21T14:23: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": "e2babd912d06... |
cf09bd9b-c958-4e7b-b4f2-e8fd99a1e1d2 | simatiz/MyLabs | lab9/lab9.cpp | #include <iostream>
#include <string>
#include <stdio.h>
#include <cstring>
using namespace std;
bool whether_is_contained(string, string*, int);
int define_index(string*, int, string);
string* array_of_words(string, int*, int&, char = ' ');
string create_string(string*, int);
void output_repetition(string*, int*, int... | ALGO | 0.99992 | 4.285049 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2021-09-08T10:28: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": "b21ee6a6b... |
eea6a660-5083-4ab4-ad0c-14506d1041f7 | DanielLivingston32/Competitive_Programming | Problems_Solved/Codeforces/C Problems/C_Alphabetic_Removals.cpp | #include <bits/stdc++.h>
#define ll long long
#define ld long int
#define vi vector<int>
#define pii pair<int, int>
#define pb push_back
using namespace std;
// 8""""8
// 8 " eeeee eeeee eeee
// 8e 8 88 8 8 8
// 88 8 8 8e 8 8eee
// 88 e 8 8 88 8 88
// 88eee8 8eee8 88ee8 88ee
// --------MATHS O... | ALGO | 0.999997 | 4.216035 | {
"github_metadata": {
"branch": "master",
"commit_count": 469,
"repo_created_at": "2020-04-30T14:36:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 3,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "d86b7a25... |
4a9b289d-46ca-475b-868e-4b4aa9109f26 | narenpopale/DSA | Recursion/Generate_Parentheses.cpp | // Generate all Balanced Parentheses
// Recursion Tree - Input/Output Method
#include <iostream>
#include <vector>
using namespace std;
void solve(int open, int close, string op, vector<string> &ans)
{
if (open == 0 && close == 0)
{
ans.push_back(op);
return;
}
if (open != 0)
{... | ALGO | 0.999393 | 5.172569 | {
"github_metadata": {
"branch": "main",
"commit_count": 76,
"repo_created_at": "2023-04-23T19:14:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "63aa3d21f16... |
9364b817-da52-4713-b158-51e01f9afce8 | ChaofanChen-fanren/C_Prime_learning | lanqiao/2015/1263.cpp | #include <bits/stdc++.h>
using namespace std;
int n, m;
int main()
{
while (cin >> n >> m) {
m = m + n - 1;
int l = 1, r = m - n + 1;
char str[2010];
while (l <= m - n + 1) {
for (int i = 1; i <= m; i++)
str[i] = '.';
str[m + 1] = '\0';
... | ALGO | 0.999903 | 3.304898 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2022-09-01T09:14: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": "16d98789b... |
b4dbd4d0-d4c4-46f4-a6b4-1e94c8b53518 | VitaminK2001/AlgorithmNotes | graph/bellmanford.cpp | //http://www.wutianqi.com/blog/1912.html
#include <iostream>
using namespace std;
struct Edge{
int u, v;
int weight;
};
const int maxnum = 100;
const int maxint = 999999;
int dis[maxnum];
Edge edge[maxnum];
int source, nodenum, edgenum;
void init(){
cin >> nodenum >> edgenum >> source;
for(int i = 1; i <= nodenum;... | ALGO | 0.999986 | 3.621177 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2022-05-21T11:02: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": "edf4be6fe2e... |
44dc4b22-c4c2-40be-94ac-518667f72d17 | riteme/test | hw/2019-11-15/E.cpp | #pragma comment(linker, "/STACK:16777216")
#include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long i64;
#define NMAX 100000
static int n;
static vector<int> G[NMAX + 10];
static i64 cnt[NMAX + 10], sum[NMAX + 10];
static i64 ans;
void dp(int x, int f) {
... | ALGO | 0.999758 | 4.131948 | {
"github_metadata": {
"branch": "master",
"commit_count": 550,
"repo_created_at": "2015-04-26T07:16:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "fbc42027... |
4c183110-d08e-4745-95a4-5312ab489c30 | ssj-gz/Competitive-Programming | adventofcode/2023/day20/day20_part2_solution.cpp | #include <iostream>
#include <regex>
#include <map>
#include <ranges>
#include <numeric>
#include <cassert>
using namespace std;
struct Module;
struct Pulse
{
enum Type {High, Low};
Module *sender = nullptr;
Type type;
Module *receiver = nullptr;
};
struct Module
{
enum Type { Broadcast, FlipFlo... | ALGO | 0.997838 | 5.664891 | {
"github_metadata": {
"branch": "main",
"commit_count": 6590,
"repo_created_at": "2022-04-27T12:08:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1cd4156db... |
901a4171-791e-4733-981b-32c3dacbd362 | torrvision/spaint | tests/scratch/infermous/main.cpp | //###
#if 0
#include <iostream>
#include <infermous/engines/MeanFieldInferenceEngine.h>
using namespace infermous;
typedef int Label;
struct PPC : PairwisePotentialCalculator<Label>
{
float calculate_potential(const Label& l1, const Label& l2) const
{
return l1 == l2 ? 0.0f : 1.0f;
}
};
int main()
{
Pr... | ALGO | 0.999489 | 6.352269 | {
"github_metadata": {
"branch": "master",
"commit_count": 5490,
"repo_created_at": "2015-09-02T14:00:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 195,
"forks": 54,
"issues": 5,
"pull_requests": 0
},
"file_meta": {
"content_id": "3f2c0... |
6f34ce97-bcd6-4b59-87f9-30e6f30ef407 | mohitsharma1507/C-Programming | Palindrome.c++ | // #include <iostream>
// using namespace std;
// bool isAlphaNums(char ch)
// {
// if ((ch >= '0' && ch <= '9') || (tolower(ch) >= 'a' && tolower(ch) <= 'z'))
// {
// return true;
// }
// return false;
// }
// bool isPalindrome(string s)
// {
// int st = 0, end = s.length() - 1;
// while (st < end)
/... | ALGO | 0.998394 | 5.33097 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2025-06-22T07:18: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": "bd55674f0eb... |
f97c33b1-5d71-4862-8e3c-c97b304b4625 | Salazar99/Slam | src/miner/utils/include/PermGenerator.hh | #pragma once
#include "Location.hh"
#include "minerUtils.hh"
#include <cstdarg>
#include <deque>
#include <numeric>
#include <regex>
#include <string>
#include <unordered_map>
namespace slam {
using Matrix = std::vector<std::vector<size_t>>;
using Row = std::vector<size_t>;
/*! \class PermGenerator
\brief Class... | TOOL | 0.943474 | 6.04807 | {
"github_metadata": {
"branch": "main",
"commit_count": 136,
"repo_created_at": "2023-03-09T07:55:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "64a439377b... |
73c30751-f807-423a-afcd-14211d6f0a3f | hantwofish/my_leetcode | datastruct_learn/leetcode/2589.cpp | #include"../STLCOMMON.h"
#include"../COMMONALO.h"
#include <iostream>
#include <chrono>
#include <thread>
#define TIMEINTERVAL 1
using namespace std;
void timer_function(int seconds) {
std::this_thread::sleep_for(std::chrono::seconds(seconds));
// std::cout << "Timer expired after " << seconds << " seconds" ... | ALGO | 0.999748 | 6.045895 | {
"github_metadata": {
"branch": "main",
"commit_count": 353,
"repo_created_at": "2023-03-10T14:37:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "81b1d852cd... |
b7af3148-a1f5-4f70-ab79-3316a27f46b6 | paul-nema/hackerrank | ProblemSolving/easy/JesseAndCookies/jesseAndCookies.cpp | // https://www.hackerrank.com/challenges/jesse-and-cookies/
#include <bits/stdc++.h>
using namespace std;
vector<string> split_string(string);
/*
* Complete the cookies function below.
*/
//
// k: minimum required sweetness
// A: sweetness of each cookie
//
int cookies( int k, vector< int > A ) {
std::mu... | ALGO | 0.999943 | 4.436845 | {
"github_metadata": {
"branch": "master",
"commit_count": 177,
"repo_created_at": "2018-09-29T03:46: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": "6d02eef6... |
e43cf217-6d6e-49c8-b176-e7643a2dd574 | Ujjwlkushwaha/Data-Structures-and-Algorithm | 12-Binary-Search-Tree/Questions/Recover-BST.cpp | #include<bits/stdc++.h>
using namespace std;
class Node{
public:
int data;
Node* left;
Node* right;
Node(int x){
data = x;
left = right = nullptr;
}
};
// Function to store the inorder
// traversal of the tree in a vector
void findInorder(Node* curr, vector<int>&inorder){
... | ALGO | 0.999994 | 6.039858 | {
"github_metadata": {
"branch": "main",
"commit_count": 80,
"repo_created_at": "2024-02-18T11:12:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2b2f5ce91e0... |
c4533323-d8be-4c39-a8fa-526bf8285d74 | CSPWinterPrinz/Summer-Camp-2017 | Day 3 _ Chieu _ Thay Lee Min Ho _/WEIGHT.cpp | #include <bits/stdc++.h>
//-----------------------------------------------------
/// SOL
/// Phép tính <=> Vs mỗi i, tính Max(i) : i đc chọn làm max trong bnh khoảng? , tính Min(i) : i đc chọn làm min trong bnh khoảng.
/// Res = Sigma(i : 1 -> n) (Max(i) - Min(i)) * a[i]
/// Min(i) : Tính thông qua Left(i) : Chỉ số sa... | ALGO | 0.999986 | 3.733101 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-02-17T02:19: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": "882134beb4d4... |
4aaf091e-84ab-43f6-8c32-f09b0dc30276 | archishmanghos/DSA-Contests | Codeforces/random-problems/1400/79B.cpp | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int mxN = 2e5 + 5;
const int INF = 1e18 + 7;
#ifndef ONLINE_JUDGE
#define debug(x) cerr << #x <<" "; _print(x); cerr << endl;
#else
#define debug(x)
#endif
#ifndef ONLINE_JUDGE
#define debugarr(x,i,j) cerr << #x <<" "; _print(x,i,j); cerr << en... | ALGO | 0.999922 | 4.425467 | {
"github_metadata": {
"branch": "master",
"commit_count": 2328,
"repo_created_at": "2021-08-03T05:06:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "afd4709... |
a7529cea-b76a-449e-8496-473fe11fcfa6 | RonaldSchotman/Zebro | Locomotion/MaxPlusCalc.cpp | #include <iostream>
#include <sys/types.h>
#include <sys/time.h>
#include <vector>
#include <wiringPi.h>
#include <time.h>
#include <ctime>
#include <chrono>
#include <thread>
#include <wiringPiI2C.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <math.h>
#include <ncurses.h>
#include <termios.h>... | ALGO | 0.976894 | 3.961496 | {
"github_metadata": {
"branch": "master",
"commit_count": 119,
"repo_created_at": "2017-05-03T11:49:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9e62f862... |
757447b0-dd5b-4c03-bbef-3ed27ef4c225 | alexandraback/datacollection | solutions_5670465267826688_1/C++/hasipon/c.cpp | #include <bits/stdc++.h>
using namespace std;
const int T[8][3] = {{1,2,3},{4,3,6},{7,4,1},{2,5,4},{5,6,7},{0,7,2},{3,0,5},{6,1,0}};
struct Solver {
long L, X;
string s;
Solver() {
cin >> L >> X >> s;
}
int f() {
int x = 0;
for (int j = 0; j < L; ++ j) {
x = T[x][s[j]-'i'];
}
return x;
}
bool solv... | ALGO | 0.999803 | 4.441619 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2017-03-08T11:33:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "885a72454... |
5df605ee-5514-4d6a-8fe3-42db0efa380b | seunghyukcho/algorithm-problems-solved | codeforces/edu/42/b.cpp | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int n, a, b, ans;
char seat[200002];
int main(){
int flag = 0;
vector<int> empty_seats;
cin >> n >> a >> b;
for(int i = 0; i < n; i++){
cin >> seat[i];
if(seat[i] == '*'){
if(flag)
... | ALGO | 0.999948 | 3.381491 | {
"github_metadata": {
"branch": "master",
"commit_count": 230,
"repo_created_at": "2018-03-18T07:19:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bf5048a5... |
c7e185fe-c1a7-4c48-a530-5c83c1e5aa10 | samridhrana06/placement_coding | Array/kadanes_algo.cpp | // long long maxSubarraySum(vector<int> arr, int n)
// {
// long long ans = arr[0];
// long long sum = 0;
// for(int i=0;i<n;i++){
// sum = sum + arr[i];
// if(sum < 0){
// sum = 0;
// } else {
// ans = max(ans, sum);
// }
// }
// return ans;
... | ALGO | 0.999602 | 4.843035 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2023-11-06T17:31:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a88c8e110a8... |
481c7e49-9d7a-40a8-82e5-09c494504e0f | lucifetsmith/MyOJ | sortAlgorithm/bucketSort/bucketSort/bucketSort.cpp | struct ListNode {
ListNode(int);
int key;
ListNode* next;
};
ListNode::ListNode(int val) : key(val), next(nullptr)
{}
#define LIST_INSERT(list, node, cur, pre) \
do { \
cur = list; \
pre = nullptr; \
if (!list) { \
list = node; \
break; \
} \
while (cur) { \
if (cur->key > node->key) break; \
... | ALGO | 0.999977 | 4.658541 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2016-04-28T12:34: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": "0dde4ccee... |
d64032bb-b4a5-432e-897c-5603c672bfd3 | T-Arshad98/solar_system | 1112.cpp | #include <stdlib.h>
#include <math.h>
#include <GL/glut.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <SDL/SDL.h>
#include <iostream>
#include "planets.h"
#include "keys.h"
#include "surfaces.h"
using namespace std;
float red=0.0f, blue=0.0f, green=0.0f, alpha=1.0f;
float theta=0;
float thetaEarth=0;
float thetaM... | TOOL | 0.932237 | 4.291125 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-04-19T02:15: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": "2eb54f468ad7... |
c0c00804-da65-4594-b002-26f5ba826a2f | Vequis/Competitive-Programming | BixeComp/7 - BFS e Dijkstra/A.cpp | #include<bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define sz(x) (int)(x).size()
#define pb push_back
#define eb emplace_back
#define vi vector<int>
#define all(x) (x).begin() , (x).end()
#define fs first
#define sc second
#define ii pair<int, int>
#define vii vector<ii>
#define ... | ALGO | 0.999503 | 3.739402 | {
"github_metadata": {
"branch": "main",
"commit_count": 67,
"repo_created_at": "2024-02-01T16:09:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d91516120a3... |
8c17505a-a4dc-45de-a390-8d668b32251a | volterra-luo/z-afepack | AFEPack/library/src/MovingMesh2D.cpp | /**
* @file MovingMesh2D.cpp
* @author <NAME>
* @date Thu Feb 22 11:51:37 2007
*
* @brief
*
*
*/
#include "MovingMesh2D.h"
#define DIM 2
typedef SparseMatrix<double> sparse_matrix_t;
typedef Vector<double> vector_t;
/// 素数表
int MovingMesh2D::primes[] = {
02, 03, 05, 07, 11,
13, 17, 19, 23, 29,... | ALGO | 0.999171 | 4.419487 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2012-01-04T14:03:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2a6892536... |
1335affe-0573-447a-ad66-e5772408d41a | steven12138/ACM | src/CF/CF796div2/B.cpp | #include <iostream>
#include <algorithm>
#include <cstring>
#define MAXN int(2e5+3)
#define LOG(X) for(int _=1;_<=n;_++) cout<<X[_]<<" ";cout<<endl;
void solve();
using namespace std;
auto main() -> int {
int T;
cin >> T;
while (T--) { solve(); }
return 0;
}
int c[MAXN];
int getN(int x) {
int ... | ALGO | 0.999875 | 4.313911 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2022-09-21T06:17: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": "77deb3b28... |
74458b99-d7e9-4224-8837-dd0ca9c18301 | leonardo-domingues/atrbvh | BVHRT-Core/src/TRBVHOptimizer.cpp | #include "TRBVHOptimizer.h"
#include "BVHTreeInstanceManager.h"
#include "CudaErrorCheck.h"
#include "TRBVH.h"
#include "TRBVHScheduler.h"
#include <vector>
namespace BVHRT
{
TRBVHOptimizer::TRBVHOptimizer(int treeletSize, int iterations) : treeletSize(treeletSize),
iterations(iterations)
{
}
TRBVHOptimize... | ALGO | 0.995329 | 4.32454 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2015-06-02T23:40:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 56,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6c5c8604... |
7c619a40-30ef-4dea-bed7-d57f4a6abddf | xiaozhuo12138/StdSamples | include/FX/PKLimiter.hpp | // https://github.com/igorski/fogpad/blob/master/src/limiter.cpp
class Limiter
{
public:
Limiter();
Limiter( DspFloatType attackMs, DspFloatType releaseMs, DspFloatType thresholdDb );
~Limiter();
template <typename SampleType>
void process( SampleType** outputBuffer, int buf... | ALGO | 0.953706 | 5.365098 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2023-03-29T01:37: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": "815e2b4421e... |
64b7f27a-2d30-4556-b8f3-25a23c4c1013 | DanielFreire1984/course-basic.middle-level.cpp | 018_bubbleSortAlgorithm_Part1.cpp | /**
* Part1: This file show a simple example
* of the bubble sort algorithm
* to sort a vector of the int values.
* C++ language.
*
* @author: <NAME>
* @date: 03/17/2007
*/
#include <iostream>
using namespace std;
int menu()
{
int option;
do
{
cout << "\nType 1 to insert." << endl;
cout << "Type 2 to... | ALGO | 0.998741 | 4.189171 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2016-09-28T23:18:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "856db07a3... |
81b4159e-1c4f-488a-8278-f1d2e96c53ad | Leapense/problems | 16461번: 듀얼 채널 VHF 무전기/main.cpp | #include <iostream>
#include <cmath>
#include <iomanip>
#include <algorithm>
using namespace std;
constexpr double STEP = 0.020;
constexpr double MIN_FREQ = 144.000;
constexpr double MAX_FREQ = 146.000;
int upDownButtonPresses(double current, double target)
{
int diff = round((target - current) / STEP);
if (... | ALGO | 0.99957 | 4.465127 | {
"github_metadata": {
"branch": "master",
"commit_count": 2661,
"repo_created_at": "2024-10-12T10:53: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": "7be12ad... |
ce23ed38-7a12-4dba-a8b8-76af15ae1caa | codeknight3/ME766_Project | tsp_mpi.cpp | #define MASTER 0 /* The master PE */
#include <bits/stdc++.h>
#include "mpi.h"
using namespace std;
const int MAXN = 16;
const int INF = 1e9;
const int MIN_EDGE_WEIGHT = 1;
const int MAX_EDGE_WEIGHT = 10;
long long fact[MAXN+1];
int random(int l, int r)
{
return l + rand()%(r-l+1);
}
void precompu... | ALGO | 0.999969 | 3.656028 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2021-03-27T14:28:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3305683405c... |
3b2cfe7b-1a91-455f-a7b6-c25a5dc7ddbd | Futaba-Kosuke/algorithm | atcoder/educational_dp/1/d_knapsack1.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll INF = 1LL << 60;
typedef struct product {
ll w;
ll v;
} product;
ll solve (ll N, ll W, vector<product> products) {
vector<vector<ll>> dp_table(N+1, vector<ll>(W+1, 0));
for (ll i = 0; i < N; i++) {
for (ll j = 0; j <= W; j++) {
... | ALGO | 0.999991 | 4.327026 | {
"github_metadata": {
"branch": "main",
"commit_count": 12,
"repo_created_at": "2021-01-07T16:27: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": "5788bd97adb... |
d90a357b-de51-4055-82a5-09ec9d01448e | qian488/Life_Long_Learning | Test/testc++/c++Test122.cpp | //看题解说Tarjan 缩点 + 拓扑排序 + bitset 优化状压
//不懂,先放
/*dfs
#include <iostream>
using namespace std;
//pta_dfs专场--连通数
const int N = 1e6+10;
typedef long long ll;
int h[N], e[N], ne[N], idx = 0;
bool vis[N];
int n;
void add(int a, int b)
{
e[idx] = b, ne[idx] = h[a], h[a] = idx++;
}
int dfs(int x)
{
vis[x] = true;
... | ALGO | 0.999928 | 3.678186 | {
"github_metadata": {
"branch": "main",
"commit_count": 165,
"repo_created_at": "2023-09-14T01:58:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac2628f41d... |
f3bd2e9b-9340-4c79-8389-4eb792cb7544 | MetSystem/winradius | WinRadius/src/modules/rlm_eap/rlm_eap_md5.cpp | /*
* rlm_eap_md5.c Handles that are called from eap
*
* Version: $Id$
*
* 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 of the License, or
* (at your opti... | ALGO | 0.94285 | 5.48381 | {
"github_metadata": {
"branch": "master",
"commit_count": 128,
"repo_created_at": "2017-05-04T09:40:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6fb2eaca... |
e86e7d01-8423-4b8d-aec1-d8d29fe30056 | cfilelispapadopoulos/Computational-Mathematics | AFIIM/src/bicgstab.hpp | #ifndef BICGSTAB_HPP
#define BICGSTAB_HPP
// DISCLAIMER
// The use of the code is regulated by the following copyright agreement.
//
// AFIIM software is freely available for scientific (non-commercial) use.
// 1. The code can be used only for the purpose of internal research, excluding any commercial use of the AFIIM... | ALGO | 0.994463 | 5.958709 | {
"github_metadata": {
"branch": "main",
"commit_count": 39,
"repo_created_at": "2024-09-23T11:40:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "95fe9469f92... |
1197bcf0-1c04-4ca6-ad53-c1240bb53dc8 | Divyanshu-info/College | Archive/DAA/assignmen4.cpp | #include <algorithm>
#include <cctype>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int input() {
int a;
cin >> a;
return a;
}
int main(int argc, const char **argv) {
int n;
// cout << "Input no of Combinations: \t";
// cin >> n;
n = 8;
vector<int> a, b;
a = {-10... | ALGO | 0.999242 | 3.133608 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2021-02-06T10:31: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": "acb7d5885... |
ce44df30-fede-4908-a740-e3face8b869f | Trevor-Parsons/CompilerConstruction | P0/main.cpp | // <NAME>
// 9/22/19
// Description: Main driver for traversal printing program P0
#include <iostream>
#include <fstream>
#include <stdio.h>
#include <iomanip>
#include <string.h>
#include "node.h"
#include "traversals.h"
#include "buildTree.h"
using namespace std;
int main(int argc, char* argv[]) {
// Handling in... | ALGO | 0.991253 | 4.59112 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-06-02T09:10: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": "e14e23da25... |
df707d55-fcaa-4dd5-849f-769ad1ca5063 | bardend/Competitive_Programing | Codeforce/1948d.cpp | #include <bits/stdc++.h>
using namespace std;
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define f first
#define s second
typedef long long ll;
typedef pair<int, int> ii;
//int dx[]={1,0,-1,0};int dy[]={0,1,0,-1}; //4 Direction
//int dx[]={1,1,0,-1,-1,-1,0,1};int dy[]={0,1,1,1,0,-1,-1,-1};//8 directi... | ALGO | 0.999949 | 3.668293 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2023-11-17T04:26: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": "2a121ba615... |
04c7ff16-7dd3-48d8-9b94-c345fced6e22 | tiagocaseiro/ray-tracer | main.cpp | #include "camera.h"
#include "canvas.h"
#include "color.h"
#include "common.h"
#include "figures.h"
#include "material.h"
#include "ray.h"
color ray_color(const ray& r, const std::vector<sphere>& spheres, const float depth)
{
if(depth <= 0)
{
return colors::BLACK;
}
std::optional<hit> h = on_hi... | ALGO | 0.973761 | 6.130315 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2025-05-13T22:44:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "daf17fd33dc... |
049016f5-1a10-4394-8253-0a7294642e6a | armando013005/cpp-problems | sinprojecto/elefantes2.cpp | #include <bits/stdc++.h>
using namespace std;
int matriz[3100][3100];
char matrizaux[3100][3100];
struct ijd{
int posi;
int posj;
int dist;
}actual, siguiente;
queue <ijd> cola;
int main () {
cin.tie(0);
ios_base::sync_with_stdio(0);
int n, m;
char aux;
cin>>n>>m;
for (int i=1; i<=... | ALGO | 0.999901 | 3.765476 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2022-02-07T04:21: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": "f48792b03... |
b61e8f43-e121-4a39-926a-fb1111005f09 | SaiVamshiK/revised-ds | DP/IMP Maximum Difference Of Zeros And Ones In Binary String.cpp |
1. You are given a string containing only 0's and 1's.
2. You have to find the length of substring which is having maximum difference of number of 0s and number of 1s i.e
(Number of 0's - Number of 1's).
3. If there are all 1's present in the given string, then print '-1'.
REPLACING 1 WITH -1 AND 0 WITH 1 WE WOULD ... | ALGO | 0.999983 | 3.621851 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-03-20T15:43: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": "b53e67ae4d... |
0d76d7cb-ca58-4519-adde-d117745701a6 | phungtienminh/Competitive_programming | BOI/BOI11_grows.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, q, a[N];
struct seg {
struct Node {
int Min, Max;
} node[4 * N];
int lazy[4 * N];
void init (int i, int l, int r) {
if (l == r) {
node[i].Min = node[i].Max = a[l];
lazy[i] = 0;
... | ALGO | 0.999964 | 4.790815 | {
"github_metadata": {
"branch": "master",
"commit_count": 399,
"repo_created_at": "2018-07-12T10:56:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a1457c49... |
84fe0f9d-d369-4f8f-b21f-4225d6b0a49f | dineshmakkar079/My-DS-Algo-code | interviewbit/All_Unique_Permutations.cpp | /*
Time : Wed Aug 23 2017 16:59:58 GMT+0530 (IST)
URL : https://www.interviewbit.com/problems/all-unique-permutations/
Given a collection of numbers that might contain duplicates, return all possible unique permutations.
Example
:
[1,1,2] have the following unique permutations:
[1,1,2]
[1,2,1]
[2,1,1]
NOTE : No 2 e... | ALGO | 0.999932 | 5.526393 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2017-06-10T18:15: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": "8ccb40b81... |
a60dc778-44c1-44ee-9261-8274fbabad00 | ishandutta2007/codeforces-j | jo_ulej/normal/1132/A.cpp | #include <bits/stdc++.h>
#define INT_INF (2 * 1e9)
#define LL_INF (2LL * 1e18)
#ifdef __LOCAL
#define DBG(X) cout << #X << "=" << (X) << endl;
#else
#define DBG(X)
#endif
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef pair<int, int> pii;
typedef... | ALGO | 0.999903 | 3.710891 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T05:42: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": "16b84d401b4a... |
6f7214bb-99cc-42f6-ac5c-fa8026fdfc8c | chirantan-basu01/Daily-Problem-Solving | Reverse a sublist of a linked list - GFG/reverse-a-sublist-of-a-linked-list.cpp | // { Driver Code Starts
//Initial Template for C++
#include<bits/stdc++.h>
using namespace std;
/* Link list node */
struct Node {
int data;
struct Node *next;
Node(int x) {
data = x;
next = NULL;
}
};
// } Driver Code Ends
//User function Template for C++
/*Link list node
struct Node {
int data;
struc... | ALGO | 0.999869 | 5.848989 | {
"github_metadata": {
"branch": "master",
"commit_count": 1173,
"repo_created_at": "2022-01-04T04: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": "e95016e... |
e23ca131-afe3-40ea-8a39-b89e846c8171 | jroose/clpp | src/clpp/clppSort_RadixSort.cpp | //#define BENCHMARK
#include "clpp/clppSort_RadixSort.h"
#include "clpp/clpp.h"
#include "clpp/StopWatch.h"
#include "clpp/clppScan_Default.h"
#include "clpp/clppSort_RadixSort_CLKernel.h"
// Next :
// 1 - Allow templating
// 2 - Allow to sort on specific bits only
#pragma region Constructor
clppSort_RadixSort::c... | ALGO | 0.999512 | 4.681343 | {
"github_metadata": {
"branch": "master",
"commit_count": 149,
"repo_created_at": "2016-03-25T02:25:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 9,
"pull_requests": 0
},
"file_meta": {
"content_id": "64674710... |
d10d27ce-166f-4c40-9319-fadae9cb79fb | DOI-USGS/ISIS3 | isis/src/base/objs/Photometry/Photometry.h | #ifndef Photometry_h
#define Photometry_h
/** This is free and unencumbered software released into the public domain.
The authors of ISIS do not claim copyright on the contents of this file.
For more details about the LICENSE terms and the AUTHORS, you will
find files of those names at the top level of this repository.... | ALGO | 0.992167 | 7.023769 | {
"github_metadata": {
"branch": "dev",
"commit_count": 8357,
"repo_created_at": "2018-01-23T19:05:43.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 215,
"forks": 175,
"issues": 67,
"pull_requests": 12
},
"file_meta": {
"content_id": "9131d... |
c2cf8c5f-6a88-4a8f-a2aa-7876dc320c56 | Ericsson/SUPL-3GPP-LPP-client | dependency/generator/tokoro/models/nutation.hpp | #pragma once
#include <maths/float3.hpp>
#include "astronomical_arguments.hpp"
namespace generator {
namespace tokoro {
struct Nutation {
double d_psi; // nutation in longitude
double d_eps; // nutation in obliquity
/**
* @brief Evaluates the nutation for a given time and astronomical arguments.
... | ALGO | 0.991899 | 7.298616 | {
"github_metadata": {
"branch": "main",
"commit_count": 210,
"repo_created_at": "2022-09-27T17:01:57.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 29,
"forks": 16,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "923c9bec8... |
2a61c000-2413-4045-b593-b39e44cbf787 | ishandutta2007/codeforces-a | alexandr_ts/normal/779/B.cpp | #include <bits/stdc++.h>
#define fr(i, n) for (int i = 0; i < n; ++i)
#define frab(i, a, b) for (int i = a; i < b; i++)
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;
typedef long double ld;
const int N = 2e5 + 5;
const int M = 500 * 1000 * 1000;
const ll MOD = 1000 * 1000 * 100... | ALGO | 0.999662 | 3.634917 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d00597d2e12e... |
087bf66e-e5ea-4dec-a385-440c3351afee | ZanneZankyo/LeetCodeSandBox | 11.container-with-most-water.cpp | /*
* @lc app=leetcode id=11 lang=cpp
*
* [11] Container With Most Water
*
* https://leetcode.com/problems/container-with-most-water/description/
*
* algorithms
* Medium (42.94%)
* Total Accepted: 328K
* Total Submissions: 763.8K
* Testcase Example: '[1,8,6,2,5,4,8,3,7]'
*
* Given n non-negative integer... | ALGO | 0.999983 | 6.501428 | {
"github_metadata": {
"branch": "master",
"commit_count": 86,
"repo_created_at": "2019-03-15T01:20: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": "8c7117e2f... |
83ee2761-17a5-4648-9549-549c61d2b1c5 | CraftyBoss/SMO-Challenges-Base | source/helpers.cpp | #include "helpers.hpp"
bool isPartOf(const char* w1, const char* w2) {
int i=0;
int j=0;
if(strlen(w1) <= 0) {
return false;
}
while(w1[i]!='\0'){
if(w1[i] == w2[j])
{
int init = i;
while (w1[i] == w2[j] && w2[j]!='\0')
{
... | TOOL | 0.900523 | 4.47321 | {
"github_metadata": {
"branch": "main",
"commit_count": 15,
"repo_created_at": "2021-10-12T07:07:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 2,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "2fe8ec8559... |
f3af0429-bb30-4541-9439-0300f6b6948e | akashs2795/Learn-Cpp | Basics/Printing Arrays.cpp | #include<iostream>
using namespace std;
void printIterative(int A[], int n)
{
int i;
cout<<" The array is "<<endl;
for (i=0; i<n; i++)
{
cout<<A[i]<<" ";
}
}
void printRecursive(int A[], int n, int i)
{
if (i==n)
{
return;
}
else
{
cout<<A[i]<<" ";
return printRecursive(A, n, i+1);
}
}
void p... | ALGO | 0.999536 | 4.893944 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2017-11-27T16:45:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d57db0c2d... |
148b3dd2-e084-40ca-9cbd-a77e661fa29e | JoseVillalta/Data-Structures-and-Algorithms-in-C- | AlgorithmsInC++/ConstructAllPaths.cpp | #include "ConstructAllPaths.h"
#include <iostream>
using namespace std;
void PathBuilder::Backtrack(int a[], int k, int start, int end)
{
if (IsSolution(a, k, end))
{
ProcessSolution(a,k);
}
else
{
int c[NMAX];
k++;
int ncandidates = ConstructCandidates(a, k, start, c);
... | ALGO | 0.999867 | 3.634816 | {
"github_metadata": {
"branch": "master",
"commit_count": 134,
"repo_created_at": "2015-12-18T15:09:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "337f843b... |
b5e2a999-ad15-4862-a9ff-f4b70dfb78fb | NafiHasan/HabiJabi | C++/Practice/ATcoder Practice/ABC 261/f.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
typedef tree<int, null_type, less_equal<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
typedef tree<pair<int, int>, null_type, less_equal<pair<int... | ALGO | 0.999961 | 4.080269 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2023-03-17T09:29:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4dba5d1ef1e... |
dc28fce2-62aa-480d-88bc-9910b834b530 | ReMinecraftPE/mcpe | source/common/Util.cpp | /********************************************************************
Minecraft: Pocket Edition - Decompilation Project
Copyright (C) 2023 iProgramInCpp
The following code is licensed under the BSD 1 clause license.
SPDX-License-Identifier: BSD-1-Clause
***********************************************************... | TOOL | 0.937386 | 6.928427 | {
"github_metadata": {
"branch": "master",
"commit_count": 498,
"repo_created_at": "2023-07-30T19:22:41.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 389,
"forks": 59,
"issues": 24,
"pull_requests": 6
},
"file_meta": {
"content_id": "93988... |
ce3d6c25-714c-4036-96c5-1075189a41b3 | oreinke/PracticeContests | 03072025/extraset.cpp | #include <bits/stdc++.h>
using namespace std;
int main () {
int t;cin >> t;
while (t) {
int n, k; cin >> k >> n;
set<string> cards;
vector<string> cardArr;
for (int i = 0; i < n; ++i) {
string card = "";
for (int j = 0; j < k; ++j) {
... | ALGO | 0.999548 | 3.738063 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2024-09-12T16:50:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "38c76343264... |
c1389ccc-ddf8-4009-856a-5ff028448fb1 | Ligvest/Coursera._Art_of_modern_cpp_programming | 3_RedBelt/Week 1/sortby.cpp | #include <algorithm>
#include <numeric>
#include <tuple>
#include "airline_ticket.h"
#include "test_runner.h"
using namespace std;
bool operator<(const Date& lhsDate, const Date& rhsDate) {
return std::tie(lhsDate.year, lhsDate.month, lhsDate.day) <
std::tie(rhsDate.year, rhsDate.month, rhsDate.day);
}
... | ALGO | 0.966175 | 5.373337 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2018-11-06T07:15: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": "e6df591ab... |
3d927273-56f2-472d-8f01-dce4260fc8d9 | Chinkyu/CXXExercise | MyAlgorithmPractice/MyAlgorithmPractice/1552.MagneticForceBetweenTwoBalls.cpp | // 바이너리 서치로 가능 하다는데..... 참... ]
// 앞에서 해 보기.. 를 가격으로 선택 하면서.... ㅍ -- 다음에 한번더 보기..
#include <iostream>
#include <vector>
#include <unordered_map>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <algorithm>
#include <stack>
#include <bitset>
using namespace std;
class Solution {
public:
... | ALGO | 0.999951 | 3.939619 | {
"github_metadata": {
"branch": "master",
"commit_count": 754,
"repo_created_at": "2016-11-04T06:14:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "920f97a5... |
09f621db-8f9d-4c97-91dd-e42c5d430884 | asnyd014/CS170_Project2 | main.cpp | /* References
https://stackoverflow.com/questions/2704521/generate-random-double-numbers-in-c
*/
#include <string>
#include <fstream>
#include <sstream>
#include "Validator.h"
using namespace std;
struct FeatureNode {
vector<int> features;
float accuracy;
};
void forwardSelection(int totalFeatures, const ve... | DATA | 0.990766 | 5.38329 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2024-05-17T01:16:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1013afd162d... |
c1411c8a-0a92-4c81-bd13-63160b49c971 | senthilpalanisamy/Visual_SLAM_from_scratch | concept_practice/3d_2d_motion_estimation_opencv/motion_estimation.cpp | #include <opencv2/opencv.hpp>
#include <Eigen/Core>
#include <sophus/se3.hpp>
#include "feature_matching.hpp"
#include <g2o/core/base_vertex.h>
#include <g2o/core/base_unary_edge.h>
#include <g2o/core/sparse_optimizer.h>
#include <g2o/core/block_solver.h>
#include <g2o/core/solver.h>
#include <g2o/core/block_solver.h>
... | ALGO | 0.97774 | 5.061816 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2021-11-15T14:27:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc1095595b3... |
3d6acacd-25c6-450c-b118-2d141a60fd37 | Wilingpz/sunny | 11.18二叉搜索树/11.18二叉搜索树/11.18二叉搜索树/BinarySortTree.h | #pragma once
#include <vector>
#include <stack>
namespace wf{
template <class T>
class TreeNode//结点的类
{
T m_data;
TreeNode<T> * m_left;
TreeNode<T> * m_right;
public:
TreeNode(const T & val = T()) :
m_data(val),
m_left(nullptr),
m_right(nullptr)
{}
template <class T>
friend class BinarySo... | ALGO | 0.999843 | 3.620309 | {
"github_metadata": {
"branch": "master",
"commit_count": 148,
"repo_created_at": "2019-03-31T11:22: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": "19d28ec4... |
27e45a22-8810-4397-b154-4eb5e1f43829 | phitronio/AlgorithmBatch3 | Graph/Traversal/Depth and Height of a Tree using DFS.cpp | #include<bits/stdc++.h>
using namespace std;
void init_code()
{
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif // ONLINE_JUDGE
}
const int N = 1e5+5;
vector<int> adj[N];
bool visited[N];
int depth[N];
int height[N];
void dfs(int u)
{
visited[u] = tru... | ALGO | 0.999987 | 3.675336 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-07-30T06:59:44.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a5bd629cafc43... |
62fb1257-b2d6-4cfa-8e4c-4d59d9737bbf | Micuks/code | kb_ans/topic16/t16pz/t16pz.hpp | #ifndef _t16pz_20200721_
#define _t16pz_20200721_
#include <algorithm>
#include <assert.h>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <v... | ALGO | 0.999838 | 3.817057 | {
"github_metadata": {
"branch": "master",
"commit_count": 541,
"repo_created_at": "2020-11-12T05:37:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "afb296da... |
61cb4b4b-4bf4-445d-81d3-297576fb965d | manasbis10/code | B_Corner_Twist.cpp | #include<bits/stdc++.h>
using namespace std;
#define endl '\n'
#define int long long
int mod = 1e9+7;
int mod_add(int a, int b, int m) {return (a % m + b % m) % m;}
int mod_mul(int a, int b, int m) {return (a % m * b % m) % m;}
int mod_sub(int a, int b, int m) {return ((a % m - b % m) + m) % m;}
int bin_exp(int base, i... | ALGO | 0.99993 | 4.969085 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-04-18T19:45: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": "abf5f9f4d07e... |
7e88cf48-060a-432f-93da-97b381e86bdc | tnmysng28/ProblemSet | codeforces/1348/A.cpp | //
// CPlibrary
//
// Created by <NAME> on 3/03/2020.
// INDIAN INSTITUTE OF TECHNOLOGY (BHU) , VARANASI
// Copyright © 2020 <NAME>. All rights reserved.
//#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
//#pragma GCC optimization ("unroll-loops")
#include <algorithm>
#include <bitset>
#include <casser... | ALGO | 0.999877 | 4.250576 | {
"github_metadata": {
"branch": "master",
"commit_count": 302,
"repo_created_at": "2021-01-12T04:00: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": "26dd59d4... |
c5c6dbd0-cb88-4dc8-a0b8-9700a97058df | Williammailliw123/LeetCode | Dice_Roll_Simulation.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution {
public:
long long P=1e9+7;
vector<long long> R;
vector<vector<vector<long long>>> dp_table;
long long dp_process(int remain, int id, int consec){
if(dp_table[remain][id][consec]) return dp_table[remain][id][co... | ALGO | 0.99997 | 4.848665 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-03-28T16:24: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": "4667538604d7... |
cf04e13e-6ad6-4c48-90b6-29f0faff0b57 | larsys/socrob-ros-pkg | raposang_ros/raposang_hmd/raposang_emagin_z800/libz800/QuatKalmanFilter.cpp | #include <cassert>
#include <cstdlib>
#include <cstdio>
#include <limits>
#include "QuatKalmanFilter.h"
using namespace QKE;
QuatKalmanFilter::QuatKalmanFilter(
const Matrix<4,4> &Q,
const Matrix<4,4> &R
)
: _Q(Q)
, _R(R)
{
_Pm = Matrix<4,4>::identity();
}
QuatKalmanFilter::~QuatKalmanFilter()
{
}
void QuatKalma... | ALGO | 0.969754 | 6.453016 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2013-02-05T18:30:26.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0c71bfb13d... |
ef4a0a62-d35a-484b-97a7-cbe3ba90a7b4 | labib666/competitive-programming-code-archive | oj/USACO/4.1/4.1.3/fence6.cpp | /*
USACO
4.1.3 - Fence Loops
Dijkstra
2 April 2014
/*
ID: <NAME>
LANG: C++
TASK: fence6
*/
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <io... | ALGO | 0.999715 | 3.798328 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2016-05-20T18:33:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "365c83501... |
1ed1968e-4468-449f-a14b-3604fe457def | AsminBudha/Competitive-Programming | codechef/CHEFPRMS.cpp | #include <bits/stdc++.h>
#define MAX 100000
using namespace std;
//typedefs
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<ull> vull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vpii;
typedef map<int, int> mii;
//Cons... | ALGO | 0.999572 | 4.493686 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-04-21T05:30:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "220fbd3344... |
0f78ee37-7819-471a-ab3f-f1821e2cbe6e | Lqhuy125/c-cpp | nhasoannhactaiba.cpp | #include <stdio.h>
void tang(int a[])
{ int dem = 0;
for (int i = 0; i < 8 - 1; i++)
{
if ( a[i+1] > a[i])
dem++;
}
if ( dem == 7)
printf("TANG");
}
void giam(int a[])
{ int dem = 0;
for (int i = 0; i < 8 - 1; i++)
{
if ( a[i+1] < a[i])
dem++;
}
if ( dem == 7)
printf("GIAM");
}
void khongbiet1(int... | ALGO | 0.999953 | 3.352176 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2023-06-29T16:37: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": "0e7c082e73... |
ebb700ed-972c-4389-a08c-474e6e5d5f5a | lifev/lifev | lifev/multiscale/algorithms/MultiscaleAlgorithmNewton.cpp | //@HEADER
/*
*******************************************************************************
Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
This file is part of LifeV.
LifeV is free software; you can redistribute it a... | ALGO | 0.912591 | 6.214123 | {
"github_metadata": {
"branch": "master",
"commit_count": 12133,
"repo_created_at": "2012-11-06T15:58:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 36,
"forks": 30,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "07b6b... |
876290fb-0ad4-4192-a3c0-cdb29fe0d71b | Coconut-X/Data-Structures-Lab | data lab 6/q1.cpp | #include<iostream>
using namespace std;
class node {
public:
int data;
node* prev;
node* next;
node() : prev(nullptr), next(nullptr){}
node(int d) :data(d), prev(nullptr), next(nullptr) {}
void insertAtEnd(node*& head, int data)
{
node* currentHead = head;
node* newNode = new node(data);
/*newNode-... | ALGO | 0.99992 | 4.488233 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-12-17T16:21: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": "b198990c559b... |
68970956-ef19-4231-a34d-3c660219817d | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/08/0829/personal_submission/cf850a_zrnstnsr.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr int mod = 998244353;
constexpr int inf = 0x3f3f3f3f;
constexpr ll linf = 0x3f3f3f3f3f3f3f3f;
void solve() {
int n;
cin >> n;
if (n == 2) { println("2\n1\n2"); return; }
else if (n > 11) { println("0"); return; }
vector<v... | ALGO | 0.999927 | 4.445714 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "f4b0... |
b60cd3de-4ada-488b-8bf6-254c4788d397 | TheNourhan/DSA-in-cpp | Data Structures/06- Binary tree/2- Medium problems/01- zigzagLevelOrder.cpp | #include <iostream>
#include <cassert>
#include <vector>
#include <deque>
#include <cmath>
using namespace std;
struct TreeNode {
int val { };
TreeNode *left { };
TreeNode *right { };
TreeNode(int val) :
val(val) {
}
};
struct BinaryTree {
TreeNode *root { };
BinaryTree(int root_value) :
root(new TreeNod... | ALGO | 0.999998 | 5.676842 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-09-22T17:55:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "da9ffa32876a... |
bf7a8841-9539-4e3b-8219-54c11f782dd6 | bristolcrypto/SPDZ-2 | Tools/MMO.cpp | // (C) 2018 University of Bristol. See License.txt
/*
* MMO.cpp
*
*
*/
#include "MMO.h"
#include "Math/gf2n.h"
#include "Math/gfp.h"
#include "Math/bigint.h"
#include <unistd.h>
void MMO::zeroIV()
{
octet key[AES_BLK_SIZE];
memset(key,0,AES_BLK_SIZE*sizeof(octet));
setIV(key);
}
void MMO::setIV(oc... | ALGO | 0.992176 | 5.230594 | {
"github_metadata": {
"branch": "master",
"commit_count": 82,
"repo_created_at": "2016-09-02T18:16:44.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 222,
"forks": 67,
"issues": 9,
"pull_requests": 3
},
"file_meta": {
"content_id": "2a7365a... |
11f3897c-bd9d-477b-9edd-c20d3f0349e9 | timblechmann/nova-simd | simd_memory.hpp | // templated memory simd functions
// Copyright (C) 2010 <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 of the License, or
// (at your option) any ... | TOOL | 0.966992 | 7.28131 | {
"github_metadata": {
"branch": "master",
"commit_count": 273,
"repo_created_at": "2012-05-06T09:23:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 50,
"forks": 6,
"issues": 7,
"pull_requests": 0
},
"file_meta": {
"content_id": "a116d5d... |
7aacc8f6-ead9-41f6-856c-41c0081c5a42 | ilics/homebrewdb | refine_depth/src/main.cpp | //######################################################################
//# Refine_depth Module
//#
//# Copyright (C) 2020 Siemens AG
//# SPDX-License-Identifier: MIT
//# Author 2020: This module has been developed by
//# <NAME> under supervision of Slobodan Ilic
//#########################... | DATA | 0.959319 | 4.963743 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-08-03T19:51:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 26,
"forks": 5,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "493cfde8e... |
513861fd-e5d7-424a-b89a-59da0d30c858 | kienpro-dev/kyel2003 | Code C++/Haui/Buoi5/Bai11.cpp | #include <iostream>
using namespace std;
void input(float a[], int &n)
{
cout << "Nhap mang: ";
for (int i = 0; i < n; i++)
{
cin >> a[i];
if (a[i] == -1 || n == 100)
{
break;
}
n++;
}
if (n != 100 || n == 100 && a[n - 1] == -1)
n--;
}
v... | ALGO | 0.999295 | 3.501559 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-02-01T07:54: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": "e3a4bf38be32... |
951666f3-c722-4867-bfd8-97fc125f7486 | zouyonghao/Algorithm | linear/Josephus.cpp | // Josephus using array.
#include <iostream>
#include <cstring>
using namespace std;
int main() {
int n, s, m;
cin >> n >> s >> m;
int * array = new int[n];
// memset(array, 0, sizeof array);
for (int i = 0; i < n; i++) {
array[i] = i + 1;
}
int j = s;
for (int i = 0; i < n; i++... | ALGO | 0.999959 | 3.195064 | {
"github_metadata": {
"branch": "master",
"commit_count": 144,
"repo_created_at": "2016-02-25T17:07: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": "1d6b817a... |
d5951aae-8330-4680-97dc-6e8bd46736da | fiveoangel/Angel | School Work/User Defined Functions/Poker Dice Game/main.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
// Add all occurences of goal value
int CheckSingles(vector<int>& diceValues, int goal) {
/* Complete the function and update the return statement */
int sumValue;
sumValue = 0;
for(unsigned i... | ALGO | 0.999719 | 5.036381 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-05-30T22:12: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": "7a09a2b175aa... |
41f827f9-1557-4dfc-866e-24af3c9e3b9b | vuongchison/Documents | C/time.cpp | #include<stdio.h>
#include<conio.h>
struct time
{
int h;
int m;
int s;
};
void InputTime(time *t, char Name[]);
time operator + (time t1, time t2);
time operator - (time t1, time t2);
int TimeToSecond(time t);
time SecondToTime(int second);
void InputTime(time *t, char Name[])
{
printf("Nhap thoi gian %... | ALGO | 0.996754 | 3.295114 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2018-01-12T12:40:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e28e1b260... |
5a4cb6bb-c1c3-4a96-abc0-df32f4e45716 | mpc-msri/EzPC | SCI/src/GC/number.h | /*
Original Work Copyright (c) 2018 <NAME> (<EMAIL>)
Modified Work Copyright (c) 2021 Microsoft Research
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limi... | ALGO | 0.999879 | 6.222405 | {
"github_metadata": {
"branch": "master",
"commit_count": 410,
"repo_created_at": "2019-02-16T11:23:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 429,
"forks": 129,
"issues": 52,
"pull_requests": 8
},
"file_meta": {
"content_id": "efaa... |
c7899297-edd9-4de0-973b-0ad78a9dd8bc | tarundecipher/CompetitiveProgramming | Flight_Routes_Check.cpp | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
vector<int> graph[(int)1e5 + 5];
vector<int> graph2[(int)1e5 + 5];
vector<int> topo;
bool visited[(int)1e5 + 5];
void dfs(int node)
{
if (visited[node])
{
return;
}
visited[node] = true;
for (auto i : graph[node])
{
... | ALGO | 0.999996 | 3.764446 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-04-18T05:28: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": "e06f38bcd94b... |
dc8005a8-98d1-4ae0-8a1f-a167f737e99c | aliayman-225/LeetCode | 0725-split-linked-list-in-parts/0725-split-linked-list-in-parts.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<ListNode*> s... | ALGO | 0.999562 | 6.080674 | {
"github_metadata": {
"branch": "main",
"commit_count": 100,
"repo_created_at": "2024-07-09T09:45: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": "dab05d01f1... |
e4cc71cb-1e21-4b6c-b6b4-41ca94fc5618 | themennice/programming-challenges | CountNumOfTeams.cpp | // https://leetcode.com/problems/count-number-of-teams
// First, O(n^3). Second, O(n^2)
int numTeams(vector<int>& rating) {
// brute force works but too slow
// int n = 0;
// int size = rating.size();
// for(int i = 0; i < size; i++)
// {
// for(int j = i+1; j < size; j++)
// ... | ALGO | 0.99991 | 5.746735 | {
"github_metadata": {
"branch": "master",
"commit_count": 250,
"repo_created_at": "2019-12-25T01:40: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": "c9466596... |
3093f401-359a-415e-9ddd-571ea8bd412b | Rodrigo61/GUAXINIM | CodeForces/1132/c.cpp | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define db(x) //cerr << #x << " = " << x << endl;
#define INF 0x3f3f3f3f
#define fi first
#define se second
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define LEFT(x)... | ALGO | 0.999609 | 3.706764 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2018-03-16T13:30:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4ad019a31... |
2420b990-beaa-4f4b-aaa7-387c58a95bcc | somesh-banerjee/competitive-programming | AtCoder DP A-Z/u.cpp | /*
we will represent groups with bitmasks
*/
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
const ll int MOD = 1e9 + 7;
vector<ll> pre;
// pre[i] stores the score for mask i
vector<ll> dp;
// dp[i] stores the max score that can be achieved when we group all rabbits from mask ... | ALGO | 0.999978 | 4.221525 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2020-08-23T05: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": "3eb072a57... |
9b1de44d-9b63-4bd0-a70e-5c59eec1cc75 | ak-create/LeetCode_Problems | 2-add-two-numbers/2-add-two-numbers.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* reverse(Lis... | ALGO | 0.999987 | 6.105525 | {
"github_metadata": {
"branch": "main",
"commit_count": 1124,
"repo_created_at": "2022-01-06T20:43: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": "48b98f814... |
3f85293d-09f3-4dad-b787-d26897be4013 | goodstudyqaq/ACM | train/2022-8-17/B.cpp | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "copypaste/debug.h"
#else
#define debug(...) 42
#endif
#define endl '\n'
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
struct fast_ios {
fast_ios() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
... | ALGO | 0.999998 | 3.600932 | {
"github_metadata": {
"branch": "main",
"commit_count": 844,
"repo_created_at": "2021-05-25T15:11:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3f68a341f1... |
56da93cf-4b82-4042-a45c-91681fc09bf6 | BMEI1314/FaceDetection_system- | src/test/facetrack/test_track/track1.cpp | /*
* =====================================================================================
*
* Filename: facetrack.cpp
*
* Description: 定义几种状态1.走向镜头方向.2.垂直于镜头方向
*
* Version: 1.0
* Created: 2017年04月10日
* Revision: none
* Compiler: g++
* Author: zhangqi
... | ALGO | 0.998536 | 3.987522 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2017-07-25T08:25:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "70aecbd210... |
1ee65eee-386c-490e-b4bd-4c38a7eab74b | BIT-zhaoyang/competitive_programming | 5072.cpp | //
// 5072.cpp
//
//
// Created by 赵洋 on 15/9/5.
//
//
#include <iostream>
using namespace std;
//bool isConflict(int*, int*);
//bool isUnique(int*, int*);
int main(){
int nLoop;
cin >> nLoop;
for( ; nLoop > 0; --nLoop){
int nP, nE; //nP: number of politicians nE: number of evidences
... | ALGO | 0.999228 | 4.412128 | {
"github_metadata": {
"branch": "master",
"commit_count": 120,
"repo_created_at": "2016-02-07T23:17:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "37af1db2... |
aa3ad89a-5908-424b-8531-9785d7191210 | intel/intel-extension-for-transformers | intel_extension_for_transformers/transformers/runtime/kernels/src/cpu/jit_domain/jit_seq_cpy_2x8x8.hpp | // Copyright (c) 2021 Intel Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or... | ALGO | 0.992562 | 5.661742 | {
"github_metadata": {
"branch": "main",
"commit_count": 2126,
"repo_created_at": "2022-11-11T05:32:27.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2169,
"forks": 215,
"issues": 31,
"pull_requests": 25
},
"file_meta": {
"content_id": "f99... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.