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 |
|---|---|---|---|---|---|---|---|
2947e9d5-91a9-4b63-a356-65f10a49cb96 | kiwan97/AlgorithmSolving | bj20210.cpp | #include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
using namespace std;
vector<string> strs[10005];
int N;
int idx=0;
bool isNum(char cc){
return (int)cc >= (int)'0' && (int)cc <= (int)'9';
}
int priorNum(char cc){
switch(cc){
case 'A':
return 50;
case 'a':
return 49;
case '... | ALGO | 0.999672 | 4.654202 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2020-09-17T13:46: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": "029d45f62... |
98f61752-d9a9-4909-8157-a40e0dbd5cd3 | phcastello/SortingVisualizer | src/Bubble.cpp | #include <SFML/Graphics.hpp>
#include <chrono>
#include <vector>
#include <iostream>
#include <thread>
#include <algorithm>
#include <cmath>
#include "SFMLhandler.hpp"
#include "Bubble.hpp"
void bubbleSort(sf::RenderWindow& window, std::vector<int>& array, sf::Font& font) {
int comparisons = 0;
int sleepTime =... | ALGO | 0.954674 | 4.485106 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-06-07T18:26:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "43d47e35174c... |
898ebc0e-6daa-4f59-96d6-808d0b07c592 | hello-choulvlv/hello-world | 三维几何/计算几何库-需要cocos2dx-3.10框架/cycle_sphere/cycle_sphere.cpp | /*
*二维,三维圆球体基本函数实现
*2019/6/16
*@author:xiaohuaxiong
*/
#include "cycle_sphere.h"
#include "matrix/matrix.h"
#include "line/line.h"
#include<string.h>
using namespace cocos2d;
NS_GT_BEGIN
bool check_point_insideof_cycle(const Cycle &cycle, const cocos2d::Vec2 &point)
{
float d_x = point.x - cycle.center.x;
floa... | ALGO | 0.999316 | 3.171702 | {
"github_metadata": {
"branch": "master",
"commit_count": 93,
"repo_created_at": "2019-09-21T04:25:02.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ee3bcecc4f... |
ef87779c-4749-4217-b5c5-86bdbd3a6777 | ishandutta2007/codeforces-r | realcomplex/normal/1534/C.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define fi first
#define se second
#define mp make_pair
#define fastIO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
const int N = (int)4e5 + 100;
const int MOD = (int)1e9 + 7;
int A[2][N];
int P[2][N];
bool vis[N... | ALGO | 0.999895 | 4.045144 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:58:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "029a624cf8ec... |
09d6d812-4186-4513-8775-a53f0616c171 | samclee/ctci-and-leetcode-questions | 3-stacks-and-queues/sort-stack/main.cpp | #include <iostream>
#include <stack>
#include <vector>
using namespace std;
stack<int> sortStack(stack<int> stk) {
stack<int> sortedStk;
stack<int> buffer;
// empty every elt of original stack into the sorted stack
while (!stk.empty()) {
int toBeInserted = stk.top();
stk.pop();
// insert elt into sorted s... | ALGO | 0.999922 | 5.745604 | {
"github_metadata": {
"branch": "master",
"commit_count": 65,
"repo_created_at": "2018-09-22T19:00: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": "226a65cf9... |
9d7421e4-eabf-4b9c-b3f3-7dce97bf2289 | zulianp/sfem | operators/spectral_hex/lagrange_hex_laplacian_inline.hpp | #ifndef LAGRANGE_HEX_LAPLACIAN_INLINE_HPP
#define LAGRANGE_HEX_LAPLACIAN_INLINE_HPP
#include "sfem_base.h"
#include <cstdio>
#include "sfem_Tracer.hpp"
// #define DEBUG_SUMFACT
template <int N, int Q, typename T>
SFEM_INLINE static void lagrange_hex_triad_interpolate(
// Shape functions per quad point Q x S... | ALGO | 0.998328 | 5.455363 | {
"github_metadata": {
"branch": "main",
"commit_count": 2592,
"repo_created_at": "2024-03-06T08:16:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "0d4b20e53... |
c72f2394-124b-4715-8a6b-095e1c331142 | MaksMatiupatenko/KrutyeStructuryIFunctsii | оптимизации дп/knuth.cpp | for (int len = 2; len <= n; ++len) {
for (int i = 0; i + len <= n; ++i) {
int opt = i + 1;
int64 optans = 1e18;
int l = i + 1;
if (i > 0) l = max(l, dp[i][i + len - 1].first);
int r = i + len - 1;
if (i + len + 1 <= n) r = min(dp[i + 1][i ... | ALGO | 0.999928 | 4.003092 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2022-10-15T19:27: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": "32c7fb806a6... |
b68f05cb-8406-4180-b0ed-113cf265d079 | Prabhat-Kumar-42/Coding_Practice | UVA/uva_610_Street_Directions_Final.cpp | #include <iostream>
#include <vector>
#include <set>
#include <queue>
#include <algorithm>
using namespace std;
class Sol
{
private:
vector<int> dfs_num, dfs_low, visited, art_pt, parent;
vector<vector<int>> graph, connected;
int dfs_count, root, root_children;
set<pair<int,int>> s, bridge_set;
... | ALGO | 0.99986 | 4.39083 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2023-05-27T16:03: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": "e703f1975b4... |
84a50fee-8457-4060-b2fa-432ea87eb5da | vildenst/3D-heart-models | VTK/Filters/StatisticsGnuR/vtkCorrelativeStatisticsGnuR.h | /*=========================================================================
Program: Visualization Toolkit
Module: vtkCorrelativeStatisticsGnuR.h
Copyright (c) <NAME>, <NAME>, <NAME>
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ... | ALGO | 0.943306 | 7.426886 | {
"github_metadata": {
"branch": "master",
"commit_count": 30,
"repo_created_at": "2017-09-14T08:41:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 16,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "68e477b... |
f4b6c494-ab51-41f1-b5c7-c7096590cd64 | facebookincubator/velox | velox/dwio/common/Throttler.cpp | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* 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 applic... | TOOL | 0.910303 | 7.766676 | {
"github_metadata": {
"branch": "main",
"commit_count": 11073,
"repo_created_at": "2021-07-23T23:00:23.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 3811,
"forks": 1370,
"issues": 880,
"pull_requests": 356
},
"file_meta": {
"content_id": ... |
55fcec7f-0c49-4d07-8fce-0b6d75f6e31d | buithan04/Code | Exam11/Problem13/main.cpp | #include <iostream>
using namespace std;
struct Node
{
int info;
Node * left;
Node * right;
};
Node * GetNode (int x)
{
Node * p = new Node;
p->info = x;
p->left = p->right = NULL;
return p;
}
typedef Node * Tree;
void Insert (Tree &T , int x)
{
if (T != NULL)
{
if (x < T->i... | ALGO | 0.999992 | 3.564114 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2024-04-09T15:37: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": "38d2940fcf... |
6060f8c4-e601-44fa-a693-c1da3ebdf855 | hashvive/hashvive | src/script/miniscript.h | // Copyright (c) 2019-present The Hashvive developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef HASHVIVE_SCRIPT_MINISCRIPT_H
#define HASHVIVE_SCRIPT_MINISCRIPT_H
#include <algorithm>
#include <compare>
#include <c... | ALGO | 0.93504 | 4.692616 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2025-01-09T05:32:55.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cdcf694ee66dd... |
d41498cb-a693-4fad-adfe-3e07b8e01c99 | alvi-khan/IUT-Notes-Archive | Semester 04/CSE 4404 (Algorithms Lab)/Contests/01. Graph Traversal/Problem B.cpp | #include <iostream>
#include <string>
#include <queue>
using namespace std;
int tour (string src, const string& dest) // essentially BFS traversal
{
if (src == dest) return 0; // if start and end locations same
int level[8][8] = {0}; // keeps track of the distance of each location from start
... | ALGO | 0.999783 | 4.193984 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2022-01-08T05:45:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 59,
"forks": 16,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "77c0d62d2b... |
303a3d81-c5b7-4e07-aef7-e2f973f527c8 | sangeon-ahn/leetcode150 | medium/103_Binary_Tree_Zigzag_Level_Order_Traversal/1.cpp | 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), left(left), right(right) {}
};
class Solution {
public:
vec... | ALGO | 0.999999 | 6.230097 | {
"github_metadata": {
"branch": "main",
"commit_count": 121,
"repo_created_at": "2024-01-23T07:15: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": "6159a05449... |
861ae159-368d-4bec-9817-f8e77cc879e3 | uni-algo/uni-algo | include/uni_algo/ranges_word.h | /* C++ Standard Library wrapper for Unicode Algorithms Implementation.
* License: Public Domain or MIT - choose whatever you want.
* See notice at the end of this file. */
#ifndef UNI_ALGO_RANGES_WORD_H_UAIH
#define UNI_ALGO_RANGES_WORD_H_UAIH
#ifdef UNI_ALGO_DISABLE_SEGMENT_WORD
#error "Word segmentation module is... | TOOL | 0.976969 | 3.091881 | {
"github_metadata": {
"branch": "main",
"commit_count": 863,
"repo_created_at": "2022-07-07T09:25:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 298,
"forks": 26,
"issues": 6,
"pull_requests": 1
},
"file_meta": {
"content_id": "1d7eb872... |
50ff17a8-37bc-4ee6-b093-4afa0165ff2c | rrivas-utec/prog3_2023_2_sec2_operadores | main.cpp | #include <iostream>
#include <vector>
using namespace std;
vector<int> concatenar(const vector<int>& a, const vector<int>& b) {
auto result = a;
for (const auto& item: b) {
result.push_back(item);
}
return result;
}
vector<int> operator+(const vector<int>& a, const vector<int>& b) {
return... | ALGO | 0.998549 | 5.022061 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-08-19T00:51:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c2495111d... |
2b3a33bd-4da9-48e8-9dde-4af0dcc28457 | TamimEhsan/CSES-Solutions | Graph Algorithms/Monsters.cpp | #include<bits/stdc++.h>
using namespace std;
#define INF 2047483647
#define INFL 9223372036854775807
#define ll long long
#define pii pair<ll,ll>
#define F first
#define S second
#define mp make_pair
#define pb push_back
#define ull unsigned long long
#define M 1000000007
#define FASTIO ios_base::sync_with_stdio(false)... | ALGO | 0.999917 | 4.234806 | {
"github_metadata": {
"branch": "master",
"commit_count": 60,
"repo_created_at": "2020-11-23T07:28:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 29,
"forks": 8,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "659acbdb... |
80718ef8-fc9d-4385-a906-d78dd4fc07fc | ankit-1S/cses_solution | searching and sorting/ques25(sliding cost).cpp | // problem set link -- https://cses.fi/problemset/
/* UserName - ankit_S
author- <NAME>
*/
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define FAST ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define ll long long
#define MOD 1000000007
int main(){
int n,k;
cin>> n>> k;
... | ALGO | 0.999972 | 3.920606 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2020-08-01T11:12:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fc3691d066... |
0f341ff3-0dc7-486f-9a78-b2ac09830ba6 | ehnryx/acm | samara-2016-cf100971/j.cpp | #include <bits/stdc++.h>
using namespace std;
#define _USE_MATH_DEFINES
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef complex<ld> pt;
typedef vector<pt> pol;
const char nl = '\n';
const int INF = 0x3f3f3f3f;
const ll INFLL = 0x3f3f3f3f3f3f3f3f;
const ll MOD = 1e9+7;
const ld EPS = 1... | ALGO | 0.999988 | 5.007718 | {
"github_metadata": {
"branch": "master",
"commit_count": 79,
"repo_created_at": "2018-05-03T04:18:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5939a4dba... |
a0b50cc6-10d9-4d35-904f-23357f697bc4 | transeos/hackerrank | cpp/exceptional_server.cpp | // -*- C++ -*-
//
//*****************************************************************
//
// hackerrank: https://www.hackerrank.com/challenges/exceptional-server/problem
//
// WARRANTY:
// Use all material in this file at your own risk.
//
// Created by Hiranmoy on 12/05/19.
//
//****************************************... | ALGO | 0.979101 | 5.873528 | {
"github_metadata": {
"branch": "master",
"commit_count": 91,
"repo_created_at": "2019-05-11T16:36:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fb0922519... |
3b8dfbd5-3bca-4a8f-8bdb-41a58da6f95b | emirpita/QuickSortAVX | speed.cpp | #include <cstdlib>
#include <cstdio>
#include <cstdint>
#include <cstring>
#include <cassert>
#include <algorithm>
#include <memory>
#include "cmdline.cpp"
#ifdef WITH_RUNTIME_STATS
# include "runtime_stats.cpp"
#endif
#include "input_data.cpp"
#include "quicksort-all.cpp"
#define USE_RDTSC // undef to get measurmen... | TEST | 0.987616 | 5.944234 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2021-01-03T14:59:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5692c218c... |
f934cc52-63f3-4f18-a2fa-d9d995e5293d | utkarshvaish9/random-codes | continuosOddNumebers.cpp | #include<bits/stdc++.h>
using namespace std;
#define clr(x) memset((x), 0, sizeof(x))
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define mp make_pair
#define fori(i, n) for(int i = 0; i < (int)(n); ++i)
#define forj(j, n) for(int j = 0;i < n; ++j)
#define ford(i, n) for(int i = (int)(n) - 1; i >= 0;... | ALGO | 0.999997 | 3.808292 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2017-03-02T04:41: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": "b117f1ad6f... |
2832b9ca-7377-44f1-abc7-5afa229d85ce | fr0streaper/huffman | huffman_lib/basic_structure/tree.cpp | //
// Created by fr0streaper on 05/10/18.
//
#include "tree.h"
#include <set>
#include <utility>
#include <stdexcept>
tree::tree()
{
root = nullptr;
}
tree::tree(counter const& data)
{
std::set<std::pair<uint64_t, tree_node*> > vertices;
for (uint16_t i = 0; i < ALPHABET_SIZE; ++i)
{
if (da... | ALGO | 0.995246 | 4.955823 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2018-10-06T00:46:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0bcde38de1... |
c1b531c5-d45c-4f88-b24e-f09ecd6665b1 | pranavdharrao/Polyglot-DSA-Solutions | Binary-Search/C++/oddOccurring.cpp | #include <iostream>
#include <vector>
using namespace std;
//PS - Find the odd occurring element in a array
// All elements occur even no. of times except one element
// All repeating occurrences of elements appear in pair, pairs are not adjacent
int solve(vector<int> arr){
int s = 0;
int e = arr.size() -1;
... | ALGO | 0.999908 | 4.461039 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2023-08-14T16:09: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": "9818e93d489... |
ea25870e-6992-4ac4-b2b6-cf0931164673 | alirz-pixel/Problem_solving | baekjoon/1107 리모컨.cpp | /*
백준 1107 리모컨 || 골드5
https://www.acmicpc.net/problem/1107
22일 전, 재풀이
시작시간 : 8:37 7:57
종료시간 : ?:?? 8:30
걸린시간 : 대략 2시간 정도 소요 -> 33분
시도횟수 : 2회 -> 2회
*/
#include <algorithm>
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int divided(vector<bool> brok... | ALGO | 0.999942 | 3.937212 | {
"github_metadata": {
"branch": "main",
"commit_count": 261,
"repo_created_at": "2023-04-08T13:32: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": "24c58a3db4... |
d7608bfc-1665-43c5-b2f1-924fd777b525 | PJLab-ADG/SensorsCalibration | online_calib/vins_camera2imu/ceres/internal/ceres/parallel_for.h | // Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2018 Google Inc. All rights reserved.
// http://ceres-solver.org/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of so... | TOOL | 0.954233 | 7.25944 | {
"github_metadata": {
"branch": "master",
"commit_count": 119,
"repo_created_at": "2021-12-09T08:08:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2758,
"forks": 641,
"issues": 140,
"pull_requests": 0
},
"file_meta": {
"content_id": "7d... |
d4c790d4-bf85-49ba-925b-b07171fcc5b2 | arangodb/arangodb | 3rdParty/boost/1.78.0/boost/graph/distributed/shuffled_distribution.hpp | // Copyright <NAME> 2007. Use, modification and distribution is
// subject to the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_SHUFFLED_DISTRIBUTION_070923_HPP
#define BOOST_SHUFFLED_DISTRIBUTION_070923_HPP
#ifndef BOOST_... | TOOL | 0.986146 | 6.332598 | {
"github_metadata": {
"branch": "devel",
"commit_count": 51986,
"repo_created_at": "2011-10-26T06:42:00.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13878,
"forks": 857,
"issues": 743,
"pull_requests": 38
},
"file_meta": {
"content_id": ... |
d04be9f8-7201-41b9-94dd-5ae534e8db41 | onkarkadam158/GFG | Easy/Row with minimum number of 1's/row-with-minimum-number-of-1s.cpp | //{ Driver Code Starts
// Initial Template for C++
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
// User function Template for C++
class Solution {
public:
int minRow(int N, int M, vector<vector<int>> A) {
// code here
int ind=0,num=M,flag=false;
for(int i=0;i<N;i+... | ALGO | 0.999663 | 6.237399 | {
"github_metadata": {
"branch": "main",
"commit_count": 533,
"repo_created_at": "2024-02-14T16:07:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eb32e94e0d... |
a8ea299a-bf99-4c31-b0f4-c433fca705a3 | OpenSat-zz/AZtrino | lib/libconfigfile/configfile.h | /*
* $Id: configfile.h,v 1.11 2003/09/25 18:52:27 thegoodguy Exp $
*
* Copyright (C) 2001, 2002 <NAME> <<EMAIL>>,
* thegoodguy <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the... | CONFIG | 0.955133 | 6.149422 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2011-12-16T15:44:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "808ecf5edf... |
764c3b3f-d1ab-4c96-b9b6-454166195028 | CGAL/cgal | Segment_Delaunay_graph_Linf_2/include/CGAL/Segment_Delaunay_graph_Linf_2/Constructions_C2.h | // Copyright (c) 2015 Università della Svizzera italiana.
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
//
// $URL$
// $Id$
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
//
//
// Author(s) : <NAME>, <NAME>, <NAME>
//<EMAIL>, <EMAIL>, <EMAIL>
#ifndef CGAL_SEGMENT_D... | ALGO | 0.998494 | 3.228101 | {
"github_metadata": {
"branch": "master",
"commit_count": 113659,
"repo_created_at": "2014-10-01T12:22:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5443,
"forks": 1475,
"issues": 511,
"pull_requests": 136
},
"file_meta": {
"content_id... |
cf89ad81-89b8-44ab-b5d1-55ed7b316cfd | RisshabSingla/Competitive-Programming | CSES /Sorting and Searching/14. Towers.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
const int mod = 1000000007;
int main()
{
ll n;
cin >> n;
vector<ll> arr(n);
for (ll i = 0; i < n; i++)
... | ALGO | 0.999992 | 4.766684 | {
"github_metadata": {
"branch": "main",
"commit_count": 138,
"repo_created_at": "2022-10-29T12:01: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": "b56e615439... |
adc99bc3-f7c0-440e-b2e9-0a1c676a0e9c | matiaslindgren/advent-of-code-cpp | src/2023/11.cpp | #include "aoc.hpp"
#include "ndvec.hpp"
#include "std.hpp"
namespace ranges = std::ranges;
namespace views = std::views;
using Vec2 = ndvec::vec2<unsigned long>;
using Points = std::vector<Vec2>;
using Ints = std::unordered_set<Vec2::value_type>;
constexpr auto sum{std::bind_back(ranges::fold_left, 0L, std::plus{})}... | ALGO | 0.997795 | 6.354164 | {
"github_metadata": {
"branch": "main",
"commit_count": 628,
"repo_created_at": "2023-09-24T20:13:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7eb56ad803... |
3b8f5cc1-8a55-462e-b711-0b575dfa0b55 | zyt1024/Add_test | test1/main.cpp | #include<iostream>
#define N 2
typedef long long dout_t;
typedef int din_t;
#define NO_SYNTH
dout_t add(din_t din[N],int width){
#ifdef NO_SYNTH
long long *out_accum = (long long *)malloc(sizeof(long long));
int * array_local = (int *)malloc(N * sizeof(int));
#else
//综合的时候使用以下进行替换
... | ALGO | 0.998897 | 3.639864 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2021-12-14T12:46: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": "14bbe7be21... |
1cf21657-a466-4f47-bc03-f85247d2c676 | abhijeetSinghRajput/chess-engine-cpp | main.cpp | #include <iostream>
#include <string>
#include "uci.hpp"
#include "utils.hpp"
#include "polyglot.hpp"
using namespace std;
#include "board.hpp"
// uint64_t key = <KEY>;
// uint16_t moves[3] = {5310, 1234, 5678};
// uint16_t weights[3] = {8012, 3456, 7890};
// uint32_t learns[3] = {0, 1, 2};
int main()
{
// st... | ALGO | 0.96604 | 4.270777 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2024-06-09T16:36:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 13,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "203f59c400... |
b485db93-cc84-49eb-a276-8e0e6f8fae41 | mhiu05/Code_PTIT | DSA/DSA01004_Sinh_to_hop.cpp | #include <bits/stdc++.h>
#define endl "\n"
#define second sc
#define first fi
using namespace std;
using ll = long long;
const int mod = 1e9 + 7;
const int MAXN = 1e6 + 1;
void faster()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
}
int X[1001], n, k, ok;
void sinh()
{
int i = k;
... | ALGO | 0.99998 | 3.954604 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2024-09-17T15:48:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f79ae376ce0... |
99a72a08-8090-41a8-8c0e-5ca4c85e1181 | alexgryzlov/aads | string/SuffArray + LCP.cpp | #include <iostream>
#include <utility>
#include <vector>
/// \brief: Builds suffix array on given string ending with a sentinel
/// (such symbol that sentinel < container is always true)
template <typename Container>
class SuffixArray {
private:
// Building consists of log N phases. On k-th step we sort cyclic shi... | ALGO | 0.999587 | 5.623591 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2021-02-05T09:34:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d791bef9dcc5... |
01c9e13a-0918-477f-a88e-c070a4b398fc | Ratwe/aa | passed/lab_02/src/lab_02/algo.cpp | #include "algo.h"
#include <iostream>
#include <windows.h>
MatrixSolver::MatrixSolver(vector<vector<double>>& mA, vector<vector<double>>& mB) : mA(mA), mB(mB) {
}
void MatrixSolver::set_matrices(vector<vector<double>>& A, vector<vector<double>>& B) {
mA = A;
mB = B;
}
void MatrixSolver::increase_matrices_to_... | ALGO | 0.999932 | 4.646567 | {
"github_metadata": {
"branch": "main",
"commit_count": 18,
"repo_created_at": "2023-10-16T11:31:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5d926e70a07... |
d45f1c83-8cfc-415b-8d2f-182dc0f3bb83 | RedSkiesIO/ac-core | gov/crypto/sha256.cpp | #include "sha256.h"
#include "endian_rw.h"
#include "base58.h"
#include <us/gov/likely.h>
#include <cstring>
using namespace us::gov::crypto;
using namespace std;
typedef us::gov::crypto::sha256 c;
c::sha256() : bytes(0) {
initialize(s);
}
void c::initialize(uint32_t* s) {
s[0] = 0x6a09e667ul;
s[1] = 0x... | ALGO | 0.907668 | 6.909785 | {
"github_metadata": {
"branch": "master",
"commit_count": 624,
"repo_created_at": "2019-02-16T18:23:35.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "20371470e... |
467c0184-ccc3-4948-9374-1d097160fa62 | gimmewhitewings/SIAOD-Files | СИАОД, Текстовый и двоичный файлы/filework.h | #pragma once
#include <fstream>
#include <string>
using namespace std;
void createFile(string fileName, int lines)
{
ofstream fout(fileName);
string str;
cin.ignore();
for (size_t i = 0; i < lines; i++)
{
getline(cin, str);
fout << str << '\n';
}
fout.close();
}
void printFile(string fileName) {
ifstrea... | TOOL | 0.946775 | 4.41119 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2022-09-23T08:40:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "82982c140f... |
4357a3f1-ae80-454b-89b7-9a7a09ab8341 | BOSON-18/leetcode | 2180-maximum-number-of-tasks-you-can-assign/maximum-number-of-tasks-you-can-assign.cpp | class Solution {
public:
bool check(vector<int>& tasks,vector<int>& workers,int pills,int strength,int mid){
int pillsUsed=0;
multiset<int> st(begin(workers),begin(workers)+mid);// best mid workers
for(int i=mid-1;i>=0;i--){
int required = tasks[i];
auto it = prev(st.end());
if(*it... | ALGO | 0.999979 | 5.802407 | {
"github_metadata": {
"branch": "main",
"commit_count": 902,
"repo_created_at": "2024-10-28T16:55: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": "39fa722592... |
63f4477f-e470-4da5-9521-77a6560072fa | sayymeoww/coding | OPT/tasks (demian)/block 2/day 11/task 1/task 1.cpp | #include <iostream>
#include <set>
#include <vector>
using namespace std;
struct segment {
int xl, xr;
int y;
int type;
segment(int xl, int xr, int y, int type)
: xl(xl), xr(xr), y(y), type(type) {}
bool operator<(segment s) const { return y < s.y; }
};
int main() {
int k, n;
ci... | ALGO | 0.999765 | 4.246349 | {
"github_metadata": {
"branch": "master",
"commit_count": 235,
"repo_created_at": "2023-07-01T21:44: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": "18bc5083... |
b6d05538-4b27-4ff3-a070-7bdc2295429b | liuyubobobo/Play-Leetcode | 0501-1000/0942-DI-String-Match/cpp-0942/main.cpp | /// Source : https://leetcode.com/problems/di-string-match/
/// Author : liuyubobobo
/// Time : 2018-11-17
#include <iostream>
#include <vector>
using namespace std;
/// Generating the result from 0
/// Adding the offset at last
///
/// Time Complexity: O(n)
/// Space Complexity: O(1)
class Solution {
public:
... | ALGO | 0.998246 | 4.822779 | {
"github_metadata": {
"branch": "master",
"commit_count": 2592,
"repo_created_at": "2016-12-01T17:08:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2732,
"forks": 718,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "0f... |
4d34de81-2e34-4861-8a5e-8db68b889ccb | hundan2015/PATAdvance | normal/1030WA.cpp | #include <limits.h>
#include <iostream>
#include <queue>
#include <stack>
#include <vector>
using namespace std;
struct node {
int cost = 0;
int parent;
};
struct state {
int nodeP;
int dist;
state(int _node, int d) : nodeP(_node), dist(d) {}
};
struct cmp {
bool operator()(const state* s1, co... | ALGO | 0.999924 | 3.930199 | {
"github_metadata": {
"branch": "master",
"commit_count": 50,
"repo_created_at": "2022-03-29T08:01:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a2ff8db0b... |
75b089e7-8e16-4fb3-9da7-4189b8d787fb | hoainam1401/DataStructures-Performance-Benchmark | structures/bintree.cpp | #include "bintree.h"
#include <fstream>
#include <iostream>
using namespace std;
BST::BST() {
this->root = NULL;
this->cnt = 0;
}
BST::~BST() { deleteTree(BST::getRoot()); }
struct NodeTree *BST::getRoot() { return this->root; }
struct NodeTree *BST::insertNodeTree(struct NodeTree *root, float data) {
struct ... | ALGO | 0.998085 | 3.249048 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-05-11T13: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": "79d091c06811... |
c6b84bac-00bb-474f-bc74-6c5f147f39cb | FrodoAlaska/Nikola | nikola/include/nikola/nikola_file.h | #pragma once
#include "nikola_base.h"
#include "nikola_containers.h"
#include "nikola_math.h"
#include "nikola_audio.h"
#include "nikola_pch.h"
//////////////////////////////////////////////////////////////////////////
namespace nikola { // Start of nikola
// Forward declaration to help with compilation time.
stru... | TOOL | 0.92236 | 7.113639 | {
"github_metadata": {
"branch": "master",
"commit_count": 246,
"repo_created_at": "2024-11-24T00:26:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 1,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "95f2364c... |
5e0c2f8c-6378-4869-aa19-5135bba80193 | heaven-in-a-wildflower/COL380 | lab1/check.cpp | #include <iostream>
#include <vector>
#include <map>
#include <utility>
#include <cstdlib>
#include <ctime>
#include <random>
#include <algorithm>
#include "check.h"
#include <chrono>
#include <omp.h>
using namespace std;
bool black_box()
{
return true;
}
vector<vector<int>> multiply_blocks(vector<vector<int>> &... | ALGO | 0.999666 | 4.276586 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2025-05-28T08:33: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": "354f2b9060a8... |
0faf6110-9f09-452e-a0f7-462de2e91910 | Ctwqk/cvCodes | hw4/kmeans.cpp | /*
<NAME>
Spring 2024
CS 5330
Implementation of a K-means algorithm
*/
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <opencv2/opencv.hpp>
#include "kmeans.h"
/*
data: a std::vector of pixels
means: a std:vector of means, will contain the cluster means when the function returns
label... | ALGO | 0.999474 | 6.343861 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2024-01-27T18:06:00.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fd2597f98a3... |
422be790-963c-44c4-90a1-1820e073f056 | mgroling/Algorithms-and-Datastructures | Problems/Popup24/HW5/B/solution.h | /*
----------------------------------------------------- PROBLEM -----------------------------------------------------
----------------------------------------------------- INPUT -----------------------------------------------------
----------------------------------------------------- OUTPUT ----------------------... | ALGO | 0.999188 | 5.506798 | {
"github_metadata": {
"branch": "main",
"commit_count": 133,
"repo_created_at": "2023-05-11T11:14: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": "66bae1e473... |
ba0bc81a-c4d8-4f0f-9e08-29df0442a4da | ishandutta2007/codeforces-j | jaroslavurban/normal/1343/D.cpp | #ifndef __PROGTEST__
#include <bits/stdc++.h>
using namespace std;
#endif // __PROGTEST__
typedef long long ll;
typedef long double ld;
#define pb(x) push_back(x)
#define ff first
#define ss second
#define vec vector
#define all(x) (x).begin(), (x).end()
#define inf 9223372036854775807
#define mod 998244353
// #define... | ALGO | 0.999901 | 4.606919 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T05:42:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c6c009efb3c9... |
6fbef447-854e-4a63-99b1-83fecd44e277 | jerryaffricot/SNHU_CS300_Portfolio | CoursePlanner/CoursePlanner/CoursePlanner.cpp | //============================================================================
// Name : CoursePlanner.cpp
// Author : <NAME>
// Version : 1.0
// Copyright : Copyright © 2017 SNHU COCE
// Description : Hello World in C++, Ansi-style
//===================================================================... | TOOL | 0.975658 | 4.028827 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2022-02-27T19:39:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "499427ea4fa7... |
c4b57fe6-3a92-40ba-b493-f0386dfb3f6c | Turbstructor/AlgorithmDuoParty | Workspace_yechan/Baekjoon_yechan/BFS/5427.cpp | // baekjoon 5427 yechan
#include <cstdio>
#include <algorithm>
#include <queue>
#include <cstring>
#include <vector>
using namespace std;
#define MAX_N 1001
const int dx[4] = {0, 0, -1, 1};
const int dy[4] = {-1, 1, 0, 0};
const int INF_MAX = 987654321;
typedef pair<int, int> P;
int visited[MAX_N][MAX_N];
char board[M... | ALGO | 0.999836 | 3.644203 | {
"github_metadata": {
"branch": "master",
"commit_count": 46,
"repo_created_at": "2018-10-22T12:21:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0512832e9... |
2bce85f1-dea5-4614-b32b-570b8f436c60 | sakirmohammad775/C-for-DSA | Z_Binary_Search.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n, q;
cin >> n >> q;
int a[n];
for (int i = 0; i < n; i++)
{
cin >> a[i];
}
sort(a,a+n);
while (q--)
{int value;
cin >> value;
int flag = 0;
int l = 0;
int r = n - 1;
while (l<=r)
{
... | ALGO | 0.999985 | 4.363723 | {
"github_metadata": {
"branch": "main",
"commit_count": 94,
"repo_created_at": "2024-11-17T04:32:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4e209485abc... |
b9a28da4-9c0e-4e48-89bf-e989bca0b963 | zeroday-zaddy/cs480-puzzlesolver | reader.cpp | #include "reader.h"
#include "uniform_cost_search.h"
#include "informed_search.h"
SolverFactory::SolverPair SolverFactory::_known_solvers[] = {
{"Uniform", std::unique_ptr<Solver>(new UniformCostSearch())},
{"Informed", std::unique_ptr<Solver>(new InformedSearch())}
};
Solver* SolverFactory::createSolver(std... | ALGO | 0.909493 | 5.25555 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2023-02-25T20:21: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": "3bf111c21e... |
3b9be5a2-1b7d-4ebb-b138-5cb5d9dc418d | kuyanov/algorithms | src/ntt.h | #include <vector>
using namespace std;
namespace NTT {
using ll = long long;
const int mod = 998244353;
const int root_pw = 1 << 23; // mod = c * root_pw + 1
const ll root = 15311432; // root ^ root_pw = 1
ll pw(ll a, ll b) {
if (b == 0) return 1;
if (b % 2 == 1) {
re... | ALGO | 0.999873 | 5.425305 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2022-03-02T14:53:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "70078fbec268... |
ad941394-7d9d-4c61-b721-1725ae9c0b3e | builtforhjk/my-first-repository | pat-1032-Sharing.cpp | #include <iostream>
#include <cstdio>
#include <unordered_map>
using namespace std;
typedef struct Node{
int addr;
char val;
int next;
Node(){}
Node(int a,char x, int y):addr(a),val(x),next(y){}
}Node;
unordered_map<int, Node> linklist;
int root1, root2;
int n;
int main(){
scanf("%d %d %d",&root1,... | ALGO | 0.999803 | 3.2848 | {
"github_metadata": {
"branch": "master",
"commit_count": 126,
"repo_created_at": "2017-09-21T01:23:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "962037cd... |
7e3aa578-4313-4f07-91de-e23ab5c9a6d4 | anhbui0803/PTIT_SPOJ | BCNEPER.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
//int main()
//{
// int t;
// cin >> t;
// for (int i = 1; i <= t; i++) {
// vector<int> v;
// int n;
// string s;
// cin >> n >> s;
// int k = s.size();
// for (int j = 0; j < k; j++) {
// ... | ALGO | 0.999908 | 4.035033 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2023-04-08T01:56: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": "7dabca9b9fc3... |
06aac086-6bbd-4813-80f7-cfeaf9c66666 | AyanGadpal/BE-IT-assignments | SE/SEM 2/Practical/DSFL/Practice/Assingment 9/hashing.cpp | #include <iostream>
#include <iomanip>
#include <string.h>
#define MAX 10
using namespace std;
int hashF(int i)
{
return i % MAX;
}
class Student
{
public:
char name[30];
int tel;
Student()
{
strcpy(name, "Empty");
tel = 0000;
}
Student(char name[], int tel)
{
... | ALGO | 0.973321 | 4.011359 | {
"github_metadata": {
"branch": "master",
"commit_count": 238,
"repo_created_at": "2019-02-17T16:13:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "471f7334... |
438d4f6a-288b-402e-b845-c1b493c76f0b | chosanglyul/PS | BOJ/3015.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef pair<int, pi> pii;
typedef pair<ll, ll> pl;
typedef pair<ll, pl> pll;
#define fi first
#define se second
const int INF = 1e9+1;
const int P = 1000000007;
const ll LLINF = (ll)1e18+1;
template <typename T>
ostream& ope... | ALGO | 0.99996 | 4.008651 | {
"github_metadata": {
"branch": "main",
"commit_count": 60,
"repo_created_at": "2021-02-15T09:25: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": "4b48159b72b... |
c4527bb7-91a3-4387-a2ee-09f0482badde | kassonlab/gmxapi | src/gromacs/linearalgebra/gmx_lapack/dormbr.cpp | #include "../gmx_lapack.h"
#include "lapack_limits.h"
void
F77_FUNC(dormbr,DORMBR)(const char *vect,
const char *side,
const char *trans,
int *m,
int *n,
int *k,
double *a,
int *lda,
double *tau,
double *c__,
int *ldc,
double *work,
int *lwork,
int *info)
{
int a_dim1, a_offset, c_dim1, ... | ALGO | 0.984988 | 4.775976 | {
"github_metadata": {
"branch": "master",
"commit_count": 19315,
"repo_created_at": "2017-05-25T14:05:14.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 53,
"forks": 13,
"issues": 93,
"pull_requests": 2
},
"file_meta": {
"content_id": "2818... |
7b162ff8-83ca-43ee-800e-56cb704ca170 | kimhyeing/Algorithm | 백준/Gold/1753. 최단경로/최단경로.cc | #include<iostream>
#include<vector>
#include<queue>
using namespace std;
#define INF 1e9
#define MAX_NODE 20001
vector<pair<int, int>>graph[MAX_NODE];
int dist[MAX_NODE];
void dijkstra(int start) {
priority_queue<pair<int, int>>PQ;
PQ.push(make_pair(0, start));
dist[start] = 0;
while (!PQ.empty()) {
int cost... | ALGO | 0.999983 | 3.936043 | {
"github_metadata": {
"branch": "main",
"commit_count": 273,
"repo_created_at": "2021-11-04T07:26:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "54abe38062... |
7130763b-60ca-486f-b633-92344625491b | vfolunin/archives-solutions | LeetCode/2608.cpp | class Solution {
int bfs(vector<unordered_set<int>> &graph, int start, int finish) {
vector<int> dist(graph.size(), 1e9);
queue<int> q;
dist[start] = 0;
q.push(start);
while (!q.empty()) {
int v = q.front();
q.pop();
if (v ==... | ALGO | 0.999907 | 5.289356 | {
"github_metadata": {
"branch": "master",
"commit_count": 2367,
"repo_created_at": "2017-11-27T10:19:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 1,
"pull_requests": 5
},
"file_meta": {
"content_id": "e744b80... |
3257391c-1b51-4531-b340-57de93abb89f | Shinjirow/ProCon | AtCoder/ARC103/probC.cpp | //#include "bits/stdc++.h"
#include <iostream>
#include <vector>
#include <map>
#include <utility>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <stack>
#include <queue>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <numeric>
#include <complex>
#include ... | ALGO | 0.999942 | 3.698894 | {
"github_metadata": {
"branch": "master",
"commit_count": 115,
"repo_created_at": "2018-10-01T05:21: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": "28bd6f24... |
225e4665-0512-4971-a99c-fa7042b04a10 | ishandutta2007/codeforces-w | wenhao801/normal/1393/B.cpp | #include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <ctime>
using namespace std;
inline int read () {
int ret = 0, t = 1;
char c = getchar();
while ((c < '0' || c > '9') && c != '-') c = getchar();
if (c == '-') t = -1, c = getchar();
while (c >= '0' && c <= '9')... | ALGO | 0.999967 | 3.903173 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:34:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b7c4324b5f3c... |
0830d971-a483-423b-83dc-207c7f5a718e | VANSHPRAJAPATI115/DSA | Linklist/leetcode/remove-element.cpp | #include <iostream>
#include <vector>
using namespace std;
class Solution {
public:
int removeElement(vector<int>& nums, int val) {
int k = 0;
for (int i = 0; i < nums.size(); i++) {
if (nums[i] != val) {
nums[k] = nums[i];
k++;
}
}
... | ALGO | 0.999846 | 5.814267 | {
"github_metadata": {
"branch": "main",
"commit_count": 119,
"repo_created_at": "2024-05-23T03:15: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": "fea27fe02a... |
30e437dc-2056-4f66-8a87-60d7ebc7a832 | C-B-U/algorithm_challenge | 시즌11/중/kkanghyun/1010_9_kkanghyun.cpp | #include <iostream>
using namespace std;
bool bTrue[26][26];
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
char a, b;
string s; // is
for (int i = 0; i < n; ++i)
{
cin >> a >> s >> b;
bTrue[a - 'a'][b - 'a'] = true;
}
for (in... | ALGO | 0.999725 | 4.373443 | {
"github_metadata": {
"branch": "main",
"commit_count": 2333,
"repo_created_at": "2022-04-27T14:04:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 14,
"forks": 68,
"issues": 6,
"pull_requests": 8
},
"file_meta": {
"content_id": "7657c91d... |
40cec590-26d4-41b6-ad50-12895576d4df | cliaker/Exercise | 19200213李铖彧10/19200213李铖彧10.cpp | #include <iostream>
#include <cmath>
using namespace std;
const double PI = 3.1415926535;
class Point
{
private:
double x, y;
public:
Point()
{
x = 0;
y = 0;
}
Point(double xv, double yv)
{
x = xv;
y = yv;
}
Point(Point& pt)
{
x = pt.x;
y = pt.y;
}
double Getx()
{
return x;
}
double Gety()... | ALGO | 0.994808 | 3.789896 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-10-02T09:50:41.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2e49e77576a8... |
7173bbc3-13b4-4f54-b2bc-afeb9e3e6a1e | LuaDist/iup | srcmglplot/mgl/mgl_pde.cpp | /***************************************************************************
* mgl_pde.cpp is part of Math Graphic Library
* Copyright (C) 2007 <NAME> <<EMAIL>> *
* *
* This program is free software; you can redistribute it and/or ... | ALGO | 0.999948 | 3.234926 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2012-09-04T11:51:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 82,
"forks": 16,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b8ab79ee2... |
13906434-dd4b-4e08-a8ae-c03fd22f9fc9 | girving/pentago | pentago/mpi/flow.cc | // Endgame computation structure code with interleaved communication and compute
#include "pentago/mpi/flow.h"
#include "pentago/end/compute.h"
#include "pentago/end/trace.h"
#include "pentago/mpi/ibarrier.h"
#include "pentago/mpi/requests.h"
#include "pentago/mpi/utility.h"
#include "pentago/end/fast_compress.h"
#inc... | ALGO | 0.997785 | 5.284047 | {
"github_metadata": {
"branch": "main",
"commit_count": 719,
"repo_created_at": "2012-02-06T00:37:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 52,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cf0a7dca8... |
a28d186c-0c29-433e-ad40-d753d2434eaa | y-kitamu/ProgrammingContest | LeetCode/wc294/d.cpp | /**
* @file d.cpp
* @brief
* @author <NAME> <<EMAIL>>
* @date 2022-05-22 11:51:01
*/
#include <bits/stdc++.h>
class Solution {
void print_vec(std::vector<long long int>& vec) {
for (auto& v : vec) {
std::cout << v << " ";
}
std::cout << std::endl;
}
public:
int ... | ALGO | 0.999967 | 4.873729 | {
"github_metadata": {
"branch": "master",
"commit_count": 434,
"repo_created_at": "2018-01-24T14:30:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 13,
"pull_requests": 0
},
"file_meta": {
"content_id": "401b70d... |
9cd12e29-8bc6-4ab4-81fa-4cc880237c07 | khaledsliti/CompetitiveProgramming | AtCoder/abc237/F.cpp | // RedStone
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define endl '\n'
#define D(x) cerr << #x << " = " << (x) << '\n'
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
typedef long long ll;
const int Mod = 9982... | ALGO | 0.999986 | 4.459623 | {
"github_metadata": {
"branch": "master",
"commit_count": 454,
"repo_created_at": "2019-02-20T20:20:22.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d06e4eb1... |
f545b395-f667-40c8-b286-d68d0601db81 | afterthat97/acm-solutions | CODEVS/2178.cpp | #include <stdio.h>
#include <cstring>
#include <stack>
using namespace std;
stack<int> num;
stack<char> opt;
inline int pow(const int& a, const int& b) {
int ans = 1;
for (int i = 0; i < b; i++)
ans *= a;
return ans;
}
inline char* init(char *a) {
int cnt = 0, len = strlen(a);
for (int i = 0; i < len; i++) {
... | ALGO | 0.999974 | 3.811185 | {
"github_metadata": {
"branch": "master",
"commit_count": 59,
"repo_created_at": "2017-10-11T01:27:09.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9729a2892... |
52456319-3e4b-4176-ac97-44ce6054ec27 | motonobu-t/algorithm | フォーム対応/VisualC++/CLR/Chap6/Rei50/Rei50/Form1.h | #pragma once
#include "Form2.h"
#include <wchar.h>
#include <locale.h>
#include <vcclr.h >
#define Max 100
#define nil -1
struct tnode {
int left; /* 左へのポインタ */
wchar_t node[30]; /* 構造体メンバにString^は使えない */
int right; /* 右へのポインタ */
};
struct tnode a[Max]={{1 ,L"芸能人ですか" ,2},
{... | TOOL | 0.932927 | 4.705958 | {
"github_metadata": {
"branch": "master",
"commit_count": 16,
"repo_created_at": "2017-03-19T04:39: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": "f1db43687... |
35dd97ce-6539-40c7-81c8-5b2a26001c13 | dzungvd98/Data-Structure-and-Algorithms | Week 2/DoiTien.cpp | #include <iostream>
using namespace std;
const int danhSachMenhGia[10] = {500000, 200000, 100000, 50000, 20000, 10000, 5000, 2000, 1000, 500};
int soLuongToTien[10] = {0};
void doiTien(int &soTienCanDoi) {
for(int i = 0; i < 10; i++) {
int menhGia = danhSachMenhGia[i];
if(soTienCanDoi / menhGia > 0 && soTienCanDo... | ALGO | 0.967413 | 3.542222 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2024-09-13T14:56:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "130062587288... |
9683b9cb-c4dc-4aca-8420-1be26ef680bd | EvanChisholm1/Competitive-Programming-Practice | combining-rice-balls/main.cpp | #include<bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
int n;
cin >> n;
ll balls[100];
for (int i = 0; i < n; i++) {
cin >> balls[i];
}
ll dp[405][405];
for(int i = 0; i < 405; i++) {
for (int j = 0; j < 405; j++) {
dp[i][j] = -1;
... | ALGO | 0.999994 | 4.065069 | {
"github_metadata": {
"branch": "main",
"commit_count": 126,
"repo_created_at": "2021-10-31T21:18: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": "9c7b211553... |
76ae0787-7643-4103-a62f-435cfb5a1695 | dhruv12399/My-Codes | CCIRCLES.cpp | #include <bits/stdc++.h>
#include <stdio.h>
using namespace std;
#define F(i,a,b) for(ll i = a; i <= b; i++)
#define RF(i,a,b) for(ll i = a; i >= b; i--)
#define pii pair<ll,ll>
#define PI 3.14159265358979323846264338327950288
#define ll long long
#define ff first
#define ss second
#define pb(x) push_back(x)
#define mp... | ALGO | 0.99991 | 3.677004 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2018-10-23T07:22:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a03e532e61... |
89be5617-c69c-4ef0-8294-9a9f946a3729 | sforn-null/test | 删除链表中所有重复结点.cpp | #include<stdio.h>
//
//在一个排序的链表中,
// 存在重复的结点,
// 请删除该链表中重复的结点,
// 重复的结点不保留,返回链表头指针。
// 例如,链表1->2->3->3->4->4->5 处理后为 1->2->5
//
struct ListNode {
int val;
struct ListNode *next;
ListNode(int x) :
val(x), next(NULL) {
}
};
class Solution {
public:
ListNode* deleteDuplication(ListNode* pHead... | ALGO | 0.999864 | 3.891635 | {
"github_metadata": {
"branch": "master",
"commit_count": 94,
"repo_created_at": "2021-02-25T10:05: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": "2d0b1742a... |
50bc903c-7e69-494a-8b73-e4e8209a75f8 | Tanjim131/Problem-Solving | UVa/12157.cpp | #include <iostream>
int main(int argc, char const *argv[])
{
int T, k = 0;
std::cin >> T;
while(T--){
int N;
std::cin >> N;
int mile = 0, juice = 0;
for(int i = 0 ; i < N ; ++i){
int duration;
std::cin >> duration;
mile += ((duration / 30)... | ALGO | 0.999451 | 3.902282 | {
"github_metadata": {
"branch": "master",
"commit_count": 137,
"repo_created_at": "2020-05-27T20:39:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d8e5560b... |
ce1583b1-0d7a-4f10-9ee6-08b1ea9696a1 | Youngjun-Kim-02/ICS3U-Unit6-03-cpp | smallestNumber.cpp | // Copyright (c) 2021 <NAME> rights reserved
//
// Created by: <NAME>
// Created on: June 2021
// This program uses an array
#include <iostream>
#include <random>
#include <array>
template<size_t N>
int FindSmallestNumber(std::array<int, N> randomNumbers) {
int SmallestNumber = randomNumbers[0];
for (int co... | ALGO | 0.99941 | 4.680828 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-06-03T19:22:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4f6f983f7921... |
2858bcbf-c569-4037-b168-f7b891c347ba | intfloat/AlgoSolutions | leetcode/LongestUnivaluePath.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.999822 | 6.052893 | {
"github_metadata": {
"branch": "master",
"commit_count": 527,
"repo_created_at": "2013-04-16T14:53:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4af4ac1... |
a8390e01-3abf-4278-bf4e-07f6b826c4bf | KimNattanan/compet | beta/tumso20_disaster2.cpp | #include<bits/stdc++.h>
using namespace std;
using ll=long long;
using pii=pair<int,int>;
#define f first
#define s second
#define eb emplace_back
#define sz(x) (int)(x).size()
const ll inf=LLONG_MAX>>1;
ll d[100005],P[100005],C[100005],qs[100005],qs2[100005];
pair<ll,int> dp1[100005],dp2[100005];
struct line{
l... | ALGO | 0.999941 | 3.650638 | {
"github_metadata": {
"branch": "main",
"commit_count": 595,
"repo_created_at": "2023-09-16T09:01:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "97335b4a3d... |
4f094e3d-5097-42b4-bbc7-35cfe72f1ac3 | Seo-A-Nam/school_Data-Structure | assignments/2nd_week/splited_files/assigment5.h | #ifndef _ASSIGNMENT5_H_
#define _ASSIGNMENT5_H_
#include <iostream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;
template <typename T>
struct StackNode
{
T data;
struct StackNode* pLink;
};
template <typename T>
struct LinkedStack
{
int currentElementCount;
StackNode<T>* ... | ALGO | 0.962134 | 4.054032 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2021-12-25T13:56: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": "649666794... |
b1e766f8-9d97-4a27-b5fb-8b9c792e2e3d | DaphneGiorgi/IBMPopSim | inst/include/event_full_interaction_template.cpp | #ifndef __INTERACTION
#define __INTERACTION
#endif
// Event "_NAME_"
struct event_J_ : public event {
double __lambda(unsigned _k, population & pop, double t, context & cntxt) const {
individual & I = pop[_k];
double _sum = 0;
for (unsigned _j = 0; _j < pop.individuals.size(); ++_j) {
... | ALGO | 0.993302 | 4.486979 | {
"github_metadata": {
"branch": "release",
"commit_count": 20,
"repo_created_at": "2020-03-09T20:37:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "39cf4869... |
90980d75-76f5-4388-ab28-7e355edee55c | UWaterlooIR/gathera | CALEngine/src/bmi_forget.h | #ifndef BMI_FORGET_H
#define BMI_FORGET_H
#include <random>
#include <iostream>
#include <algorithm>
#include "bmi.h"
#include "classifier.h"
class BMI_forget:public BMI {
std::unordered_map<const SfSparseVector*, int> judgment_order;
const int num_remember;
int cur_time_rel = 0;
int cur_time_nonrel ... | ALGO | 0.926965 | 5.764073 | {
"github_metadata": {
"branch": "master",
"commit_count": 161,
"repo_created_at": "2020-09-09T18:40:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 3
},
"file_meta": {
"content_id": "2974779e1... |
1c6579b8-a1d5-4a1c-93a8-a7e24217ad9e | kricka91/EuclideanTSP | src/c++ETSP/Node.cpp | #include <cstdlib>
#include <cmath>
#include <cstdio>
#include <vector>
#include "Path.h"
#include "TSPSolver.h"
#include "Node.h"
#define MIN_INT -2147483648
#define MAX_INT 2147483647
#define MIN_SHORT -32768
#define MAX_SHORT 32767
using namespace std;
//Constructor
//n = number of nodes
Node::Node(double x, d... | ALGO | 0.999978 | 4.378226 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2013-11-27T20:45:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c5123ef57... |
527a9c42-a4dd-41ff-87c6-83648c93e9f6 | w86065256/ShuJuJieGouPJ | DataStructureProject/yourcode/codes/use_rtree.cpp | #include "use_rtree.h"
#include "Box.h"
#include "methods.h"
#include <algorithm>
RTree< int , double , 2> tree1;
RTree< Pii , double , 2> tree2;
//RTree< int , double , 2> tree3;
std::map<int , Polygon> polys;
//std::map<int , points> points;
void add_poly_1(const Polygon & poly)
{
const Box & box = poly.box;
doub... | ALGO | 0.998717 | 3.96203 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2018-12-28T14:39: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": "620598015... |
2bd8ac1f-5bc8-480b-8900-e1510ec518c6 | StSerana/algorithms_lab3 | main.cpp | #include <iostream>
using namespace std;
// Функция вывода матрицы
void PrintMatr(float **mas, int m) {
int i, j;
for (i = 0; i<m; i++) {
for (j = 0; j<m; j++)
cout << mas[i][j] << " ";
cout << endl;
}
}
// Получение матрицы без i-й строки и j-го столбца
void GetMatr(float **mas... | ALGO | 0.999988 | 4.0761 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2021-05-11T18:09: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": "afe8f42e14... |
e39888e0-702d-4c0b-9eb3-1b5d3bd0b26e | ishandutta2007/codeforces-m | mr_eight/normal/364/E.cpp | //#include <bits/stdc++.h>
#include <iostream>
#include <iomanip>
#include <math.h>
#include <cmath>
#include <algorithm>
#include <climits>
#include <functional>
#include <cstring>
#include <string>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <dequ... | ALGO | 0.999845 | 3.432517 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-06-06T01:03: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": "33526cab76f9... |
f2916ded-fcf8-42b9-9cc9-061eb63056ce | ishandutta2007/codeforces-d | dlalswp25/normal/1613/E.cpp | #include <bits/stdc++.h>
using namespace std;
int N, M;
vector<char> A[1010101];
vector<int> B[1010101];
char S[1010101];
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int main() {
int tc; scanf("%d", &tc);
while(tc--) {
scanf("%d%d", &N, &M);
for(int i = 1; i <= N; i++) {
A[i].resize(M + 1);
B[... | ALGO | 0.999835 | 3.691324 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:31:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f8245613440a... |
c17bc151-b745-4c16-98fc-f40d83696ba0 | brmontgomery/AdventOfCode | 2015/AoC_2015/src/Day16/Day16.h | #pragma once
#include <iostream>
#include "AoCUtilities.h"
struct Sue {
int children, cats, samoyeds, pomeranians, akitas, vizslas, goldfish, trees, cars, perfumes;
};
void AoC2015D16P1() {
std::vector<std::string> input = getFileInput(".//src//Day16//Day16.txt");
//get the information for all aunts
... | ALGO | 0.943357 | 4.116699 | {
"github_metadata": {
"branch": "main",
"commit_count": 59,
"repo_created_at": "2024-05-02T03:13: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": "fb44a71b2cb... |
be6801d5-9017-41fd-9e48-56b0b6c7757e | Yefri97/Competitive-Programming | Contests/Others/RPC/2017/07nd Contest/D.cpp | #include <bits/stdc++.h>
#define endl '\n'
#define debug(X) cout << #X << " = " << X << endl
#define fori(i,b,e) for (int i = (b); i < (e); ++i)
#define mod(x,m) ((((x) % (m)) + (m)) % (m))
#define sq(x) (x) * (x)
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<... | ALGO | 0.999895 | 4.102423 | {
"github_metadata": {
"branch": "master",
"commit_count": 378,
"repo_created_at": "2016-06-01T01:51:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b0908ebe... |
9b4e88c1-7aaf-490d-b21f-f52334a6178f | 269Seahorse/NDHU-CSIE-HW | S2/W5/411221307-HW13.cpp | #include <bits/stdc++.h>
using namespace std;
class matrix{
private:
vector<vector<int>> matrix;
int n = 0;
public:
void scan(){
cin >> n;
matrix.resize(n, vector<int>(n));
for(int i = 0; i < n; i++){
for(int j = 0; j < n; j++){
cin >> matrix[i][j];
... | ALGO | 0.999525 | 4.435116 | {
"github_metadata": {
"branch": "main",
"commit_count": 48,
"repo_created_at": "2023-10-31T07:18:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "adab0566c40... |
fe1d592b-f376-47ac-8f5e-10d69bf997f2 | fogsail/solution-to-ICPC | chapter9/exercises/POJ1722/main.cpp | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <vector>
#include <stack>
#include <map>
#include <set>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <bitset>
#include <assert.h>
using namespace std;
typedef long long llong;
t... | ALGO | 0.999986 | 3.249014 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2019-05-27T07:23:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7d59e53cb7... |
c255a943-78a1-45cb-a036-cc55193d9bc9 | paullicata/mastermind | code.cpp |
#include <iostream>
#include <string>
#include <array>
#include <stdlib.h>
#include <ctime>
#include "code.h"
using namespace std;
void Code::generateSecretCode()
{
int i;
int num;
isSecret = true;
for(i = 0; i < CODE_LENGTH; i++){
num = rand() % 6;
switch(num){
case 0:
pattern[i]... | ALGO | 0.978727 | 3.560649 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-05-13T03:10:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "26f53c499b... |
97c60ddf-1bb9-41ae-a36e-d91fc7474ec6 | klee/klee | include/klee/ADT/Bits.h | //===-- Bits.h --------------------------------------------------*- C++ -*-===//
//
// The KLEE Symbolic Virtual Machine
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===------------------------------------------------------... | ALGO | 0.962543 | 7.212859 | {
"github_metadata": {
"branch": "master",
"commit_count": 2788,
"repo_created_at": "2013-07-21T22:03:03.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2800,
"forks": 696,
"issues": 86,
"pull_requests": 8
},
"file_meta": {
"content_id": "52... |
50086e18-acba-4f21-b7ab-8d00ef896a3b | namansinghal200/leetcode-simplified | Dynamic_Programming/grid_dp/Array_Description.cpp | #include <bits/stdc++.h>
using namespace std;
#define int long long int
void solve()
{
int n, m;
cin >> n >> m;
vector<int> v(n);
for (auto &i : v)
cin >> i;
vector<vector<int>> dp(n, vector<int>(m + 1, 0));
int mod = 1e9 + 7;
if (v[0] != 0)
dp[0][v[0]] = 1;
else
{... | ALGO | 0.999987 | 4.124999 | {
"github_metadata": {
"branch": "main",
"commit_count": 36,
"repo_created_at": "2025-05-15T19:14:50.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "8d97ab3739f... |
d81bd3b3-51fa-4785-9fd0-04a1d024c76d | PascalXie/Localization-with-Map-and-Obstacles | ssl_rssi_2D_mapAndObstacles_signalPower/step2-observationGenerator/src/NewtonsCostFunction.cc | #include "NewtonsCostFunction.hh"
//-------------------------
// Constructor
//-------------------------
NewtonsCostFunction::NewtonsCostFunction(string name, int SizeObservations, int SizeVariables, int SizeResiduals)
: UserCostFunction(name+"_SuperType",SizeObservations,SizeVariables,SizeResiduals),
name_(name),
d... | ALGO | 0.976528 | 3.851833 | {
"github_metadata": {
"branch": "master",
"commit_count": 19,
"repo_created_at": "2019-08-06T22:54:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "102de7a75... |
39778a38-046a-4bf6-a16d-1857844c11a7 | Merivas/FUDP-2025 | Condicional-if/ejemplo3.cpp | /*
============================================================================
ENUNCIADO DEL PROGRAMA:
----------------------------------------------------------------------------
Este programa calcula el área de un círculo a partir del radio ingresado
por el usuario.
Utiliza una aproximación ... | ALGO | 0.999755 | 6.333085 | {
"github_metadata": {
"branch": "main",
"commit_count": 46,
"repo_created_at": "2024-09-11T02:10:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1e63e33ec95... |
421db0c7-13ce-41d5-a63e-40b506b26aab | Born0/Academic-Code-Practice-AIUB- | Graphics_C++/Transformation/Main.cpp | #include<iostream>
#include <windows.h>
#include <GL/glut.h>
#include<cmath>
using namespace std;
int x1,x2,x3,x4,Y1,y2,y3,y4;
int tx,ty;
double q,Q,pi=3.1416;
void displayTR()
{
glClear(GL_COLOR_BUFFER_BIT);
glColor3ub(100,0,0);
glPointSize(3.0);
glBegin(GL_QUADS);
glVertex2i(x1,Y1);
glVerte... | ALGO | 0.983175 | 3.861933 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2020-10-15T12:53:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f5e09941d... |
1361a631-d0d1-462c-ada0-90f2b01367eb | ninad-moree/DataStructuresAlgorithms | Strings/1781-SumOfBeautyOfAllSubstrings.cpp | /*
The beauty of a string is the difference in frequencies between the most frequent and least frequent characters. For example, the beauty of
"abaacc" is 3 - 1 = 2. Given a string s, return the sum of beauty of all of its substrings.
Example 1:
Input: s = "aabcb"
Output: 5
Explanation: The su... | ALGO | 0.99995 | 5.080566 | {
"github_metadata": {
"branch": "main",
"commit_count": 1213,
"repo_created_at": "2023-12-12T04:49: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": "79e9cf9b0... |
f9e4c5ce-ed36-4863-a6d5-a556e44d7870 | lvyangyang/algorithm | graph/bfs.cpp | #include<iostream>
#include<queue>
#include<list>
#include<map>
using namespace std;
enum COLOR{white,gray,black};
struct vertex
{
string name;
COLOR color;
int distance;
list<string> edge_list;
string parent;
};
int main()
{
map<string,vertex> v_map;
vertex v;
v.name="v";
... | ALGO | 0.999782 | 3.997293 | {
"github_metadata": {
"branch": "master",
"commit_count": 17,
"repo_created_at": "2018-08-07T03:14: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": "b56f36ef4... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.