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 |
|---|---|---|---|---|---|---|---|
089ac2c9-ce8f-45b6-8e45-0f3d8e57d739 | ishandutta2007/codeforces-a | artyom123/normal/1236/A.cpp | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define int long long
#define fi first
#define se second
#define all(x) x.begin(), x.end()
signed main() {
#ifdef LOCAL
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#else
ios_base::sync_with_stdio(0);
cin.tie(0);
co... | ALGO | 0.999904 | 4.324748 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fe3a8991ce94... |
3ce4b2d9-5c27-427d-81d6-17ed82ae1b19 | pronad1/Problem_Solving_Part2 | turtle_good.cpp | #include <bits/stdc++.h>
using namespace std;
void solve() {
long long n;
cin >> n;
string s;
cin >> s;
// Frequency map of characters
vector<int> freq(26, 0);
for (char c : s) {
freq[c - 'a']++;
}
// Create a vector of pairs (character, frequency) and sort it by frequency... | ALGO | 0.999988 | 5.755538 | {
"github_metadata": {
"branch": "main",
"commit_count": 186,
"repo_created_at": "2024-08-03T03:42:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ea33a5d372... |
5de13893-279f-4c05-af5c-3cdfeb298002 | ishandutta2007/codeforces-a | alexxela12345/normal/1552/E.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ldb;
#ifndef LOCAL
#define endl '\n'
#endif
//#define int long long
#define sz(v) ((int)(v).size())
#define all(x) (x).begin(),(x).end()
vector<int> tree;
vector<int> mod;
void push(int v, int l, int r) {
tree[v] += mod[v];
... | ALGO | 0.999957 | 3.609374 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "94383fa4c7d6... |
d2039221-79cf-4470-8a9c-676da9bf1c29 | oxygen-hunter/Flashboom | data/big-vul-100/add_attention_code/CodeLlama/top0-100/the-most-similar-path-in-a-graph-Solution.mostSimilar/177741_DoS_Overflow.cpp | gnutls_session_get_data (gnutls_session_t session,
void *session_data, size_t * session_data_size)
{
gnutls_datum_t psession;
int ret;
if (session->internals.resumable == RESUME_FALSE)
return GNUTLS_E_INVALID_SESSION;
psession.data = session_data;
ret = _gnutls_session_pack (s... | ALGO | 0.998409 | 4.126428 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-03-22T14:39:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1a67695b1609... |
f1f1395c-7722-46ed-9443-aaf9e9c3cb92 | sahilpate-221s/Leetcode_solutions | 1753-path-with-minimum-effort/path-with-minimum-effort.cpp | class Solution {
public:
typedef pair<int, pair<int,int>>P;
vector<vector<int>> dirs = {{-1,0},{1,0},{0,-1},{0,1}};
int minimumEffortPath(vector<vector<int>>& heights) {
int m = heights.size();
int n = heights[0].size();
auto isSafe = [&](int x,int y)
{
... | ALGO | 0.999986 | 5.650906 | {
"github_metadata": {
"branch": "main",
"commit_count": 727,
"repo_created_at": "2024-06-30T13:29: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": "d1c23080b6... |
801484f9-474e-4fb2-8e1f-cf35cc722dc3 | alvisgage/Conc-Projects | mst/MST.cpp | #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <mpi.h>
using namespace std;
typedef struct {
int v1;
int v2;
int weight;
} Edge;
struct list_edge {
Edge edge;
struct list_edge * next;
};
list_edge * curr, *head, *mstTree;
int number_edges = 6;
int number_ve... | ALGO | 0.999749 | 3.793484 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-05-14T16:38: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": "6a94a7c602... |
893f9567-bdc0-41ab-ba36-c2810ac980ba | amantibrewal310/Data-Structure-and-Algorithms | Arrays/array_quadruplet.cpp | #include<bits/stdc++.h>
using namespace std;
vector<int> findArrayQuadruplet(const vector<int> &arr, int s)
{
// your code goes here
int n = arr.size();
int mn1 = INT_MAX;
int mn2 = INT_MAX;
int mn3 = INT_MAX;
vector<int> ans;
for(int i = 0; i < n; i++) {
for(int j = 0; j < n; j++) {
for(int k... | ALGO | 0.999953 | 3.458936 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2020-04-12T17:59: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": "4f9935972... |
15439ef8-5b15-4f40-b9e8-550ffb0dfee2 | RyoSci/AtCoder | ARC/ARC132/b.cpp | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
#define INF (1 << 29)
#define EPS (1e-10)
typedef long long Int;
typedef pair<Int... | ALGO | 0.999992 | 3.603845 | {
"github_metadata": {
"branch": "master",
"commit_count": 1005,
"repo_created_at": "2020-06-25T03:31: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": "060686c... |
87c82d90-5af1-4640-89a4-1cdfbab31c6a | jose-joaquim/Competitive-Programming | URI/URI 2223 - Inventário de Pomekon.cpp | //Author/Autor: <NAME>
//Link da questão: https://www.urionlinejudge.com.br/judge/pt/problems/view/2223
#include <cstdio>
#include <iostream>
#include <vector>
#include <map>
using namespace std;
const int MAXN = 100006;
struct node{
int val;
node *left, *right;
node(){}
node(node *l, node *r, int v){
... | ALGO | 0.999822 | 4.385569 | {
"github_metadata": {
"branch": "master",
"commit_count": 92,
"repo_created_at": "2016-06-26T20:33:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4ba574fc3... |
ed6d9a96-82e0-4c6c-8fc4-b936b1619075 | Dibran/karta | loolwsd/Util.cpp | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain o... | TOOL | 0.903271 | 5.134418 | {
"github_metadata": {
"branch": "master",
"commit_count": 3915,
"repo_created_at": "2016-10-20T15:58:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "70f32eb... |
c4ee8bc4-e3b8-4ed5-95dc-c77367834ab2 | abinashkg/Algorithm | Matrix-Expo(Update ).cpp | /**************************************************
_|||||_ -||||||||_ -||| |||- _|
_|| ||_ ||| || ||| ||| |||
||| ||| ||| || ||| ||| |||
||| ||| |||___||- |||____||| |||
|||||||||| |||---||_ |||----||| |||
||| ||| ||| || ... | ALGO | 0.999864 | 4.064878 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2016-11-06T19:53:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8c5911b6f4... |
0c4c84ec-7628-47fd-9706-f5d38c9da799 | Dasti-dev/DSA_codes | 4. Remove duplicates in place from, sorted array.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <set>
using namespace std;
int main() {
vector<int> v = {3, 3, 5, 7, 9, 9, 11, 13, 13, 17, 17, 19, 22, 22, 14, 9, 4};
sort(v.begin(),v.end());
for(int i = 0 ; i < v.size() ; i++)
{
cout << v[i] << " ";
}
cout << ... | ALGO | 0.999948 | 4.138793 | {
"github_metadata": {
"branch": "main",
"commit_count": 47,
"repo_created_at": "2023-05-26T00:36: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": "e009e476559... |
9a464747-7242-4ae4-9f44-5afe45a27357 | delucaal/MRIToolkit | ExploreDTIInterface/Auxiliaries/MEX/VChooseKO.inc | // VChooseKO.inc
// VChooseKO.INC - Helper function for VChooseKO.c
// Choose K elements without repetitions and with order.
// Instantiated macros:
// FUNC_NAME: Name containg size of elements, e.g. Elem2_Byte2
// DATA_TYPE: Type of the elements
//
// Author: <NAME>, Heidelberg, (C) 2010 matlab.THISYEAR(a)nMINUSsi... | ALGO | 0.986897 | 3.919593 | {
"github_metadata": {
"branch": "master",
"commit_count": 126,
"repo_created_at": "2018-12-07T12:11:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 28,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "99f72a4... |
bc7af4fe-c3ef-49eb-a279-34969016f52f | wohlbier/6.1_llt | algebra.hh | #ifndef ALGEBRA_HH
#define ALGEBRA_HH
#include "types.hh"
static inline
bool index_exists(pRow_t r, Index_t icol)
{
bool result = false;
Row_t::iterator rit = r->begin();
while (rit != r->end())
{
if (icol == std::get<0>(*rit))
{
result = true;
break;
}
... | ALGO | 0.994894 | 6.162932 | {
"github_metadata": {
"branch": "master",
"commit_count": 55,
"repo_created_at": "2019-05-22T19:06:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "cdda8c093... |
e3a20db7-faac-4e67-8698-4976eee413d0 | Foreverhighness/Design-Pattern-Cpp | Modern/6.Adapter/CacheAdapter.cpp | #include <iostream>
#include <memory>
#include <unordered_map>
#include <vector>
using namespace std;
#include <boost/functional/hash.hpp>
// There is the external libary which you can't modify.
// ----------------------------------------------------------------
struct Point {
int x, y;
bool operator<(const P... | TOOL | 0.986356 | 5.435459 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2020-10-20T09:54:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fab2c84ac28... |
c50f98c5-82c7-4073-a8d3-0a0277379acd | ppwwyyxx/speaker-recognition | src/gmm/test/src/kmeans.cc | /*
* $File: kmeans.cc
* $Date: Sun Dec 15 20:22:37 2013 +0800
* $Author: <NAME> <zxytim[at]gmail[dot]com>
*/
#include "kmeans.hh"
#include "Threadpool/Threadpool.hpp"
#include <cassert>
#include <algorithm>
#include <functional>
#include <thread>
#include <mutex>
#include <queue>
using ThreadLib::Threadpool;
us... | ALGO | 0.999381 | 5.983295 | {
"github_metadata": {
"branch": "master",
"commit_count": 303,
"repo_created_at": "2014-01-03T14:20:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 677,
"forks": 272,
"issues": 18,
"pull_requests": 0
},
"file_meta": {
"content_id": "ac4... |
e239a6c2-3c22-4669-a1ef-005886c76470 | mayataka/robotoc | include/robotoc/constraints/impact_friction_cone.hpp | #ifndef ROBOTOC_IMPACT_FRICTION_CONE_HPP_
#define ROBOTOC_IMPACT_FRICTION_CONE_HPP_
#include "Eigen/Core"
#include "robotoc/robot/robot.hpp"
#include "robotoc/robot/impact_status.hpp"
#include "robotoc/core/split_solution.hpp"
#include "robotoc/core/split_direction.hpp"
#include "robotoc/core/split_kkt_residual.hpp"
... | ALGO | 0.98304 | 7.081476 | {
"github_metadata": {
"branch": "master",
"commit_count": 1154,
"repo_created_at": "2020-05-28T04:44:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 290,
"forks": 51,
"issues": 14,
"pull_requests": 0
},
"file_meta": {
"content_id": "2da... |
08856dc0-78a8-43ee-9977-2f470d755bcc | KMsojib/LeetCode | Year-2025 Problem List/April 2025/2006. Count Number of Pairs With Absolute Difference K.cpp | # Problem : 2006. Count Number of Pairs With Absolute Difference K
# Time Complexity : O(N^2)
# C++ / Python Solution
# ==================================== Cpp ========================================
class Solution {
public:
int countKDifference(vector<int>& nums, int k) {
int result = 0;
... | ALGO | 0.999924 | 6.249403 | {
"github_metadata": {
"branch": "main",
"commit_count": 414,
"repo_created_at": "2024-06-14T14:45: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": "fcc4113e96... |
cb974543-4891-46cc-b8e1-7815d7a1e506 | Anurag-Basuri/LeetSolution | Binary_Trees/893-all-nodes-distance-k-in-binary-tree/all-nodes-distance-k-in-binary-tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
class Solution {
public:
void match_parent(TreeNode* root, unordered_map<TreeNode*, TreeNode*>& parent) {
queue<... | ALGO | 0.999994 | 6.401916 | {
"github_metadata": {
"branch": "main",
"commit_count": 1000,
"repo_created_at": "2024-08-21T03:12: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": "f9c039c5e... |
88e47027-ef2e-43be-96ce-7e6326e4b7e7 | gbuzykin/lexegen | src/node.cpp | #include "node.h"
#include <stdexcept>
std::unique_ptr<Node> Node::cloneTree() const {
auto new_node = clone();
if (left_) { new_node->left_ = left_->cloneTree(); }
if (right_) { new_node->right_ = right_->cloneTree(); }
return new_node;
}
//-----------------------------------------------------------... | ALGO | 0.973031 | 6.737398 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2021-08-06T13:27:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e45a0c819... |
09366676-dc8f-44f1-a291-c3947bfef26c | zanesense/Banking-Record-Management | main.cpp | #include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
using namespace std;
const string filename = "accounts.txt";
const string adminUser = "admin";
const string adminPass = "<PASSWORD>";
const int MAX_ACCOUNTS = 100;
struct Account {
int number;
string firstName;
string lastName;
... | TOOL | 0.934215 | 4.415576 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-06-07T21:39: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": "da39da148196... |
261376e8-b4cb-4a61-9888-90db201cefeb | markunya/hse_projects | tasks/robot/knight_topology.cpp | #include "knight_topology.h"
KnightTopology::KnightTopology(std::vector<std::vector<bool>> map) : Topology(map) {
}
std::vector<Point> KnightTopology::GetNeighbours(const Point& point) const {
std::vector<Point> neighbours;
Point neighbour;
neighbour.y = point.y + 1;
neighbour.x = point.x - 2;
if ... | ALGO | 0.964913 | 3.840335 | {
"github_metadata": {
"branch": "main",
"commit_count": 259,
"repo_created_at": "2023-04-03T16:27: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": "4f210e821b... |
0fe228d3-7ce4-47a1-b713-06572166b130 | acrlakshman/crystal_growth_level_set_method | source/HermiteInterpolation.cpp | //#####################################################################
// Copyright 2012, <NAME>.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
#include "He... | ALGO | 0.99912 | 6.545571 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2014-01-04T01:20:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a4272efa15... |
b4bb362d-e3ea-46d8-b43d-33ae969de275 | Tora416/MultiCodeEmbed | dataset/dataset_raw/gcj_cpp/Loud.Scream/8294486_5681755159789568_Loud.Scream.cpp | #include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const double INF = 1e15;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int t;
cin >> t;
cout << fixed << setprecision(7);
for (int qq = 1; qq <= t; ++qq) {
cout << "Case #" << qq << ": ";
int n, q;
cin >> n >> q;
... | ALGO | 0.999656 | 3.9795 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2025-07-10T08:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "557ccdd92... |
3c224914-ff5d-4913-aa7d-c41175c383aa | STRIDES-Codes/MicrobeTaxaSARS2 | src/metaspades/src/projects/corrector/positional_read.hpp | //***************************************************************************
//* Copyright (c) 2015 Saint Petersburg State University
//* Copyright (c) 2011-2014 Saint Petersburg Academic University
//* All Rights Reserved
//* See file LICENSE for details.
//************************************************************... | ALGO | 0.95777 | 5.129035 | {
"github_metadata": {
"branch": "main",
"commit_count": 56,
"repo_created_at": "2021-05-28T16:52:17.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "782fe146ad0e... |
55a0602c-9e89-4d90-afbf-631d31cae0cf | a-s-tarantoga/DelDec | subspan.h | /*
* (c) 30.07.2014 <NAME>
*
* This file is part of DelDec.
*
* DelDec 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 option) any later version... | ALGO | 0.980541 | 5.887891 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2014-07-31T09:29: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": "09de2c1adc... |
8c9cd003-1e1f-445f-ae65-8367ca60d4b5 | wjddlsy/Algorithm | Baekjoon/baek_15971_두로봇/main.cpp | #include <iostream>
#include <vector>
#include <queue>
using namespace std;
#define INF 987654321
int N, first, last, ret=0;
vector<vector<pair<int,int>>> adj;
vector<bool> visited;
void dfs(int here, int dist, int max_val){
if(here==last) {
ret=dist-max_val;
return;
}
visited[here]=true;... | ALGO | 0.999415 | 3.46144 | {
"github_metadata": {
"branch": "master",
"commit_count": 71,
"repo_created_at": "2019-07-21T16:28: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": "632a4c4fc... |
bd8590c3-6852-4eb2-bd9a-fe01fb816410 | SteffenPottel/td_vrptw_instancegenerator | src/distance_matrices/Link.cpp | //---------------------------------------------------------------------------
#include "Link.h"
#include "Grid.h"
#include "PWL.h"
#include "Point.h"
#include "Tools.h"
#include <vector>
#include <algorithm>
#include <cmath>
#include <iostream>
using std::endl;
using std::cerr;
//--------------------------------------... | ALGO | 0.998648 | 4.474752 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2020-08-02T15:47:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c2ce6617ea... |
f5dbf721-d2d1-4a9a-848b-d2ec73da7745 | yes6686/Algorithm | 백준/Silver/25421. 조건에 맞는 정수의 개수/조건에 맞는 정수의 개수.cc | #include <iostream>
#define MOD 987654321
using namespace std;
long long int arr[10];
long long int carr[10];
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
if (n == 1) {
cout << 9;
return 0;
}
for (int i = 1; i <= 9; i++) {
arr[i] = 1;
}
long long int ans = 0;
for (int t =... | ALGO | 0.999936 | 3.969095 | {
"github_metadata": {
"branch": "main",
"commit_count": 1370,
"repo_created_at": "2023-12-17T09:48: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": "1a36872e0... |
41de8051-7340-4a2b-abd5-806d03419d23 | firoorg/mobileliblelantus | src/range_verifier.cpp | #include "range_verifier.h"
#include "challenge_generator_impl.h"
namespace lelantus {
RangeVerifier::RangeVerifier(
const GroupElement& g,
const GroupElement& h1,
const GroupElement& h2,
const std::vector<GroupElement>& g_vector,
const std::vector<GroupElement>& h_vector,
... | ALGO | 0.953687 | 6.60203 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2021-07-05T07:37:08.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 5,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "fc9899bcecce... |
35847051-d73d-447c-86e2-eea200dc4738 | 52North/IlwisCore | core/geos/src/noding/IntersectionAdder.cpp | /**********************************************************************
*
* GEOS - Geometry Engine Open Source
* http://geos.osgeo.org
*
* Copyright (C) 2006 Refractions Research Inc.
*
* This is free software; you can redistribute and/or modify it under
* the terms of the GNU Lesser General Licence as publishe... | ALGO | 0.997877 | 5.926796 | {
"github_metadata": {
"branch": "master",
"commit_count": 6882,
"repo_created_at": "2013-05-15T13:19:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 36,
"forks": 13,
"issues": 26,
"pull_requests": 0
},
"file_meta": {
"content_id": "51bdb... |
6da552e1-2c8e-4401-925e-2b89375d1b00 | Neox9487/Math-cpp | Equation/Equation.h | #pragma once
#include <iostream>
#include <stdio.h>
#include <math.h>
#define PI acos(-1)
using namespace std;
class Equation {
enum Type{
Circle, Line
};
public:
Equation(int a, int b, int d, int e, int f); // Circle
Equation(int a, int b, int c); // Line
void get_equa... | ALGO | 0.998525 | 3.909261 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-02-03T07:27: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": "60a0a128619b... |
8c4aa305-8789-4c23-a529-d6a138d1a19f | ayush9009/daily_coding_work | BackTracking MColoringProblem.cpp | class Solution{
public:
// Function to determine if graph can be coloured with at most M colours such
// that no two adjacent vertices of graph are coloured with same colour.
bool isSafe(int node,int color[],bool graph[101][101],int x,int n){
for(int k=0;k<n;k++){ //check for every possible adj... | ALGO | 0.999931 | 5.341272 | {
"github_metadata": {
"branch": "main",
"commit_count": 231,
"repo_created_at": "2023-01-01T20:02: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": "353c04fc1b... |
afbc309a-5e6f-41e3-b588-467e3e5a6f56 | kirixx/pets | Pets_solution/DesignPatterns/Mediator.h | #pragma once
#include <string>
#include <string_view>
#include <iostream>
#include <functional>
/*
Create a mediator and have each object in the system to refer to him
Mediator engages in a bidirectional communication with its connected components
Mediator has function the components can call
Componen... | TOOL | 0.91922 | 6.495602 | {
"github_metadata": {
"branch": "main",
"commit_count": 22,
"repo_created_at": "2021-10-23T13:43: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": "946a7c6a380... |
be0eed41-2c9b-4531-9de6-3296a7fe0572 | jordan-schneider/input-filter | c++/inner_loop.cpp | #include "multinomial.hpp"
#include "types.hpp"
#include "utils.hpp"
#include <CLI/CLI.hpp>
#include <algorithm>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
using namespace FilterModel;
int main(int argc, char *const *argv) {
// Setting up command line flags.
CLI::App app{"Inne... | ALGO | 0.960389 | 5.919276 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-11-12T21:58: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": "7d8f3ef8c9... |
dded783f-aa9c-4ddd-a6b6-33db4e9fd536 | prudentboy/leetcode | Solutions/757.set-intersection-size-at-least-two.cpp | /*
* @lc app=leetcode id=757 lang=cpp
*
* [757] Set Intersection Size At Least Two
*/
// @lc code=start
class Solution {
public:
int intersectionSizeTwo(vector<vector<int>>& intervals) {
sort(intervals.begin(), intervals.end(), [](const vector<int>& l, const vector<int>& r) {
if (l[1] == r[... | ALGO | 0.999821 | 6.206237 | {
"github_metadata": {
"branch": "master",
"commit_count": 178,
"repo_created_at": "2018-01-17T06:33: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": "756609e2... |
d37c5945-39a0-49f5-960e-2ea3db9dcef0 | silverAbyss/DataStructure | week_three/3-1.4.cpp | #include<stdio.h>
#include<stdlib.h>
#include<malloc.h>
typedef int status;
typedef int ElemType;
typedef struct LNode{
struct LNode* next;
ElemType data;
}LNode,*Linklist;
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define OVERFLOW -2
void PrintList(Linklist L);
... | ALGO | 0.999955 | 3.627147 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2017-12-07T11:45: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": "1e2f59429f... |
efcbd9d8-d7c8-44cf-9b06-701f8eb59b73 | thanhyou00/learn_cpp_basic | Some Objects in Cpp/Loops/Lp03.cpp | #include<bits/stdc++.h>
using namespace std;
// while loop
int main() {
// Vi du 1 : In ra cac so tu 1 den 5
int i=1;
while(i<=5) {
cout<<i<<" ";
i++;
}
/*
* Giai thich :
- i co gia tri ban dau la 1
- Dieu kien cua vong lap luon chay la i<=5 (=> khi i = 5 thi dung vong lap)
- i++ : sau moi 1 lan lap, i se tang... | TOOL | 0.994132 | 3.116719 | {
"github_metadata": {
"branch": "master",
"commit_count": 32,
"repo_created_at": "2021-09-17T02:07:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f06d554e... |
eed2f4a6-bb75-479d-8650-2eb64da84af9 | niuxu18/logSurvey | data/crawl/make/hunk_790.cpp | {
HANDLE hPID;
int err;
+ exit_code = 0;
+ exit_sig = 0;
+ coredump = 0;
/* wait for anything to finish */
- if (hPID = process_wait_for_any()) {
+ hPID = process_wait_for_any();
+ if (hPID)
+ ... | TOOL | 0.983375 | 5.516894 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2018-02-25T03:10:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "17f635a9f... |
43d792a8-a89f-49ca-b45b-dac4b18e7d59 | paranjay11/DS-Algo | trappingRainWaterII/source.cpp | #include <bits/stdc++.h>
using namespace std;
void c_p_c()
{
ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
}
struct Node{
int val;
int x,y;
};
struct Compare{
bool operator()(Node const& left, Node const&... | ALGO | 0.999779 | 3.999473 | {
"github_metadata": {
"branch": "master",
"commit_count": 38,
"repo_created_at": "2020-10-17T05:22: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": "2f8045894... |
6c065cf4-a447-45d5-adbb-4f459157ffb2 | shakilaust/leetcode | 445. Add Two Numbers II.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode* reverseLinkList(ListNode *node) {
ListNode* head = NULL;
while( node ) {
ListNode* n = new L... | ALGO | 0.999997 | 6.112548 | {
"github_metadata": {
"branch": "master",
"commit_count": 664,
"repo_created_at": "2018-11-21T11:15:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "92861f25... |
7a605a0e-118d-40c5-842b-1e3935fae0f5 | khanna98/Improving-Coding-Concepts | C++/Data Structures/Linked List/linked_list.cpp | #include<iostream>
using namespace std;
// Linked List
class node{
public:
int data;
node *next;
// node *prev;
node(int d){
data = d;
next = NULL;
// prev = NULL;
}
};
/*
class LinkedList{
node *head;
node *tail;
public:
void add(){
}
};
*/
void insertAtH... | ALGO | 0.999844 | 3.955084 | {
"github_metadata": {
"branch": "master",
"commit_count": 172,
"repo_created_at": "2018-06-15T20:08:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 4,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "48f1c69e... |
c01173f1-10d0-48bc-ac91-c75b9fbd3b30 | Noodle96/contestProgramming | CDFC/CDFC-D4/B_goodKid.cpp | #include <bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define msg(str,str2) cout << str << str2<< endl
using namespace std;
using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
template<typename T>
using pair2 = pair<T, T>;
using pii = pair<int, int>;
using pli =... | ALGO | 0.999985 | 4.168254 | {
"github_metadata": {
"branch": "main",
"commit_count": 787,
"repo_created_at": "2022-02-23T23:20:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "81e4fe30ec... |
c1fb1457-b7fe-4aa4-8a29-c9e4ac09e81d | Xilinx/Vitis_Libraries | codec/L2/include/hw/leptonEnc/lepton/XAcc_arith.hpp | /*
* Copyright 2021 Xilinx, Inc.
*
* 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... | ALGO | 0.931402 | 7.110201 | {
"github_metadata": {
"branch": "main",
"commit_count": 471,
"repo_created_at": "2019-09-23T19:13:46.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 988,
"forks": 381,
"issues": 0,
"pull_requests": 12
},
"file_meta": {
"content_id": "6ae84c... |
086c0b24-65dc-4266-b11d-0cffb86c15f8 | xiexixie/cplusplus-learning | leetcode/383.cpp | #include <string>
using namespace std;
class Solution
{
public:
// 暴力解法
bool canConstruct(string ransomNote, string magazine)
{
for (int i = 0; i < magazine.size(); i++)
{
for (int j = 0; j < ransomNote.size(); j++)
{
if (ransomNote[j] == magazine[i])
{
ransomNote.er... | ALGO | 0.999834 | 5.45025 | {
"github_metadata": {
"branch": "main",
"commit_count": 27,
"repo_created_at": "2023-06-19T14:11: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": "f306620b156... |
2486702a-6402-4808-901a-cb06c6611db0 | anubhav-bhard/Competitive-Programming-June-Course- | Tanweer/Recursion, Backtracking and Dynamic Programming/Out Of Boundary Paths/solution.cpp | class Solution
{
public:
int helper(int& m, int& n, int i, int j, int& maxmove, int counter, vector<vector<vector<int>>>& dp)
{
if(counter>maxmove)
{
return 0;
}
if(i<0 || j<0 || i>=m || j>=n)
{
return 1;
}
if(dp[i][j][counter... | ALGO | 0.999967 | 4.924708 | {
"github_metadata": {
"branch": "main",
"commit_count": 896,
"repo_created_at": "2021-06-03T19:05:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 11,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "607d7a4f0... |
ad5a4f7e-b247-420d-8226-527bb0247fcc | MohamedIrfanAM/cp | hackerrank/C++-Introduction/VariableSizedArrays.cpp | // time-limit: 4000
// problem-url: https://www.hackerrank.com/challenges/variable-sized-arrays/problem
#include<bits/stdc++.h>
#include<cstdio>
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n, q, k;
// First input line accepting n and q
cin >> n >> q;
int c_out[q][2];
i... | ALGO | 0.998979 | 3.370592 | {
"github_metadata": {
"branch": "master",
"commit_count": 235,
"repo_created_at": "2021-04-07T16:17:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2e4afe90... |
8625815b-16af-4ee1-8c86-36b1e5d7e69d | AnukaMithara/Competitive-Programming | Mora Xtreme solutions/CPP/permutations.cpp | #include<bits/stdc++.h>
using namespace std;
const long long N = 2e5+7;
int a[N];
bool b[N];
int n;
bool check(int m) {
for (int i=1; i<2*n; i++) b[i] = a[i] > m;
int closest[2] = {N, N};
for (int i=1; i<2*n; i++) {
if (i > 1 && b[i] == b[i-1]) closest[b[i]] = min(closest[b[i]],... | ALGO | 0.999935 | 3.785505 | {
"github_metadata": {
"branch": "main",
"commit_count": 16,
"repo_created_at": "2023-10-01T15:36: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": "32c46571b0a... |
d0cbf21d-08f6-46dc-9b7a-f85f484e77be | buscagliad/adventofcode | 2021/day18/snail.cc |
#include <vector>
#include <string>
#include <iostream>
#include <string.h>
using namespace std;
class comp {
public:
comp(const char *s) { str = s; };
void add(const char *s);
void add(string as);
void out();
int64_t evaluate();
int64_t magnitude();
bool explode();
bool split();
private:
... | ALGO | 0.998787 | 3.916744 | {
"github_metadata": {
"branch": "master",
"commit_count": 480,
"repo_created_at": "2022-03-24T19:47: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": "a5a63e1c... |
997710cd-2b38-4a0b-a002-a33c8016dc54 | NaYeM16551/DSA-100DaysOfCode | day-07__treeProblem.cpp | #include <bits/stdc++.h>
#define show(v) \
trav(i, v) cout << i << " "; \
cout << "\n";
#define trav(i, v) for (auto &i : v)
#include "headerFile/tree.h"
#define watch(x) cerr << #x << " = " << x << "\n"
using namespace std;
bool rootToNodePath(TreeNode *root, int node, vector<int> &path)
{
... | ALGO | 0.999983 | 4.554955 | {
"github_metadata": {
"branch": "main",
"commit_count": 30,
"repo_created_at": "2023-09-29T15:35:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ed966e06591... |
a86eae0a-b083-49c8-b84b-6dae4ec809c4 | anas-didi95/programming-practices | codeforces/solved/69A/c.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int coor[3] = {0};
while (n--) {
int x, y, z;
cin >> x >> y >> z;
coor[0] += x;
coor[1] += y;
coor[2] += z;
}
cerr << coor[0] << " ";
cerr << coor[1] << " ";
cer... | ALGO | 0.999885 | 5.109655 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2018-02-23T03:00: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": "76323c0ad4... |
ebe97906-e4e1-4b27-b785-1a40b87f47ef | Immocat/CS621hw | Exercise3/gmm/gmm_modified_gram_schmidt.h | // -*- c++ -*- (enables emacs c++ mode)
//========================================================================
//
// Library : Generic Matrix Methods (gmm)
// File : gmm_modified_gram_schmidt.h : from I.T.L.
//
// Date : October 13, 2002.
// Authors : <NAME> <<EMAIL>>
// <NAME> <<EMA... | ALGO | 0.959183 | 5.076447 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2018-01-22T03:11:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6fd0ba56b... |
0fb7bff5-4a82-4c33-8fd7-d9691160f907 | HILIBENI/Prog1-main | gyak2/2.cpp | #include <iostream>
using namespace std;
void oddeven(int arlen, int tomb[50]) {
for (int i = 0; i < arlen; i++) {//iterate through array
if ((i + 1) % 2 == 0) {//if i is even / divisible by 2
tomb[i] = rand() % 10;
}
if ((i + 1) % 2 == 1) {//if i is odd
tomb[i] = (rand() % 12) - 3;
}
}
}
void five(i... | ALGO | 0.96144 | 3.157981 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2023-03-02T14:12: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": "f9caef720... |
bf45886c-e285-436d-a242-64e4fc277518 | longathelstan/learncplusplus | LOPTHAYNAM/BUOI6/TSQU.cpp | #include <bits/stdc++.h>
#define ll long long
#define file freopen("TSQU.INP", "r", stdin); freopen("TSQU.OUT", "w", stdout);
#define io ios_base::sync_with_stdio(false); cin.tie(0);
using namespace std;
const int limit = 1e5+8;
vector<ll> v, a, b;
bool check(ll a) {
ll tmp = sqrt(a);
return tmp * tmp == a;
}
... | ALGO | 0.99992 | 3.736543 | {
"github_metadata": {
"branch": "main",
"commit_count": 81,
"repo_created_at": "2024-11-29T07:36: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": "32edd29210d... |
70a20d7b-7af0-49b3-9197-7c92d8426bad | RashikaKarki/Image-Steganography | Encryption.cpp | #include<string>
using namespace std;
static const string KEY = "a1233";
class Encryption{
private:
static string encMsg;
static string encKey;
public:
static string EncryptMsg(string msg,string key){
encMsg = msg;
encKey = key;
encKey = encryptDecrypt(key,KEY);
//... | ALGO | 0.999003 | 3.912596 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2018-08-04T06:01: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": "113548ceb... |
f8894413-ea78-459d-ad87-cb3f86cb8d2f | lapalap/spbsu_optimization | OPTIMISATION.cpp | #include "OPTIMISATION.h"
void OPTIMISATION::update_func(FUNC* function)
{
_f = function;
}
void OPTIMISATION::update_area(AREA* a)
{
_area = a;
}
void OPTIMISATION::update_stop(STOP* stop_method)
{
_stop = stop_method;
}
std::vector<std::vector<double>> OPTIMISATION::get_journal()
{
return _journal... | ALGO | 0.99922 | 5.120141 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2017-11-13T09:40: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": "1625e2a14... |
28fdc97b-7eb9-4fd5-9ba8-aad39a0148c5 | HitenDewangan/Competitive-Programming | CodeForces/Div2 Contest/1976B_INcreaseDEcreaseCopy.cpp | #include<iostream>
#include<vector>
using namespace std;
#define INT_MAX 1e9
long long min_Operations(long long last, vector<long long> &a, vector<long long> &b, int n){
//counting the number of operations
long long min_oper = INT_MAX;
for(int i=0; i<n; i++){
if((a[i]>... | ALGO | 0.999972 | 4.376679 | {
"github_metadata": {
"branch": "main",
"commit_count": 100,
"repo_created_at": "2024-02-17T17:41: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": "131ce0ab0a... |
924c4849-9a7d-4ae3-9125-669ff1e19224 | lbfabiano/CENTRIST | wind.h |
#ifndef __Wind_H__
#define __Wind_H__
#include <iostream>
#include <sstream>
#include <stdio.h>
#include <ml.h>
#include "opencv2/core/core.hpp"
#include "opencv2/core/opengl_interop.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp... | ALGO | 0.921883 | 3.441245 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2015-10-22T01:52:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0b9c079ad... |
94a9048a-06cb-4cd8-a825-8ce10017f274 | bytedance/lightseq | lightseq/csrc/kernels/cuda/includes/common.h | #pragma once
#include <stdexcept>
#include "cuda_util.h"
#include <cuda.h>
#include <cuda_fp16.h>
#include <curand_kernel.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdexcept>
#include <vector>
#include <cooperative_groups.h>
namespace lightseq {
namespace cuda {
const unsigned int WARP_REDUCE_MASK = 0xfff... | ALGO | 0.996437 | 6.497602 | {
"github_metadata": {
"branch": "master",
"commit_count": 269,
"repo_created_at": "2019-12-06T08:25:24.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3284,
"forks": 331,
"issues": 177,
"pull_requests": 3
},
"file_meta": {
"content_id": "8a... |
4c6b3197-16a1-4365-aee1-9d4c600e94c2 | gitrider/wxsj2 | EngineSDK/ThirdParty/VSInclude/cgal/CGAL/Cartesian/plane_constructions_3.h | // Copyright (c) 2000 Utrecht University (The Netherlands),
// ETH Zurich (Switzerland), Freie Universitaet Berlin (Germany),
// INRIA Sophia-Antipolis (France), Martin-Luther-University Halle-Wittenberg
// (Germany), Max-Planck-Institute Saarbruecken (Germany), <NAME> (Austria),
// and Tel-Aviv University (Israel). ... | ALGO | 0.970134 | 6.961051 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2015-08-26T14:38:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 15,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a7908b86f... |
3b52cbd3-4487-463f-989e-47e6c538b44a | pank3004/DSA-FOR-PLACEMENT | 2 Arrray/4_twos_Complement.cpp | #include <iostream>
#include <vector>
using namespace std;
vector<int> findTwosCom(vector<int> binary) {
int n = binary.size();
vector<int> twosCom(n + 1, 0); // Initialize with size n+1 for potential carry
// Step 1: Find one's complement
for (int i = n - 1, j = n; i >= 0; i--, j--) {
twosCom... | ALGO | 0.999979 | 5.818684 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2024-10-19T05:23: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": "712f29f357c... |
82539afb-8fdd-4e02-94f3-7f5c10ad246e | goretkin/kwc-ros-pkg | pkg/tags/eitan_functional_controller/vision/calonder_descriptor/include/calonder_descriptor/signature.h | #ifndef FEATURES_SIGNATURE_STATISTICS_H
#define FEATURES_SIGNATURE_STATISTICS_H
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/vector_sparse.hpp>
#include <boost/numeric/ublas/vector_expression.hpp>
#include <boost/foreach.hpp>
#include <vector>
#include <algorithm>
#include <cmath>
#include <... | ALGO | 0.976092 | 7.414797 | {
"github_metadata": {
"branch": "master",
"commit_count": 8093,
"repo_created_at": "2015-06-03T00:00:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2c0dba7... |
0c45065f-4761-444a-8411-a63b0d2cef52 | duyuyenpb/Data-structure-and-Algorithm | Exercises/DFS/ConnectedCellsinaGrid.cpp | //link: https://www.hackerrank.com/challenges/connected-cell-in-a-grid/problem
#include <bits/stdc++.h>
using namespace std;
int mt[100][100];
int vis[100][100];
int n, m, t;
int dx[] = {1, 1, 0, -1, -1, -1, 0, 1};
int dy[] = {0, 1, 1, 1, 0, -1, -1, -1};
void dfs(int i, int j){
t++;
vis[i][j] = 1;
for(int k = 0;... | ALGO | 0.999959 | 4.230561 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2021-07-11T11:33: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": "4074cab25d9... |
dc5b390a-faee-4d19-9c2d-cf69fa7e3238 | takseki/mayoi | mayoi.cpp | #include <iostream>
#include <vector>
using std::cin;
using std::cout;
using std::endl;
using std::vector;
// 進行方向
enum Dir {
POS = 0, // A(X)->B->C の方向
NEG, // 逆方向
};
class Solver {
public:
Solver() {}
public:
/**
動的計画法による探索
p(n, dir) : B から出発して、反転 n 回以内の経路数とする. dir は方向の初期状態.
初... | ALGO | 0.999997 | 4.034963 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2016-11-06T01:59: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": "3b2334218... |
a45fdf68-3ea8-4210-ab77-aff8a98bc958 | parth404/DSA-C-plus-plus | Searching-Sorting/binary-search.cpp | // Binary search will only work for monotonic array or sorted array
#include <iostream>
using namespace std;
int binarySearch(int arr[], int size, int target)
{
int start = 0;
int end = size - 1;
int mid = start + ((end - start) / 2);
while (start <= end)
{
int element = arr[mid];
... | ALGO | 0.999987 | 5.754385 | {
"github_metadata": {
"branch": "main",
"commit_count": 78,
"repo_created_at": "2023-07-24T06:06: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": "7b2a5b79ef6... |
6bf56365-cea8-4f70-9274-2ebadcc3d594 | elite390497/Graph-Theory | Research_Essens/ESSENS/Basic_Change/Level2/ADJ/combine_networks.hpp | #ifndef COMBINE_NETWORKS_HPP
#define COMBINE_NETWORKS_HPP
#include "ADJ/network_traversal.hpp"
#include "ADJ/find_Xneighbors.hpp"
#include "ADJ/add_multiple_edge.hpp"
#include "binary_set_operations.hpp"
using namespace std;
template<class Type1>
void find_candidate_edges(A_Network X, A_Network Y, A_Network Z, v... | ALGO | 0.998211 | 4.410112 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-05-26T02:24:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f67574ef23e... |
f28c921e-25a6-459f-b1d0-5f4697c89535 | bayweiheng/Kattis | traintimetables.cpp | #include<bits/stdc++.h>
using namespace std;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<vvd> vvvd;
typedef vector<string> vs;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
typedef vector<long long> vll;
typedef vector<vll... | ALGO | 0.999838 | 3.69663 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-03-03T13:16: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": "0a5ee240ca61... |
a06b71e5-6e3b-412c-8bf8-98d26c62f350 | ShreyaPrasad1209/CodingNotes | MasteringCompetitiveProgrammingQuestions/FCTRL2.cpp | //FCTRL2
//https://www.spoj.com/problems/FCTRL2/
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int multiply(int x, int res[], int res_size)
{
int carry = 0;
for (int i=0; i<res_size; i++)
{
int prod = res[i] * x + carry;
res[i] = prod % 10;
carry = prod/10; ... | ALGO | 0.999948 | 5.411613 | {
"github_metadata": {
"branch": "master",
"commit_count": 127,
"repo_created_at": "2019-12-25T12:44:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "58d0cb97... |
78fdaf42-39da-469d-8bfb-0169ba9b208c | CyFI-Lab-Public/RetroScope | packages/inputmethods/LatinIME/native/jni/src/suggest/core/dicnode/internal/dic_node_state_scoring.h | /*
* Copyright (C) 2012 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.905671 | 6.084853 | {
"github_metadata": {
"branch": "master",
"commit_count": 18,
"repo_created_at": "2016-05-15T23:49:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 120,
"forks": 43,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "0230b2... |
1c501c40-7799-453b-9535-33bc93370a20 | aakashshameer/animator | Engine/src/animation/beziercurveevaluator.cpp | /****************************************************************************
* Copyright ©2017 <NAME>. All rights reserved. Permission is hereby
* granted to students registered for University of Washington CSE 457 or CSE
* 557 for use solely during Autumn Quarter 2017 for purposes of the course.
* No other use,... | ALGO | 0.96925 | 6.581079 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2023-08-02T21:47: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": "26e79abb6cd2... |
cea47819-3d7e-4b2f-9d5c-00b1f867a09e | anubansal17/Coding-Career-Journey | Uber/Practice/LLD/ParkingLot.cpp | /*Enum:
1. SlotType -> twoWheeler, fourWheeler
2. GateType -> entry, exit
3. VehicleType -> motorCycle, car
Classes:
1. Slot -> SlotType, slotId
2. Vehicle -> VehicleType, vehicleId
3. Level -> list<Row>
4. Gate -> GateType, gateId
5. Row -> list<Slot>, rowId
6. ParkingSystem [driverClass] -> methods: getParkingSl... | ALGO | 0.918886 | 4.50645 | {
"github_metadata": {
"branch": "master",
"commit_count": 901,
"repo_created_at": "2020-02-09T14:11: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": "ed0f02b2... |
07c894c9-12e5-46ea-a735-facbbc009127 | theducdev/CodePTIT-DSA | test2.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n, k; cin >> n >> k;
priority_queue <ll, vector <ll>, greater <ll> >Q;
for (int i = 1; i <= n; i++) {
ll x; cin >> x;
Q.push(x);
}
ll chiphi = 0;
while(Q.size()!= 1) {
if(Q.size() >= k) ... | ALGO | 0.999973 | 3.544991 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-02-06T15:34:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1c963af4df52... |
03e42591-1c12-44d2-b6fe-696e7a7b288a | naveenls/Competitive-Coding | C++/test299.cpp | #include<bits/stdc++.h>
using namespace std;
long long m=1e9+7;
long long power(long long x, long long y)
{
if (y == 0)
return 1;
long long p = power(x, y/2) % m;
p = (p * p) % m;
return (y%2 == 0)? p : (x * p) % m;
}
const int maxN=2*1e5;
set<int> adj[maxN];
bool visited[maxN];
i... | ALGO | 0.999911 | 3.991458 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2021-02-21T13:30: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": "84d31b538ade... |
9f3056fe-ca2b-483c-a176-6bdbc345c1cf | lorenfatal/ToDoList | main.cpp | #include <iostream> // Input & Output Stream library
#include <vector> // Vector library - dynamic arrays
#include <string> // String library - manipulating strings
#include <fstream> // File Stream library - reading and writing files
#include <limits> // Use std::numeric_limits and std::stre... | TOOL | 0.965356 | 6.616282 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2025-01-03T13:41:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "73adac916e4c... |
ae683804-f117-49ea-a70a-56f3f75aa949 | chocono2230/competitive-programming | AtCoder/Problems/abc309/f/abc309_f.cpp | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(ri, n) for (int ri = (int)(n - 1); ri >= 0; ri--)
#define rep2(i, x, n) for (int i = (int)(x); i < (int)(n); i++)
#define rrep2(ri, x, n) for (int ri = (int)(n - 1); ri >= (int)(x); ri--)
#define repit(itr, x) for (auto itr = x.b... | ALGO | 0.999938 | 4.729263 | {
"github_metadata": {
"branch": "main",
"commit_count": 231,
"repo_created_at": "2022-10-09T09:59:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2d40c7bba7... |
d15e2cf2-0856-4532-9eab-860bc1ac0ab7 | thongnbk2k6/DSA | HLD/UPDATEDOANTRENHLD.cpp | #include<bits/stdc++.h>
using namespace std;
#define faster ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define pll pair<long long,long long>
#define all(v) v.begin(),v.end()
#define pb push_back
#define pii pair<int,int>
#define piii int,pair<int,int>
#define bit(n,i) ((n>>i)&1)
#define... | ALGO | 0.999884 | 4.362306 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2025-06-03T11:53:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cd5011344175... |
65d6b2fe-63c9-430f-89cd-d270d069b145 | ishandutta2007/codeforces-a | alexandr_ts/normal/1310/D.cpp | #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <numeric>
#include <map>
#include <vector>
#include <set>
#include <cassert>
#include <algorithm>
#include <cstdio>
#include <sstream>
#include <cmath>
#include <string>
#include <queue>
#include <unordered_map>
#include <iomanip>
using namespace std;
ty... | ALGO | 0.99986 | 3.263831 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-04-11T00:51:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5656666f0be9... |
a79d4685-bc2f-4dcf-b4e8-4578ef448795 | Nedal-Esrar/My-Codeforces-Rounds-Solutions | Codeforces-Round-862/A.cpp | // EIEN
#include <bits/stdc++.h>
#include <ext/rope>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
#define ll long long
#define fr first
#define sc second
#define pb(x) push_back(x)
#define nxt continue
#define sz(container) ((ll) container.size(... | ALGO | 0.999919 | 4.137552 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2023-04-14T19:44:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d7afa05e1ed... |
bac5aff9-805c-45c5-a80d-b3288a10d146 | mashfiqur05/Problem-Solving | Codeforces/476B_Dreamoon_and_WiFi.cpp | /// *** --- ||| In the name of ALLAH ||| --- *** ///
#include<bits/stdc++.h>
using namespace std;
#define fastio() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define fraction() cout.unsetf(ios::floatfield); cout.precision(15); cout.setf(ios::fixed,ios::floatfield);
#define file() freopen("inp... | ALGO | 0.99964 | 4.195554 | {
"github_metadata": {
"branch": "master",
"commit_count": 122,
"repo_created_at": "2023-11-26T14:48: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": "8c414e34... |
7d0f391e-3410-4b5c-b61e-0ccd481c6954 | Zuubar/CPP-Projects | Sorting/SortLibrary.cpp | #include <algorithm>
#include <cmath>
#include <iostream>
#include "Header.h"
using std::cout; using std::endl;
BinaryHeap::BinaryHeap(const int size) : last_cell(0), num_of_elements(0), heap_size(size) {
heap_arr = new int[size];
}
void BinaryHeap::insert_val(const int value) {
if (last_cell >= heap_size) {
cout... | ALGO | 0.999657 | 4.193678 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-07-25T06:47: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": "2f7df62d3... |
927395e3-0938-4b5e-a715-cfcf95aa892e | shugo256/atcoder | abc/076/d.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <string>
#include <iomanip>
using ll = long long;
using namespace std;
int diagram[40010] = {0};
int main() {
int n;
cin >> n;
int t[n], v[n];
for (auto &ti:t) cin >> ti;
for (auto &vi:v) cin >> vi;
int j = 0... | ALGO | 0.999699 | 3.723959 | {
"github_metadata": {
"branch": "master",
"commit_count": 90,
"repo_created_at": "2019-04-12T01:15:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "762bfb3b7... |
6a2e9a6d-4ef2-4c88-bace-896583bddd19 | Richw818/Independent-Study | SOS/vowels.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
const int N = 24;
int n;
cin >> n;
vector<int> f(1 << N);
for (int i = 0; i < n; i++) {
string s;
cin >> s;
sort(s.begin(), s.end());
s.erase(unique(s.begin(), s.end()), s.end())... | ALGO | 0.999972 | 4.135908 | {
"github_metadata": {
"branch": "main",
"commit_count": 24,
"repo_created_at": "2024-02-15T03:55:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "95ff05ef458... |
16d781e0-5a1c-4e87-85f0-72652f92416d | rsunny/competitive_programming | codechef/SEAPERMS.cpp | #include <stdio.h>
#include <iostream>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <set>
using namespace std;
set<int> arr;
vector<int> a;
long long int mod = 1000000007;
unordered_map<long long int,int> freq,nxt,bidx;
long long int inv_mod[100009];
long long int sz=1000000000;
void upda... | ALGO | 0.999982 | 4.527143 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-08-11T02:08: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": "c2681dd7d9... |
9c6c68c6-c702-46b6-8f14-ba7216bf7e51 | HustDsy/LeetCode | 546. 移除盒子/546. 移除盒子/main.cpp | //
// main.cpp
// 546. 移除盒子
//
// Created by 董深育 on 2020/8/15.
// Copyright © 2020 董深育. All rights reserved.
//
#include <iostream>
#include<vector>
using namespace std;
class Solution {
public:
int dp[100][100][100]={0};
int removeBoxes(vector<int>& boxes) {
int l=0;
int r=(int)boxes.size... | ALGO | 0.99979 | 4.784704 | {
"github_metadata": {
"branch": "master",
"commit_count": 332,
"repo_created_at": "2020-06-08T09:56: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": "e9128319... |
e2bcb3ce-75de-4267-a79d-a48e6c8c16ee | Yawn-Sean/Daily_CF_Problems | daily_problems/2024/11/1126/personal_submission/cf223c_lengli.cpp | /*
lengli_QAQ
Hope there are no bugs!!!
*/
#include <bits/stdc++.h>
#define fastio std::ios::sync_with_stdio(0); std::cin.tie(0); std::cout.tie(0)
#define all(x) x.begin(),x.end()
#define pb push_back
template <unsigned M_> struct ModInt {
static constexpr unsigned M = M_;
unsigned x;
constexpr ModInt() : x(0U) ... | ALGO | 0.999938 | 3.758422 | {
"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": "c463... |
0bc69d5c-0bac-4227-bb81-99c27609cdd2 | asuthar2002/Data-Sturcture-and-Algorithm | 0501-find-mode-in-binary-search-tree/0501-find-mode-in-binary-search-tree.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.999975 | 5.858374 | {
"github_metadata": {
"branch": "main",
"commit_count": 1312,
"repo_created_at": "2022-01-25T09:17: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": "cebfe9cb1... |
c2ea2fb7-44dc-4aad-9e3e-c5df2c48c762 | wuyuhang05/My-OI-Code | CF/839C.cpp | /*
* Author: RainAir
* Time: 2019-08-24 16:29:45
*/
#include <algorithm>
#include <iostream>
#include <cstring>
#include <climits>
#include <cstdlib>
#include <cstdio>
#include <bitset>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <stack>
#include <map>
#include <set>
#define fi fir... | ALGO | 0.99973 | 3.738205 | {
"github_metadata": {
"branch": "master",
"commit_count": 113,
"repo_created_at": "2018-06-03T12:18:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e92bf346... |
396ccd0b-19cd-414d-9ba4-7452bca132e2 | wwqgtxx/pat-a-practise | 1028.cpp | #include<iostream>
#include<iomanip>
#include<map>
#include<string>
#include<sstream>
#include<vector>
#include<set>
#include<cstdint>
#include<cmath>
#include<deque>
#include<queue>
#include<list>
int main(){
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int n,c;
std::cin >> n >> c;
int id;
std::string nam... | ALGO | 0.994965 | 4.15296 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-03-17T12:20: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": "f5e0ed84db... |
37ecaae3-73cc-41d5-9f4c-e38377c241ed | CatNinjaLuna/Content-based-Image-Retrieval | custom_design.cpp | /*
* Author: <NAME>
* Date: Oct/14/2024
* File: custom_design.cpp
*
* Purpose:
* This program implements a content-based image retrieval (CBIR) system designed to find images
* similar to a given target image based on custom-designed feature vectors. The feature vectors
* combine color histograms, texture histo... | DATA | 0.963282 | 7.007575 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2024-10-12T04:28: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": "ebb05d89d27a... |
609d2c41-6da2-4a48-b12b-c897c8c91830 | CST-Modelling-Tools/TonatiuhPP | source/libraries/SunPathLib/data/SkyModelPI.cpp | #include "SkyModelPI.h"
namespace sp {
SkyModelPI::SkyModelPI()
{
m_i0 = 1618.;
m_taub = 0.606;
m_b = 0.491;
m_taud = 2.698;
m_d = 0.187;
m_taug = 0.464;
m_g = 0.402;
}
SkyModelPI* SkyModelPI::copy() const
{
return new SkyModelPI(*this);
}
double SkyModelPI::findDNI(double alpha) ... | ALGO | 0.993544 | 4.604406 | {
"github_metadata": {
"branch": "master",
"commit_count": 1587,
"repo_created_at": "2021-06-28T07:47:41.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4,
"forks": 3,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "a7a77256... |
86515818-03c2-49a1-babf-31b4e0bcfdf1 | HirokiKomiya/FirstTime | Wang's_class/projecct-simulation/packman.cpp | #include<stdlib.h>
#include <GL/glut.h>
#include<math.h>
#define PI 3.14159265
static GLfloat ang = 0.0;
static GLfloat x = 0.0;
static GLfloat y = 0.0;
int i=0, n=100;
int a=0;
float R=10;
void display(void)
{
float r = 10; //直径
float x=0;
float y=0;
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(1.0, 1.0, 0.0)... | ALGO | 0.950408 | 4.596395 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-08-10T06:25: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": "593299b794... |
fabd89fe-f36c-4201-b0eb-ec85b6c41f66 | quadratech188/baekjoon | solutions/21607.cpp | #include <iostream>
#include "modules/LazySegmentTree.h"
#include "modules/SparseTable.h"
#include "modules/ModInt.h"
#include "modules/Input.h"
#include "modules/FastIO.h"
typedef ModInt<long long int, 100003> mInt;
SparseTable fTable(100003, 500000, [](mInt index) {
return (mInt)2 * index * index - (mInt)1;
})... | ALGO | 0.99979 | 4.502861 | {
"github_metadata": {
"branch": "main",
"commit_count": 174,
"repo_created_at": "2024-10-13T07:41:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "112d1a5a6e... |
41ba43a5-cb08-4d85-a763-48a84e0c7501 | myabcc17/Algorithm | Baekjoon/BFS/[11403번]경로찾기.cpp | #include <iostream>
#include <queue>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int N;
int visit[101][101] = { {0,} };
vector<int> adjList[101];
queue<int> q;
void bfs(int vertex)
{
q.push(vertex);
while (!q.empty()) {
int p = q.front();
q.pop();
// bfs로 노드들을 계속 따라간다.
for ... | ALGO | 0.999967 | 4.632668 | {
"github_metadata": {
"branch": "master",
"commit_count": 98,
"repo_created_at": "2019-01-31T04:47:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d355284b7... |
3cbff690-84bd-420b-8b42-d1b8d279c539 | MakeContributions/DSA | algorithms/CPlusPlus/Dynamic-Programming/coin-change-problem.cpp | /*
Coin Change Problem
You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}.
You need to figure out the total number of ways W, in which you can make a change for Value V using coins of denominations D.
Note : Return 0, if change isn't possible.
W can be pretty large so ... | ALGO | 0.999945 | 4.97494 | {
"github_metadata": {
"branch": "main",
"commit_count": 655,
"repo_created_at": "2020-12-16T13:54:52.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 809,
"forks": 806,
"issues": 79,
"pull_requests": 212
},
"file_meta": {
"content_id": "6612... |
9c4a822b-bdfe-4aa9-b768-f716138e0f45 | Kawser-nerd/CLCDSA | Source Codes/CodeJamData/11/42/3.cpp | #include <iostream>
#include <vector>
#include <cstdio>
#include <cstring>
using namespace std;
struct point {
point() : x(0), y(0) {}
point(int x, int y) : x(x), y(y) {}
point& operator+=(const point& p) {
x += p.x;
y += p.y;
}
point& operator-=(const point& p) {
x -= p.x;
y -= p.y;
}
... | ALGO | 0.999866 | 3.790896 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2019-09-30T05:38:13.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 8,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "639ac692... |
65d368ff-7ce1-45ba-a3e2-d1f43b466568 | tanoargie/hacker-rank-solutions | Algorithms/PickingNumbers.cpp | #include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#inc... | ALGO | 0.999975 | 3.587047 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2017-11-01T01:21:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f42471ce5... |
ccd6a896-a464-4f74-87af-18ce85c4fc01 | teja-afk/DSA_ | Recursion/algorithm/merge.cpp | #include <iostream>
#include <vector>
using namespace std;
// void mergeArray(int arr[], int sizeArr, int brr[], int sizeBrr, vector<int> &ans)
// {
// int i = 0, j = 0;
// while (i < sizeArr && j < sizeBrr)
// {
// if (arr[i] < brr[j])
// {
// ans.push_back(arr[i]);
// ... | ALGO | 0.999937 | 5.562407 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2025-02-01T05:56: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": "5a7c3baaa2... |
34e85c40-cd4f-4f59-8804-a416222a6f4c | PasaOpasen/6-course-tasks | Alexeev/CPP/Theme2/3lab/polynom.cpp |
#include <vector>
#include <functional>
#include <cmath>
#include "polynom.h"
#include "gauss.h"
#include "prog.h"
#include <sstream>
#include <iostream>
#include "dot.h"
using namespace std;
//constructors
Polynom::Polynom()
{
this->degree = -1;
}
Polynom::Polynom(int deg)
{
this->degree = deg;
this... | ALGO | 0.997078 | 3.549743 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2020-10-22T14:53:01.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c7e30f9c7... |
ab536e22-d1da-4e43-b43d-93617ec77e75 | MusaTabally/NAS100NL | N1.cpp | #include <tensorflow/cc/client/client_session.h>
#include <tensorflow/cc/ops/standard_ops.h>
#include <tensorflow/core/framework/tensor.h>
#include <tensorflow/core/framework/tensor_shape.h>
#include <vector>
int main() {
using namespace tensorflow;
using namespace tensorflow::ops;
// Define a scope
Scope roo... | DATA | 0.999099 | 7.376034 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-09-24T22:53:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3602c209469c... |
75e3c818-27b2-45bb-a9b1-25d4ec799729 | alanthie/Chess-001 | Feature/condvalunode.hpp | #pragma once
//=================================================================================================
// Copyright (C) 2017 <NAME> - All Rights Reserved
//=================================================================================================
//
// Condition... | ALGO | 0.990238 | 5.193189 | {
"github_metadata": {
"branch": "master",
"commit_count": 113,
"repo_created_at": "2017-05-31T02:54:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d130f6f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.