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
1a36e69e-01dc-4f59-91f1-e06121afa1e5
turing-machines/mentals-ai
src/core.cpp
#include "core.h" void print_help() { std::cout << "\nUsage: mentals <filename> [--input=value] [-d|--debug]\n" << "Arguments:\n" << " <filename> The name of the agent file (.gen) to run.\n" << " --input=value The input value for the agent.\n" << " -h, --help Show this hel...
TOOL
0.912997
5.83123
{ "github_metadata": { "branch": "main", "commit_count": 119, "repo_created_at": "2024-02-27T00:22:57.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 439, "forks": 41, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "9a710e9...
3acbf9ff-bd87-47a4-abe7-a9beadfab035
larrychen20011120/DSA
Algorithm/Homework/HW11/costless_road.cpp
#include <iostream> #include <cmath> #include <utility> #include <algorithm> using namespace std; class MySet { private: int* parent; public: MySet(int N) { parent = new int [N]; for (int i = 0; i < N; i++){ parent[i] = -1; } } // constructor inline int find(int ver...
ALGO
0.999947
4.363039
{ "github_metadata": { "branch": "main", "commit_count": 80, "repo_created_at": "2021-11-07T07:28: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": "e2c6abe602d...
f8ed03f7-3ae4-4a83-8eb0-804be6182d07
flash1117/Algorithm
BFS/BFS/2667.cpp
#include <iostream> #include <cstring> #include <algorithm> #include <vector> #include <queue> using namespace std; int N; vector<int> ans; int map[26][26]; int visited[26][26]; int add = 0; int dx[] = { 0,0,-1,1 }; int dy[] = { -1,1,0,0 }; bool isBoundary(int x, int y) { if (x<0 || y<0 || x>N || y>N) return fals...
ALGO
0.999936
3.716768
{ "github_metadata": { "branch": "master", "commit_count": 269, "repo_created_at": "2018-10-09T16:20: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": "55b09c2f...
4ff44c63-c384-4370-a906-cfc800725e3a
abhayaagr/Abdul-Bari-Course
Recursion/92. nCr using recursion.cpp
#include <iostream> using namespace std; int fact(int n){ //Time Complexity - O(n) if(n==0){ //Space Complexity - O(n) return 1; } else{ return fact(n-1) * n; } } int ncr_fact(int n, int r){ //Time Complexity - O(n) int x = fact(n); //Space...
ALGO
0.999795
6.121338
{ "github_metadata": { "branch": "main", "commit_count": 147, "repo_created_at": "2024-09-23T19:16:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f150113074...
f5cf0364-e458-4d19-b492-ffe6a411041c
andzh1/Codeforces
Educational round #156/D.cpp
#include <bits/stdc++.h> using namespace std; #define vi vector<int64_t> #define get(a) int64_t a; cin >> a; #define repeat(n) for(int64_t i = 0; i < n; ++i) #define loop(j, n) for(int64_t j = 0; j < n; ++j) #define iloop(n) loop(i, n) #define jloop(n) loop(j, n) #define kloop(n) loop(j, n) #define all(v) v.begin(), ...
ALGO
0.999996
4.193016
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2020-11-21T18:07: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": "52199fb3...
6c61fd57-526b-47ac-be14-b3f216a81a9f
SohamD34/LeetCode
minimum-array-changes-to-make-differences-equal/Wrong Answer/7-20-2024, 8:52:20 PM/Solution.cpp
// https://leetcode.com/problems/minimum-array-changes-to-make-differences-equal class Solution { public: int minChanges(vector<int>& nums, int k) { int n = nums.size(); int front = 0; int back = n-1; unordered_map<int, int> M; int most_occuring_diff = 0; ...
ALGO
0.999986
5.987379
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2024-06-22T03:11: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": "5b1f127c710a...
f3e15c23-05b1-4ece-8aea-868373883c22
pat-hanbury/AlgoProj3
heap.h
//<NAME> and <NAME> //Fundamental of Algorithms //Project3b //heap.h #ifndef HEAP_H #define HEAP_H #include <iostream> #include <vector> #include <math.h> //heap declaration template <typename T> class heap{ //private members private: //heap vector to store the heap std::vector<T> heapArray; //heap string to s...
ALGO
0.972391
4.220596
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2018-02-12T22:00: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": "fc8ab46f40...
5ad0442e-dc5d-42c0-8d86-2e200dcef7db
Chaste/Chaste
cell_based/src/population/forces/DiscreteSystemForceCalculator.hpp
/* Copyright (c) 2005-2025, University of Oxford. All rights reserved. University of Oxford means the Chancellor, Masters and Scholars of the University of Oxford, having an administrative office at Wellington Square, Oxford OX1 2JD, UK. This file is part of Chaste. Redistribution and use in source and binary forms...
ALGO
0.997299
7.339137
{ "github_metadata": { "branch": "develop", "commit_count": 7342, "repo_created_at": "2016-07-08T13:37:56.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 138, "forks": 64, "issues": 56, "pull_requests": 7 }, "file_meta": { "content_id": "9d1...
50affa5b-b6da-4d57-b28d-6f7eb0920a64
Yourrrrlove/leetcode-2
图论/岛屿的最大面积.cpp
#include <iostream> #include <vector> #include <queue> using namespace std; //x-1, y+0表示向上搜索 //x+1, y+0表示向下搜索 //x+0, y-1表示向左搜索 //x+0, y+1表示向右搜索 class Solution { private: int dire[2][4] = {{-1,1,0,0},{0,0,-1,1}}; int area = 0; //岛屿的面积 //bfs负责将grid[x][y]所在的岛屿的全部陆地位置全部置为'0' void bfs(vector<vector<int>> &...
ALGO
0.999996
6.003578
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2024-03-13T07:16:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "244b5c0b84...
fa882e59-4561-4a0e-934d-059ad120a39b
optozorax/olymp
contests/leetcode/3sum.cpp
// https://leetcode.com/problems/3sum/ class Solution { public: vector<vector<int>> threeSum(vector<int>& nums) { if (nums.size() < 3) return {}; sort(nums.begin(), nums.end()); vector<vector<int>> result; for (int i = 1; i < nums.size()-1; ++i) { if (nums[i] < 0 && i+1 !...
ALGO
0.999824
6.406539
{ "github_metadata": { "branch": "master", "commit_count": 107, "repo_created_at": "2019-03-22T10:38:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 12, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3dead66...
d526ce07-f445-4a76-aa3f-803b3bdef94d
john-ashraf-7/Optimized_Routes
main.cpp
#include "driver.h" #include <iostream> #include <chrono> #include <vector> using namespace std; using namespace std::chrono; void measureExecutionTime(Map& map, const string& algorithmName, int start, int end) { auto start_time = high_resolution_clock::now(); vector<int> path; //Assuming the Map class h...
ALGO
0.999402
5.213446
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2024-11-23T15:59: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": "b869b2b8235...
996d119c-e6f6-4900-8402-3f04262fb1b3
shuneo004/CSES
C54.cpp
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { int n, a, b; cin >> n >> a >> b; vector<int> arr(n); for (int &x : arr) cin >> x; long long ans = -1e15; vector <long long> sum(n + 1, 0); multiset<long long> container; for (int i = 0; i < n; ++i) { ...
ALGO
0.999949
3.86364
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2024-03-26T16:34:44.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0f1471ad7e31...
a1e49c15-e9e0-4775-a1a4-a2ce213cbf5e
slaterd314/AVLTree
main.cpp
#include <iostream> // #include "AVLTree.h" #include "AVLTreeT.h" #include <cstdlib> #include <string> #ifdef WIN32 #include <windows.h> #endif #include <limits> #include <cerrno> // #include "AVLTreeT.h" using namespace std; // void walkTree(const NodePtr &node, int depth = 0); // void printTree(const AVLTree &tree)...
TEST
0.978799
5.110243
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2021-08-26T18:18:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f39af439a...
642309d9-9073-4fd4-9724-54211f66be63
ChuanqiTan/introduction-to-algorithms-notes
Introduction to Algorithms Projects/Intorduction to Algorithms/dijkstra.h
#pragma once ////////////////////////////////////////////////////////////////////////// /// @file dijkstra.h /// @brief Dijstra最短路径 /// @details COPYRIGHT NOTICE /// Copyright (c) 2011 /// All rights reserved.\n /// /// /// @author 谭川奇 chuanqi.tan(at)gmail.com /// @date 2011/06/17 /// @version 1.0 /////...
ALGO
0.99976
4.697003
{ "github_metadata": { "branch": "master", "commit_count": 45, "repo_created_at": "2015-06-22T13:53:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "3e847bf86...
c5e40319-5335-4e2f-a1e0-2a2fbdcaf3f7
hasnain-cyber/competitive-programming
codeforces/C_Woodcutters.cpp
#include <bits/stdc++.h> #define MOD 1000000007 //#define MOD 998244353 #define MIN numeric_limits<int>::min() #define MAX numeric_limits<int>::max() #define int long long int #define double long double #define endl '\n' using namespace std; void solve_testcase() { int n; cin >> n; vector<pair<int, int...
ALGO
0.999966
4.700878
{ "github_metadata": { "branch": "master", "commit_count": 64, "repo_created_at": "2021-08-25T18:40: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": "533633c45...
ea8796f5-fa10-41dd-b262-57d33799493e
hayaten0415/Competitive-programming
MojaCoder/BaB002/B.cpp
#pragma region Macros // #pragma GCC target("avx2") #pragma GCC optimize("O3") #include <bits/stdc++.h> #include <atcoder/all> #define rep(i, n) for (int i = 0; i < (n); i++) #define rrep(i, n) for (int i = (n - 1); i >= 0; i--) #define ALL(v) v.begin(), v.end() #define endl "\n" #define popcount(bit) __builtin_popcoun...
ALGO
0.999986
3.486098
{ "github_metadata": { "branch": "master", "commit_count": 1321, "repo_created_at": "2019-02-17T01:01:06.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a1c4a85...
891917c4-78ff-46ab-b1e1-fa0760982ba7
osoriodiego-utp/UTP-Hpc
calculoPi/thread.cpp
// Pi calculated with Montecarlo method. //$ g++ -std=c++11 thread.cpp -o threadExe //$ ./threadExe #include <stdlib.h> #include <iostream> #include <vector> #include <time.h> #include <cmath> using namespace std; int main() { /* // puntos a evaluar (precisión) vector<long> totalpoints = {100, 500, 1000, 5...
ALGO
0.997216
4.073757
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2019-02-23T16:57: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": "041cd44f5c...
501485cf-af0f-4582-a9da-22ef363df601
Jesse-Z/coding-practise
每日一题/023 合并K个排序链表/main.cpp
/** Jesse@FDU-VTS-MIA created @date: 2020-04-26 brief: 合并 k 个排序链表,返回合并后的排序链表。 */ #include<bits/stdc++.h> using namespace std; struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} }; class Solution { public: ListNode* mergeKLists(vector<ListNode*>& lists) { i...
ALGO
0.999891
5.87882
{ "github_metadata": { "branch": "master", "commit_count": 131, "repo_created_at": "2019-10-09T11:39:45.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "30f7e46e...
3decf72b-7906-422f-b38e-ab465342d21c
SIlvaMFPedro/audio_video_code
video-codec/src/motion/matrix.cpp
#include "motion/matrix.hh" Mat getSearchAreaMat(Mat& frame, Point point, int areaLength) { Mat searchAreaMat; Rect searchAreaRect; Point topLeftPoint; int w_s = areaLength*2 + 1; int h_s = areaLength*2 + 1; if (point.x < areaLength) { topLeftPoint.x = 0; w_s = w_s - (areaLengt...
TOOL
0.985365
6.278188
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-07-25T18:22: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": "74c62609a6...
520d723e-6042-4fb8-b1b9-88942afd2a5f
milloni/old_code
algorithms/tsp/tsp_first.cpp
#include <iostream> #include <string> #include <vector> #include <limits> #include <cmath> #include <cassert> #include <bitset> #include <algorithm> constexpr int INT_BITS = 32; constexpr int MAX_POINTS = INT_BITS - 1; class Point { public: Point(double x, double y); double x() const; double y() const; ...
ALGO
0.998777
5.195394
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2020-09-21T01:14: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": "9a8db3ce0...
3e0de0ca-b2a5-43ff-9c7f-97eadfcca43b
Danondso/Information-Retrieval
hw4/Agregator.h
#include <iostream> #include <thread> #include <algorithm> #include <fstream> #include <string> using namespace std; //Agregator class to accumulate the weights class Agregator{ public: void Zero(); //Clears the array void Insert(int docid, int wt); //Inserts the weight into the array, using the index as the doc ...
TOOL
0.979568
4.123671
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2017-01-02T16:43: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": "2018124625...
04c9b186-20c7-45b6-aed4-1e08250dcac0
panda3d/panda3d
pandatool/src/egg-qtess/isoPlacer.cxx
/** * PANDA 3D SOFTWARE * Copyright (c) Carnegie Mellon University. All rights reserved. * * All use of this software is subject to the terms of the revised BSD * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * * @file isoPlacer.cxx * @autho...
ALGO
0.985814
4.233869
{ "github_metadata": { "branch": "master", "commit_count": 26435, "repo_created_at": "2013-09-30T10:20:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4835, "forks": 823, "issues": 308, "pull_requests": 50 }, "file_meta": { "content_id": ...
2f5e1956-1e67-4607-9eb4-78b9d3cb56fb
anuragbansall/DSA-CPP
Day05-Patterns/06-Hollow-Rectangle-Pattern.cpp
#include <iostream> using namespace std; int main() { /* Draw Hollow Rectangle Pattern: * * * * * * * * * * * * * * */ int n = 4; for (int i = 1; i <= n; i++) { cout << "* "; // First star of each row for (int j = 1; j <= n - 1; j...
ALGO
0.99861
4.842972
{ "github_metadata": { "branch": "main", "commit_count": 86, "repo_created_at": "2025-01-01T17:39:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "93caaca30e3...
8c438f5d-a14a-406b-ac47-b986e8dbd06e
Tencent/plato
plato/parallel/shuffle.hpp
/* Tencent is pleased to support the open source community by making Plato available. Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy...
TOOL
0.924915
5.859143
{ "github_metadata": { "branch": "master", "commit_count": 97, "repo_created_at": "2019-11-08T07:52:21.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 1914, "forks": 333, "issues": 34, "pull_requests": 1 }, "file_meta": { "content_id": "8869...
d39aa465-3323-457b-827d-26c440cec88c
keroro520/ACM
cf/cf#161/cf_263D.cpp
/* 题意:一张无向图,保证每个点的度不小于K,没有重边或者自环。现要求输出一个环,该环的大小不小与K+1 思路:Tarjan在找到割点的时候判断一下是不是环,是环的话点数够不够 跟“圆桌会议”很像的算法 实现还是挺好看的:用fuck[]记录路径,跟以往把当前选择的点都记录到路径数组里的实现不一样,我这里是dfs递归,然后dfs返回来true才用路径数组记录当前点。虽说是小事情,但感觉还是比较简单巧妙~ 看题解知道有更简单的方法,这里有个性质:假设现有简单路径v1,v2...vr,这时如果vr后面无法再接下一个点了,只能说明与vr相邻的点都已经存在在这个简单路径里面了。而因为任意一个点的度>=K,加上...
ALGO
0.999993
4.174082
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2014-04-15T10:11:29.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "92edda22cb...
0845d579-a8c9-4387-9be9-27ec84138284
zjsxzy/algo
AtCoder/AtCoder Beginner Contest 267/B/main.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; void solve() { string s; cin >> s; s = ' ' + s; if (s[1] == '1') { cout << "No" << endl; return; } vector<vector<int>> col(7); col[0].push_back(7); col[1].push_back(4); col[2].push_back(2); col[2].pu...
ALGO
0.999993
4.077047
{ "github_metadata": { "branch": "master", "commit_count": 1296, "repo_created_at": "2013-05-18T10:52:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a764e9...
0ff66a9a-697a-4b63-a8de-61a9b8ab7059
ishandutta2007/codeforces-m
mahdi_jfri/normal/196/E.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back const int maxn = 1e5 + 20; vector<int> adj[maxn]; int from[maxn] , to[maxn] , w[maxn] , pr[maxn] , par[maxn]; ll d[maxn] , res; set<pair<ll , int> > st; bool is[maxn]; int root(int v) { return ((par[v] == -1)? v : par[v] = roo...
ALGO
0.999959
4.076453
{ "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": "e58e29891d29...
1fdf8d17-c2d5-4d43-9dae-0e8a4aaeff8a
lweitzendorf/AlgoLab-2021
week-04/ant-challenge.cpp
#include <iostream> #include <vector> #include <boost/graph/adjacency_list.hpp> #include <boost/graph/kruskal_min_spanning_tree.hpp> #include <boost/graph/dijkstra_shortest_paths.hpp> typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS, boost::no_property, boost::property<boost::edge_weight_t,...
ALGO
0.99963
3.915107
{ "github_metadata": { "branch": "main", "commit_count": 12, "repo_created_at": "2021-12-28T10:32:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "6ab0afa9397...
dd4c1506-98ba-46e7-862c-fa220049031e
igoose1/determinant-hw
determinant.cpp
// Copyright 2020 <NAME> <<EMAIL> // // 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 t...
ALGO
0.999692
5.852855
{ "github_metadata": { "branch": "master", "commit_count": 24, "repo_created_at": "2020-12-27T16:41: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": "643161275...
0c5cd221-78e2-4df7-859d-21ae6cba64c5
haozzzzzzzz/osgEarthX
environment/build/3rdParty/include/geos/geos/algorithm/MinimumDiameter.h
/********************************************************************** * * GEOS - Geometry Engine Open Source * http://geos.osgeo.org * * Copyright (C) 2005-2006 Refractions Research Inc. * Copyright (C) 2001-2002 Vivid Solutions Inc. * * This is free software; you can redistribute and/or modify it under * th...
ALGO
0.999008
6.045285
{ "github_metadata": { "branch": "master", "commit_count": 28, "repo_created_at": "2015-09-19T06:19:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 75, "forks": 48, "issues": 3, "pull_requests": 0 }, "file_meta": { "content_id": "1d3582c...
2c9ce7ad-3c61-40e5-adb2-4416ec4c01b5
saurabh175/cp
D_A_Special_Sequence.cpp
#include <bits/stdc++.h> using namespace std; #define int long long #define vll vector<int> #define pi (3.141592653589) #define mod 1000000007 #define float double #define pb push_back #define mp make_pair #define ff first #define ss second #define all(c) c.begin(), c.end() #define min3(a, b, c) min(c, min(a, b)) #defi...
ALGO
0.999984
4.401932
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2022-07-08T04:15: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": "d5b97f4afb...
a658d1d1-d4c7-40d1-9187-5fe2719711c4
ymd45921/HUST-ACM-training
codeforces/Round668 - div.2/A.cc
/** * 构造题?脑瘫题! */ #include <iostream> #include <cstdio> #include <cctype> #include <algorithm> #include <cstring> #include <cmath> using namespace std; using longs = long long; using uint = unsigned; inline int nextInt() { int x = 0, f = 0, ch = getchar(); while (!isdigit(ch)) ch == '-' && (f = 1), ch = get...
ALGO
0.999647
3.383347
{ "github_metadata": { "branch": "master", "commit_count": 423, "repo_created_at": "2020-12-02T04:26: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": "f75449f2...
e5487acd-8a8e-4463-bc0b-9434711d7f05
Sebasochoa/EPCC_CCII
Laboratorio/LAB02_GRUPO_B_20210694_ EJECUTABLE_Sebastian_Ochoa.cpp
//<NAME>:20210694 //1. Sumar todos los enteros pares desde 2 hasta 100. #include<iostream> #include <conio.h> #include <stdio.h> #include<string.h> using namespace std; int main() { int par = 0; for (int i = 2; i <= 100; i += 2){ par += i; } cout<<"Suma de todos los numeros pares es: "<<par...
ALGO
0.954277
3.16607
{ "github_metadata": { "branch": "main", "commit_count": 96, "repo_created_at": "2022-04-25T19:53: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": "84109a09b2c...
72148c3e-bdbe-49c8-8d51-3aa09b0e4801
openbigdatagroup/psvm
src/pd_ipm.cc
/* Copyright 2007 Google 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 in writing, software di...
ALGO
0.999967
4.630012
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-01-31T07:42:46.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 15, "forks": 6, "issues": 6, "pull_requests": 0 }, "file_meta": { "content_id": "cf6e8f9790...
7872de49-63eb-454c-984d-f90650e58e6d
rishilss99/Emulated-Distributed-File-System
hadoop_mapreduce/mpi_letter_count.cpp
#include <stdio.h> #include <ctype.h> #include <stdlib.h> #include <mpi.h> #include <unordered_map> #include <stddef.h> #include <cstring> #include <iostream> using namespace std; constexpr int WORD_MAX = 10; struct CHAR_PAIR { int count; char c; }; int main(int argc, char **argv) { int size; int rank;...
ALGO
0.999312
4.751886
{ "github_metadata": { "branch": "main", "commit_count": 59, "repo_created_at": "2022-09-24T18:48: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": "b298be80121...
2b61e66c-b1ad-4946-961c-4d78d2e52ac2
trmcnealy/Kokkos.NET
runtime.Kokkos.NET/Analyzes/kMeansClustering.hpp
#pragma once #include "runtime.Kokkos/Extensions.hpp" //#include "NumericalMethods/Statistics/UniformRandom.hpp" #include <Kokkos_Sort.hpp> namespace MeansClustering { template<size_type Dimensions> struct Tag { }; template<typename DataType, class ExecutionSpace, size_type Dimensions> struc...
ALGO
0.999615
3.398686
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2020-02-05T13:26:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d8e2fe30...
81eeba6b-c6be-4d3c-9d2f-aca5dec4cfbf
Deepanshus98/leetcode_mag
654. Maximum Binary Tree.c++
/* Medium 3881 302 Add to List Share You are given an integer array nums with no duplicates. A maximum binary tree can be built recursively from nums using the following algorithm: Create a root node whose value is the maximum value in nums. Recursively build the left subtree on the subarray prefix to the left of...
ALGO
0.999985
6.762856
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2022-07-14T07:54: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": "42e9d5c083c...
55221235-bfdc-4cef-a6bb-60abfabdf612
iwanski-michal/michal-iwanski-s25669
src/casual/2.0.0.6.cpp
#include <iostream> auto main (int argc, char* argv[]) -> int { int liczba_porownywana = std::stoi(argv[1]); //zamieniamy pierwszy element z tablicy ze stringa na inta i przypisujemy do zmiennej liczba_porownywana //zaczynamy i od dwojki, poniewaz pierwszym elementem w tablicy argv[] nie jest liczba, tylko naz...
ALGO
0.971014
4.155593
{ "github_metadata": { "branch": "main", "commit_count": 34, "repo_created_at": "2021-10-01T08:53: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": "261113e0501...
d61225b4-3e2c-4f7c-b66f-1dcdd2382580
wisdompeak/LeetCode
Hash/2025.Maximum-Number-of-Ways-to-Partition-an-Array/2025.Maximum-Number-of-Ways-to-Partition-an-Array.cpp
class Solution { public: int waysToPartition(vector<int>& nums, int k) { int n = nums.size(); long sum = accumulate(nums.begin(), nums.end(), 0L); vector<long>rets(n); vector<long>pre(n); pre[0] = nums[0]; for (int i=1; i<n; i++) ...
ALGO
0.999919
5.296552
{ "github_metadata": { "branch": "master", "commit_count": 8912, "repo_created_at": "2017-03-01T10:30:52.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6018, "forks": 1314, "issues": 4, "pull_requests": 0 }, "file_meta": { "content_id": "9...
1d57c708-c234-4c86-bc36-776459ac7c0e
Kawser-nerd/CLCDSA
Source Codes/CodeJamData/16/33/2.cpp
#include <bits/stdc++.h> using namespace std; #define pb push_back #define mp make_pair #define fs first #define sc second #define sz(x) (int) ((x).size()) #define forn(i, n) for (int i = 0; (i) < (n); ++i) #define fornr(i, n) for (int i = (n) - 1; (i) >= 0; --i) #define forab(i, a, b) for (int i = (a); (i) < (b);...
ALGO
0.999646
3.141901
{ "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": "4e547a95...
e1e88141-2de6-4df9-922f-611dad5529f9
jczh98/Algorithm
hdu/hdu3949.cpp
#include <bits/stdc++.h> using namespace std; typedef long long LL; const int MAX_BASE = 60; int t, n, q, kase = 1; LL a[10005], b[MAX_BASE + 5]; vector<LL> base; inline void gauss() { memset(b, 0, sizeof(b)); for(int i = 1; i <= n; ++i) { for(LL j = MAX_BASE; j >= 0; --j) { if((a[i] >> j) ...
ALGO
0.999556
4.565976
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2016-07-02T08:52:49.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2888c7a5a...
8d0edfdf-8e4e-43c2-8997-12b277e4612d
gertsiuk/HT_P
HT_P/Main.cpp
#include <time.h> #include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; //// Initializing void UInAlgorithm(); int** DefineMatrix(int n, int m); void FillMatrixRnd(int **Array, int n, int m, int begin, int end); int FrequencyOfEvenDigit(int **Array, int n, int m); int MostUsefullEvenDigit(in...
ALGO
0.998236
3.939402
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-12-13T15:14: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": "0b40e64b9c...
f6f74dc6-222d-4d4e-a33c-a21425bfcfe8
Jaycelation/DSA-PTIT
Contest 5 - Quy hoach dong/DSA05014 - CATALAN NUMBER.cpp
#include<bits/stdc++.h> using namespace std; int n; int nt[1001] = {0}; int res[1001] = {0}; void PTI(int x, int value) { for (int i = 2; i * i <= x; i++) { while (x % i == 0) { nt[i] += value; x /= i; } } if (x > 1) nt[x] += value; } int main() { int t; cin >> t; while (t--) { cin >> n; memse...
ALGO
0.99997
4.466769
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2024-03-18T10:31:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "09efed8fb0...
4b488eaf-3acf-453c-8aa5-1de9816191a8
Shalakanv/DSA
BookAllocation.cpp
#include<iostream> using namespace std; // 7) Book allocation problem // Detail Question:= This code is an implementation of a binary search algorithm to solve a problem related to allocating books to students in a fair and efficient manner. The problem is known as the "Allocate Books" problem, and the goal is to det...
ALGO
0.999979
4.135178
{ "github_metadata": { "branch": "master", "commit_count": 91, "repo_created_at": "2023-06-03T08:42: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": "2cb085b07...
f8a69654-fd08-4fc9-8ea7-d63be56885ab
Jubayer-Hossain-Abir-404/Algorithms
Graph Related Problems/Graph Related H.W. 4.cpp
#include<stdio.h> int adj[100][100]= {0},v=0,p,q,b[100],k=0; void build_graph() { k=1; do { printf("Edge %d:",k); scanf("%d%d",&p,&q); if(p==0&&q==0) { break; } else if(p<=0||q<=0) { printf("\nInvalid Input\n"); } ...
ALGO
0.999273
3.707902
{ "github_metadata": { "branch": "main", "commit_count": 8, "repo_created_at": "2021-05-05T08:29: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": "dbf7097831a4...
2aad129f-3bfd-43d5-8025-85733e06d240
Rajanarender/CAndCPPCompleteSubject
candcpp/study/Manipulations/StringasWordQuestions/FindCountofSubstringPatternAndItsIndexInWord.cpp
#include<iostream> using namespace std; void func(char *x, char *y) { char *startaddress = x; //V.V.Imp step,Store x,to get the base address position while(*x) { if(*x == *y) { char *temp = x; //V.V.Imp step,x should not get affected,so st...
ALGO
0.998585
4.043965
{ "github_metadata": { "branch": "CompleteSubject", "commit_count": 1, "repo_created_at": "2019-10-27T12:45:17.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b...
ba5c4b02-55af-43e9-af92-e9a8ac8e930f
GALA-Lin/CUPK-lib
DS/DScode/1.1.cpp
#include <iostream> #include <algorithm> using namespace std; struct student { int id; string name; int score; }; bool cmp(student &a, student &b) { return a.id < b.id; } int main() { int n; cin >> n; student s[1001]; for (int i = 0; i < n; i++) { cin >> s[i].id >> s[i].na...
ALGO
0.999162
3.407409
{ "github_metadata": { "branch": "main", "commit_count": 145, "repo_created_at": "2024-06-27T04:42:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "07a23152c3...
88150888-27e8-40b5-83c0-d1df9f89bcfe
SelenaChen123/CSC114
src/GeometryCalculator.cpp
/* GeometryCalculator.cpp GeometryCalculator Created by <NAME> on 10/20/17. Copyright © 2017 <NAME>. All rights reserved. */ /* Geometry Calculator 1. Calculate the area of a circle 2. Calculate the area of a rectangle 3. Calculate the area of a triangle 4. Quit */ #include <iostream...
TOOL
0.959878
4.261877
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2018-09-27T00:26: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": "41f0b20e2d...
0c42227c-0024-4f39-8cac-3c25655990cd
GazPrash/Leetcode_QS
target_sum.cpp
#include<bits/stdc++.h> using namespace std; // In the following soln, use a map<vector, int> instead of a 2D dp class Solution { public: int total_ways = 0; bool dfs(vector<int> &nums, int ind, int csum, int target, bool posve, vector<vector<int>> &dp){ if (ind >= nums.size()) return 0; int ...
ALGO
0.999993
5.168146
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-01-21T19:35: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": "43808ac9688...
0a941cbc-52d7-4980-8da7-c1f9f80988b1
JasonPhone/acm-stuff
math/matrix_power.cpp
#include <bits/stdc++.h> #define inf 0x3f3f3f3f using namespace std; typedef long long ll; const int N = 205, mod = 998244353, MS = 205; struct Mat { ll a[MS][MS]; ll n, m; Mat(int n = 0, int m = 0) : n(n), m(m) { memset(a, 0, sizeof(a)); } Mat operator*(const Mat& B) const { Mat C(n, B.m); for (int i =...
ALGO
0.999973
4.585078
{ "github_metadata": { "branch": "main", "commit_count": 24, "repo_created_at": "2021-11-24T02:02: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": "342307e9071...
e90de621-09e7-4182-989e-56712a19292e
eklein099/OS-Project-4
src/algorithms/spn/spn_algorithm.cpp
#include "algorithms/spn/spn_algorithm.hpp" #include <cassert> #include <stdexcept> #define FMT_HEADER_ONLY #include "utilities/fmt/format.h" /* Here is where you should define the logic for the FCFS algorithm. */ SPNScheduler::SPNScheduler(int slice) { if (slice != -1) { throw("FCFS must have a tim...
ALGO
0.998202
6.023468
{ "github_metadata": { "branch": "master", "commit_count": 6, "repo_created_at": "2021-11-01T05:04: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": "d8e35944da...
ebe92758-84c9-46e6-a50a-006312329935
evapilotno17/cses-solutions
CSES-SOLUTIONS/Graph-Algorithms/Message Route/Message_route.cpp
#include<bits/stdc++.h> using namespace std; #define int long long #define double long double #define lop(i,a,b,c) for(int i=a;i<b;i+=c) #define rlop(i,a,b,c) for(int i=a-1;i>=b;i-=c) #define f(i,n) lop(i,0,n,1) #define rf(i,n) rlop(i,n,0,1) #define F first #define S second #define pb push_back #define mp make_pair #de...
ALGO
0.999993
3.865119
{ "github_metadata": { "branch": "main", "commit_count": 232, "repo_created_at": "2022-10-03T22:55:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 31, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d68fc7978...
a1a66aa9-b7eb-45f6-a015-30b3b21aba76
cfeitong/ACM-problem-archive
6-ural-2072.cpp
#include <algorithm> #include <cstdio> #include <cstdlib> #include <vector> using namespace std; typedef long long LL; struct F { LL p, d; }; vector<F> fs; typedef vector<F>::iterator Iter; typedef pair<LL, LL> Stat; pair<Stat, Stat> move(Iter st, Iter ed, Stat s) { sort(st, ed + 1, [](F a, F b) { return...
ALGO
0.99997
3.787233
{ "github_metadata": { "branch": "master", "commit_count": 46, "repo_created_at": "2016-08-11T09:50: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": "5654d1cfd...
f3a1b973-f28f-4dd0-bf19-f3b16eb18c46
pokaa3a/leetcoding
problems/825. Friends Of Appropriate Ages.cc
#include <iostream> #include <vector> #include <map> using namespace std; class Solution { public: int numFriendRequests(vector<int>& ages) { sort(ages.begin(), ages.end()); cout << "ages: "; for (int i = 0; i < ages.size(); ++i) { cout << ages[i] << " "; } map<int, int> ageMap; int preIdx = ages.size(...
ALGO
0.999663
4.829978
{ "github_metadata": { "branch": "master", "commit_count": 37, "repo_created_at": "2020-03-15T08:11: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": "6a11870f2...
aabab25d-8ef5-4b32-8d88-eaa72d274e0a
LuchoBazz/cpp-algorithm-snippets
numeric/numeric_mint_medium.cpp
template<typename T> T inverse(T a, T m) { a = (a + m) % m; if (a < static_cast<T>(a)) a += m; T b = m, u = 0, v = 1; while (static_cast<T>(a) > 0) { T t = b / a; b -= t * a; swap(a, b); u -= t * v; swap(u, v); } assert(b == static_cast<T>(1)); // zero division if (u < static_cast<T>(0)) u ...
ALGO
0.998129
4.546804
{ "github_metadata": { "branch": "master", "commit_count": 419, "repo_created_at": "2020-07-27T16:34:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 44, "forks": 5, "issues": 30, "pull_requests": 0 }, "file_meta": { "content_id": "4d3ea6...
52c66b37-c613-4635-a9fc-294584bc0540
jyheo98/BOJ
백준/Platinum/13130. FunctionCup/FunctionCup.cc
#include <bits/stdc++.h> #ifndef ONLINE_JUDGE #include "headers/debug.h" #else #define debug(...) 42 #endif using namespace std; #define all(x) x.begin(), x.end() #define ff first #define ss second #define LLINF 0x3f3f3f3f3f3f3f3f #define INF 0x3f3f3f3f #define uniq(x) sort(all(x)); x.resize(unique(all(x))-x.begi...
ALGO
0.999915
3.838683
{ "github_metadata": { "branch": "main", "commit_count": 142, "repo_created_at": "2022-07-09T09:35:10.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b3a5a48fc...
3444e4e1-590b-4e97-843b-d467aba5b7e7
ajgarciarias10/PR6
main.cpp
#include <iostream> #include "VuelaFlight.h" /** * @file MAIN.h * @date 19/12/2023 * @author <NAME>, <EMAIL> * @author <NAME>, <EMAIL> * @brief main */ float haversine(float lat1, float lon1, float lat2, float lon2) { float R = 6378.0; float IncrLat = (lat2 - lat1)*(M_PI/180); float IncrLon = (lon2 - ...
ALGO
0.982068
4.836983
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2023-12-18T23:23:59.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "250dd07c3...
0f25731d-d72c-48e8-af8f-59a52de6bcfd
AchillesMiller/leetcode
include/tree/652.find_duplicate_subtrees.h
#ifndef INCLUDED_TREE_652_FIND_DUPLICATE_SUBTREES #define INCLUDED_TREE_652_FIND_DUPLICATE_SUBTREES namespace leetcode { /** @brief: find duplicate trees * Given the root of a binary tree, return all duplicate subtrees. * * For each kind of duplicate subtrees, * you only need to return the root node of any one...
ALGO
0.995893
6.447224
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2021-12-27T08:21: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": "26d502f1c99...
61dd41f2-e346-4a01-9c34-3f6dbcefddfa
isym444/OnlineJudgeToolsCustomTemplates
Snippets/ビットと進法と冪指数/setBits.cpp
bool isBitSet(int number, int bitPosition) { return (number & (1 << bitPosition)) != 0; } vector<ll> getSetBitPositions(ll num) { std::vector<ll> setBitPositions; ll position = 0; while (num != 0) { if (num & 1) { setBitPositions.push_back(position); } num >>= 1; ...
ALGO
0.99992
4.358331
{ "github_metadata": { "branch": "master", "commit_count": 40, "repo_created_at": "2024-02-20T02:31: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": "223a1552c...
cb6bf0bc-98d5-406f-a550-5c2213fe0174
yunhalee05/Algorithmic_Problem_Solving_Strategies
이것이_코딩테스트다/10.그래프(꼭_다시_풀기)/10.2)도시_분할_계획.cpp
#include <iostream> #include <vector> #include <algorithm> #include <queue> #define INF 1e9 using namespace std; int n, m, result = 0; int parent[100001]; vector<pair<int, pair<int, int>>> edges; int find_parent(int parent[100001], int x) { if (parent[x] != x) parent[x] = find_parent(parent, parent[x]); return ...
ALGO
0.999934
4.081529
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2020-11-17T08:48: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": "7ccc21c5250...
78f0022f-26e7-49c9-b53a-17658af7408f
ROCm/OpenFOAM_HMM
src/finiteVolume/fvMatrices/solvers/multiDimPolyFitter/multiDimPolyFunctions/polyDegree1.H
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | -----------------------------------...
TOOL
0.935205
5.532837
{ "github_metadata": { "branch": "suyash/hmm", "commit_count": 25733, "repo_created_at": "2022-10-27T12:31:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 25, "forks": 4, "issues": 0, "pull_requests": 1 }, "file_meta": { "content_id": "90...
2030bbce-bc41-4e14-b0cf-d60a410b98b9
duzaao/3-Semestre-BCC-IME-USP
Desafios/L6/L6-B.cpp
#include<bits/stdc++.h> using namespace std; int colunas, linhas; char labirinto[1002][1002]; int distancias[1005][1005]; int moveX[] = {-1, 0, 1, 0}; int moveY[] = {0, 1, 0, -1}; bool isOk(int x, int y){ if(x >= linhas || x < 0 || y >= colunas || y < 0 || distancias[x][y] != 0 || labirinto[x][y] == '#') return fals...
ALGO
0.999922
4.118789
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-05-08T12:37:39.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bc75effac0...
bbf120d2-d322-459a-ac32-0c5e5d88ab1e
eyeboyplus/lc
dp/maximal_square.cpp
#include "./../lc.h" int solution_1(vector<vector<char>> &matrix) { if(matrix.empty()) return 0; int m = matrix.size(), n = matrix[0].size(), sz = 0; vector<vector<int>> dp(m, vector<int> (n, 0)); for(int i = 0; i < m; i++) { for(int j = 0; j < n; j++) { if(i == 0 || j == 0 || matr...
ALGO
0.999831
5.680021
{ "github_metadata": { "branch": "master", "commit_count": 34, "repo_created_at": "2019-01-24T06:00: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": "fcf62e567...
a130b639-dd75-418b-992c-f98ce79dcf71
AsceticOfLife/leetcode-CPlusPlus
answer/491.递增子序列.cpp
/* * @lc app=leetcode.cn id=491 lang=cpp * * [491] 递增子序列 */ // @lc code=start class Solution { public: vector<vector<int>> result; vector<int> path; void BackTrace(const vector<int> &nums, const int start_index) { if (path.size() > 1) result.push_back(path); // 终止条件 if (start_...
ALGO
0.999994
6.509362
{ "github_metadata": { "branch": "main", "commit_count": 121, "repo_created_at": "2023-05-02T11:06:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c2cfb80404...
4a301f3a-9add-4e71-8959-e9702d590ca8
unciarobotics/Arduino
_9_Interfacing with ultrasonic sensor/Interfacing_with_ultrasonic_sensor/Interfacing_with_ultrasonic_sensor.ino
#define trigPin 9 #define echoPin 10 int M0 = 2; int M1 = 3; int M2 = 4; int M3 = 5; int power = 8; int ground =11; void turnright(); void turnright(); void turnmoreleft(); void turnmoreright(); void setup() { Serial.begin(9600); pinMode(power,OUTPUT); pinMode(ground,OUTPUT); digitalWrite(power,HIGH); digitalW...
ALGO
0.913811
5.238466
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2019-05-09T18:03:15.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a087f10720...
1ddfc39c-082f-46d0-8412-1ee9427d1545
orenov/usaco
silver/additional_problems/pond.cpp
#include <iostream> #include <vector> bool fun(std::vector<std::vector<int>>& a, int x, int k) { int n = a.size(); std::vector<std::vector<int64_t>> pr(n + 1, std::vector<int64_t>(n + 1, 0)); for (int i = 0; i < n; ++i) { for (int j = 0; j < n; ++j) { pr[i+1][j+1] = a[i][j] <= x; ...
ALGO
0.999925
5.2472
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2023-08-10T17: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": "06e42d2a159...
b0b42835-73b5-4340-bbc4-e4fe4b2f839f
ahona-omi/DSA
DataStructures/Queue/QueueArr.cpp
#include <bits/stdc++.h> using namespace std; class Queue{ int front, rear,sze,cnt, *arr; public: Queue(){ front=rear=-1; sze=INT_MAX; cnt=0; arr= new int[sze]; } int Size() {return cnt;} bool isFull() {return rear==sze-1;} bool isEmpty() {return front==-1 || ...
ALGO
0.999549
3.505443
{ "github_metadata": { "branch": "main", "commit_count": 9, "repo_created_at": "2023-09-15T12:41: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": "2337a160e8f3...
43300fca-e0eb-43a5-bd5e-a35544d94bdc
ishandutta2007/codeforces-s
staniewzki/normal/1312/E.cpp
#include<bits/stdc++.h> using namespace std; ostream& operator<<(ostream &out, string str) { for(char c : str) out << c; return out; } template<class L, class R> ostream& operator<<(ostream &out, pair<L, R> p) { return out << "(" << p.first << ", " << p.second << ")"; } template<class T> auto operator<<(ostrea...
ALGO
0.99991
3.935595
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:07:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "05f7118794a1...
88b29ec7-ec0d-4209-a527-2a7aa66ecb21
loook98/PlayWithAlgorithm
exercise/Solution221_2.cpp
#include <bits/stdc++.h> using namespace std; class Solution { public: int maximalSquare(vector<vector<char>>& matrix) { int m = matrix.size(), n = matrix[0].size(); int res = 0; //返回的是面积,dp数组中是边长。 //dp[i][j]表示以[i,j]为右下角的最大正方形的边长 vector<vector<int>> dp(m, vector<int>(n, 0)); ...
ALGO
0.999969
5.491953
{ "github_metadata": { "branch": "master", "commit_count": 16, "repo_created_at": "2022-06-18T07:41: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": "a8d0f2d49...
5e298407-ba06-40a5-a272-981870d7c97d
jutkko/algorithmcolle
codingtests/longestsubsequqnce.cpp
#include <iostream> #include <vector> #include <algorithm> #include <set> using namespace std; struct comp { bool operator() (const pair<int, int>& a, const pair<int, int>& b) { return a.first < b.first; } }; set<pair<int, int>, comp>::iterator true_lower(set<pair<int, int>, comp>& s, int v) { if((s.empt...
ALGO
0.999859
4.283847
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2013-12-30T11:01: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": "51aca86b45...
7149b3c5-ea49-4e7e-aea5-1734d16c031e
Legolaszstudio/aoc2021
Day12/12.cpp
#include <string> #include <fstream> #include <sstream> #include <deque> #include <vector> #include <iostream> #include <algorithm> #include <unordered_map> #include <set> struct Graph { std::unordered_map<std::string, std::vector<std::string>> tree; //WARNING It is not the best option to store the entire solutions b...
ALGO
0.999717
4.721009
{ "github_metadata": { "branch": "main", "commit_count": 29, "repo_created_at": "2021-12-02T16:58:05.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c9ec8bbb106...
8c99d703-1f74-4deb-8356-b255723bf40c
yurimn/boj
백준/Gold/1644. 소수의 연속합/소수의 연속합.cc
#include<bits/stdc++.h> #pragma warning(disable:4996) #pragma comment(linker, "/STACK:336777216") using namespace std; typedef long long ll; typedef long long LL; typedef pair<int, int> pii; typedef vector<int> vi; typedef pair<ll, ll> pll; typedef vector<ll> vl; #define pb(x) push_back(x) #define all(x) (x).begin(), (...
ALGO
0.999961
3.934188
{ "github_metadata": { "branch": "master", "commit_count": 197, "repo_created_at": "2022-06-28T07:55:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "264ce2cf...
b6a2811c-5df2-4f39-b366-3881ffc3653b
bluefcat/solve-problem
1001-2000/1671.cpp
#include <cstdio> #include <unordered_map> #include <unordered_set> using std::unordered_map; using std::unordered_set; constexpr int N = (50<<1) + 1; int p[N] = { 0, }; bool is_strong(int x[3], int y[3]){ bool result = true; for(int i = 0; i < 3; i ++) result &= (x[i] >= y[i]); return result; } int find(int x...
ALGO
0.999579
3.979104
{ "github_metadata": { "branch": "master", "commit_count": 608, "repo_created_at": "2021-02-15T17:01: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": "f0fda120...
657f868a-383f-48a5-a3a3-35d51772e130
Thasin-Sheikh/Codeforces-Solutions
954D .cpp
///*<NAME>***/// /***Stay_Home_Stay_Safe***/ ///**Author <NAME>**/// #include<bits/stdc++.h> using namespace std; #define MAX 1e6+10 #define MOD 1000000007 #define PI acos(-1) #define R 510 #define makefast__ ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); using ll=long long int ; using dl =double; using ld=l...
ALGO
0.99986
3.605593
{ "github_metadata": { "branch": "master", "commit_count": 11, "repo_created_at": "2023-03-27T10:45:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "e011509d6...
f1eeb4ed-8a9d-45d9-b6c7-8ed0514741f5
SaneenKP/DataStructures-Implementation
Linked List/SinglyCircularLinkedList.cpp
#include<iostream> //Node class for each node which holds value and the address of next node. class Node{ private: int value; Node* next; public: //Constructor initialises the node. Node(int value){ this->value = value; this->next = NULL; } void setValue(int value){...
ALGO
0.99922
5.608521
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2021-12-11T07:04: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": "6cf09914fd6...
a847a326-bc15-405b-820f-d75d2afb1dc9
cheerconi/online-judge
codeforces/Educational Codeforces Round 45/B. Micro-World/main.cpp
#include <iostream> #include <climits> #include <memory.h> #include <random> #include <ctime> #include <cassert> #include <cmath> #include <algorithm> #include <vector> #include <string> #include <map> #include <unordered_map> #include <set> #include <unordered_set> #include <vector> #include <queue> #include <stack> #...
ALGO
0.999992
3.889328
{ "github_metadata": { "branch": "master", "commit_count": 407, "repo_created_at": "2017-07-19T16:20:00.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1bb4e6de...
5954ad07-47b8-478a-b9b8-af0cc237ee3f
giladshm1/hw2_wet
main.cpp
#include <iostream> #include "HashTable.h" #include "UnionFind.h" #include "LinkedList.h" int PtrIntComparator(AVLTree<int>::AVLValue num1, AVLTree<int>::AVLValue num2) { return Compare(*num1, *num2); } int main() { /* struct Node<int> *head = NULL; int n1 = 1, n2 = 2, n3 = 3, n4 = 4, n5 = 5; in...
ALGO
0.997582
3.01303
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2022-01-07T09:44: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": "ed27ebd314...
d3a1a949-21c0-46ed-98d9-7daacf42d01a
alejandraa-cruiz/Portafolio-final
Actividad 4.3 Evidencia Final/Actividad 4.3/main.cpp
// ================================================================= // // File: main.cpp // Author: <NAME> y <NAME> // Date: 26 de noviembre de 2022 //This file contains the creation of a unweighted matrix graph to solve the problem given in the Activity 4.3 // // ======================================================...
ALGO
0.99747
4.127159
{ "github_metadata": { "branch": "main", "commit_count": 13, "repo_created_at": "2022-09-14T04:57: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": "ee52050a2e4...
80a7bdc2-ef87-4b6e-a304-5061a0b9e716
Akhil-1009/ADA-Assignment-Programs
graph2.cpp
#include<iostream> #include<climits> using namespace std; int minvertex(int *distance,bool* visited,int n) { int minver=-1; for(int i=0;i<n;i++) { if(!visited[i]&&(minver==-1||distance[minver]>distance[i])) { minver=i; } } return minver; } void dijs(int **arr,int ...
ALGO
0.999986
4.099534
{ "github_metadata": { "branch": "main", "commit_count": 20, "repo_created_at": "2023-05-12T15:13: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": "4c8f6b1b4ba...
cb13179b-c2b8-4eb2-99b9-71555af1bca1
vishusharmaX/100DaysofCodeChallenge
Medium/Print Anagrams Together/print-anagrams-together.cpp
//{ Driver Code Starts //Initial Template for C++ #include <bits/stdc++.h> #include <unordered_map> using namespace std; // } Driver Code Ends //User function Template for C++ class Solution{ public: vector<vector<string> > Anagrams(vector<string>& string_list) { //code here vector<vector<strin...
ALGO
0.999979
5.589617
{ "github_metadata": { "branch": "main", "commit_count": 2746, "repo_created_at": "2023-05-07T16:09: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": "db731f662...
402dfdc2-ebd1-444b-84c3-fa6441772ab2
hichemaichour/ACM-ICPC
Contests/ACM Contests/Bangladesh 2006/Mobile+.cpp
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <sstream> #include <fstream> using namespace std; int main() { ifstream cin("input.h"); int N; for(int cnt=1 ; cin >> N && N ; cnt++){ int i,j,k; vector<string> V(N); vector<int> v(N); for...
ALGO
0.999856
3.277579
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-09-06T05:49:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 5, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "534f353d59...
24eada13-e2c4-4e95-a201-f795685328c7
yancouto/competitive-programming
ojs/cc/chefc.cpp
#include <bits/stdc++.h> using namespace std; #define fst first #define snd second typedef unsigned long long ull; typedef long long ll; typedef pair<int, int> pii; #define pb push_back #define for_tests(t, tt) int t; scanf("%d", &t); for(int tt = 1; tt <= t; tt++) template<typename T> inline T abs(T t) { return t < 0?...
ALGO
0.999977
4.424478
{ "github_metadata": { "branch": "master", "commit_count": 143, "repo_created_at": "2016-08-26T11:17:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 6, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "19eaf3d3...
95296a88-8dd5-4e79-b3f5-5dcb4799d7b3
ThorntonLab/disease_sims
diseaseSims/traitValues.hpp
#ifndef __TRAIT_VALUES_HPP__ #define __TRAIT_VALUES_HPP__ #include <numeric> #include <fwdpp/fitness_models.hpp> #include <diseaseSims/mutation_with_age.hpp> /* Geometric mean of maternal/paternal haplotypes. */ struct TFL2013g { using return_type = double; inline double operator()( const glist::const_iterator &...
ALGO
0.957294
6.382115
{ "github_metadata": { "branch": "master", "commit_count": 654, "repo_created_at": "2014-03-05T19:27:02.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "bbbd60603...
e1ddc980-632c-402e-91d7-cbe8bc8f1aa3
baimao123456/jianzhi-offer
面试题61-按之字形顺序打印二叉树.cpp
/*************************************/ //按之字形顺序打印二叉树 /*************************************/ #include <iostream> #include <stack> #include "BinaryTree.h" using namespace std; template<class T> void Print(BinaryTreeNode<T>* pRoot) { if(pRoot == NULL) return; stack <BinaryTreeNode<T>* > levels[2]; //定...
ALGO
0.999794
3.996896
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2018-06-09T13:47: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": "e3ead24702...
cce310c7-fa76-4414-8551-19a2d6dfd600
wayne1116/Uva-Online-programming
C++/544-Heavy Cargo.cpp
#include<iostream> #include<map> #include<queue> #include<cstring> using namespace std; int graph[256][256]; int main() { int n, m, i; int v1, v2; int count; int value; int index=0; string city1, city2; int weight[256]; map<string, int> mmap; queue<int> qu; while(cin>>n>>m){ ...
ALGO
0.999596
3.393921
{ "github_metadata": { "branch": "master", "commit_count": 415, "repo_created_at": "2019-03-20T11:15: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": "52879b2d...
bb6ff14a-1305-4d88-a381-77b4216cf755
merelydust/PAT-Advanced-Level
算法笔记/A1044_Shopping in Mars .cpp
// 查找题->二分查找 // 钱的累加是单调递增的->sum[] // 两个端点i,j之间的钱是sum[j]-sum[i-1] -> // sum[j]-sum[i-1]=m ->sum[j] = sum[i-1]+m -> // 枚举左端点i 查找是否存在使该等式恰好成立的右端点j // 否则 寻找第一个大于sum[i-1]+m的sum[j]->上界 #include <cstdio> using namespace std; int sum[100010]; int upper_bound(int l, int r, int x) { int left = l, right = r, mid; while(...
ALGO
0.999986
3.398479
{ "github_metadata": { "branch": "master", "commit_count": 165, "repo_created_at": "2018-09-10T09:13:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 119, "forks": 32, "issues": 2, "pull_requests": 0 }, "file_meta": { "content_id": "2d728...
3c8b9ec6-acb0-4be3-a563-e3b446e8573c
kinetic-rb/kinetic-rb.github.io
code/P7074.cpp
#include <cstring> #include <iostream> #define int long long #if !ONLINE_JUDGE #pragma warning(disable : 4996) #include <ctime> #endif inline void FileSwitch(const char* InputFileName, const char* OutputFileName, const bool& File) { #if ONLINE_JUDGE std::ios_base::sync_w...
ALGO
0.999887
3.257916
{ "github_metadata": { "branch": "main", "commit_count": 63, "repo_created_at": "2022-11-19T06:37: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": "398581d6ac0...
0985b7df-4e81-44ff-9ba7-5d0a94f3ce8d
RSMIT01/75DaysCodingChallenge
Day21/445. Add Two Numbers II.cpp
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */ class Solution { public: //without reversing ...
ALGO
0.999994
6.033391
{ "github_metadata": { "branch": "master", "commit_count": 83, "repo_created_at": "2022-03-24T14:55: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": "cf93027ff...
08a5794b-2e0a-4c63-b43f-9f3c5b9ccffc
TReynkens/ReIns
src/SpliceEM_Mstep.cpp
#include "SpliceEM_Mstep.h" ///////////////////////////////////////// // M-step ME // Function to compute root of in spliceEM_theta double f_theta(const double ltheta, const double D, const double br_sum, const NumericVector beta, const IntegerVector shape, const double trunclower, const double tsplice...
ALGO
0.999993
6.216847
{ "github_metadata": { "branch": "master", "commit_count": 599, "repo_created_at": "2015-07-27T12:46:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 21, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b4ebe...
b3a24597-9122-4636-98ef-7d14cf82b449
ishandutta2007/codeforces-a
antontrygubo_o/normal/1322/A.cpp
#define _CRT_SECURE_NO_WARNINGS #define _USE_MATH_DEFINES #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <bits/stdc++.h> #pragma GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline") //Optimization flags #pragma GCC option("arch=native","tune=native","no-zero-upper")...
ALGO
0.999704
4.053818
{ "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": "482e74ff379a...
1e8440a5-bc66-4ef5-8ac0-56fb8a05f1c5
Osurac/EDA-FAL
ED/Ejercicio 39/main.cpp
//<NAME> //A63 #include <iostream> #include <fstream> #include <string> #include <sstream> #include <map> #include <vector> using namespace std; bool resuelveCaso() { int n; cin >> n; cin.get(); if (n == 0) return false; string entrada; string clave; map<string, vector<int>> map...
ALGO
0.9996
3.604207
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2019-10-16T11:40:16.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "96ddcef801...
b58f623f-384c-48bc-a51c-dfdf0a98cad7
zhantong/leetcode
211. Add and Search Word - Data structure design/C++/Solution.cpp
class WordDictionary { public: class TrieNode { public: TrieNode *children[26]; string val = ""; }; TrieNode *root; /** Initialize your data structure here. */ WordDictionary() { root = new TrieNode(); } /** Adds a word into the data structure. */ void addW...
ALGO
0.999855
6.250117
{ "github_metadata": { "branch": "master", "commit_count": 538, "repo_created_at": "2017-02-11T10:56:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 34, "forks": 15, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c158be...
b6c85711-87da-4678-8d44-20126248f6f9
raincross7/code-similarity
codes/train_code/problem330/problem330_67.cpp
#include <bits/stdc++.h> using namespace std; template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; } using ll = long long; using P = pair<ll, ll>; const long double PI = acos(...
ALGO
0.999889
4.207561
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2024-03-06T05:07: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": "c3af79120acf...
efb49748-6949-40dc-929e-b8cf5352e2d7
manuromeromedina/snake
snake.cpp
#include<iostream> #include<conio.h> #include<stdio.h> #include<stdlib.h> #include<windows.h> #include<stdbool.h> #define ARRIBA 72 #define ABAJO 80 #define DERECHA 77 #define IZQUIERDA 75 #define ESC 27 using namespace std; //PROTOTIPOS DE FUNCIONES void gotoxy(int x, int y); void ocultar_cursor(); void mapa(); voi...
ALGO
0.990795
3.462067
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2023-07-25T03:56:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cc0b016f0e96...
e9c13eac-0c0c-4f0c-8593-48cc398a89b4
kousuketk/atcoder_practice
202204/01th~09th/08_abc018_D.cpp
#include <bits/stdc++.h> using namespace std; #include <algorithm> #define rep(i,n) for (int i = 0; i < (n); ++i) #define ALL(a) (a).begin(),(a).end() using ll = long long; using P = pair<int,int>; using T = tuple<int,int,int>; using Graph = vector<vector<P>>; const int INF = 1001001001; // const ll INF = 110010010010...
ALGO
0.999879
4.102183
{ "github_metadata": { "branch": "main", "commit_count": 406, "repo_created_at": "2021-04-19T14:33: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": "b3988009e3...
369a22e8-6145-400e-b165-ac0679e0c40d
DanielChappuis/reactphysics3d
include/reactphysics3d/constraint/ContactPoint.h
/******************************************************************************** * ReactPhysics3D physics library, http://www.reactphysics3d.com * * Copyright (c) 2010-2024 <NAME> * ********************************************************************************* *...
TOOL
0.940974
7.648125
{ "github_metadata": { "branch": "master", "commit_count": 1990, "repo_created_at": "2013-05-24T18:06:54.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1637, "forks": 239, "issues": 70, "pull_requests": 4 }, "file_meta": { "content_id": "e...
93ceab86-e945-4fdb-96b5-6bf5a2ad484c
towhid1zaman/Problem__Solving
codeforces/1234/D.cpp
#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; typedef pair <int, int> pii; typedef vector<pii>vip; #define all(v) (v).begin(),(v).end() #define sp(x,k) cout<<setprecision(k)<<fixed<<x<<endl; #define rep(i,a,b) for(int i =(a); i <=(b); ++i) #define mi...
ALGO
0.999738
3.783965
{ "github_metadata": { "branch": "master", "commit_count": 1936, "repo_created_at": "2021-01-03T05:25:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4de88fc...
72d234fb-5876-4c07-8bbc-8dd2ef9a3253
arrows-1011/CPro
AOJ/Volume11/1149.cpp
#include <iostream> #include <vector> #include <algorithm> using namespace std; struct State{ int h, w; State(){} State(int h, int w) : h(h), w(w) {} int area(){ return h*w; } int perimeter(){ return 2*(h+w); } }; int main(){ int N, W, D; while(cin >> N >> W >> D, (N ...
ALGO
0.999837
3.482188
{ "github_metadata": { "branch": "master", "commit_count": 258, "repo_created_at": "2015-11-18T15:08:07.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 3, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "da97f17f...
b068e132-08ef-47d6-93c2-0c7b1809881f
harshu-1728/LeetCode
Minimum Swaps to Sort.cpp
// { Driver Code Starts // C++ program to find minimum number of swaps // required to sort an array #include<bits/stdc++.h> using namespace std; int minSwaps(int A[], int N); // Driver program to test the above function int main() { int t; cin>>t; while(t--) { int n; cin>>n; in...
ALGO
0.999967
5.736598
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2020-12-28T03:40: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": "119d8c562f1...
f80810d7-19da-480e-afca-1d77539f68b0
Harshana192211067/cpp
66. ascending order.cpp
#include<iostream> int main() { const int maxSize = 100; // Assuming a maximum size for the array int arr[maxSize]; int n; // Input the number of elements in the array std::cout << "Enter the number of elements: "; std::cin >> n; // Input the elements of the array std::cout << "Enter ...
ALGO
0.999967
5.856245
{ "github_metadata": { "branch": "main", "commit_count": 45, "repo_created_at": "2024-04-09T10:16: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": "47beadaa8ed...