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 |
|---|---|---|---|---|---|---|---|
026f2ca7-0797-40a3-a9ac-42f30f3d49fd | malaifa/source | src/protocols/hybridization/FragmentBiasAssigner.hh | // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the co... | ALGO | 0.954391 | 6.847387 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-04-19T15:35:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "17a53bebd4... |
2ce13e2f-1851-4e36-bd3a-ceb5bee037ee | caioaao/cp-solutions | cf/483/B[ Friends and Presents ].cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long L;
typedef double D;
L x,y;
//bool tst;
bool check(L v, L c1, L c2){
c1 -= (v/y - v/(x*y)); c2 -= (v/x - v/(x*y));
//if(tst){
//cout << "Multiplos somente de " << x << ": " << (v/x - v/(x*y)) << '\n';
//cout << "Multiplos somente de " << y <<... | ALGO | 0.999877 | 3.677998 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2015-05-03T22:29:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3d5c10a94... |
3ee7aed8-331f-4ea6-9b48-fee2dd8fc6a4 | OpenSeesXMU/ReliabilitySoftware | CurvaturesBySearchAlgorithm.h | /* ****************************************************************** **
** OpenSees - Open System for Earthquake Engineering Simulation **
** Pacific Earthquake Engineering Research Center **
** **
** ... | ALGO | 0.99938 | 6.827983 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-12-26T12:22:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6770ae8b3d... |
d528fddb-da2f-4e50-ae84-23bfa6696f82 | Shikhar-S/Analysis-of-Competitive-Codebase | Data/Contest1245/all/29615217_64003230.cpp | #include <bits/stdc++.h>
using namespace std;
#define FIO ios_base::sync_with_stdio(false);cin.tie(NULL);
#define left (2*idx)+1
#define right (2*idx)+2
#define pb push_back
#define ll long long
#define all(x) x.begin(),x.end()
const ll MOD = (ll)(1e9 + 7);
const ll N = 0;
int main()
{
FIO;
int t;
cin >> t;
... | ALGO | 0.999802 | 3.872543 | {
"github_metadata": {
"branch": "master",
"commit_count": 74,
"repo_created_at": "2019-11-22T14:40:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "efb5bc31a... |
f8987ac5-083e-45cc-bb2b-2ee9bd43f41e | i-m-alok/DataStructure | decode-string/decode-string.cpp | class Solution {
public:
string decodeString(string s) {
stack<int> nums;
// stack<char> sign;
stack<string> str;
string temp = "";
int count = 0;
for(int i= 0;i<s.size(); i++){
if('['==s[i]){
// sign.push(s[i]);
str.push(te... | ALGO | 0.999262 | 5.38881 | {
"github_metadata": {
"branch": "master",
"commit_count": 205,
"repo_created_at": "2020-02-11T18:34:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "11234992... |
af0c6cb9-4de4-43b7-a544-f2d70c399f34 | brown170/CorAL | src/coralutils/SpecialFunctions/Chebyshev/chebyshev.cc | // <<BEGIN-copyright>>
//
// The GNU General Public License (GPL) Version 2, June 1991
//
// Copyright (c) 2013, Lawrence Livermore National Security, LLC. Produced at the Lawrence
// Livermore National Laboratory. Written by <NAME> (<EMAIL>), <NAME>
// (<EMAIL>) and <NAME> (<EMAIL>).
//
// CODE-CO... | ALGO | 0.999231 | 5.249484 | {
"github_metadata": {
"branch": "master",
"commit_count": 31,
"repo_created_at": "2017-06-16T15:31:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "c6ae6149f... |
095b8b9b-fc6c-4483-9ecb-67b50228bf22 | msaadi3/DSA | trees/trie/implementPhoneDirectory.c++ | #include <bits/stdc++.h>
using namespace std;
// T.C is (n*m2) and S.C is (n*m) where n is the number of strings in the vector and m is the averege length of string
class TrieNode
{
public:
TrieNode *children[26];
bool isTerminal;
char data;
TrieNode(char ch)
{
data = ch;
for (int... | ALGO | 0.999604 | 5.198848 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-05-07T03:57: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": "91af1306fc09... |
71c9fb7f-0da5-491f-985e-4c7481d9ff39 | nishitsharma03/Competitive_Programming | codeforces/1481/A.cpp | //#pragma GCC optimize "trapv"
#pragma GCC optimize("Ofast")
#pragma GCC optimize("O3", "unroll-loops")
#pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
#define ll long long int
#define fab(a,b,i) for(int i=a;i<b;i++)
#define pb push_back
#define db double
#define mp make_pair
#define endl "\n"
#define f firs... | ALGO | 0.999919 | 4.161019 | {
"github_metadata": {
"branch": "master",
"commit_count": 639,
"repo_created_at": "2020-12-24T09:57:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8c8811ca... |
25eb1523-e870-44f0-8b82-d200e3d4a0c2 | yshiyi/LeetCode | Binary Tree/297H. Serialize and Deserialize Binary Tree.cpp | /*
297H. Serialize and Deserialize Binary Tree
Tree, Design
Description:
Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file or memory buffer, or transmitted across a network connection link to be reconstructed later in the same or another co... | ALGO | 0.999945 | 6.687607 | {
"github_metadata": {
"branch": "main",
"commit_count": 1217,
"repo_created_at": "2020-11-05T07:02: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": "efb866cf0... |
4921062a-5e8f-4f0e-85ee-2365f90d7d40 | mdahtotul/phitron_course | Algorithom course/Module 11/problem3.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
int visited[N];
vector<int> adj_list[N];
bool dfs(int src) {
visited[src] = 1;
for(int child: adj_list[src]) {
if(visited[child] == 0) {
visited[child] = 1;
bool got_cycle = dfs(child);
if(got_cycle) {
return true;
... | ALGO | 0.999989 | 4.902781 | {
"github_metadata": {
"branch": "main",
"commit_count": 106,
"repo_created_at": "2022-10-29T18:59:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "19938921fc... |
15e82459-e7e8-4dd0-a311-ba821659ab69 | WhiZTiM/coliru | Archive2/2f/b0ea4db696c5b9/main.cpp | #include <atomic>
#include <iostream>
#include <mutex>
#include <vector>
#include <thread>
#include <sstream>
std::mutex mutexes[3];
std::mutex print_mutex;
auto print = [](const std::string& s){
std::lock_guard<std::mutex> lock_print_mutex(print_mutex);
std::cout << s;
};
auto println = [](const std::strin... | TOOL | 0.922632 | 5.345855 | {
"github_metadata": {
"branch": "master",
"commit_count": 42630,
"repo_created_at": "2016-04-21T16:34:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "42cdce... |
f38273b9-14de-4bab-beb7-ded921f65744 | avierkin03/Procedural-programming | 03Averkin/Main.cpp | #include <iostream>
#include "Functions.h"
#include <math.h>
#include <cmath>
using namespace std;
int main()
{
cout << "Gaussian integral\n" << endl;
for (double x = 1; x <= 10; x++)
{
cout << "x="<<x<<": "<< gaussIntegr(x) << endl;
}
cout << "After x = 6, incorrect results begin, due to ... | ALGO | 0.992124 | 5.051765 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2022-03-16T16:31: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": "7677ed86ece... |
cb06bb59-174a-4499-98d9-fe1326cc855e | Vinayak-C12/Competitive-Programming | Stack/Robot_Collisions.cpp | //Leetocde - Robot Collisions - Medium
//https://leetcode.com/problems/robot-collisions/description/?envType=daily-question&envId=2024-07-13
class Solution {
public:
vector<int> survivedRobotsHealths(vector<int>& positions, vector<int>& healths, string directions) {
unordered_map<int,int> um;
vecto... | ALGO | 0.999992 | 6.009687 | {
"github_metadata": {
"branch": "main",
"commit_count": 75,
"repo_created_at": "2023-08-07T13:28: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": "61fe7f96d82... |
1dae2c5b-18e9-499c-aff7-3f8a2837a243 | Marwanthe0/XPSC | Week_3/Day_1/C_Dotify_Playlist.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define M 1000000007
#define N 1000000
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
void marwan()
{
ll n, x, y;
cin >> n >> x >> y;
vector<ll> songs;
for (ll i = 0; i < n; i++)
{
ll a, b;
cin >> a... | ALGO | 0.999757 | 4.116417 | {
"github_metadata": {
"branch": "main",
"commit_count": 144,
"repo_created_at": "2024-10-27T17:56: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": "5c8f1ed003... |
2bff25e3-259a-4457-a16d-d0ad7e5d6090 | achiyang/coding-test | 14889 - 스타트와 링크/Source.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <cmath>
int min = INT_MAX;
void calMinDiff(std::vector<std::vector<int>>& S, int depth, int idx, int max) {
static std::vector<bool> visited(max, false);
if (depth == max / 2) {
int team1 = 0, team2 = 0;
for (int i = 0; i <... | ALGO | 0.999983 | 4.430107 | {
"github_metadata": {
"branch": "main",
"commit_count": 59,
"repo_created_at": "2023-10-25T18:55: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": "452e8a83f89... |
007c6586-e2d3-484d-9cd5-6534831cad5c | Flamel-NW/ACM-Code-Template | BIT/POJ-2182.cpp | // POJ-2182
#include <cstdio>
#include <cstring>
const int MAXN = 10000;
int tree[MAXN];
int pre[MAXN], ans[MAXN];
int n;
#define lowbit(x) ((x) & -(x))
void add(int x, int d)
{
while (x <= n)
{
tree[x] += d;
x += lowbit(x);
}
}
int sum(int x)
{
int sum = 0;
while (x > 0)
{
... | ALGO | 0.999992 | 3.595909 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2021-10-30T11:08: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": "abeecef362... |
bf1e0063-e976-4ff3-817d-39034dc838bb | jimeemk/cga | photon_mapping/src/PhotonMapper.cpp | #include "../include/PhotonMapper.h"
#include <fstream>
#include "../common/algorithms/parallel_for.h"
PhotonMapper::PhotonMapper()
{
}
PhotonMapper::~PhotonMapper()
{
}
Vec3f PhotonMapper::randomDir(int *seed, Vec3f normal)
{
double nums[3];
Vec3f dir = Vec3f(0.f);
do
{
niederreiter2(3, seed, nums);
dir.x... | ALGO | 0.99794 | 4.21737 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2020-09-23T23:00: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": "0b338780a... |
22176b2f-af9f-498f-a5e6-6d0a91623e50 | LLNL/polytope | src/BoostOrphanage.hh | //------------------------------------------------------------------------
// BoostOrphanage
//
// Descended class for implementing a cell adoption algorithm. Uses
// Boost.Geometry to construct sub-regions of space on which bounded
// tessellations are built. The sub-regions include the orphaned cell
// pieces and th... | ALGO | 0.997992 | 5.709439 | {
"github_metadata": {
"branch": "master",
"commit_count": 754,
"repo_created_at": "2019-02-25T03:32:33.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 9,
"forks": 2,
"issues": 8,
"pull_requests": 3
},
"file_meta": {
"content_id": "a7d942690... |
209fcd92-a6b9-43e3-ae14-5cba06d47494 | TheAlgorithms/C-Plus-Plus | ciphers/caesar_cipher.cpp | /**
* @file caesar_cipher.cpp
* @brief Implementation of [Caesar cipher](https://en.wikipedia.org/wiki/Caesar_cipher) algorithm.
*
* @details
* In cryptography, a Caesar cipher, also known as Caesar's cipher, the shift cipher,
* Caesar's code or Caesar shift, is one of the simplest and most widely known encrypti... | ALGO | 0.998431 | 6.351134 | {
"github_metadata": {
"branch": "master",
"commit_count": 1738,
"repo_created_at": "2016-07-16T10:19:45.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 32391,
"forks": 7439,
"issues": 10,
"pull_requests": 23
},
"file_meta": {
"content_id": ... |
e611149e-aedd-43b7-b8c8-bcd2b6499989 | dortheg/freya2.0.3 | src/getTotEngP.cc | /*
Copyright (c) 2006-2016 Lawrence Livermore National Security, LLC.
Produced at the Lawrence Livermore National Laboratory
UCRL-CODE-224807.
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
o Redistr... | ALGO | 0.978684 | 6.245484 | {
"github_metadata": {
"branch": "master",
"commit_count": 100,
"repo_created_at": "2018-01-08T19:20:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "2a960088... |
61fb2d37-eda2-49d2-af8d-4902f996069a | shreyaslshah/coding | CPP/Kth-largest-element-in-a-stream.cpp | // https://practice.geeksforgeeks.org/problems/kth-largest-element-in-a-stream2220/1
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
vector<int> kthLargest(int k, int arr[], int n) {
vector<int> ans;
priority_queue<int, vector<int>, greater<int>> heap;
for (i... | ALGO | 0.999972 | 5.259601 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2022-03-11T07:43: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": "07e41a283... |
e50f7d46-6605-49c9-a23b-e8bda32ef0bf | Alex-Tsvetanov/Informatics | codes/Alex/SoftUni/lecture/sort_and_search/homework/interpolation_search.cpp | #include <iostream>
using namespace std;
void print_ar (int* ar, int size)
{
for (int i = 0; i < size; ++i)
{
cout << ar[i] << " ";
}
cout << endl;
}
int interpolation_search (int* ar, int value, int size)
{
int low = 0;
int high = size - 1;
int mid;
while (ar[low] <= value && ar[high] >= va... | ALGO | 0.999781 | 4.302989 | {
"github_metadata": {
"branch": "master",
"commit_count": 282,
"repo_created_at": "2015-09-19T19:14:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "6c2e3681... |
368791b5-1699-4a71-b778-45eb75f7e4ef | wtenorioucb/ProgramacionI_2-2024 | Recursividad/Ejercicio00.cpp | #include <iostream>
#include <wchar.h>
using namespace std;
int busquedaBinariaRecursiva(int[], int, int, int);
int main()
{
int v[] = {2,4,14,23,34,67};
int n = 9;
setlocale(LC_ALL, "");
cout << "Resultado: " << busquedaBinariaRecursiva(v,34,0,5);
return 0;
}
int busquedaBinariaRecursiva(int ar... | ALGO | 0.999938 | 3.991404 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2024-08-07T21:39:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e6014406a... |
7d58b6cb-416e-4f9d-af7e-9932098327c3 | yongyg/usercode | Pi0Calibration/Endcap/calibUtils.cc |
//Input two clusters, compute all variables from that
///with new calibration calconst after each step
void calcPairClusterUpdated(float CalInput[2][101][101],float res[]){
Float_t msum9[2], meta[2], mphi[2];
int ietaxt[9]; //after convxtlid
int iphixt[9];
int izxt[9];
float ext[9];
float p... | ALGO | 0.996758 | 4.222802 | {
"github_metadata": {
"branch": "master",
"commit_count": 77,
"repo_created_at": "2013-06-10T15:20:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "58b064cf8... |
f4c9c745-3e08-4f60-8623-cfec7544b204 | 000x999/Neural_Net | src/NeuralNet.cpp | #include "NeuralNet.h"
Net::Net(const std::vector<unsigned>& topology) {
uint16_t numLayers = static_cast<uint16_t>(topology.size());
for (uint16_t layerNum = 0; layerNum < numLayers; ++layerNum) {
_layers.push_back(Layer());
uint16_t numOutputs = layerNum == topology.size() - 1 ? 0 : topology[... | ALGO | 0.916891 | 4.925236 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2024-09-22T21:59:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cc512f69bda7... |
c048dc1d-3315-4c30-872b-f63d2da58121 | sauravchandra1/Competitive-Programming | Timus/DP/1012.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair < int, int > pii;
typedef pair < ll, ll > pll;
const ll mod = 1e9 + 7;
const int siz = 1e5 + 9;
#define eb emplace_back
#define mp make_pair
#define OPEN 1
ll dp[20];
int main() {
if (OPEN) {
freopen... | ALGO | 0.999961 | 3.862778 | {
"github_metadata": {
"branch": "master",
"commit_count": 36,
"repo_created_at": "2018-03-05T13:23:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 9,
"issues": 0,
"pull_requests": 5
},
"file_meta": {
"content_id": "d4cfd1c3e... |
85223dad-fd0e-4116-bafa-b01f103d8730 | jiqiren1hao/Gadget | LeetCode/Letter Combinations of a Phone Number/Letter Combinations of a Phone Number.cpp | // Letter Combinations of a Phone Number.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#include <algorithm>
#include <Windows.h>
using namespace std;
class Solution {
public:
vector<string> letterCombinatio... | ALGO | 0.999848 | 5.772125 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2016-11-05T01:34: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": "be5c2a788... |
492356ae-e924-49ec-a56e-40aeb32748cd | f-zyj/ACM | 按 OJ 分类/51Nod/f-51Nod-1412-AVL树的种类/f-51Nod-1412-AVL树的种类/main.cpp | //
// main.cpp
// f-51Nod-1412-AVL树的种类
//
// Created by ZYJ on 16/9/16.
// Copyright © 2016年 ZYJ. All rights reserved.
//
//#include <stdio.h>
//
//#define LL long long
//#define P 1000000007
//#define MAXN 2000
//#define MAXL 15
//
//int min[MAXL + 1];
//int max[MAXL + 1];
//int dp[MAXN + 1][MAXL + 1];
//
//int s... | ALGO | 0.999973 | 4.42017 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2018-05-18T16:14:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 199,
"forks": 55,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2366e6... |
c7591c5a-5bd7-40b8-a2a3-64898ef85d22 | kennent/for_scsc_code_save | codeforces/895div3/d.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll solution() {
map<ll, ll> save;
ll n, x, y;
cin >> n >> x >> y;
ll v = n-(n/x - n/(x*y/__gcd(x, y)));
ll sum = n*(n+1)/2 - v*(v+1)/2;
ll z = (n/y - n/(x*y/__gcd(x, y)));
sum -= z*(z+1)/2;
// cout << "->" << v << " " << z << "\n";
... | ALGO | 0.999871 | 4.237923 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-05-16T23:16: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": "f635c5b34b38... |
36e7001b-bd65-459e-97ed-9eeedead2e2f | MagicalSheep/Daily | pratice/P4124.cpp | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll L, R, f[11 + 5][10][10][2][2][2][2], num[11 + 5];
ll dfs(ll p, ll last, ll llast, ll _4, ll _8, ll is_3, ll ok)
{
if (~f[p][last][llast][_4][_8][is_3][ok])
return f[p][last][llast][_4][_8][is_3][ok];
if (_4 && _8)
return 0;... | ALGO | 0.999695 | 4.139758 | {
"github_metadata": {
"branch": "main",
"commit_count": 488,
"repo_created_at": "2021-07-12T09:23: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": "71c487e44a... |
6f07708c-16e6-49db-99d5-6fca0ba002ba | poweihuang17/practice_leetcode_and_interview | Leetcode/Reservoir/382_Linked_List_Rangdom_Node.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
/** @param head The linked list's head.
Note that the head is guaranteed to be not null, so it contains at least one node. *... | ALGO | 0.999743 | 5.381373 | {
"github_metadata": {
"branch": "master",
"commit_count": 608,
"repo_created_at": "2018-02-07T08:21:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "4a303fb1... |
4074de53-3b6c-42b2-865a-d861f7d233bb | OneBelowALLL/XPSC_Batch_04 | week 7/Day 4/F_String_Game.cpp | //<NAME>
#include<bits/stdc++.h>
#define endll "\n"
#define ll long long
#define FlashIO (ios_base:: sync_with_stdio(false),cin.tie(NULL));
using namespace std;
int main()
{
FlashIO
string str,str2;
cin >> str >> str2;
int n = str.size() , m = str2.size();
vecto... | ALGO | 0.999955 | 3.802497 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2024-03-16T15:12: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": "5888fa71b6c... |
b5bbbcfc-c5f0-4f73-a475-80666c2e2d2f | Teo12222/MorgofsReckoning | TowerDefence/game/PathGeneration.cpp | #include <iostream>
#include <vector>
#include <random>
#include <time.h>
using namespace std;
struct gridspace {
int type;
int i;
int j;
float local;
float global;
gridspace* parent;
bool isVisited;
// https://stackoverflow.com/questions/14047191/overloading-operators-in-typedef-stru... | ALGO | 0.999654 | 4.840571 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-11-23T16:46:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec74570a3cd1... |
41da1f31-c555-43d8-a600-afda90b46633 | NayanJD/Competitive | cpp/string/needle_haystack.cpp | #include<iostream>
#include<vector>
using namespace std;
class Solution {
public:
int strStr(string haystack, string needle) {
int n = haystack.size();
int m = needle.size();
// to initialize all elements with 0
int lps[m];
int len = 0, j = 1;
lps[len] = 0;
... | ALGO | 0.999943 | 4.880799 | {
"github_metadata": {
"branch": "main",
"commit_count": 116,
"repo_created_at": "2018-07-25T08:44: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": "d4ecb249ad... |
d0b084e8-2ede-4dfc-b2a0-2ce06c4e2c62 | liuyubobobo/Play-Leetcode | 1001-1500/1181-Before-and-After-Puzzle/cpp-1181/main.cpp | /// Source : https://leetcode.com/problems/before-and-after-puzzle/
/// Author : liuyubobobo
/// Time : 2019-09-07
#include <iostream>
#include <vector>
#include <set>
using namespace std;
/// Brute Force
/// Time Complexity: O(n^2 * (|s| + logn))
/// Space Complexity: O(n * |s|)
class Solution {
public:
vect... | ALGO | 0.999785 | 5.402193 | {
"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": "22... |
5db78e02-93e2-4532-9e3c-d5dfc13adb04 | NitishH27/DS4 | array-stack.cpp | #include<iostream>
using namespace std;
const int LEN = 100;
class Stack{
protected:
int arr[LEN];
int top = -1;
public:
// Stack(){
// }
void display() {
for(int i=top;i>=0;i--)
cout<<arr[i]<<" ";
cout<<"\n";
}
in... | ALGO | 0.97984 | 3.988905 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-12-15T05:25: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": "9c8edfa47a03... |
1eef9c74-6d9f-42df-81b6-7fd979c2c5f4 | mizan92782/LEETCODE-PROBLEM-SOLUTION | 508-most-frequent-subtree-sum/most-frequent-subtree-sum.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999974 | 5.626174 | {
"github_metadata": {
"branch": "main",
"commit_count": 817,
"repo_created_at": "2023-08-15T11:29:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "969bb9064a... |
c0ced406-8546-40fd-87a4-a9449e5a13a1 | jianglin332/codes | a.cpp | #include <stdio.h>
#include <algorithm>
#include <stdlib.h>
#include <math.h>
#define pi 3.1415926535897932
#define eps 1e-15
#define POL 1
#define RECT 2
using namespace std;
double dmod(double a, double b)
{
return fmod(fmod(a, b) + b, b);
}
inline bool iz(d... | ALGO | 0.999932 | 3.397144 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-02-05T12:47: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": "57d2a1199b... |
960010f3-cf54-4188-ac5a-9fb312163d4e | OrionQuest/Nova_Examples | embedded_deformables/Rotated_Stress_Derivative.cpp | //!#####################################################################
//! \file Rotated_Stress_Derivative.cpp
//!#####################################################################
#include <nova/Tools/Matrices/Symmetric_Matrix_2x2.h>
#include <nova/Tools/Matrices/Symmetric_Matrix_3x3.h>
#include "Rotated_Stress_D... | ALGO | 0.982456 | 5.930165 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2018-07-16T21:15:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "aae57d4b8... |
c90102e5-8bc2-4465-9f75-91cadd2f5c7f | abhiXsliet/Solved-DSA-Problems | Leetcode Daily Challenge/007-January-2024/022-set-mismatch.cpp | // https://leetcode.com/problems/set-mismatch/
#include <bits/stdc++.h>
using namespace std;
class Solution {
private:
// TC : O(N)
// SC : O(N)
vector<int> solve_approach_1(vector<int>& nums, int n) {
unordered_map<int, int> mpp;
vector<int> result;
for (int num : nums) mpp[num... | ALGO | 0.999873 | 5.524294 | {
"github_metadata": {
"branch": "main",
"commit_count": 2156,
"repo_created_at": "2023-07-29T13:17:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e4457d94a... |
42678a84-1952-41ff-8ebd-11336f5c38d7 | henrytang1/competitive-programming | Problems/FairFight.cpp | //#include <bits/stdc++.h>
#include <iostream>
#include <set>
using namespace std;
typedef pair <int,int> pii;
typedef long long ll;
ll T, N, K;
ll c[100005];
ll d[100005];
ll tc[400005];
ll td[400005];
void initializec(int node, int s, int e){
if (s == e) {
tc[node] = c[s];
}
else {
int m ... | ALGO | 0.999519 | 3.663857 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-09-21T03:05: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": "254783ba65... |
6002ccad-06e0-44c9-a2ec-580a9269797d | openhpc/ohpc | tests/apps/hpcg/src/CG_ref.cpp |
//@HEADER
// ***************************************************
//
// HPCG: High Performance Conjugate Gradient Benchmark
//
// Contact:
// <NAME> ( <EMAIL>)
// <NAME> (<EMAIL>)
// <NAME> (<EMAIL>)
//
// ***************************************************
//@HEADER
/*!
@file CG_ref.cpp
HPCG routine
*/
#i... | ALGO | 0.99923 | 5.818472 | {
"github_metadata": {
"branch": "3.x",
"commit_count": 12766,
"repo_created_at": "2015-09-28T18:20:29.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 917,
"forks": 199,
"issues": 9,
"pull_requests": 2
},
"file_meta": {
"content_id": "6adf34... |
8cf3d99b-82fd-4f06-bd01-640ef54b4ed6 | sparshrex/CrackYourInternship-CrackYourPlacement | 0094-binary-tree-inorder-traversal/0094-binary-tree-inorder-traversal.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999996 | 6.047938 | {
"github_metadata": {
"branch": "main",
"commit_count": 166,
"repo_created_at": "2023-07-03T07:58: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": "252bc46c60... |
ee3c776f-9ea0-4e0c-b847-aa114e0e8e59 | kidclone3/CP | OnlineJudge/Codeforces/TOPIC/math/Nastia_and_a_Good_Array.cpp | // https://codeforces.com/contest/1521/problem/B
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define vi vector<int>
#define ll long long
#define all(x) x.begin(), x.end()
#define FORIT(i, s) for (auto it=(s.begin()); it!=(s.end()); ++it)
#define F_OR(i, a, b, s) for (int i=(a); (s)>0? i<(b) : i... | ALGO | 0.99973 | 3.216526 | {
"github_metadata": {
"branch": "cp",
"commit_count": 3,
"repo_created_at": "2020-11-17T04:04:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "86d1a408f96351... |
634d0cd9-bab8-449b-bd24-969324e2c8c8 | Hell0Kitty/pku-online-judge | 3691.cc | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <queue>
#include <algorithm>
using namespace std;
const int MAX_N = 50, MAX_P = 20, MAX_W = 1000, SON = 4, INF = 0x3f3f3f3f;
char t[MAX_P + 1], s[MAX_W + 1];
int n, idx[256];
int f[2][MAX_N * MAX_P + 1], now, pre;
struct node_t {
node_t *son[SON], *fa... | ALGO | 0.999425 | 3.52443 | {
"github_metadata": {
"branch": "master",
"commit_count": 4334,
"repo_created_at": "2017-03-03T05:44:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dc68444... |
82b6ea71-89dc-49ee-901a-22cb6d1c2eeb | sayand0122/Data-Structures-Algorithms-DSA- | C++/sort_quick.cpp | #include <stdio.h>
int partition(int a[], int lb, int ub)
{
int start, end, pivot, t1, t2;
pivot = a[lb];
start = lb;
end = ub;
while (start < end)
{
while (a[start] <= pivot)
{
start++;
}
while (a[end] > pivot)
{
end--;
}
... | ALGO | 0.999965 | 5.041276 | {
"github_metadata": {
"branch": "main",
"commit_count": 82,
"repo_created_at": "2020-11-06T09:10:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 7,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d766c07902... |
f53452b5-c2aa-49fa-8efd-d72f32a17723 | bjarkimb/EQ2443-2445-Project-Group2 | include/volk/volk_32fc_index_max_32u.h | /* -*- c++ -*- */
/*
* Copyright 2016 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option... | ALGO | 0.998436 | 6.173743 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-12-19T09:13:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "67422f6221... |
885ddce9-117a-46da-af1f-7d3affbd7e23 | keerden/AdventOfCode | 2023/src/day5.cpp | #include <bits/stdc++.h>
#include "solutions.h"
class RangeItem {
private:
long int max;
long int diff;
long int source;
long int destination;
long int length;
public:
RangeItem(std::string line) {
std::stringstream ss{line};
ss >> destination;
ss >> source;
... | ALGO | 0.999451 | 5.636329 | {
"github_metadata": {
"branch": "master",
"commit_count": 55,
"repo_created_at": "2020-12-10T10:31: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": "38bd9014e... |
eb6e6206-c531-435c-8e11-43887dbd9492 | eng-Gaganpreet/DSA-Practice-Cpp | trees/inorder_iterative.cpp | #include <bits/stdc++.h>
using namespace std;
class node
{
public:
int data;
node *left;
node *right;
node(int data)
{
this->data = data;
this->left = nullptr;
this->right = nullptr;
}
};
node *buildTree(node *root)
{
int data;
cout << "enter the data : ";
... | ALGO | 0.999923 | 4.879543 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2025-06-01T12:16:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "446d2bd6d41... |
5ccfa049-9284-4a45-ba02-4480ea54725e | jwlim/tracker_benchmark | trackers/MUSTer/mexopencv/src/+cv/private/BOWKMeansTrainer_.cpp | /**
* @file BOWKMeansTrainer_.cpp
* @brief mex interface for BOWKMeansTrainer
* @author <NAME>
* @date 2012
*/
#include "mexopencv.hpp"
using namespace std;
using namespace cv;
namespace {
/// Last object id to allocate
int last_id = 0;
/// Object container
map<int,BOWKMeansTrainer> obj_;
/** KMeans initalizatio... | ALGO | 0.982185 | 6.634248 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2013-04-17T01:20:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 265,
"forks": 124,
"issues": 25,
"pull_requests": 3
},
"file_meta": {
"content_id": "f67b... |
0ff39afa-7318-40d3-abc2-15f83074556d | adobe/chromium | third_party/harfbuzz-ng/src/hb-ot-layout-gsubgpos-private.hh | /*
* Copyright © 2007,2008,2009,2010 Red Hat, Inc.
* Copyright © 2010 Google, Inc.
*
* This is part of HarfBuzz, a text shaping library.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentatio... | TOOL | 0.956767 | 5.599719 | {
"github_metadata": {
"branch": "master",
"commit_count": 105556,
"repo_created_at": "2012-05-02T01:09:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 217,
"forks": 206,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "1e... |
b3c3c369-0984-4ba2-90b9-5cd2dda4aa3a | FineArtz/SJTUOJ | P1042.cpp | /* 左儿子右兄弟 */
#include <iostream>
using namespace std;
class Node{
public:
int child = 0, brother = 0;
};
Node a[12350];
bool v[12350] = {0};
void dlr(int x){
cout << x << ' ';
int i = a[x].child;
while (i != 0){
dlr(i);
i = a[i].brother;
}
}
void lrd(int x){
int i = a[x].chil... | ALGO | 0.999992 | 3.903867 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2018-03-27T14:27:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fad8f3276c... |
2c937404-d13f-435f-82c2-931a3daf3a68 | reoono/competitive-programming-archive | archive/atcoder.jp/abc054/abc054_b/Main.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
using Edge = pair<int, ll>;
using Graph = vector<vector<int>>;
using WeightedGraph = vector<vector<Edge>>;
const ll INF64 = 1LL << 60;
const int INF32 = 1 << 29;
const ll MO... | ALGO | 0.999986 | 4.742934 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-04-30T13:44: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": "99524da655... |
7ee0d094-c68f-4f97-a68b-4da444217cf0 | IsratJahanR/codeforces | 1613B. Absent Remainder.cpp | /// Author: <NAME>
/// ID:18ICTCSE041
/// Dept.of CSE
/// Sheikh Hasina ICT Institute
/// BSMRSTU
///......................****************************............................///
#inclu... | ALGO | 0.999914 | 3.169762 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2020-05-16T15:27: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": "205dad211... |
2a2969a2-5b7e-475c-9f7f-2308e6f769db | snipersim/snipersim | common/core/memory_subsystem/cache/cache_set_nru.cc | #include "cache_set_nru.h"
#include "log.h"
// NRU: Not Recently Used. Some sort of Pseudo LRU policy.
CacheSetNRU::CacheSetNRU(
CacheBase::cache_t cache_type,
UInt32 associativity, UInt32 blocksize) :
CacheSet(cache_type, associativity, blocksize)
{
m_lru_bits = new UInt8[m_associativity];
for (... | ALGO | 0.912364 | 6.630318 | {
"github_metadata": {
"branch": "main",
"commit_count": 1303,
"repo_created_at": "2022-05-18T13:30:06.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 137,
"forks": 78,
"issues": 10,
"pull_requests": 9
},
"file_meta": {
"content_id": "4d210f... |
6b137d50-7fac-433c-ad3e-3ffbea491038 | ishandutta2007/codeforces-o | ooops_no/normal/1556/D.cpp | #include<iostream>
#include<algorithm>
#include<vector>
#include<random>
#include<map>
#include<set>
#include<deque>
#include<assert.h>
#include<bitset>
#include<unordered_map>
using namespace std;
#define pb push_back
#define ld long double
#define ll long long
#define int long long
mt19937 rnd(51);
int get_or(int... | ALGO | 0.999935 | 3.192919 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:45:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "44588a2b3190... |
7d4c7830-1fc6-48fc-b606-5c2fcf25274f | NguyenBui256/PTIT | DSA/DSAKT053 - SỐ NGUYÊN LỚN.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i,a,b) for(int i = a; i < b; i++)
#define FORD(i,a,b) for(int i = a; i > b; i--)
#define fi first
#define se second
#define MOD 1000000007
ll n, m, k, final = 0;
// int a[100005];
// int b[10000005];
void solve()
{
string s,t; cin >> s... | ALGO | 0.999981 | 4.310833 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2023-02-27T03:30:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "700d7740408... |
bbb75e79-8e6a-4c96-a814-207c7654e77a | ibudiselic/contest-problem-solutions | tc tournaments/BidirectionalQueue.cpp | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
using namespace std;
int cost(vector<int> &cur, int x) {
int a = 0;
while (cur[a] != x) {
++a;
}
int b = (int)cur.size() - 1;
while (cur[... | ALGO | 0.999845 | 5.152233 | {
"github_metadata": {
"branch": "master",
"commit_count": 75,
"repo_created_at": "2011-08-14T11:43:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5214ce110... |
b528c578-5a79-4c4b-b615-3ecd24d10cdf | almarazita/CS_210 | tree.h | #ifndef TREE_H
#define TREE_H
#include "treenode.h"
#include <iostream>
#include <cstdlib>
#include <vector>
#include <string>
using namespace std;
// Definition of a Binary Search Tree class
template <typename T>
class Tree{
public:
// default constructor, sets the root to NULL
Tree();
// copy constructor, d... | ALGO | 0.995319 | 3.705959 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-05-13T06:52: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": "4da8bd568efb... |
1d3c9877-ad03-4235-8d30-db4557dc9a91 | john-zal/Hyun | BOJ/7576_토마토.cpp | #include <iostream>
using namespace std;
#include <vector>
#include <string>
#include <queue>
#define VISITED 1
vector<pair<int, int>> STARTPAIR;
pair<int, int> SetKey(int num)
{
pair<int, int> p;
enum class EKey {
up,
down,
left,
right
};
EKey key = (EKey)num;
switch (key)
{
case EKey::up:
p = { -1,... | ALGO | 0.999982 | 3.82695 | {
"github_metadata": {
"branch": "main",
"commit_count": 91,
"repo_created_at": "2022-01-24T06:02:11.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e8fa4630ff57... |
c09adff0-dfc4-45c3-9d4a-52264ad6d450 | Mohit-106/DSA_Level_2 | Trees/TreesMore/18_WidthShadowOfBT.cpp | #include <bits/stdc++.h>
using namespace std;
class TreeNode
{
public:
int val = 0;
TreeNode *left = nullptr;
TreeNode *right = nullptr;
TreeNode(int val)
{
this->val = val;
}
};
int minRange = INT_MAX;
int maxRange = INT_MIN;
void width(TreeNode *root, int hl)
{
if (root)
{
... | ALGO | 0.999816 | 4.592361 | {
"github_metadata": {
"branch": "main",
"commit_count": 44,
"repo_created_at": "2022-06-16T07:11:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c3a031a5722... |
ea6de1b9-e848-4bcb-9670-3943fe255261 | AnkitSharma5304/leetcode-C- | Remaining topics Linked list , recursion etc/firstOccurance.cpp | #include <iostream>
using namespace std;
int firstoccurance(int arr[], int n, int key)
{
int start = 0;
int end = n - 1;
int ans = -1;
int mid = start + (end - start) / 2;
while (start <= end)
{
if (arr[mid] == key)
{
ans = mid;
end=mid-1;//end mid -1 ho... | ALGO | 0.999898 | 4.425123 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-05-15T11:41: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": "215ba453e2ed... |
9f94acb1-a4d5-4420-9d8b-6842cef305b9 | phnam24/C_plus_plus-PTIT | CPP0227_in_ma_tran_1.cpp | #include <bits/stdc++.h>
#define test int t; cin >> t; while (t--)
#define endl '\n'
using namespace std;
int main ()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
test
{
int n;
cin >> n;
int a[n][n];
for ( int i = 0; i < n; i++)
{
... | ALGO | 0.999934 | 3.992082 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2022-08-14T14:27:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7b22a27da... |
a9bb7173-2b9e-46b6-a7eb-5e9b59d216c5 | ishandutta2007/codeforces-d | dingdingsb/normal/208/E.cpp | #include<bits/stdc++.h>
namespace in{
#ifndef slow
char buf[1<<21],*p1=buf,*p2=buf;
inline int getc(){return p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++;}
#else
inline int getc(){return getchar();}
#endif
template <typename T>inline void read(T& t){
t=0;int f=0;ch... | ALGO | 0.999986 | 3.849542 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31: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": "6aa9aa635015... |
4fb395dd-210f-43c6-a122-10caa3cce1cf | SnowySparks/Algorithm_Solve | BackJoon_solved/그래프/1765_닭싸움팀정하기.cpp | #include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
using namespace std;
#define f(a, b, c) for(int a=b; a<c; ++a)
#define FRIEND 'F'
#define ENEMY 'E'
int n, m;
int parent[1001];
bool isCounted[1001];
vector<int> adj[1001];
int findp(int x) {
if (x == parent[x]) return x;
return par... | ALGO | 0.999752 | 3.752778 | {
"github_metadata": {
"branch": "main",
"commit_count": 186,
"repo_created_at": "2024-11-21T01:38: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": "8b9c904448... |
3f08c5b3-d39e-47fe-8fd6-1187262f5ad0 | ysl2/kaoyan-data-structure | 00-Keypoint_in_WangDao/Chapter_06-Graph/04-AOV_Net_and_Topological_Sort/02-Inverse_Topological_Sort.cpp | // 逆拓扑排序:DFS
// 2020-10-20
#include <string.h>
#include <iostream>
using namespace std;
typedef int ElemType;
typedef struct {
int number; // 顶点的编号,这一项用户不能自己定义,是固定的从0开始的数字
ElemType data; // 顶点信息。这一项是从用户输入的vertex数组中写入的,并不要求非要int型,也可以是A,B,C这种
} VertexType; // 上面这两项,在遍历的时候不会打印。但是真实存在,用于对结点信息进行补充描述
typedef str... | ALGO | 0.999992 | 4.933436 | {
"github_metadata": {
"branch": "master",
"commit_count": 187,
"repo_created_at": "2020-08-31T09:02:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "27159d6b... |
eb096e9c-b736-4a7d-9f5f-9f8ad1469478 | CubbyFlow/CubbyFlow | Sources/Core/Geometry/ImplicitSurfaceSet.cpp | // This code is based on Jet framework.
// Copyright (c) 2018 <NAME>
// CubbyFlow is voxel-based fluid simulation engine for computer games.
// Copyright (c) 2020 CubbyFlow Team
// Core Part: <NAME>, <NAME>, <NAME>, <NAME>
// AI Part: <NAME>, <NAME>
// We are making my contributions/submissions to this project solely i... | ALGO | 0.977167 | 7.547833 | {
"github_metadata": {
"branch": "main",
"commit_count": 996,
"repo_created_at": "2018-05-05T13:13:37.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 286,
"forks": 34,
"issues": 33,
"pull_requests": 1
},
"file_meta": {
"content_id": "67b10e8... |
e57d9488-461a-497a-9fa6-da377771f6ac | Jitendra708097/DSA-WITH-C- | patterns/p8.cpp | /*
* * * *
* *
* * * * *
* *
* * * *
*/
#include<iostream>
using namespace std;
int main()
{
int n;
cout<<"Enter the number : ";
cin>>n;
if(n<2)
{
cout<<"sorry : pattern can't make because number is less than 2 "<<endl;
cout<<"please enter valid number "<<endl;
... | ALGO | 0.999967 | 3.83567 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-05-01T17:50: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": "8674905e690b... |
22668e75-8e4e-4ff8-8f85-2ef0b5e35ddf | Gal-Noy/The-Coalition-Race | src/Simulation.cpp | #include "Simulation.h"
#include <utility>
Simulation::Simulation(Graph graph, vector<Agent> agents) : mGraph(std::move(graph)), mAgents(std::move(agents)),
mCoalitions(vector<Coalition>{}), maxMandatesCoalition(0),
... | ALGO | 0.999196 | 6.135318 | {
"github_metadata": {
"branch": "master",
"commit_count": 63,
"repo_created_at": "2022-11-07T09:48:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f460740af... |
5c3f7db1-26c2-4107-8f21-0dc715d37326 | Danrod0/ie0217 | Previos/Previo3/Recursividad.cpp | // Factorial of n = 1*2*3*...*n
#include <iostream> // Libreria
using namespace std; // Permite usar los elementos de std
int factorial (int); // Prototipo de la funcion factorial
int main() {
int n, result; // Crea las variables necesarias
cout << "Enter a non-negative number: "; // Pide al usuario un ... | ALGO | 0.999742 | 5.610985 | {
"github_metadata": {
"branch": "main",
"commit_count": 142,
"repo_created_at": "2024-03-18T14:54: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": "22eda1ba32... |
3aa7fc25-b38e-4595-a215-f51aa7766100 | AmadeusChan/binary | binary.cpp | #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std ;
int ans[ 100 ] , cnt = 0 ;
int mod( int x ) {
if ( x > 0 ) return x % ( -2 ) ; else return - ( x % ( -2 ) ) ;
}
int div( int x ) {
if ( ! mod( x ) ) return x / ( -2 ) ; else return ( x - 1 ) / ( -2 ) ;
}
int main( ) {
freopen( "bin... | ALGO | 0.999993 | 3.68183 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-08-05T05:18: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": "0efa083a8a... |
fc4d3c4d-ddaa-4427-ba24-79ca580d8d89 | Tencent/TNN | source/tnn/device/arm/acc/compute_arm82/arm_softmax_fp16_layer.cc | // Tencent is pleased to support the open source community by making TNN available.
//
// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved.
//
// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
// in compliance with the License. You may obtain a copy o... | ALGO | 0.997201 | 6.829171 | {
"github_metadata": {
"branch": "master",
"commit_count": 2512,
"repo_created_at": "2020-05-29T07:20:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4549,
"forks": 771,
"issues": 306,
"pull_requests": 9
},
"file_meta": {
"content_id": "5... |
901be75c-6b85-4d06-8741-712dcef4dad8 | ajitkushwaha123/codeforces | A_Pashmak_and_Garden.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b,c,d;
cin>>a>>b>>c>>d;
int p = 0,q = 0,r = 0,s = 0;
if(b == d)
{
p = a;
r = c;
q = sqrt((a-c)*(a-c) + (b-d)*(b-d) - (p-a)*(p-a)) + b;
s = sqrt((a-c)*(a-c) + (b-d)*(b-d) - (r-c)*(r-c)) + d;
co... | ALGO | 0.99997 | 3.358473 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-08-01T16:48: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": "19efbde58050... |
eb632da9-7009-4216-b947-cef36cde70e2 | CodeGhostX/CrackYourPlacement | Linked List/Intersection of Two Linked Lists.cpp | #include<bits/stdc++.h>
using namespace std;
// 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:
Lis... | ALGO | 0.999783 | 5.517779 | {
"github_metadata": {
"branch": "main",
"commit_count": 156,
"repo_created_at": "2024-07-16T09:46: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": "ae59050d82... |
9f0dab03-07f4-4ee0-9ca1-cede21f72018 | AlexandreMercierAubin/MultiLayerSolver2024 | 2d/mex/mexBSplit.cpp | /*==========================================================
* mexBsplit.cpp
*
* inputs:
*
* Btransposed
* activeBrows
*
* outputs:
*
* ii1
* jj1
* C1
* ii2
* jj2
* C2
*
* To compile type: mex -R2018a mexBSplit.cpp
*============================================... | ALGO | 0.997898 | 4.854587 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-08-14T02:47:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a572a7deb66... |
c489bc6f-311e-4dc4-ba3d-72ae4bd5d942 | sazzadhossainapple/problem-solve | Marge Sort.cpp |
#include<iostream>
using namespace std;
void input(int n,int a[])
{
int i;
for(i=0; i<n; i++)
{
cin>>a[i];
}
}
void merge(int a[], int p, int q, int r)
{
int i, j, k;
int n1 = q - p + 1;
int n2 = r - q;
int L[n1], R[n2];
for (i = 0; i < n1; i++)
{
L[i] = a[p + ... | ALGO | 0.99998 | 3.620648 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2019-11-20T15:51:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4928db588... |
0e7498fd-998f-4ffe-a147-23175a87f5bd | anqixu/ftag2 | src/ftag2_tracker_nodelet.cpp | #include "detector/FTag2Detector.hpp"
#include "decoder/FTag2Decoder.hpp"
#include "common/Profiler.hpp"
#include "common/VectorAndCircularMath.hpp"
#include "tracker/FTag2Tracker.hpp"
#include <ros/ros.h>
#include <dynamic_reconfigure/server.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bri... | TOOL | 0.928429 | 5.115808 | {
"github_metadata": {
"branch": "master",
"commit_count": 176,
"repo_created_at": "2013-10-22T01:44:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c93cdbf... |
76210909-13a8-45d5-aa20-6d466d3eac78 | Zimse12345/Code | pyyz_Contest/20230612NOI模拟赛#15/blackbridge.cpp | // Author:Zimse Data:2023-06-
#include <bits/stdc++.h>
#define pc putchar
#define pb push_back
#define inv fpow
#define int long long
#define M ((L+R)/2)
#define Lid (id<<1)
#define Rid (Lid|1)
namespace OI{const int INF=2.01e18,Mod=998244353;int read(){int x=0
,y=1;char c=getchar();while(c<48||57<c){if(c==45)y=-1;c=g... | ALGO | 0.999676 | 4.406034 | {
"github_metadata": {
"branch": "main",
"commit_count": 57,
"repo_created_at": "2022-10-08T03:09:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6243a04667e... |
e1807d13-210d-43e8-8dd1-bf985269384f | rika/TCC11 | bg/bgpets.cpp | //============================================================================
// Name : background.cpp
// Author : Hitoshi
// Version :
// Copyright : <EMAIL>
// Description : Background subtraction in C++, Ansi-style
// using OpenCV 2.1
//
//=====================================================... | ALGO | 0.984617 | 4.723304 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2011-10-30T19:15: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": "33b0e1abb... |
586134e6-5c48-429f-b0e1-4bf43a812f57 | Beto-VG/Ventura_Roberto_CSC5_Winter2019 | Homework/Assignment_5/MinMax/main.cpp | /*
* Author: <NAME>
* Created on January 23, 2019
* Purpose: Write a function that sets min and max
*/
//System Libraries
#include <iostream>
using namespace std;
//User Libraries
//Global Constants - Math/Physics Constants, Conversions,
// 2-D Array Dimensions
//Function Prototypes
void minm... | ALGO | 0.999215 | 4.300547 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2019-01-09T06:52: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": "5eea97e4f... |
03da1897-5543-4438-b8f9-ab61d6f54542 | necreativny/lists_lab | lab4_3.cpp | using namespace std;
struct stack_el {
int value;
stack_el* next;
};
struct int_list {
stack_el* top = nullptr;
void add_el(int el_val) {
stack_el* el = new stack_el{ el_val, top };
this->top = el;
}
void insert(int el_val, int index) {
stack_el* view_ptr = this->top;
for (int i = 0; i < ind... | ALGO | 0.997103 | 4.780485 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-03-19T10:31: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": "a4c3e6d72dd7... |
d0b3c0a1-49ba-41ef-96fb-e0d4a470e272 | icizay/cp | dump/cses/Flight_Routes.cpp | #include <bits/stdc++.h>
using namespace std;
// no negative weight
// adj[u, v, w]
int n, m, k;
const int64_t INF = 1e18;
vector<vector<array<int64_t, 2>>> adj;
vector<int64_t> cnt;
void solve(){
cin >> n >> m >> k;
adj.resize(n);
cnt.resize(n, 0);
for(int i = 0; i < m; ++i){
int64_t u, v, w; cin >... | ALGO | 0.999961 | 4.325812 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2021-02-01T10:35:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f756c6663ea... |
d9aee0c4-25ee-4f19-874e-d4230ea87636 | wycgatech/ReinforcementLearning | AI_Final/RLearning.cpp | //
// RLearning.cpp
// AI_GridWorld
//
// Created by cpsfaculty on 11/23/14.
// Copyright (c) 2014 ___<NAME>___. All rights reserved.
//
#include <stdio.h>
#include "RLearning.h"
/****************************************************** You need to implement the two functions below **************************... | ALGO | 0.995528 | 3.737945 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-03-18T03:16: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": "303d63f906... |
c1dc0bfb-b04a-4894-b138-cf0a4927abf3 | openxrlab/xrslam | xrslam/src/xrslam/estimation/ceres/preintegration_factor.h | #ifndef XRSLAM_CERES_PREINTEGRATION_FACTOR_H
#define XRSLAM_CERES_PREINTEGRATION_FACTOR_H
#include <ceres/ceres.h>
#include <xrslam/common.h>
#include <xrslam/estimation/preintegration_factor.h>
#include <xrslam/geometry/lie_algebra.h>
#include <xrslam/map/frame.h>
namespace xrslam {
class CeresPreIntegrationErrorFa... | ALGO | 0.996915 | 7.416426 | {
"github_metadata": {
"branch": "main",
"commit_count": 56,
"repo_created_at": "2022-09-01T07:57:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 522,
"forks": 59,
"issues": 11,
"pull_requests": 0
},
"file_meta": {
"content_id": "e51de0d6... |
d8cbf4da-bbae-4377-8817-1a2e59f4bd52 | ViennaRNA/ViennaRNA | src/RNAlocmin/treeplot.cpp | /* Last changed Time-stamp: <2002-12-18 17:49:12 xtof> */
/* treeplot.c */
/* modified version from ViennaRNA-package */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
extern "C" {
#include "utils.h"
}
#include "treeplot.h"
//static char UNUSED rcsid[]= "$Id: treeplot.c,v 1.9 2003/09/... | ALGO | 0.995482 | 3.646498 | {
"github_metadata": {
"branch": "master",
"commit_count": 5383,
"repo_created_at": "2016-10-12T14:33:52.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 357,
"forks": 87,
"issues": 40,
"pull_requests": 4
},
"file_meta": {
"content_id": "e236... |
47827c90-0753-44f4-afcf-80d506076ff6 | vicmana/hello-word | chicha01.cpp | // UNIVERSIDAD POLITÉCNICA DE TULANCINGO
// INGENIERIA EN ELECTRÓNICA Y TELECOMUNICACIONES
// LÓGICA DE PROGRAMACIÓN
// <NAME>
// <NAME>.
#include "pch.h"
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
int main()
{
float a, b, c;
float x1, x2;
printf("Captura a: ");
scanf_s("%f", &a);
printf("Captura ... | ALGO | 0.997485 | 3.874604 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2019-10-29T17:02:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec987e3ff... |
1274af69-647b-4d24-aa61-6ce84ed924bf | fer1155/Proyecto-Final-1 | PlanificacionCPU.h | #ifndef PLANIFICACIONCPU_H
#define PLANIFICACIONCPU_H
#include <string>
#include "Proceso.h"
#include "ProcesosGuardados.h"
#include "CicloBasico.h"
using namespace std;
class PlanificacionCPU{
private:
ProcesosGuardados listaProcesos;
vector<int> burstTimeGeneral;
vector<int> arrivalTimeFIFO;
... | ALGO | 0.996636 | 3.529178 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-12-14T04:50: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": "3c4f9daa6497... |
342e9b9c-f9f1-45a7-b3f9-e26fbc896c03 | KIMBIBLE/algorithm_solving | codeplus/10872.cpp | /*
* # 10872 : 팩토리얼
* - 문제
* 0보다 크거나 같은 정수 N이 주어진다. 이 때, N!을 출력하는 프로그램을 작성하시오.
*
* - 입력
* 첫째 줄에 정수 N(0 ≤ N ≤ 12)가 주어진다.
*
* - 출력
* 첫째 줄에 N!을 출력한다.
*
* *********************************************************************************
*
* # writeup
* - 분석
*
*
* - 생각
*
*
* SOLVE 1>
*
*
*... | ALGO | 0.999972 | 5.595383 | {
"github_metadata": {
"branch": "master",
"commit_count": 536,
"repo_created_at": "2017-11-10T02:25:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 1,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "d68fe178... |
a9017f78-54af-472b-aa9a-838ffc5d15aa | ryceballos/VSC-C11 | Labs/xcstringwork.cpp | /**
CS-11 Lab 3a Extra Credit, xcstringwork.cpp
Purpose: The extra credit portion is to give the ASCII value of the
first character of each word
@author <NAME>
@version 1.0 02/11/2022
*/
#include <iostream>
using namespace std;
int main() {
// Do NOT change the next few lines
// Read wor... | ALGO | 0.996493 | 3.499255 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-08-31T21:50: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": "75d9e5a362... |
2fa23297-7cdc-4274-9b52-508021aa3b2c | b-inary/bgl | include/bgl/data_structure/hyperloglog_array.hpp | #pragma once
#include "aligned_array.hpp"
#include "bgl/util/all.hpp"
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <vector>
#ifdef __AVX2__
# include <immintrin.h>
#endif
namespace bgl {
/// precomputes and stores the parameters of HyperLogLog
class hyperloglog_params {
public... | ALGO | 0.976561 | 6.728799 | {
"github_metadata": {
"branch": "master",
"commit_count": 100,
"repo_created_at": "2018-10-05T01:22: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": "84ffdcd3... |
3fb1d297-597d-4337-bef7-68a9eda95f98 | biswadeep-bhowal/CODEX-CPP | DATA STRUCTURES/TREES/HEAPSORT.CPP | // PROGRAM TO ILLUSTRATE HEAP SORT ON A MAX HEAP
#include<iostream>
using namespace std;
class maxHeap
{
public :
int* heapArray;
int heapSize;
int heapCapacity;
maxHeap( int capacity )
{
heapCapacity = capacity;
heapArray = new int[ heapCapacity ]... | ALGO | 0.999958 | 4.541034 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-04-25T07:57: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": "216143468d... |
10d3b6d7-6ca2-46d9-8494-782539616b2b | makio93/competitive-atcoder | abc236/abc236_e/1/main0.cpp | // 復習1,自力AC
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
#define rep(i, n) for (int i=0; i<(int)(n); ++(i))
#define rep3(i, m, n) for (int i=(m); (i)<(int)(n); ++(i))
#define repr(i, n) for (int i=(int)(n)-1; (i)>=0; --(i))
#define rep3r(i, m, n)... | ALGO | 0.999998 | 4.61439 | {
"github_metadata": {
"branch": "main",
"commit_count": 925,
"repo_created_at": "2021-04-23T16:25: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": "24f4f9faa3... |
b7883771-d5d4-4bad-a6a9-0dacb987f331 | chantimhow/Algorithm | LAB_3_extra/part_2.cpp | #include <iostream>
void DecBubbleSort(int *arrInt[]);
void AccBubbleSort(int *arrInt[]);
void read10Intergers(int arrInt[]);
int main(){
int arr[10];
int *AccPtrArr[10];
int *DecPtrArr[10];
for (int i = 0;i<10;i++){
AccPtrArr[i] = &arr[i];
DecPtrArr[i] = &arr[i];
}
read10Interge... | ALGO | 0.996398 | 4.58407 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2025-07-07T08:32: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": "d1ce34c3dbb... |
08626ccf-ee3f-4186-9377-0651567c2701 | Hee-Jae/Algorithm | boj/5430.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#define pb push_back
#define mp make_pair
#define st first
#define nd second
#define lli long long int
using namespace std;
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
char p[100002]={}, nums[500000]={};
int arr[100002]={};
int T,n,tmp=0, idx=0,... | ALGO | 0.998949 | 3.873992 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2021-08-29T16:13: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": "77da422f6... |
1c6c9af0-e62f-4817-b33a-8cf8846d9608 | MrBigDog/MyProject | src/usUtil/us_tcb_spline3.cpp | ///////////////////////////////////////////////////////////////////////////
//
// This source file is part of Uniscope Virtual Globe
// Copyright (c) 2008-2009 by The Uniscope Team . All Rights Reserved
//
///////////////////////////////////////////////////////////////////////////
//
// Filename: us_tcb_spline3.cpp
... | ALGO | 0.995412 | 4.955169 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2017-12-10T03:27:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "12800ffa6... |
75f320a0-bad7-497f-880b-8fdb0577793c | vector94/Competitive-programming-library | Dynamic Programming/UVA DP/11008 - Antimatter Ray Clearcutting.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define fi first
#define se second
#define pb push_back
#define pbb pop_back
#define mp make_pair
#define pii ... | ALGO | 0.999985 | 4.180587 | {
"github_metadata": {
"branch": "master",
"commit_count": 367,
"repo_created_at": "2021-09-30T14:41:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e99c238f... |
fbd07ff1-a1ba-412e-a404-93e53466da6c | Timothy023/ACM-Training | CF-edu-114/c.cpp | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int n, m;
long long a[N];
long long x, y, sum;
int find(long long x) {
int l = 1, r = n, ans = n + 1;
while (l <= r) {
int mid = (l + r) >> 1;
if (a[mid] < x) l = mid + 1;
else {
ans = mid;
r =... | ALGO | 0.999994 | 4.38517 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2020-02-13T09:23: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": "0d52790c5... |
2f9a66a0-02a8-486b-a4ca-6819f44d8bb3 | indjev99/Competitive-Programming-Problems | subway/author/solution_rado_m_n_d.cpp | #include <bits/stdc++.h>
#include <vector>
#include "subway.h"
// #include "grader.cpp"
// #include <coding_library/graph/hopcroft_karp.hpp>
// #include <coding_library/graph/bipartite_matching.hpp>
using namespace std;
template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& x) {
... | ALGO | 0.999927 | 4.272553 | {
"github_metadata": {
"branch": "master",
"commit_count": 175,
"repo_created_at": "2019-02-16T22:21:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "05dbb9df... |
7833fd1d-6ef3-419b-993b-37294db44c50 | Raviteja582/DSA | _imp_/strivers/BinarySearch/AggresiveCows.cpp | #include<bits/stdc++.h>
#include <vector>
using namespace std;
#define debarr(a, n) cout << #a << " : "; for (int i = 0; i < n; i++) cerr << a[i] << " ";cerr << endl;
#define debmat(mat, row, col) cout << #mat << " :\n"; for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) cerr << mat[i][j] << " "; cerr << e... | ALGO | 0.999996 | 4.311094 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2023-01-30T16:39:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5de269c74... |
0416d994-4c78-4ff3-a94c-720aa49139f6 | BurningFalls/algorithm-study | Baekjoon_Study (2021)/06월/(06.04) Silver 5~1/(09519) 졸려 [FAILED].cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define FASTIO cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define ROF(i,a,b) for(int i=(a);i>=(b);i--)
#define pii pair<int, int>
char arr[1011];
char tmp[1011];
char ch[1011];
int main() ... | ALGO | 0.999997 | 3.382792 | {
"github_metadata": {
"branch": "main",
"commit_count": 3832,
"repo_created_at": "2020-08-04T06:46:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "61b2f6edb... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.