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 |
|---|---|---|---|---|---|---|---|
36adf0bb-fa95-4491-a038-0c49b4684e48 | guptanikshay/DSA | 099_hashmaps.cpp | // A Hashmap is another type of data structure in which the time complexity of insertion, deletion and searching is very optimal.
#include <iostream>
#include <map>
#include <unordered_map>
#include <string>
using namespace std;
int main()
{
// Creation
unordered_map<string, int> m;
// Insertion: 3 Ways
... | ALGO | 0.976269 | 4.176155 | {
"github_metadata": {
"branch": "master",
"commit_count": 44,
"repo_created_at": "2023-07-03T20:01: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": "d0fdef781... |
e2fb4bb4-d4f3-4e3d-aedc-bf9837aae9a7 | Fabirto/lab3 | num4.cpp |
#include <algorithm>
#include <iostream>
#include <random>
#include <vector>
using namespace std;
template<class T>
vector<T> generate_random_vector(size_t num, T min = -10, T max = 10)
{
random_device rd;
mt19937 e2(rd());
uniform_real_distribution<> dist(min, max);
auto lambda = [&e2, &dist] () -> ... | ALGO | 0.999235 | 4.068823 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-11-11T19:24: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": "5703f39fe772... |
438d4e75-9d51-4776-b6a6-09958c47174e | WantBeASleep/2sem_labs_compilation | lab3/lab3new/binaryTree.hpp | #pragma once
#include <iostream>
#include <algorithm>
#include <queue>
using namespace std;
template <class T>
class Node
{
public:
T key;
int height;
Node<T>* left;
Node<T>* right;
Node()
{
height = 0;
left = nullptr;
right = nullptr;
}
Node(T data)
{
k... | ALGO | 0.999564 | 4.356172 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2023-04-18T11:33:02.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "13782bb027... |
05ea1f89-687b-4098-9125-cdaeec319d5d | jamesh1999/Misc-Programming | Arduino/Guitar Tuner.ino | #include <SoftwareSerial.h>
#include <avr/interrupt.h>
#define ACCURACY 3
#define STRING1 330
#define STRING2 247
#define STRING3 196
#define STRING4 147
#define STRING5 110
#define STRING6 82
#define MAX_INDEX 15
const int buffer = ACCURACY * 15;
const int clockPin = 2;
const int dataPin = 3;
const byte ampInputPin... | TOOL | 0.959433 | 5.271409 | {
"github_metadata": {
"branch": "master",
"commit_count": 33,
"repo_created_at": "2015-11-29T13:00: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": "de58ea216... |
5235d306-db85-4dc0-b737-aded88027112 | Luke-zhang-04/CCC-Problems | archive/2018/Problem J4: Sunflowers.cpp | #include <algorithm>
#include <iostream>
#include <vector>
#define linesLoop(i) for (unsigned int i = 0; i < lines; i++)
#define linesLoop(x) for (unsigned int x = 0; x < lines; x++)
using std::cin;
using std::cout;
using std::endl;
using std::string;
int lines;
std::vector<std::vector<int>> rotate(int deg, std::vec... | ALGO | 0.999985 | 4.590634 | {
"github_metadata": {
"branch": "master",
"commit_count": 197,
"repo_created_at": "2019-11-25T14:12: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": "532cf8b2... |
1b071285-f9cd-424b-850f-1f071effeb7b | jerrycan2/Alex | bitsets.cpp | #include <iostream>
using namespace std;
#ifdef USE_DEBUG_NEW
#include "debug_new.h"
#endif
#include "bitsets.h"
/*==========================================================================
////////////////////////////////////////////////////////////////////////////
************************* static utilities *******... | TOOL | 0.944665 | 5.835177 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2018-09-03T14:22:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6a32cd6d0b... |
4b45b8f5-0c8e-47ed-9f7c-13d0d5db6401 | mohsin-riad/codeforces-solutions | 1313 A.cpp | /**
* Git >> Mohsin_Riad
░░░▄█████████████████▄
░░▐████▀▒██████████████▄
░▒██▀▒▒▒▒▒█████████▀█████
░▐██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████▌
░▐█▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████▌
░░█▒▄▀▀▀▀▀▄▒▒▄▀▀▀▀▀▄▒▐███▌
░░░▐░░░▄▄░░▌▐░░░▄▄░░▌▐███▌
░▄▀▌░░░▀▀░░▌▐░░░▀▀░░▌▒▀▒█▌
░▌▒▀▄░░░░▄▀▒▒▀▄░░░▄▀▒▒▄▀▒▌
░▀▄▐▒▀▀▀▀▒▒▒▒▒▒▀▀▀▒▒▒▒▒▒█
░░░▀▌▒▄██▄▄▄▄████▄▒▒▒▒█▀
░░░░▄██... | ALGO | 0.99984 | 5.037904 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-02-28T19:27: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": "cdc7d3ffa3... |
45c45a60-c41a-46b0-af3e-23da04bfa4fc | Biomass-Autothermal-Pyrolysis/OpenFOAM-bp | tutorials/multiphase/reactingMultiphaseEulerFoam/laminar/biomassPyrolsis/ranziDevol/constant/chemistryProperties.particles2 | /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
... | CONFIG | 0.922334 | 4.602362 | {
"github_metadata": {
"branch": "master",
"commit_count": 4202,
"repo_created_at": "2022-03-25T20:25:33.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "57cd414c... |
4dde2704-9550-4c6f-ad23-301723660800 | moelatt/ECS36C | hw3/priorityqueue.cpp | #include <iostream>
#include <cassert>
#include <cstdlib>
#include "json.hpp"
#include "priorityqueue.h"
PriorityQueue::PriorityQueue(std::size_t max_size) :
nodes_(max_size + 1, KeyValuePair()),
max_size_(max_size),
size_(0){}
void PriorityQueue::insert(Key k) {
insert(std::make_pair(k, std::make_pa... | ALGO | 0.966144 | 5.159533 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-10-02T05:03: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": "2c278da73d... |
2b5e0237-cef5-4bb1-aaa3-fd348a1f14dc | mayurbhadange/LP2 | primsMST.cpp | #include<bits/stdc++.h>
using namespace std;
vector<pair<pair<int, int>, int>> calcPrimsMst(int n, int m, vector<pair<pair<int, int>, int>>& g){
unordered_map<int, list<pair<int, int>>> adj;
for(int i = 0; i<m; i++){
int u = g[i].first.first;
int v = g[i].first.second;
int w = g[i].se... | ALGO | 0.999994 | 5.124841 | {
"github_metadata": {
"branch": "main",
"commit_count": 3,
"repo_created_at": "2025-05-07T03:57: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": "1b60708ffd64... |
c158b307-844e-4069-a088-1739ebeda52c | glyfina/Augmented-reality | classifier_main.cpp | #include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/opencv.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <fstream>
#include <iostream>
#include <cstdio>
#include <stdio.h>
#include <unistd.h>
#include <cstdlib>
#include <string>
#includ... | ALGO | 0.954567 | 4.043339 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2014-11-10T17:08:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "44b946e9c4... |
6b9d7c29-9fbb-421e-800f-2b3e61fbb247 | 91Eric/Experiment | PictureCut/mat/mat.cpp | // mat.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include <string>
#include <vector>
#include <opencv2/opencv.hpp>
#include <fstream>
#include "cstdio"
#include <fstream>
#include <io.h>
using namespace std;
using namespace cv;
size_t i = 201;
vector<string>... | TOOL | 0.938701 | 4.025681 | {
"github_metadata": {
"branch": "master",
"commit_count": 14,
"repo_created_at": "2017-05-11T11:37:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5d5cbe9b7... |
6398938c-c057-4d75-a055-00e83150bf4d | Const5215/Leetcode | 20180714/745.cpp | struct TrieNode {
vector<int> s;
vector<TrieNode*> nxt;
TrieNode() : nxt(vector<TrieNode*>(26, NULL)) {}
};
class WordFilter {
public:
TrieNode *head, *rhead;
WordFilter(vector<string> words) {
head = new TrieNode(), rhead = new TrieNode();
for (int i = 0; i < words.size(); i++) {
... | ALGO | 0.9999 | 5.742818 | {
"github_metadata": {
"branch": "master",
"commit_count": 91,
"repo_created_at": "2018-04-24T07:59: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": "d0ebd53b4... |
bee01c3f-0ef4-43e5-9e45-db488d88ce83 | VowpalWabbit/vowpal_wabbit | cs/cli/vowpalwabbit.cpp | // Copyright (c) by respective owners including Yahoo!, Microsoft, and
// individual contributors. All rights reserved. Released under a BSD (revised)
// license as described in the file LICENSE.
#include "vw/core/vw_allreduce.h"
#include "vw_clr.h"
#include "vowpalwabbit.h"
#include "vw/core/best_constant.h"
#include... | ALGO | 0.950325 | 6.442879 | {
"github_metadata": {
"branch": "master",
"commit_count": 10421,
"repo_created_at": "2009-07-31T19:36:58.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 8581,
"forks": 1934,
"issues": 138,
"pull_requests": 5
},
"file_meta": {
"content_id": ... |
d1ba083c-2ac0-4e1d-be30-1f7cf3399262 | jubaerhosain/data-structures-and-algorithms | Range Queries/Segment Tree/Solved Problems/NICEDAY_SPOJ.cpp | #include<bits/stdc++.h>
using namespace std;
#define endl '\n'//notforinter
#define all(v) v.begin(), v.end()
#define rep(i, s, n) for(int i = s; i <= n; i++)
#define rrep(i, n, s) for(int i = n; i >= s; i--)
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef vector<vecto... | ALGO | 0.999967 | 4.633267 | {
"github_metadata": {
"branch": "main",
"commit_count": 805,
"repo_created_at": "2021-01-27T16:59: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": "a830125037... |
21890950-8ea3-4b3f-8774-1efb9739f562 | middlebro/Problem_Solve | PS2019_Week3_CardErase/PS2019_Week3_CardErase/main.cpp | //
// main.cpp
// PS2019_Week3_CardErase
//
// Created by 서형중 on 01/04/2019.
// Copyright © 2019 <NAME>. All rights reserved.
//
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <ctime>
using namespace std;
struct card{
int x;
int y;
};
struct Dist{
card a;
car... | ALGO | 0.999788 | 3.15716 | {
"github_metadata": {
"branch": "master",
"commit_count": 57,
"repo_created_at": "2019-04-06T08:35:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "da5362463... |
7f3e29c4-ec8c-4fbe-9838-5c0a8d742d26 | MoonChasing/ACM | GPLT_2018/L2_3_FamilyHouse/main.cpp | #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <set>
#include <map>
#include <queue>
#include <vector>
#include <utility>
#include <algorithm>
#define MAXN 100010
#define INF 0x3f3f3f3f
#define DEBUG
#define DataIn
typedef long long LL;
using namespace std;
struct person
{
in... | ALGO | 0.999341 | 3.43882 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2018-07-29T06:09: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": "a11b2c789a... |
8d9982bc-c8b1-4ecf-9248-0167cab9cee6 | sl1nk4991/stepik_cpp_2 | src/associative_containers.cpp | #include <functional>
#include <iostream>
#include <map>
#include <stdexcept>
#include <typeindex>
#include <utility>
// базовый класс фигуры (полиморфный)
struct Shape {
virtual void square() = 0;
virtual ~Shape() = default;
};
// прямоугольник
struct Rectangle : Shape {
void square() override {}
};
// ... | ALGO | 0.979429 | 7.145781 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2025-04-14T16:00: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": "04e5bf6627c... |
19710c3a-4dad-48c6-8430-1448828b3ea5 | Denver17/Algorithms_Exercise | PAT/甲级/1112_Stucked_Keyboard.cpp | //res要求按字符串出现的顺序排列,好刁钻,恶心
#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<string>
#include<unordered_map>
#include<map>
using namespace std;
int main()
{
int N; cin>>N;
string str; cin>>str;
unordered_map<char, bool> mp;
for(int i = 0; i < str.size(); i++){
i... | ALGO | 0.999998 | 3.198176 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-06-12T14:30: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": "1a427966710b... |
1d9d3a57-5e41-434b-88fe-9df8697c6c43 | Mixlorian/Robotic-Grade | particulares 24-25/P2/p2_lista_jose.cc | #ifndef LIST
#define LIST
#include <cstdint>
#include <string>
#include <iostream>
using namespace std;
///////////////////////////////////////////////////////////////////////////////
// Typedefs/Using + Declaraciones adelantadas //
//////////////////////////////////////////////////////... | ALGO | 0.972885 | 4.897192 | {
"github_metadata": {
"branch": "main",
"commit_count": 56,
"repo_created_at": "2024-09-29T15:59:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "36905713cee... |
896b376b-fe18-4f8d-8109-42e11802d705 | Haeun-Y/gyeo-bang-al | 윤하은/[13] 시뮬레이션/15683.cpp | //240119
//BOJ 15683 감시
//GOLD 4
#include <iostream>
#include <vector>
using namespace std;
typedef struct
{
int row;
int col;
int cctvNum;
}cctv;
typedef struct
{
bool up;
bool right;
bool down;
bool left;
}direction;
vector<cctv> cctvs;
vector<vector<direction>> cctvDir;
vector<vector<int>... | ALGO | 0.999506 | 4.289409 | {
"github_metadata": {
"branch": "main",
"commit_count": 365,
"repo_created_at": "2022-12-31T00:27:37.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "6dbdd9a869... |
5f98a1ef-4a12-46ef-8998-ff79d885c023 | aferikoglou/GNWSIS | data/ApplicationDataset/rosetta-spam-filter/sgd.cpp | /*===============================================================*/
/* */
/* sgd.cpp */
/* */
/* Hardware function for spam filter... | ALGO | 0.999799 | 6.458149 | {
"github_metadata": {
"branch": "main",
"commit_count": 17,
"repo_created_at": "2025-07-02T10:52:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "556605000f9... |
30a15ef5-0f54-4957-8d3e-9673bc8046ed | popook88/TopCoder | SRM635DIV2P500.cpp | /*
Problem Statement
"Němec's quadratic law: how many minutes the teacher was late to the lesson, that many minutes squared he'll end the lesson earlier."
In other words, if the teacher is t minutes late (for some non-negative integer t), he should end the lesson t2 minutes early. Of course, this means the teac... | ALGO | 0.999774 | 4.285613 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2014-11-07T00:56: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": "fee52554f5... |
e5906cda-6470-45b3-bcac-1ef197ec3836 | ishandutta2007/codeforces-k | kristevalex/normal/1600/E.cpp | #include <bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(false); \
cin.tie(nullptr); \
cout.tie(nullptr)
using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
template<typename T>
using pair2 = pai... | ALGO | 0.999992 | 3.401423 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T06:06: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": "28a795ef52b6... |
5893f330-bef9-4b28-9cbb-55cfd0402720 | ravvis/game_of_sticks | game1.cpp | #include<bits/stdc++.h>
using namespace std;
typedef struct node{
int v;
int d;
int i;
} node;
node minimax(int n, int depth, bool ismax, int alpha, int beta){
node g,j,k;
j.v=0;
j.d=0;
j.i=0;
if(n==1){
if(ismax)
{
g.v = -10;
g.d = depth;
g.... | ALGO | 0.999784 | 3.248965 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2020-04-03T11:02: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": "31b121dcc1... |
66b77286-95a3-4b1e-aed8-26da189d7c7d | coldEr66/online-judge | CF/1175E.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double lf;
typedef pair<ll,ll> ii;
typedef pair<ii,ll> iii;
#define REP(i,n) for(int i=0;i<n;i++)
#define REP1(i,n) for(ll i=1;i<=n;i++)
#define RST(i,n) memset(i,n,sizeof i)
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(),a.end()
#define ... | ALGO | 0.999977 | 3.802226 | {
"github_metadata": {
"branch": "master",
"commit_count": 45,
"repo_created_at": "2018-04-07T03:54: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": "e981443d5... |
cd5272f5-b743-4925-b6f2-1da04a00e088 | sajal-jayanto/Algorithm_ACM_problems | UVA.C - CPP/10374 - Election.cpp | #include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
map < string , string > mapstr;
map < string , int > mapcnt;
i... | ALGO | 0.999943 | 3.035842 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2017-08-03T19:21:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "057d0bfd6... |
bfc22a7f-07ba-4287-b3a5-7575c655f38d | lvhualong/Effective-C-Plus-Plus | string_problem/bigNumAdd/bigNumAdd_String.cpp |
/*
*
* 大数加法的 string形式
*/
#include <string>
#include <iostream>
using namespace std;
string bigNumAdd_String(string& stringA, string& stringB)
{
//保证A长度大于等于B
if(stringA.size() < stringB.size()){
string temp = stringA;
stringA = stringB;
stringB = temp;
Alength = stringA.size... | ALGO | 0.99988 | 4.650256 | {
"github_metadata": {
"branch": "master",
"commit_count": 66,
"repo_created_at": "2019-03-03T13:44:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "03fdcfe0b... |
070434f6-0533-4001-9334-20d92ed44a16 | CloudCompare/CloudCompare | plugins/core/Standard/qRANSAC_SD/extern/RANSAC_SD/GfxTL/BBoxBuildInformationTreeStrategy.h | #ifndef GfxTL__BBOXBUILDINFORMATIONTREESTRATEGY_HEADER__
#define GfxTL__BBOXBUILDINFORMATIONTREESTRATEGY_HEADER__
#include <algorithm>
namespace GfxTL
{
template< class InheritedStrategyT >
struct BBoxBuildInformationTreeStrategy
{
typedef typename InheritedStrategyT::value_type value_type;
class CellData
: ... | ALGO | 0.943017 | 6.176642 | {
"github_metadata": {
"branch": "master",
"commit_count": 5089,
"repo_created_at": "2012-11-06T20:15:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 4019,
"forks": 1100,
"issues": 256,
"pull_requests": 4
},
"file_meta": {
"content_id": "... |
00637348-7c5d-42b0-b34f-484df50bf7d5 | Aventur/diploma | Diploma/bsv.cpp | #include "bsv.h"
LinRand::LinRand()
{
a = c = x0 = M = 0;
}
LinRand::LinRand(unsigned __int64 M, unsigned __int64 a,
unsigned __int64 c, unsigned __int64 x0)
{
this->M = M;
this->a = a;
this->c = c;
this->x0 = x0;
}
double LinRand::next()
{
x0 = (a*x0 + c) % M;
return (double(x0)/double(M));
}
double* LinR... | ALGO | 0.991768 | 3.127111 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2016-04-24T23:44:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "26cf93526... |
d263e2af-3ff4-495d-a414-1eeaabdd2d96 | Mrhuangyi/PAT-Solutions | Advanced Level- Practice/1080 Graduate Admission (30)(30 分).cpp | #include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int maxn = 40010;
struct Student{
int GE, GI, sum;
int r, stuID;
int cho[6];
}stu[maxn];
struct School {
int quota;
int stuNum;
int id[maxn];
int lastAdmit;
}sch[111];
bool cmpStu(Student a, ... | ALGO | 0.999988 | 3.098349 | {
"github_metadata": {
"branch": "master",
"commit_count": 289,
"repo_created_at": "2018-03-23T13:09:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1186788c... |
f22783b8-b273-4567-a5c8-022f0405329f | fmahebert/tfdh | src/TfdhOdeSolve.cpp |
#include "TfdhOdeSolve.h"
#include "Element.h"
#include "PhysicalConstants.h"
#include "PlasmaFunctions.h"
#include "PlasmaState.h"
#include "TfdhSolution.h"
#include <cassert>
#include <cmath>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_odeiv2.h>
#include <vector>
namespace {
struct IntegrationResults {
c... | ALGO | 0.999644 | 6.189788 | {
"github_metadata": {
"branch": "master",
"commit_count": 142,
"repo_created_at": "2014-06-13T19:40: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": "4fd9f02a... |
50131323-804c-4532-a4f7-6de24c5d2961 | mlpack/mlpack | src/mlpack/methods/kde/kde.hpp | /**
* @file methods/kde/kde.hpp
* @author <NAME>
*
* Kernel Density Estimation.
*
* mlpack is free software; you may redistribute it and/or modify it under the
* terms of the 3-clause BSD license. You should have received a copy of the
* 3-clause BSD license along with mlpack. If not, see
* http://www.openso... | ALGO | 0.942392 | 6.861189 | {
"github_metadata": {
"branch": "master",
"commit_count": 30653,
"repo_created_at": "2014-12-17T18:16:59.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 5396,
"forks": 1663,
"issues": 16,
"pull_requests": 9
},
"file_meta": {
"content_id": "... |
64edb387-1431-4a56-bf39-74f754e79ca1 | DionysiosB/CodeForces | 1200-1299/1223C-SaveTheNature.cpp | #include <cstdio>
#include <vector>
#include <algorithm>
typedef long long ll;
ll gcd (ll a, ll b){return (b == 0) ? a : gcd (b, a % b);}
bool check(const std::vector<ll> v, ll num, ll x, ll a, ll y, ll b, ll lcm, ll k){
ll both = num / lcm;
ll fc = (num / a) - both;
ll sc = (num / b) - both;
ll tot... | ALGO | 0.999915 | 3.239062 | {
"github_metadata": {
"branch": "master",
"commit_count": 4487,
"repo_created_at": "2013-06-27T18:15:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 690,
"forks": 163,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "538... |
308be2ff-36a2-41f3-8d22-05a3dee0a907 | ShravanJagadam/DSA | LinkedList/SwapNodesInPairs.cpp | /*
Swap List Nodes in pairs
Programming
Linked Lists
easy
55.0% Success
316
11
Bookmark
Asked In:
Problem Description
Given a linked list A, swap every two adjacent nodes and return its head.
NOTE: Your algorithm should use only constant space. You may not modify the values in the list; only nodes themselves c... | ALGO | 0.999998 | 6.002883 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-08-16T14:00: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": "af468e68c0b4... |
7dd94169-cb2c-4565-b75d-d8bf38db8372 | DionysiosB/CodeForces | 0900-0999/916B-JamieAndBinarySequence.cpp | #include <cstdio>
#include <vector>
#include <map>
#include <set>
typedef long long ll;
int main(){
ll n, k; scanf("%lld %lld", &n, &k);
std::set<int> s; ll x(n), cnt(0);
while(x > 0){if(x % 2){s.insert(cnt);}; x /= 2; ++cnt;}
if(s.size() > k){puts("No");}
else{
std::map<long, long> m;
... | ALGO | 0.999994 | 3.747075 | {
"github_metadata": {
"branch": "master",
"commit_count": 4487,
"repo_created_at": "2013-06-27T18:15:07.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 690,
"forks": 163,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bf8... |
3311988a-9845-45cd-9412-c6bd21859386 | ishandutta2007/codeforces-n | neal/normal/898/E.cpp | #include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { os << '{'; string sep; for (const auto &x : v) os << sep << x, sep = ", "; return os << '}'... | ALGO | 0.999818 | 5.243937 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-10-30T15:35: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": "8847eb5c3fae... |
4855b241-d93a-4101-b57e-e0c7b82f889d | rbwo1o/Cryptography | Advanced Encryption Standard (AES)/main.cpp | /*
* Author: <NAME>
*
* Date: 2/17/2023
*
* Synopsis: This program is the implementation of the Rijndael AES algorithm as described in https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.197.pdf
* This application performs block level encryption and decryption using each... | ALGO | 0.996517 | 6.38426 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2024-02-03T15:42:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7f7c62fdb18... |
a29b84d3-38cb-411a-a160-05c2b997eb50 | MadhukeshSingh/GfGProblems | Medium/Stock buy and sell II/stock-buy-and-sell-ii.cpp | //{ Driver Code Starts
#include<bits/stdc++.h>
using namespace std;
class Array
{
public:
template <class T>
static void input(vector<T> &A,int n)
{
for (int i = 0; i < n; i++)
{
scanf("%d ",&A[i]);
}
}
template <class T>
static void print(vector<T> &A)
... | ALGO | 0.999764 | 5.616421 | {
"github_metadata": {
"branch": "main",
"commit_count": 91,
"repo_created_at": "2023-06-19T12:21: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": "8851366c8a6... |
1dbd1b23-002b-488d-9a4e-5a1daed9d069 | BrLopes3/Questions_cpp | desafios_Snake/desafios_Snake/desafios_Snake.cpp | #include <iostream>;
#include <vector>;
using namespace std;
//challenge Snake
int main() {
int n, m; //n=numero de linhas, m=numero de colunas
cin >> n >> m;
//input com valores da matriz
vector <vector<int>> matrix(n, vector<int>(m));
for (int i = 0; i < n; i++) {
for (int j = 0; j < m... | ALGO | 0.999978 | 3.94704 | {
"github_metadata": {
"branch": "main",
"commit_count": 29,
"repo_created_at": "2023-05-12T13:52: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": "00020bc5ac7... |
66872cf7-3b79-42a4-afe4-3bf43291f1f5 | ixray-team/ixray-1.6-stcop | src/3rd party/MagicSoftware/FreeMagic/Source/Approximation3D/MgcAppr3DSphereFit.cpp | // Magic Software, Inc.
// http://www.magic-software.com
// Copyright (c) 2000-2002. All Rights Reserved
//
// Source code from Magic Software is supplied under the terms of a license
// agreement and may not be copied or disclosed except in accordance with the
// terms of that agreement. The various license agreemen... | ALGO | 0.99982 | 5.458319 | {
"github_metadata": {
"branch": "default",
"commit_count": 2678,
"repo_created_at": "2019-06-29T15:22:47.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 232,
"forks": 47,
"issues": 43,
"pull_requests": 2
},
"file_meta": {
"content_id": "0ab... |
de07f60b-ea12-43c3-82cd-8b2c2f84e5ac | yhzhm/Practice | Course/PC-lyd/0x00/AcWing 116 飞行员兄弟3 rec.cpp | // Created by <NAME> on 2019.02
#include <bits/stdc++.h>
using namespace std;
int res[5][5];
int main() {
char c;
for (int i = 1; i <= 4; ++i) {
for (int j = 1; j <= 4; ++j) {
cin >> c;
if (c == '+') {
for (int k = 1; k <= 4; ++k)
res[i][k] ^= 1, res[k][j] ^= 1;
res[i][j] ^= 1;//i,j被多摁了一次,所以这里再摁回... | ALGO | 0.998962 | 3.395547 | {
"github_metadata": {
"branch": "master",
"commit_count": 137,
"repo_created_at": "2018-02-13T02:25: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": "616ff384... |
6e38f6c0-2335-48ea-a16c-920fb1619373 | Bhavesh9480/Practice | DSA/sorting.cpp | /*#include<bits/stdc++.h>
using namespace std;
int main()
{
int i=0,j=0, arr[5] = {4, 20, 1, 7, 19};
for (int i = 0; i < 4;i++)
{
for (int j = 0; j < 4 - i;j++)
{
if(arr[j]>arr[j+1])
{
swap(arr[j], arr[j + 1]);
}
}
}
cout << "... | ALGO | 0.999938 | 4.892441 | {
"github_metadata": {
"branch": "new",
"commit_count": 46,
"repo_created_at": "2024-11-30T09:38: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": "cd64be6afdd1... |
4e56ea24-06da-4294-9120-bbda06377422 | yjl9903/XCPC | AtCoder/arc110/e.cpp | #include <iostream>
#include <cstdio>
#include <cassert>
#include <cstring>
#include <cmath>
#include <functional>
#include <algorithm>
#include <utility>
#include <vector>
#ifdef XLor
#define dbg(args...) cout << "\033[32;1m" << #args << " -> ", err(args)
void err() { std::cout << "\033[39;0m" << std::endl; }
te... | ALGO | 0.999992 | 3.519022 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2022-03-25T19:33:48.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "83299e3c8dc2... |
001e6f9f-90f9-4fbe-98c1-bd5cf8a54811 | dolphingarlic/CompetitiveProgramming | APIO/APIO 16-fireworks.cpp | #include <bits/stdc++.h>
#pragma GCC optimize("O3")
#define FOR(i, x, y) for (int i = x; i < y; i++)
typedef long long ll;
using namespace std;
struct Node {
ll a, b, c;
priority_queue<ll> *pq;
};
Node dp[300001];
vector<int> graph[300001];
void dfs(int node = 1) {
if (graph[node].size()) {
int m... | ALGO | 0.999895 | 3.692551 | {
"github_metadata": {
"branch": "master",
"commit_count": 439,
"repo_created_at": "2019-08-15T19:00:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 50,
"forks": 5,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bc6ce34... |
25e078f5-5cc3-4649-bfca-070764724a61 | badri7489/Code_snippets | Graph/29_bellman_ford_negative_cycle_detection.cpp | #include<iostream>
#include<vector>
using namespace std;
// <NAME>
// Time Complexity: O(V * E)
// Worst Case Time complexity is for complete graph: O(V ^ 3).
// Bellman ford is useful for finding shortest path for a directed graph with negative edges.
// We can't find the shortest path when we find there is a negativ... | ALGO | 0.999771 | 5.477405 | {
"github_metadata": {
"branch": "main",
"commit_count": 359,
"repo_created_at": "2021-07-30T12:07:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5735556af2... |
9f8e5ec8-a5cc-434e-85ea-ff2054441f98 | FujikawaYouta/testRepo | Algorithm/homework/作业_项目/homework_project/homework_3-1_Merge/MergeSort.cpp | #include<iostream>
#include<algorithm>
using namespace std;
#define MAX_SIZE 100
int b[MAX_SIZE];
template <class Type>
void display(Type a[]) {
for (int i = 0; i < 8; i++)
cout << a[i] << ' ';
cout << endl;
}
template <class Type>
void Merge(Type a[], Type b[], int left, int mid, int right) {
int... | ALGO | 0.999937 | 3.993015 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2023-04-06T03:19: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": "3ea92ae5a9b8... |
45f07d73-90c4-4f94-b702-ffefb37681f2 | syh12sys/Deepwork | Algorithm/sort/Sort.cpp | #include "stdafx.h"
#include "Sort.h"
void InsertSort(std::vector<int>& pendingSortData)
{
if (pendingSortData.size() <= 1)
{
return;
}
for (size_t i = 1; i < pendingSortData.size(); ++i)
{
for (size_t j = 0; j < i; ++j)
{
if (pendingSortData[i] <= pendingSortDa... | ALGO | 0.999871 | 5.483033 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2019-08-23T06:37: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": "e7ee19250... |
208b067d-f0ef-4b42-a40d-ab23a4e8cb45 | Dup4/competitive-programming | poj/2689/a.cpp | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
using namespace std;
#define ll long long
#define pLL pair<ll, ll>
#define fi first
#define se second
const int N = 1e6 + 10, INF = 0x3f3f3f3f;
ll L, R;
int scheck[N], check[N];
ll pri[N];
int cp;
void sieve() {
memset(scheck, 0, sizeof sche... | ALGO | 0.999889 | 3.960889 | {
"github_metadata": {
"branch": "main",
"commit_count": 838,
"repo_created_at": "2019-04-07T01:16:26.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c74a97524... |
07e0c5dc-fdbb-4532-8d7b-08adcf6b4a92 | Shikhar21121999/ds-algo-busted | connected-compnents-dsu.cpp | // program to find connected components in a graph using dsu
#include <bits/stdc++.h>
using namespace std;
#define pii pair<int,int>
#define vpii vector<pii>
vector<int> parent;
vector<int> size;
int find_set(int v){
// to find the set in which element v is part of
if(v==parent[v])return v;
return parent[v]=find... | ALGO | 0.999721 | 5.34063 | {
"github_metadata": {
"branch": "main",
"commit_count": 78,
"repo_created_at": "2020-11-15T04:00: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": "900ac86a2d3... |
1f8210f1-067f-463c-927f-571cccf17c62 | BenTsai7/SCM-DRAM-FPTree | Programming-FPTree/src/fptree.cpp | /**
fptree.cpp
Descrption: implementation of FPTREE
OKAY: INSERT
BULKLOADING
UPDATE
DELETE
REDISTRIBUTE
ALL DONE
**/
#include"fptree/fptree.h"
#include<assert.h>
using namespace std;
// Initial the new InnerNode
InnerNode::InnerNode(const int& d, FPTree* const& t, bool ... | ALGO | 0.998584 | 4.573917 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-07-14T10:55:36.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 24,
"forks": 9,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "a8688e7b4... |
d516c0a1-513e-4194-965e-17ee81012bed | DiossFer/DAM | 1DAM/Prog-Primero/Temas/ejercicios-ud2-Dios-Fer/satelite_media.cpp | #include <iostream>
using namespace std;
int main (){
int dato = 0, contador = 0;
double media = 0.0, dato_total = 0.0;
//Pedimos el primer dato
cout << "Introduzca los datos, el programa finalizara al introducir un numero menor a 0" << endl;
cin >> dato;
cout << "Recibido: " << dato << endl;
//S... | ALGO | 0.98978 | 3.476002 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-09-22T09:57:53.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "e0fcc18cd44a... |
1a16e8c5-29b3-40af-a408-f1b16622b91e | SiyangShao/codes | ICPC/UCUP2023/Stage8/J.cc | #include <bits/stdc++.h>
#define dbg(...) (__VA_ARGS__)
using namespace std;
using ll = long long;
#define int ll
int getInt() {
int tmp;
cin >> tmp;
return tmp;
}
vector<int> st;
void dfs(int u, const vector<vector<int>> &E, vector<int> &cur) {
for (int i = cur[u]; i < (int)E[u].size(); i = cur[u]) {
cur[u... | ALGO | 0.999938 | 3.89452 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-04-08T14:41: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": "1419da24c52f... |
ed1c77d5-7b4d-43b1-81cd-1baec58ee8fc | mshmyw/algorithm | DP/string-similar-percent.cpp | #include<stdio.h>
#include<stdlib.h>
#include<string.h>
int min(int a, int b, int c) {
if(a < b) {
if(a < c)
return a;
else
return c;
} else {
if(b < c)
return b;
else
return c;
}
}
int compute_distance(char *strA, int len_a, ch... | ALGO | 0.999923 | 3.600831 | {
"github_metadata": {
"branch": "master",
"commit_count": 232,
"repo_created_at": "2015-03-16T05:44:25.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "1851d6af... |
010355ca-1b61-476c-86b0-a42bf5f54fbc | Huygo111/DSA | week4/MaxHeapTree.cpp | #include <iostream>
using namespace std;
void heapify(int arr[], int n, int index)
{
// Find parent
int indexOfParent = (index - 1) / 2;
if (arr[indexOfParent] > 0) {
// If current node is greater than its parent
// Swap both of them
if (arr[index] > arr[indexOfParent]) {
... | ALGO | 0.999931 | 4.724721 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2023-09-06T08: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": "3330b8965aef... |
839516f2-9f27-4d6a-8616-5cd97802aa8e | voikko/corevoikko | libvoikko/src/spellchecker/SpellWithPriority.cpp | /* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" ... | ALGO | 0.924767 | 4.647326 | {
"github_metadata": {
"branch": "master",
"commit_count": 6133,
"repo_created_at": "2012-06-28T17:42:07.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 98,
"forks": 25,
"issues": 5,
"pull_requests": 0
},
"file_meta": {
"content_id": "4d23bf... |
a47ad03c-e674-421e-bedf-dbd92d7f1d2c | xdtianyu/android-7.0.0_r1 | external/pdfium/core/include/fxcrt/fx_ext.h | // Copyright 2014 PDFium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#ifndef CORE_INCLUDE_FXCRT_FX_EXT_H_
#define CORE_INCLUDE_FXCRT_FX_EXT_H_
#in... | TOOL | 0.909298 | 3.362776 | {
"github_metadata": {
"branch": "master",
"commit_count": 12,
"repo_created_at": "2016-08-24T08:55:14.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 43,
"forks": 47,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "90a6f4f... |
fdf4bb8a-0c0f-4cec-8a3f-ec6d574b18d4 | JoshH28/CP_cpp | candles.cpp | // Союз нерушимый республик свободных
// Сплотила навеки <NAME>.
// Да здравствует созданный волей народов
// Единый, могучий <NAME>юз!
// Славься, Отечество наше свободное,
// Дружбы народов надёжный оплот!
// Знамя советское, знамя народное
// Пусть от победы к победе ведёт!
// Сквозь грозы сияло нам солнце свободы,
... | ALGO | 0.999993 | 4.18646 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2022-12-23T12:56: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": "99f312722690... |
a0b04a87-879e-43d3-9ce3-07ecc59d0743 | KarimE146/CS335-proj-2 | HalfHeapSort.hpp | #ifndef HalfHeapSort_HPP
#define HalfHeapSort_HPP
#include <iostream>
#include <vector>
#include <algorithm>
#include <chrono>
inline int leftChild(int i) {//access to left child
return 2 * i;
}
void percDown(std::vector<int>& heap, std::vector<int>::size_type hole){
int size = heap.size();
int child;
... | ALGO | 0.999531 | 5.355043 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2023-11-30T18:27:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "7c221341475... |
4a393447-8269-450f-bebf-d9222ec11caf | Utkarsh-Dyundi/Competitive-Programming | A_And_Then_There_Were_K.cpp | #include<bits/stdc++.h>
using namespace std;
#define tr(c,it) for(typeof(c.begin()) it=c.begin();it!=c.end();++it)
#define all(c) c.begin(),c.end()
#define mod 1000000007
#define itor(c) typeof(c.begin())
#define ll long long
#define vi vector<int>
#define si set<int>
#define msi multiset<int>
#define ii pair<int,int>
... | ALGO | 0.999807 | 4.382549 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2021-03-04T16:02: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": "fc4c32add84... |
487691a2-cdeb-435c-a281-11d0a576e3c5 | mukel/contests | topcoder/SRM 255/WordCompositionGame.cpp | // <NAME> (mukel)
#include <bits/stdc++.h>
using namespace std;
#define ALL(c) (c).begin(), (c).end()
class WordCompositionGame {
public:
int calc(vector<string> a, vector<string> b, vector<string> c) {
int score = 0;
for (string s : a) {
score += 3 - binary_search(ALL(b), s) - binary_search(ALL(c), ... | ALGO | 0.999774 | 5.261127 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-05-02T09:13:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d59f9b838d... |
fba8fd76-9486-45f6-b458-b256e7a2cb35 | VirusARzk-Git/Codes | Striver/Trie/04-CS_words.cpp | // https://www.codingninjas.com/studio/problems/implement-trie_1387095
#include <bits/stdc++.h>
class TrieNode
{
public:
TrieNode *children[26];
bool isEnd;
int preCount;
int endCount;
TrieNode()
{
isEnd = false;
for (int i = 0; i < 26; i++)
children[i] = NULL;
... | ALGO | 0.999459 | 5.015543 | {
"github_metadata": {
"branch": "master",
"commit_count": 48,
"repo_created_at": "2024-08-05T16:24: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": "5a29c79e6... |
8eeeab68-16ef-43cd-96ac-e0cf183c07d8 | ChSatyaSavith/LeetCode | 144. Binary Tree Preorder Traversal.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.999996 | 6.35562 | {
"github_metadata": {
"branch": "main",
"commit_count": 97,
"repo_created_at": "2023-06-02T09:04:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 5,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "61600915020... |
ccdcf22e-d9c6-41f6-aafd-06acff7ecb9e | Froked/LeetCode_30_days_challenge_2020 | week_3/day_20.cpp | /**
Return the root node of a binary search tree that matches the given preorder traversal.
(Recall that a binary search tree is a binary tree where for every node, any descendant of node.left has a value < node.val, and any descendant of node.right has a value > node.val. Also recall that a preorder traversal displ... | ALGO | 0.999974 | 5.986428 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2020-12-13T05:30:44.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "18998e85d1... |
491a0737-9112-4cd7-a6c8-85e759100495 | Fran4002/Competitive-Programming | CSES/Searching_and_Sorting/Nearest_Smaller_Values.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
#define all(x) x.begin(),x.end()
typedef long long int ll;
typedef vector<long long int> vi;
typedef vector<pair<long long int, long long int>> pii;
struct nsv {
vi values, parent;
nsv (ll n) {
parent.resize(n);
values.resiz... | ALGO | 0.999985 | 3.596418 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2023-03-10T05:12: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": "c38131e7e83e... |
bb5117b0-c950-4bfc-b2c3-bf3284a704b3 | hushnymous/android_frameworks_base | tools/aidl/search_path.cpp | #include <unistd.h>
#include "search_path.h"
#include "options.h"
#include <string.h>
#ifdef HAVE_MS_C_RUNTIME
#include <io.h>
#endif
static vector<string> g_importPaths;
void
set_import_paths(const vector<string>& importPaths)
{
g_importPaths = importPaths;
}
char*
find_import_file(const char* given)
{
str... | TOOL | 0.934486 | 5.481652 | {
"github_metadata": {
"branch": "master",
"commit_count": 106421,
"repo_created_at": "2015-03-19T20:02:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 163,
"forks": 56,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5d... |
008cb39d-67d8-4179-bbbf-3a02ac989524 | mir183/CodeForces | 293Rudolf and the Ball Game/m.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define endl '\n'
#define fasterio ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define yes cout << "YES" << endl
#define no cout << "NO" << endl
void solve() {
// Your code here
ll n,m,x;
cin... | ALGO | 0.999947 | 4.190602 | {
"github_metadata": {
"branch": "main",
"commit_count": 716,
"repo_created_at": "2023-09-14T16:49: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": "26d482b08a... |
ed23f391-8257-407d-a9c4-726ca65a222c | RoshanShaikh/DSA-sheet-Love-Bubber | 2. Matrix/p37.cpp | // { Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution
{
public:
// Function to return a list of integers denoting spiral traversal of matrix.
vector<int> spirallyTraverse(vector<vector<int>> matrix, int r, int c)
{
// code here
char dir =... | ALGO | 0.999876 | 5.933393 | {
"github_metadata": {
"branch": "main",
"commit_count": 20,
"repo_created_at": "2022-05-19T11:15:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "33c3352ab34... |
87db5021-ba55-4522-ae0b-59f9c9e8e1af | rifat189/VarsityCodes | CSE 1204/LAB 1 10-07-23/gym problem solution.cpp | #include <iostream>
#include <conio.h>
using namespace std;
struct Member
{
int id;
float height;
float weight;
bool exist;
};
int total = 0;
struct Member mx[10000];
int menu()
{
int op;
cout << "******Main Menu*****" << endl;
cout << "1. Add Member" << endl;
cout << "2. Update Member" ... | TOOL | 0.949927 | 3.477812 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2023-10-08T13:10: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": "6b43bc67aca... |
8b3331c5-364e-45ea-bf94-bf556e944ce3 | blueydragoon/ScorebasedLRU | LRU-SW/ll.h | #include <bits/stdc++.h>
using namespace std;
struct ListNode
{
int val; // will contain the page number
int score; // score/freq of a page within the window
ListNode *next; // next node in the linked list
ListNode *prev; // prev node in the linked list
ListNode() : val(0), score(0), ne... | ALGO | 0.999807 | 4.150193 | {
"github_metadata": {
"branch": "main",
"commit_count": 31,
"repo_created_at": "2021-06-05T14:47: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": "534d0ef0488... |
41e88c05-0c7c-4f9d-b774-674f37061474 | vitaliinnest/algorithms | LeetCode/36_Valid_Sudoku.cpp | #include <bits/stdc++.h>
using namespace std;
#define gc getchar_unlocked
#define fo(i, n) for (i = 0; i < n; i++)
#define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1)
#define ll long long
#define deb(x) cout << #x << "=" << x << endl
#define pb push_back
#define mp make_pair
#define F first
... | ALGO | 0.999344 | 6.291395 | {
"github_metadata": {
"branch": "main",
"commit_count": 43,
"repo_created_at": "2022-08-25T12:38: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": "7e3cfff178c... |
ff0ecbe3-1d3f-4455-bf44-a2004c032769 | DurumariPaper/LeetCodeChallenge | 21-merge-two-sorted-lists/21-merge-two-sorted-lists.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* mergeTwoLis... | ALGO | 0.999899 | 5.911771 | {
"github_metadata": {
"branch": "main",
"commit_count": 673,
"repo_created_at": "2021-12-31T12:21:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "42e2bc0526... |
02abd300-5a92-4508-b0f8-e24b99074924 | emanueljuliano/Competitive_Programming | topics/hash/double.cpp | #include <bits/stdc++.h>
using namespace std;
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define endl '\n'
#define f first
#define s second
#define pb push_back
typedef long long ll;
typedef pair<int, int> ii;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3fll;
const ll MOD = (1ll<<61)-1;
ll... | ALGO | 0.999958 | 3.623603 | {
"github_metadata": {
"branch": "master",
"commit_count": 10,
"repo_created_at": "2020-09-27T20:40:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "359ca6631... |
fc8047f0-8248-43f3-8726-c99db0b26f86 | javierarmas/Competitive-Programming | Codeforces/A Puzzle Pieces.cpp | #include <bits/stdc++.h>
#define f first
#define s second
#define fore(i,a,b) for(int i = (a), ThxMK = (b); i < ThxMK; ++i)
#define pb push_back
#define all(s) begin(s), end(s)
#define _ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define sz(s) int(s.size())
#define l '\n'
#define c cout
using namespace s... | ALGO | 0.999878 | 3.908675 | {
"github_metadata": {
"branch": "main",
"commit_count": 106,
"repo_created_at": "2022-11-08T22:07:55.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "9ec6d73225... |
086e9ce0-2476-46ee-aa2b-b0f8a8d70719 | ishandutta2007/codeforces-s | ssamt/normal/1621/B.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
int cl, ql;
int i, j, k, l;
int t, n, m, q;
int in;
scanf("%d", &t);
for(cl=0; cl<t; cl++) {
scanf("%d", &n);
int l[n], r[n], c[n];
int minl = INT_MAX, minl_idx;
int maxr = INT_MIN, maxr_idx;
int max_one = INT_MIN, max_one_idx;
for(i=0; i<n;... | ALGO | 0.999318 | 3.306834 | {
"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": "ee2387378d85... |
af033718-1ce2-4dfe-8ddc-39d94a4ea569 | ishandutta2007/codeforces-a | al13n/normal/115/E.cpp | #include <vector>
#include <cstring>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <c... | ALGO | 0.99988 | 3.501802 | {
"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": "b891ad2ee68b... |
248c43e4-9691-4a01-b03f-aff42614c44e | arduinocc04/Algorithm | Codeforces/Round #687 Div. 2/C.cpp | #include <cstdio>
int T, n, p, k, x, y, last, dp[100010];
char a[100010];
int min(int a, int b) {
if(a < b) return a;
return b;
}
int main() {
scanf("%d", &T);
while(T--) {
scanf("%d %d %d", &n, &p, &k);
p--;
scanf("%s", a);
scanf("%d %d", &x, &y);
for(int i = p; ... | ALGO | 0.999341 | 3.582357 | {
"github_metadata": {
"branch": "master",
"commit_count": 62,
"repo_created_at": "2020-12-07T06:55: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": "fc00ba9bd... |
8aee9faa-5e84-42a5-8f86-74c44892c462 | anshuman014/Competitive-Programming | codeforces/1133/D.cpp | #include <bits/stdc++.h>
using namespace std;
void setIO(string name = "") {
ios_base::sync_with_stdio(0); cin.tie(0);
// if ((int)name.size()) {
// freopen((name + ".in").c_str(), "r", stdin);
// freopen((name + ".out").c_str(), "w", stdout);
// }
}
typedef long long ll;
#define int long long
#define pb push... | ALGO | 0.999921 | 4.20646 | {
"github_metadata": {
"branch": "master",
"commit_count": 247,
"repo_created_at": "2020-12-21T08:30: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": "30a41446... |
fe742414-1982-4318-8b7c-29394872cd41 | rubychen0611/LeetCode | Problemset/remove-duplicates-from-sorted-list-ii/remove-duplicates-from-sorted-list-ii.cpp |
// @Title: 删除排序链表中的重复元素 II (Remove Duplicates from Sorted List II)
// @Author: rubychen0611
// @Date: 2021-02-16 21:26:35
// @Runtime: 4 ms
// @Memory: 10.7 MB
/**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* List... | ALGO | 0.999987 | 5.239434 | {
"github_metadata": {
"branch": "main",
"commit_count": 8,
"repo_created_at": "2020-10-24T02:27:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4b389e4ba69f... |
2f6021ca-9d47-4fb9-b515-290069e18f5a | TusharChugh/ctci-modern_cplusplus | include/trees_graphs/successor.h | /**
* @brief Successor Write an algorithm to find the "next" node (i.e., in-order successor) of a given
* node in a binary search tree. You may assume that each node has a link to its parent.
*
* @file successor.h
* @author <NAME>
*/
// Note1: Already implemented in the bst iterator implementation
#pragma once
... | ALGO | 0.99969 | 3.998883 | {
"github_metadata": {
"branch": "master",
"commit_count": 184,
"repo_created_at": "2018-03-25T03:15:06.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0328280a... |
c8164554-8bc3-4eda-8b8f-36a05b6b5dfc | JimR21/Project_2015 | Test/HashTest2/HashTable.cpp | #include "Bucket.hpp"
#include "HashTable.hpp"
#include <iostream>
using namespace std;
HashTable::HashTable()
{
globalDepth = 1; // HASHTABLE_SIZE 2 and 2^1 = 2
size = HASHTABLE_SIZE;
// Initiate bucketArray
// #CHANGE:10 Change to DArray
for(unsigned i = 0; i < HASHTABLE_SIZE; i++)
{
... | ALGO | 0.936047 | 3.670831 | {
"github_metadata": {
"branch": "master",
"commit_count": 153,
"repo_created_at": "2015-11-02T13:46: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": "306fbe5d... |
ed29db92-3b42-4bf9-b183-181803f72550 | ros-planning/navigation | global_planner/include/global_planner/expander.h | /*********************************************************************
*
* Software License Agreement (BSD License)
*
* Copyright (c) 2008, 2013, <NAME>, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the followi... | ALGO | 0.980458 | 7.244783 | {
"github_metadata": {
"branch": "noetic-devel",
"commit_count": 1937,
"repo_created_at": "2012-11-12T19:40:09.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2510,
"forks": 1825,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id... |
a54a9923-595e-4d79-ae1b-b519c0f0c06d | GQH123/Renatus-ACM-Codes | FudanXCPC-Summer-A/G.cpp | #include <bits/stdc++.h>
#define rep(i, l, r) for (register int i = l; i <= r; i++)
#define per(i, r, l) for (register int i = r; i >= l; i--)
#define srep(i, l, r) for (register int i = l; i < r; i++)
#define sper(i, r, l) for (register int i = r; i > l; i--)
#define erep(i, x) for (register int i = h[x]; i; i = e[i].... | ALGO | 0.99986 | 3.735334 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2022-08-17T06:57: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": "360a8e5081... |
d23510bc-7f92-4e5d-814f-88a1d2f196c4 | PatrykFlama/UWr | Sem6/AP/List9/2.cpp | #include <bits/stdc++.h>
using namespace std;
#define cerr if (1) cout
#define fst first
#define snd second
typedef long long ll;
typedef pair<int, int> pii;
constexpr int N = 2e5 + 5;
namespace BinaryLifting {
struct Node {
int depth = -1;
vector<int> jump; // 2^i th ancestor
};
class Tree {
private:
... | ALGO | 0.999962 | 4.983142 | {
"github_metadata": {
"branch": "main",
"commit_count": 1366,
"repo_created_at": "2023-03-05T15:36:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f7d6a1154... |
fe2f145a-e025-42e7-8add-5d7bc50fb261 | artoolkit/ARToolKit5 | lib/SRC/KPM/FreakMatcher/Eigen/src/Geometry/EulerAngles.h | // This file is part of Eigen, a lightweight C++ template library
// for linear algebra.
//
// Copyright (C) 2008 <NAME> <<EMAIL>>
//
// Eigen is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
//... | ALGO | 0.988468 | 6.771366 | {
"github_metadata": {
"branch": "master",
"commit_count": 466,
"repo_created_at": "2020-01-15T02:41:01.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 298,
"forks": 122,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "2a6c2... |
0b308112-51a4-4e37-8ae6-ca20490cd74b | rohithv1997/C- | Class12/prac14.cpp | #include<iostream.h>
#include<string.h>
#include<stdio.h>
/*Program#14:
To implement array implemented stack */
class book{ int code;
char name[20];
float price;
public:
book();
void indata();
void outdata();
}list[10];
int top=-1;
book::book()
{ code=0;
strcpy(name,"No Name");
price=... | ALGO | 0.989507 | 3.443776 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2019-01-15T12:15: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": "42462628dc... |
a03252db-307a-41a2-af21-87cd703a2697 | Yawn-Sean/Daily_CF_Problems | daily_problems/2025/03/0317/personal_submission/cf1977c_hum.cpp | #include <bits/stdc++.h>
using namespace std;
void solve() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
int m = ranges::max(a);
bool f{false};
for (int i = 0; i < n; i++) {
if (m % a[i] != 0) {
f = true;
break;
}
}
if (f) {
cout << n ... | ALGO | 0.999693 | 4.945187 | {
"github_metadata": {
"branch": "main",
"commit_count": 20410,
"repo_created_at": "2024-02-26T01:04:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 478,
"forks": 302,
"issues": 0,
"pull_requests": 7
},
"file_meta": {
"content_id": "a823... |
397f3063-fa58-4df5-b972-948e7e4ac661 | LuciaHarcekova/Algorithms | C++/Queue/SlidingWindowMaximum.cpp | /*
239. Sliding Window Maximum
Link: https://leetcode.com/problems/sliding-window-maximum/
You are given an array of integers nums, there is a sliding window of size k
which is moving from the very left of the array to the very right. You can
only see the k numbers in the window. Each time the sliding window moves rig... | ALGO | 0.999987 | 7.147302 | {
"github_metadata": {
"branch": "main",
"commit_count": 187,
"repo_created_at": "2022-12-04T12:14:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 7,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6640fe83bd... |
53b16e60-b370-4e53-8cb1-f305b07bf986 | JeongHPark/2022-Algorithm-Study | Baekjoon/SeGun/7주차 - 이분 탐색/가장 긴 증가하는 부분 수열 2.cpp | //시간초과를 해결하지 못했고, 이분탐색을 어디서 사용해야 하는지 찾지 못해서 블로그를 보고 해결함
//https://seungkwan.tistory.com/8
//길이별로 마지막에 올 수 있는 최솟값을 기억해서 계속 초기화해주는 것이 핵심
//len[3]=5 -> 길이가 3 인 부분수열의 마지막값의 최솟값은 5
#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<queue>
#define endl "\n"
using namespace std;
int N;
vector<... | ALGO | 0.999961 | 4.38823 | {
"github_metadata": {
"branch": "main",
"commit_count": 582,
"repo_created_at": "2022-09-30T15:04:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 3,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "443b1662e8... |
1dca9da1-b582-48fb-99b2-e7e2855bd294 | PJLab-ADG/SensorsCalibration | online_calib/vins_camera2imu/src/camodocal/gpl/EigenQuaternionParameterization.cc | #include "camodocal/gpl/EigenQuaternionParameterization.h"
#include <cmath>
namespace camodocal
{
bool
EigenQuaternionParameterization::Plus(const double* x,
const double* delta,
double* x_plus_delta) const
{
const double norm_delta =
... | ALGO | 0.940759 | 7.137119 | {
"github_metadata": {
"branch": "master",
"commit_count": 119,
"repo_created_at": "2021-12-09T08:08:51.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 2758,
"forks": 641,
"issues": 140,
"pull_requests": 0
},
"file_meta": {
"content_id": "e7... |
196444f5-86d5-4846-b35e-8ee366fa6b5f | pradyumna0104/apan-college-dsa | 39. Heaps (Part 2)/NearbyCars.cpp | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
class Cars{
public:
int index;
int dist;
Cars(int index,int dist){
this->index = index;
this->dist = dist;
}
bool operator < (const Cars &obj) const {
return this->dist > obj.dist;
}
};
vo... | ALGO | 0.999985 | 5.169344 | {
"github_metadata": {
"branch": "main",
"commit_count": 38,
"repo_created_at": "2025-03-28T08:42:18.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "b57564097cc... |
92457b91-1e7a-44f8-9b21-55123f2ffa2a | avikodak/algos_v2 | src/main/avikodak/sites/geeksforgeeksv1/arrays/page08/maxvalincdecarray.h | /****************************************************************************************************************************************************
* File Name : maxvalincdecarray.h
* File Location : \algos_v2\src\main\avikodak\sites\geeksforgeeks\arrays\page07\maxvalincdecarray.h
... | ALGO | 0.99999 | 5.534193 | {
"github_metadata": {
"branch": "master",
"commit_count": 492,
"repo_created_at": "2014-10-09T08:32:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "481cf7b4... |
84885e86-9444-4625-adc1-6732d133d97d | bansalshaleen/C- | CODECHEF/June challenge/evenm.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long int ll;
typedef unsigned long long int sll;
typedef long double ld;
#define A 100000000ll
#define B 998244353ll
#define FAST ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#defin... | ALGO | 0.999877 | 4.375063 | {
"github_metadata": {
"branch": "master",
"commit_count": 11,
"repo_created_at": "2020-05-16T15:45: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": "1fd8bb194... |
f672fd8a-1dd6-4a0d-bf55-a0d1d389a1fc | sahadat-11/Codeforces | 1475/C.cpp | //In The Name of ALLAH
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int t; cin >> t;
while(t--) {
int x, y, k; cin >> x >> y >> k; int a[k], b[k];
map<int, int> mp1, mp2;
for(int i = 0; i < k; i++) cin >> a[i];
... | ALGO | 0.999953 | 3.999906 | {
"github_metadata": {
"branch": "main",
"commit_count": 67,
"repo_created_at": "2023-07-26T17:20: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": "0213e95cedd... |
b3446fa7-7537-4b86-82c5-2381364785e5 | agape1225/Baekjoon_SOL | mac_c_++/baekjoon_15658/baekjoon_15658.cpp | #include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
vector<int> nums;
int N;
int ops[4] = {0};
int ans_min = 1000000000;
int ans_max = -1000000000;
int get_num(int index, int num1, int num2){
if(index == 0){
return num1 + num2;
}else if(index == 1){
return num1 - n... | ALGO | 0.999845 | 3.60167 | {
"github_metadata": {
"branch": "main",
"commit_count": 720,
"repo_created_at": "2021-02-06T16:04:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 3,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f4230df65d... |
1173d34a-e012-4654-86c5-69b4af441ddc | ryancoleman/lotsofcoresbook2code | Pearls2_Chapter09/Dependencies/src/qdpxx/include/scalarsite_generic/qdp_generic_spin_project_evaluates.h | #ifndef QDP_GENERIC_SPIN_PROJECT_EVALUTATES_H
#define QDP_GENERIC_SPIN_PROJECT_EVALUTATES_H
using namespace QDP;
namespace QDP {
// Typedefs
typedef PSpinVector< PColorVector< RComplex<REAL>, 3>, 2 > HVec;
typedef PSpinVector< PColorVector< RComplex<REAL>, 3>, 4> FVec;
// Four spinor (Ns * Nc * Ncomplex ) Ncomplex f... | ALGO | 0.980939 | 5.517481 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2015-08-31T00:21:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 38,
"forks": 24,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a171934... |
415235ba-fd7d-491c-a3e4-afa9d8b1f71a | victorsenam/treinos | ojs/atcoder/arc079/E/E.cpp | #include <bits/stdc++.h>
#define debug if (1)
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> pii;
#define pb push_back
const int N = 60;
ll a[N], v[N];
ll n;
int main () {
ios::sync_with_stdio(0);
cin.tie(0);
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
ll ch;... | ALGO | 0.999957 | 3.619482 | {
"github_metadata": {
"branch": "master",
"commit_count": 844,
"repo_created_at": "2015-08-23T22:27: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": "b81bc13c... |
b79199d4-3173-4a69-aa31-c4551e21fb87 | emilyju0314/gpt_code_plagiarism | dataset/code_content_classifier/allpro_train/1_1687_41.cpp | #include <bits/stdc++.h>
using namespace std;
char s[100005];
int main() {
scanf("%s", s);
int n = strlen(s);
int flag1 = 0, flag2 = 0, flag = 0;
for (int i = 1; i < n; i++) {
if (s[i] == 'A' && s[i - 1] == 'B') {
if (flag1 == 1) {
flag = 1;
break;
}
}
if (s[i] == 'B' && ... | ALGO | 0.999982 | 3.47535 | {
"github_metadata": {
"branch": "main",
"commit_count": 50,
"repo_created_at": "2024-04-28T03:59:40.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6857a5b4185... |
c83464fb-b222-4d3a-8e1c-da8bf2462e79 | ethancoyle7/Discrete-Analysis | firstprogram/main.cpp | //*************************************************************************//
// Name: <NAME> //
// Class: Discrete Structures and Analysis //
// Instructor: Dr. StringFellow //
// Program 1: Computing GreyCode ... | ALGO | 0.993249 | 3.799475 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2021-01-24T22:02:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0197eb2279e... |
faa878bf-83b9-4d8d-94a5-366361f74bb2 | vgtutf081/CourseraCppCourseYellow | cppyellow/week3-4/demographicIndicators/src/demographicIndicators.cpp | //============================================================================
// Name : demographicIndicators.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//==========================================================================... | TOOL | 0.98683 | 5.080019 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2021-07-29T18:56: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": "bc5ad14b305c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.