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 |
|---|---|---|---|---|---|---|---|
16d9778e-77b7-499c-84e8-f855f0ca0787 | DaegyuLim/dyros_jet_dg | dyros_jet_controller/src/com_jacobian.cpp | #include "dyros_jet_controller/dyros_jet_model.h"
#include "dyros_jet_controller/walking_controller.h"
namespace dyros_jet_controller
{
void WalkingController::linkMass()
{
///////////////////////////////////////////////////////////////////////////////////
mass_total_ = 0;
mass_body_(0) = model_.getLinkMass... | ALGO | 0.994321 | 4.470178 | {
"github_metadata": {
"branch": "comjacobian",
"commit_count": 359,
"repo_created_at": "2020-01-31T06:42:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "de2... |
dd8b25a3-9abd-470e-9dc0-d81a6a6a2eeb | danielsundfeld/astar_msa | src/Node.h | /*!
* \class Node
* \author <NAME>
* \copyright MIT License
*
* \brief Class that hold all Nodes atributes, like the cost from the
* origin, heuristic estimative, parent
*/
#ifndef _NODE_H
#define _NODE_H
#include <vector>
#include "Coord.h"
template < int N > class Node;
template < int N > std::ostream& operat... | ALGO | 0.992601 | 3.453825 | {
"github_metadata": {
"branch": "master",
"commit_count": 345,
"repo_created_at": "2019-04-12T01:33:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9af06192... |
cfb7846f-3916-48e1-a22a-0c8b90f3e7e8 | BanSheeGun/Gun | OI/2012/11月7日上午/上午/Program/徐毅/pack.cpp | #include <cstdio>
#include <cstring>
const int MAXN = 2222;
int f[MAXN], p[MAXN];
void checkmax(int &x, int y)
{
if (y > x)
x = y;
}
int main()
{
freopen("pack.in", "r", stdin);
freopen("pack.out", "w", stdout);
int n, m;
scanf("%d%d", &n, &m);
for (int i = 0; i < n; ++ i)
{
... | ALGO | 0.999616 | 3.343334 | {
"github_metadata": {
"branch": "master",
"commit_count": 143,
"repo_created_at": "2015-10-26T07:49:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b503587a... |
e569dd47-7378-435e-8607-c7aa0a20cefe | bqi343/cp-notebook | Contests/USACO Solutions/2013-14/Mar 2014/14 Mar G3.cpp | // #include<iostream>
#include<fstream>
#include<set>
#include<map>
#include<unordered_map>
#include<cmath>
#include<cstring>
#include<string>
#include<bitset>
#include<algorithm>
#include<vector>
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ... | ALGO | 0.999767 | 3.324543 | {
"github_metadata": {
"branch": "master",
"commit_count": 1350,
"repo_created_at": "2017-07-11T03:52:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2642,
"forks": 429,
"issues": 4,
"pull_requests": 0
},
"file_meta": {
"content_id": "6c... |
124714e8-37be-4814-ae81-747b0f82758a | ghugesachin0806/Data_Structure_n_Algorithm | 06_Binary_Tree/34_morris_traversal_inorder.cpp | // https://practice.geeksforgeeks.org/problems/inorder-traversal/1
// Theory --->
// https://leetcode.com/problems/binary-tree-inorder-traversal/solutions/148939/CPP-Morris-Traversal/
#include <bits/stdc++.h>
using namespace std;
struct Node
{
int data;
Node *left;
Node *right;
Node(int val)
{
... | ALGO | 0.999996 | 6.309397 | {
"github_metadata": {
"branch": "master",
"commit_count": 135,
"repo_created_at": "2023-02-14T21:13: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": "8fab371c... |
c14e0143-8f29-44db-946b-1876d253c752 | gamer-project/gamer | src/Interpolation/Int_CQuadratic.cpp | #include "GAMER.h"
//-------------------------------------------------------------------------------------------------------
// Function : Int_CQuadratic
// Description : Perform spatial interpolation based on the conservative quadratic interpolation
//
// Note : 1. It is the 3D generalization of the 1... | ALGO | 0.993045 | 5.524516 | {
"github_metadata": {
"branch": "main",
"commit_count": 7047,
"repo_created_at": "2017-12-13T20:44:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 86,
"forks": 70,
"issues": 99,
"pull_requests": 32
},
"file_meta": {
"content_id": "1923d8... |
fb32b409-6f0c-4771-bc4c-3b5b5870e99f | ZRZRING/algorithm | Practice/CCPC/2019 Harbin/E.cpp | #include <bits/stdc++.h>
using int64 = long long;
using A2 = std::array<int64, 2>;
#define Fast_IOS std::ios::sync_with_stdio(false), std::cin.tie(0), std::cout.tie(0)
const int64 mod = 998244353;
class WORK {
public:
int N;
WORK() {}
void solve() {
int n;
std::cin >> n;
std::vector<int> d(n + 1);
std:... | ALGO | 0.99966 | 4.322154 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-03-11T04:17:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "068853d69851... |
56751d32-dff9-4b2b-82e2-368eacea92d7 | franneck94/UdemyCpp | ComputerGame5/_Start/Game.cc | #include <cstdint>
#include <iostream>
#include "Game.h"
namespace
{
constexpr std::uint32_t LEN_X = 10U;
constexpr std::uint32_t START = 0U;
constexpr std::uint32_t GOAL = 9U;
constexpr char LEFT = 'a';
constexpr char RIGHT = 'd';
}; // namespace
bool is_finished(const std::uint32_t player)
{
return player == G... | ALGO | 0.988682 | 4.882721 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2020-07-26T14:10:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 48,
"forks": 252,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6b05ce... |
8e5619ff-2b97-4a83-bba4-f33cf597d162 | Hahaverse/C10_ex | 소스.cpp | #include <iostream>
using namespace std;
class Fraction {
private:
int numer;
int denom;
public:
Fraction();
Fraction(int n, int d);
~Fraction();
Fraction operator+(Fraction& c) {
Fraction f(0, 0);
Fraction f1(this->numer, this->denom);
Fraction f2(c.numer, c.denom);
int x;
while (f2.denom != 0) {
... | TOOL | 0.994538 | 4.808702 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-03-02T09:11: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": "2c1f8e2bd776... |
410232d1-4c87-484b-8e16-a91066d753e8 | innercircle-byebye/js_network | kycho/ServerConfig.cpp | /* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ServerConfig.cpp :+: :+: :+: ... | WEB | 0.903348 | 5.386776 | {
"github_metadata": {
"branch": "main",
"commit_count": 37,
"repo_created_at": "2021-06-29T09:40:50.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 3,
"pull_requests": 1
},
"file_meta": {
"content_id": "da50ca202fa0... |
0961de5a-cca7-4ecb-92ea-b57f83a60c18 | HandMi/coding-problems | CodeJam/NestingDepth/src/main.cpp | #include <iostream>
auto NestingDepth(std::string &input) -> std::string
{
std::string output;
input += '0';
int depth = input[0] - '0';
for (int i = 0; i < input.size(); ++i)
{
for (int j = depth; j < 0; ++j)
{
output += ')';
}
for (int j = 0; j < depth;... | ALGO | 0.99916 | 5.427148 | {
"github_metadata": {
"branch": "master",
"commit_count": 127,
"repo_created_at": "2019-11-12T16:10: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": "ec1bdb31... |
5158be20-c102-4485-9101-13e44b3b7455 | grwells/CS445 | Code/memloc.h | #ifndef MEMLOC_H
#define MEMLOC_H__DATE__ " " __TIME__
#include <vector>
#include <utility>
#include <iostream>
//#include "symbolTable.cpp"
// Utils for allocating and assigning memory in the program
class Memloc {
private:
int loc;
int goffset; // global offset
int foffset; // frame... | ALGO | 0.908019 | 6.547748 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2021-12-08T04: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": "6f0deeae8f... |
6a0a613c-a749-48dd-a8ba-b3756611eb5f | 6leetcode/6leetcode | questions/Algorithms/0458. Poor Pigs/Testing.cc | #include <cmath>
#include <cstdlib>
#include <iostream>
using namespace std;
class Solution {
public:
int poorPigs(int buckets, int minutesToDie, int minutesToTest) {
int times = minutesToTest / minutesToDie;
int base = times + 1;
// base ^ ans >= buckets
// ans >= log(buckets) / log(base)
doub... | ALGO | 0.996765 | 5.654946 | {
"github_metadata": {
"branch": "main",
"commit_count": 374,
"repo_created_at": "2019-07-12T02:02:53.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 10,
"forks": 0,
"issues": 0,
"pull_requests": 17
},
"file_meta": {
"content_id": "59629343c... |
9a89c8dc-35aa-4592-ad1b-7769e4a671ed | watermelonCrane/PS-Practice | BOJ/6603.cpp | //성공
//이거랑 15650번이랑 뭐가 다르지?
#include <iostream>
#include <vector>
using namespace std;
void lotto(int k, vector<int>& S, vector<int>& result) {
if (result.size() == 6) {
for (auto& x : result) {
cout << S[x] << " ";
}
cout << "\n";
}
else {
for (int i = 0; i < k;... | ALGO | 0.999653 | 4.744095 | {
"github_metadata": {
"branch": "main",
"commit_count": 109,
"repo_created_at": "2023-07-25T14:15: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": "16057eaaee... |
a593f2e3-fb32-468a-86ca-2a59e8f6b42d | arunbadhai/interviewbit-problems | Backtracking/sudoku.cpp | #include <iostream>
#include <vector>
#include <string>
#include <fstream>
using namespace std;
#define EMPTY '.'
using vvc = vector< vector<char> >;
using vc = vector<char>;
class strUtilz{
private:
const string str;
int i, size;
public:
char delim;
// ----------------------- MEMBER FUNCTIONS -------... | ALGO | 0.997534 | 5.735476 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2018-08-07T14:34: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": "19d595130... |
9060e190-a55b-477e-ab4d-3de3d80f1746 | Kyaki101/Competitive-Programming | CF/2096/b.cpp | #include <bits/stdc++.h>
using namespace std;
#define SET(m, i) ((m) | (1ULL << (i)))
#define TEST(m, i) ((m) & (1ULL << (i)))
#define CLEAR(m, i) ((m) &~ (1ULL << (i)))
#define DEBUG(n) cout<<#n<<" = "<<n<<endl
#define MSET(arr, x, n) (memset(arr, x, (n)*sizeof(arr[0])))
#define ALL(v) (v).begin(), (v).end()
#define ... | ALGO | 0.999994 | 3.558343 | {
"github_metadata": {
"branch": "main",
"commit_count": 242,
"repo_created_at": "2023-12-19T16:25: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": "d84ccb6790... |
d0c32357-2b1a-42a7-ac60-a2c242985b8d | Tudor67/Competitive-Programming | LeetCode/Problems/Algorithms/#2977_MinimumCostToConvertStringII_sol1_roy_floyd_and_dp_O(N^3+C^3+CxL)_time_O(N+C^2+CxL)_extra_space_TLE.cpp | class Solution {
public:
long long minimumCost(string source, string target, vector<string>& original, vector<string>& changed, vector<int>& cost) {
const int N = source.length();
const int C = changed.size();
const long long INF = 1e16;
unordered_map<string, int> strToNode;
... | ALGO | 0.999948 | 5.746105 | {
"github_metadata": {
"branch": "master",
"commit_count": 615,
"repo_created_at": "2020-02-27T19:56:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bcff5487... |
84cb88e4-098c-4fbf-a975-f1df8220f6ca | aosihfvdps/Cpp-small-game | practices/Linked_List/Linked_list_1/main.cpp | #include <iostream>
#include <stdlib.h>
#include <time.h>
#include <windows.h>
#include <conio.h>
#define WIDTH 30
#define HEIGHT 20
using namespace std;
void gotoxy(int,int);
void gotoxy(int x,int y){
HANDLE hConsoleOutput;
COORD Cursor_Pos={x,y};
hConsoleOutput = GetStdHandle(STD_OUTPUT_HANDLE);
SetCo... | ALGO | 0.990071 | 3.198315 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-11-16T01:11:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1b68307e0e4d... |
f46e1db8-5d46-47cd-bf7e-c8ec16d681e7 | x2c3z4/recipes | codejam/ms/ms4.cc | #include <iostream>
#include <vector>
#include <algorithm>
#include <stdio.h>
using namespace std;
string cmd1(string& rst, int i, int j, char x) {
while (i <= j) {
rst[i - 1] = x;
++i;
}
return rst;
}
string cmd2(string& rst, int i, int j, int k) {
while (i <= j) {
rst[i - 1] = rst[i - 1] + k;
... | ALGO | 0.999939 | 3.867499 | {
"github_metadata": {
"branch": "master",
"commit_count": 82,
"repo_created_at": "2014-07-02T07:55:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 2,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "bd690bb5a... |
4ce38487-7a44-4dd4-a750-050299fd056e | mostainRifat/DynamicPp | 31.1 The lakes.cpp | // https://codeforces.com/contest/1829/problem/E
#include <bits/stdc++.h>
using namespace std;
int n, m;
const int N = 1002;
bool visited[N][N];
int grid[N][N];
int dx[] = {0, 0, -1, 1};
int dy[] = {1, -1, 0, 0};
bool insidethemaze(pair<int, int> src);
int Dfs(pair<int, int> src);
int dfs(pair<int, int> src)
{
i... | ALGO | 0.999895 | 4.834621 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-08-03T14:14: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": "5f1a656d3d72... |
75ffbdfa-d77d-452a-85d6-c009754478fd | Umi-def/Atcoder | Atcoder/ABC/165/165-C.cpp | #include <iostream>
#include <cstdint>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cctype>
#include <cassert>
#include <climits>
#include <string>
#include <bitset>
#include <cfloat>
#include <unorder... | ALGO | 0.999892 | 3.937179 | {
"github_metadata": {
"branch": "main",
"commit_count": 70,
"repo_created_at": "2020-10-08T00:10: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": "3c175dd3949... |
0d5bd9a0-9998-48dc-a1bc-ebe3008ffe4d | reupen/ui_helpers | list_view/list_view_misc.cpp | #include "stdafx.h"
#include "list_view.h"
namespace uih {
void ListView::on_first_show()
{
if (const size_t focus = get_focus_item(); focus != std::numeric_limits<size_t>::max())
ensure_visible(focus);
}
void ListView::refresh_item_positions()
{
const auto position = save_scroll_position();
cal... | TOOL | 0.981262 | 7.1669 | {
"github_metadata": {
"branch": "main",
"commit_count": 664,
"repo_created_at": "2015-12-26T20:22:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9b3a7146ad... |
4d16245a-92ca-4dfa-bc23-de2526dad8ec | wcysai/triple_dogs | hdu2023/con3/6.cpp | #pragma GCC optimize(3)
#include<bits/stdc++.h>
#define MAXN 105
#define MAXM 105
#define INF 1000000000
#define MOD 1000000007
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
int d[MAXN];
int b[MAXN],bel[MAXN],cost[MAXN];
ll a[MAXN];
vector<int> G[MAXN];
ll val[MAXM... | ALGO | 0.999824 | 3.677882 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-08-01T03:55: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": "26c0268f8b88... |
b265b5df-062f-4da4-ab99-f9e40fa13d98 | Luomh25/DataStructure | 实验13/T02-AOE/MGraph.cpp | #include <iostream>
#include "MGraph.h"
using namespace std;
extern int visited[];
template <class DataType>
MGraph<DataType>::MGraph(DataType a[], int n, int e)
{
int i, j, m;
vertexNum = n;
arcNum = e;
for ( i = 0; i < vertexNum; i++)
vertex[i] = a[i];
for ( i = 0; i < vertexNum; i++)
... | ALGO | 0.999936 | 3.726574 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-10-10T06:57: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": "a259c6b6a59... |
45e335a5-5fa0-49b8-9fe3-6c3351d1b66f | tjdgh925/studyAlgorithm | implementation/boj_1406_에디터.cpp | #include <iostream>
#include <list>
using namespace std;
list<char> arr;
string s;
char command;
int n;
int main() {
cin >> s;
for (int i = 0; i < s.size(); i++)
arr.push_back(s[i]);
cin >> n;
list<char>::iterator cursor = arr.end();
for (int i = 0; i < n; i++) {
cin >> command;
if (command =... | ALGO | 0.999678 | 4.091909 | {
"github_metadata": {
"branch": "master",
"commit_count": 247,
"repo_created_at": "2021-01-12T09:52: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": "8f9ddc6e... |
59011240-f643-417e-983a-425c3069e862 | Zu-rin/AtCoder | AtCoder_Beginner_Contest/ABC244/ABC244E.cpp | #include <iostream>
#include <vector>
#include <string>
#include <list>
#include <queue>
#include <algorithm>
#define rep(i, n) for(i = 0; i < (n); i++)
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
#define MOD 998244353
#define PI 3.14159265358979323846
#define INF 1 << 30
using namespace std;
t... | ALGO | 0.999969 | 5.18855 | {
"github_metadata": {
"branch": "master",
"commit_count": 399,
"repo_created_at": "2020-09-29T02:43: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": "a756294d... |
dbffc645-43a0-4335-a837-218099b8c005 | nberserk/codejam | cpp/codejam/closestpair.cpp | #include <stdio.h>
#include <vector>
#include <map>
#include <algorithm>
#include <math.h>
#include <limits.h>
#include <ctime>
#include <float.h>
using namespace std;
class Star{
public:
int x, y;
bool operator < (const Star& other) const{
if(x != other.x){
return (x < other.x);
}else{
return (y < other... | ALGO | 0.999947 | 4.133402 | {
"github_metadata": {
"branch": "master",
"commit_count": 681,
"repo_created_at": "2013-04-12T08:23:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "f36df626... |
34c7d4c5-a6f4-4d1c-beb2-73d14b6449e2 | adityajamwal02/LeetcodeProblemSet1 | ShortestPathInBinaryMatrix.cpp | /*
Given an n x n binary matrix grid, return the length of the shortest clear path in the matrix. If there is no clear path, return -1.
A clear path in a binary matrix is a path from the top-left cell (i.e., (0, 0)) to the bottom-right cell (i.e., (n - 1, n - 1)) such that:
All the visited cells of the path are 0.
All ... | ALGO | 0.999995 | 5.969752 | {
"github_metadata": {
"branch": "main",
"commit_count": 583,
"repo_created_at": "2022-07-01T03:50:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "13fb159eef... |
9c0394d1-cf84-41d9-a0d7-3f11bcf22945 | tfischle-idmod/Cpp_matrix_memory | matrix_memory/AoS_vs_SoA/AoS_vs_SoA.cpp | // AoS_vs_SoA.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <vector>
#include <cstdlib>
#include <iomanip>
#include <chrono>
#define N 10000
#define TIME_LOOP 5000L
static int32_t _age[N];
static int32_t next_id = 0;
class SoA {
public:
S... | ALGO | 0.953109 | 4.762187 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2021-04-06T18:28:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b9d887b789... |
dbf853ea-beec-4cd6-a7d1-7e74bfd7128e | viren-sureja/Love-Babbar-450 | 04_searching_and_sorting/32_double_helix.cpp | /*
link: https://www.spoj.com/problems/ANARC05B/
video: https://youtu.be/w-6YHcGmSxM
*/
// ----------------------------------------------------------------------------------------------------------------------- //
#include<bits/stdc++.h>
using namespace std;
void io() {
#ifndef ONLINE_JUDGE
freopen("io/... | ALGO | 0.999949 | 3.448666 | {
"github_metadata": {
"branch": "master",
"commit_count": 49,
"repo_created_at": "2021-03-21T14:17:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 356,
"forks": 169,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "e37d8... |
fcd1b58d-df48-4a94-b44d-e31f37cc0916 | ArbindKrPrasad/GeeksForGeeks_DSA | LinkedList/DoublyLinkedList.cpp | #include<iostream>
using namespace std;
struct Node
{
int data;
Node* next;
Node* prev;
Node(int x){
data=x;
next = NULL;
prev = NULL;
}
};
Node* insertAtBeginning(Node* head, int x){
Node* temp = new Node(x);
temp->next = head;
if(head!=NULL){
head->prev... | ALGO | 0.999684 | 4.099333 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-02-27T17:10: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": "8943ba620159... |
38666698-c140-4c92-b9ac-c7be83a5bbd2 | flarish1138/Competitive-Programing | codeforces/practice/A_Word.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin >> s;
int n = s.length();
int countUpper = 0;
int countLower = 0;
for (int i = 0; i < n; i++)
{
if (s[i] >= 65 && s[i] <= 90)
countUpper++;
else if (s[i] >= 97 && s[i] <= 122)
co... | ALGO | 0.999949 | 4.722348 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2022-04-19T05:32:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "112b32c2bb... |
f57f1cda-5844-44c5-bd92-9996781537ef | syedalamin/Basic_Data_Structures | Module_9/insert_at_tail.cpp | #include <bits/stdc++.h>
using namespace std;
class Node
{
public:
int val;
Node *next;
Node *prev;
Node(int val)
{
this->val = val;
this->next = NULL;
this->prev = NULL;
}
};
void insert_at_tail(Node *&head, Node *&tail, int val)
{
Node *newNode = new Node(val);
if (head == NULL)
{
... | ALGO | 0.999739 | 4.355188 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2025-06-15T16:16: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": "e6390102f5a... |
215db32e-6888-4f79-98e2-f451cc26e62e | nunezraul/flightsimulator6 | gsim/gs_vec2.cpp | /*=======================================================================
Copyright 2010 <NAME>. All Rights Reserved.
This software is distributed for noncommercial use only, without
any warranties, and provided that all copies contain the full copyright
notice licence.txt located at the base folder of the ... | TOOL | 0.97018 | 6.155818 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2015-12-02T02:52:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f64e846e4... |
aee12170-cf77-4681-96e6-e9e1ea0e0ce2 | 17336/hot100_2 | 85dp.h | //
// Created by 17336 on 2023/4/10.
//
#ifndef HOT100_2_85DP_H
#define HOT100_2_85DP_H
#include <vector>
using namespace std;
//leetcode submit region begin(Prohibit modification and deletion)
class Solution {
public:
int maximalRectangle(vector<vector<char>> &matrix) {
int m = matrix.size(), n = matri... | ALGO | 0.999734 | 6.278975 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-03-15T08:02:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d78cbe3bf706... |
4fcaa831-dc0a-4af8-9b29-011acff3f0f3 | markfastner/CECS-282-Advanced-C- | week 13 lab 1/main.cpp | //<NAME>, <NAME>, <NAME>, <NAME>
//Class(CECS 282-06)
//Due Date 04/13/2021
//Demo at 8:01pm
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric> //for accumulator operations
using namespace std;
int main()
{
// an array of doubles
double arr[] = { 1.1, 2.2, 3.3, 2.2, 4.4 };
// Determine the... | ALGO | 0.998355 | 4.640777 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-03-08T01:56: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": "b14c384351a7... |
da204797-44f3-488e-88b8-bd1b8b077690 | taeyun1010/tfheExtension | test-addition-boot.cpp | #include <stdio.h>
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <cmath>
#include <sys/time.h>
#include <tfhe/tfhe.h>
#include <tfhe/polynomials.h>
#include <tfhe/lwesamples.h>
#include <tfhe/lwekey.h>
#include <tfhe/lweparams.h>
#include <tfhe/tlwe.h>
#include <tfhe/tgsw.h>
using namespace std;
... | ALGO | 0.994015 | 3.666011 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2018-07-26T13:13:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "e51c99bd4... |
c6ed54a0-94dd-45b4-aabe-ec9fe5664b94 | manongEric/C- | alorithm/all_toposort.cpp | /*************************************************************************
> File Name: all_toposort.cpp
> Author:
> Mail:
> Created Time: Sat 22 Jan 2022 03:25:51 PM CST
************************************************************************/
#include<iostream>
#include<vector>
using namespace std;
int n, m,... | ALGO | 0.999998 | 4.484598 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2022-08-27T12:45: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": "7489418e6b8... |
877c2e1f-c5f2-4544-abe5-6733a24212f8 | aj-1729/codeash | C_Traffic_Light.cpp | // jha
// 10-04-2025
#include<bits/stdc++.h>
#define int long long
#define pb emplace_back
#define f(n) for(int i = 0 ; i < n ; i++)
#define f1(n) for(int i = 1 ; i <=n ; i++)
#define all(a) (a).begin(), (a).end()
using namespace std;
#define debug(...) 42
int32_t main(){
ios::sync_with_stdio(false);
cin.tie(N... | ALGO | 0.999579 | 3.553025 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-05-18T14:30: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": "b3c4c8155a9a... |
b5eaf7c9-3ec2-4071-ae0f-2f66308f5da7 | MNGJ/BOJ-Solution | 최단 경로/1956 운동.cpp | #include <iostream>
#include <algorithm>
using namespace std;
const int INF = 1e9;
int V, E;
int uv[401][401];
int result = INF;
void Input()
{
for (int i = 0; i < 401; i++)
for (int j = 0; j < 401; j++)
uv[i][j] = INF;
cin >> V >> E;
int a, b, c;
for (int i = 0; i < E; i++)
{
cin >> a >> b >> c;
uv[a]... | ALGO | 0.999796 | 3.948288 | {
"github_metadata": {
"branch": "master",
"commit_count": 112,
"repo_created_at": "2023-12-04T10:04: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": "79ae57fc... |
d9336e82-eb06-489f-ac5d-b5651e0ca122 | rsln-s/aggregative-coarsening-for-multilevel-hypergraph-partitioning | packages/rythmos/src/Rythmos_CubicSplineInterpolator_def.hpp | //@HEADER
// ***********************************************************************
//
// Rythmos Package
// Copyright (2006) Sandia Corporation
//
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
// license for use of this work by or on behalf of the U.S... | ALGO | 0.969284 | 7.735692 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-04-04T20:05:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b7420fecd3... |
87807769-42a2-48e4-908a-0514823fe71c | TenF1ngers/cpp_programming | Graph_algorithms/floyd_warshall.cpp | // Полный ориентированный взвешенный граф задан матрицей смежности. Постройте матрицу
// кратчайших путей между его вершинами. Гарантируется, что в графе нет циклов отрицательного
// веса.
// В первой строке вводится единственное число N (1 ≤ N ≤ 100) — количество вершин графа. В
// следующих N строках по N чисел зада... | ALGO | 0.999925 | 5.311551 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2022-11-14T07:24: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": "6acd756c38a... |
159e345c-0cbe-4d60-99cb-f4c0dca219f9 | thegolboo/Parallel-Programming-Course | CA4/p1-openmp.cpp | #include <chrono>
#include <iostream>
#include <omp.h>
using namespace std::chrono;
using namespace std;
int m, n, k;
int solutions = 0;
void makeBoard(char** board) {
#pragma omp parallel for collapse(2) schedule(static)
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
board[i][j]... | ALGO | 0.999794 | 5.025922 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-03-25T12:58: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": "971b19067e8c... |
1749395c-951f-4e15-abbf-660470855774 | SD2435324/SD2435324 | Hmwk/Assignments2/Gaddis_8thEd_Chap3_Prob5/main.cpp | /*
* File: main.cpp
* Author: <NAME>
* Created on June 29, 2016, 7:23 PM
* Purpose: calculate the percentage of males and females
*/
//System Libraries
#include <iostream>//Input/Output Library
#include <iomanip>
using namespace std;//Namespace of the System Libraries
//User Libraries
//Global Constants
//... | ALGO | 0.988002 | 3.956806 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2016-06-23T00:45: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": "a60731194... |
7c6c2b7c-e653-4ec7-aa02-e02ae275e20d | mukuldeep/cs | cp/CodeChef/cdcf_MAXTOPO2.cpp | //
// Created by me on 8-3-2021.
//
#include <bits/stdc++.h>
#define ll long long
#define t9p7 1000000007
using namespace std;
ll fac[500005]={0};
void precalc(){
fac[0]=1;
for(ll i=1;i<500002;i++){
fac[i]=(fac[i-1]*i)%t9p7;
}
}
ll calc_child_val(vector<ll> &child_val,vector<vector<ll>> &child,ll no... | ALGO | 0.999964 | 4.700998 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2021-05-31T12:51: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": "93fed918464... |
2d3716c6-92f2-42a6-acf0-f79d03262f2c | 202030481266/CP-Templates-and-Solutions | 学习计划/板刷中等题目/最大化数组末位元素的最少操作次数.cpp | #include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
class Solution {
public:
int minOperations(vector<int>& a, vector<int>& b) {
int n = a.size();
//两种情况
// no swap the n - 1
int ans = inf;
auto cal = [&]() -> int {
int cur = 0, flag = 1;
... | ALGO | 0.999998 | 4.476858 | {
"github_metadata": {
"branch": "main",
"commit_count": 606,
"repo_created_at": "2023-01-27T08:36:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "db094b243d... |
c4903e52-90d3-465d-b85f-157a80b2291f | rayz1065/competitive-programming | usaco/disruption/main.cpp | #include <bits/stdc++.h>
#define MAXN 50005
using namespace std;
using SolutionT = set<pair<int, int>> *;
int n;
vector<pair<int, int>> graph[MAXN]; // id, target
vector<pair<int, int>> extra_edges[MAXN]; // weight, id
int solutions[MAXN];
bool sort_by_size(SolutionT &a, SolutionT &b) { return a->size() < ... | ALGO | 0.999995 | 4.249294 | {
"github_metadata": {
"branch": "main",
"commit_count": 137,
"repo_created_at": "2022-09-27T13:27: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": "4004fe9958... |
b2021f2d-b6d5-43c4-adfc-eee259831034 | TFelbor/aStar-robotics-java-cpp | Robot_Movement.cpp | // Author: <NAME>
// CPSC271 : Robotics
// Project 3 - Robot & Maze
// Define motor control pins
const int ENA = 6; // PWM pin for Motor 1 speed control
const int IN1 = 4; // Direction pin 1 for Motor 1
const int IN2 = 5; // Direction pin 2 for Motor 1
const int ENB = 9; // PWM pin for Motor 2 speed control
const ... | ALGO | 0.984191 | 5.183461 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-05-09T06:49: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": "0e5540c584b8... |
be29c1b7-390a-4e65-9a1e-de8ae2d755f0 | PoisWu/coding | lc/3041. Maximize Consecutive Elements in an Array After Modification/solution.cpp | #include <algorithm>
#include <array>
#include <bitset>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullpt... | ALGO | 0.999991 | 5.335503 | {
"github_metadata": {
"branch": "main",
"commit_count": 230,
"repo_created_at": "2021-06-04T20:44: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": "0dafe3d8a0... |
655a5bee-dd1c-492f-8802-c4edd16c53e2 | studouglas/GEANT4-GPU | geant4.10.02/source/processes/hadronic/models/lend/include/nf_Legendre.h | /*
# <<BEGIN-copyright>>
# <<END-copyright>>
*/
#ifndef nf_Legendre_h_included
#define nf_Legendre_h_included
#include <nf_utilities.h>
#include <ptwXY.h>
#if defined __cplusplus
extern "C" {
namespace GIDI {
#endif
#define nf_Legendre_minMaxOrder 4
#define nf_Legendre_maxMaxOrder 64
#define nf_Legendre_siz... | TOOL | 0.95854 | 6.018494 | {
"github_metadata": {
"branch": "master",
"commit_count": 518,
"repo_created_at": "2015-09-13T23:36:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 40,
"forks": 18,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fef0fc... |
49d0f85d-daf0-4d49-8787-2c894ed06989 | godotengine/godot | core/math/bvh_public.inc | public:
BVHHandle item_add(T *p_userdata, bool p_active, const BOUNDS &p_aabb, int32_t p_subindex, uint32_t p_tree_id, uint32_t p_tree_collision_mask, bool p_invisible = false) {
#ifdef BVH_VERBOSE_TREE
VERBOSE_PRINT("\nitem_add BEFORE");
_debug_recursive_print_tree(p_tree_id);
VERBOSE_PRINT("\n");
#endif
BVHABB_C... | TOOL | 0.903394 | 6.587209 | {
"github_metadata": {
"branch": "master",
"commit_count": 76043,
"repo_created_at": "2014-01-04T16:05:36.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 98972,
"forks": 22820,
"issues": 5000,
"pull_requests": 3866
},
"file_meta": {
"content... |
6f2d500b-253c-450a-b8c0-e3fa6cb0af7b | PranjaliBhardwaj/Daily-DSA-Dose | February/Daynine.cpp | /*Given a set of distinct positive integers nums, return the largest subset answer such that every pair (answer[i], answer[j]) of elements in this subset satisfies:
answer[i] % answer[j] == 0, or
answer[j] % answer[i] == 0
If there are multiple solutions, return any of them.*/
#include <vector>
#include <algorithm>
... | ALGO | 0.999978 | 5.941937 | {
"github_metadata": {
"branch": "main",
"commit_count": 174,
"repo_created_at": "2024-01-01T07:20:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "92a766b8fc... |
54f1bcab-db28-4884-a423-5377500eda33 | Kulezi/oi | xxxii/etap1/spr/sprchk.cpp | // Czekerka do zadania 'Sprawiedliwy podział' z I Etapu XXXII OI.
// Autor: <NAME>
#include <bits/stdc++.h>
#define dbg(x) #x << " = " << x << " "
using namespace std;
using ll = long long;
constexpr int MAXN = 500005, INF = 2'000'000'000;
int n;
int a[MAXN], b[MAXN];
// ./sprchk []
int32_t main(int argc, char *argv[... | ALGO | 0.999827 | 3.622757 | {
"github_metadata": {
"branch": "main",
"commit_count": 110,
"repo_created_at": "2024-06-03T13:50:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f81d7b01cc... |
4cd1f791-b595-461c-a3bc-3fc5ed4b73bf | rahil-sehgal/DSA-Revision | Backtracking/nQueen.cpp | #include <iostream>
using namespace std;
bool isSafe(int board [][10],int i,int j,int n){
//You can check for the col
for (int row = 0; row < i; row++)
{
if(board[row][j]==1){
return false;
}
}
//check for left diagonal
int x=i;
int y=j;
while(x>=0 && y>... | ALGO | 0.999915 | 4.864534 | {
"github_metadata": {
"branch": "master",
"commit_count": 43,
"repo_created_at": "2020-08-31T14:15: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": "bb6a22f08... |
4b4121d6-006c-403d-ad3c-9bdfd4cab60a | Todaymorning/Leetcode | 7_binary_tree_node/2_94_binary-tree-inorder-traversal.cpp | // 二叉树的中序遍历
#include<iostream>
#include<vector>
#include<stack>
using std::vector;
using std::stack;
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, TreeNod... | ALGO | 0.999988 | 5.496405 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2024-07-24T12:50: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": "bcfd770e89... |
7c36b54e-72ce-479a-b5b1-fa5eab3dd948 | shakilaust/Spoj-Solve | RACETIME.cpp |
//BISMILLAHIRRAHMANIRRAHIM
/*
manus tar shopner soman boro
Author :: <NAME>
.............AUST_CSE27.........
prob ::
Type ::
verdict::
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <limits.h>
#include <set>
#include <algorithm>
#include <iostr... | ALGO | 0.99963 | 4.401237 | {
"github_metadata": {
"branch": "master",
"commit_count": 122,
"repo_created_at": "2015-01-26T04:32:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "49e59cdf... |
d69cca07-e434-4b05-9d90-2d5ae57e727e | google/gemmlowp | internal/pack_msa.h | // Copyright 2018 The Gemmlowp Authors. 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 ... | ALGO | 0.964844 | 7.064544 | {
"github_metadata": {
"branch": "master",
"commit_count": 678,
"repo_created_at": "2015-07-06T21:15:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1810,
"forks": 457,
"issues": 15,
"pull_requests": 3
},
"file_meta": {
"content_id": "6b5... |
33bdae04-f677-4a0c-8209-a6b719303932 | tolyas41/gamedev_task6 | main.cpp | #include "Parallelogram.h"
#include "Ellipse.h"
#include "Box.h"
#include "Ball.h"
#include <iostream>
int main() {
Parallelogram parall(0, 0, 3, 1, 0, 4);
std::cout << "parallelogram's area : ";
std::cout << parall.areaCalc() << std::endl;
std::cout << "parallelogram's perimeter : ";
std::cout << parall.perime... | TOOL | 0.971124 | 4.230486 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-08-04T12:04: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": "6205c7b6ac... |
6076c6f1-98a9-40c3-8e66-c7236dcea4ad | nipun-sanjida/Problem-solving-from-computer-programming-by-subeen | src/problem 15. number common .cpp | #include <stdio.h>
char numberCommontest(char number[]);
void Numbersorting(char common[])
{
if(common[0] > common[1])
{
char i = common[0];
common[0] = common[1];
common[1] = i;
}
printf("%s\n", common);
}
int main()
{
int i, testCase, j;
char number[6];
scanf("%d... | ALGO | 0.999851 | 3.31362 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-10-15T17:46: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": "a7e36cfc763e... |
954806f8-31b2-4695-baae-88dc2606e75e | deepak-ky/cpp-codes | cpp-codes/add_and_divide.cpp | #include<iostream>
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define varname(name) #name
#define mod 1000000007
#define wer(x) cout<<"\n"<<varname(x)<<" here : "<<x<<"\n"
#define asdf(a,n) ... | ALGO | 0.999886 | 4.047894 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-12-30T08: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": "f677e495f99a... |
072d9b9f-dbdf-45b4-90ca-52b819ace25c | greatzero728/acade.studio | codeforces/(947 D. Picking Strings)/(947 D. Picking Strings).cpp | #include <bits/stdc++.h>
using namespace std;
int nonA_S[100003], nonA_T[100003], maxA_S[100003], maxA_T[100003];
int main() {
ios::sync_with_stdio(0);
cin.tie(NULL);
string s, t;
cin >> s >> t;
for (int i = 0; i < s.size(); i++) {
nonA_S[i + 1] = nonA_S[i] + (s[i] != 'A');
m... | ALGO | 0.999928 | 4.610233 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-09-19T07:41: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": "7991673d8674... |
82037df9-0744-4a27-933d-95a67b394d64 | OmarKhaledm21/Problem-Solving_Codeforces | Codeforces-474A.cpp | #include <iostream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;
int main()
{
string arr="qwertyuiopasdfghjkl;zxcvbnm,./";
string arr_new, in;
cin >> in;
cin >> arr_new;
if (in == "R") {
for (int i = 0; i < arr_new.length()+1; i++)
... | ALGO | 0.99853 | 3.346949 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2021-07-25T17:51:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "e1868cd9175... |
cb56e4a2-dfc9-4acb-962e-997180cdc5a2 | MichalMroz21/Competitive-Programming | Leetcode/112.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.999908 | 5.753945 | {
"github_metadata": {
"branch": "main",
"commit_count": 172,
"repo_created_at": "2023-10-07T11:01: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": "547d93c366... |
d27c5a66-0438-46e7-bbd3-b6a6507bfe21 | zerdzhong/LeetCode | cpp/problems/40_Combination_Sum_II/solution.cpp | //
// Created by zhongzhendong on 2018-12-28.
//
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <vector>
using namespace std;
/*
https://leetcode.com/problems/combination-sum-ii/
*/
class Solution {
public:
vector<vector<int>> combinationSum2(vector<int>& candidates, int target) {
... | ALGO | 0.999855 | 6.643306 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2016-12-30T07:11: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": "7fffefc75... |
b7a670b1-f369-4aea-90e0-f9c0b9a320bd | gordonshumwayalf/tenzor | third_party/xla/xla/service/gpu/transforms/nest_gemm_fusion.cc | /* Copyright 2024 The OpenXLA Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | ALGO | 0.985742 | 5.628512 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-12-27T17:24:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 0,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "858d6174873... |
25d86958-303a-4239-9fec-21a7f7cb7d93 | mihirbshah/algorithms | src/shortest_path_bin_matrix.cpp | // 1091. Shortest Path in Binary Matrix
#include <iostream>
#include <vector>
#include <utility>
#include <queue>
using namespace std;
class Solution
{
public:
int shortestPathBinaryMatrix(vector<vector<int>>& grid)
{
queue<pair<int, int>> q;
vector<pair<int, int>> dir({{-1, 0}, {1, 0}, {0,... | ALGO | 0.999989 | 5.681696 | {
"github_metadata": {
"branch": "master",
"commit_count": 218,
"repo_created_at": "2017-04-20T01:18: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": "723d98cd... |
6b29520b-bf40-4692-939a-3eff9aa59834 | keywet06/code | CF/CF1555E.cpp | #include <bits/stdc++.h>
const int N = 1000005;
const int M = 2100000;
int n, m, o, ans;
int l[N], r[N], w[N], p[N];
int plu[M], min[M];
inline void plus(int u, int l, int r, int x, int y, int z) {
if (l >= x && r <= y) return plu[u] += z, min[u] += z, void(0);
int mid = l + r >> 1;
if (x <= mid) plus(u ... | ALGO | 0.999954 | 4.190429 | {
"github_metadata": {
"branch": "master",
"commit_count": 702,
"repo_created_at": "2019-04-21T10:13:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "922c715f... |
1d9d8159-f0e9-495e-ad6b-ab1bb1fd0645 | mukesh148/InterviewBit_Codes | Backtracking/Palindrome Partitioning.cpp | bool ispalindrome(string &temp, int low, int high){
if( temp.length()==0) return false;
// int low = 0;
// int high = temp.length()-1;
while( low<high ){
if(temp[low]==temp[high]){
low++;
high--;
}
else return false;
}
return true;
}
void cre... | ALGO | 0.999962 | 5.702673 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2018-08-07T18:54: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": "503766da18... |
ecaf0916-ea21-4b69-8b0a-2979fabe00d4 | pranjal-rai/codeforces | 273/p3.cpp | //pranjalr34
#include<bits/stdc++.h>
using namespace std;
long long int gcd(long long int m, long long int n){if(n == 0) return m;return gcd(n, m % n);}
long long int fastpow(long long int a, long long int b,long long int m){long long int r = 1;while (b > 0){if (b % 2 == 1)r = (r * a) % m;b = b >> 1;a = (a * a) % m;}... | ALGO | 0.999969 | 4.306551 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2016-02-26T19:13: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": "d732d7c16d... |
6ce67975-b027-499f-b8bb-3ab704ce9c1b | Tanuj-A06/DSA-Grind | codeforces/A. Ehab Fails to Be Thanos.cpp | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main(){
int n,sum1=0,sum2=0;
cin>>n;
int a[2*n];
for(int i=0;i<2*n;i++){
cin>>a[i];
}
sort(a,a+2*n);
for(int i=0;i<2*n;i++){
if(i<n) sum1+=a[i];
else sum2+=a[i];
}
if(sum1!=sum2){
f... | ALGO | 0.99996 | 3.290727 | {
"github_metadata": {
"branch": "main",
"commit_count": 41,
"repo_created_at": "2024-12-15T10:44: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": "7d9579ac9aa... |
c659faba-3c51-4ff2-94ad-8c1ad241c726 | SajeebRay/Competitive-Programmming | CodeForces Problem Solution/C_Min-Max_Array_Transformation.cpp | /***********JoyGuru************
* *
* Author: <NAME> *
* User id: s_aj *
* *
******************************/
#include <bits/stdc++.h>
/************** ordered_set headers **************/
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext... | ALGO | 0.999982 | 4.432198 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2023-11-13T06: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": "89d127e807a... |
58d50a82-1a2a-4b22-961e-67a900de289d | CraigBarryDev/RTRFinalAssignment | main.cpp | #include "main.h"
#include <vector>
#include <unordered_map>
#include "framework/loader.h"
#include "framework/GLHeaders.h"
vector<vec3> ballVelocs;
vector<Peg> pegs;
vector<Particles> particleSystems;
#define N_PEGS 100
void setupLevel() {
//Print the controls for the user
printControls();
//Iterate th... | TOOL | 0.971491 | 4.27815 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2017-10-02T20:41: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": "be5f62e5b... |
6b374b1e-aaea-4ff8-b237-5903f53dcee7 | ankamsriman/AZ-solutions | STL/14. Second Smallest Integer AZ101.cpp | //<NAME>
#include <bits/stdc++.h>
using namespace std;
#define IOS ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define fi(i, a, b) for (long long int i = a; i < b; i++)
#define fd(i, a, b) for (long long int i = a; i >= b; i--)
#define vl(a, n) vector<ll> a(n)
#define scarr(a) for (long long int i = 0... | ALGO | 0.999046 | 3.639795 | {
"github_metadata": {
"branch": "main",
"commit_count": 173,
"repo_created_at": "2023-06-06T22:01: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": "5218345d87... |
14b6b410-d07f-457f-ba56-a0dd3038ce6d | t-kolev/OSC-nRT-RIC | ric-plt-sdl/src/configurationreader.cpp | /*
Copyright (c) 2018-2022 Nokia.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in... | TOOL | 0.95454 | 7.18966 | {
"github_metadata": {
"branch": "main",
"commit_count": 146,
"repo_created_at": "2024-03-31T12:19:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6ceca87e70... |
9259b943-9938-4ad4-9899-b809e45e2751 | Cube219/PS | BOJ/2000~3000/2051 - 최소 버텍스 커버.cpp | #define _CRT_SECURE_NO_WARNINGS 1
#define _CRT_DECLARE_NONSTDC_NAMES 0 // for using y1 as variable name
#include <iostream>
#include <cstdio>
#include <utility>
#include <algorithm>
#include <map>
#include <numeric>
#include <vector>
#include <chrono>
#include <functional>
#include <queue>
#include <random>
using name... | ALGO | 0.999967 | 3.513887 | {
"github_metadata": {
"branch": "main",
"commit_count": 1172,
"repo_created_at": "2021-01-20T03:42: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": "2219e2234... |
352ee79e-cc51-4160-a0c3-1dcbe0f293d1 | WebPlatformForEmbedded/WPEWebKit | Source/WTF/wtf/dragonbox/dragonbox.h | /*
* Copyright (C) 2023 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of condition... | ALGO | 0.9999 | 5.51236 | {
"github_metadata": {
"branch": "wpe-2.46",
"commit_count": 283204,
"repo_created_at": "2014-12-18T18:08:02.000Z",
"is_fork": true,
"is_org_owned": true,
"forked_from": "WebKit/WebKit-http",
"stars": 227,
"forks": 150,
"issues": 20,
"pull_requests": 9
},
"file_meta": {
... |
7cf0f441-28a9-415b-9731-dd31a5f61fa2 | ADDY69O/LeetCode | 0109-convert-sorted-list-to-binary-search-tree/0109-convert-sorted-list-to-binary-search-tree.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
/**
* Definition for a binary tree node.
* struc... | ALGO | 0.999998 | 5.951105 | {
"github_metadata": {
"branch": "main",
"commit_count": 646,
"repo_created_at": "2022-10-15T17:49:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c58fe2b764... |
2eb866c2-432f-4ae9-8d23-d2c53acef733 | Debarshi11/Patters_Striver | Patterns.cpp | #include<bits/stdc++.h>
using namespace std;
void print1(int n){
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
cout<< "* ";
}
cout<< endl;
}
}
void print2(int n){
for(int i=0;i<n;i++){
for(int j=0;j<=i;j++){
cout<< "* ";
}
cout<< endl;
... | ALGO | 0.999945 | 3.279393 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-02-20T06:20: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": "eab6d4430302... |
00cc9812-fd0d-4a99-98e4-d0dde1bd2ede | J-Pinos3/EJERCICIOS_CPP | CAPITULO 7 arraysvectores/arreglos_archi.cpp | #include <iostream>
#include <fstream>
#include <cstdlib>
#include <array>
using namespace std;
const int DIAS = 7;
int buscarVENTA( array <double,DIAS> ventas);
int main(){
array <double, DIAS> ventas;
int indice = 0;
ifstream archivo;
archivo.open("VENTAS.txt",ios::in);
if(archivo.is_open())... | ALGO | 0.949117 | 3.421085 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2023-04-05T22:22:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "50778a529... |
175d3f3b-a6fc-401d-a3f7-4a628395fa56 | sharonbasovich/CCC | ccc22/22s3.cpp | #include <bits/stdc++.h>
using namespace std;
// N is length of notes
// M is highest pitch they can play (pos int)
// K is number of good pieces
// case 1: 2 or 1
// 1 2 1 2 2 2
// flipping outside decreases by one
// flipping inside decreases by two
// four in a row decreases by three
/*
M = N
m and n ar... | ALGO | 0.999975 | 4.064823 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2024-07-30T19:58: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": "c99bf43d959... |
5f9c38cd-28d4-478a-9d70-d0948016cb08 | ThomasKidane/Competitive_Programming | Codeforce_Problems/1184E.cpp | #include<bits/stdc++.h>
using ll = long long;
using ld = long double;
using namespace std;
#define endl "\n";
#define ff first
#define ss second
#define forn(i,n) for(int i=0;i<n;i++)
#define dbgv(v) cout<<#v<<" "<<v<<endl
#define dbga(a,n) forn(i,n-1) {cout<<a[i]<<' ';} cout<<a[n-1]<<'\n';
int findp(int x,vector<in... | ALGO | 0.999939 | 4.203377 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2024-06-19T16:43: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": "fc4fe644b... |
8a673f75-3b34-466b-b910-14497b8cb560 | Praveenkumar07007/Leetcode | 0213-house-robber-ii/0213-house-robber-ii.cpp | class Solution {
public:
int solve(vector<int>& dp, vector<int>& nums, int i, int n) {
if (i > n) return 0;
if (dp[i] != -1) return dp[i];
int steal = nums[i] + solve(dp, nums, i + 2, n);
int skip = solve(dp, nums, i + 1, n);
return dp[i] = max(steal, skip);... | ALGO | 0.999991 | 5.370279 | {
"github_metadata": {
"branch": "main",
"commit_count": 760,
"repo_created_at": "2025-01-16T05:59: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": "5db7360e6a... |
e1ff3b05-ddc0-4dbd-8457-de8914d96d39 | daniil-ushkov/algo-course | 07-lab-segment/07-lab-O.cpp | #include <iostream>
#include <vector>
using namespace std;
template<typename T>
struct segment_tree {
segment_tree(vector<T> &vec, T (*bin_op)(T, T))
: data_(4 * vec.size()),
add_(4 * vec.size()),
size_(vec.size()) {
op = bin_op;
build_(vec, ROOT_);
}
segment_tree(size_t size, T (... | ALGO | 0.999975 | 4.911234 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2020-06-26T16:04: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": "05cf4dcc78... |
30179a93-d6f3-44d9-b0cc-ff73db6602ab | sirikata/sirikata | libcore/plugins/weightsqr/SqrIntegral.cpp | /* Sirikata
* SqrIntegral.cpp
*
* Copyright (c) 2010, <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
* * Redistributions of source code must retain the above copyright
... | ALGO | 0.99701 | 5.195438 | {
"github_metadata": {
"branch": "master",
"commit_count": 7069,
"repo_created_at": "2009-01-18T08:03:37.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 125,
"forks": 39,
"issues": 39,
"pull_requests": 0
},
"file_meta": {
"content_id": "4dcb... |
38aa42fd-1397-402d-a45d-b4d971d6defc | abmmusa/visualloc | visualloc/localizer/src/flann_matcher_reduced_allmatch.cc | /******************************************************************************************************************
Copyright © 2015-2017, <NAME>, University of Illinois at Chicago. All rights reserved.
Developed by:
<NAME>
BITS Networked Systems Laboratory
University of Illinois at Chicago
http://www.cs.uic.edu/Bits
P... | ALGO | 0.944243 | 4.781984 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-07-27T19:00: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": "4afee85bb3... |
65ccb483-b1c2-4a47-8ae0-682c919e0328 | pgrynfelder/algorithmics | oi/oi28/1/cuk/cuk.cpp | #include <bits/stdc++.h>
#define rest(n, i) t[n][0] + t[n][1] + t[n][2] - t[n][i]
using namespace std;
constexpr int K = 3, M = 1 << K;
constexpr int N = 3e5 + 7;
constexpr long long oo = 4 * N * 1e9;
long long dp[N][M];
long long t[N][3];
bool allZero[3] = {1, 1, 1};
unordered_set<int> potential_solutions = {M - 1};
... | ALGO | 0.999989 | 5.008076 | {
"github_metadata": {
"branch": "main",
"commit_count": 346,
"repo_created_at": "2022-12-23T18:14: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": "8c25239efc... |
a2800245-b91f-42b2-a6a7-32a145175cd0 | ArfatulAsif/Competitive-programming | EULER TOURS On Tree ( All variant).cpp |
=========================================Euler Tour Array Building =======================
==========================================================================================
//Intermediary
//Young kid on the block
//AIAsif try's "Continuing the journey"
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_conta... | ALGO | 0.999874 | 4.634056 | {
"github_metadata": {
"branch": "main",
"commit_count": 187,
"repo_created_at": "2023-05-28T19:40:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 27,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "235b665be... |
ccdac808-cf06-41c8-91c8-d4fbc6975191 | uechoco/CompetitionProgramming | AtCoder/participated_race/20200725_m-solutions/D_2.cpp |
#include <bits/stdc++.h>
using namespace std;
// syntax sugar: `for (int i = 0; i < N; ++i)`
#define rep(i, N) for (int i = 0; i < (int)(N); ++i)
// syntax sugar: `for (int i = 0; i < N; ++i)`
#define REP(type, name, beginValue, endCondValue) \
for (type name = beginValue; name < endCondValue; ++name)
// syntax sug... | ALGO | 0.999793 | 4.113489 | {
"github_metadata": {
"branch": "master",
"commit_count": 70,
"repo_created_at": "2020-05-30T04:09: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": "638a2e625... |
e9c8e0c5-e66f-48d3-b23b-9d1118eaa65c | ishandutta2007/codeforces-l | liti/normal/668/D.cpp | //In the name of Allah
#include <bits/stdc++.h>
using namespace std;
const int maxN = 1000 * 1000 + 10;
int fen[maxN];
inline void add( int x , int v ) {
x++;
for( ; x < maxN ; x += x & (-x) )
fen[x] += v;
}
inline int get( int x ) {
int ret = 0;
for( ; x ; x -= x & -x )
ret += fen[x];
return ret; ... | ALGO | 0.999595 | 3.855032 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:17:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "143d69cef75a... |
0938b4e9-7cd9-4f71-9d1d-fa5463983629 | biTLegi0n/DSA-Codes-w-Explanation | DP/HARD/CoinChange_MinCoins.cpp | #include<bits/stdc++.h>
#define vi vector <int>
#define vp vector <pair <int, int> >
#define INF INT_MAX
#define MIN -99999999
#define pb push_back
#define mp make_pair
#define ll long long
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
using namespace std;
/*
Approach : Another simple application o... | ALGO | 0.999932 | 4.572537 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2022-04-30T12:48:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b787ae30c7e... |
ea56fa65-f04b-4930-86fa-564e50222dd2 | ChinnamPoojithaSuryaRajeswari/Leetcode | 1171-shortest-path-in-binary-matrix/shortest-path-in-binary-matrix.cpp | class Solution {
public:
int shortestPathBinaryMatrix(vector<vector<int>>& grid) {
vector<vector<int>>visited(grid.size(),(vector<int>(grid[0].size(),0)));
queue<pair<pair<int,int>,int>>q;
int ans=INT_MAX;
if(grid[0][0]==1) return -1;
int cnt=0;
q.push({{0,0},cnt});
... | ALGO | 0.999996 | 5.499984 | {
"github_metadata": {
"branch": "main",
"commit_count": 905,
"repo_created_at": "2024-01-09T18:15: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": "27628e5597... |
c68dd747-b838-4a68-bb9e-46514686d168 | PimVanLeeuwen/aoc_2024 | day_13/Day13.cpp | #include "Day13.h"
#include <algorithm>
#include <iostream>
#include <set>
#include <sstream>
#include"z3++.h"
using namespace std;
struct Problem {
int A_x;
int A_y;
int B_x;
int B_y;
int x;
int y;
};
void Day13::execute(const vector<string> &lines) {
long part_1 = 0, part_2 = 0;
i... | ALGO | 0.999358 | 4.711011 | {
"github_metadata": {
"branch": "master",
"commit_count": 39,
"repo_created_at": "2024-11-29T12:45: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": "e794c55cc... |
6aed1a5a-cc93-43d2-8b76-7a19b0e8d306 | KozerG17/bai-tap-doi-tuyen | 141021/qstring.cpp | /**
* author: dlbm1302
* created: 14.10.2021 07:21:39
**/
#include <bits/stdc++.h>
#ifndef LBM_LOCAL
#define debug(x...) 17
#endif
using namespace std;
int main() {
cin.tie(nullptr) -> sync_with_stdio(false);
freopen("qstring.INP", "r", stdin);
freopen("qstring.OUT", "w", stdout);
string s; cin ... | ALGO | 0.999718 | 4.460882 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2021-10-22T14:18: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": "27ea41f72c7... |
4aacdb4f-7e1e-4a57-8c43-8fc270bb8c7e | Erich8200/Karl_Gerat_U_co | art/compiler/optimizing/gvn.cc | /*
* Copyright (C) 2014 The Android Open Source Project
*
* 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 app... | ALGO | 0.978707 | 3.138941 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-02-24T13:37:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 27,
"forks": 15,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "6768b9cc30... |
92073acc-4c56-4e96-a0d8-fe9280435788 | micmacIGN/micmac | BenchElise/bench/b_0_32.cpp | /*eLiSe06/05/99
Copyright (C) 1999 <NAME>
eLiSe : Elements of a Linux Image Software Environment
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at yo... | ALGO | 0.998894 | 4.166841 | {
"github_metadata": {
"branch": "master",
"commit_count": 10879,
"repo_created_at": "2016-11-24T22:09:54.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 785,
"forks": 163,
"issues": 83,
"pull_requests": 30
},
"file_meta": {
"content_id": "1... |
f16f88cc-171d-445c-9a7c-1412a7d572a9 | Simonhancrew/SCL | Datastruct/TrieTree/最大异或对.cpp | #include <algorithm>
#include <iostream>
//首先想最暴力的解法,就是两重循环,逐个判断每对异或之后找到最大的
//优化的想法来自于这个数的二进制表示,我们用trie树存下每一个出现的数,然后从高位到低位,尽量选择每一位与他不相同的数
//理解异或最简单的方法就是把他理解成不进位加法
//这样我们就可以拿到每个数的最大异或,之后比较一下就行了
using namespace std;
const int N = 1e5 + 10, M = 31 * N;
int son[M][2], idx;
void insert(int x) {
int p = 0;
for (int i... | ALGO | 0.99999 | 4.05711 | {
"github_metadata": {
"branch": "main",
"commit_count": 738,
"repo_created_at": "2021-08-08T02:13:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e867b78785... |
b17aa25b-a2f1-482c-8d97-3fcd8418dba7 | UMP-45/C_Study | my_sort/shell/shell_sort.cpp | //-std=c++17 -static -m64 -Wall -Os
//输入的数应小于2^32
#include <iostream>
#include <vector>
#include <string>
using std::swap;
using std::vector;
template<typename T>
void shell_sort(vector<T>& arr);
int main(int argc,const char *argv[]){
using std::cout;
using std::basic_string;
vector<int> arr = {}; //or ve... | ALGO | 0.999227 | 4.494505 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2022-03-18T11:07:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "64bf255369d... |
7406a690-ae8e-4c79-920f-0766a36ff4ad | Ashish0253/csesProblemSet | graphAlgorithms/labyrinth.cpp | #include <bits/stdc++.h>
using namespace std;
int dirx[] = {1, 0, -1, 0};
int diry[] = {0, 1, 0, -1};
char dirL[] = {'R', 'D', 'L', 'U'};
bool check(int i, int j, int n, int m) {
if(i >= 0 && j >= 0 && i < n && j < m)
return 1;
return 0;
}
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", ... | ALGO | 0.999994 | 4.38831 | {
"github_metadata": {
"branch": "main",
"commit_count": 82,
"repo_created_at": "2023-07-22T19:45: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": "1731f2adf50... |
3371ada4-d32c-43b2-9405-c14c2aff552c | 19952739719/code-base | LeetCode_2529.cpp | // 力扣 2529. 正整数和负整数的最大计数 https://leetcode.cn/problems/maximum-count-of-positive-integer-and-negative-integer/
/*
目前该代码已通过测试样例。
速度上是有些慢的,先用二分查找找0,如果没有找到0,表明这个数组可以直接从mid处分,如果有0,需要向左向右查找非0的两个位置。
不过也可以尝试 双重二分查找
*/
class Solution {
public:
int maximumCount(vector<int>& nums) {
int nums_len = nums.si... | ALGO | 0.999955 | 5.301651 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2023-06-30T07:16:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9013cc193... |
499b2126-3aaa-4ea8-a681-9aaa3347e0fa | pratiksaha/practice | mathematical/modDivide.cpp | //modular division
#include<bits/stdc++.h>
using namespace std;
int gcdExtended(int a, int b, int *x, int *y) {
if (a == 0) {
*x = 0, *y = 1;
return b;
}
int x1, y1;
int gcd = gcdExtended(b%a, a, &x1, &y1);
*x = y1 - (b/a) * x1;
*y = x1;
return gcd;
}
int modInverse(int b, ... | ALGO | 0.999915 | 3.720909 | {
"github_metadata": {
"branch": "master",
"commit_count": 371,
"repo_created_at": "2014-10-03T04:22: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": "d1b07b26... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.