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 |
|---|---|---|---|---|---|---|---|
bba9d136-8c6f-47b2-a123-5d6e46e6b5cc | CaptainGoGo007/Application1 | arrays.cpp | #include<iostream>
using namespace std;
// //Find pair of maximum sum
// int main() {
// int n;
// cin >> n;
// int numbers[n];
// for(int i = 0; i < n; i++){
// cin >> numbers[i];
// }
// int maximum = numbers[0];
// int second_maximum = numbers[0];
// int maximum_index =... | ALGO | 0.999991 | 4.462942 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2022-09-07T17:02:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "0267b5aa51... |
fe54dd8b-16a4-493f-94c2-163e41771a77 | itsuki0426/C- | Tessoku/chap_8/b57.cpp | #include <iostream>
using namespace std;
string S;
long long N, Q;
long long a[200009], b[200009];
long long T[200009], H[200009];
long long Power100[200009];
long long mod = 2147483647;
long long hash_value(int l, int r)
{
long long val = H[r] - (H[l - 1] * Power100[r - l + 1] % mod);
if (val < 0)
val ... | ALGO | 0.999975 | 4.145617 | {
"github_metadata": {
"branch": "main",
"commit_count": 2,
"repo_created_at": "2023-01-17T06:23: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": "6f8291deb8e2... |
fe0a5fa7-f3a0-4d27-b970-210163a1b8d4 | tobusoo/algo | 1-contest/h.cpp | #include <algorithm>
#include <iostream>
#include <vector>
void count_sort(std::vector<char>& v)
{
auto max = std::max_element(v.begin(), v.end());
size_t n = *max - 'A' + 1;
std::vector<size_t> temp(n);
for (auto&& i : v) {
temp[i - 'A']++;
}
int k = 0;
for (size_t i = 0; i < n; i+... | ALGO | 0.999978 | 4.362526 | {
"github_metadata": {
"branch": "master",
"commit_count": 76,
"repo_created_at": "2024-02-21T12:41: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": "8cdf32954... |
39e6410c-a380-4812-b37b-ba915ff7c373 | alexhvzr/BarcodeScanner | HashMap.cpp | //
// Created by <NAME> on 11/29/18.
//
#include "HashNode.h"
#define hno hNode
using namespace std;
const int tableSize = 1000;
class HashMap {
LinkedList<hno> hnl[tableSize];
public:
int generateHashNum(string hn, int tableSize) {
int sval = 0;
for (int i = 0; i < hn.length(); i++) {
... | ALGO | 0.991197 | 3.677937 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2018-11-21T04:37:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a1f36e311c... |
71978932-66a0-499e-a898-23d2dfec4ed5 | rasinhas/Maratona | spoj/br/done/celetric/celetric.cpp | #include <iostream>
#include <ctype.h>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <stdio.h>
#include <string.h>
#define INF 0x3f3f3f3f
using namespace std;
typedef pair <int, int> pii;
int finv(int a)
{
int ... | ALGO | 0.999176 | 3.138945 | {
"github_metadata": {
"branch": "master",
"commit_count": 85,
"repo_created_at": "2013-05-02T18:32:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "caceb00d0... |
1b27b078-ac71-4759-8b34-4480f0938714 | Naye-22/Tarea-11---ejercicios-con-funciones | 5-numeros-enteros.cpp | /*
Fecha: 13/6/2024
Autor: Yo
Orden: 5) Una función recibe 3 números enteros. La función devuelve verdadero si uno de esos números es la
suma de los otros 2.
*/
#include <iostream>
using namespace std;
bool esSumaDeOtrosDos(int a, int b, int c) {
// Verificar las tres combinaciones posibles
if (a == b + c) ... | ALGO | 0.999035 | 5.495844 | {
"github_metadata": {
"branch": "main",
"commit_count": 5,
"repo_created_at": "2024-06-15T01:05: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": "63f87e25b240... |
3b00043f-6a67-4060-85d8-45efecd11840 | ricobumbaca/Scalable-Target-Marketing | llmnlParallel_rcpp.cpp | #include "bayesm.h"
//[[Rcpp::export]]
vec llmnlParallel(mat const& beta, vec const& y, mat const& X){
// <NAME> 10/10/19
// Evaluates log-likelihood for the multinomial logit model for m betas
int m = beta.n_cols;
int n = y.size();
int j = X.n_rows/n;
mat Xbeta = X * beta;
int l = n*m;
Xbeta... | ALGO | 0.997739 | 5.630335 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-09-12T02:36:23.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d7ad660db5... |
fd83c6db-d480-4a3b-b9a5-229984952540 | HPC-Fortran2CPP/Fortran2Cpp | data/readable_format/cpp/file130.cpp | #include <iostream>
#include <vector>
#include <algorithm>
class MovingGate {
public:
MovingGate(double timeVal, double tgateVal, double VXgateVal, double VZgateVal, double dtVal, double zmaxIniVal, int ngateIni, int ngateEnd)
: time(timeVal), tgate(tgateVal), VXgate(VXgateVal), VZgate(VZgateVal), dt(dtVal... | ALGO | 0.96198 | 6.184314 | {
"github_metadata": {
"branch": "main",
"commit_count": 95,
"repo_created_at": "2024-04-05T20:02:14.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 13,
"forks": 5,
"issues": 55,
"pull_requests": 0
},
"file_meta": {
"content_id": "4dc18a94b6... |
faf02d3b-8baf-41d6-b042-80e722a884b2 | RugungDaimary/DSA | C++/priorityQueueAssignment.cpp | #include<iostream>
#include<queue>
#include<vector>
using namespace std;
// Check Max-Heap
bool isMaxHeap(int *a, int n)
{
for (int i = 0; i < n; i++)
{
int parentIndex = i;
int leftChildIndex = 2 * parentIndex + 1;
int rightChildIndex = 2 * parentIndex + 2;
if (leftChildIndex < ... | ALGO | 0.999959 | 4.327776 | {
"github_metadata": {
"branch": "main",
"commit_count": 132,
"repo_created_at": "2024-03-01T13:48: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": "9d77f3cf15... |
df0a727f-2227-495d-98af-ebf4de2ac14a | kyuri09/boj-answer | src/b14888.cpp | #include <iostream>
#include <algorithm>
#include <vector>
#include <set>
using namespace std;
int sum(vector<int>& num, vector<int>& oper)
{
int n = num.size();
int res = num[0];
for (int i = 1; i < n; i++)
{
if (oper[i - 1] == 0)
{
res += num[i];
}
else if (oper[i - 1] == 1)
{
res -= num[i];
}... | ALGO | 0.999922 | 3.639505 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2021-02-23T06:38: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": "f4740327b8... |
5c859309-f3c3-4d6c-91f7-b54e4863ef2b | VolodymyrKogut/STACK-QUEUE | АІСД №3 Черга.cpp | #include<iostream>
#include<windows.h>
using namespace std;
const int max_size = 10;
template<typename Type>
class QUEUE
{
public:
QUEUE();
void MAKENULL();
Type FRONT();
void ENQUEUE(Type value);
void DEQUEUE();
bool EMPTY();
void Print();
private:
Type* arr;
int front;
int rear;
int element_arr;
};
te... | TOOL | 0.957629 | 3.557447 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2022-05-23T21:27: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": "c4d071502a52... |
6dcf6c36-b2c3-404a-bf27-2bcc44fc5545 | ishandutta2007/codeforces-i | intothenight/normal/744/C.cpp | #include <bits/stdc++.h>
using namespace std;
template<class T, class U> T &ctmax(T &x, const U &y){ return x = max<T>(x, y); }
template<class T, class U> T &ctmin(T &x, const U &y){ return x = min<T>(x, y); }
int main(){
cin.tie(0)->sync_with_stdio(0);
cin.exceptions(ios::badbit | ios::failbit);
int n;
cin >> n... | ALGO | 0.998714 | 3.952186 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T05:39:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "4855f5661ff3... |
081ec473-67ee-4aea-9289-2e11bd9964e7 | plusplus7/solutions | codeforces/2019/EducationalRound#77_Div.2/B.cpp | #include<bits/stdc++.h>
using namespace std;
bool check(int a, int b) {
int k = b-a;
if ((a + (2 * k)) % 3 == 0)
{
int x1 = (a+(2*k))/3;
if (x1-k < 0){
return false;
}
return true;
}
return false;
}
int main()
{
int n;
cin >> n;
while (n--){
... | ALGO | 0.999983 | 3.973019 | {
"github_metadata": {
"branch": "master",
"commit_count": 349,
"repo_created_at": "2015-12-08T13:46:44.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 4,
"forks": 1,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "0e3162a0... |
66d9b8d3-bb94-495a-a7bd-ec8903494510 | 46ra20/Programming | Algorithm/Week_04/Module_16_Exam/Building.cpp | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 1e5 + 5;
int parent[N];
int level[N];
int track[N];
class Edge
{
public:
int u, v, w;
Edge(int u, int v, int w)
{
this->u = u;
this->v = v;
this->w = w;
}
};
vector<Edge> edgeList;
void dsu_int(int n... | ALGO | 0.999816 | 4.217702 | {
"github_metadata": {
"branch": "main",
"commit_count": 42,
"repo_created_at": "2023-10-01T11:03: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": "642fe11f6c2... |
c8f33c12-a83a-4c97-9100-48eb77cfae8f | DailyPS/Baekjoon | Silver/Silver IV/10866.cpp | #include <bits/stdc++.h>
using namespace std;
deque<int> q;
int main(void)
{
ios::sync_with_stdio(false);
cin.tie(NULL);
int n;
cin >> n;
for (int i = 0; i < n; i++)
{
string command;
cin >> command;
if (!command.compare("push_front"))
{
int n... | ALGO | 0.998572 | 4.647757 | {
"github_metadata": {
"branch": "main",
"commit_count": 172,
"repo_created_at": "2021-02-16T13:46: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": "a0effbbfaf... |
80e2a25d-92ea-4f82-9f94-75126f55766c | wjddlsy/Algorithm | Baekjoon/baek_14002_가장긴증가하는부분수열4/main.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
const int INF = 1000000005;
bool comp(const pair<int, int> &a, const pair<int, int> &b) {
return a.first < b.first;
}
int main() {
int N;
cin>>N;
vector<pair<int, int>> lis{{-INF, 0}};
vector<int> parent(N+1);
vect... | ALGO | 0.999998 | 3.964231 | {
"github_metadata": {
"branch": "master",
"commit_count": 71,
"repo_created_at": "2019-07-21T16:28: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": "2c2c2f7e3... |
3341a1e7-d6fd-4509-810f-cdcad26ce126 | OpenMS/OpenMS | src/openms/extern/GTE/Mathematics/SinEstimate.h | // <NAME>, Geometric Tools, Redmond WA 98052
// Copyright (c) 1998-2022
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
// https://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
// Version: 6.0.2022.01.06
#pragma once
#include <Mathematics/Math.h>
// Minim... | ALGO | 0.995889 | 6.64534 | {
"github_metadata": {
"branch": "develop",
"commit_count": 34896,
"repo_created_at": "2014-01-09T10:15:13.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 518,
"forks": 358,
"issues": 638,
"pull_requests": 64
},
"file_meta": {
"content_id": ... |
d551018b-32d0-4cf0-b36c-3cd071ff2c12 | kt117/ProCom | codeforces/educational/106/f.cpp | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll MOD = 998244353;
const ll INF = 1e18;
#define rep(i,m,n) for(ll i = (m); i <= (n); i++)
#define zep(i,m,n) for(ll i = (m); i < (n); i++)
#define rrep(i,m,n) for(ll i = (m); i >= (n); i--)
#define print(x) cout << (x) <<... | ALGO | 0.999987 | 4.485358 | {
"github_metadata": {
"branch": "master",
"commit_count": 280,
"repo_created_at": "2020-04-09T05:59:58.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 13,
"pull_requests": 0
},
"file_meta": {
"content_id": "d22cc49... |
e286af85-02c1-4c17-bcee-4d70189f13cc | xianguang13/CPE473 | src/render.cpp | #include "data.h"
#include "pixelray.h"
#include "pixelcolor.h"
#include <vector>
#include "sds.h"
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
using namespace std;
using namespace glm;
void render(Camera c, vector<Light> l, vector<Object *> o, int width, int height, int brdf, int fresnel, int... | TOOL | 0.907938 | 4.65049 | {
"github_metadata": {
"branch": "master",
"commit_count": 22,
"repo_created_at": "2017-04-12T20:33:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3be03cb79... |
f63a1c13-0bd6-4c37-94c1-b98541269b7f | CN-LEON-DX/DSA_Intermediate | DinamicPrograming/29.EqualSet.cpp | // Nhiệm vụ của bạn là đếm số cách các số 1,2,…, n có thể chia thành hai tập có tổng bằng nhau. Các phần tử trong tập không xét đến thứ tự Ví dụ, nếu n = 7, có bốn nghiệm: {1,3,4,6} và {2,5,7}. {1,2,5,6} và {3,4,7}. {1,2,4,7} và {3,5,6}. {1,6,7} và {2,3,4,5}.
// Input Format
// Dòng duy nhất chứa số nguyên dương n
/... | ALGO | 0.999997 | 4.801593 | {
"github_metadata": {
"branch": "main",
"commit_count": 28,
"repo_created_at": "2023-12-03T10:11: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": "12699d7fcb2... |
c329e487-2797-4bf7-acb9-e8f5c2e006c4 | JonasBurger/global_illumination_fau | a03/src/algorithms/simple.cpp | #include "driver/context.h"
#include "gi/algorithm.h"
#include "gi/surface.h"
#include "gi/scene.h"
#include "gi/random.h"
#include "gi/light.h"
#include "gi/ray.h"
using namespace std;
using namespace glm;
struct SimpleRenderer : public Algorithm {
void sample_pixel(Context& context, uint32_t x, uint32_t y, uint... | ALGO | 0.925466 | 6.273841 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2021-05-03T20:17:56.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "2b3c786e0... |
8ccef8df-57ad-4358-a36c-146c7045b6fc | mx-ulises/exercises | legacy_code/adm/data_structures/3_03_dynamic_array_underflow.cpp | // Dynamic Array with Underflow (ADM-3.3)
#include <vector>
#include <iostream>
using namespace std;
class DynamicArray {
private:
int capacity;
int size;
int* A;
int* copy_array(int* A, int new_capacity, int max_index){
cout << "Resize" << endl;
int* B = ... | ALGO | 0.997615 | 5.234685 | {
"github_metadata": {
"branch": "master",
"commit_count": 515,
"repo_created_at": "2016-04-12T02:37: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": "ec310955... |
33e7e7a7-33f4-40d5-8970-d7b796da58da | bdqnghi/bi-tbcnn | code/knapsack/cpp/714.cpp | // Máximo número de objetos
const int MAXN = 2005;
// Máximo tamaño de la mochila
const int MAXW = 2005;
// w[i] = peso del objeto i (i comienza en 1)
int w[MAXN];
// v[i] = valor del objeto i (i comienza en 1)
int v[MAXN];
// dp[i][j] máxima ganancia si se toman un subconjunto de los
// objetos 1 .. i y se tiene una c... | ALGO | 0.999985 | 4.227898 | {
"github_metadata": {
"branch": "master",
"commit_count": 191,
"repo_created_at": "2017-10-04T10:39:29.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 51,
"forks": 18,
"issues": 2,
"pull_requests": 0
},
"file_meta": {
"content_id": "4c4c4f... |
83e66995-4a30-4ceb-b573-d1e7d0080245 | Victoralin10/ACMSolutions | trainingcamp2018/contest4/J.cpp | #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, a, b) for (int i = a; i < b; i++)
#define clr(t, val) memset(t, val, sizeof(t))
#define all(v) v.begin(), v.end()
#define SZ(v) ((int)(v).size())
#define TEST(x) cerr << "test " << #x << " " << x << endl;
using namespace std;
clock... | ALGO | 0.99991 | 3.75198 | {
"github_metadata": {
"branch": "master",
"commit_count": 20,
"repo_created_at": "2016-03-03T09:25:10.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a41aa7cbd... |
4773b474-f673-4f69-805c-d0584b37fced | gyanendra0/ada | pfiles/Dijkstra.cpp | #include <bits/stdc++.h>
using namespace std;
#define V 5
void printSolution(int dist[])
{
cout <<"Vertex \t Distance from Source" << endl;
for (int i = 0; i < V; i++)
cout << i << " \t\t"<<dist[i]<< endl;
}
int minDistance(int dist[], bool sptSet[])
{
int min = INT_MAX, min_index;
... | ALGO | 0.999941 | 4.547365 | {
"github_metadata": {
"branch": "main",
"commit_count": 25,
"repo_created_at": "2021-12-05T22:20: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": "15c36072533... |
26dc8b95-5988-40ba-a060-ef09bb481d19 | MikuPy2001/CQPCPPSDK | dev/ini/INItool.cpp | #include "..\..\inculde\INItool.h"
#include <fstream>
#include <sstream>
#include <vector>
using namespace std;
using namespace INI;
char* LTrim(char * buff)
{
while (*buff == '\t' || *buff == ' ')++buff;
return buff;
}
void RTrim(char * buff)
{
while (*buff != 0)++buff; --buff;
while (*buff == '\t' || *buff == ' ... | TOOL | 0.908997 | 3.66453 | {
"github_metadata": {
"branch": "master",
"commit_count": 58,
"repo_created_at": "2018-03-07T01:46:03.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 11,
"forks": 3,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d1ca54c9... |
1ffb259a-63d7-4b2f-93f1-e43cbf450d86 | Randool/Algorithm | simulation/有效数字(DFM).cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
private:
int char2int(char c) {
if (c == ' ') return 1;
if (c == '+' || c == '-') return 2;
if (c <= '9' && c >= '0') return 3;
if (c == '.') return 4;
if (c == 'e') return 5;
return -1;
}
public:
... | ALGO | 0.991223 | 4.436696 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2018-05-10T16:32: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": "1a96c8b433... |
bce2bff2-21fb-41b2-ab66-e3c918f28392 | KristoD/IntroToCPP | Arrays/ArraysData/main.cpp | #include <iostream>
#include <string>
int main() {
int values[3];
values[0] = 88;
values[1] = 123;
values[2] = 7;
std::cout << values[0] << std::endl;
std::cout << values[1] << std::endl;
std::cout << values[2] << std::endl;
double numbers[4] = {4.5, 2.3, 7.2, 8.1};
for(int i =... | ALGO | 0.987717 | 3.776931 | {
"github_metadata": {
"branch": "master",
"commit_count": 3,
"repo_created_at": "2019-01-03T01:03:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "bea1ab9731... |
7743eb3e-8b38-41f0-9d58-20e87d334ccb | sssaoji/Competitive-Code-Solutions | Knapsack01Memoised.cpp | #include <bits/stdc++.h>
using namespace std;
int msd[1001][1001];
int knap(vector<int> wt, vector<int> arr, int w, int size)
{
if (w == 0 || size == 0)
{
return 0;
}
if (msd[w][size] != -1)
{
return msd[w][size];
}
if (wt[size - 1] <= w)
{
return msd[w][size] = ... | ALGO | 0.999995 | 4.033894 | {
"github_metadata": {
"branch": "master",
"commit_count": 162,
"repo_created_at": "2022-09-24T06:00: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": "b8939fa6... |
69d6d342-f273-4137-bec3-5286067ef6a2 | VinayKumarSingh9798/Snackdown21 | DailyAffirm.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int N, i;
cin >> N;
regex exp(".+@gmail\\.com$");
;
if(regex_match(Eid, exp))
{
strarray.push_back(Fname);
#include <iostream>
using namespace std;
int ma... | ALGO | 0.999158 | 3.780632 | {
"github_metadata": {
"branch": "main",
"commit_count": 54,
"repo_created_at": "2021-10-19T08:43:45.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 6,
"issues": 0,
"pull_requests": 1
},
"file_meta": {
"content_id": "06e4ef4e82a... |
31b5eb32-8e7a-4e68-82be-10e1631455d5 | trinhminhtriet/leetcode | solutions/0900-0999/0973.k-closest-points-to-origin/Solution3.cpp | class Solution {
public:
vector<vector<int>> kClosest(vector<vector<int>>& points, int k) {
int n = points.size();
int dist[n];
int r = 0;
for (int i = 0; i < n; ++i) {
int x = points[i][0], y = points[i][1];
dist[i] = x * x + y * y;
r = max(r, dis... | ALGO | 0.999999 | 6.427813 | {
"github_metadata": {
"branch": "master",
"commit_count": 118,
"repo_created_at": "2024-12-09T17:55:17.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 34,
"forks": 13,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "73b901... |
3bf61446-a663-48a6-8723-6d58cd99bdbb | NandiniMehta0603/DSAlgo | Stacks/2 stacks in an array.cpp | #include <bits/stdc++.h>
class TwoStack {
//as we want to consume memory of array to the fullest
//so the strategy is to fill array from both the ends
//first array from the start and second array from the end
public:
int *arr;
int top1;
int top2;
int size;
TwoStack(int s) {
this->s... | ALGO | 0.999369 | 4.787541 | {
"github_metadata": {
"branch": "main",
"commit_count": 202,
"repo_created_at": "2023-01-31T13:45: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": "0c937a0a2a... |
60239da6-1c55-47f4-9fd3-11f918218d7c | spencer-project/spencer_people_tracking | utils/rwth_ground_plane/src/groundplaneestimator.cpp | #include "groundplaneestimator.h"
#include "Math.h"
GroundPlaneEstimator::GroundPlaneEstimator()
{
}
Vector<double> GroundPlaneEstimator::ComputeGroundPlane(const PointCloud& point_cloud)
{
Vector<int> allPointsOnGPIndices;
ComputePointsOnGP(point_cloud, allPointsOnGPIndices);
int n_points = allPointsOnG... | ALGO | 0.993452 | 5.567163 | {
"github_metadata": {
"branch": "master",
"commit_count": 272,
"repo_created_at": "2015-03-14T22:39:32.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 702,
"forks": 324,
"issues": 33,
"pull_requests": 1
},
"file_meta": {
"content_id": "b677... |
6bfd772a-d170-4645-b5fc-ae6c4fc749f8 | Dr-Don/MyAntithesisLeetcode-ING | c++/5_最长回文子串.cpp | /*
给定一个字符串 s,找到 s 中最长的回文子串。你可以假设 s 的最大长度为 1000。
示例 1:
输入: "babad"
输出: "bab"
注意: "aba" 也是一个有效答案。
示例 2:
输入: "cbbd"
输出: "bb
*/
#include <iostream>
#include <string.h>
#include <cmath>
using namespace std;
class Solution {
public:
/* 我的暴力解法,是对的但是超时 */
string longestPalindrome(string s) {
int n = s.size(... | ALGO | 0.999952 | 4.833253 | {
"github_metadata": {
"branch": "master",
"commit_count": 37,
"repo_created_at": "2020-04-13T02:44: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": "f5c956e45... |
fbe1bee8-62a6-4940-bff0-4a241a51e40a | Redrock912/pracAl | Test/11/11.cpp | #include <iostream>
#include <stack>
using namespace std;
class Position {
public:
int x;
int y;
};
int Maze[5][5] = {
{ 0, 0, 0, 0, 0 },
{ 1, 1, 1, 1, 0 },
{ 1, 1, 1, 1, 0 },
{ 1, 1, 1, 1, 0 },
{ 1, 1, 1, 1, 0 }
};
Position Dir[4];
void PrintMaze(const Position& Current)
{
for (int y = 0; y < 5; ++y)
{
... | ALGO | 0.999886 | 4.067975 | {
"github_metadata": {
"branch": "master",
"commit_count": 13,
"repo_created_at": "2018-04-11T04:02: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": "82f6c85b3... |
9e4c6280-4cb2-461b-89a8-ec9f67a68659 | pekokane88/AlgorithmStudy | programmers/level1/소수만들기.cpp | /*
1. 먼저 최대 나올 수 있는 3000까지의 수에서 모든 소수를 구한다.
2. 3개의 수를 골라 얻을 수 있는 모든 조합의 가지 수를 구한다.
3. 이 때 그 수가 소수라면 Cnt 를 1증가 시킨다.(arr에는 소수만 1로 되어있기 때문에 이것으로 판별 가능)
*/
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
vector<int> arr(3001, 1);
vector<int> used;
vector<int> numList;
int len = 0;
int... | ALGO | 0.999897 | 5.258315 | {
"github_metadata": {
"branch": "main",
"commit_count": 218,
"repo_created_at": "2022-09-05T13:31:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "a5465a8db1... |
77c0b4de-2f96-46f5-9570-b58caf334559 | TitusVesp/HomeWorkKNU | Boolean/Boolean3.cpp |
//Boolean32.Даны целые числа a, b, c, являющиеся сторонами некоторого тре -
//угольника.Проверить истинность высказывания : «Треугольник со сторо -
//нами a, b, c является прямоугольным».
#include "Boolean_main.h"
void boolean3()
{
int a = 0, b = 0, c = 0;
cout << "Ведiть А" << endl;
cin >> a;
cout << "Ведiть B... | ALGO | 0.999017 | 3.805194 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2019-09-13T18:07: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": "305451c31f... |
80636011-d8c7-41e7-986c-27955a07b9b1 | AlexGliesch/competitive-programming | leetcode/cpp/next-greater-node-in-linked-list.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
vector<int> nextLargerN... | ALGO | 0.999989 | 5.713826 | {
"github_metadata": {
"branch": "main",
"commit_count": 13,
"repo_created_at": "2022-05-01T04:18: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": "ab8f3913cee... |
61f497ce-928c-42eb-a1e3-ee4b019e9c34 | dipu-bd/OJ-Codes | UVA Codes/Volume 110/11060 - Beverages/11060 - Beverages_v1.cpp | /*============================
/\u7h0r : 5ud!p70 ch@ndr@ d@5
=============================*/
//C headers
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <limits.h>
#include <ctype.h>
#include <assert.h>
//cpp headers
#include <iostream>
#include <iomanip>
#include <sstream>
#incl... | ALGO | 0.999978 | 3.930131 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2015-02-18T17:34:28.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3b6b779d50... |
6cf5f657-1d8f-45ad-b5bc-7cd31e49680e | xoyojank/nebula3 | code/extlibs/OGDF/src/planarity/EmbedderMaxFaceLayers.cpp | /*
* $Revision: 2565 $
*
* last checkin:
* $Author: gutwenger $
* $Date: 2012-07-07 17:14:54 +0200 (Sa, 07. Jul 2012) $
***************************************************************/
/** \file
* \brief Computes an embedding of a graph with maximum external face.
*
* See the paper "Graph Embedding with M... | ALGO | 0.999741 | 5.040377 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2012-11-23T19:29:49.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 62,
"forks": 38,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "337e1c6b... |
3d7ad925-ea21-43d9-be41-e11b3919ae03 | ForgotDream/Problemset | Luogu/P3287 方伯伯的玉米田.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Edge = pair<int, int>;
const int N = 1e4 + 50, M = 5.5e3 + 100, K = 505, INF = 0x3f3f3f3f;
int n, k, a[N], maxx;
int f[N][K], tree[K][M];
inline int lowbit(int x) {
return x & -x;
}
inline void update(int x, int y, int num) {
for (int i = x... | ALGO | 0.999943 | 4.129269 | {
"github_metadata": {
"branch": "main",
"commit_count": 286,
"repo_created_at": "2023-04-20T07:00: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": "608231d9f7... |
87c1e813-574b-4cd0-82d0-31e973b02076 | JLiesenborgs/GA2 | src/mpipopulationfitnesscalculation.cpp | #include "mpipopulationfitnesscalculation.h"
#ifdef EATKCONFIG_MPISUPPORT
#include <iostream>
#include <cassert>
#include <typeinfo>
using namespace errut;
using namespace std;
namespace eatk
{
MPIPopulationFitnessCalculation::MPIPopulationFitnessCalculation(const std::weak_ptr<MPIEventDistributor> &mpiDist)
: m_... | ALGO | 0.994333 | 7.00988 | {
"github_metadata": {
"branch": "main",
"commit_count": 205,
"repo_created_at": "2021-02-21T22:25: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": "eb8947e738... |
db1748b9-f043-4940-89f7-061975bffcd6 | matheusAntunesF/cpp-list-structures | lista_fisica.hpp | #pragma once
#include <iostream>
#include <random>
#include "settings.cpp"
using namespace std;
class ListaContiguidadeFisica
{
public:
vector<int> lista;
void iniciaLista(int tamanho)
{
lista.reserve(tamanho * 100);
lista.resize(tamanho);
}
void leitura()
{
int tamanho... | ALGO | 0.999333 | 4.665534 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-05-06T12:53:54.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "f4f6f9c27858... |
377e0dfd-4418-462a-9d43-a9d773decc47 | farhanfuad02/practice | Module 8/Can_Go.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
vector<pair<ll,ll>> adj[1005];
int dist[1005];
class cmp
{
public:
bool operator()(pair<ll,ll>a, pair<ll,ll>b)
{
return a.second > b.second;
}
};
void dijkstra(ll src)
{
priority_queue<pair<ll,ll>,vector<pair<ll,ll>>,cmp> ... | ALGO | 0.999982 | 4.109697 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-06-30T18:34: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": "264ddcb01c5c... |
5850877f-5110-465b-83de-f4a889e50812 | 1604056nizam/problem-solving | Alien Dictionaly GFG.cpp | class Solution {
public:
string findOrder(vector<string> dict, int k) {
// code here
vector<int> inDegree(k, 0);
string result = "";
vector<int>adj[k];
queue<int> q;
for(int i = 0; i < dict.size() -1; i++) {
string s1 = dict[i];
stri... | ALGO | 0.999997 | 5.393003 | {
"github_metadata": {
"branch": "master",
"commit_count": 138,
"repo_created_at": "2023-03-25T09:41: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": "3fbeebc5... |
96d7cebd-15a5-4d1c-855b-930098937cbc | hoimd/ALGO-Tasks | OI/[IX OI] komiwojazer_bajtazar.cpp | #include<iostream>
#include<vector>
using namespace std;
const int LOGN = 16, M = 1<<LOGN;
vector<int>G[M];
int t = 0, inTime[M], outTime[M], dist[M], P[LOGN][M];
bool vis[M];
void dfs(int prev, int v){
inTime[v] = ++t;
vis[v] = true;
P[0][v] = prev;
dist[v] = dist[prev] + 1;
for(int u : G[v]){
... | ALGO | 0.999919 | 4.111779 | {
"github_metadata": {
"branch": "main",
"commit_count": 23,
"repo_created_at": "2021-11-20T22:40: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": "a1f33677926... |
fdc2cc32-ad7a-4037-b8e7-67c3d0530610 | ghlkm/rtree-topk | rtree_adapter.cpp | #include "rtree_adapter.h"
#include "utils.h"
void release_rtree(Rtree *rt){}
void rtreeRAM(const Rtree& rt, unordered_map<long int, RtreeNode*>& ramTree)
{
ramTree.clear();
queue<long int> H;
RtreeNode* node;
H.push(rt.m_memory.m_rootPageID);
long int pageID;
while (!H.empty())
{
... | ALGO | 0.998287 | 4.372455 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2021-12-31T07:13: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": "efd0163e4cee... |
fb71f9b1-6099-48de-b980-69bd50838fca | NVIDIAGameWorks/NvCloth | NvCloth/src/dx/DxSortKernel.inc | interface ISortElements
{
int get(int index);
void set(int index, int value);
void swap();
};
//Reduce - BlockSize * sizeof(uint4)
//Scan - (2 + BlockSize) * sizeof(uint)
interface ISortShared
{
uint4 getReduce(int index);
void setReduce(int index, uint4 value);
uint getScan(int index);
void setScan(int index,... | ALGO | 0.999817 | 4.799781 | {
"github_metadata": {
"branch": "master",
"commit_count": 29,
"repo_created_at": "2017-01-27T17:12:25.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 315,
"forks": 56,
"issues": 16,
"pull_requests": 1
},
"file_meta": {
"content_id": "e6751a... |
931ce1ea-966b-4384-8041-15a05f992282 | Chinesezjc/Solved-Problems | CodeForces/CF641G.cpp | //This Code was made by Chinese_zjc_.
#include <iostream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <vector>
#include <bitset>
#include <cmath>
#include <queue>
#include <stack>
#include <list>
#include <string>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include... | ALGO | 0.999956 | 3.874429 | {
"github_metadata": {
"branch": "master",
"commit_count": 99,
"repo_created_at": "2020-12-29T10:37: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": "106d0d796... |
95301bdd-27a7-40ac-8690-be96fd4a7bb6 | pervin0527/TOPASS | cpp/02-LinkedList/5397.cpp | #include <iostream>
#include <list>
#include <string>
using namespace std;
int main()
{
int n;
cin >> n;
for(int i = 0; i < n; i++)
{
string line;
cin >> line;
list<char> ll;
auto itr = ll.begin();
for (char ch : line)
{
if (ch == '<')
... | ALGO | 0.999942 | 4.358143 | {
"github_metadata": {
"branch": "main",
"commit_count": 168,
"repo_created_at": "2023-12-02T10:10:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "19c021682a... |
29a6134a-1ea5-44ed-af44-b89c5539f142 | DucAnhNg2k2/SourceCode | Codeptit - CTGL & GT/DSA10016_NỐI ĐIỂM.cpp | #include <bits/stdc++.h>
#define LL long long
#define ULL unsigned long long
#define FOR(i,a,b) for(int i=a;i<=b;++i)
#define FO(i,a,b) for(int i=a;i<b;++i)
#define FORD(i,a,b) for(int i=a;i>=b;--i)
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define endl '\n'
#define debug cout << "YE... | ALGO | 0.999554 | 4.509845 | {
"github_metadata": {
"branch": "main",
"commit_count": 120,
"repo_created_at": "2022-03-12T17:05:12.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d5bda7cbd0... |
dcf27427-1800-4efd-844d-772ca079813b | manotv-alt/fScience | algoritmos_testes/quicksort.cpp | #include <iostream>
#include <stdlib.h>
using namespace std;
void swap_func(int *end1, int *end2){
int swap;
swap = *end1;
*end1 = *end2;
*end2 = swap;
}
int partition(int *vect, int beggin, int end){
int reference = *(vect + end);
int final_reference_index = beggin - 1;
for(int run = b... | ALGO | 0.999925 | 4.656334 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-08-08T02:01: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": "34ec603be46f... |
7ca31039-9002-463c-9761-7536ed1b3d3d | Giantpizzahead/comp-programming | CSES/mathematics/inversionprobability.cpp | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define all(x) begin(x), end(x)
#define sz(x) (int) (x.size())
using namespace std;
using ll = long long;
using vi = vector<int>;
const int MAXN = 101;
int N;
double R[MAXN];
void solve() {
cin >> N;
rep(i, 0, N) cin >> R[i];
d... | ALGO | 0.999518 | 3.875301 | {
"github_metadata": {
"branch": "master",
"commit_count": 25,
"repo_created_at": "2020-04-04T04:04:46.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "eb853929b... |
a6fb6ef0-0b43-45ba-91e3-78e03981ec7a | miiinnn23/Baekjoon | Study/11728/11728.cpp | #include <cstdio>
#define MAX 1000001
int N, M;
int A[MAX];
int B[MAX];
int Result[MAX + MAX];
void merge();
int main(void) {
scanf("%d %d", &N, &M);
for(int i = 0; i < N; i++) {
scanf("%d", &A[i]);
}
for(int i = 0; i < M; i++) {
scanf("%d", &B[i]);
}
merge();
for(i... | ALGO | 0.999992 | 3.37769 | {
"github_metadata": {
"branch": "main",
"commit_count": 222,
"repo_created_at": "2021-02-25T14:14: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": "d8669c1c65... |
0bd74a33-17b0-4780-8444-fd12f852f553 | dilishp/Algo-DSSolutions | AlgoQs/PathSumBTree.cpp | #include <iostream>
using namespace std;
// 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 *le... | ALGO | 0.999987 | 5.093608 | {
"github_metadata": {
"branch": "master",
"commit_count": 15,
"repo_created_at": "2020-04-12T15:34:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 4
},
"file_meta": {
"content_id": "bb6c51f27... |
4c2d0af2-d50d-4af7-aed4-d2c02adc2513 | chernals/bdsim | src/obsolete/BDSGammaConversion_LPB.cc | //GammaConversion Leading Particle Biasing Method, <NAME>, <NAME>, 15/10/09
#include "BDSGammaConversion_LPB.hh"
#include "CLHEP/Random/Random.h"
#include "BDSGlobalConstants.hh"
G4VParticleChange* GammaConversion_LPB::PostStepDoIt(const G4Track& track, const G4Step& step)
{
//System to control degree of biasing us... | ALGO | 0.991719 | 4.925839 | {
"github_metadata": {
"branch": "gh_light",
"commit_count": 1,
"repo_created_at": "2017-12-11T10:12: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": "e64d8aff... |
68571e1a-7030-4ae9-8dc9-854e3b7d15b5 | DolphinMX/Y2-3 | Y3SA/EE2331 Data Structures and Algorithms/Week 6/week6-framework.cpp | /*
In this week's tutorial, you need to practice recursive programming. The detailed tasks can be found in the following framework. Feel free to reuse the codes from the previous tutorials
//include needed head files and libraries
/*
three functions here: insertion sort, binarySearch1, and binarySearch2
*/
... | ALGO | 0.999697 | 4.426744 | {
"github_metadata": {
"branch": "main",
"commit_count": 6,
"repo_created_at": "2024-01-20T06:10: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": "ea525bde99da... |
b699c9b6-1034-4836-b43f-6f33cd236bf1 | beqwhitee/beq | шестой/первый.cpp | #include <iostream>
using namespace std;
bool HasDuplicates(int arr[], int size) {
for (int i = 0; i < size - 1; ++i)
for (int j = i + 1; j < size; ++j)
if (arr[i] == arr[j])
return true;
return false;
}
int CountCommonElements(int arr1[], int size1, int arr2[], int size2... | ALGO | 0.999592 | 5.591651 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2025-07-02T15:18: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": "5984496c30e5... |
fb6cf0ff-8184-4935-af86-e9c3fcb16708 | Vaa3D/vaa3d_tools | hackathon/LXF/consensus_skeleton_2/median_swc.cpp | #include "median_swc.h"
#include "neuron_matching_distance.h"
#include "cfloat"
#include <iostream>
#include "point3d_util.h"
#include "resample_swc.h"
#include <algorithm>
#include <vector>
void quickSort(vector<double> &x, vector<int> &order, int left, int right) {
int i = left, j = right;
double t... | ALGO | 0.999469 | 4.857447 | {
"github_metadata": {
"branch": "master",
"commit_count": 7983,
"repo_created_at": "2016-01-27T18:19:17.000Z",
"is_fork": false,
"is_org_owned": true,
"forked_from": null,
"stars": 110,
"forks": 70,
"issues": 11,
"pull_requests": 12
},
"file_meta": {
"content_id": "1d9... |
f8c02b69-97b0-4486-b45c-de4e4f198eef | ishandutta2007/codeforces-f | fedoseev.timofey/normal/1336/C.cpp | #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <iomanip>
#include <functional... | ALGO | 0.999971 | 4.592292 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2024-04-11T01:43: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": "dffed9793b28... |
4e564771-30d6-4773-b56f-2dfcfeec1786 | rajanraj2/Atcoder | 2025/ABC_411/B_Distance_Table.cpp | #include <bits/stdc++.h>
using namespace std;
#define fio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define int long long int
#define vi vector<int>
#define vs vector<string>
#define ivec(arr) for (int i = 0; i < arr.size(); i++) cin >> arr[i];
#define w(x) int x; cin>>x; while(x--)
#define pb push_back
... | ALGO | 0.999838 | 4.303077 | {
"github_metadata": {
"branch": "main",
"commit_count": 14,
"repo_created_at": "2025-02-01T13:07: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": "51d5041685e... |
4b17811e-78b4-4655-b33b-279fe6b9e0fc | Juan-glitch/C-For-C-Programmers | src/Module 2/uso_template.cpp | #include <iostream>
#include <vector> // Para usar std::vector
using namespace std;
// Función plantilla para calcular la suma de un array
template<typename T>
T sum(const std::vector<T>& array)
{
if (array.empty())
return T(); // Devuelve 0 si el vector está vacío.
T total = 0; // Inicializa la suma.
fo... | ALGO | 0.995721 | 6.186546 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2025-03-21T19:14: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": "d6e88c4a894... |
5f6add64-5b6e-449f-9ca1-6cfbaa2936c8 | Aditya-A-garwal/cses | range_queries/static_range_min_queries.cpp | #pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<typename T>
using ordered_set = tree<T, null_type, le... | ALGO | 0.999939 | 4.886317 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2021-07-02T10:44: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": "20403857628... |
afe5ea9e-e166-4250-a6c6-7f437f849e06 | stelatoris/Programming_Principles_and_Practices_Using_CPP_Stelatoris | Chapter 15/PPP-Ch15-Ex-05.cpp | //main.cpp
// Programming: Principles and Practices using c++ - <NAME>
//
// Chapter 15 Drill and Exercise solutions
#include "Simple_window.h"
#include "Graph.h"
#include "std_lib_facilities.h"
#include "tools.h"
#include <math.h>
#define PI 3.14159265
using namespace Graph_lib;
constexpr int xmax = 1200; // wi... | ALGO | 0.992229 | 5.384446 | {
"github_metadata": {
"branch": "main",
"commit_count": 33,
"repo_created_at": "2021-09-24T20:49: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": "591f95f81b3... |
dc80c0f0-a7d5-498f-bf19-1aef1a953cc5 | wfabi0/AEDS-I | Atividade 01 - Vetores/exercicio9.cpp | // Deseja-se publicar o número de acertos de cada aluno em uma prova em forma de testes. A
// prova consta de 3 questões, cada uma com cinco alternativas identificadas por A, B, C, D, E. Para
// isso são dados:
// a. o cartão gabarito;
// b. o número de alunos da turma:
// C. o cartão de respostas para cada aluno, cont... | TEST | 0.913902 | 4.005444 | {
"github_metadata": {
"branch": "main",
"commit_count": 19,
"repo_created_at": "2023-08-02T00:46: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": "0b3b33f02f7... |
9b702438-f838-435e-a5ed-5ff0d7718376 | JoWayne94/High-Performance-Computing-Portfolio | LidDrivenCavity.h | /**
* @file LidDrivenCavity.h
*
* High-Performance Computing
*
* Header file of LidDrivenCavity.cpp
*
* Define all public classes and private variables
*
*/
#ifndef LIDDRIVENCAVITY_H
#define LIDDRIVENCAVITY_H
#pragma once
#include <string>
using namespace std;
class LidDrivenCavity {
public:
LidDrivenCa... | TOOL | 0.923524 | 6.060226 | {
"github_metadata": {
"branch": "master",
"commit_count": 26,
"repo_created_at": "2020-09-13T07:39:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d35792a58... |
993af38f-e671-4ab5-9ab5-0d7953b1bf3d | Tanvir-Mahamood/Leetcode-Top-Interview-150-Solution | 42-trapping-rain-water/trapping-rain-water.cpp | class Solution {
public:
int trap(vector<int>& height) {
int i, n = height.size(), minn = 0, maxx = 0, ans = 0;
vector<int> left(n), right(n);
for (i = 0; i < n; i++) {
minn = max(minn, height[i]);
left[i] = minn;
}
for (i = n - 1; i >= 0; i--) {
... | ALGO | 0.999995 | 6.130288 | {
"github_metadata": {
"branch": "main",
"commit_count": 77,
"repo_created_at": "2025-06-21T09:26:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "5b6b1c07e50... |
82be9fba-16ba-46a0-a9c2-c94f47cd9523 | Sabarivasan-Velayutham/7th_SEM_pdfs_SSN | Lab/Graphics_lab/ex7/cohen_line_clip.cpp |
#include <iostream>
#include <GL/glut.h>
using namespace std;
void myInit()
{
glClearColor(1, 1, 1, 0.0);
glColor3f(1.0f, 1.0f, 1.0f);
glPointSize(3);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluOrtho2D(0.0, 640.0, 0.0, 480.0);
}
// Defining region codes
const int INSIDE = 0; // 0000
c... | ALGO | 0.999858 | 5.634767 | {
"github_metadata": {
"branch": "main",
"commit_count": 4,
"repo_created_at": "2025-01-16T14:50: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": "a055e9af0a46... |
e6c583ae-6179-46a0-a504-ed3d3daf737b | mohammad-majoony/codeForces-submits | A. Alice's Adventures in Chess/main.cpp | // When i wrote this code, only me and God knew how it works. Now only God knows...
// https://codeforces.com/contest/2028/problem/A
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define MAJOONI ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
#define ONLI... | ALGO | 0.999899 | 4.995715 | {
"github_metadata": {
"branch": "master",
"commit_count": 81,
"repo_created_at": "2023-04-27T10:13:43.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "813f1e7e0... |
cd515b7f-b9f3-4022-a372-b4033121e003 | FangGet/BundleFusion_Ubuntu_Pangolin | include/FreeImage/include/CGAL/Polynomials_2_3.h | // Copyright (c) 2005-2006 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org).
// 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 y... | TOOL | 0.956985 | 6.38623 | {
"github_metadata": {
"branch": "master",
"commit_count": 7,
"repo_created_at": "2020-06-29T03:53:38.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 132,
"forks": 34,
"issues": 6,
"pull_requests": 0
},
"file_meta": {
"content_id": "95bac70... |
b911b842-b820-4f76-9b5e-44e7955e3857 | Yaroslavvvvvvvvv/lab | lab16_Tunik.cpp | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
class Phone {
private:
string lastName;
string firstName;
string middleName;
string address;
string number;
double localTalkTime;
double longDistanceTalkTime;
public:
Phone(string ln = "... | TOOL | 0.973641 | 4.062499 | {
"github_metadata": {
"branch": "main",
"commit_count": 11,
"repo_created_at": "2025-05-25T11:32:57.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "32158e148cf... |
4b3457e3-041b-4391-beca-7688736ddbf2 | johnmmounce/Java-Projects | P08/extreme_bonus/odds_evens.cpp | #include <iostream>
#include <vector>
int main()
{
int i;
std::vector<int> vect;
while (std::cin.good())
{
std::cin >> i;
vect.push_back(i);
if (std::cin.eof())
{
break;
}
}
std::cout << "\nnumber of elements: " << vect.size() - 1 << std::end... | ALGO | 0.996095 | 4.314002 | {
"github_metadata": {
"branch": "main",
"commit_count": 35,
"repo_created_at": "2023-01-17T14:42: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": "4c57c4be7a0... |
75e4d8e2-4f5d-456f-b31f-e5775c61939f | marufrazi/CPP-Programming | binary search.cpp | #include <iostream>
using namespace std;
int main()
{
int nums[10] = {101,102,103,104,105,106,107,108,109,110};
int item = 103;
int start_idx = 0;
int End_idx = 9;
int mid_idx = (start_idx+End_idx)/2;
while(item!=nums[mid_idx])
{
mid_idx = (start_idx+End_idx)/2;
if(item==... | ALGO | 0.999884 | 3.444553 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2020-09-22T13:59: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": "9c0f46b6b9... |
904faa94-da35-4690-ab18-15be78e816eb | haashirr/leetcode-questions | Add two numbers represented by linked lists - GFG/add-two-numbers-represented-by-linked-lists.cpp | //{ Driver Code Starts
// driver
#include <bits/stdc++.h>
using namespace std;
/* Linked list Node */
struct Node {
int data;
struct Node* next;
Node(int x) {
data = x;
next = NULL;
}
};
struct Node* buildList(int size)
{
int val;
cin>> val;
Node* head = new Node(val)... | ALGO | 0.999848 | 5.97014 | {
"github_metadata": {
"branch": "main",
"commit_count": 300,
"repo_created_at": "2023-09-03T04:03: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": "29ee0e522a... |
96dfc253-9c3e-466f-992b-6e13f2fcb772 | xhwhis/euler | 39.cpp | #include <iostream>
#define max_n 1000
using namespace std;
int cnt[max_n + 5] = {0};
int gcd(int a, int b) {
return b ? gcd(b, a % b) : a;
}
int main() {
for (int n = 1; n < 33; n++) {
for (int m = n + 1; m < 33; m++) {
if (gcd(m, n) - 1) continue;
int a = m * n * 2;
... | ALGO | 0.999612 | 3.918117 | {
"github_metadata": {
"branch": "master",
"commit_count": 9,
"repo_created_at": "2019-08-09T06:11: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": "036057a242... |
07d06524-171b-49dc-868a-e12e9fa29766 | AliMsayleb/problem-solving-questions | FindInSortedMatrix.cpp | // Hi, here's your problem today. This problem was recently asked by Facebook:
// Given a matrix that is organized such that the numbers will always be sorted left to right,
// and the first number of each row will always be greater than the last element of the last row (mat[i][0] > mat[i - 1][-1]),
// search for a spe... | ALGO | 0.999962 | 6.362521 | {
"github_metadata": {
"branch": "master",
"commit_count": 73,
"repo_created_at": "2020-04-14T18:35:35.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 12,
"forks": 1,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "dd598580... |
9cc9a4d8-a493-4f27-a6ea-9a48787e6622 | SaurabhMaurya9695/Leetcode-codes | 2905-find-indices-with-index-and-value-difference-ii/2905-find-indices-with-index-and-value-difference-ii.cpp | class Solution {
public:
vector<int> findIndices(vector<int>& nums, int indexDifference, int valueDifference) {
//5,1,4,1 => 5 6 10 11
//5,1,4,1 => 11 6 5 1
int n = nums.size() ;
// nums[i] - nums[j] >= valueDifference .. it should be greator / equal_to then valueDifference
/... | ALGO | 0.99999 | 5.302003 | {
"github_metadata": {
"branch": "main",
"commit_count": 2595,
"repo_created_at": "2022-02-05T12:09:33.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "3f21259df... |
dea92ed2-a5db-4f3b-94db-10f707dc2f2e | st129545a/2024-autumn | 2024.11.02-HW-5/Project5/source.cpp | #include <iostream>
#include <cstdlib>
int main(int argc, char* argv[])
{
int n;
std::cin >> n;
int* costs = (int*)malloc(n * sizeof(int));
for (int i = 0; i < n; ++i)
{
std::cin >> costs[i];
}
int totalMoney = 0;
int lastDay = -1;
while (lastDay < n - 1)
{
in... | ALGO | 0.999538 | 4.186484 | {
"github_metadata": {
"branch": "main",
"commit_count": 9,
"repo_created_at": "2024-09-20T19:01: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": "4c37301da808... |
377bab86-b66d-440d-9ad5-e84a4f54b6e2 | Joqsan/Leetcode | 501. Find Mode in Binary Search Tree - O(n) space.cp | #include <vector>
#include <unordered_map>
using namespace std;
/**
* 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) {}
... | ALGO | 0.999956 | 6.734396 | {
"github_metadata": {
"branch": "master",
"commit_count": 1,
"repo_created_at": "2021-05-13T21: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": "d53fe3d8cf... |
35227020-0f28-400b-b959-11cd52067d0d | sergTch/MealyAutomata | MealyAutomata/Automata.cpp | #include "Automata.h"
#include <set>
#include <algorithm>
#include <queue>
#include <math.h>
#include <string>
void Automata::read(std::istream& in) {
in >> alphabetSize;
cout << alphabetSize << endl;
std::string strNames;
in >> strNames;
cout << strNames << endl;
names = std::vector<std::string>();
for (in... | ALGO | 0.999499 | 4.303597 | {
"github_metadata": {
"branch": "master",
"commit_count": 2,
"repo_created_at": "2022-08-17T05:12: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": "e45fd86f97... |
96ae9907-7513-4b58-880a-238a37371ab5 | percona/percona-server-mongodb | src/mongo/executor/hedge_options_util.cpp | /**
* Copyright (C) 2020-present MongoDB, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the Server Side Public License, version 1,
* as published by MongoDB, Inc.
*
* This program is distributed in the hope that it will be useful,
* but W... | TOOL | 0.933839 | 7.613452 | {
"github_metadata": {
"branch": "master",
"commit_count": 84589,
"repo_created_at": "2015-07-22T17:25:26.000Z",
"is_fork": true,
"is_org_owned": true,
"forked_from": "Tokutek/tokumxse",
"stars": 223,
"forks": 65,
"issues": 0,
"pull_requests": 2
},
"file_meta": {
"conte... |
9584f0ae-a795-4367-a894-1958956766fb | CiaoLiang/LeetCode | intersection-of-two-linked-lists.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode(int x) : val(x), next(NULL) {}
* };
*/
class Solution {
public:
ListNode *getIntersectionNode(ListNode *headA, ListNode *headB) {
ListNode *LongList = headA;
ListNode *ShortList = headB;... | ALGO | 0.999627 | 5.297727 | {
"github_metadata": {
"branch": "master",
"commit_count": 8,
"repo_created_at": "2015-04-12T08:05:19.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6995cb0f5c... |
41d7d7a6-eb05-4525-a60f-bb9a820e45ae | ryanaaa/acm | template/string/AC-Machine.cpp | /*
* prepare:
* cti : 將字符串映射到整数
* branch 赋值
* function:
* AC::init() 初始化
* AC::insert(char str[], int len) 插入str[0..len-1]
* AC::finish() 构造AC自动机
*/
const int MAX_NODE = 100 + 5, MAX_BRANCH = 4;
struct Node {
Node *fl, *go[MAX_BRANCH];
int id, acc;
void reset(int indice) {
id = indice;
acc = 0;
memse... | ALGO | 0.999969 | 3.990652 | {
"github_metadata": {
"branch": "master",
"commit_count": 28,
"repo_created_at": "2013-11-18T19:52:34.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d1f479729... |
5bbf84e5-2ce5-4032-ae71-5099530971ca | Capzera/Cpp | BlueBridgeCompetitive/OpenJudge/BASIC/BASIC-12.cpp | /*
问题描述:
给定n个十六进制正整数,输出它们对应的八进制数。
输入格式
输入的第一行为一个正整数n (1<=n<=10)。
接下来n行,每行一个由0~9、大写字母A~F组成的字符串,表示要转换的十六进制正整数,每个十六进制数长度不超过100000。
输出格式
输出n行,每行为输入对应的八进制正整数。
【注意】
输入的十六进制数不会有前导0,比如012A。
输出的八进制数也不能有前导0。
样例输入
2
39
123ABC
样例输出
71
4435274
*/
#include<bits/stdc++.h>
using namespace std;
int main()
{
in... | ALGO | 0.99874 | 4.520101 | {
"github_metadata": {
"branch": "main",
"commit_count": 304,
"repo_created_at": "2022-02-15T11:35:08.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 2,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "6a2f010f6f... |
f8213258-b175-4f78-be65-3c51ce22bec0 | unshame/Labs | course1/DATA/Lab5-Combinatorics/Lab5-Combinatorics/Lab5Combinatorics.cpp | /*
* Находит самый длинный простой цикл в полном направленном или ненаправленном графе методом полного перебора.
*/
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <ctime>
#include <algorithm>
#include <chrono>
using namespace std;
using chrono::high_resolution_clock;
using chrono::... | ALGO | 0.998357 | 4.444084 | {
"github_metadata": {
"branch": "master",
"commit_count": 127,
"repo_created_at": "2017-09-15T23:13: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": "df6d99c2... |
35daa6a8-eace-41ff-bc9c-928c9c02f143 | kurtejung/bTagForest | MitHig/PixelTrackletAnalyzer/interface/TrackletFinder.h | #ifndef PIXELTRACKLETANA_FINDER
#define PIXELTRACKLETANA_FINDER
#include <vector>
#include "DataFormats/Math/interface/Vector3D.h"
#include "FWCore/Framework/interface/Event.h"
#include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry... | ALGO | 0.921059 | 4.431445 | {
"github_metadata": {
"branch": "master",
"commit_count": 4,
"repo_created_at": "2013-06-10T21:20: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": "3662c9f72f... |
c584368d-8950-4c25-85fe-3ef56b047125 | pkoppise/stl_algo_cpp | sorts.cpp | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void printVector(vector<int>& vec)
{
for_each(vec.begin(), vec.end(), [](int &ele){ cout << ele << " ";});
cout << endl;
}
void printVector(vector<double>& vec)
{
for_each(vec.begin(), vec.end(), [](double &ele){ cout << ele ... | ALGO | 0.999276 | 5.418178 | {
"github_metadata": {
"branch": "main",
"commit_count": 7,
"repo_created_at": "2022-02-07T07:46: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": "365e3e7b9c02... |
506f6654-2f2d-4ab6-9429-7e3fc25a68a8 | anasbinrashid/Parallel-Algorithm-for-Updating-Single-Source-Shortest-Paths-in-Large-Scale-Dynamic-Networks | Implementation/PDC Project/sequential_sssp.h | #ifndef SEQUENTIAL_SSSP_H
#define SEQUENTIAL_SSSP_H
#include "graph.h"
#include <vector>
// Sequential implementation of SSSP updating algorithm
class SequentialSSSP {
public:
// Update SSSP tree when edges change
static void updateSSSP(const Graph& g, SSSPTree& tree, const std::vector<EdgeChange>& changes);
... | ALGO | 0.999752 | 7.208428 | {
"github_metadata": {
"branch": "main",
"commit_count": 56,
"repo_created_at": "2025-04-08T16:23: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": "9e017226c00... |
3acd20bc-4bba-406e-873a-58a810567dac | Victor124263/Assignment_Two_124263 | Question_9.cpp | #include <iostream>
using namespace std;
int main() {
// Declaration of variables
int age;
char movieType;
// Input and Output
cout << "Enter your age: ";
cin >> age;
cout << "Enter the type of movie (R for regular or 3D for 3D): ";
cin >> movieType;
// Main logic operations
... | ALGO | 0.975565 | 4.538488 | {
"github_metadata": {
"branch": "main",
"commit_count": 1,
"repo_created_at": "2023-11-09T08:17: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": "f44e9a48657b... |
36eb3948-96bd-4b0a-90d8-0749e37e8d1d | FJianC/LeetCode-Cpp | 10.正则表达式匹配.cpp | /*
* @lc app=leetcode.cn id=10 lang=cpp
*
* [10] 正则表达式匹配
*/
// @lc code=start
#include <string>
#include <vector>
using namespace std;
class Solution {
public:
bool isMatch(string s, string p) {
// 1. 动态规划
/*
二维数组 dp[s.size() + 1][p.size() + 1] 记录状态
a) s == "" && p == ""... | ALGO | 0.996854 | 5.383704 | {
"github_metadata": {
"branch": "master",
"commit_count": 41,
"repo_created_at": "2019-03-22T07:55: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": "1a3716dbd... |
c99c3c5a-5f74-47b2-b19c-595b47c476c0 | adnanaziz/epicode | cpptest/first-missing-positiveTest.cc | // Copyright (c) 2016 Elements of Programming Interviews. All rights reserved.
#include "test_toolkit/test-options.h"
// @pg_ignore:1
#include "first-missing-positive.cc"
// @pg_include:first-missing-positive.cc
void UnitTest(TestSentry::Ptr& sentry, const char* description,
const vector<int>& input, int... | TEST | 0.94633 | 5.761345 | {
"github_metadata": {
"branch": "master",
"commit_count": 21,
"repo_created_at": "2016-07-17T04:02:39.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 227,
"forks": 124,
"issues": 3,
"pull_requests": 0
},
"file_meta": {
"content_id": "9a0a5... |
14892d97-8ab2-4078-bd4b-6a215db4849b | amalija-ramljak/advent-of-code-2020 | day04/day04.cpp | #include <iostream>
#include <fstream>
#include <sstream>
#include <cstring>
#include <vector>
#include <regex>
#include <map>
#define BIRTH_YEAR "byr"
#define ISSUE_YEAR "iyr"
#define EXPIRATION_YEAR "eyr"
#define HEIGHT "hgt"
#define HAIR_COLOUR "hcl"
#define EYE_COLOUR "ecl"
#define PASSPORT_ID "pid"
#define COUNTR... | ALGO | 0.971247 | 5.430556 | {
"github_metadata": {
"branch": "master",
"commit_count": 51,
"repo_created_at": "2020-11-28T17:16:11.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 1,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d7ac733b6... |
a69207cf-e7c9-4762-beb5-6e37d3526aae | magnese/laps-sem | src/gaussianintegration.h | /*
* gaussianintegration.h
*
* Created on: Oct 23, 2012
* Author: <NAME>
*/
#ifndef GAUSSIANINTEGRATION_H_
#define GAUSSIANINTEGRATION_H_
#include "legendre.h"
#include "utilities.h"
using namespace std;
class gaussian_integration {
public:
gaussian_integration(const int& order = 3)
: leg_po... | ALGO | 0.980534 | 5.574265 | {
"github_metadata": {
"branch": "master",
"commit_count": 6,
"repo_created_at": "2017-10-26T21:47: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": "d8a00d3871... |
9d0f1988-17fe-435d-baff-cf01365f0aef | Leefir/MyCodes | POI/POI2014/sal(O(n)).cpp | #include <cstdio>
#include <cstring>
#include <cassert>
#include <cstdlib>
#include <climits>
#include <cmath>
#include <ctime>
#include <iostream>
#include <algorithm>
using namespace std;
#define rep(i, a, b) for(int i = a, i##_END_ = b; i < i##_END_; ++i)
#define per(i, a, b) for(int i = (b)-1, i##_BEGIN_ = a; i >= ... | ALGO | 0.998246 | 3.478725 | {
"github_metadata": {
"branch": "master",
"commit_count": 122,
"repo_created_at": "2016-10-02T08:09: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": "d893527f... |
ffad2de4-9c1d-4042-bebf-8c6f4dacafb5 | morris821028/UVa | OnlineJudge/LeetCodeOJ/126 - Word Ladder II.cpp | #include <bits/stdc++.h>
using namespace std;
class Solution {
public:
void bfs(int st, int ed, vector<vector<int>> &g, vector<int> &dist) {
queue<int> Q;
Q.push(st), dist[st] = 1;
while (!Q.empty()) {
int u, d;
u = Q.front();
d = dist[u];
Q.pop();
if (u ... | ALGO | 0.999992 | 5.333702 | {
"github_metadata": {
"branch": "master",
"commit_count": 1197,
"repo_created_at": "2013-06-14T12:34:32.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 571,
"forks": 269,
"issues": 1,
"pull_requests": 1
},
"file_meta": {
"content_id": "4a2... |
3d58be11-1b00-473e-8df6-480eb850a233 | kojihun/algorithm | Data Structure/(자료구조) 힙.cpp | #include <iostream>
using namespace std;
class heap {
int number = 7;
int arr[7] = { 1,2,3,4,5,6,7};
int root;
int left;
int right;
public:
void swap() {
for (int i = 1; i <= number; i++) {
for (int i = 1; i <= number; i++) {
root = i;
left = root * 2;
right = root * 2 + 1;
if (left <= num... | ALGO | 0.999846 | 4.344909 | {
"github_metadata": {
"branch": "main",
"commit_count": 381,
"repo_created_at": "2020-10-10T01:43: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": "523b7dc002... |
53582f9b-c455-45cb-8056-bfce101b6316 | dmitrybezro/URM | Relax/DirichleT.h | #pragma once
#ifndef Dirichle_T
#define DirichleT_H
#include <iostream>
#include<fstream>
#include <math.h>
#include<vector>
#include "TMatrix.h"
using namespace std;
class DirichleT
{
private:
TMatrix<double> V; //Решение задачи
TVector<double> xBorder, yBorder; //Границы по оси x и y соответственно
double h, k... | ALGO | 0.994154 | 3.563098 | {
"github_metadata": {
"branch": "master",
"commit_count": 5,
"repo_created_at": "2021-03-19T20:10:30.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 0,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "c1789ec2cb... |
3c58b199-0a85-4c8a-8381-42198b46617c | luo3300612/xjcontest | dehaze.cpp | #include <filesystem>
#include <iostream>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;
const int patchSize = 5;
const double w = 0.95;
namespace fs = std::filesystem;
void guidedFilter(Mat &source, Mat &guided_image, Mat &output, int radius,
float epsilon) {
CV_Assert(r... | ALGO | 0.991941 | 4.452796 | {
"github_metadata": {
"branch": "master",
"commit_count": 53,
"repo_created_at": "2019-05-16T13:10: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": "fc1f7e126... |
69eed082-a330-407e-a08b-65c3298639f3 | axelbertrand/MathsPhys-UQAC-3D | GameEngine/main/physicslib/src/collisions/octree.cpp | #include "collisions/octree.hpp"
#include <utility>
namespace physicslib
{
const PlanePrimitive* Octree::m_rightPlane = nullptr;
const PlanePrimitive* Octree::m_leftPlane = nullptr;
const PlanePrimitive* Octree::m_topPlane = nullptr;
const PlanePrimitive* Octree::m_bottomPlane = nullptr;
Octree::Octree(const un... | ALGO | 0.982205 | 4.829159 | {
"github_metadata": {
"branch": "master",
"commit_count": 102,
"repo_created_at": "2020-04-21T22:40: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": "d5019177... |
80426a7f-0e0e-4a4e-8da1-d3e9cfcf1bf4 | rjenez/W266-final-project | data/programming-homework-dataset-plagiarism-detection/src/B2016/Z1/Z3/student5860.cpp | /*B 2016/2017, Zadaća 1, Zadatak 3
NAPOMENA: ulaz/izlaz za zadatke je specificiran
javnim autotestovima. Zalbe za ne analiziranje testova
se ne uvazavaju!
NAPOMENA: nece svi (javni) testovi sa zamgera biti
dostupni na c9.
*/
#include <iostream>
#include <vector>
#include <cmath>
std::vector<std::vector<dou... | ALGO | 0.999835 | 4.93427 | {
"github_metadata": {
"branch": "main",
"commit_count": 125,
"repo_created_at": "2022-02-09T00:45:24.000Z",
"is_fork": false,
"is_org_owned": false,
"forked_from": null,
"stars": 0,
"forks": 2,
"issues": 0,
"pull_requests": 0
},
"file_meta": {
"content_id": "d9477c18fc... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.