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
f96e97f8-0f8c-42a5-a429-02793d583262
XuWeibo-code/UAV_Visual_Navigation
src/GeometricTools.cc
/** * This file is part of ORB-SLAM3 * * Copyright (C) 2017-2021 <NAME>, <NAME>, <NAME>, <NAME> and <NAME>, University of Zaragoza. * Copyright (C) 2014-2016 <NAME>, <NAME> and <NAME>, University of Zaragoza. * * ORB-SLAM3 is free software: you can redistribute it and/or modify it under the terms of the GNU General Pub...
ALGO
0.993491
5.89297
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2024-07-04T07:54:28.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 10, "forks": 3, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "a991da4ef...
b26177e3-5b7e-473e-a742-b9b8bff11695
manavkush/PracticeProblems
Codeforces/Contests/660(div2)/c.cpp
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second typedef long long int lli; typedef vector<int> vi; #define all(x) x.begin(), x.end() #define FIO ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL) #define tr(it, a) for(auto it = a.begin(); it != a.end(); it++) #define d...
ALGO
0.999846
3.59912
{ "github_metadata": { "branch": "master", "commit_count": 127, "repo_created_at": "2020-05-01T23:53: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": "cd6ef45c...
8271f207-e110-4fc5-9282-785b04a370d2
ishandutta2007/codeforces-e
ei133333/normal/1329/C.cpp
#include<bits/stdc++.h> using namespace std; using int64 = long long; const int mod = 1e9 + 7; // const int mod = 998244353; const int64 infll = (1LL << 62) - 1; const int inf = (1 << 30) - 1; struct IoSetup { IoSetup() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10)...
ALGO
0.999771
3.747499
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-04-11T01:34: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": "99a467709a49...
df1c4e1b-7a4d-4ad0-a5dc-517c5a117b9b
kimdanang7131/DN_Coding
프로그래머스/2/70129. 이진 변환 반복하기/이진 변환 반복하기.cpp
#include <string> #include <vector> #include <stack> using namespace std; string ConvertBinaryNumToString(int size) { int binaryNum = size; stack<int> binaryNums; while(binaryNum > 0) { int temp = binaryNum % 2; binaryNums.push(temp); binaryNum /= 2; } ...
ALGO
0.99948
4.359185
{ "github_metadata": { "branch": "main", "commit_count": 640, "repo_created_at": "2023-04-01T01:12: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": "155dd8e808...
27d6add4-0158-4fe6-a363-3a08932bea74
pedroStelzer/Data-Structures-and-Algorithms
algorithms/Search/main.cpp
#include <iostream> #include "BinaryTree/binarytree.h" using namespace std; int main() { BinaryTree<int> tree; tree.insert(1); tree.insert(10); tree.insert(9); tree.insert(7); tree.insert(11); tree.insert(18); tree.insert(2); tree.search(10); tree.search(3); tree.print_t...
ALGO
0.99926
5.287887
{ "github_metadata": { "branch": "main", "commit_count": 47, "repo_created_at": "2025-02-16T18:31: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": "9eff100bc28...
04ee4fc3-bf14-45a0-a830-3031045afb67
wizhidev/MySipPhone
jni/openh264/codec/decoder/core/src/expand_pic.cpp
/*! * \copy * Copyright (c) 2013, Cisco Systems * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above co...
ALGO
0.916135
6.148455
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2017-09-09T07:49:50.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "007306a247...
6c5d5b9a-b1c7-46c5-bbb6-169ba08301ca
johnhaxx7/myleet
Search a 2D Matrix/Search a 2D Matrix.cpp
// // Search a 2D Matrix.cpp // // // Created by Apple on 15/8/4. // // class Solution { public: // O(m+n) slow bool searchMatrix(vector<vector<int>> & matrix, int target){ int m = matrix.size(), n, j(0); if (m) n = matrix[0].size(); else return false; for (int i = 0; ...
ALGO
0.999912
5.794717
{ "github_metadata": { "branch": "master", "commit_count": 113, "repo_created_at": "2015-06-26T08:38: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": "f4eef454...
9257e9c3-37b1-47b9-8c4f-997071624f70
jin3811/BAEKJOON
17252.cpp
/** * boj/17252 * * 이 문제에서 한발짝 더 나아간 17253번을 미리 풀었기 때문에 해당 문제는 바로 AC를 받았다. * 해당 문제의 입력 숫자의 최댓값은 2^31이지만 17253번은 2^63이다. */ #include <bits/stdc++.h> using ll = int64_t; using namespace std; ll my_pow(ll a, int b) { if (b == 0) return 1; if (b == 1) return a; ll t = my_pow(a, b / 2); if (b % 2 == 1) return t ...
ALGO
0.999867
4.065617
{ "github_metadata": { "branch": "master", "commit_count": 211, "repo_created_at": "2023-07-07T06:09:02.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2d8183a5...
645b33c2-355f-47a5-993c-132fbc8b5005
dipanjan/online-judge
CodeChef/DISHOWN.cpp
#include <cstdio> using namespace std; #define gc getchar_unlocked int score[10001]; typedef struct GraphNode { int chef; struct GraphNode* parent; int rank; } Dish; /** * Description: Add a set to disjoint-set data structure with only one element. * i.e, Create new set {x} with representative x * Inp...
ALGO
0.999924
3.974521
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2014-08-28T14:29: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": "02e3a324f8...
240a03f0-fff9-4d17-b9e4-c7a95eb9c3d6
Anik114911/XPSC_Batch_04
Week 3/Day 3/F.cpp
#include<bits/stdc++.h> #define fst ios_base::sync_with_stdio(false), cin.tie(NULL),cout.tie(NULL); #define ll long long #define endl '\n' using namespace std; int main(){ fst ll t; cin >> t; while(t--){ ll n; cin >> n; string s; cin >> s; ll prefix[n+1]; ...
ALGO
0.999848
3.64132
{ "github_metadata": { "branch": "main", "commit_count": 119, "repo_created_at": "2024-03-15T10:53: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": "8fae0fc79f...
c5b3c845-41c3-478b-91c2-f463ad303f8d
nitzansaar/HashTableLinkedLists
listFuncs.cpp
// Name: <NAME> // USC NetID: nsaar // CSCI 455 PA5 // Fall 2024 // listFuncs.cpp // Implementation of the linked list functions #include <iostream> #include <cassert> #include "listFuncs.h" using namespace std; // Node constructor Node::Node(const string &theKey, int theValue) { key = theKey; value = theVal...
ALGO
0.998101
5.15626
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-12-03T18:35: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": "d5a432a45202...
c3b55076-d539-420d-a810-545747bec9d1
spmallick/learnopencv
3D-Gaussian-Splatting-Code/gsplat/gsplat/cuda/csrc/third_party/glm/glm/gtx/closest_point.hpp
/// @ref gtx_closest_point /// @file glm/gtx/closest_point.hpp /// /// @see core (dependence) /// /// @defgroup gtx_closest_point GLM_GTX_closest_point /// @ingroup gtx /// /// Include <glm/gtx/closest_point.hpp> to use the features of this extension. /// /// Find the point on a straight line which is the closet of a p...
ALGO
0.974876
6.521762
{ "github_metadata": { "branch": "master", "commit_count": 2579, "repo_created_at": "2015-02-17T08:00:51.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 22057, "forks": 11720, "issues": 229, "pull_requests": 48 }, "file_meta": { "content_id...
935a5a8a-8b48-4434-856d-d10b13be3ac1
hidenobi/Algorithm
hang_doi_1.cpp
#include<iostream> #include<vector> #include<algorithm> #include<cmath> #include<cstring> #include<map> #include<queue> #include<stack> #include<string> using namespace std; long long mod = 1e9 + 7; void slove(){ queue<int> q; int n; cin >> n; int k; while (n--){ cin >> k; switch (k)...
ALGO
0.999406
4.153459
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-02-23T11:13:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d97748cfb195...
b0213f55-6725-4eaa-9042-5c22b3c511bb
ishandutta2007/codeforces-u
uryuuu/normal/1201/D.cpp
#include<iostream> #include<stdio.h> #include<cstdio> #include<vector> #include<algorithm> #include<cstring> #include<cmath> //#include<queue> #include<string> #include<stack> #include<set> #include<map> #include<time.h> #include<cstdlib> typedef long long ll; #define mm(a) memset(a,0,sizeof(a)) #define lr rt<<1 #defin...
ALGO
0.99897
3.19449
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:31: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": "e9f30fd66649...
67b30c5c-e6e0-47f2-9cc8-5a5213be1f82
RashikAnsar/everyday_coding
cpp/2d_arrays/maxSumSubmatrixRowColSorted.cpp
#include <climits> #include <iostream> using namespace std; /** * * BASIC INPUT : * 3 3 * -5 -4 -1 * -3 2 4 * 2 5 8 * BASIC OUTPUT : * 19 * ***/ int maxSumSubmatrix(int **arr, int n, int m) { // col-wise addition for (int i = n - 1; i >= 0; i--) { for (int j = m - 1; j >= 0; j--) { arr[i][j] ...
ALGO
0.999993
4.727377
{ "github_metadata": { "branch": "main", "commit_count": 185, "repo_created_at": "2020-11-08T13:30:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "84809673b3...
fdb1ffc1-0828-483c-b069-966c31923300
rasesh1/Leetcode
Easy/1474 Delete N Nodes after M nodes of a Linked List.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: ListNode* deleteNodes...
ALGO
0.999912
4.575918
{ "github_metadata": { "branch": "main", "commit_count": 99, "repo_created_at": "2021-07-17T09:41: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": "544b87c636f...
2db536c8-9c2c-49f1-965f-955b5d8939af
habibrahmanbd/Light-Online-Judge
1281 - New Traffic System.cpp
using namespace std; #include<bits/stdc++.h> #define db double #define ll long long #define ull unsigned long long #define vi vector<int> #define vl vector<long> #define vll vector<ll> #define mii map<int,int> #define mll map<ll,ll> #define pi ...
ALGO
0.999668
3.652096
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2016-07-28T10:45:31.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "2857be4ceb...
8649e1c1-1b61-4450-9f72-3ce5aa053806
guyuehome/guyueclass
simulation&control/webots_ros_darwin_op3/Webots_ROS_Darwin_op3/src/robotis_math/include/robotis_math/minimum_jerk_trajectory_with_via_point.h
/******************************************************************************* * Copyright 2018 ROBOTIS CO., LTD. * * 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.o...
ALGO
0.983062
6.062289
{ "github_metadata": { "branch": "main", "commit_count": 65, "repo_created_at": "2021-01-19T15:23:47.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 677, "forks": 449, "issues": 1, "pull_requests": 0 }, "file_meta": { "content_id": "460612e5...
6f575e79-fd14-41c5-99a1-7c66a75573f8
ishandutta2007/codeforces-t
takio/normal/486/E.cpp
#include <cstdio> #include <stack> #include <cstring> #include <algorithm> #include <cstdlib> #include <map> #include <iostream> #include <cmath> #include <queue> #define LL long long #define ls rt << 1 #define rs rt << 1 | 1 #define lson ls, l, m #define rson rs, m + 1, r using namespace std; const int N = 200100; s...
ALGO
0.999968
3.304104
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-10-30T16:27: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": "9bc669f61a56...
1de39548-f734-4ab5-aea2-ff56dc18ae64
adfwer233/GraphicsLab
include/geometry/parametric_intersector/curve_curve_intersector_2d/line_param_intersector_2d.hpp
#pragma once #include "bezier_bezier_intersection_2d.hpp" #include "curve_curve_inter_result.hpp" #include <geometry/parametric/bspline_curve_2d.hpp> #include <geometry/parametric/parametric_curves/straight_line.hpp> namespace GraphicsLab::Geometry { struct LineParamIntersector2D { static CurveCurveIntersection...
ALGO
0.963543
6.469316
{ "github_metadata": { "branch": "main", "commit_count": 688, "repo_created_at": "2024-01-12T15:54: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": "01e582e110...
1a86f037-baef-4c4e-b67b-08141893a4ae
joantyry/Server-Code
codes/Lagrange.cpp
#include <NTL/ZZ.h> #include<array> using namespace std; using namespace NTL; std::array<ZZ, 5> witness(ZZ p, ZZ q, ZZ j,ZZ x1, ZZ B1_0, ZZ B1_1, ZZ BS_0, ZZ BS_1, ZZ Onl_0, ZZ Onl_1) { std::array<ZZ, 5> result; ZZ OnlineServers [] = {Onl_0, Onl_1} ; ZZ product [] = {(B1_0*BS_0)%p, (B1_1*BS_1)%p }; ...
ALGO
0.999897
4.297692
{ "github_metadata": { "branch": "main", "commit_count": 10, "repo_created_at": "2022-03-27T17:00:26.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "cad4b240aa1...
0f52e2f2-74a1-46d8-8bcc-c50d2f23d368
firedraky/LeetCodeOJ
40.combinationSum2.cpp
class Solution { public: vector<vector<int>> combinationSum2(vector<int>& candidates,int target){ vector<vector<int>> result; if(candidates.size()==0)//empty return result; for(auto i:candidates) if(i<=0) return result;//has negative integer sort(candidates.begin(),candidates.end())...
ALGO
0.999996
5.940831
{ "github_metadata": { "branch": "master", "commit_count": 22, "repo_created_at": "2015-08-17T13:45: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": "0e987b44b...
ea7ae0da-4a69-457e-bda9-d86a685724ea
Mathieu-93/KursCpp
Cpplab5/virtual_poli/main.cpp
#include <iostream> using std::cout; using std::endl; struct IA { virtual void f1() = 0; //purely virtual function virtual ~IA(); }; IA::~IA() {} struct A : IA { void f1() override { cout << "A::f1()" << endl; } void f2() { cout << "A::f2()" << endl; } //not virtual ! void f3() { cout << "A::f3()" << endl...
TOOL
0.918447
5.774921
{ "github_metadata": { "branch": "master", "commit_count": 9, "repo_created_at": "2020-02-04T17:03: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": "04492b8dc1...
b6d7e087-eacb-4501-8fac-0c5a8004787f
sarthidarji128/DSA_ASSIGNMENT_SEM-2_ROLL-NO-12
PROJECT3.cpp
#include <iostream> #include <string> using namespace std; void PassByByValue(int num2) { cout << "You are in PassByValue()" << endl; num2++; } class Person { int age; string name; int height; int weight; public: Person() {} Person(string name) { this->name = name; } ...
TOOL
0.994703
4.970907
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-03-11T10:32: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": "45e9d1182379...
6de12945-3c99-4230-a018-70b93980ba3f
Fcber/tj2024_03036301
src/matrix.h
/****************************************************************\ * @brief Accessing, loading and base operations on images. * * @file image.h * * @author <NAME> * * @date Mar 5nd 2024 ...
TOOL
0.915732
5.920023
{ "github_metadata": { "branch": "main", "commit_count": 2, "repo_created_at": "2024-05-08T06:11: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": "a0284f032731...
2dea50f5-3f80-455f-9754-0e6276fc2985
mAbdullah02-bit/DATA-STRUCTURES-QUESTIONS
DATA STRUCTURES QUESTIONS/sum of two list.cpp
//#include<iostream> //using namespace std; // //class Node { //public: // int data; // Node* next; // // Node(int value) { // data = value; // next = nullptr; // } //}; // //class LinkedList { //public: // Node* head; // // LinkedList() { // head = nullptr; // } // // // vo...
ALGO
0.998852
4.966417
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2024-09-07T11:29:24.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "4448908d5...
6db8199f-4471-4e90-aa38-74c563a1d7b6
zqchen90/leetcode
permutation-sequence/permutation-sequence.cpp
#include <iostream> #include <string> #include <vector> using namespace std; void getPermutation(int n, int k, vector<bool> &digit_used, vector<char> &digit, vector<char> &path, int *curk, string &ret) { if (*curk >= k) { return; } if (path.size() == n) { // cout<<"find...
ALGO
0.999956
5.213209
{ "github_metadata": { "branch": "master", "commit_count": 217, "repo_created_at": "2014-08-04T08:28: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": "223ddd25...
9b4b9071-c541-4a36-94d4-5752b1c302c9
bgclutch/recursive_decent
rec_decent.cpp
#include "rec_decent.h" #include <stdio.h> #include <ctype.h> #include <assert.h> #include <math.h> #include <string.h> const char* string = "(cos(0)*321)^2"; int position = 0; double RecursiveDecent(){ return GetG(); } double GetG() { double val = GetE(); if (string[position] != '\0') SyntaxErro...
ALGO
0.98572
3.422863
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2024-11-27T20:45: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": "e134a6698864...
db4c438a-cce8-4a65-b87b-e7239c7372cd
MatijaLik/TekmovalnoProgramiranje
COCI/2020/4/d/d.cpp
/** * Author: MatijaL * Time: 2021-01-16 16:53:13 **/ #include <bits/stdc++.h> using namespace std; typedef long long ll; #define pll pair<ll, ll> #define loop(i, n) for(ll i = 0; i < n; i++) #define FOR(i,n,m) for(ll i = n; i <= m; i++) #define isIn(vec, item) find(vec.begin(), vec.end(), item) != vec.end() #define...
ALGO
0.999965
4.192392
{ "github_metadata": { "branch": "master", "commit_count": 52, "repo_created_at": "2020-03-15T19:34:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "29722c0cf...
9134ae01-1106-47c9-9988-4399b2f6e7db
Xx-oX/Sudoku
sudoku.h
/* * Sudoku.h * * Created on: march_2019 * Author: o_0 */ #ifndef SUDOKU_H_ #define SUDOKU_H_ #include<iostream> #include<iomanip> #include<vector> #include<algorithm> using namespace std; class Sudoku { public: Sudoku() { } vector<int> mapSudoku;//1d vector //transform: void swapNum...
ALGO
0.990256
4.449775
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2019-06-20T14:25: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": "0d72392416...
c893ece7-ba2d-447c-952b-d4587badbfbf
ydb-platform/ydb
contrib/libs/llvm16/lib/CodeGen/MachinePipeliner.cpp
//===- MachinePipeliner.cpp - Machine Software Pipeliner Pass -------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===---------------------------...
TOOL
0.973426
7.525281
{ "github_metadata": { "branch": "main", "commit_count": 35208, "repo_created_at": "2022-02-07T14:52:36.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 4512, "forks": 701, "issues": 2263, "pull_requests": 682 }, "file_meta": { "content_id": ...
776f9028-5eee-4e6d-9df1-d0eab56dff8a
lekhyaburle/MissionRnD-C-Recursion-Worksheet
src/Maze.cpp
/* Find if there is a connecting path between two given points in the maze. The maze is a matrix of order MxN, check if there exists a path between (x1,y1) and (x2,y2). Two points are said to connected if there is a series of 1's non-diagonally. Example: Maze of order 4x4: 1 0 1 0 1 1 0 0 0 1 0 1 0 1 1 1 (x1,y1):(0,0...
ALGO
0.996358
4.080377
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2016-03-29T16:06:12.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "85abcbc276...
482b4e61-adaa-4073-9491-ce46b4e30322
GYC1996/leetcode
refer_offer/ju-zhen-zhong-de-lu-jing.cpp
//请设计一个函数,用来判断在一个矩阵中是否存在一条包含某字符串所有字符的路径。 //路径可以从矩阵中的任意一格开始,每一步可以在矩阵中向左、右、上、下移动一格。 //如果一条路径经过了矩阵的某一格,那么该路径不能再次进入该格子。 //例如,在下面的3×4的矩阵中包含一条字符串“bfce”的路径(路径中的字母用加粗标出)。 // //[["a","b","c","e"], //["s","f","c","s"], //["a","d","e","e"]] // //但矩阵中不包含字符串“abfb”的路径,因为字符串的第一个字符b占据了矩阵中的第一行第二个格子之后,路径不能再次进入这个格子。 class Solution { pu...
ALGO
0.999794
5.581522
{ "github_metadata": { "branch": "master", "commit_count": 10, "repo_created_at": "2020-08-29T12:07: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": "e13cb8f7b...
8e3e6db2-1f0f-4588-a3b3-aaeb2d3431b6
Kiara-Marie/NewAnderson
runSim1D.cpp
#include <iostream> #include <math.h> #include <armadillo> #include <string> #include "jComputer.h" #include "findE.h" #include "runSim1D.h" using namespace arma; using namespace std; int is_symmetric(const mat& A){ if (A.n_rows != A.n_cols){ return 0; } for (unsigned int i = 0; i< A.n_rows;i++){ for (unsigned ...
ALGO
0.999761
3.71065
{ "github_metadata": { "branch": "refactoringJComputer", "commit_count": 57, "repo_created_at": "2019-06-17T06:00:35.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_i...
6b66de23-ecde-40e6-9a1f-fe4c5e91937c
TheTrustyPwo/CP
CodeForces/1913/C/main.cpp
#include <bits/stdc++.h> using namespace std; #define int long long void test_case(int test) { int n; cin >> n; vector<int> cnt(30, 0); while (n--) { int t, v; cin >> t >> v; if (t == 1) { cnt[v]++; while (cnt[v] >= 3 && v < 29) { cnt[v] = 1, cnt[v + ...
ALGO
0.999811
4.158914
{ "github_metadata": { "branch": "master", "commit_count": 15, "repo_created_at": "2023-04-12T05:05:18.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "a7113a465...
157dd4a3-b339-414d-91f1-9e5a9e1fc3ec
ket8n/DSA_Practice
NeetCode_150/Linked List/138. Copy List with Random Pointer.cpp
// first create the linked list then assgin random pointers using hash map /* // Definition for a Node. class Node { public: int val; Node* next; Node* random; Node(int _val) { val = _val; next = NULL; random = NULL; } }; */ class Solution { public: Node* copyRando...
ALGO
0.999618
5.423864
{ "github_metadata": { "branch": "main", "commit_count": 27, "repo_created_at": "2024-05-05T11:37: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": "eefd8c49869...
b919f356-4460-444c-8920-8c2c5872e712
TengFeiyang01/Algorithm
ACODE/atc/abc_45/d.cpp
#include<bits/stdc++.h> #define int long long #define INF 0x7f7f7f7f //2139062143 #define llINF 9223372036854775807 #define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); #define Equ(a,b) (fabs((a)-(b))<eps) #define More(a,b) (((a)-(b))>(eps)) #define x first #define y second using namespace std; const int N=1e6...
ALGO
0.999922
3.82082
{ "github_metadata": { "branch": "master", "commit_count": 38, "repo_created_at": "2024-07-12T15:01: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": "729a85589...
a8774fff-6b2d-48d2-8f73-15e7ae0955fd
dbalchev/advent-2022
main.cxx
#include <iostream> #include <unordered_map> #include <gflags/gflags.h> #include <day_00.h> #include <day_01.h> #include <day_02.h> #include <day_03.h> #include <day_04.h> #include <day_05.h> #include <day_06.h> #include <day_07.h> #include <day_08.h> #include <day_09.h> #include <day_10.h> #include <day_11.h> #inclu...
TOOL
0.95726
5.065487
{ "github_metadata": { "branch": "main", "commit_count": 48, "repo_created_at": "2022-11-26T16:48:57.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "3a72dfd0803...
c1a15c21-4acb-43a9-9252-3ec6994887e0
Grav3Dancer/PEAPwr
Projektowanie efektywnych algorytmów/Held_Karp/main.cpp
#include <iostream> #include <windows.h> #include <utility> #include <fstream> #include <algorithm> #include <chrono> #include <vector> #include <list> #include <bits/stdc++.h> using namespace std; int** mapa; int rozmiar; int* sciezka; int koszt; void wyswietl() //wyświetlanie mapy odległości jako macierzy { cout<<...
ALGO
0.999183
3.743026
{ "github_metadata": { "branch": "main", "commit_count": 5, "repo_created_at": "2021-07-15T21:27: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": "14fc83cfcbd7...
13f80a02-cda9-42fa-b155-036e0d13a318
firascode/SORTING-CENTER
Sorting Center.cpp
#include <iostream> #include <conio.h> using namespace std; void MaxHeapify(int a[], int i, int n) { int j, temp; temp = a[i]; j = 2*i; while (j <= n) { if (j < n && a[j+1] > a[j]) j = j+1; if (temp > a[j]) break; else if (temp <= a[j]) { a[j/2] = a[j]; j = 2*j; } } a[j/2] = temp; ...
ALGO
0.999919
3.476003
{ "github_metadata": { "branch": "master", "commit_count": 5, "repo_created_at": "2020-04-17T16:32: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": "77a0344216...
b8f17a01-9c1f-44a6-a403-1df8b23cbedd
rambor/roku9
src/Aligner.cpp
// Copyright 2020 <NAME> // // 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...
TOOL
0.950275
4.366178
{ "github_metadata": { "branch": "master", "commit_count": 1, "repo_created_at": "2021-07-26T22: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": "725d9eee8e...
2029460e-351a-4d86-a762-128768ba040d
whattadarsh/competitive-coding-online-platforms-solutions
virtual_contests_or_mashups/CODATHON21/guessNum.cpp
#include<iostream> #include<vector> using namespace std; //Macros #define endl "\n" #define fn(x,n) for(; x < n; x++) #define fo(n) for(auto i = 0; i < n; i++) #define debug(x) cout<< #x << " = " << (x) << "\n" #define readSeq(v, n) for(int i = 0; i < n; i++) cin>>v[i]; #define fastio ios_base::sync_with_stdio(false);...
ALGO
0.999546
3.623298
{ "github_metadata": { "branch": "master", "commit_count": 121, "repo_created_at": "2020-07-15T12:09: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": "41a9279c...
1add087f-6697-4ce7-ac76-9f10050b88c4
nhaehnle/aiant
tactical_smbase.cc
#include "tactical_smbase.h" #include "Bot.h" using namespace std; const uint8_t Submap::Mine; // must be the two least significant bits const uint8_t Submap::Enemy; ostream & operator<<(ostream & out, const Submap & sm) { Location cur; for (cur.row = 0; cur.row < Submap::Size; ++cur.row) { for (cur.col = 0; cu...
ALGO
0.994484
4.443653
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2011-12-19T08:34:20.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "d99a841b...
b0a682eb-8c3c-4063-9d99-db6dcf7a4323
Plakhotniuk/MPI_4Course
term2/task1/MergeSort.hpp
// // Created by user on 04.03.24. // #ifndef MERGESORT_HPP #define MERGESORT_HPP #include "Merge.hpp" namespace SortAlgorithms { // C++ program for Merge Sort // begin is for left index and end is // right index of the sub-array // of arr to be sorted */ template<typename T> void mergeSort(T...
ALGO
0.999908
6.387733
{ "github_metadata": { "branch": "arseniy", "commit_count": 40, "repo_created_at": "2023-11-20T20:03: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": "79059294...
08f0d9f2-0a06-4801-87ad-1bb2fb0de53c
aaryan359/swissmoto-assignment
main.cpp
#include <iostream> #include <queue> #include <vector> using namespace std; struct Process { int pid; int arrival_time; int burst_time; int remaining_time; int completion_time; int waiting_time; int turnaround_time; }; int main() { int n = 5; int time_quantum = 2; vector<Proce...
ALGO
0.999994
5.579994
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2025-02-11T08:42: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": "67c8cd0bde51...
a524db21-dec9-4aed-a14c-92b6f3ba5132
ste-cartu/Numerical-Simulation-Laboratory
Libraries/metropolis.cpp
#include "metropolis.hpp" #include <fstream> /*––––––––––––––––––––––––––––––––––– M(RT)^2 ALGORITHM –––––––––––––––––––––––––––––––––––*/ void Metropolis :: Reset(double step, int type, arma::vec x) { type_ = type; step_ = step; x_ = x; xold_ = x; } /* double Metropolis :: SetAcceptance(double ta...
ALGO
0.999845
5.482864
{ "github_metadata": { "branch": "master", "commit_count": 127, "repo_created_at": "2024-05-18T09:49: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": "d01c84dc...
03c402ff-9e85-46e1-ba93-391237dbd61f
riddhi-jain/DSAready
Arrays/Triplet Sum in Array.cpp
/*Given an array arr of size n and an integer X. Find if there's a triplet in the array which sums up to the given integer X. Algorithm : Sort the given array. Loop over the array and fix the first element of the possible triplet, arr[i]. Then fix two pointers, one at i + 1 and the other at n – 1. And look at the sum...
ALGO
0.999924
5.280736
{ "github_metadata": { "branch": "main", "commit_count": 235, "repo_created_at": "2021-04-23T07:05:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 15, "forks": 8, "issues": 7, "pull_requests": 0 }, "file_meta": { "content_id": "2cc37a88b...
87528b5d-b4d6-4c83-bbc6-7d856935b324
jccarvalhosa/maratona
googlecodejam/2013/round1a/a.cpp
#include <cstdio> #include <iostream> #include <algorithm> #include <string> using namespace std; typedef unsigned long long ll; ll r, p; ll R(ll n) { return r + 2*n; } ll S(ll n) { return 2*R(n) + 1; } ll sum(ll n) { ll v1 = S(n) + S(0); ll v2 = n+1; ll x = v1*v2; if(x/v1 != v2) return 0; return x/2; } ll uppe...
ALGO
0.999608
3.941099
{ "github_metadata": { "branch": "master", "commit_count": 482, "repo_created_at": "2012-12-12T23:19:32.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 7, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0b338896...
d4a8a0ea-02f8-42cb-9d72-c58f85957036
adnanaziz/EPIJudge
epi_judge_cpp_solutions/longest_increasing_subarray.cc
#include <vector> #include "test_framework/generic_test.h" using std::vector; struct Subarray { int start = 0, end = 0; }; Subarray FindLongestIncreasingSubarray(const vector<int>& A) { int max_length = 1; Subarray result; int i = 0; while (i < size(A) - max_length) { // Backward check and skip if A[j...
ALGO
0.999611
6.347412
{ "github_metadata": { "branch": "master", "commit_count": 191, "repo_created_at": "2017-12-21T06:15:15.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2874, "forks": 1899, "issues": 47, "pull_requests": 33 }, "file_meta": { "content_id": "...
a54c0639-56e5-4c2e-8520-79f8c2b6576b
yelmokht/linear-ordering-problem
src/sls/genetic/operators/mutation.cpp
#include <cassert> #include "mutation.hpp" #include "../../rules/neighbourhood.hpp" #include "../../rules/cost.hpp" /** * @brief Applies the exchange mutation operator to a population * * @param instance The instance for which to apply the operator. * @param population The population to apply the operator to. ...
ALGO
0.999124
6.504571
{ "github_metadata": { "branch": "main", "commit_count": 52, "repo_created_at": "2024-03-31T19:15: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": "12e1a9bd1e1...
80ad1c26-ca12-4476-94bf-b67177934f50
maruf0011/Programming
PreviousCode/kattis_icpc_na-4/J.cpp
#include <bits/stdc++.h> using namespace std; typedef vector<long long> VI; typedef vector<pair<int,long long> >VP; typedef vector<VI> VVI; typedef vector<VP> VVP; long long fuel_cost[123][100010]; struct pq { int n,f; long long c; pq(int n,int f,long long c):n(n) , f(f) , c(c){} bool operator<(con...
ALGO
0.999955
3.808509
{ "github_metadata": { "branch": "master", "commit_count": 12, "repo_created_at": "2015-07-05T14:48:25.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "0135fa5cd...
c4514562-341c-445f-a47f-6745f9e95514
msabbouri/CPP-hashing-function
hash.cpp
#include <iostream> #include <boost/math/distributions/chi_squared.hpp> #include <cstdint> #include <iomanip> #include <fstream> #include <string> #include <cmath> #include <vector> using namespace std; vector<int> hashes(65536); int bins[65]; void test(int n){ for (int i = 0; i < n; ++i) cout << hashes.at(i) <<...
TEST
0.90891
4.418748
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2019-06-03T17:35: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": "5a89719c80...
fcd56aa4-2246-46a5-ac9d-e503cd1fccf2
Qwe1rty/Algorithms
LinkedLists/Solutions/MergeTwoSortedLists.cpp
#include "../Structures/ListNode.h" /* * 21. Merge Two Sorted Lists * Easy * * Runtime: 4ms, faster than 98.39% * Memory Usage: 8.8MB, less than 97.54% * * https://leetcode.com/problems/merge-two-sorted-lists */ ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) { ListNode* head = nullptr; ListNode* tai...
ALGO
0.999697
6.093971
{ "github_metadata": { "branch": "master", "commit_count": 58, "repo_created_at": "2019-09-05T02:19:37.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "c7ca8ef1a...
5e66ac45-3cbf-4846-befd-4317e12ddd2b
LogicJake/code-for-interview
leetcode-cn/C++/687.最长同值路径.cpp
/* * @lc app=leetcode.cn id=687 lang=cpp * * [687] 最长同值路径 */ // @lc code=start #include <algorithm> using namespace std; struct TreeNode { int val; TreeNode* left; TreeNode* right; TreeNode() : val(0) , left(nullptr) , right(nullptr) { } TreeNode(int x) ...
ALGO
0.999836
6.360285
{ "github_metadata": { "branch": "master", "commit_count": 917, "repo_created_at": "2017-09-02T14:30:14.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 2, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "49c2090d...
3f15239a-ac48-4a55-9b84-09a0466ccb6e
oliffur/learning
Exercises/BinaryTrees/CheckBST.cpp
/* determines if a binary tree is a valid binary search tree * * tools used: recursion */ #include <iostream> #include <climits> using namespace std; struct TreeNode{ int value; TreeNode* left; TreeNode* right; TreeNode(int value): value(value), left(nullptr), right(nullptr){}; }; bool vali...
ALGO
0.999995
5.578941
{ "github_metadata": { "branch": "master", "commit_count": 2, "repo_created_at": "2016-05-21T23:05: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": "2f3a31464b...
423fa7bb-372d-4bc8-ac36-f5b7692f4cfd
preethamd98/Dictionary-Based-Code-Compression
SIM.cpp
/* On my honor, I have neither given nor received unauthorized aid on this assignment */ #include <iostream> #include <fstream> #include <algorithm> #include <vector> #include <map> #include <cstdlib> #include <string> #include <bitset> using namespace std; static bool comparator1(pair<string,pair<int,int>> A,pair...
ALGO
0.998863
3.757151
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2020-04-06T14:10:43.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "5b96cdabaf...
d4777881-4818-424a-9102-a290e5b8bc9b
Damlrca/SomeLabs
OpenMP_MatrixMult/main.cpp
// <NAME>, 2023 // OpenMP_MatrixMult #include <iostream> #include <chrono> #include <vector> //#include <omp.h> constexpr int N = 1000; int main() { std::vector<std::vector<int>> m1(N, std::vector<int>(N)); std::vector<std::vector<int>> m2(N, std::vector<int>(N)); for (int i = 0; i < N; i++) for (int j = 0; j <...
ALGO
0.999687
3.850713
{ "github_metadata": { "branch": "master", "commit_count": 35, "repo_created_at": "2023-03-25T20:13: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": "3da4ca934...
371dd76a-7f6c-4b82-bcc8-28d0c5b36419
euphoria108/atcoder-submissions
arc/145/c/wa.cpp
#include <algorithm> #include <iostream> #include <string> #include <utility> #include <vector> using namespace std; /* alias */ using ull = unsigned long long; using ll = long long; using vi = vector<int>; using vl = vector<long>; using vll = vector<long long>; using vvi = vector<vi>; using vvl = vector<vl>; using v...
ALGO
0.999994
4.115169
{ "github_metadata": { "branch": "main", "commit_count": 30, "repo_created_at": "2022-05-05T12:17: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": "c29fd3a8704...
f1cedd84-a821-46f1-8ba2-60b83b5f0936
nameless621/code
atcoder/ABC245/E.cpp
#include <bits/stdc++.h> using namespace std; #include <atcoder/all> using namespace atcoder; // E - Wrapping Chocolate // https://atcoder.jp/contests/abc245/tasks/abc245_e int main() { int N, M; cin >> N >> M; vector<int> A(N), B(N), C(M), D(M); for(int i = 0; i < N; i++) cin >> A[i]; f...
ALGO
0.999967
5.081018
{ "github_metadata": { "branch": "main", "commit_count": 247, "repo_created_at": "2024-12-06T12:01: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": "cd2276283e...
5a0f3473-7529-43e2-a187-8a3352b0dcb6
Harshit-Lakhawat/DSA-after-L23
L23 waveprint.cpp
#include <iostream> #include <vector> using namespace std; vector<int> wavePrint(int arr[][4], int nrows, int mcols) { vector<int> ans; // This will store the final wave pattern for (int col = 0; col < mcols; col++) { // If column index is odd, traverse from bottom to top if (col & 1) { ...
ALGO
0.999797
5.799883
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-12-19T12:16: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": "8dbbaa3153df...
dcc9e853-5bcc-4408-953c-17a8b4ffad52
prabhjot-s/DSA
Sorting Algorithms/Selection_Sort_Recursive.cpp
//-------------------------------------------------------------------- //Selection Sort Recursive Algorithm //-------------------------------------------------------------------- #include<iostream> using namespace std; int minIndex(int a[],int i,int j) { if(i==j) //Base Condition { return i; } int k = minIn...
ALGO
0.999992
5.697598
{ "github_metadata": { "branch": "master", "commit_count": 27, "repo_created_at": "2020-09-12T19:08: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": "46afa9e0f...
c27424c1-86b4-4a7f-80e3-5f759cc10d17
OldAntelopes/Antiquated-Engine
GameCommon/Landscape/MapData/libastar/astar_heap.cpp
/* $Id Copyright (C) 2009 <NAME> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be u...
ALGO
0.990887
5.574604
{ "github_metadata": { "branch": "main", "commit_count": 278, "repo_created_at": "2022-08-09T09:14:08.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 5, "forks": 2, "issues": 8, "pull_requests": 0 }, "file_meta": { "content_id": "0b2a86bb66...
60ae533a-c3c0-43fc-9ae6-5ae32c7b4b4e
shuangde/ACM-ICPC-Record
uva/dp-beginner/uva-1424.cpp
/**===================================================== * This is a solution for ACM/ICPC problem * * @source : uva-1424 Salesmen * @description : dp * @author : shuangde * @blog : blog.csdn.net/shuangde800 * @email : <EMAIL> * Copyright (C) 2013/08/21 11:40 All rights res...
ALGO
0.999965
3.557915
{ "github_metadata": { "branch": "master", "commit_count": 269, "repo_created_at": "2013-08-17T17:12: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": "fde50f64...
bea4190a-48bd-4ca7-97b8-5a0ee0a102b8
Rohith-Rao/DSA-codes
trees/heaps/check heap.cpp
#include <iostream> using namespace std; struct btnode { btnode *lchild; int data; btnode *rchild; }; typedef btnode *btptr; struct queue { int size=25; int front=-1; int rear=-1; btptr elements[100]; }; void enqueue(struct queue &q,btptr x) { if ((q.rear+1)%q.size==q.front) { cout<<"f...
ALGO
0.999742
3.300221
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2021-07-01T14:06: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": "33aa9c282de3...
77267c82-e3f5-44f4-bee1-8abac8609c00
joyewon0705/Problem-Solving
BOJ/BOJ_11559.cpp
#include <iostream> #include <cstring> #include <queue> using namespace std; #define N 12 #define M 6 typedef pair<int, int> P; int dx[] = { -1, 1, 0, 0 }; int dy[] = { 0, 0, -1, 1 }; bool chk; int ans; bool isVisit[N][M]; char map[N][M]; int main(void) { for (int i = 0; i < N; i++) { scanf("%s", map[i]); } ...
ALGO
0.999944
3.829749
{ "github_metadata": { "branch": "main", "commit_count": 360, "repo_created_at": "2022-05-23T11:42: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": "f983b3e6ed...
de24f22e-d978-456a-9e54-267f7241b08e
TanYongF/algorithm
2022-6-25/C1.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; #define ms(s,val) memset(s, val, sizeof(s)) const int inf = INT_MAX; struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr) {} TreeNode(int x) : val(x), l...
ALGO
0.999993
4.527222
{ "github_metadata": { "branch": "master", "commit_count": 55, "repo_created_at": "2021-10-25T01:34:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "f8aa8b7c1...
92c8f722-ba41-4612-a394-0201d48797d9
cameroncuster/learn_data_structures_and_algorithms
DijkstraandMinimumSpanningTree/src/generateGraph.cpp
#include <iostream> #include <vector> #include <cmath> #include <ctime> #include <cstdlib> #include <queue> #include "edge.h" using namespace std; #define WIDTH 900 #define HEIGHT 900 #define VERTEX_RADIUS 10 #define VERTEX_EDGE_BUFFER 2 #define VERTEX_NEIGHBOR_BUFFER VERTEX_RADIUS * 5 struct node { int vertex; ...
ALGO
0.999431
5.194527
{ "github_metadata": { "branch": "master", "commit_count": 115, "repo_created_at": "2020-12-05T17:29: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": "0c598db7...
64c8febc-83c1-4347-b13e-36963467d144
NicolaBernini/CodingChallengesSolutions
hackerrank/matrix/diagdiff1.cpp
/** * @brief Solution to https://www.hackerrank.com/challenges/diagonal-difference */ #include <bits/stdc++.h> #include <cmath> using namespace std; /** * @brief An O(N) Solution which iterates along both the diagonals at the same time */ int diagonalDifference(vector<vector<int>> arr) { int d1=0; ...
ALGO
0.999976
5.586069
{ "github_metadata": { "branch": "master", "commit_count": 346, "repo_created_at": "2016-01-30T11:56:21.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 4, "forks": 4, "issues": 10, "pull_requests": 0 }, "file_meta": { "content_id": "227291f...
2dfdbb22-2f49-4816-8261-d9c344739b4d
Hoff22/CompetitiveProgramming
cf/CF900/E.cpp
#include <bits/stdc++.h> #define N 200000 #define MAX 1000000000 #define E 0.00000001 #define MOD 1000000007 #define INF 0x3f3f3f3f #define INFll 0x3f3f3f3f3f3f3f3fll #define LEFT(x) (2 * x) #define RIGHT(x) (2 * x + 1) #define se second #define fi first using namespace std; void solve(){ int n; cin >> n; vector<l...
ALGO
0.999917
4.564971
{ "github_metadata": { "branch": "main", "commit_count": 28, "repo_created_at": "2024-10-24T23:39: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": "b0b0497f8f6...
f001a144-982a-4430-8ecf-a1ab7fb9c800
anuragitme/DSA
Tree/binary_tree/extra/shortest_distance_btw2nodes_bt.cpp
#include<bits/stdc++.h> using namespace std; struct node{ int data; node* left; node* right; node(int d){ data=d; left=NULL; right=NULL; } }; node* LCA(node* root,int n1,int n2){ if(root==NULL){ return NULL; } if(root->data==n1 || root->data==n2){ ...
ALGO
0.99997
4.668315
{ "github_metadata": { "branch": "main", "commit_count": 114, "repo_created_at": "2022-01-18T08:19: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": "3cc07fa1ca...
ec9fb911-4193-432c-897d-4bc6cbe6756c
ChitrakshiChhabra/Recursion
revesreArray.cpp
#include <iostream> using namespace std; void swap(int *a, int *b) { int temp = *a; *a = *b; *b = temp; } void reverse1(int array[], int j, int i = 0) { if (i >= j) return; swap(&array[i], &array[j]); reverse1(array, j - 1, i + 1); } void reverse2(int array[], int size, int i = 0) { ...
ALGO
0.999705
4.767741
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2023-01-21T07:54: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": "6da4fdfca1...
6a83f761-63de-4a67-aadf-2abdc4de49f7
NaraaDev/usaco
bronze/CowSignal.cpp
#include<bits/stdc++.h> using namespace std; void setIO(string name = "") { ios_base::sync_with_stdio(0); cin.tie(0); if(name.size()) { freopen((name + ".in").c_str(), "r", stdin); freopen((name + ".out").c_str(), "w", stdout); } } int main() { setIO("cowsignal"); int M,N,K; cin...
ALGO
0.999717
3.272748
{ "github_metadata": { "branch": "main", "commit_count": 1, "repo_created_at": "2024-09-09T01:58: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": "283d312f4c0e...
3bf792e2-5ade-4ded-8992-c733645a2901
ankit13022/codeforces
964B.cpp
#include <bits/stdc++.h> #include <vector> #include <iostream> #include <cmath> #include <string> #include <bitset> #include <cstring> #include <algorithm> #include <numeric> using namespace std; #define ll long long #define mp make_pair #define mod 1000000007 void ankit7890() { int a1, a2, b1, b2; cin >> a1...
ALGO
0.999975
4.245723
{ "github_metadata": { "branch": "main", "commit_count": 124, "repo_created_at": "2024-06-17T15:21: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": "ef9c449bef...
3d521924-ba63-4429-bf7e-670c051345df
Milxnor/Project-Reboot-3.0
Project Reboot 3.0/UnrealMathUtility.h
#pragma once #include "GenericPlatformMath.h" struct FMath : public FGenericPlatformMath { template< class T > static FORCEINLINE T Clamp(const T X, const T Min, const T Max) { return X < Min ? Min : X < Max ? X : Max; } template< class T > static FORCEINLINE T Square(const T A) { return A * A; } #defin...
ALGO
0.910426
7.28095
{ "github_metadata": { "branch": "master", "commit_count": 378, "repo_created_at": "2023-03-04T20:06:11.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 162, "forks": 115, "issues": 24, "pull_requests": 0 }, "file_meta": { "content_id": "0d5...
110ab96c-19c1-4807-807d-956d6676cc19
fnky/nex
src/nex/math/sphere.cpp
#include <nex/math/sphere.h> #include <nex/math/aabb.h> #include <nex/math/frustum.h> namespace nx { Sphere::Sphere() : center(vec3f()), radius(0.0f) { } Sphere::Sphere(const vec3f center, const float radius) : center(center), radius(radius) { } bool Sphere::intersects(const Sphere& sphere) const { ...
ALGO
0.986923
7.143183
{ "github_metadata": { "branch": "master", "commit_count": 180, "repo_created_at": "2015-07-08T00:44: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": "9ef8b153...
c16790da-26bf-46d6-9da1-a0d0297e48d3
vpekunov/AMALGAMA
NeuroNet.dir/nnets.h
#ifndef __NNETS_H__ #define __NNETS_H__ // #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <string.h> #include <memory.h> #include <math.h> #include <time.h> #include <float.h> #include <vector> #include <map> #include <omp.h> using namespace std; #ifndef max #define max(a,b) ((a)>...
TOOL
0.959966
3.057359
{ "github_metadata": { "branch": "main", "commit_count": 85, "repo_created_at": "2022-01-07T21:28:09.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7e652d2a751...
6a45f9c6-502e-485c-b4d2-0d12a9f58b21
BradMelchor/C-examples
C++ DATA_STRUCTURES/Proj3.cpp
//<NAME> //COP2535.001 //This program is designed to take input from file and put them into two arrays. If they match it supposed to display that they match and if they dont it should output that they don't match. #include <iostream> #include <fstream> #include <string> #include <iomanip> #include <vector> #include <l...
TOOL
0.961019
3.489071
{ "github_metadata": { "branch": "main", "commit_count": 3, "repo_created_at": "2022-06-16T14:01: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": "4264cccf3082...
3344def4-7f45-425f-ab13-6843a1f71b57
LemoNade2000/ProblemSolving
BOJ/1XXX/1006/src/IntruderChoragi.cpp
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define MAX 987654321 void fill(vector<int> dp[3], int N, int W, vector<int> onetagon[2]){ for(int i = 2; i <= N; i++){ int vertical, upper, lower; vertical = upper = lower = 2; if(onetagon[0]...
ALGO
0.99994
3.914911
{ "github_metadata": { "branch": "master", "commit_count": 85, "repo_created_at": "2022-02-22T06:54: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": "073314a23...
e7cb761f-a1b7-40df-a602-40641aa90723
niubeilei/barry_dev
src/aos_core/aosFwder.cpp
//////////////////////////////////////////////////////////////////////////// // // Copyright (C) 2005 // Packet Engineering, Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification is not permitted unless authorized in writing by a duly // appointed officer of ...
TOOL
0.911458
5.591136
{ "github_metadata": { "branch": "master", "commit_count": 4, "repo_created_at": "2015-12-14T10:32:40.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 3, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "24a8311549...
bb8e7c79-3f57-4c82-bb74-9164a37ad2dc
DSC-NITA/HacktoberFest2020
DSA/Algorithms/Recursion-Backtracking/Rat-Maze.cpp
Problem Statement: Rat In A Maze Problem You are given a N*N maze with a rat placed at maze[0][0]. Find and print all paths that rat can follow to reach its destination i.e. maze[N-1][N-1]. Rat can move in any direc­tion ( left, right, up and down). Value of every cell in the maze can either be 0 or 1. Cells with va...
ALGO
0.999926
4.356979
{ "github_metadata": { "branch": "master", "commit_count": 240, "repo_created_at": "2020-09-30T20:03:29.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 6, "forks": 33, "issues": 0, "pull_requests": 4 }, "file_meta": { "content_id": "14442fcb...
114b619f-a7fb-4e50-9031-df2d9d3f9027
yosupo06/library-checker-problems
data_structure/ordered_set/gen/small.cpp
#include <iostream> #include <string> #include "../params.h" #include "random.h" using namespace std; int main(int, char* argv[]) { long long seed = atoll(argv[1]); auto gen = Random(seed); int K = seed % 3 + 1; int Q = Q_MAX; vector<int> A; for (int x = 0; x < K; ++x) { if (gen.uniform<int>(0, 1))...
ALGO
0.981506
3.628453
{ "github_metadata": { "branch": "master", "commit_count": 3115, "repo_created_at": "2019-05-30T20:49:42.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 589, "forks": 137, "issues": 98, "pull_requests": 3 }, "file_meta": { "content_id": "69...
a2e337cf-37d7-4309-8c4b-c2cec2252d83
mrcchef/CP
youtube/TUF/sde_sheet/day-24/bellman_ford_algo.cpp
#include <bits/stdc++.h> using namespace std; #define fastio ios_base::sync_with_stdio(false); cin.tie(0) ; cout.tie(0); #ifndef ONLINE_JUDGE #define debug(x) cerr << #x <<" "; _print(x); cerr << endl; #else #define debug(x); #endif #define fo(i,n) for(i=0;i<n;i++) #define Fo(i,k,n) for(i=k;i<=n;i++) #define...
ALGO
0.99998
3.817315
{ "github_metadata": { "branch": "master", "commit_count": 3, "repo_created_at": "2022-06-12T05:00: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": "f6f58ab07b...
91df0de1-726b-4282-8b48-9f9801c2b4cf
Jikky1618/AtCoder
ABC/ABC250-299/ABC275/f.cpp
#include <bits/stdc++.h> using namespace std; using ll = long long; const int INF = (1 << 30) - 1; #ifdef LOCAL #include <debug_print.hpp> #define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__) #else #define debug(...) (static_cast<void>(0)) #endif int main(){ cin.tie(nullptr); ios::sync_with_...
ALGO
0.999985
3.551992
{ "github_metadata": { "branch": "main", "commit_count": 1910, "repo_created_at": "2022-08-14T03:49:13.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "81b7b4581...
5af8138b-9919-47ec-97a1-96fbba37f458
Sanjay-2004/Elite
day025/2braceProduct.cpp
// Subodh is interested in playing with Strings, // For a given String 'S', Subodh applies some rules to find the value of 'S'. // The rules are as follows: // - If it is a balanced [] has value 1 // - XY has value X + Y , where X and Y are balanced [] strings. // - [Z] has score 2 * Z , where Z is a balanced parent...
ALGO
0.996028
4.254363
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-02-19T11:23:38.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "b9e48baf444...
5c0658bf-1123-42cf-8fe2-103571f4e561
HippoPlayer/HippoPlayer
src/external/bimg/3rdparty/astc/astc_averages_and_directions.cpp
/*----------------------------------------------------------------------------*/ /** * This confidential and proprietary software may be used only as * authorised by a licensing agreement from ARM Limited * (C) COPYRIGHT 2011-2012 ARM Limited * ALL RIGHTS RESERVED * * The entire notice above must be reproduced ...
ALGO
0.999675
3.602083
{ "github_metadata": { "branch": "master", "commit_count": 516, "repo_created_at": "2011-08-12T08:12:25.000Z", "is_fork": false, "is_org_owned": true, "forked_from": null, "stars": 124, "forks": 6, "issues": 97, "pull_requests": 2 }, "file_meta": { "content_id": "aeb247...
246f8e17-63c1-497b-9f9e-bdc98406a3a8
Riad-Mehedi/XPSC_Batch03
Week 8/H - Maximise Score.cpp
#include<bits/stdc++.h> using namespace std; #define ll long long #define lli long long int //#define for for(int i=0; i<n; i++) #define FAYAZ ios::sync_with_stdio(0); cin.tie(0); #define HUMAIRA return 0 #define vi vector<int> #define vll vector<long long> #define vs vector<string> #define pb push_back #define pii...
ALGO
0.99973
3.863317
{ "github_metadata": { "branch": "main", "commit_count": 31, "repo_created_at": "2023-10-01T17:16: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": "00480833d8c...
eef3db5d-39a1-4b32-85a0-c02db9acc639
Belgorodsky/CS_Algorithms
02_introduction_problems/fibonacci_last_digit/fibonacci_last_digit.cpp
#include <iostream> #include <cassert> #include <cstdint> #include <array> uint64_t get_fibonacci_last_digit_naive(size_t n) { if (n <= 1) return n; uint64_t previous = 0; uint64_t current = 1; for (uint64_t i = 0; i < n - 1; ++i) { uint64_t tmp_previous = previous; previous ...
ALGO
0.999185
5.122011
{ "github_metadata": { "branch": "master", "commit_count": 8, "repo_created_at": "2017-10-15T03:32:46.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "7bb5fa5a0b...
3a765abe-454d-4c42-887d-d5a414aa6f27
his-excellency/C-
Least_Recently_Used_Cache.cpp
//Least_Recently_Used_Cache.cpp //Efficient code- runs all operations in O(1) time class lNode{ public: lNode(int n):val(n),front(nullptr),back(nullptr){} lNode* front; lNode* back; int val; }; lNode* insert(lNode*& head,lNode*& latest, int v){ if(head==nullptr){ head=new lNode(v); ...
ALGO
0.999662
5.806082
{ "github_metadata": { "branch": "master", "commit_count": 17, "repo_created_at": "2018-08-17T14:47: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": "14bc64550...
0dff1dc7-e5f3-4fe0-94fe-fa94e14e07d3
Dhirajpt1234/codeforces-solved-problems
2022.06.28/5orac.cpp
#include <bits/stdc++.h> using namespace std; typedef vector<int> vi; typedef long long ll; typedef pair<int, int> pii; typedef pair<long long, long long> pll; typedef pair<string, string> pss; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<long long> vl; typedef vector<vl> vvl; #define fastIO ...
ALGO
0.999894
4.222696
{ "github_metadata": { "branch": "master", "commit_count": 47, "repo_created_at": "2022-05-17T04:31: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": "a673a6b54...
7257ff13-0de9-4ed5-a441-db6afe6f152c
KhaledHegazy222/Problem-Solving
CodeForces/545-C/545-C-130637625.cpp
#include <bits/stdc++.h> #ifndef Khaled #define endl '\n' #endif #define all(a) a.begin(),a.end() #define fast cin.tie(0),ios::sync_with_stdio(0),cout.tie(0) typedef long long ll; typedef unsigned long long ull; using namespace std; const ll N = 1e5 + 5; ll x[N],h[N],n; int dp[N][2]; int solve(int idx,int la...
ALGO
0.999894
3.34828
{ "github_metadata": { "branch": "main", "commit_count": 4, "repo_created_at": "2022-01-16T18:13: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": "223d45f1f4f4...
6783ccdc-bd90-4231-b997-b28f4bc95a52
AbdelrahmanKhaledd/ProblemSolving
Kattis/tritiling.cpp
#include <bits/stdc++.h> using namespace std; #define pb(i) push_back(i) #define sz(x) int((x).size()) #define all(x) (x).begin(), (x).end() #define ff first #define ss second #define debug(x) cout<<(#x)<<": \""<<x<<"\""<<endl #define debugVec(vec) cout<<(#vec)<<": "; for (auto& i: vec) cout<<i<<" "; cout<<endl templ...
ALGO
0.999979
3.820399
{ "github_metadata": { "branch": "main", "commit_count": 44, "repo_created_at": "2020-10-21T08:19: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": "06fa7d6bfb0...
33f9d213-440b-4d84-b170-3184d90fb1ec
khallark/Cpp-DSA-Questions
Data structures/Dynamic Programming/Codeforces(1500-1600)/Sum_on_segments.cpp
#include <iostream> #include <vector> #include <algorithm> #include <cmath> #include <set> #define ll long long #define ld long double #define vi vector<int> #define vll vector<ll> #define pi pair<int, int> #define pll pair<ll, ll> #define REP(i, x, y) for(int i = x; i < y; i++) #define REPR(i, x, y) for(int i = x; i ...
ALGO
0.999875
4.206512
{ "github_metadata": { "branch": "main", "commit_count": 18, "repo_created_at": "2024-03-15T04:09: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": "f5fc5e57448...
b7144f34-b967-442e-8a64-77842d5a551d
lanny105/LeetCode
Valid Palindrome/Method.cpp
//Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. // //For example, //"A man, a plan, a canal: Panama" is a palindrome. //"race a car" is not a palindrome. // //Note: //Have you consider that the string might be empty? This is a good question to ask during a...
TEST
0.919602
3.801384
{ "github_metadata": { "branch": "master", "commit_count": 427, "repo_created_at": "2016-05-30T19:52:04.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 0, "forks": 1, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "432a62e4...
2451497f-7001-4668-9097-92e718fb141f
Mahedi02/CP-WITH-PHITRON
WEEK WISE SOLVING/WEEK 10/W10-WEDNESDAY/Sliding_Window_Median.cpp
/* _AUTHOR_ : <NAME> _CREATED_ : 2024-05-29 || 15:21:37 */ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using namespace std; template <typename T> using pbds = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update...
ALGO
0.999992
3.968667
{ "github_metadata": { "branch": "main", "commit_count": 94, "repo_created_at": "2024-03-16T16:16: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": "e0c40efc9a8...
78f66cde-7de0-41ab-b428-c01033941566
djonata-dias/university-projects
Estrutura de Dados I/Djonata_de_Souza_Dias.cpp
// Bibliotecas #include <stdio.h> #include <stdlib.h> #include <string.h> #define tamanho 5 // Estrutura do Prato typedef struct tprato { char cor[15]; } tprato; // Estrutura da Pilha typedef struct tpilha { char nome[15]; struct tprato pratos[tamanho]; int ini; int topo; } tpilha; int mostrar_pilh...
ALGO
0.989037
4.77651
{ "github_metadata": { "branch": "master", "commit_count": 7, "repo_created_at": "2022-05-25T22:28: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": "437ce2c6f6...
68b5f296-65fe-414c-8ffc-aa338169a970
freeway348/code
c_code/main.cpp
#include <iostream> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ #include <stdio.h> #include <stdlib.h> #include <string.h> #define MaxSize 50 typedef struct student{ int data; int class1; char *name=NULL; char *sex=NULL; char *major=NULL; char *academy=NUL...
TOOL
0.984762
3.479267
{ "github_metadata": { "branch": "main", "commit_count": 6, "repo_created_at": "2024-10-22T11:17: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": "e8ef5f303868...
6fda709f-e38d-44b2-807e-f44c9c28c348
NikitaLobaev/Technopark_Algo
2.3.cpp
#include <iostream> #include <stack> #define max(a, b) ((a) > (b) ? (a) : (b)) void run(std::istream&, std::ostream&); int main() { run(std::cin, std::cout); return 0; } template <class Key, class Priority, class KeyComparator = std::less<Key>, class PriorityComparator = std::less<Priority>> class Treap { struct...
ALGO
0.999599
4.727182
{ "github_metadata": { "branch": "master", "commit_count": 18, "repo_created_at": "2020-06-07T09:32:27.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 2, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "66eaf661f...
2ae0009a-2dff-4e09-9f7b-c8a79a1f734b
gabriel88766/C-CPP-AlgorithmsAndContests
At-Coder/Regular/165/B.cpp
#include <bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; const ll INF_LL = 0x3f3f3f3f3f3f3f3f, MOD = 998244353; //1e9+7 const int INF_INT = 0x3f3f3f3f; const long double PI = acosl(-1.), EPS = 1e-9; using namespace std; //cout << fixed << setprecision(6) int main(){ ios_base::sync_wi...
ALGO
1
4.198405
{ "github_metadata": { "branch": "master", "commit_count": 436, "repo_created_at": "2020-08-21T00:21: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": "675d2da0...
82576ea7-4750-454d-9093-0a702b03a03a
md1894/c-ds
timeAndSpaceComplexity/checkArrayRotation.cpp
/* Check array rotation Send Feedback Given an integer array, which is sorted (in increasing order) and has been rotated by some number k in clockwise direction. Find and return the k. Input format : Line 1 : Integer n (Array Size) Line 2 : Array elements (separated by space) Output Format : Integer k Constraints : 1 <...
ALGO
0.999997
5.344139
{ "github_metadata": { "branch": "master", "commit_count": 141, "repo_created_at": "2019-10-31T17:31:34.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 0 }, "file_meta": { "content_id": "1f14421d...
00d0cef5-60fb-4cfc-8a79-e66772b916e5
chuanqixu/Study
computer-science/Stanford-CS106X-Programming-Abstractions-in-CPP-2019-Fall/CodeStepByStep/12 recursive backtracking; sublists, 8 queens/travel.cpp
#include <iostream> #include <string> #include <vector> #include <numeric> using namespace std; void travelHelper(int target_x, int target_y, vector<string> &chosen) { if (target_x == 0 && target_y == 0) { // There is some problem with the print code on CodeStepByStep // It does not allow for in t...
ALGO
0.999905
5.590729
{ "github_metadata": { "branch": "master", "commit_count": 189, "repo_created_at": "2020-07-18T15:56:53.000Z", "is_fork": false, "is_org_owned": false, "forked_from": null, "stars": 1, "forks": 0, "issues": 0, "pull_requests": 3 }, "file_meta": { "content_id": "44e5b527...