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 |
|---|---|---|---|---|---|---|---|
4d39fa6c-42bc-46a2-a185-f1e588a6e52d | zjkmxy/algo-problems | 平成27年/BZOJ4066-KDTree的维护.cpp | /**************************************************************
Problem: 4066
User: zjkmxy
Language: C++
Result: Accepted
Time:32172 ms
Memory:10188 kb
****************************************************************/
/*
KD-Tree模板题
插入的时候,当成每次换维度比较的替罪羊,额外维护子树覆盖矩形区域。(然而不能段改)
删除的时候,先用mn和mx找在被删除结点比... | ALGO | 0.999329 | 4.225819 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-10-16T07:33: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": "092996900f... |
2358ca38-f242-4124-9845-dcd138392f11 | MLman/MMGLM_HTCONDOR | lib/c++/src/mmglm_spd_old.h | #include <iostream>
#include <armadillo>
using namespace arma;
using namespace std;
#include "spd_funcs.h"
/*
* Explicit allocation need here.
* X is centered.
*/
void mmglm_spd_perm(mat& ErrMx, const mat& X, const cube& Y, const imat & idx_dti, unsigned ithvox){
unsigned int ndata = X.n_cols;
unsigned int ... | ALGO | 0.999608 | 5.003026 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2016-11-30T22:43:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6641f66bd... |
6edbe7bc-1130-47bb-a556-0665a087f862 | hartkode/advent-of-code | 2015/src/day23.cpp | #include <fstream>
#include <iostream>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
enum Instruction {
Half_A,
Half_B,
Triple_A,
Triple_B,
Inc_A,
Inc_B,
Jmp,
Jmp_Even_A,
Jmp_Even_B,
Jmp_One_A,
Jmp_One_B
};
vector<tuple<Instruction, int>>
read_file(string_view filename)
{
fstre... | ALGO | 0.999424 | 5.387735 | {
"github_metadata": {
"branch": "master",
"commit_count": 162,
"repo_created_at": "2023-12-04T19:25:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "38ceb406... |
bd02edce-9fe4-4ddd-8a64-0f5373fc5a28 | NVIDIA/AMGX | include/solvers/block_jacobi_solver.h | // SPDX-FileCopyrightText: 2011 - 2024 NVIDIA CORPORATION. All Rights Reserved.
//
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <solvers/solver.h>
#include <amgx_types/util.h>
namespace amgx
{
namespace block_jacobi_solver
{
template <class T_Config> class BlockJacobiSolver;
template<class T_Conf... | ALGO | 0.999296 | 6.859869 | {
"github_metadata": {
"branch": "main",
"commit_count": 265,
"repo_created_at": "2017-10-04T16:12:16.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 578,
"forks": 157,
"issues": 102,
"pull_requests": 6
},
"file_meta": {
"content_id": "a9bbc... |
63a40d3d-0eb1-418f-b8b2-01d2ce2d60d1 | mvukov/optimus | optimus/mhe/mhe_qp_solver.h | // Copyright 2021 <NAME>. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law... | ALGO | 0.999593 | 7.282045 | {
"github_metadata": {
"branch": "main",
"commit_count": 311,
"repo_created_at": "2021-08-15T05:43:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 1,
"pull_requests": 3
},
"file_meta": {
"content_id": "b1c371997a... |
c7b3e530-630b-4a02-bea3-143e55124770 | floriskruisselbrink/adventofcode2022 | adventofcode2022/day08.cpp | #include "aoc.h"
class Grid
{
private:
std::vector<std::string> grid;
std::size_t grid_size;
public:
Grid(const std::vector<std::string> &input) : grid{input}, grid_size{input[0].size()} {}
std::size_t size() const { return grid_size; }
bool is_visible(int x, int y) const;
int scenic_score(int... | ALGO | 0.999728 | 6.29673 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2022-12-01T12:29:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ec162600f59... |
e57d72a0-be88-425f-80fc-3ae1540d3d36 | crash5band/MikuMikuWorld | Depends/DirectXMath-master/Inc/DirectXMathMatrix.inl | //-------------------------------------------------------------------------------------
// DirectXMathMatrix.inl -- SIMD C++ Math library
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
//
// http://go.microsoft.com/fwlink/?LinkID=615560
//-----------------------------... | ALGO | 0.968957 | 6.45928 | {
"github_metadata": {
"branch": "master",
"commit_count": 753,
"repo_created_at": "2022-04-13T10:51:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 118,
"forks": 83,
"issues": 17,
"pull_requests": 0
},
"file_meta": {
"content_id": "b012... |
4c6b36f9-67a5-4c6b-9712-793c9ee07791 | bony2023/Competitive-Programming | Flow Problems/POTHOLE.cpp | // Author : <NAME>
//
// INCLUDES
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace s... | ALGO | 0.999724 | 3.835619 | {
"github_metadata": {
"branch": "master",
"commit_count": 88,
"repo_created_at": "2014-08-06T08:27:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ae7dd2120... |
78c80bd3-fcc3-437c-85c6-b7ac4074eda9 | Dor-sketch/leetcode-solutions | Problems/Design_Graph_With_Shortest_Path_Calculator.cpp |
struct GraphNode {
std::vector<std::pair<int, int>> neighbors; // Pair of neighbor ID and cost
};
class Graph {
public:
Graph(int n, vector<vector<int>>& edges) {
// Initialize all nodes
for (int i = 0; i < n; ++i) {
nodes_[i] = GraphNode();
}
// Add edges
... | ALGO | 0.999909 | 6.18284 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2023-11-04T10:34:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "85ce734f4b1... |
672e2719-978d-47e9-9665-f17f1a845041 | WAduck/cutekibry-s-documents | C++/Online Judges/USACO Section 3.4 B - Electric Fence/fence9.cpp | /*
ID: <NAME>
LANG: C++
TASK: fence9
*/
#include <cstdio>
#include <cmath>
#include <algorithm>
#define DEBUG 0
#define $ if(DEBUG)
using namespace std;
const double EPS=1e-8;
struct Function{
double k, b;
Function(){}
Function (double x, double y){ k=x; y=b; }
Function (double x1, double y1, double x2,... | ALGO | 0.99977 | 3.816848 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2018-11-05T11:42: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": "f73a1fab3... |
75dbc58f-0e90-4bbf-8caa-bc3c018fd039 | koosaga/olympiad | ICPC/NEERC/neerc09_c.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long lint;
const int MAXM = 1005;
using pi = pair<int, int>;
#define sz(v) int((v).size())
int n, a[MAXM];
int query(int x, int y, int z){
printf("%d %d %d\n", x, y, z);
fflush(stdout);
int v; cin >> v; return v;
}
int main(){
cin >> n;
if(n == 3){
pu... | ALGO | 0.999915 | 3.468897 | {
"github_metadata": {
"branch": "master",
"commit_count": 361,
"repo_created_at": "2015-11-06T16:01:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 285,
"forks": 31,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c8024... |
2ec401ad-5bfa-4dd5-bcdc-a6aef2b6f221 | Snehalatha-Chevula/Leetcode-DSA | 1093-recover-a-tree-from-preorder-traversal/recover-a-tree-from-preorder-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.999555 | 4.761743 | {
"github_metadata": {
"branch": "main",
"commit_count": 193,
"repo_created_at": "2025-02-15T08:02: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": "7c051fda98... |
a01cc5f9-4b15-49e7-8bd5-d740e7e5b708 | Gatesvert81/learning-c-- | Data Structures/Queue.cpp | #include <iostream>
using namespace std;
struct Node
{
int data;
struct Node *next;
};
struct Node *head = NULL;
struct Node *tail = NULL;
void Enqueue(int x)
{
Node *temp = new Node;
temp->data = x;
temp->next = NULL;
if (tail != NULL)
{
tail->next = temp;
tail = temp;
... | ALGO | 0.999693 | 4.103566 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-09-17T06:42: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": "dc958b2d9b... |
41f58312-bd62-4855-b553-e3878d7cf90e | ngoxuanhuy/Programming-problems | uva11352.cpp | // pre-calculate every trap positions first
#include <stdio.h>
int T, M, N;
int forest[110][110];
int trap[110][110];
int visited[110][110];
int first, last;
int result;
int knight_dx[] = {-1, -2, -2, -1, 1, 2, 2, 1};
int knight_dy[] = {-2, -1, 1, 2, 2, 1, -1, -2};
int king_dx[] = {-1, -1, -1, 0, 1, 1, 1, 0};
int king_... | ALGO | 0.99982 | 3.561796 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2016-12-03T03:36: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": "ddb279477... |
9af7cfea-a799-4f70-afbe-9ba160a2380d | amir-raoofy/xeon_phi | tools/ver3/main.cpp | #include <iostream>
#include <iomanip>
#include <omp.h>
#include "potential.hpp"
// Calculate the gravitational potential associated with a mass distribution
// using the superposition of the potentials of point masses.
// The mass distribution is a finite collection of point masses located at
// the points x_1, ..... | ALGO | 0.998221 | 4.916817 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2016-06-27T13:57:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8d287f13c9... |
1f990496-c7e0-4c6b-8d4b-7513bc69d761 | uta8a/jikka-example | atcoder/abc206/b/converted.v5.1.0.0-Linux.cpp | // This C++ code is transpiled using Jikka transpiler v5.1.0.0 https://github.com/kmyk/Jikka
// The original Python code:
// # https://atcoder.jp/contests/abc206/tasks/abc206_b
//
// from typing import *
//
// def solve(n: int) -> int:
// c = 0
// ans = 0
// flag = True
// ... | ALGO | 0.999663 | 5.088405 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2021-08-05T03:28:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "05f1c6587d9... |
439f9087-bf85-4cf1-97a5-0bdc17958210 | kihx/rasterizer | coold/Render/CoolD_Transform.cpp | #include "CoolD_Transform.h"
#include "..\Data\CoolD_Inlines.h"
#include "..\Math\CoolD_Matrix33.h"
#include "..\Data\CoolD_Defines.h"
#include "..\Data\CoolD_Struct.h"
namespace CoolD
{
//perspective -> viewport
Matrix44 TransformHelper::CreateViewport(Dint left, Dint bottom, Dint width, Dint height)
{
Matrix44 ... | ALGO | 0.982873 | 4.829961 | {
"github_metadata": {
"branch": "master",
"commit_count": 225,
"repo_created_at": "2014-03-06T00:56:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "74dead2c... |
edf8c217-dba8-4426-a5e5-f369c138fdb8 | katuse777/C-exercises | Working with strings/remove_double_letters/remove_double_letters.cpp | /*Write a function removeDoubledLetters(str) that returns a new string in
which any duplicated characters in str have been replaced by a single copy
*/
#include <iostream>
#include <string>
//FUNCTION PROTOTYPES
std::string remove_double_letters(std::string & str);
std::string user_string;
//MAIN FUNCTION
int ... | ALGO | 0.983141 | 5.228454 | {
"github_metadata": {
"branch": "main",
"commit_count": 139,
"repo_created_at": "2022-07-08T14:41:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f6c15731f4... |
50a2e46c-d3ce-40f3-8106-93f593695f47 | musafir-V/programming | CSES/IntroProblems/palin.cpp | #include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
using namespace std;
using ll = long long;
using vll = vector<ll>;
using pll = pair<ll, ll>;
using ld = long double;
const ll mod = (ll)1e9 + 7;
const ll mx... | ALGO | 0.999994 | 3.467687 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-12-23T17:37: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": "6eccf80a1f... |
d6340a8d-a5e8-4a2b-ace8-2b27a33fcb13 | MiguelAngelCalveraUnizar/Mini-SLAM_student | Modules/Tracking/Tracking.h | /**
* This file is part of Mini-SLAM
*
* Copyright (C) 2021 <NAME> and <NAME>, University of Zaragoza.
*
* Mini-SLAM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation, either version 3 of the License, or
* (at your... | ALGO | 0.983559 | 6.470693 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2023-03-23T11:33:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f9a509d3bf... |
d3b9a781-cdc0-4158-9d14-11cb685d32d0 | JieGroup/offlineChange | src/min_wgss.cpp | #include <Rcpp.h>
using namespace Rcpp;
// This is a simple example of exporting a C++ function to R. You can
// source this function into an R session using the Rcpp::sourceCpp
// function (or via the Source button on the editor toolbar). Learn
// more about Rcpp at:
//
// http://www.rcpp.org/
// http://adv-r.had... | ALGO | 0.99872 | 6.756776 | {
"github_metadata": {
"branch": "master",
"commit_count": 42,
"repo_created_at": "2019-05-03T21:36:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2a2b9dc34... |
e88779d9-5fce-481d-ac25-d1e4e56593c9 | HFproject/Multiples_Freqs | gnuradio_v1/gr_fxpt_nco.h | /* -*- c++ -*- */
/*
* Copyright 2002,2004 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 o... | ALGO | 0.924967 | 6.812601 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2022-03-21T18:23:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a8af9bc97b08... |
3470b2fa-103c-4e6e-bc5f-809ebeb683f3 | tege3000/hackerrank-algorithmic-challenges | practise/Algorithms/Sorting/Correct/bigSorting.cpp | #include <bits/stdc++.h>
using namespace std;
// Complete the bigSorting function below.
bool comp(string l, string r) {
if(l.size() == r.size()) {
return l < r;
}
else {
return l.size() < r.size();
}
}
vector<string> bigSorting(vector<string> unsorted) {
sort(unsorted.begin(), un... | ALGO | 0.999912 | 5.405393 | {
"github_metadata": {
"branch": "master",
"commit_count": 353,
"repo_created_at": "2020-06-28T13:47:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6ae9cb06... |
b2c508c0-71e4-4f2d-8800-8268c2d6d1bf | EACcodes/TigerCI | tiger_ci/erkale/density_fitting.cpp | /*
* This source code is part of
*
* E R K A L E
* -
* DFT from Hel
*
* Written by <NAME>, 2010-2011
* Copyright (c) 2010-2011, <NAME>
*
* This program is free software; you can redistribute it and/or
* modify it under ... | ALGO | 0.999389 | 5.586853 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-05-27T16:13:14.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "98e49c90177... |
325d44e9-2322-4515-a20e-0d4ef522def2 | Superbestron/CP-Journey | CP4/MoreAdvanced/MoreAdvancedDPTechniques/CountingPathsDAG/pachinkoprobability.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> ii;
int n, m, k, gate, x, y;
vector<vector<int>> AL;
vector<bool> dest, in_deg;
ii memo[1000];
ii dp(int u) {
if (AL[u].empty()) {
return {dest[u], !dest[u]};
}
ii &ans = memo[u];
if (ans.first != -1) return ans;
an... | ALGO | 0.999952 | 3.843264 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2022-10-28T13:51:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3ef0a011951... |
f7ee65cf-a9b1-4f02-92b5-6f64a2c7f4fc | blegal/EN325-Advanced-digital-design-old | 1_SYSTEMC/Part3_Solution_1/src/modules/DCT2d/DCT2d.cpp | /*
* Adder.h
* SystemC_SimpleAdder
*
* Created by <NAME> on 07/05/07.
* Copyright 2007 __MyCompanyName__. All rights reserved.
*
*/
#include "DCT2d.h"
#define PI 3.14159265
void doFFT(int* data){
double DCT_tmp;
double temp[64];
for(int u=0;u<8;u++){
for(int v=0;v<8;v++){
DCT_tmp = 0;
double ... | ALGO | 0.975195 | 3.946743 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2017-10-20T13:44:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1a293d82e... |
ad039f3b-5a02-4045-8cfa-6df9ced43836 | josh1248/cp-training | codeforces/2025_04/Neowise Labs Contest 1/B.cpp | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<long long> vll;
typedef vector<vector<int>> vvi;
typedef pair<int, int> pi;
typedef long long ll;
#define sz(x) ((int)size(x))
#define all(x) begin(x), end(x)
#define rep(i, a, b) for (int i = a; i < (b); i++)
// Credit: https://code... | ALGO | 0.999988 | 4.157391 | {
"github_metadata": {
"branch": "main",
"commit_count": 99,
"repo_created_at": "2024-12-09T07:52: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": "14f89edb784... |
4c5bd06a-28e3-4c68-92b9-57cca1cf124c | odanado/Procon | AOJ/Volume11/AOJ1174.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
typedef pair<int,int> P;
int dx[] = {0,0,1,-1};
int dy[] = {1,-1,0,0};
int h,w,c;
int tile[10][10];
int cnt_tile() {
bool visit[10][10] = {};
int t = tile[0][0];
int ret = 1;
queue<P> que;
que.push(P(0,0));
... | ALGO | 0.999946 | 4.055776 | {
"github_metadata": {
"branch": "master",
"commit_count": 140,
"repo_created_at": "2015-12-22T07:10: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": "c9a20b39... |
81628119-1af0-4da8-91ef-5f3351530387 | MBDS/multibody-state-estimation | libmbse/include/mbse/constraints/ConstraintRelativePosition.h | /*+-------------------------------------------------------------------------+
| Multi Body State Estimation (mbse) C++ library |
| |
| Copyright (C) 2014-2024 University of Almeria |
| Copy... | TOOL | 0.962579 | 7.422325 | {
"github_metadata": {
"branch": "master",
"commit_count": 244,
"repo_created_at": "2014-05-04T20:57:48.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 46,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9ca3658... |
2b5ca874-c291-49a6-8ea6-bd7cc9ae7043 | Magicdalonglong/algorithms | baidu_oa_calendar/baidu_oa_calendar/main.cpp | #include <iostream>
#include <map>
#include <set>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
using namespace std;
class ConflictedTimeWindow {
public:
ConflictedTimeWindow(const string& start_date, const string& end_date, const set<int>& conflicted_event_ids) : start_date_(start_d... | ALGO | 0.999074 | 5.243007 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-03-30T02:48: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": "1a62e43d82... |
8b353af9-89f0-468f-abab-987a306aaad4 | nhannguyen95/algorithms | practices/interview-bit/stacks-and-queues/largest-rectangle-in-histogram.cpp | // O(3N) in space
// O(2N) in time
int Solution::largestRectangleArea(vector<int> &A) {
int n = (int) A.size();
if (n == 0) return 0;
deque<int> d;
d.push_back(-1);
vector<int> l(n), r(n);
for(int i = 0; i < n; i++) {
while(d.size() > 1 && A[d.back()] >= A[i]) {
r[d.back()] ... | ALGO | 0.999309 | 6.506115 | {
"github_metadata": {
"branch": "master",
"commit_count": 946,
"repo_created_at": "2017-11-01T06:25:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ccea1506... |
471131ac-282e-4961-ba62-4321c08a5f67 | pippijn/misc | games/scramble.cc | #include <algorithm>
#include <cassert>
#include <cstring>
#include <fstream>
#include <iostream>
#include <string>
#include <unordered_set>
#include <vector>
struct char_multiset
{
unsigned char chars[256];
char_multiset (char const *it, char const *et)
: chars { }
{
assert (it != et);
while (it !=... | ALGO | 0.998028 | 4.441125 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2013-06-27T07:36: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": "72dc187a9... |
1a0cb481-844a-4dad-bb7a-1ca73b099fde | TasiChicken/LeetCode | cpps/1000/500/90/483.cpp | #include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
class Solution {
public:
string smallestGoodBase(string n) {
ull num = stoull(n);
for(int i = log2(num + 1); i >= 2; i--){
ull k = pow(num, 1.0 / (i - 1));
while(true){
ull sum = 1... | ALGO | 0.999784 | 4.162475 | {
"github_metadata": {
"branch": "main",
"commit_count": 265,
"repo_created_at": "2023-08-02T15:42:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2d86ed34c3... |
661ec5fc-fa70-421b-b266-7c0a57b28952 | deep-in-apeirophobia/CompetetiveProgramingCodes | Bubble Cup X - Finals/G2.cpp | #include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <set>
#include <map>
#include <math.h>
#define mp make_pair
#define F first
#define S second
#define pb pus... | ALGO | 0.999885 | 3.653154 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-12-17T13:48:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2cea1710c3... |
afc1d1e4-867c-421b-9d5b-eb8fff6805c0 | AnuragJain23/other-problems | queueusingll.cpp | #include<bits/stdc++.h>
using namespace std;
struct Node
{
int data;
struct Node *next;
}*front = NULL,*rear = NULL;
void enqueue(int);
void dequeue();
void display();
int main()
{
int choice, value;
cout<<"press 1 for enqueue data"<<endl;
cout<<"press 2 for dequeue data"<<endl;
cout<<"press 3 for e... | ALGO | 0.995268 | 3.270015 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-07-17T04:57:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "09ffa2b455... |
c568bfc7-65dc-40b8-b126-7b35d9f0b8b4 | nomi2k4/Simple-Calculator-Program-Using-Functions | Simple Calculator Program Using Functions.cpp | #include<iostream>
using namespace std;
double sum(double n1, double n2);
double subtract(double n1, double n2);
double product(double n1, double n2);
double division(double n1, double n2);
int main()
{
double a, b,A;
int choice;
cout << "Enter first number: " << endl;
cin >> a;
cout << "Enter second number: " ... | TOOL | 0.982444 | 3.492315 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-01-13T13:33: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": "057a7a137adb... |
e7dcebd4-11cb-45f3-96c6-3b9555c939ef | BritoAlv/cs | competitive_programming/1037/G1SegTree.cpp | // You might break and that's okay.
// Tags:
#include <bits/stdc++.h>
#define fori(a, b) for (int i = a; i <= b; i++)
#define forj(a, b) for (int j = a; j <= b; j++)
#define wp " "
#define pb push_back
#define ull unsigned long long
#define pi pair<int, int>
#define ll long long
#define pl pair<ll, ll>
#define vi vect... | ALGO | 0.999887 | 5.088702 | {
"github_metadata": {
"branch": "main",
"commit_count": 202,
"repo_created_at": "2022-06-16T15:43:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c9b0510683... |
b71315d0-9a4e-4fd2-972f-c357264d101a | MultiDCP/BOJPractice | c++/1157.cpp | #include <string>
#include <vector>
#include <iostream>
using namespace std;
int main(void){
string str;
getline(cin, str);
for(int i=0; i<str.length(); i++){
if(str[i] >= 97 || str[i] <= 122){
str[i] = toupper(str[i]);
}
}
string word;
vector<int> count;
... | ALGO | 0.999986 | 3.595897 | {
"github_metadata": {
"branch": "main",
"commit_count": 209,
"repo_created_at": "2022-02-17T03:13: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": "5c27418acc... |
1dfec10d-593d-4df8-98ae-31e20a428640 | zhweiwei/blog | 剑指offer/最小的K个数.cpp | #include <vector>
#include <iostream>
using namespace std;
class Solution {
public:
vector<int> GetLeastNumbers_Solution(vector<int> input, int k) {
vector<int> reval;
if(k <= 0 || input.size()< k)
return reval;
for(int i = 0;i < k;i++){
reval.push_back(input[i]);... | ALGO | 0.999912 | 4.897878 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2018-11-04T05:39:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f78224da8... |
8a286559-f58f-42a4-b551-6ca423acb87f | mosest/13th-PF1 | 4 - Plane Tickets + Road Trip/010630228.hw4a.cpp | //---------------------------------------------------------------------------
// Program: hw4a.cpp
// Purpose: This program simulates purchasing Airline seats
//---------------------------------------------------------------------------
#include <iostream>
#include <iomanip>
using namespace std;
const float CARGO_PR... | ALGO | 0.960553 | 4.815566 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2015-09-14T19:25:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "86a5ac78c1... |
dd7f59b7-a51e-403c-9ec6-197c64964ea4 | JohnToro-CZAF/CP | CodeForce/Problems/Tags/Bitmask/PowerOfTwo.cpp | #include<bits/stdc++.h>
#include<limits.h>
#define f first
#define s second
using namespace std;
using ll = long long;
struct tuple {ll x; ll y; ll z;};
ll inf = LONG_MAX;
ll cei(ll x, ll y){
ll t = (x+y-1)/y;
return t;
}
ll power(ll base, ll powerRaised)
{
if (powerRaised != 0)
return (base*p... | ALGO | 0.999923 | 4.24828 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2022-03-25T06:49:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "14c6596d63a... |
68a9e8b9-1b9a-4ceb-9d42-02451e284385 | plerenius/lium | tema12/uppg1/src/Fractal.h | /**
* @file Fractal.h
* Header file for the class Fractal.cpp
* The class Fractal implements calculation on fractal based on complex number
* Fractal equation z=(!z)^4+c where !z is the complex conjugate.
*
* @author <NAME>
* @version 0.1
*
*/
#ifndef FRACTAL_H_
#define FRACTAL_H_
#include "ComplexZ.h"
#incl... | ALGO | 0.977276 | 4.958984 | {
"github_metadata": {
"branch": "master",
"commit_count": 52,
"repo_created_at": "2014-03-20T22:32:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "63f3c2b9c... |
833d9ae4-8a3b-4e4a-b6aa-110b0c0ee564 | Artoriaxx/Part-Of-Code | csu 1989 赶路的小x.cpp | #include<bits/stdc++.h>
#define ll long long
#define maxn 100050
#define pi pair<int, int>
using namespace std;
inline ll getnum() {
ll ans = 0; char c; ll flag = 1;
while (!isdigit(c = getchar()) && c != '-');
if (c == '-') flag = -1; else ans = c - '0';
while (isdigit(c = getchar())) ans = ans * 10 + c - '0';
re... | ALGO | 0.999973 | 3.894904 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-12-20T04:49:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7d134e9946... |
350e699b-bcb9-4ed9-a7ca-feee23432fee | Jasmine-log/jasmine_algorithm | cpp/hammingDistance.cpp | #include <iostream>
using namespace std;
class Solution
{
public:
int hammingDistance(int x, int y)
{
if (x == y)
return 0;
if (x < y)
{
int temp = 0;
temp = x;
x = y;
y = temp;
}
int cnt = 0;
while ... | ALGO | 0.999914 | 5.497986 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2024-05-26T11:40: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": "5f8591d6487... |
bbda54a3-d284-4e6b-a762-3b88e2421d74 | nazwaaiana/Billiard | main.cpp | #include <SFML/Graphics.hpp>
#include <iostream>
#include <vector>
#include <cmath>
#include "Ball.cpp"
#include "Stick.cpp"
#include "PoolTable.cpp"
#include "Player.cpp"
#include "Score.cpp"
#include "Alert.cpp"
#include "StartMenu.cpp"
bool isBallStopped(const sf::Vector2f& velocity) {
return std::abs(velocity.... | ALGO | 0.944106 | 5.411678 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2024-12-17T09:20: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": "2c1834fae96... |
e2d760cd-c6db-4313-be0d-745fe79174ec | akhaika6971/169930 | Operators.cpp | #include<iostream>
using namespace std;
int main ()
{
// Arithmetic operators
int num1=10, num2=30;
bool var1= true , var2=false;
//Arithmetic operarrtor '+'
cout<<"Sum of the two integers: "<< num1+num2 <<endl;
cout<<"Difference of the two integers: "<<num1-num2<<endl;
cout<<"Division of t... | TOOL | 0.933344 | 3.061097 | {
"github_metadata": {
"branch": "main",
"commit_count": 31,
"repo_created_at": "2023-09-20T14:10: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": "72fbb780a9b... |
e50d5297-0fc0-4af7-84f7-a2a7b273ca09 | bkunjesh/Competitive-Coding | competitive code/C_Good_Subarrays.cpp | //@ikung
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define fast ios_base::sync_with_stdio(0);cin.tie(0);
#define f(i,k) for(int i=0;i<k;i++)
#define F first
#define S second
#define endl "\n"
#define rep(i,n) for(int i=1;i<=n;i++)
#define rew(i,a,b) for(int i=a;i<=b;i++)
#define dbg(...) logger... | ALGO | 0.999938 | 4.233796 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2020-10-14T21:18: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": "86ab49525... |
b6deaea1-c1dd-4b28-b579-ac0b2f9599c2 | divyang9575/CP | implementation/C_Tea_Tasting.cpp | #include<bits/stdc++.h>
using namespace std;
#ifndef ONLINE_JUDGE
#define db(x) cerr << #x <<" "; _print(x); cerr << endl;
#else
#define db(x)
#endif
void _print(int t) {cerr << t;}
void _print(long long int t) {cerr << t;}
void _print(string t) {cerr << t;}
void _print(char t) {cerr << t;}
void _print(double t) {cer... | ALGO | 0.999879 | 3.169337 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2023-02-22T18:04: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": "3ea8f41b4ff... |
d915f7b8-2c2c-4419-b3ae-8272219154b9 | sum5819/itsa | 38.cpp | #include<iostream>
#include <iomanip>
using namespace std;
int main(){
int n;
float summer, non_summer;
cin >> n;
if(n <= 120){
summer = n * 2.1;
non_summer = n * 2.1;
}
else if(n <= 330){
summer = 120 * 2.1 + (n-120) * 3.02;
non_summer = 120 * 2.1 + (n-120) * 2... | ALGO | 0.999596 | 3.506237 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-06-22T04:49:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3a279bc208d3... |
33dcfe20-2c7a-4858-ab12-a12c91be4c48 | dvdg6566/CP-solutions | Dunjudge/DS/mutations.cpp | #include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef pair<ll,ll> pi;
typedef pair<ll,pi> pii;
typedef vector<pi> vpi;
typedef long double ld;
#define mp make_pair
#define pb push_back
#define f first
#define s second
#define MOD 1e9+7
ll INF = 1e15;
#define lb lower_bound
#d... | ALGO | 0.999868 | 4.088786 | {
"github_metadata": {
"branch": "master",
"commit_count": 212,
"repo_created_at": "2019-01-14T14:51: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": "05c4c6f3... |
5bd574a3-4f91-4c0b-873c-7de4354e6e8b | ravishka1999/RF_signal_generator | RF_signal_generator.ino |
#include <LiquidCrystal.h>
#include <si5351.h>
const long band80mstart = 3500000;
const long bald80mEnd = 3900000;
const long band40mstart = 7000000;
const long bald40mEnd = 7155000;
volatile long freq = 3700000;
volatile long radix = 1000;
volatile long oldfreq = 0;
volatile long old80mfreq = 3700000;
volatile long ... | TOOL | 0.990434 | 5.494097 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-05-05T17:22: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": "f752cb5b1d09... |
6516f16b-4688-4b17-a9b8-e7a113362674 | Spike782/HerbManagementSystem | HerbManagementSystem/herb_data_structure.h | #pragma once
#include<bits/stdc++.h>
#define MAXSIZE 10000
#define MAX_HISTORY 100
#define m 300
#define K 6
using namespace std;
struct Herb {
char name[100]; // 草药名
char sname[100]; // 英文名
char growth_habits[5000]; // 生长习性
char reproductive[5000]; // 繁殖方法
char field_management[5000]; // 田间管理
... | TOOL | 0.914503 | 3.991272 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2024-11-21T14:00:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7296c53578... |
91dcba85-fc5c-4eb9-8d29-c4f3b2ae2765 | tejeshvaish/CS253 | Assignment 3/coverage.cpp | #include <iostream>
int main()
{
int a = 0, b = 0;
std::cin >> a >> b;
auto sum = [](int a, int b) {
return a + b;
};
auto square = [](int a) {
return a * a;
};
auto cube = [](int a) {
return a * a * a;
};
if (a > b)
{
std::cout << "[mess... | ALGO | 0.997642 | 4.546678 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2021-02-07T00:56: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": "828faa4cb6a... |
c528d0e9-c701-47ab-87ac-49b464410f5a | marioyc/Online-Judge-Solutions | Live Archive/4601 - Euclid.cpp | #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
struct point{
double x,y;
point(){}
point(double _x, double _y){
x = _x; y = _y;
}
void read(){
cin>>x>>y;
}
bool isOrigin(){
return (x<1e-8 && y<1e-8);
}
point opera... | ALGO | 0.999738 | 3.895032 | {
"github_metadata": {
"branch": "master",
"commit_count": 364,
"repo_created_at": "2010-09-24T16:07:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 603,
"forks": 359,
"issues": 1,
"pull_requests": 9
},
"file_meta": {
"content_id": "231d... |
aafe9573-4f35-474e-812c-6cb6ea0100d7 | MRSTechnion/lattice-sampling-mp | Cpp/multirobot/base/ProblemDefinition.h | /*********************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2010, Rice University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions... | TOOL | 0.99244 | 5.090724 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2025-02-13T15:37:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f687f97c41e3... |
29cb53d5-114c-4033-9108-b48dc6e0c6ff | Es7evam/Problem-Solutions | UVa Online Judge/10341-2 - Solve It.cpp | #include <vector>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <map>
#include <sstream>
#include <queue>
#include <stack>
#include <bitset>
#include <cstring>
#include <math.h>
#include <cmath>
#include <iomanip>
using namespace std;
#define pb push_back
#define mk make_pair
#define fi first
#d... | ALGO | 0.999689 | 3.824866 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2017-09-28T15:38: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": "dc3888eb2... |
60853553-937e-4abb-8b17-e1d741cfee00 | jmainpri/libmove3d | graspPlanning/gp_geometry.cpp | /*
* Copyright (c) 2001-2014 LAAS/CNRS
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice and... | ALGO | 0.997663 | 4.224829 | {
"github_metadata": {
"branch": "master",
"commit_count": 3149,
"repo_created_at": "2014-05-27T22:17:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a888f08... |
bf587b1c-1b1a-4198-9eb9-933d29a87df4 | witek-formanski/WDP | src/cw1/zad3/parallelograms_intersection.cpp | #include <iostream>
#include "common_library.h"
/*
równoległobok:
podajemy trzy punkty: pierwszy punkt, dwa kolejne przeciwległe względem siebie
(czwarty punkt jest przeciwległy względem pierwzego)
(x1, y1, x2, y2, x3, y3) należy do Z^6
*/
struct parallelogram {
int x1;
int y1;
int x2;
int y2;
int... | ALGO | 0.991247 | 5.199829 | {
"github_metadata": {
"branch": "main",
"commit_count": 442,
"repo_created_at": "2023-10-02T19:56:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 2,
"issues": 7,
"pull_requests": 0
},
"file_meta": {
"content_id": "199ec4ab11... |
1310bf87-0e18-4eca-bc08-4844caeb7968 | machines-in-motion/reactive_planners | include/reactive_planners/stepper_head.hpp | /**
* @file
* @license BSD 3-clause
* @copyright Copyright (c) 2020, New York University and <NAME>
* Gesellschaft
*
* @brief Implements a class to coordinate the stepping for the dcm_vrp_planner.
*/
#pragma once
#include "Eigen/Eigen"
namespace reactive_planners
{
/**
* @brief Main entity controlling the st... | TOOL | 0.932576 | 7.05897 | {
"github_metadata": {
"branch": "master",
"commit_count": 200,
"repo_created_at": "2020-12-08T14:47:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 43,
"forks": 13,
"issues": 4,
"pull_requests": 1
},
"file_meta": {
"content_id": "04ba8c7... |
d3492ed7-0430-4059-b16d-d264fdb456e0 | JaviDeMartino/PCOM_problema | casos/aleatorios/generador_caso_aleatorio3.cpp | // <NAME> - <NAME>
// <EMAIL> - <EMAIL>
//
// LA RANITA Y LOS NENÚFARES
// - Generador de casos aleatorios 3
//
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <cmath>
#include <set>
#include <random>
using namespace std;
const int NUM_CASOS = 500;
const int MIN_NUM_NENUFARES =... | TOOL | 0.967809 | 3.355292 | {
"github_metadata": {
"branch": "main",
"commit_count": 54,
"repo_created_at": "2024-12-04T18:05: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": "8a695c4249d... |
37a31cce-d5f9-4115-a452-a2b4e1b6d4b5 | qwerthjkl45/annProject | algorithim/hw5_heap/hw5-1.cpp | #include <cstdlib>
#include <iostream>
#include <stdio.h>
#include <ctime>
#include <string.h>
#include <unistd.h>
using namespace std;
#define SIZE 200
#define ROOT 1
struct edge {
int head;
long dist;
edge* next;
bool visit ;
long prev_dist;
};
struct Data {
long distance;
int index;
};
struct Data datas[S... | ALGO | 0.999308 | 3.242844 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2016-09-01T13:55:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1bfb595640... |
6b93724c-7d11-420b-bc14-8d0fdcdfab29 | Soraakash/Coding | Arrays/Leet Code/Medium/2545. Sort The Student By Their Kth Scores.cpp | // There is a class with m students and n exams. You are given a 0-indexed m x n integer matrix score,
// where each row represents one student and score[i][j] denotes the score the ith student got in the
// jth exam. The matrix score contains distinct integers only.
// You are also given an integer k. Sort the stud... | ALGO | 0.999901 | 6.707795 | {
"github_metadata": {
"branch": "main",
"commit_count": 93,
"repo_created_at": "2022-11-11T13:35: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": "4e89fbf3a82... |
6243c7b9-2c79-4cd4-a3c8-1dfcbc4e2e6b | dev-mirzabicer/cc-simpler | SensorController/src/Filter.cpp | #include "Filter.h"
#include <cmath>
/**
* @brief Apply a complementary filter to estimate yaw.
*
* Combines gyroscope integration and magnetometer reading to provide a stable yaw estimate.
*/
float Filter::complementaryYawFilter(float prevYawFiltered, float gyroZ, float magYaw, float dt, float alpha)
{
// Int... | ALGO | 0.983539 | 6.401844 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2024-12-03T00:28:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "32e634c09e5... |
ae8c88a4-7580-4150-b351-6d3b88b0001f | M45UDrana/DS-Algo-Problem-Solving | codeforces/279B.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<string, int> psi;
#define ff first
#define ss second
#define pb(a) push_back(a)
#define mp(a,b) make_pair(a,b)
#define input freopen("input.txt","r",stdin)
#define output freopen("output.txt","w",stdout)
#def... | ALGO | 0.999976 | 3.671731 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2021-06-08T17:09:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7776107b8e0... |
ffc7d922-8267-42a0-b5c5-fbbe297da515 | liuyubobobo/Play-Leetcode | 0001-0500/0146-LRU-Cache/cpp-0146/main.cpp | /// Source : https://leetcode.com/problems/lru-cache/
/// Author : liuyubobobo
/// Time : 2019-03-02
#include <iostream>
#include <unordered_map>
#include <cassert>
using namespace std;
/// HashMap + Double Linked List
/// Time Complexity: init: O(1)
/// get: O(1)
/// put: O(1)
/... | ALGO | 0.999186 | 6.085277 | {
"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": "0f... |
387791f5-b380-4de7-b374-6a0cb7364e36 | Shivesh-K/CompetitiveCoding | Building_Roads.cpp | #include <bits/stdc++.h>
using namespace std;
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a * b) / gcd(a, b)
#define GOLD ((1 + sqrt(5)) / 2)
const double PI = 3.14159265358979323846264338327950288419716939937510582097494459230;
v... | ALGO | 0.999983 | 4.011915 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2021-01-06T14:09: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": "918049d7e... |
2d964ee1-e1bd-4a21-b831-e804ad34a46f | nileshsah/Algorithms | CF556C.cpp | #include <bits/stdc++.h>
#define ll long long
#define get(a) scanf("%ld", &a);
#define repVector(v) for( auto it = v.begin(); it != v.end(); it++ )
#define all(c) c.begin(), c.end()
#define pb push_back
#define FOR(i,a,b) for( ll i = a; i <= b; i++ )
#define ROF(i,a,b) for( ll i = a; i >= b; i-- )
#define debug(x) cou... | ALGO | 0.999843 | 3.059676 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2015-02-17T10:07:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 14,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e73bb6373... |
b18930d9-7e82-461f-91f5-6e27400400a7 | stonne-simulator/stonne | pytorch-frontend/caffe2/quantization/server/im2col_dnnlowp.h | #pragma once
#ifdef _OPENMP
#include <omp.h>
#endif
#include "caffe2/core/operator.h"
#include "caffe2/utils/math.h"
#include "caffe2/utils/math/utils.h"
namespace caffe2 {
namespace math {
template <typename T>
static void Im2ColNCHW(
const int channels,
const int height,
const int width,
const in... | TOOL | 0.939729 | 7.609461 | {
"github_metadata": {
"branch": "master",
"commit_count": 90,
"repo_created_at": "2020-12-01T17:24:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 134,
"forks": 30,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "192426... |
6e667e5c-2a5a-4836-ab57-f28034470d50 | metopt-coffin/sole-solver | src/Solver.cpp | #include "Solver.h"
#include "LUMatrixViews.h"
#include "ProfileMatrix.h"
#include <algorithm>
#include <cmath>
#include <numeric>
// vector operation helpers
namespace
{
using value_t = Solver::value_t;
using value_vec = std::vector<value_t>;
/*
* Subtraction of two vectors
*/
value_vec v_... | ALGO | 0.999915 | 6.272103 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2021-05-12T18:46:31.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1a6b82ef39af... |
d7ea3ff6-4722-48cc-b659-e273b67b7a65 | okarimpour/leetcode | rotateImage.cpp | class Solution {
public:
void rotate(vector<vector<int>>& matrix) {
int column, row, temp;
int max_column_number = matrix.size();
int max_row_number = matrix[0].size();
for (column = 0; column < max_column_number; ++column) {
for (row = 0 ; row < max_row_number / ... | ALGO | 0.999995 | 6.345716 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2020-03-16T22:16:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ba8490811... |
2a299a4b-b149-49bd-a640-d0e86cd6aae1 | vanshika-13/DSA_280 | dp/Q29PileSum.cpp | /*There are n piles of stones arranged in a row. The ith pile has stones[i] stones.
A move consists of merging exactly k consecutive piles into one pile, and the cost of this move is equal to the total number of stones in these k piles.
Return the minimum cost to merge all piles of stones into one pile. If it is impo... | ALGO | 0.999595 | 4.646698 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-08-05T14:16: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": "59d16276756b... |
8a8389ab-d54d-49c8-b8d0-754334e089e8 | Augus-Fu/EveryDay-test | mine_test/mine_test.cpp | #include<iostream>
using namespace std;
typedef struct piont
{
int x;
int y;
}point;
typedef struct listpoint
{
point* a;
listpoint* pre;
listpoint* next;
}listpoint;
listpoint* create_list(int n)
{
listpoint* head, * end, * normal;
head = (listpoint*)malloc(sizeof(listpoint));
head->a = (point*)malloc(sizeof(p... | ALGO | 0.997084 | 3.656208 | {
"github_metadata": {
"branch": "main",
"commit_count": 66,
"repo_created_at": "2022-04-03T08:48:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bb1513768f9... |
ee901670-f021-4313-893d-a3ae0918dee8 | RishabhShukla1511/Algorithms | Linked List/Add Two Numbers Represented By Linked Lists/Add_two_numbers_represented_by_linked_lists(1).cpp | // driver
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
/* Linked list Node */
struct Node {
int data;
struct Node* next;
Node(int x) {
data = x;
next = NULL;
}
};
struct Node* buildList(int size)
{
int val;
cin>> val;
Node* head = ne... | ALGO | 0.999783 | 5.06426 | {
"github_metadata": {
"branch": "main",
"commit_count": 241,
"repo_created_at": "2021-02-10T18:40:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "26618ce00e... |
3c29c0ee-73da-4eeb-8d33-42e3b826954a | ab-atiq/Competitive_Programming | Data Structure & Algorithm/Recursion/X^N.cpp | // complexity O(N)
#include <iostream>
using namespace std;
// complexity O(N)
int calculate(int x, int n)
{
if (n == 0)
return 1;
if (x == 0)
return 0;
return x * calculate(x, n - 1);
}
// complexity O(log(N))
int calculate2(int x, int n)
{
if (n == 0)
return 1;
if (x == 0... | ALGO | 0.999983 | 4.904719 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2022-06-12T04:11: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": "7ca7ae129a6... |
a31d72bc-61bb-479d-aa8f-03d6091f48cb | tetzank/SIMDSetOperations | merge/sse.hpp | #ifndef MERGE_SSE_HPP_
#define MERGE_SSE_HPP_
#include <cstdint>
#include <immintrin.h>
size_t merge_scalar(const uint32_t*, size_t, const uint32_t*, size_t, uint32_t*);
size_t merge_vector_sse(const uint32_t *list1, size_t size1, const uint32_t *list2, size_t size2, uint32_t *result){
size_t count = 0;
size_t i... | ALGO | 0.994368 | 6.118976 | {
"github_metadata": {
"branch": "master",
"commit_count": 56,
"repo_created_at": "2015-08-27T08:48:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 41,
"forks": 8,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d1d459ac... |
ced58a1a-b851-4fd4-bf9b-ac87c0b87daf | hyeon-BL/Coding-problem | 분류/20_백트래킹/스도쿠.cpp | #include <iostream>
using namespace std;
#define rows 9
#define cols 9
#define box 3
bool isValid(int sudoku[rows][cols], int row, int col, int num)
{
// 행에 중복된 숫자가 있는지 확인
for (int i = 0; i < cols; i++)
{
if (sudoku[row][i] == num)
return false;
}
// 열에 중복된 숫자가 있는지 확인
for ... | ALGO | 0.999938 | 5.916119 | {
"github_metadata": {
"branch": "main",
"commit_count": 473,
"repo_created_at": "2024-02-15T05:15: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": "6f8d217f45... |
a12d2642-ce12-450a-a2aa-d553cf4d1f83 | Aarth-Tandel/DataStructures | Codechef/BOUQUET.cpp | #include <iostream>
using namespace std;
int tree(long long int leaves[][3])
{
long long int column =0, row=0;
for(long long int i=0; i<3; i++)
{
long long int temp = 0;
for(long long int j=0; j<3; j++)
{
temp += leaves[i][... | ALGO | 0.999932 | 4.745384 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-07-30T10:45: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": "7985a61675... |
e4980f0b-1eff-48cc-9216-a5d064e25a3b | Sumant3086/LeetCode-Solution | 45. Jump Game II.cpp | // 45. Jump Game II
// Solved
// Medium
// Topics
// Companies
// You are given a 0-indexed array of integers nums of length n. You are initially positioned at nums[0].
// Each element nums[i] represents the maximum length of a forward jump from index i. In other words, if you are at nums[i], you can jump to any nums[... | ALGO | 0.99998 | 5.748239 | {
"github_metadata": {
"branch": "main",
"commit_count": 473,
"repo_created_at": "2024-03-21T15:53: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": "462b376e8c... |
898704d1-7b26-4bd7-b2a8-f192c56532bb | ORLRO/Quadtree-segmentation | segmentation/main.cpp | #include <opencv2/core.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include "qt_segment.h"
#include <iostream>
//TODO: linear combination of multiple factors!
// define * operator
// define + operator
using namespace std;
using namespace cv;
unsigned char threshold2 = 90;//must be global (-... | TOOL | 0.960081 | 4.29896 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2017-03-20T10:54: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": "f6eadd7c9... |
181b31c0-0201-4241-b59a-840591f73bea | Thomaw/Project-Euler | 300-400/347.cpp | #include <map>
#include <string>
#include <vector>
#include <math.h>
#include <set>
#include <algorithm>
#include <list>
#include <iostream>
using namespace std;
#define ll long long
int N;
bool isprime[10000010];
bool there[10000010];
vector <int> primes;
int main()
{
scanf("%d",&N);
for(int i=2;i<=N;i++)... | ALGO | 0.999906 | 3.481261 | {
"github_metadata": {
"branch": "main",
"commit_count": 166,
"repo_created_at": "2021-09-19T16:34: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": "6804e079d3... |
84e4dad1-60ba-4149-82f8-fccff19dab4d | ini111/kplex | src/copyBS.cpp | #include <bits/stdc++.h>
#define FI first
#define SE second
using namespace std;
const int MaxN = 15000; //1e5+10;
const int MaxM = 1200000; //1e7+10;
const int Maxn = 1100; //3e3+10;
string str, graphName;
int N, M, K, maxSize;
pair<int, int> E[MaxM];
int head[MaxN], len;
double startTime, endTime, timeLimit;
struct n... | ALGO | 0.999644 | 3.551701 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2020-03-31T09:34:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2cce4eee4d... |
cc33791f-6996-45f9-9931-f16591f941d9 | keshavvijay092/Striver-455 | day 13/105.cpp | class Solution {
public:
const int MOD = 1000000007;
long long int power(long long a,long long int b)
{
if (b == 0) return 1;
if (b == 1) return a % MOD;
long long int half = power(a, b / 2);
half = (half * half) % MOD;
if (b % 2 == 0)
return half;
else
r... | ALGO | 0.999962 | 5.442669 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-09-20T05:56: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": "17432f03c569... |
4b644e27-0f07-4c11-9d8f-d3aac9b08122 | YazanZebak/CompetitiveProgramming | Codeforces/CF16-D2-E.cpp | #include <bits/stdc++.h>
typedef long long ll ;
using namespace std;
double dp[1 << 18];
double p[20][20];
int n ;
int main()
{
ios::sync_with_stdio(false) , cin.tie(0) , cout.tie(0) ;
cin >> n ;
for(int i = 0 ; i < n ; i++)
for(int j = 0 ; j < n ; j++){
cin >> p[i][j] ;
... | ALGO | 0.999873 | 4.388129 | {
"github_metadata": {
"branch": "master",
"commit_count": 162,
"repo_created_at": "2018-10-02T14:45:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8e2aeab3... |
4bf003b5-ffe9-4997-a9f9-74ca155e02f5 | descent/progs | lexer/lexer.cpp | #include <cstdio>
#include <string>
#include <cctype>
#include <iostream>
using namespace std;
#define OK 0
#define ERR 1
#define UP 2
#define DOWN 3
#define RIGHT 4
#define LEFT 5
int isgraph_ex1(int c)
{
if (c == ' ')
return 1;
else
return isgraph(c);
}
static inline int isascii_ex1(int c)
{
if ... | ALGO | 0.95806 | 3.400338 | {
"github_metadata": {
"branch": "master",
"commit_count": 692,
"repo_created_at": "2012-08-30T02:20:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "37734b43... |
bca6c564-a231-4317-a396-ccbdfef9cf11 | hs094/CP | CodeChef/Starters 50 Division 2 (Rated)/Air_Blimp.cpp | #pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,fma")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <complex>
#include <queue>
#include <set>
#include <unordered_set>
#include <list>
#include <chrono>
#include <random>
#include <iostream>
#inc... | ALGO | 0.99998 | 4.213064 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2024-09-08T13:44: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": "2feff409683... |
7a445f6c-3ef8-4c9c-b09b-69fa655fd306 | ShowravKormokar/STL-CPP | Containers/Lists/deletion_List.cpp | #include <bits/stdc++.h>
using namespace std;
void printList(list<int> lst)
{
for (auto value : lst)
{
cout << value << " ";
}
cout << endl;
}
int main()
{
list<int> lst = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
// Remove elemrnt at the begin
lst.pop_front();
cout << "Pop element fro... | TOOL | 0.955426 | 5.345045 | {
"github_metadata": {
"branch": "main",
"commit_count": 45,
"repo_created_at": "2025-07-08T10:30: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": "5e2f1880058... |
90198a19-e61e-4cf5-a474-91ad23429ee9 | elemaudio/elementary | runtime/elem/builtins/Filters.h | #pragma once
#include "../GraphNode.h"
namespace elem
{
// A very simple one pole filter.
//
// Receives the pole position, p, as a signal, and the input to filter as the second signal.
// See: https://ccrma.stanford.edu/~jos/filters/One_Pole.html
template <typename FloatType>
struct OnePole... | TOOL | 0.970769 | 7.28762 | {
"github_metadata": {
"branch": "main",
"commit_count": 265,
"repo_created_at": "2023-01-09T14:11:28.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 440,
"forks": 37,
"issues": 10,
"pull_requests": 9
},
"file_meta": {
"content_id": "e13c328... |
4a859ab6-d377-4ed5-97e0-6f70e566502c | Puchkof/LinkedList | linkedlist.h | #ifndef LINKEDLIST_H
#define LINKEDLIST_H
#include <iostream>
using namespace std;
#include "memory.h"
template <class T>
void Swap_T(T* pThis, const T& R) // template for assignment operator
{
char sBuff[sizeof(T)];//buffer for current condition of object to destroy object in future
T Temp(R);//temporary obj... | ALGO | 0.998617 | 4.445651 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2017-10-28T17:19: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": "dbd7749759... |
7892b38a-e48b-4046-8181-929c33bbe9dd | vk-kushwaha/CPP_practice | LinkedList/DisplayLL.cpp | #include <iostream>
using namespace std;
class node
{
public:
int data;
node *next;
node(int val)
{
data = val;
next = NULL;
}
};
void InsertAthead(node *&head, node *&tail, int data)
{
if (head == NULL)
{
head = new node(data);
tail = head;
}
else... | ALGO | 0.999864 | 5.079583 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2023-04-24T15:17: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": "6453e3d0c95... |
89f44db4-784b-4d97-992b-a711969991c2 | matbmp/Hyper3D | Graphics/interpolation.cpp | #include "interpolation.h"
void AbstractBarycentricInterpolator::setTarget(Point2 A, Point2 B, Point2 C){
this->A = A;
this->B = B;
this->C = C;
init();
}
void AbstractBarycentricInterpolator::init(){
if(A.y > B.y){
std::swap(A,B);
swap1 = true;
} else{
swap1 = false;
... | ALGO | 0.994229 | 5.615681 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2022-09-05T14:10: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": "070dc1d14a... |
26a27ba7-0c69-41f5-aee6-04e82196053e | anachende/cpp | studiu/problema_2_clasa.cpp | #include <iostream>
#include <fstream>
using namespace std;
int cifre_pare(int x) {
//cout << "START " << x << endl;
int uc, s = 0, are_c_p = 0;
while(x > 0) {
uc = x%10;
x = x/10;
if(uc%2 == 0) {
are_c_p = 1;
s = s + uc;
//cout << s << " _ " << ... | ALGO | 0.999657 | 3.618708 | {
"github_metadata": {
"branch": "main",
"commit_count": 62,
"repo_created_at": "2024-09-22T18:34: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": "1591454f359... |
6b05418f-26e1-49a1-b37a-d1c247b0b9f9 | pjswarnpath2709/Self-Learning | GFG DSA course/DynamicProgramming/partitionEqualSubset.cpp | #include <bits/stdc++.h>
using namespace std;
typedef vector<int> vi;
typedef vector<vi> vvi;
class Solution
{
public:
bool subsetSum(int n, vector<int> &arr, int k)
{
vector<bool> prev(k + 1, false), cur(k + 1, false);
prev[0] = cur[0] = true;
if (arr[0] <= k)
prev[arr[0]] ... | ALGO | 0.999971 | 4.664548 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2022-02-20T05:56:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "15f85a389... |
a5d79ee4-0953-4a87-b919-55f78d19e886 | yanhaona/HighP5-Updated | helper-projects/Validation/mpi/mpiStencil.cpp | #include <sstream>
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
#include <cctype>
#include <stdlib.h>
#include <string.h>
#include <deque>
#include <sys/time.h>
#include <time.h>
#include <pthread.h>
#include <mpi.h>
#include <cassert>
#include "../utils.h"
#include "../structures.h"
#in... | ALGO | 0.998006 | 5.334646 | {
"github_metadata": {
"branch": "main",
"commit_count": 74,
"repo_created_at": "2024-08-23T12:06: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": "2938156b72d... |
9bf16af9-f2dd-4f0b-aa7f-08f13f93fcb7 | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/08/0807/personal_submission/cf578b_mrsuns.cpp | void Solve() {
int n, k, x;cin >> n >> k >> x;
vector<int> a(n + 1);for (int i = 1;i <= n;i++) cin >> a[i];
vector<int> pre(n + 1), suf(n + 2);
for (int i = 1;i <= n;i++) pre[i] = pre[i - 1] | a[i];
for (int i = n;i >= 1;i--) suf[i] = suf[i + 1] | a[i];
auto gc = [&](int p) {
int res = 0... | ALGO | 0.999656 | 4.424994 | {
"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": "a8b7... |
c0c39ad6-19da-473b-9e0f-496d50235b83 | AviKfir/OS | Ex4/VirtualMemory.cpp | #include "VirtualMemory.h"
#include "PhysicalMemory.h"
bool
dfs (word_t now_frame, word_t saved_frame, word_t *found_frame, word_t *max_index,
word_t level_depth, uint64_t virtual_page, long long int *max_distance,
uint64_t access_page, bool flag_empty_table, uint64_t *virtual_victim_page, word_t *physical_v... | ALGO | 0.99923 | 5.57934 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2024-06-24T17:33: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": "3073fa7ea385... |
c057830e-91f3-46c5-87ef-fdc51ad4c493 | ChairmanFMao/codeforces | practice/solved/1436B.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
// Used the solution heavily for this problem
// Accepted first try
void solve() {
int n;
cin >> n;
// Should've thought about zero, silly mistake
vector<vector<int>> numbers(n);
for (int i = 0; i < n; i++)
numbers[i].resi... | ALGO | 0.999931 | 3.874797 | {
"github_metadata": {
"branch": "master",
"commit_count": 35,
"repo_created_at": "2022-01-17T22:10: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": "e8f50c176... |
b86d2576-540b-4c52-b2ac-e1dcb985e022 | austrian-olympiad-informatics/ioi-tasks | ioi2019-line/solution/simple-spiral.cpp | #include <cassert>
#include <cstdio>
#include <set>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
map<int, set<int>> X, Y;
int n, x, y;
void clear_x() {
if (!X.count(x)) return;
n -= X[x].size();
for (int yy : X[x]) {
auto sz = Y[yy].erase(x);
assert(sz == 1);
if (Y[yy].empty()) Y.erase... | ALGO | 0.999911 | 3.655622 | {
"github_metadata": {
"branch": "main",
"commit_count": 32,
"repo_created_at": "2023-01-11T10:10:42.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "17edb6739420... |
6905360f-0e57-4760-90aa-55b2029c94a0 | SadMathLovergo/LeetCodeSolution | 450DeleteNode/450DeleteNode.cpp | #include <iostream>
#include <vector>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
class Solution {
public:
TreeNode * deleteNode(TreeNode* root, int key) {
if (root == NULL)
return NULL;
if (key < root->val) {
... | ALGO | 0.999989 | 4.695638 | {
"github_metadata": {
"branch": "master",
"commit_count": 95,
"repo_created_at": "2018-09-29T02:59:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a000c28d5... |
82e33e33-e682-4bb5-90d8-d6b995303cae | qian99/acm | problem/图论/最短路/zoj 2750 Idiomatic Phrases Game.cpp | #include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<cmath>
#include<vector>
#define inf 0x3f3f3f3f
#define Inf 0x3FFFFFFFFFFFFFFFLL
#define eps 1e-9
#define pi acos(-1.0)
using namespace std;
typedef long long ll... | ALGO | 0.999769 | 3.514462 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-01-23T14:37:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cd0f6fa88c... |
28c28193-4338-4934-98f2-f2a527d5a445 | akshita172/Striver-SDE-Sheet-Challenge | Day-1 Arrays Part-I/1. Set Matrix Zeroes/Optimised Approach.cpp | /*
Approach 3 - Most Optimised
Time Complexity: O(2*(N*M))
Space Complexity: O(1)
*/
class Solution {
public:
void setZeroes(vector<vector<int>>& matrix) {
int n = matrix.size(), m = matrix[0].size();
int col = matrix[0][0];
bool fr = false, fc = false;
for(int i=0; i<n; i++) if(matrix[i][0]==0... | ALGO | 0.999861 | 6.507595 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2023-06-04T09:50:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "c4fc90f853d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.