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 |
|---|---|---|---|---|---|---|---|
15a3228e-ca0d-4798-ba63-52a984efc5ee | Simon123123/MSMVF_VVC_TIP2023 | source/Lib/EncoderLib/IntraSearch.cpp | /* The copyright in this software is being made available under the BSD
* License, included below. This software may be subject to other third party
* and contributor rights, including patent rights, and no such rights are
* granted under this license.
*
* Copyright (c) 2010-2020, ITU/ISO/IEC
* All rights reserve... | ALGO | 0.998694 | 6.830441 | {
"github_metadata": {
"branch": "master",
"commit_count": 24,
"repo_created_at": "2023-09-22T04:42:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a40f382c... |
4a6477b0-8f93-488a-8cd9-fe4fa1c5c969 | virujthakur/LeetCode-Daily-Challenges | 18_Nov_2023_1838_Frequency_Of_The_Most_Frequent_Element.cpp | class Solution {
public:
//TC: (NLOGN) SC: O(N)
bool isValid(int mid, vector<int>& nums, int k, vector<long long>& prefix, int j, int i)
{
int n= nums.size();
long long expectedSum= (long long)nums[i]* mid;
long long psum=0;
if(i-1-mid >= 0)
psum= prefix[i-1] - p... | ALGO | 0.999981 | 5.874076 | {
"github_metadata": {
"branch": "master",
"commit_count": 645,
"repo_created_at": "2023-08-28T11:42:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "07ce9b27... |
6d56bef4-feba-42e3-8fdc-e828511c29cc | codesankalp/DSA-CP | cpp/array_manipulation.cpp | #include <bits/stdc++.h>
using namespace std;
bool comp(int a, int b)
{
return (a < b);
}
int main() {
#ifndef ONLINE_JUDGE
freopen("input1.txt", "r", stdin);
freopen("output1.txt", "w", stdout);
#endif
int n, m, max = 0, x = 0, a, b, k;
vector<int> arr;
cin >> n >> m;
for (int i = 0; i <= ... | ALGO | 0.999978 | 3.849338 | {
"github_metadata": {
"branch": "master",
"commit_count": 47,
"repo_created_at": "2020-08-17T04:43:52.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "53e22e6e8... |
b49856e3-2378-4c8c-a870-6fb7d1240186 | Scrappyz/Algebra-Calculator | main.cpp | #include "header.hpp"
#include "utility.hpp"
#include "parser.hpp"
#include "expression.hpp"
#include "equation.hpp"
using namespace std;
void input(Equation& eq, Expression& e)
{
while(true) {
Token t;
e = Expression();
char ch;
while(cin.get(ch)) {
if(ch == '\n' || ch... | ALGO | 0.99846 | 3.534211 | {
"github_metadata": {
"branch": "main",
"commit_count": 26,
"repo_created_at": "2021-12-14T07:20:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "52682190e8c... |
b399d7a6-898c-429f-b120-8318339cdde8 | garamkim83/Baekjoon-Study | baekjoon14502/baekjoon14502.cpp | #include<iostream>
#include<algorithm>
#include<queue>
using namespace std;
int n, m;
int map[9][9];
int temp[9][9];
int virus = 0, wall = 0;
int ans;
int dx[4] = { 1,-1,0,0 };
int dy[4] = { 0,0,1,-1 };
vector<pair<int, int>> way; // 좌표 저장
queue<pair<int, int>> q;
int BFS() {
bool visit[9][9];
// 방문 초기화
for (int i... | ALGO | 0.999519 | 3.829921 | {
"github_metadata": {
"branch": "main",
"commit_count": 77,
"repo_created_at": "2022-04-27T13:34: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": "8fbc4037503... |
d67f3878-3daa-4c9e-b4de-f0a18a9f7b0d | AntiO2/RMDB | src/analyze/analyze.cpp | /* Copyright (c) 2023 Renmin University of China
RMDB is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRAN... | TOOL | 0.913646 | 5.700618 | {
"github_metadata": {
"branch": "main",
"commit_count": 361,
"repo_created_at": "2023-11-07T08:26: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": "4a3105566a... |
99f3e485-7c29-4ccf-af75-385da68fcdcd | mirsys/mali_examples | samples/opengles_31/compute_particles/sort.cpp | /*
* This proprietary software may be used only as
* authorised by a licensing agreement from ARM Limited
* (C) COPYRIGHT 2014 ARM Limited
* ALL RIGHTS RESERVED
* The entire notice above must be reproduced on all authorised
* copies and copies may only be made to the extent permitted
* by a licensing agreeme... | ALGO | 0.998409 | 5.248677 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2018-03-06T20:24:59.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "47e4741cea... |
7eedf0a9-0fb5-448c-a4d1-5d32e7588104 | kiliakis/Algorithms | Escape/binsearch.cpp | #include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
template <typename T>
int binsearch(const vector<T> &a, const T key){
int res = -1;
int low=0;
int high=a.size();
while(high > low){
T middle = (high + low) / 2;
if(key > a[middle])
low = middle;
el... | ALGO | 0.999749 | 5.013142 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2016-08-02T06:39: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": "8cab09370... |
6f8e49b6-ad15-425c-8fb4-e5d067b6f608 | Acp-Pradhyuman/cache-simulator-fully-associative- | simulator.cpp | #include <iostream>
#include <vector>
#include <climits>
class CacheBlock {
public:
bool valid;
bool dirty;
int tag;
int lastAccessTime;
std::vector<int> data;
CacheBlock(int blockSize) {
valid = false;
dirty = false;
tag = -1;
lastAccessTime = 0;
data.r... | ALGO | 0.989465 | 6.413452 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-02-02T11:02: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": "d633772b4b70... |
7c6e5180-6dc3-4bce-817a-0f70e62e1966 | Andron00e/infa_3dsem_semenov | staticmap/staticmap.cpp | /*
#include <iostream>
#include <algorithm>
#include <vector>
class StaticMap
{
private:
std::vector<std::pair<int, int> > vector;
int size;
};
public:
StaticMap(std::vector<std::pair<int, int> > a){
sort(a.begin(), a.end());
vector = a;
size = a.size();
};
int Get(int key, i... | ALGO | 0.999866 | 5.007224 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2021-09-08T22:55: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": "35be0200d842... |
04ee178c-8511-4a97-92d1-e75d50896745 | m00p1ng/UVa-problem | Volume015/01586 - Molar mass.cpp | #include <cstdio>
#include <cstring>
#include <cctype>
double w_mole(char c) {
switch(c) {
case 'C': return 12.01; break;
case 'H': return 1.008; break;
case 'O': return 16.00; break;
case 'N': return 14.01; break;
}
return 0;
}
int main() {
int ts, n, len;
char sym... | ALGO | 0.997455 | 3.322769 | {
"github_metadata": {
"branch": "master",
"commit_count": 156,
"repo_created_at": "2017-02-12T03:31: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": "58baf7d2... |
468d3672-261a-458d-a1e0-d8c5342e7e80 | 247i/octave | include/octave-4.4.1/octave/lo-specfun.h | /*
Copyright (C) 1996-2018 <NAME>
Copyright (C) 2010 VZLU Prague
This file is part of Octave.
Octave is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any late... | TOOL | 0.927226 | 3.981221 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-05-17T08:54:19.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5a6d20883eb12... |
17fa7a89-d12c-46e7-9f89-eaa9fa9ff44c | shashank2232/CPP-CODES | POLYMORPHISM/virtualFunctions2.cpp | #include<iostream>
using namespace std;
class BasicCar{
public:
virtual void start(){
cout<<"BASIC CAR STARTED"<<endl;
}
};
class AdvancedCar:public BasicCar{
public:
void start(){
cout<<"ADVANCE CAR STARTED"<<endl;
}
};
int main(){
BasicCar *ptr = new AdvancedCar(); ... | TOOL | 0.914765 | 6.083459 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-04-13T21:16: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": "d6a29eb9ef1... |
bc499954-156c-444c-b5de-6817873d3e15 | OpenDigitalTwin-Dev/NLA | strumpack/src/BLR/BLRMatrixMPI.cpp | /*
* STRUMPACK -- STRUctured Matrices PACKage, Copyright (c) 2014, The
* Regents of the University of California, through Lawrence Berkeley
* National Laboratory (subject to receipt of any required approvals
* from the U.S. Dept. of Energy). All rights reserved.
*
* If you have questions about your rights to use... | TOOL | 0.957016 | 6.758884 | {
"github_metadata": {
"branch": "main",
"commit_count": 90,
"repo_created_at": "2024-04-18T05:14:12.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c6e0395c115b... |
7fbf614f-f28d-4828-9e1d-e2a0714793f6 | arthurherbout/crypto_code_detection | data/code-jam/files/3004486_Yingshan.Liu_5706278382862336_0_extracted_a.cpp | #include <iostream>
#include <vector>
using namespace std;
long long gcd(long long x, long long y) {
if (y == 0) return x;
return gcd(y, x%y);
}
int work() {
long long x, y;
char ch;
cin >> x >> ch >> y;
long long temp = gcd(x, y);
x = x / temp;
y = y / temp;
if ((y & (y-1)) > 0) return -1;
if (x > y) ... | ALGO | 0.999711 | 3.927298 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2019-09-20T18:35:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 8,
"forks": 4,
"issues": 10,
"pull_requests": 1
},
"file_meta": {
"content_id": "afcd355b... |
f640b574-b645-460e-8495-735093623722 | rutvik0709/DSA_in_CPP | merge_sort.cpp | #include <bits/stdc++.h>
using namespace std;
void merge(int arr[], int low, int mid, int high)
{
int n1 = mid - low + 1;
int n2 = high - mid;
int i = 0, j = 0, k = low;
int a[n1];
int b[n2];
for (int i = 0; i < n1; i++)
{
a[i] = arr[low + i];
}
for (int i = 0; i < n2; i++)... | ALGO | 0.999984 | 5.139087 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2022-08-23T05:53: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": "fb92ebcc25... |
71a85a10-7273-4d3a-85dd-912425c5d7f8 | Netflix/msl | core/src/main/cpp/crypto/opensslImpl/diffieHellman.cpp | /**
* Copyright (c) 2016-2017 Netflix, Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | TOOL | 0.951098 | 7.239866 | {
"github_metadata": {
"branch": "master",
"commit_count": 1271,
"repo_created_at": "2014-06-06T22:41:18.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 719,
"forks": 85,
"issues": 30,
"pull_requests": 1
},
"file_meta": {
"content_id": "ddcb... |
581a6937-c801-426c-9a52-dac11524262f | linghutf/topcoder | interview/libso-test/qsort.hh | #ifndef QSORT_HH_
#define QSORT_HH_
//#pragma once
#include <algorithm>
//#include <iostream>
//#include <iomanip>
#include "insertsort.hh"
#define CUTTOINSERT 10
template<typename T,class Compare> int Partition(T &array,int low,int high,Compare comp)
{
int i = low+1,j=high;
T r = array[low];
while(tru... | ALGO | 0.997712 | 4.691615 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2016-03-01T09:43:16.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7bb6a35f3... |
ee81c20f-e119-4120-82ef-d5f7273a8766 | dagarishabh/CosineSimilarity | gen-files.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
map < string , set < string > > cui;
map < string , set < string > > edge;
map < string , map < string , int > > count;
freopen("cuisine.csv","r",stdin);
string s;
getline(cin,s);
while(getline(cin,s))
{
istringstream str(s);
string id,g;
set < str... | DATA | 0.973759 | 3.323067 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-03-26T06:15:20.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dc3ffdaea6... |
1f9fe298-8df7-46ab-8164-846c6c1a8a0f | govinddwivedi-git/Codeforces-Solutions | A_Rudolf_and_the_Ticket.cpp | #include <bits/stdc++.h>
using namespace std;
// Macros and constants
#define pb push_back
#define endl ("\n")
#define pi (3.141592653589)
#define int long long
#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 mini(a, b, c) min(... | ALGO | 0.999941 | 4.735359 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2024-07-02T15: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": "81d5ded243a... |
11a29ab1-5383-494a-b870-dc678e27291f | rafshar95/Leetcode | 743_network_delay_time.cc | class Solution {
public:
void dijkstra(int source, std::vector<std::vector<int> >& adj, std::vector<std::vector<int> >& weight, std::vector<int>& distance){
std::set<std::pair<int, int>> candidates;
cout<< "";
candidates.insert({distance[source], source});
while(!candidates.empty()){... | ALGO | 0.999978 | 5.182994 | {
"github_metadata": {
"branch": "main",
"commit_count": 94,
"repo_created_at": "2022-10-18T17:45: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": "480be1992ea... |
d9eb1c70-95ff-487b-8a50-3785a551f94e | defoye/N-Queens | N Queens/queens.cpp | //
// queens.cpp
// N Queens
//
// Created by <NAME> on 4/22/17.
// Copyright © 2017 <NAME>. All rights reserved.
//
#include <iostream>
#include <vector>
#include <cstdio>
#include <ctime>
#include <math.h>
using namespace std;
int numSol = 0;
bool isSafe(const int n, int board[]) {
vector<int> locs;
... | ALGO | 0.999936 | 4.630253 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2019-09-14T18:50: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": "82a33c124... |
fa9af55a-c80c-4b39-957a-07f139a493bd | Nipuntank/OS_Codes | dining.cpp | #include <iostream>
#include <thread>
#include <mutex>
using namespace std;
const int NUM_PHILOSOPHERS = 5;
mutex forks[NUM_PHILOSOPHERS];
void philosopher(int id) {
int left_fork = id;
int right_fork = (id + 1) % NUM_PHILOSOPHERS;
this_thread::sleep_for(chrono::milliseconds(1000));
while (true) {
... | ALGO | 0.998736 | 5.473583 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-08-03T04:00: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": "9e1773d63eae... |
e3231b07-6a7b-4a62-b0a8-f75b8dc85f69 | ashutosh108/sb-sloka-counter | sb-sloka-counter.cpp | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <regex>
#include <stdexcept>
#include "rtfparser.h"
class VerseRange {
public:
VerseRange() = default;
void start_text_range(std::string const & text_first, std::string const & text_last="") {
text_first_ = text_first;
... | TOOL | 0.900142 | 4.990732 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2018-11-14T16:36: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": "643948ffb... |
5e853ae7-0ba1-4544-8e89-59c753b3e148 | parasguglani1/LeetCode | 1472-design-browser-history/1472-design-browser-history.cpp | class BrowserHistory {
public:
stack<string> fow,bck;
BrowserHistory(string homepage) {
bck.push(homepage);
}
void visit(string url) {
// while(!fow.empty())
// {
// fow.pop();
// }
stack<string> f1;
fow=f1;
bck.push(... | ALGO | 0.997545 | 5.56623 | {
"github_metadata": {
"branch": "main",
"commit_count": 2175,
"repo_created_at": "2022-12-18T12:37:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "980fb7309... |
ebdfa8aa-0054-4ebc-9731-9663bb509226 | yenthanh132/Codes | VOJ/QTREE2.cpp | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <vector>
#include <cstring>
#include <string>
#include <cmath>
#include <ctime>
#include <utility>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <sstream>
#define FOR(a,b,c) for (int a=b,_c=c;a<=_c;a++)
#de... | ALGO | 0.999794 | 4.190496 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2015-11-24T09:41:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3cadb05844... |
181f9595-9bbc-40eb-8732-16fd7ee5ca2a | ishandutta2007/codeforces-x | xuanquang1999/normal/543/B.cpp | using namespace std;
#include <bits/stdc++.h>
#define fto(i, l, r) for(int i = l; i <= r; ++i)
#define ii pair<int, int>
#define mp make_pair
#define pb push_back
#define maxN 3005
int n, m, s1, t1, l1, s2, t2, l2, d[maxN][maxN], ans;
vector<int> ke[maxN];
void BFS(int s) {
queue<int> q;
q.push(s);
d[s][s... | ALGO | 0.999923 | 3.908424 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T16:38: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": "cdc1fc73b80d... |
eeae679a-382a-4a7d-b0fe-34e0fad241a1 | JimmyWang0417/Algorithm-Competitive-Codes | Codeforces/PROBLEMSET/CF1324B Yet Another Palindrome Problem.cpp | #include <cstdio>
#define re register
#define ll long long
#define int ll
using namespace std;
template <typename T>
inline void read(T &x)
{
x = 0;
char s = (char)getchar();
bool f = false;
while (!(s >= '0' && s <= '9'))
{
if (s == '-')
f = true;
s = (char)getchar();
... | ALGO | 0.999839 | 3.757478 | {
"github_metadata": {
"branch": "master",
"commit_count": 106,
"repo_created_at": "2019-08-30T06:36:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "cb054f23... |
b1e5760b-f541-42fa-837a-5dca35719e36 | GodotVR/godot_openxr_for_godot_3.x | thirdparty/oculus_mobile_sdk/1stParty/OVR/Include/StringUtils.h | /************************************************************************************
Filename : String_Utils.h
Content : std::string utility functions.
Created : May, 2014
Authors : <NAME>
Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
******... | TOOL | 0.938594 | 6.633187 | {
"github_metadata": {
"branch": "master",
"commit_count": 256,
"repo_created_at": "2020-06-19T07:40:02.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 289,
"forks": 46,
"issues": 43,
"pull_requests": 5
},
"file_meta": {
"content_id": "4d7cc... |
875f3b08-1f4e-4080-b10a-de543f7888fb | NKH123/Competitive-Programming | Codeforces/1101E.cpp | #include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define REP(i,a,b) for (int i = a; i <b; i++)
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long> vl;
typedef pair<int,int> pi;
#define trace(x) cout<<#x<<"="<<x<<"\n";
#define llp... | ALGO | 0.999918 | 3.879098 | {
"github_metadata": {
"branch": "master",
"commit_count": 278,
"repo_created_at": "2018-08-17T12:36:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "901a256e... |
37723e39-7607-48cb-8e8d-100ae1bf2ff4 | Rodagui/LeetCode | 1290. Convert Binary Number in a Linked List to Integer.cpp | /** 1290. Convert Binary Number in a Linked List to Integer.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) {}
... | ALGO | 0.999985 | 5.643318 | {
"github_metadata": {
"branch": "main",
"commit_count": 47,
"repo_created_at": "2021-10-04T23:22: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": "cd4ece8386e... |
8f2d6936-c21c-4189-a941-bf1bf46fbdc4 | oojamchaudhary/Leetcode | 0641_DesginCircularDeque.cpp | #include <bits\stdc++.h>
using namespace std;
class MyCircularDeque
{
public:
int *dq;
int size, first, last;
MyCircularDeque(int k)
{
size = k;
first = -1;
last = -1;
dq = (int *)malloc(k * sizeof(int));
}
~MyCircularDeque()
{
if (dq != nullptr)
... | ALGO | 0.997467 | 5.20981 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2024-11-19T13:01: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": "5c2d58637b6... |
ae01ae8e-8a4f-4f2c-922c-cbe6b85145a3 | ishandutta2007/codeforces-l | lucina/normal/1644/D.cpp | #include <stdio.h>
#include <bits/stdc++.h>
#define st first
#define nd second
#define PQ priority_queue
#define MP make_pair
using ll = long long ;
using namespace std;
using pii = pair<int,int>;
using pli = pair<ll, int>;
using pil = pair<int, ll>;
using pll = pair<ll, ll>;
const int N = 2e5 + 10;
const int MOD = 99... | ALGO | 0.99969 | 4.488459 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:17:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a3db59c752f9... |
035ad144-0038-4469-81e6-5b139ca69840 | rajukumar2152/Data-Structure-and-Algorithm- | binary tree/treedignoalpribt.cpp | //ok sahi run kar raha bus thira sa problem aa rahi bichwala diafgnoal
// ek lim=ne me nahi aa raha hain
#include<iostream>
#include<string>
using namespace std;
struct Node {
int data;
Node* left ;
Node* right ;
};
Node* newnode(int x ) {
Node* temp = new Node();
temp->data = x;
temp->left = NULL;
temp->right... | ALGO | 0.999931 | 3.656781 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2020-12-11T09:09: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": "1ece5ccd15... |
e4bf9509-b3aa-4546-8a4d-f236d13e6cb2 | ThirdPartyNinjas/AdventOfCode2018 | Source/day3.cpp | #include <fstream>
#include <iostream>
#include <string>
#include <vector>
namespace Advent
{
void Day3A()
{
std::fstream input{ "day3_input.txt" };
std::string s;
char c;
int x, y, width, height;
std::vector<std::vector<int>> grid(1000, std::vector<int>(1000));
while (input >> s >> s >> x >> c >> y >... | ALGO | 0.998149 | 4.64514 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2018-12-03T15:57: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": "1c6a3f6acd... |
70155dd2-b73b-4b46-bf78-d5a5dd0cc396 | mariannyneris2004/exercicios-ipc-faculdade | Aula 10/aula10-exercicio04.cpp | #include <iostream>
using namespace std;
int main() {
float idade, contador_homens = 0, contador_total = 0, maior_idade = 0, homens_18_35 = 0, mulheres_18_35_c_c = 0, porcentagem_homens, porcentagem_mulheres;
char cor_olhos, cor_cabelos, sexo;
cout << "PESQUISA DE CARACTERÍSTICAS FÍSICAS" << endl << endl... | TOOL | 0.937939 | 3.732246 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-05-27T14:07: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": "a2bd5b0821f0... |
d4f44b1c-d1f8-4992-9309-63c6b69b8bf6 | Githubiswhat/LeetCode | C++/src/Solution1_100/Solution28.cpp | //
// Created by windowhaystack on 2023/3/2.
//
#include "Solution28.h"
#include <functional>
#include <iostream>
#include <vector>
#include <unordered_set>
#include <unordered_map>
#include <string>
using namespace std;
int Solution::strStr(string haystack, string needle) {
int n = haystack.length(), m = needle.... | ALGO | 0.99991 | 5.51521 | {
"github_metadata": {
"branch": "main",
"commit_count": 58,
"repo_created_at": "2021-02-02T12:56: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": "2f3398a3435... |
efd28526-b3c3-4b78-b690-507fe5fc460b | Dhruv-bansal15/CP | Codeforces_beta_round#4/before_an_exam.cpp | #include<bits/stdc++.h>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cst... | ALGO | 0.999979 | 3.063571 | {
"github_metadata": {
"branch": "main",
"commit_count": 75,
"repo_created_at": "2021-07-23T08:36: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": "ad1c5dde32e... |
ff768ec0-9f15-4785-8147-83d28481b5a7 | dqyi11/SVNBackup | Proj/MOO/NSGA-III-cpp/alg_environmental_selection.cpp | #include "alg_environmental_selection.h"
#include "alg_population.h"
#include "aux_math.h"
#include "alg_nondominated_sort.h"
#include "alg_reference_point.h"
#include <limits>
#include <algorithm>
#include <iostream>
using namespace std;
// ----------------------------------------------------------------------
// T... | ALGO | 0.99999 | 5.930959 | {
"github_metadata": {
"branch": "master",
"commit_count": 1203,
"repo_created_at": "2018-08-15T17:31:31.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "507bb98... |
b750806e-9a37-4a8d-818c-3fd3fb1138e0 | jiyoungit/Algorithm2020 | FourRulesCalculation.cpp | #include <vector>
#include <string>
#include <climits>
using namespace std;
int solution(vector<string> arr)
{
vector<int> num;
vector<char> oper;
for (size_t i = 0; i < arr.size(); ++i)
if (i % 2 == 0)
num.push_back(stoi(arr[i]));
else
oper.push_back(arr[i].fr... | ALGO | 0.999988 | 4.710206 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-03-04T07:25: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": "40704408de... |
2f59d24e-6854-48f1-9a4c-9d35e031bf27 | ryujimiya/IvyFEM.Native | src/IvyFEM.Native/IvyFEM.Native/Linear.Complex.Utls.cpp | #include "stdafx.h"
#include <vector>
#include <map>
#include <assert.h>
#include "IvyFEM.Native.h"
#include "Constants.h"
#include "IvyFEM.Native.Internal.h"
__complex __ComplexDotc(int n, __complex *X, __complex *Y)
{
__complex sum = 0;
for (int i = 0; i < n; i++)
{
sum += conj(X[i]) * Y[i];
}
return sum;
}
... | ALGO | 0.991558 | 4.030211 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2018-09-02T05:58: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": "75ece5cffb... |
7de91a9f-9647-4607-b4b0-3662670a3e86 | AlexandraArce521/LP2-G10-SG01 | Lab 2 cpp/Actividades cpp/Act_3.cpp | #include <iostream>
#include <string>
#include <vector>
using namespace std;
// ====== CLASE PERSONA ======
class Persona {
private:
string nombre;
int edad;
public:
Persona(string n, int e) : nombre(n), edad(e) {}
// Getters y Setters
string getNombre() const { return nombre; }
void setNombre... | ALGO | 0.998326 | 5.398922 | {
"github_metadata": {
"branch": "main",
"commit_count": 342,
"repo_created_at": "2025-03-12T21:44:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"content_id": "e739583982... |
63109d86-e180-411d-97f4-f73996ad9ad0 | tiger0132/code-backup | SPOJ/DYNALCA - Dynamic LCA/1.cpp | #include <algorithm>
#include <cstdio>
#include <cstring>
const int N = 1e5 + 51;
// clang-format off
#define L(x) ch[x][0]
#define R(x) ch[x][1]
int ch[N][2], p[N], r[N];
inline bool c(int x) { return R(p[x]) == x; }
inline bool nr(int x) { return L(p[x]) == x || R(p[x]) == x; }
inline void pd(int x) {
if (!r[x]) r... | ALGO | 0.999947 | 4.409919 | {
"github_metadata": {
"branch": "master",
"commit_count": 862,
"repo_created_at": "2019-08-03T04:23:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "21675b3f... |
fe248d04-2efc-489e-9a66-84209ef8e271 | Gnaroshi/practice-algorithm-solvedac | Tag_Essential/2/1018.cpp | #include <iostream>
#include <math.h>
using namespace std;
int main(void)
{
int n, m; cin>>n>>m;
char board[50][50];
char boardw[50][50];
char boardb[50][50];
for (int i = 0; i < 50; i++)
{
for (int j = 0; j < 50; j++)
{
if ((i + j) % 2 == 0)
{
... | ALGO | 0.999878 | 3.8427 | {
"github_metadata": {
"branch": "main",
"commit_count": 476,
"repo_created_at": "2024-03-13T08:59: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": "9d23f25d2a... |
42c924cf-ff70-4615-8f0e-1c877c6bc007 | LFsolar/programming1 | forFun/infix2postfix.cpp | /*
<NAME>
12/7/2019
This program takes an equation infix string and converts it to a postfix
string.
Conversion to cstring was probably unnessary.
*/
#include <iostream>
#include <stack>
#include <string>
using namespace std;
// Check if the precedence is the same
bool isSamePrecedence(stack<char> stacky, char i... | ALGO | 0.999664 | 4.768177 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-12-15T22:50: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": "67c8ad3c87... |
a8a8a272-8a43-4b56-bf8c-4a5f0ed0de25 | ishandutta2007/codeforces-a | aishiteru/normal/1354/B.cpp | #include<bits/stdc++.h>
#define it register int
#define ct const int
#define il inline
using namespace std;
typedef long long ll;
#define rll register ll
#define cll const ll
typedef double db;
#define rdb register db
#define cdb const db
namespace io{
il char nc(){
static char buf[100000],*p1=buf,*p2=buf;
return ... | ALGO | 0.999809 | 3.490197 | {
"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": "6231b0a857ef... |
05b4bc15-68e4-4ab3-b8b1-0d8c8029419e | towhid1zaman/UVA-Problem-solve | Basic Simulation/156 Ananagrams.cpp |
// </> : towhid1zaman
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;typedef vector<ll> vll;
#define fill(a) memset(a, 0, sizeof (a))
#define all(v) (v).begin(),(v).end()
#define sp(k) cout<<setprecision(k)<<fixed;
#define rep(i,a) for(int i=... | ALGO | 0.999915 | 3.875339 | {
"github_metadata": {
"branch": "master",
"commit_count": 34,
"repo_created_at": "2019-10-27T09:40:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c0cd98f22... |
af7e5fd7-f832-4fb9-ad57-6affd6c2f75e | gabriel88766/C-CPP-AlgorithmsAndContests | Codeforces/1950/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 | 0.999853 | 4.467251 | {
"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": "99b4c49d... |
b9c20b36-66fb-46a3-b59e-110dd5898f21 | SideWang/CPP | Examples/6_4/6_4.cpp | #include <iostream>
using namespace std;
/***********************************************************************************
功能:动态链表的建立和遍历
作者:Side
时间:2017/11/10
***********************************************************************************/
struct node
{
long value;
node *next;
};
node *establish_list(node *... | ALGO | 0.998914 | 3.719143 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2017-11-10T13:51: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": "3fa4cca4fd... |
d1f5bf8e-29e6-4eff-9620-884ac5a3f498 | fonte-nele/Competitive-Programming | Maratona Mineira 2018/H.cpp | #include <bits/stdc++.h>
#pragma comment(linker, '/STACK:200000')
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair< ll, ll > ii;
typedef vector< ll > vi;
typedef vector< ii > vii;
#define INF 0x3F3F3F3F
#define LINF 0x3F3F3F3F3F3F3F3FLL
#define pb push_... | ALGO | 0.999984 | 3.892471 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2019-06-22T18:49:05.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "fa0b63562... |
ae11df36-de04-435c-b70d-c594a45f7bbc | YoshihiroMichishita/Test_Codes | c++file/nonlinear/src/mainRM.cpp | //#include "matrix_op.hpp"
//#include "Ham_TMD.hpp"
//#include "C3v_HSL.hpp"
#include "transport.hpp"
#include <iostream>
#include <fstream>
#include <cstdlib>
//#include <chrono>
#include <omp.h>
using namespace std;
int main(int argc, char* argv[]){
ofstream out("TMD_Disp.dat");
ofstream out1("Mresolved_N... | ALGO | 0.998524 | 3.830235 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-12-26T06:38: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": "b9383e641... |
520b2a35-82da-4964-8a23-c8c9f39e5b46 | HardikJainGit/Cache | Graphs/Flood Fill.cpp | #include <bits/stdc++.h>
using namespace std;
#define vi vector<int>
#define vvi vector<vector<int>>
#define vvvi vector<vector<vi>>
#define f(b) for(int i=0;i<b;i++)
#define fz(i,a,b) for(int i=a;i<b;i++)
#define sz(x) ((int)(x).size())
#define vp vector<pair<int,int>>
#define pi pair<int,int>
#define pb push_back
#d... | ALGO | 0.999308 | 6.262198 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2024-07-15T20:35: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": "fdce751a9387... |
42a7d561-4f36-454c-aa53-10b8f952876b | MaskaZloyd/PneumaticActuator | src/model/pneumatic_model.hpp | #pragma once
#include <Eigen/Dense>
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <memory>
#include <mutex>
#include <thread>
#include <vector>
#include "friction/lugre_friction.hpp"
#include "physics/pneumatic_physics.hpp"
#include "solver/ode_solver_wrapper.hpp"
#includ... | TOOL | 0.945448 | 6.594326 | {
"github_metadata": {
"branch": "dev",
"commit_count": 24,
"repo_created_at": "2025-06-26T12:37: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": "6a38804949a4... |
969932d3-4fd9-42dd-838a-d0229937616e | XDEv11/Codeforces | Round#670_div2/D.cpp | #include <iostream>
#include <vector>
using namespace std;
void solve() {
int n;
cin >> n;
vector<long long> d(n);
for (auto& x : d) cin >> x;
long long a0{d[0]};
long long K{0};
for (int i{n - 1}; i >= 1; --i) {
d[i] -= d[i - 1];
K += max(0ll, d[i]);
}
if (a0 + K >= 0) cout << (a0 + K + 1) / 2 << endl;... | ALGO | 0.999929 | 5.149071 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2025-02-06T13:58:15.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "20847b84e8... |
3cfeaad3-f4f6-4d82-9f4b-c6c10fb32391 | mfrdixon/Intel | QL/ql/experimental/models/quadraticlfm.cpp | /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2014 <NAME>
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modif... | ALGO | 0.999619 | 7.189112 | {
"github_metadata": {
"branch": "master",
"commit_count": 27,
"repo_created_at": "2017-01-19T16:37:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 9,
"forks": 10,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a3aaf584... |
eb6f43cc-c58b-482c-8c4e-9fc4c3f07358 | nhatlonggunz/Algorithm-And-Data-Structure | Data Structure/HeavyLightDecomposition.cpp | // https://blog.anudeep2011.com/heavy-light-decomposition/
/*
Implement the idea of Heavy Light Decomposition
To see how to apply to a problem,
look for QTREE problems in SPOJ
*/
/**
HLD Complexity:
- Query: O(logn)
- Initialize: O(n) for setting up dfs and O(n) for decomposition
- Memory: O(n)
which is faster and r... | ALGO | 0.999767 | 4.268387 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2019-03-19T12:15:21.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4ca0fe5be... |
e6643d44-31c5-4e5b-abe2-38bcc6b3c164 | yhshu/Data-Structures-Algorithms-and-Applications-in-cpp | all codes in book/Data Structures, Algorithms, & Applications in C++, 2nd Edition/linkedWDigraph.h | // linked adjacency list representation of a weighted digraph
#ifndef linkedWDigraph_
#define linkedWDigraph_
#include <iostream>
#include <sstream>
#include "graph.h"
#include "graphChain.h"
#include "weightedEdge.h"
#include "vertexIterator.h"
#include "myExceptions.h"
using namespace std;
//********************... | ALGO | 0.98745 | 6.022383 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2017-10-02T12:05:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 76,
"forks": 26,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dabfb62d... |
8edb281f-4d88-4901-8499-afd3363c0db8 | abhidhole2002/singly_circular_linked_list | count_node_in_list.cpp | #include<iostream>
using namespace std;
class slist
{
slist* head;
slist* next;
int data;
public:
slist(int data)
{
this->data = data;
this->head = NULL;
this->next = NULL;
}
void addhead(int x)
{
slist* newn = new slist(x);
newn->next = NUL... | ALGO | 0.990889 | 4.248842 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2023-06-11T07:02: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": "963279a8f1a... |
dc4995ad-288e-4953-a55b-c30f2f7aff34 | palayutm/pcl | data-structure/treap_non_rotating.hpp | #include <bits/stdc++.h>
namespace treap {
template <class T> struct Node {
int sz, fix;
T key;
Node *ch[2];
Node(T key) : sz(1), key(key), fix(rand()) {
ch[0] = ch[1] = nullptr;
}
void pushup() {
sz = 1;
for (int i = 0; i < 2; i++) {
if (ch[i] != nullptr) {
sz += ch[i]->sz;
... | ALGO | 0.999637 | 4.313433 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2017-11-26T11:31:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "356a04a12... |
aa16fb1d-c5df-47aa-9ff8-d0d86466b407 | jinbooooom/programming-summary | C-plus-plus/sources/code-of-cplus-primer/3/char_repl.cpp | /*
* This file contains code from "C++ Primer, Fifth Edition", by <NAME>.
* Lippman, <NAME>, and <NAME>, and is covered under the
* copyright and warranty notices given in that book:
*
* "Copyright (c) 2013 by Objectwrite, Inc., <NAME>, and <NAME>."
*
*
* "The authors and publisher have taken care in the pre... | TOOL | 0.937044 | 4.949821 | {
"github_metadata": {
"branch": "master",
"commit_count": 154,
"repo_created_at": "2019-08-06T16:08:42.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 202,
"forks": 38,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "df657... |
36fb8b26-2c5f-4e26-828d-a4b793063f4a | DDUC-CS-Sanjeet/recursionlevel1-xtechilad | RecLev.cpp | #include <bits/stdc++.h>
using namespace std;
int FACTit(int num);
int FACTrec(int num1);
int GCDit(int par1,int par2);
int GCDrec(int par3,int par4);
int POWERit(int val,int exp);
int POWERrec(int val1,int exp1);
void FIBOit(int numa);
int FIBOrec(int base);
int main()
{
int a,b,numb1,numb2,numb3,numb4,numb5,numb6,... | ALGO | 0.992391 | 4.940938 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-01-17T08:51:30.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2a870045ab7... |
b978cc65-c35f-4c15-949b-aca7962c343e | Giosh99/UNIPD-programmazione-1 | 26-3-es1.cpp | #include <iostream>
using namespace std;
//PRE TV: p punta al primo elemento di una V-fetta, gli altri parametri sono ben definiti
int& TV(int*p, int lim1,int lim2, int lim3, int f, int n) { //f e' l'indice e n e' l'elemento
return *(p+f+n*lim3);
}
//POST TV: restituito il riferimento alla cella n della V-fetta
i... | ALGO | 0.992685 | 3.111474 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2019-06-01T12:55:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2730c35a70... |
39e2f344-bc91-40d2-8653-495ddaa2c286 | YashReddyS/ncrwork | data structures/Trees/binary tree implementation/binary tree implementation/Source.cpp | #include<iostream>
#include<algorithm>
using namespace std;
struct node {
int data;
struct node *left;
struct node *right;
};
node* i(int,struct node *);
void ino(struct node *);
class Tree {
struct node *root;
public:
Tree() {
root = NULL;
}
void insert(int);
void deleteNode(int);
void inorder();
... | ALGO | 0.999694 | 3.622803 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2019-01-31T14:28: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": "18b787784... |
7272d5f8-baf8-42aa-8a3f-693d7d018952 | tuktik/backjoon | 6987_월드컵.cpp | #include <iostream>
using namespace std;
int arr[6][3];
int check[6][3];
int is_avail = false;
int available()
{
for (int i = 0; i < 6; i++)
{
for (int j = 0; j < 3; j++)
{
if (arr[i][j] == check[i][j])
continue;
else
return 0;
}
}
return 1;
}
void dfs(int first_idx, int second_idx)
{
if (... | ALGO | 0.999955 | 4.666432 | {
"github_metadata": {
"branch": "master",
"commit_count": 40,
"repo_created_at": "2015-12-21T14:32: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": "e859a1c9e... |
3a592c9f-8be8-4235-8e45-9e0cbee26c81 | HONGJICAI/LeetCode | cpp/77.cpp | // dfs.cpp
class Solution {
void dfs(vector<int>& cur, vector<vector<int>>& res, int i, int n, int k) {
if (0 == k) {
res.push_back(cur);
return;
}
for (; i <= n && n - i + 1 >= k; ++i) {
cur.push_back(i);
dfs(cur, res, i + 1, n, k - 1);
... | ALGO | 0.99998 | 6.369455 | {
"github_metadata": {
"branch": "master",
"commit_count": 129,
"repo_created_at": "2017-04-09T13:26: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": "74b7717b... |
b355f204-a3dc-4444-ab6f-6ecb26019299 | shiv8115/LeetCode | 12. Large Factorial - GFG/12.-large-factorial.cpp | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
//User function template for C++
class Solution{
public:
vector<long long> make_factorial(vector<long long>&nums,long long maxval){
nums[0]=1,nums[1]=1;
for(int i=2;i<=maxval;i++){
nums[i]= (i*nu... | ALGO | 0.999829 | 5.432234 | {
"github_metadata": {
"branch": "main",
"commit_count": 1783,
"repo_created_at": "2021-08-30T13:55: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": "2e626f0f4... |
be40d2f2-add0-4ac7-a74b-d4502be166ac | debabrota1604/C-_STL_Study | leetCode/p869_reorderedPower2.cpp | #include<bits/stdc++.h>
using namespace std;
class Solution {
public:
void printMap(map<char, int> m){
for(auto it:m) cout << it.first << " : " << it.second << endl;
}
bool reorderedPowerOf2(int n) {
string inputAsString = to_string(n);
map<char,int> m;
for(auto i:inputAsStr... | ALGO | 0.999322 | 5.000727 | {
"github_metadata": {
"branch": "master",
"commit_count": 82,
"repo_created_at": "2022-03-03T12:28: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": "9fd994ebc... |
f67ab254-cf34-481b-9dca-d6091bc23abb | kjbartel/ampblas | ampblas/inc/detail/nrm2.h | /*----------------------------------------------------------------------------
* Copyright © Microsoft Corp.
*
* 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/lice... | TOOL | 0.943007 | 6.404629 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2015-05-29T10:17:27.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 4,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "39dcf8340... |
509af4b8-e5d6-4907-b7a5-37e040f93b5a | Kiraffi/aoc | 2019/10/main.cpp |
#include <algorithm>
#include <fstream>
#include <math.h>
#include <inttypes.h> // prix64
#include <stdio.h>
#include <vector>
struct Asteroid
{
int xpos;
int ypos;
};
int readValues(const char *filename, std::vector<std::string> &outMap)
{
int count = 0;
std::ifstream f (filename);
if (!f.is_open())
{
print... | ALGO | 0.999296 | 4.272553 | {
"github_metadata": {
"branch": "main",
"commit_count": 165,
"repo_created_at": "2023-12-04T22:29: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": "f89413bbfd... |
b97b0a12-347b-4721-9705-8b2ac7d2a1e9 | koba-e964/contest | codeforces/443/1a.cpp | #include <algorithm>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <str... | ALGO | 0.999862 | 4.144107 | {
"github_metadata": {
"branch": "master",
"commit_count": 2836,
"repo_created_at": "2013-09-13T04:48:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 25,
"forks": 5,
"issues": 20,
"pull_requests": 0
},
"file_meta": {
"content_id": "1353d... |
4ad728d3-6e6f-48a4-be26-d086bc05a716 | queertypes/boost-bloom-filters | boost/bloom_filter/detail/twohash_apply_hash.hpp | //////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright <NAME> 2011.
// Distributed under the Boost
// Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or
// copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/bloom_filter ... | ALGO | 0.916364 | 7.021059 | {
"github_metadata": {
"branch": "master",
"commit_count": 190,
"repo_created_at": "2012-06-22T23:55:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 24,
"forks": 12,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "a53e97... |
070df2b0-eedc-473b-aa27-1e289f88d415 | vaidikcode/Docs | CP 31/ten.cpp | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while (t--) {
int total = 0;
for (int i = 0; i < 10; ++i) {
string row;
cin >> row;
}
// ... | ALGO | 0.998972 | 4.512946 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2025-04-15T13:37: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": "cde9c5ba7c6... |
27a88f11-84f3-49f3-af5b-ffdd610a6bb2 | simit-lang/simit | src/grid_ops.h | #ifndef SIMIT_GRID_OPS
#define SIMIT_GRID_OPS
#include "ir.h"
#include "types.h"
namespace simit {
namespace ir {
/// Compute the index in the linearized grid edge set of the given set of
/// indices. `indices' should run from innermost (fastest running) to outermost
/// (slowest running).
inline Expr getGridPointCo... | ALGO | 0.968824 | 7.57589 | {
"github_metadata": {
"branch": "master",
"commit_count": 2665,
"repo_created_at": "2016-06-10T04:07:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 456,
"forks": 52,
"issues": 49,
"pull_requests": 1
},
"file_meta": {
"content_id": "ad06... |
bbc36fa7-ca17-4ae2-9700-58c686c5d74a | ishandutta2007/codeforces-c | cheissmart/normal/1220/E.cpp | #include <bits/stdc++.h>
#define IO_OP std::ios::sync_with_stdio(0); std::cin.tie(0);
#define F first
#define S second
#define V vector
#define PB push_back
#define MP make_pair
#define EB emplace_back
#define ALL(v) (v).begin(), (v).end()
#define debug(x) cerr << #x << " is " << x << endl
#define int ll
using namespa... | ALGO | 0.999767 | 3.873328 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:17: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": "9244266f897a... |
a592ace8-5340-428d-bd80-a6c2e0fc949a | pranavnkps/Coding-Practice | Day 6/sumoflinkedlist.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* addTwoNumbe... | ALGO | 0.999979 | 6.233128 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2020-07-06T17:19: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": "af34bc141... |
45b0d4ee-4c8c-45e1-bff3-69145da7c865 | mindboards/ev3sources | extra/linux-devkit/arm-none-linux-gnueabi/usr/include/c++/4.3.3/parallel/unique_copy.h | // -*- C++ -*-
// Copyright (C) 2007, 2008 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library 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 ... | ALGO | 0.994725 | 7.023931 | {
"github_metadata": {
"branch": "master",
"commit_count": 77,
"repo_created_at": "2013-07-30T17:43:05.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 451,
"forks": 182,
"issues": 13,
"pull_requests": 3
},
"file_meta": {
"content_id": "26a6b... |
dea53234-fee4-4f18-9506-f7ada82f4ad5 | Rehnoor-Aulakh/Object-Oriented-Programming | Practice Questions/PlayerTeamCaseStudy.cpp | #include<iostream>
#include<string>
#include<iomanip>
using namespace std;
class Player
{
string name;
int score;
public:
void set_player(string name, int score)
{
this->name=name;
this->score=score;
}
void display()
{
cout<<"-------------------------------------... | ALGO | 0.981122 | 4.170586 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2024-09-06T13:59: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": "ba7c942f277... |
0ab41b83-1093-4c95-9c83-cc853c074b5b | Bunyi5/Prog2Feladatok | 6.Het/2. STL map érték szerinti rendezése/sortMap.cpp | #include <iostream>
#include <map>
#include <set>
#include <functional>
using namespace std;
int main() {
map<string, int> Map;
Map.insert(pair<string, int>("a", 55));
Map.insert(pair<string, int>("b", 21));
Map.insert(pair<string, int>("c", 98));
Map.insert(pair<string, int>("d", 62));
Ma... | ALGO | 0.999669 | 4.327432 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2019-10-12T14:35: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": "f34e9c6ed... |
c7615247-5adb-418f-ac4f-559d7e40e0ea | jk13o3lll/hydra | bicgstab.cpp | // TODO: still has bug, check fundamental fnctions for vector and matrix calculation is correct first
#include <stdio.h>
#include <stdlib.h> // malloc, free, srand, rand
#include <string.h> // memcopy
#include <time.h> // time
// s for scalar; x, y for vector; A for matrix
// Use memcpy to copy
// memcpy(y, x, n... | ALGO | 0.999857 | 3.672092 | {
"github_metadata": {
"branch": "master",
"commit_count": 80,
"repo_created_at": "2020-02-18T14:25:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 0,
"issues": 1,
"pull_requests": 0
},
"file_meta": {
"content_id": "e6dc42185... |
55ab2cdf-1524-44ab-9eb5-a9d1b96a771d | lakshmanaram/Competitive-programming | codechef/November Chellenge 17/CSUBQ.cpp | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll f(ll a){
return a*(a+1)/2;
}
class construct{
public:
int v;
ll a, b, c;
construct(){
v = 0;
}
int size(){
return v;
}
void push_back(ll x){
switch(v){
case 0: a = x;
break;
case 1: b = x;
break;
default: c = x;
}
v++... | ALGO | 0.999963 | 4.171816 | {
"github_metadata": {
"branch": "master",
"commit_count": 90,
"repo_created_at": "2015-11-15T14:22:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 19,
"forks": 7,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1296e39f... |
2a2dbf49-d092-4a2a-ab36-89946c1ab4d6 | Leon-Zhaohw/NumericalProjectsCollections | FrontTracking/skin/src/smoothingGrid.cpp | // Copyright (c) 2011, Regents of the University of Utah
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright
// notice... | ALGO | 0.999927 | 5.299649 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2021-08-02T02:06:04.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 22,
"forks": 12,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e5be775... |
bd7d461e-07e3-4b04-87c7-f1481fc3515c | ChrisKimZHT/Algorithm-Problems | WHUT/2021/TeamExercise_04/I.cpp | #include <bits/stdc++.h>
#define MOD 1000
using namespace std;
double useless;
long long fastpow(long long a, long long b)
{
a %= MOD;
long long ans = 1;
while (b)
{
if (b % 2 == 1)
ans = ans * a % MOD;
a = a * a % MOD;
b >>= 1;
}
return ans;
}
int main(vo... | ALGO | 0.99946 | 4.090177 | {
"github_metadata": {
"branch": "master",
"commit_count": 366,
"repo_created_at": "2022-03-26T17:03:51.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 6,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "270cd200... |
5fbd1489-2a00-4893-becc-cfc990b352f0 | danache/coding | leetcode/leetcode437/leetcode437/main.cpp | //
// main.cpp
// leetcode437
//
// Created by 萧天牧 on 17/8/18.
// Copyright © 2017年 萧天牧. All rights reserved.
//
#include <iostream>
#include <vector>
using namespace std;
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
void getNu... | ALGO | 0.999979 | 5.373153 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2016-08-31T02:38: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": "0b1ca7f24... |
5a5e55fd-5dfe-4cc0-96c2-a967c8c3b149 | jhunter533/64846B_SpinUp_22-23 | 64846B_SpinUp_Final/src/oldPID.cpp | #include "oldPID.h"
#include "vex.h"
#include "PID.h"
#include "GlobalVariables.h"
motor_group LeftDriveSmartO = motor_group(FrontLeft, BackLeft);
motor_group FRBLStrafeO = motor_group(FrontRight,BackLeft);
motor_group FLBRStrafeO = motor_group(FrontLeft,BackRight);
motor_group RightDriveSmartO = motor_group(FrontRig... | ALGO | 0.995712 | 5.123919 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-04-17T17: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": "6938cf5434d1... |
6ce23e57-4d7c-440d-b026-a83926409153 | Mir00r/LeetCode-Coding-Arena | Math/Easy/Add-Strings.cpp |
#include <bits/stdc++.h>
using namespace std;
#define LI long int
#define LLI long long int
#define LL __int64
#define ULL unsigned long long
#define LLU long long unsigned
#define row 100
#define col 100
#define MAX 10000
#define jora pair <int, int>
#define memo(arr, value) memset(arr, value, sizeof(arr))
#define... | ALGO | 0.999789 | 4.78441 | {
"github_metadata": {
"branch": "master",
"commit_count": 81,
"repo_created_at": "2016-09-10T10:00: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": "892b4e161... |
15f22a23-c776-444c-9759-2e625ba7ea88 | elqmausam/CP | euler/euler_totient._1.cpp | #include <iostream>
#include <vector>
#include <cmath>
using namespace std;
const int MAX_PRIME = 1000000;
vector<bool> is_prime(MAX_PRIME + 1);
void sieve() {
is_prime[0] = is_prime[1] = false;
for (int i = 2; i <= MAX_PRIME; ++i) is_prime[i] = true;
for (int i = 2; i * i <= MAX_PRIME; ++i) {
if... | ALGO | 0.999965 | 4.52708 | {
"github_metadata": {
"branch": "main",
"commit_count": 10,
"repo_created_at": "2025-05-14T12:55: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": "5d5e33854df... |
ffe5bc14-fa20-4ee8-9873-deb357e41bde | AChen24562/C-Plus-plus | ET580/Day 1 Array_recursion_asymptotic/HW_Recursion_arrays/1Recursion_countdown.cpp | #include <iostream>
#include <fstream>
#include <sstream>
#include <ctime>
using namespace std;
// Linear Time Function
// Steps:
// Take an input
// Base case: of input == 1, output 1
// Recursive Action: print current input and function(input - 1), until input is 1
// Trace
/* Input into function 10
10 does not eq... | ALGO | 0.990778 | 5.189045 | {
"github_metadata": {
"branch": "master",
"commit_count": 227,
"repo_created_at": "2020-01-28T19:39: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": "1bd75777... |
eeb1d31b-a9fc-4755-b3cc-91985b0e62dd | ishandutta2007/codeforces-s | sevlll777/normal/1227/D1.cpp | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
... | ALGO | 0.999995 | 3.963833 | {
"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": "a30bdd5874e6... |
678c960b-f40a-402c-9364-ec244cc71b26 | cahpank/MetodeNumerik | MetodeTrapesium.cpp | #include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
double f(double x) {
return pow(x, 2) + (4 * x) + 4;
}
double f_prime(double x) {
return (2 * x) + 4;
}
double rumus_nilai_eksak(double x) {
return (1.0/3.0) * pow(x, 3) + 2 * pow(x, 2) + 4 * x;
}
double trapesium_satu_pias(do... | ALGO | 0.999747 | 5.785952 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2023-12-23T21:02: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": "77a2ebcd370f... |
4f82a16c-b163-44f5-b94d-8625841a7211 | binitrajshah7/DSA | 239-sliding-window-maximum/sliding-window-maximum.cpp | class Solution {
public:
vector<int> maxSlidingWindow(vector<int>& nums, int k) {
deque<int> dq;
vector<int> result;
// Intuition is to keep maximum element of current window at first of our deque
for(int i=0; i<nums.size(); i++){
// remove all the element out of your... | ALGO | 0.999947 | 6.486566 | {
"github_metadata": {
"branch": "master",
"commit_count": 732,
"repo_created_at": "2023-08-18T01:53: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": "8f6c44b5... |
6cd760a6-eda5-476b-bf93-379317ebb261 | STEllAR-GROUP/hpx | libs/full/segmented_algorithms/include/hpx/parallel/segmented_algorithms/minmax.hpp | // Copyright (c) 2007-2016 <NAME>
//
// SPDX-License-Identifier: BSL-1.0
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#pragma once
#include <hpx/config.hpp>
#include <hpx/algorithms/traits/segmented_iterato... | ALGO | 0.998899 | 7.756415 | {
"github_metadata": {
"branch": "master",
"commit_count": 29939,
"repo_created_at": "2012-05-26T15:02:39.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2693,
"forks": 480,
"issues": 124,
"pull_requests": 43
},
"file_meta": {
"content_id": ... |
6ce75db2-4fb0-4251-973e-d20cc6fee88f | mengzhichen/PHY905_Projects | Project3/src/Sun_earth_jupiter.cpp | #include <iostream>
#include <fstream>
#include <iomanip>
#include <time.h>
#include <cmath>
#include "armadillo"
using namespace std;
using namespace arma;
ofstream ofile;
// function declarations
void Outputfile(string, int, double, vec, vec, vec, vec, vec, vec, vec, vec, vec);
void Verlet( int, double, double);
vo... | ALGO | 0.999058 | 4.106731 | {
"github_metadata": {
"branch": "master",
"commit_count": 23,
"repo_created_at": "2018-01-27T05:23: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": "c214d637d... |
3c60ea12-5eef-4202-9acc-d801fde37e6e | akash4-sys/DSA | Codeforces/1100/731B.cpp | #ifdef __INTELLISENSE__
#include "../../headers.h"
#else
#include <bits/stdc++.h>
using namespace std;
#endif
#define ll long long
#define vec vector<int>
#define vv vector<vec>
#define vvv vector<vv>
#define all(v) v.begin(), v.end()
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#defin... | ALGO | 0.999968 | 4.332958 | {
"github_metadata": {
"branch": "main",
"commit_count": 272,
"repo_created_at": "2022-07-17T09:39:47.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "939a8e6886... |
da9fc528-c59a-4f2a-a9e1-37c4a68f652e | 23520761/NMLT_200_Solution_Array | UIT_23520761_BT03/Bai008/Bai008.cpp | #include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
void Nhap(int[], int&);
void Xuat(int[], int);
int chuSoDau(int);
void LietKe(int[], int);
int main()
{
int n;
int a[500];
Nhap(a, n);
Xuat(a, n);
LietKe(a, n);
return 0;
}
void Nhap(int a[], int& n)
{
cout << "Nhap n: ";
cin >> n;... | ALGO | 0.999447 | 3.327764 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2023-10-09T01:02: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": "0509aa10191... |
7ccafe44-68ce-412e-83b1-2cbc0ea8fb76 | tomyprojects/speaking_in_tongues | main.cpp | #include <iostream>
#include <vector>
#include <numeric>
#include <memory>
#include <deque>
#include <string>
#include <fstream>
#include <sstream>
#include <map>
using namespace std;
class char_type;
typedef map<char, char_type> googlerese_map;
void read_file(const char * name, vector<string> & test_cases)
{
f... | ALGO | 0.999411 | 3.767075 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2012-06-13T16:46:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "93e2b585d9... |
970ffa37-f66b-4b95-acb3-90261ab595c9 | WXY666541/jianzhioffer_test | test4.20.cpp | #include<iostream>
#include<vector>
#include<algorithm>
#include<stack>
#include<queue>
#include<list>
#include<assert.h>
#include <algorithm>
using namespace std;
#if 0
/*
******************************
数组中出现次数超过一半的数字
******************************
*/
//方法一
bool g_bInputInvalid = false;
bool CheckInvalidArray(int* n... | ALGO | 0.999826 | 4.49168 | {
"github_metadata": {
"branch": "master",
"commit_count": 56,
"repo_created_at": "2020-03-02T05:18: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": "55de67420... |
88293b6a-9651-4bd5-b00c-e2d8d5300ae8 | vkaash-sharma/leetcode-question-solution | leetcode 54sol.cpp | class Solution {
public:
vector<int> spiralOrder(vector<vector<int>>& matrix) {
vector<int> ans;
int n = matrix.size();
int m = matrix[0].size();
int total = n*m;
int cmin = 0;
int rmin = 0;
int rmax = n - 1;
int cmax= m - 1;
int c = 0... | ALGO | 0.999994 | 6.804657 | {
"github_metadata": {
"branch": "MASTER",
"commit_count": 67,
"repo_created_at": "2022-02-18T10:28: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": "f5ee62693... |
36d85b4a-8010-471f-a8fe-2cce73c9474c | heittpr/cp | obi/p2/2022/f1/bombom.cpp | #include <bits/stdc++.h>
using namespace std;
map<char, int> v = {{'A', 10}, {'J', 11}, {'Q', 12}, {'K', 13}};
int main() {
cin.tie(0)->sync_with_stdio(0);
char f, d, n; cin >> f >> d;
int a = 0;
for (int i = 0; i < 3; i++) {
cin >> f >> n;
a += v[f];
if (n == d) a += 4;
}
... | ALGO | 0.999444 | 4.64124 | {
"github_metadata": {
"branch": "main",
"commit_count": 201,
"repo_created_at": "2020-08-27T00:43: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": "b7c193c06b... |
a011a29f-e425-4db5-9191-9f26f79f7bc5 | NovaPigeon/Programming_Practice | hw/递归/The_Sierpins_Fractal.cpp | /*
C:The Sierpinski Fractal
查看提交统计提问
总时间限制: 1000ms 内存限制: 65536kB
描述
Consider a regular triangular area, divide it into four equal triangles of half height and remove the one in the middle. Apply the same operation recursively to each of the three remaining triangles. If we repeated this procedure infinite times, we'd o... | ALGO | 0.999504 | 4.051221 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2022-10-02T18:18:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "ad1222da59bb... |
39cabbd8-9110-4ae1-9c52-70b4fc2b38ee | andoporto/Programacion2014 | UNIVERSIDAD/programacion/ejemplos/Utn/ejercicios_resueltos_guia_lab1_2003/MATRIZ8.CPP | #include <stdio.h>
#include <conio.h>
void main(void){
int ped, opc, i, j, mat[10][6];
for(i=0; i<10; i++)
{
clrscr();
printf("\nCodigo de pieza: "); scanf("%d", &mat[i][0]);
printf("\nExistencia al comenzar el mes: "); scanf("%d", &mat[i][1]);
mat[i][2]=0;
mat[i][3]=0;
mat[i][4]=0;
mat[i][5]=mat[i][1];
}
do
{
clrsc... | ALGO | 0.971011 | 3.483384 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2015-02-16T14:48:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a2fe4cefaf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.