uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
c6ca3a95-dac8-4108-a618-b9999560539d | GustavoPolicarpo/maratona | URI/BEGINNER/2626 - JB6 Team.cpp | // Author: Gustavo Policarpo
// Name: JB6 Team
// Level: 4
// Category: BEGINNER
// URL: https://www.beecrowd.com.br/judge/en/problems/view/2626
# include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i = int(a); i < int(b) ; i++)
#define repi(i,a,b) for(int i = int(a); i > int(b) ; i--)
#define pb... | ALGO | 0.99987 | 3.777916 |
bdabbc7e-1a65-4ffa-a41a-8fe444f3fe15 | adityarajsingh11/DSA | Adi DSA/Linked list in C++/Deletion in a Singly Linked list/delete_at_start.cpp | #include<iostream>
using namespace std;
class Node{
public:
int data;
Node *next;
// constructor to initialiazed value
Node(int value){
data=value;
next = NULL;
}
};
Node* CreateLinkedlist(int arr[],int index,int size){
// Base case: if index reaches the size, return NULL... | ALGO | 0.999693 | 4.918044 |
dee2f062-78ee-4caf-8e24-bec42ffa683d | kmarkitesov/cpp-transport-catalogue | transport-catalogue/transport_router.cpp | #include "transport_router.h"
#include <limits>
#include <unordered_set>
namespace transport {
using namespace catalogue;
constexpr double METERS_IN_KM = 1000.0;
constexpr double MINUTES_IN_HOUR = 60.0;
TransportRouter::TransportRouter(const TransportCatalogue& db, RoutingSettings settings)
: db_(db), settings_... | ALGO | 0.987536 | 6.510105 |
6088fb96-0d5e-4222-b069-bf3aae6cfa83 | revyos-rocm/rocm-llvm | clang/test/SemaTemplate/instantiate-declref-ice.cpp | // RUN: %clang_cc1 -fsyntax-only -verify %s
// expected-no-diagnostics
template<int i> struct x {
static const int j = i;
x<j>* y;
};
template<int i>
const int x<i>::j;
int array0[x<2>::j];
template<typename T>
struct X0 {
static const unsigned value = sizeof(T);
};
template<typename T>
const unsigned X0<T>::... | ALGO | 0.902547 | 5.590412 |
9a637cd9-73da-4068-aaed-50b859794300 | Sookmyung-Algos/2021algos | algos_semina/2nd_seminar/seminar_2/C_2346/dlwl1213_2346.cpp | #include<iostream>
#include<vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<pair<int,int>> v; //풍선번호와 쪽지의 pair
for(int i=1;i<=N;i++){
int num;
cin >> num;
v.push_back(make_pair(i,num));
}
while(v.empty()!=true){ //vector가 비어있지 않은 동안 반복
... | ALGO | 0.999991 | 3.831343 |
b6803251-f49a-480d-896a-6ec173b970f7 | maartenb/cern-root | interpreter/llvm/src/tools/llvm-opt-report/OptReport.cpp | #include "llvm-c/Remarks.h"
#include "llvm/Demangle/Demangle.h"
#include "llvm/Remarks/RemarkParser.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorOr.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/InitLLVM.h"
#include... | TOOL | 0.963877 | 7.076512 |
2983c2aa-75f3-42e1-8aa2-21286b8d4599 | Pratikr8132/SUBMISSIONS | ass7.cpp | /*this is about DFS AND BFS .*/
#include <iostream>
#include <iomanip>
#include <queue>
using namespace std;
class dfs
{
public:
int stack[50];
int top = -1;
int array[50][50] = {
};
string name[10];
int city1, city2;
int poped;
int visited[30];
int bsf_visited[30];
int q[50];
int front, rear;
dfs()
{... | ALGO | 0.999832 | 4.586692 |
84e77af6-bdad-4e2f-a576-d26babc8f164 | sergxlove/construction_company | Source.cpp | #include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <algorithm>
using namespace std;
class Construction_company
{
public:
Construction_company();//
Construction_company(string customer, string type_work, int scope_work, int time_work, int price_work, string name);//
~Construction_co... | TOOL | 0.913326 | 3.367928 |
d5b12833-b662-4500-a491-8d8d6ed832f6 | octcarp-courses/SUSTech_CS208-Algorithm_S23_Works | Lab6/A/l6a.cpp | #include <cstdio>
#include <queue>
#include <algorithm>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
const int MAX_N = 5e4 + 10;
struct item {
int p;
int c;
int dis;
inline void set(int p_in, int c_in) {
p = p_i... | ALGO | 0.999975 | 3.660079 |
f4e26dd9-6496-4ce6-9a69-6ea7a69d0ddb | wangxiaoq/linux-code | userspace/sort/merge-sort.cpp | #include <iostream>
#include <vector>
#include <cmath>
#include <algorithm>
void merge(std::vector<int> &iv, std::vector<int> &tmp, int ls, int rs, int re)
{
int elem_num = re - ls + 1;
int le = rs - 1;
int ts = ls;
while (ls <= le && rs <= re) {
if (iv[ls] <= iv[rs]) {
tmp[ts++] =... | ALGO | 0.999594 | 5.238024 |
02dfaf4b-13a0-4c17-b52d-9d72b1a9bb85 | BennyThink/TimeM | TimeM/MLListView.cpp | // MLListView.cpp : implementation file
//
#include "stdafx.h"
#include "TimeM.h"
#include "MLListView.h"
// CMLListView
IMPLEMENT_DYNCREATE(CMLListView, CListView)
CMLListView::CMLListView()
{
m_nSortCol = 0;
m_bAscending = TRUE;
}
CMLListView::~CMLListView()
{
}
BEGIN_MESSAGE_MAP(CMLListView, CListView)
ON_W... | TOOL | 0.940917 | 5.578351 |
5dcfb72f-9963-445f-9073-50a211b43c4d | Panda268/test | LTCS/fibo.cpp | #include<iostream>
using namespace std;
int a[100] = {0, 1, 1}, b[100]{};
int fibo1(int i){//de quy
if (i == 0) return 0;
if (i == 1) return 1;
return fibo1(i-1) + fibo1(i-2);
}
int fibo2(int n){ //vong lap for
if (n <= 2) return a[n];
for (int i = 3; i <= n; i++)
a[i] = a[i-2] + a[i-1];
}
int main(... | ALGO | 0.999713 | 3.437978 |
ebb97cdf-9723-4e39-b01f-e89f00b2c3e4 | peterzheng98/gpu-memory | src/base/pytorch/aten/src/ATen/native/transformers/attention.cpp | #include <ATen/core/TensorBody.h>
#define TORCH_ASSERT_ONLY_METHOD_OPERATORS
#include <ATen/core/Tensor.h>
#include <ATen/TensorOperators.h>
#include <ATen/AccumulateType.h>
#include <ATen/Dispatch.h>
#include <ATen/OpMathType.h>
#include <ATen/native/DispatchStub.h>
#include <ATen/NestedTensorImpl.h>
#include <ATen/Te... | TOOL | 0.929525 | 4.362727 |
8ce8685a-8627-4fbd-a1c5-6f2e6db4508d | Zero-max-ai/DSA_365 | easy/q1-100/q81-90/q89.cpp | #include <iostream>
class Solution {
public:
int hammingDistance(int x, int y) {
int xor_val = x ^ y;
int changes = 0;
while (xor_val) {
if (xor_val & 1) {
changes++;
}
xor_val >>= 1;
}
return changes;
}
};
int main() {
Solution s;
std::cou... | ALGO | 0.999626 | 5.994227 |
431fcc41-777f-47f1-b0a8-38cc578ee007 | Shen-Lab/LOIS | lib/eigen_library/doc/examples/Tutorial_ArrayClass_interop.cpp | #include <Eigen/Dense>
#include <iostream>
using namespace Eigen;
using namespace std;
int main()
{
MatrixXf m(2,2);
MatrixXf n(2,2);
MatrixXf result(2,2);
m << 1,2,
3,4;
n << 5,6,
7,8;
result = (m.array() + 4).matrix() * m;
cout << "-- Combination 1: --" << endl << result << endl << e... | ALGO | 0.999718 | 4.531452 |
e1bc52b0-3e1c-4920-937f-fdff34529623 | Shubham-Choudhury/GeeksforGeeks-Problems | 2025/07 July/06 Maximum Sum Combination/main.cpp | // Link: https://www.geeksforgeeks.org/problems/maximum-sum-combination/1
#include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <algorithm>
using namespace std;
class Solution
{
public:
vector<int> topKSumPairs(vector<int> &a, vector<int> &b, int k)
{
int n = a.size();
... | ALGO | 0.999989 | 5.347863 |
9b90c4f5-d6d0-41f5-9d48-f6f84690cd2f | pjincz/qt-kso-integration | src/gui/dialogs/qfiledialog.cpp | #include <qvariant.h>
#include <private/qwidgetitemdata_p.h>
#include "qfiledialog.h"
#ifndef QT_NO_FILEDIALOG
#include "qfiledialog_p.h"
#include <qfontmetrics.h>
#include <qaction.h>
#include <qheaderview.h>
#include <qshortcut.h>
#include <qgridlayout.h>
#include <qmenu.h>
#include <qmessagebox.h>
#include <qinputd... | TOOL | 0.901052 | 4.931627 |
8237d314-48fc-4eec-b576-f502d8adb56f | Fardin2112/Basic-Codes-of-Cpp | vector/min_max.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int val,i;
long long int sum=0;
vector<int> array;
for(i=0; i<5; i++)
{
cin>>val;
sum+=val;
//cout<<sum<<" ";
array.push_back(val);
}
//cout<<endl;
sort(array.begin(), array.end());
/*for(i=0; i<5; i++)
{
co... | ALGO | 0.999652 | 3.128871 |
8fcf3e8a-7b96-4aa8-8c20-163e199661ed | GordonHaha/AlgorithmExercises | 题集/牛客/华为机试/HJ51.cpp | // https://www.nowcoder.com/practice/54404a78aec1435a81150f15f899417d
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
struct ListNode
{
int m_nKey;
ListNode *m_pNext;
ListNode(int h) : m_nKey(h), m_pNext(nullptr) {}
};
int main()
{
int n;
while (c... | ALGO | 0.999946 | 3.196857 |
c7102cf4-d6ee-4c78-be07-cce0c00256ee | kg7783/CPP | MultipleProjects/FirstSteps/src/SDL/29_circular_collision_detection.cpp | //Using SDL, SDL_image, standard IO, vectors, and strings
#include <SDL.h>
#include <SDL_image.h>
#include <stdio.h>
#include <string>
#include "helper.h"
//Screen dimension constants
const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;
//A circle stucture
struct Circle_29
{
int x, y;
int r;
};
//Texture ... | TOOL | 0.968107 | 3.332275 |
5c012e0b-b92d-4a18-906c-cc5182a5f2ac | iacopo93/fondinfo | 2011-p1-akari/akaripuzzle.cpp | #include "akaripuzzle.h"
#include <iomanip>
using namespace std;
AkariPuzzle::AkariPuzzle()
{
rows = 0;
columns = 0;
}
void AkariPuzzle::read(istream& in)
{
// *add* cleanup code here
in >> noskipws;
char c;
while (in >> c) {
if (c != '\n') { table.push_back(c); }
else if (co... | ALGO | 0.987932 | 5.098833 |
b02f2ffb-8cd2-41e9-aa82-de3496490077 | codelformat/CPP_2023_VideoEditor | ImageProcess.cpp | #include "ImageProcess.h"
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include<unordered_map>
#include <vector>
#include <omp.h>
using namespace cv;
static CascadeClassifier object;
std::vector<cv::Scalar> colors = {
cv::Scalar(0, 0, 255), // Red
cv::Scalar(0, 25... | TOOL | 0.943933 | 4.118637 |
dcf36e14-a777-4a4a-817b-34b9a3691b55 | hybridSMT/hybridSMT | source_code/src/sat/smt/pb_internalize.cpp | #include "sat/smt/pb_solver.h"
#include "ast/pb_decl_plugin.h"
#include "sat/smt/euf_solver.h"
namespace pb {
void solver::internalize(expr* e, bool redundant) {
internalize(e, false, false, redundant);
}
literal solver::internalize(expr* e, bool sign, bool root, bool redundant) {
flet<bo... | ALGO | 0.983148 | 7.197988 |
4c317060-928b-4e96-9165-aaa7be9467e2 | Ra8/CP | C++/datastructures/RMQ.cpp | // RMQ implementation.
// Preprosessing in O(nlogn)
// computes min(A[l..r]) in O(1)
#include <bits/stdc++.h>
using namespace std;
const int SIZE=100010;
const int MAX_LOG = int(log2(SIZE*2));
int A[SIZE];
int RMQ[SIZE][MAX_LOG];
void buildRMQ(){
int n = SIZE;
for(int j = 0; j < MAX_LOG; j++)
for(int i = 0; i + (... | ALGO | 0.999853 | 4.685698 |
7ae65ab9-416c-4061-b63a-45cfd5a50564 | vaishnavi-vaishnav/CPP-Practice | pair_sum_equal_to_target_element.cpp | #include <bits/stdc++.h>
using namespace std;
vector<vector<int>> PairSum(vector<int> &nums, int n, int target){
vector<vector<int>> ans;
sort(nums.begin(), nums.end());
for(int i = 0; i < n ; i++){
for(int j = i + 1; j < n; j++){
if(nums[i] + nums[j] == target){
... | ALGO | 0.999221 | 5.470081 |
c6b292c6-d51b-475d-ba8a-9bc108437f1c | gtkn/atcoder | ABC_299_C_2.cpp | //title
#include <bits/stdc++.h>
using namespace std;
//#include <atcoder/all>
//using namespace atcoder;
#define rep(i,n) for (ll i = 0; i < (n); ++i)
#define rep1(i,n) for (ll i = 1; i <= (n); ++i)
#define repr(i,n) for (ll i = (n)-1; i >= 0; --i)
#define rep1r(i,n) for (ll i = (n); i > 0; --i)
#define bit(n,k) ((n>>... | ALGO | 0.999794 | 4.066634 |
610dcabb-0570-41a3-b3e6-fa31e11ffb62 | InnovArul/codesmart | competition/practice/practicecpp/player.cpp | // https://www.codechef.com/problems/RRPLAYER
#include<bits/stdc++.h>
#include<vector>
using namespace std;
double get_harmonic_number(int N, map<int, double>& harmonic_memory) {
double harmonic_number;
// cout << " get_harmonic_number " << N << endl;
if(harmonic_memory.find(N) != harmonic_memory.end()) {... | ALGO | 0.999601 | 4.275976 |
9408e11a-99f5-470e-af24-4d42dbe048db | ksaveljev/LightOJ | 1001.cpp | #include <iostream>
using namespace std;
#define pow2(i) (1<<i)
#define bit(i) (1<<i)
#define isOdd(i) (i&1)
#define isEven(i) (!(i&1))
#define sz(i) i.size()
#define REP(i, b, n) for (int i = b; i < n; i++)
#define REPI(i, b, n) for (int i = b; i <= n; i++)
#define rep(i, n) REP(i, 0, n)
#define repi(i, n) REPI(i, 0,... | ALGO | 0.999328 | 4.345913 |
86479d8e-f24d-4c63-ba23-391d17dcebae | maria317/ADVICE | ADXL355_FFT_MQTT/ADXL355.cpp |
#include <Arduino.h>
#include <SPI.h>
#include "ADXL355.h"
#include "arduinoFFT.h"
#include "DebugUtils.h"
//FFT
/*#define SAMPLES 128 //Must be a power of 2
#define SAMPLING_FREQUENCY 1000 //Hz, must be less than 10000 due to ADC
arduinoFFT FFT = arduinoFFT();
*/
ADXL355::ADXL355(uint8_t ss) : _ss(ss)
{... | TOOL | 0.945445 | 4.052574 |
16b93a4a-f89a-4f1c-a7dd-fe62ed3c2941 | RinCloud/TrickCatcher | Datasets/TrickyBugs/GenProgs/dpp_generated_progs_cpp/p02597/p02597_num7_parsed.cpp | #include <iostream>
#include <string>
using namespace std;
int main() {
int n;
cin >> n;
string stones;
cin >> stones;
int redCount = 0; // count of red stones
int whiteCount = 0; // count of white stones
for (int i = 0; i < n; i++) {
if (stones[i] == 'R') {
re... | ALGO | 0.999544 | 4.909734 |
be44fda1-3a67-4688-a283-54e0b75497c7 | CruzPort/100-days-coding | Day 95/maximum nesting depth of the parentheses.cpp | class Solution {
public:
int maxDepth(string s) {
int ans = 0;
int opened = 0;
for (char c : s) {
if (c == '(') {
opened++;
ans = max(ans, opened);
} else if (c == ')') {
opened--;
}
}
retur... | ALGO | 0.999402 | 5.930714 |
29d2cacb-e8ab-4a2d-b117-83eb3c8ab982 | Debasish-1903/Q_P_2 | graph2/14Edge_Removals.cpp | /*Edge Removals
Time-Limit: 2 sec Score: 0.00/100
Difficulty : **
Memory: 256 MB Accepted Submissions: 100
Relevant For:
Description
You have given an undirected graph G with N nodes, indexed from 1 to N and M edges, indexed from 1 to M.
There are two types of operations:
1 X: Remove the edge numbered X.
2: Print t... | ALGO | 0.999689 | 4.685323 |
2527c50c-80af-48bc-b337-735338ebf8c5 | ustcyyw/algorithm | leetcode/medium/greedy/advantageCount.cpp | /**
* @Time : 2022/4/25-11:10 AM
* @Author : yyw@ustc
* @E-mail : <EMAIL>
* @Github : https://github.com/ustcyyw
* @desc :
*/
#include<bits/stdc++.h>
using namespace std;
class Solution {
public:
/**
* 执行用时:120 ms, 在所有 C++ 提交中击败了76.20%的用户
* 内存消耗:61.2 MB, 在所有 C++ 提交中击败了54.40%的用户
*/
vector<... | ALGO | 0.999996 | 5.454086 |
1b54ea18-378b-4fce-91a7-d81746060ae4 | cxyfer/OJ | Leetcode/cpp/hard/2045.cpp | /*
* @lc app=leetcode.cn id=2045 lang=cpp
*
* [2045] 到达目的地的第二短时间
*/
// @lcpr-template-start
#include <bits/stdc++.h>
using namespace std;
// @lcpr-template-end
// @lc code=start
class Solution {
public:
int secondMinimum(int n, vector<vector<int>>& edges, int time, int change) {
vector<vector<int>> g(n... | ALGO | 0.999982 | 6.269417 |
2d1e6f1f-c596-480e-9e60-9fa7953fd7c6 | pathammer/ktouch | nestk/deps/opencv/samples/cpp/morphology2.cpp | #define CV_NO_BACKWARD_COMPATIBILITY
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <stdlib.h>
#include <stdio.h>
using namespace cv;
void help()
{
printf("\nShow off image morphology: erosion, dialation, open and close\n"
"Call:\n morphology2 [image]\n"
"This program als... | TOOL | 0.865774 | 5.055081 |
2717a5fc-fc84-4907-a7c8-49b33472fe4b | ajyxwDean/OI | Luogu_P_1060.cpp | //[NOIP2006 普及组] 开心的金明
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 40;
int n, m;
int dp[MAXN][MAXN];
int w[MAXN], c[MAXN];
int main() {
cin >> m >> n;
for(int i = 1; i <= n; i++) {
cin >> c[i] >> w[i];
c[i] *= w[i];
}
for(int i = 1; i <= n; i++) {
for(int j = 1... | ALGO | 0.999996 | 3.5405 |
d4becfb9-efd5-4c46-8cdf-1531393f1471 | Khushbupatel05/cpp-exams | c++- exam3/table.cpp | #include<iostream>
using namespace std ;
int main(){
int n, i ;
cout <<" enter number" ;
cin >> n ;
for ( i = 1 ;i <= n ; i ++){
cout << n << "*" << i << ":" << n * i << endl ;
i++ ;
}
} | ALGO | 0.994687 | 3.442533 |
94620ea4-3768-4429-9ec6-d1b1028017f4 | firoorg/firo | src/crypto/progpow/lib/ethash/progpow.cpp | #include <crypto/progpow/include/ethash/progpow.hpp>
#include <crypto/progpow/lib/ethash/bit_manipulation.h>
#include <crypto/progpow/lib/ethash/endianness.hpp>
#include <crypto/progpow/lib/ethash/ethash-internal.hpp>
#include <crypto/progpow/lib/ethash/kiss99.hpp>
#include <crypto/progpow/include/ethash/keccak.hpp>
... | ALGO | 0.999332 | 7.241291 |
84eddff9-f96a-4f18-b740-b4e2215c20c0 | lxcug/Games202Task | hw2/prt/ext/eigen/unsupported/doc/examples/MatrixSine.cpp | #include <unsupported/Eigen/MatrixFunctions>
#include <iostream>
using namespace Eigen;
int main()
{
MatrixXd A = MatrixXd::Random(3,3);
std::cout << "A = \n" << A << "\n\n";
MatrixXd sinA = A.sin();
std::cout << "sin(A) = \n" << sinA << "\n\n";
MatrixXd cosA = A.cos();
std::cout << "cos(A) = \n" << cos... | ALGO | 0.982654 | 5.878768 |
c9a02a15-49d3-401b-b849-2f4fc6404546 | zheng-fan/ACM-ICPC-Template | 模板/8_图论/6_kruskal.cpp | typedef int mytype;
const int NV=105;
const int NE=10005;
struct edge
{
int u,v;
mytype l;
bool operator<(const edge e) const
{
return l<e.l;
}
} E[NE];
int f[NV],rk[NV];
int finds(int x)
{
return f[x]==x?x:f[x]=finds(f[x]);
}
void uni(int a,int b)
{
a=finds(a);
b=finds(b);
i... | ALGO | 0.999931 | 3.973964 |
c0474ce4-8d1b-4c09-9168-dddfa3cbea4d | raman934/data-structures | strings/cpp/basic-calculator-2.cpp | /* Implement a basic calculator to evaluate a simple expression string. The
expression string contains only non-negative integers, +, -, *, / operators
and empty spaces . The integer division should truncate toward zero.
Example 1:
Input: "3+2*2"
Output: 7
Example 2:
Input: " 3/2 "
Outp... | ALGO | 0.999885 | 6.170838 |
c76ec27f-e264-47fe-b9c1-e0741e508681 | karin0/problems | conts/team/buaast19/10/untitled.cpp | #include<bits/stdc++.h>
#define N 10101
#define db double
#define re(x,n) memset(x,0,sizeof(x[0])*n)
using namespace std;
db A,B,C,L,R,D;//二次函数
db f[N],b[N];//一次函数
db xx[N],y[N];
db l[N];
int main(){
int T;
cin>>T;
while(T--)
{
int n;
cin>>n;
int i;
for(i... | ALGO | 0.999658 | 3.234789 |
6fcbc0c2-60a9-4c49-9eea-0c70ceac7237 | saturnman/box2dipaddemo | Box2D/Dynamics/Joints/b2RopeJoint.cpp | #include <Box2D/Dynamics/Joints/b2RopeJoint.h>
#include <Box2D/Dynamics/b2Body.h>
#include <Box2D/Dynamics/b2TimeStep.h>
// Limit:
// C = norm(pB - pA) - L
// u = (pB - pA) / norm(pB - pA)
// Cdot = dot(u, vB + cross(wB, rB) - vA - cross(wA, rA))
// J = [-u -cross(rA, u) u cross(rB, u)]
// K = J * invM * JT
// = inv... | ALGO | 0.982693 | 7.506215 |
ca957f5c-a4dc-4bca-bf12-f5a69698a8b5 | GuoleiSun/MCIS_wsss | segmentation/src/caffe/layers/concat_layer.cpp | #include <vector>
#include "caffe/layers/concat_layer.hpp"
#include "caffe/util/math_functions.hpp"
namespace caffe {
template <typename Dtype>
void ConcatLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
const ConcatParameter& concat_param = this->layer_param_.c... | ALGO | 0.887385 | 7.619251 |
15db06a7-72c7-4bfc-8447-fc89b89d4283 | tronghao/HKIII | Cau Truc Du Lieu Va Giai Thuat 1/Mang_Ki_Tu.cpp | #include "stdio.h"
#include "string.h"
#include "windows.h"
void Sort(char a[]);
void swap(char &a, char &b);
int main()
{
system("color F1");
char a[50];
printf("Nhap chuoi: ");
fflush(stdin);
gets(a);
Sort(a);
printf("Chuoi da sap xep: %s", a);
return 0;
}
void Sort(char a[])
{
int len = strlen(a);
f... | ALGO | 0.998847 | 3.572864 |
1fa050bc-4dc7-42a4-a4b0-d2370e0ae063 | Next-Gen-UI/Hacktober | Leetcode/0889. Construct Binary Tree from Preorder and Postorder Traversal/0889.cpp | class Solution {
public:
TreeNode* constructFromPrePost(vector<int>& pre, vector<int>& post) {
unordered_map<int, int> postToIndex;
for (int i = 0; i < post.size(); ++i)
postToIndex[post[i]] = i;
return build(pre, 0, pre.size() - 1, post, 0, post.size() - 1, postToIndex);
}
private:
TreeNod... | ALGO | 0.999882 | 6.540106 |
2f51a62f-45dd-496f-ac62-b03685f00699 | sonapraneeth-a/competitive-programming_submissions | platforms/leetcode/practice/non-premium/hard/913__cat-and-mouse/solutions.cpp | // clang-format off
/**
* FILE DESCRIPTION
*
* Filename: 913__cat-and-mouse/solutions.cpp
* Created on: 05 September 2021
* Last modified: 05 September 2021
* Author: sonapraneeth_a
* Description: LeetCode submission for 'Cat and Mouse' problem
*/
/**
* CHANGELOG
*
* Date (DD-MM-... | ALGO | 0.999863 | 5.675647 |
a51eeca5-0bd0-48d6-b28b-a75200a47cb6 | dhruvlife/musico | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998733 | 6.76775 |
e5bf7e29-2d80-4c14-9449-9123f82faf9b | ranamihir/CPP-Programs | zero3.cpp | #include <iostream>
#include <cmath>
using namespace std;
int zero(int x)
{
int a;
int s=0;
int k=1;
do {
a = x%10;
x = x/10;
if(a!=0)
{
s+=k*a;
k*=10;
}
else
{
s+=k;
k*=10;
}
} while (x != 0);
return s;
}
int main()
{
int n=0;
cout << "Enter the number: " << endl;
cin >> n;
... | ALGO | 0.999885 | 4.322946 |
df38ef99-8da2-41b9-a5cd-be7c6ed65691 | whadam/BOJ | CPP/1978/Source.cpp | #include <iostream>
using namespace std;
bool IsPrime(int n)
{
if (n < 2)
return false;
for (int i = 2; i * i <= n; i++)
{
if (n % i == 0)
return false;
}
return true;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n, p, cnt(0);
cin >> n;
for (int i = 0; i < n; i++)
{
cin >>... | ALGO | 0.999874 | 4.16151 |
c7671112-eedf-4393-adbe-bf5362d78d15 | rangga-prangwedana/data-structure-algo-collection | tlx-toki/dasar/bab-11/bahasa-dengklek.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
string s;
cin >> s;
for (int i = 0; i < s.length(); i++)
{
s[i] = isupper(s[i]) ? tolower(s[i]) : toupper(s[i]);
}
cout << s << "\n";
return 0;
}
| ALGO | 0.997811 | 5.45378 |
95c0d67a-020b-4f03-87bd-7af2889f068a | M-Awwab-Khan/Competitive-Programming | A_Zhan_s_Blender.cpp | #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;
#define ff first
#define ss second
#define ll long long
#define ld long double
#define pii pair<int, int>
#define pll pair<long long, long long>
#define vi vector<int... | ALGO | 0.999463 | 4.122474 |
d0c80236-bb2e-448b-b510-c4b89e08e251 | SCOREC/nektar | library/SolverUtils/Filters/FilterThresholdMax.cpp | #include <SolverUtils/Filters/FilterThresholdMax.h>
namespace Nektar
{
namespace SolverUtils
{
std::string FilterThresholdMax::className = GetFilterFactory().RegisterCreatorFunction("ThresholdMax", FilterThresholdMax::create);
FilterThresholdMax::FilterThresholdMax(
const LibUtilit... | TOOL | 0.979395 | 6.133242 |
656ae281-6737-4f6c-a4ed-6e15e7e32948 | ishandutta2007/codeforces | jjleo/normal/1569/A.cpp | #include <bits/stdc++.h>
#define maxn 100086
using namespace std;
int t, n;
char s[maxn];
int main(){
scanf("%d", &t);
while(t--){
scanf("%d%s", &n, s + 1);
int l = -1, r = -1;
for(int i = 1;i <= n;i++){
for(int j = i;j <= n;j++){
int sum = 0;
for(int k = i;k <= j;k++){
if(s[k] == 'a') sum++;... | ALGO | 0.99879 | 3.334321 |
4340f149-ae5c-48d3-a949-c11854732170 | timtingwei/cppd | Primer/6.Functions/pointes_to_functions.cpp | #include <iostream>
bool compareInt(const int& i1, const int& i2) {
return i1 < i2 ? true : false; // i1 < i2, 返回true
}
bool otherCompare(const int& i1, const int&) {return 0;}
// 声明: 指针替换函数名
bool (*pf)(const int&, const int&);
// 定义另外几个函数
int getLarger(const int& i1, const int& i2) {
return i1 < i2 ? i2: ... | TOOL | 0.995582 | 3.656048 |
621b60a8-4466-494d-9b0c-9f68f26973c7 | SamuelZoladz/Easy_rider | src/main.cpp | #include <algorithm>
#include <iostream>
#include <memory>
#include <random>
#include <vector>
#include "Easy_rider/Graph.h"
#include "Easy_rider/Intersection.h"
#include "Easy_rider/Road.h"
#include "Easy_rider/HighwayGenerator.h"
#include "Easy_rider/MotorwayGenerator.h"
#include "Easy_rider/StreetGenerator.h"
#in... | ALGO | 0.993833 | 5.762316 |
2d452ee7-c689-481b-8e2d-a66e80d0a826 | tte0/CP | 1145A.cpp | #pragma GCC optimize("O3,fast-math")
#include <bits/stdc++.h>
#define int ll
#define ff first
#define ss second
#define endl '\n'
#define spc ' '
#define pb push_back
#define N (200005)
#define MOD (int(1e9)+7)
#define MOD2 (998244353)
#define MODL (int(1e9)+21)
#define INF (int(4e18))
#define e2(x) (1LL<<(x))
#define ... | ALGO | 0.999872 | 4.856943 |
bc6efdf7-e14c-40b1-97d6-ae5650177d51 | HabanaAI/Intel_Gaudi3_Software | synapse/src/graph_compiler/brain/slicer/legacy_mme_key_node_solver.cpp | #include "legacy_mme_key_node_solver.h"
#include "slicing_brain.h"
using namespace gc::layered_brain;
BundleSolutionConstraints
LegacyMMEKeyNodeSolver::prepareMmeBrainRequest(const BundleViewContainerPtr& bundleViews) const
{
BundleSolutionConstraints constraints {};
// Temp implementation - give the node so... | ALGO | 0.993711 | 6.460581 |
5fe8341f-2f44-4c9b-af46-ba85cd526343 | VanillaNexusSource/android_frameworks_native | cmds/installd/installd.cpp | #include <fcntl.h>
#include <selinux/android.h>
#include <selinux/avc.h>
#include <sys/capability.h>
#include <sys/fsuid.h>
#include <sys/prctl.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <android-base/logging.h>
#include <cutils/fs.h>
#include <cutils/log.h> // TODO: Move everything to bas... | TOOL | 0.934269 | 5.908237 |
cda6dc82-2009-4d0d-ac0d-99a925613ddd | darwin/boost | libs/graph/example/bucket_sorter.cpp | #include <stdlib.h>
#include <boost/pending/bucket_sorter.hpp>
template <class Integral>
struct trivial_id {
std::size_t operator[](Integral i) {
return i;
}
std::size_t operator[](Integral i) const {
return i;
}
};
int main() {
using namespace std;
using boost::bucket_sorter;
const std::size... | ALGO | 0.998546 | 5.022339 |
1b11a133-4a5c-4b6a-bf79-bfc573b186c6 | kadessovb02/kadessovb02_cpp_files_contester | problem320.cpp | #include <iostream>
#include <cmath>
#include <math.h>
using namespace std;
int main() {
double x, a, res, sum;
int n;
cin >> x >> a >> n ;
for (int i = 1; i <= n; i++)
{
x = pow(x+a, 2);
}
cout<<(x+a);
}
| ALGO | 0.998702 | 3.341178 |
407e1e25-ab03-4143-ad39-d8c46da6233b | Madhesh005/Simple_TODO | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998733 | 6.76775 |
10998ad4-1cac-43f1-a63c-80ffec103672 | zliu63/ECE438MP3 | distvec.cpp | #include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include <fstream>
#include <sstream>
#include "Graph.h"
#include "Solver.h"
using namespace std;
int main(int argc, char** argv) {
//printf("Number of arguments: %d", argc);
if (argc != 4) {
printf("Usage: ./distvec topofile messagefile changesfi... | ALGO | 0.993438 | 3.875395 |
e57bb7c5-e35a-44aa-8da1-c13e2456ed67 | Deriverx2/Data_structures_cusat | Lab_cycle_03/Que03.cpp | #include <iostream>
using std::cout, std::cin, std::endl;
class node
{
public:
int data;
node*prev = NULL;
node *next = NULL;
node()
{
this->data = 0;
}
node(int data)
{
this->data = data;
}
};
class doublyLinkedList
{
int N;
node *head;
node *tail;
pu... | ALGO | 0.997731 | 4.971699 |
9b3c8c04-6f5e-4bcc-8fc9-427dcd9dca93 | baileymiller/differential_wos | zombie/deps/fcpw/deps/eigen-git-mirror/doc/examples/Tutorial_ReductionsVisitorsBroadcasting_reductions_norm.cpp | #include <Eigen/Dense>
#include <iostream>
using namespace std;
using namespace Eigen;
int main()
{
VectorXf v(2);
MatrixXf m(2,2), n(2,2);
v << -1,
2;
m << 1,-2,
-3,4;
cout << "v.squaredNorm() = " << v.squaredNorm() << endl;
cout << "v.norm() = " << v.norm() << endl;
cout << "v.lpN... | ALGO | 0.99786 | 4.03798 |
e36ed5fe-9e1c-468d-8897-810adefffac4 | shelby57/ITMO | Discrete Mathematics/combinatorics/5.cpp | #include<bits/stdc++.h>
using namespace std;
main() {
int n, k;
cin >> n >> k;
for(int b = 0; b < k; ++b) {
vector <int> a;
for(int i = 0; i < n; i++)
a.push_back(i);
if(b > 0) {
a[0] = b - 1;
for(int i = 0; i < n - 1; ++i) {
for(int j = 0; j < n; ++j)
cout << a[j];
swap(a[i], a[i + 1]);
... | ALGO | 0.99997 | 3.271653 |
9580828d-da8d-4674-9197-eb4408e414e0 | shakib071/Solved-Problem | A_Soldier_and_Bananas.cpp | #include<bits/stdc++.h>
#define ll long long int
#define forn(n) for(int i=0;i<n;i++)
using namespace std;
int main(){
ios::sync_with_stdio(0);cin.tie(0);
ll k,n,w;
cin>>k>>n>>w;
ll cost=(k*w*(w+1))/2;
if(cost>n){
ll borrow=cost-n;
cout<<borrow<<endl;
}
else{
cout<<0<<endl;
... | ALGO | 0.999918 | 3.562547 |
20a14567-c08a-4cc6-88d8-127aafd37e36 | krishnamanc/daa | mcmbottomup.cpp | #include <iostream>
using namespace std;
void print(int s[][20], int i, int j)
{
if (i == j)
cout << "A" << i;
else
{
cout << "(";
print(s, i, s[i][j]);
print(s, s[i][j] + 1, j);
cout << ")";
}
}
void mcm(int p[], int n, int &count)
{
int m[n + 1][n + 1];
... | ALGO | 0.999716 | 3.711609 |
763cf353-e5a8-4633-809a-634ed6cfd11e | hockyy/cpc-compfest-13 | jcpc-preliminary/compfest-13-jcpc-penyisihan-perpotongan/spec.cpp | #include <bits/stdc++.h>
#include <tcframe/spec.hpp>
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define rep(i, a, b) for(int i = a; i < (b); ++i)
#define all(x) x.begin(), x.end()
#define sz(x) (int)(x).size()
#define EPS numeric_limits<long long>::epsilon()
//#define EPS numeric_limi... | ALGO | 0.999825 | 3.722427 |
52243bd4-8205-4cf2-a8c4-9b18c7ebbabb | niharika2k00/Compititive_Programming_and_LeetCode-problem-solutions | Sliding_Window + Prefix_Sum/Max_Element_in_Subarray_sizeK_IMPORTANT.cpp | /*
________________________________________
----------------------------------------
Author : Niharika Dutta
Code Link : https://www.geeksforgeeks.org/sliding-window-maximum-maximum-of-all-subarrays-of-size-k/
Time Complexity : O(n).
Auxiliary Space: O(k). -- for the queue
____________________________... | ALGO | 0.999872 | 4.194751 |
489c8e56-f2fc-4346-853b-8a898248194b | Dee01code/Dee01Leetcode | 1512-number-of-good-pairs/1512-number-of-good-pairs.cpp | class Solution {
public:
int numIdenticalPairs(vector<int>& nums) {
int n = nums.size();
int cnt = 0;
for(int i = 0; i<n; i++)
for(int j = i+1; j<n; j++)
cnt += (nums[i] == nums[j]) ? 1 : 0;
return cnt;
}
}; | ALGO | 0.999968 | 5.933871 |
08c75f70-7271-4854-89af-77b6ca838f8b | dolapobabs/quicktasks | windows/runner/utils.cpp | #include "utils.h"
#include <flutter_windows.h>
#include <io.h>
#include <stdio.h>
#include <windows.h>
#include <iostream>
void CreateAndAttachConsole() {
if (::AllocConsole()) {
FILE *unused;
if (freopen_s(&unused, "CONOUT$", "w", stdout)) {
_dup2(_fileno(stdout), 1);
}
if (freopen_s(&unuse... | TOOL | 0.998733 | 6.76775 |
2ef08259-3e51-4f05-a017-0688fede065d | VikiIvanova/C_plus_plus- | SDP/exercises/Tasks Graph/wordContainInGraph.cpp | /*
Даден е ориентиран граф от уникални символи g.
Да се напише функция, която приема графа и дума с произволна дължина
и проверява дали думата може да се получи чрез конкатенирането на последователни различни върхове в графа.
*/
#include <iostream>
#include <string>
#include <map>
#include <vector>
bool canRead(con... | ALGO | 0.999909 | 5.828321 |
50b369eb-e6e0-4904-b5ef-349c665d2109 | cvoi8611/alg_study1 | week_6/N-Queen_9663.cpp | #include <iostream>
using namespace std;
int col[16];
int N, total = 0;
bool check(int level)
{
for(int i = 0; i < level; i++)
if(col[i] == col[level] || abs(col[level] - col[i]) == level - i)// 대각선이거나 같은 라인
return false;
//col[i] : X좌표, i : Y좌표 이며, col[i]와 i 간의 차이가 일정하다면 대각선이거나 같은 라인임... | ALGO | 0.999801 | 4.708087 |
56844c09-423e-455d-9663-cf7a4749d1f9 | architkl/The-Box | codeforces/1077C.cpp | /*
Author: architkl
Language: C++ 11
*/
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <unordered_map>
#include <queue>
#include <set>
#include <climits>
#include <string>
#include <math.h>
#include <fstream>
using namespace std;
#define pb push_back
#define mp make_pair
typedef ... | ALGO | 0.999942 | 3.568547 |
768e66ea-6556-41d7-b1e1-8c3bffc72b48 | Prakashdeveloper03/GeeksforGeeks-Problem-Solutions | Basic/Cyclically rotate an array by one/rotate.cpp | #include <bits/stdc++.h>
using namespace std;
void rotate(int arr[], int n);
int main() {
int t;
scanf("%d", &t);
while (t--) {
int n;
scanf("%d", &n);
int a[n], i;
for (i = 0; i < n; i++) scanf("%d", &a[i]);
rotate(a, n);
for (i = 0; i < n; i++) printf("%d ", a[i]);
printf("\n");
}
... | ALGO | 0.999924 | 3.787892 |
d12d9b33-5f3d-4ad6-93bc-30ff791a4a1c | moonjinhwan/Algorithm-Code-Up | back_Joon/simulation/2960 에라토스테네스의 체.cpp | #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
int cnt = 0;
vector<bool> arr(n + 1, false);
for (int i = 2; i <=n; i++) {
for (int j = i; j <=n; j += i) {
if (!arr[j]) {
arr[j] = true;
cnt++;
}
if (cnt == k) {
cout << j << e... | ALGO | 0.999979 | 3.866758 |
193d0cf8-9d7a-4a25-b0b9-ffb514b9473e | thebird-/ts-stream-server-client | boost_1_61_0/libs/graph/example/print-edges.cpp | using namespace boost;
template < typename Graph, typename VertexNamePropertyMap > void
read_graph_file(std::istream & graph_in, std::istream & name_in,
Graph & g, VertexNamePropertyMap name_map)
{
typedef typename graph_traits < Graph >::vertices_size_type size_type;
size_type n_vertices;
typena... | ALGO | 0.988896 | 5.660892 |
b10195cd-86d3-4cfa-9f0d-1ed600a08b02 | dhyanesh/randomdev | topcoder/algorithm/BalanceScale.cpp | // BEGIN CUT HERE
// PROBLEM STATEMENT
// You are given a vector <int> weight, a set of weight
// values. You must choose the minimum number of weight
// values from the set such that every element in weight is
// measurable on a balance scale with the chosen weight
// values. Weight X is measurable with a set Y of... | ALGO | 0.9999 | 4.560199 |
d536f796-fb62-4ec9-96c5-a0bcf643a375 | april211/Data_Structure_Learning | PTA202009/作业/图/7-2_畅通工程之最低成本建设问题.cpp | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
// 使用 Kruskal 算法
#define inf 0x3f3f3f3f
using namespace std;
// 图的通用边类型(对无向图、有向图)
typedef struct Edge
{
int weight; // 边的权重
int tail; // 边的尾部
int head; // 边... | ALGO | 0.999947 | 4.09242 |
102a4038-1fd5-4cf4-8bc8-7d6c40302eeb | TriumphHu/XDOJ | XDU数据结构题/xdoj系列/xdoj321.cpp | #include<iostream>
#include<string>
using namespace std;
struct SubWay
{
int data;
int parent;
int weight;
}subwayPic[1005];
int findParent(int i);
void mergeSubway(int v1, int v2);
int main()
{
int n, m;
cin >> n >> m;
int v1, v2;
for (int i = 1; i <= n; i++)
{
subwayPic[i].data = i;
subwayPic[i].parent = ... | ALGO | 0.999822 | 3.885924 |
45066a63-785f-4302-a073-39bbfb772e55 | Purav001/Leet-code | 2035-count-sub-islands/count-sub-islands.cpp | class Solution {
public:
vector<pair<int,int>> dir={{1,0},{-1,0},{0,1},{0,-1}};
void dfs(vector<vector<int>>& grid2,int i,int j){
grid2[i][j]=0;
for(auto [dx,dy]:dir){
int nx=i+dx,ny=j+dy;
if(nx>=0 && ny>=0 && nx<grid2.size() && ny<grid2[0].size() && grid2[nx][ny]==1 ) df... | ALGO | 0.999971 | 6.277844 |
d104b6f4-8dbf-4fdf-9cc4-2c3387b3e39d | KouKou361/NewProject | Source/Mathf.cpp | #include "Mathf.h"
#include <stdlib.h>
#include <time.h>
//`⊮
float Mathf::Lerp(float a, float b, float t)
{
return a * (1.0f - t) + (b * t);
}
float Mathf::RandomRange(float min, float max)
{
//Ȃ烊^[
if (min - max == 0)return min;
const float num = 1000;//点鐔
float Max = max * num;
float Min = min * num;
int ... | TOOL | 0.950134 | 3.425827 |
49ec0e8a-8750-4848-bed1-47b6391d3946 | Mrugalla/Template2023 | Source/audio/dsp/Smooth.cpp | #include "Smooth.h"
namespace dsp
{
namespace smooth
{
// Block
Block::Block(float startVal) :
curVal(startVal)
{
}
void Block::operator()(float* buffer, float dest, int numSamples) noexcept
{
const auto dist = dest - curVal;
const auto inc = dist / static_cast<float>(numSamples);
for (auto... | TOOL | 0.956453 | 5.548285 |
15fbd2b1-c041-4e67-874a-27456a279bd5 | ketpadilla/cpe104l | codechum/lesson1/01-activities/04-ifElse-2.cpp | #include <iostream>
using namespace std;
char vowels[5] = {'a', 'e', 'i', 'o', 'u'};
int main() {
char character;
bool vowel = false;
cout << "Enter a character: ";
cin >> character;
if (isalpha(character)) {
for (int i = 0; i < 5; i++) {
if (tolower(character) == vo... | ALGO | 0.997602 | 5.699392 |
f8e3cc55-7922-4261-b188-a5096d57b068 | devmourya44/DSA-Practice | Easy/Given a linked list of 0s, 1s and 2s, sort it./given-a-linked-list-of-0s-1s-and-2s-sort-it..cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
/* Link list Node */
struct Node {
int data;
struct Node *next;
Node(int x) {
data = x;
next = NULL;
}
};
struct Node *start = NULL;
// } Driver Code Ends
/*
Node is defined as
struct Node {
int data;
s... | ALGO | 0.999902 | 5.696063 |
31c86a20-6a56-4f17-b0b6-e962de4094fe | JustJie2002/Leetcode | Contest/W379/D.cpp | /********************************************
* author : Jie Chen (3rd Year CS)
* school : Rochester Institute of Technology
* created: 01.06.2024 22:01:53
*********************************************/
using i64 = long long;
#define popcount(mask) __builtin_popcount(mask)
// credit: tourist
template <typename ... | ALGO | 0.999989 | 5.827643 |
9d244713-e65e-4676-bdc9-192170ba5ae8 | DATx-Protocol/DATx | datxchain/libraries/fc/src/crypto/city.cpp | //#include "config.h"
//#include <city.h>
#include <algorithm>
#include <string.h> // for memcpy and memset
#include <fc/crypto/city.hpp>
#include <fc/uint128.hpp>
#include <fc/array.hpp>
#if defined(__SSE4_2__) && defined(__x86_64__)
#include <nmmintrin.h>
#else
uint64_t _mm_crc32_u64(uint64_t a, uint64_t b );
#end... | ALGO | 0.99876 | 6.377211 |
d61ed0b5-f76d-4302-8ec9-d2bac831d180 | kim2001sh/codetree | 250108/최대로 겹치는 지점/maximum-overlapped-points.cpp | #include <iostream>
using namespace std;
int main() {
// Please write your code here.
int n, x1, x2, arr[100] = {};
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x1 >> x2;
for (int j = x1 - 1; j <= x2 - 1; j++) {
arr[j] += 1;
}
}
int max = arr[0];
... | ALGO | 0.999696 | 4.153974 |
744c2d3d-c5be-4eb1-ad4c-4418a0f3219d | Akshaysd592/DSA-problems | operator/reverse.cpp | #include <iostream>
#include <math.h>
using namespace std;
int main(){
// int n ;
// cin>>n;
// int value=0;
// while(n!=0){
// int result=n&1;
// value= (value*10)+result;
// n=n>>1;
// }
// cout<<"The same order of the number is "<<value<<endl;
int n;
cin... | ALGO | 0.999924 | 4.477693 |
349c3f15-d5e4-4903-9e23-74f1e246655b | kuaidy/QScreenShot | source/common/gaussianblur.cpp | #include "../../include/common/gaussianblur.h"
GaussianBlur::GaussianBlur()
{
}
//优化的高斯模糊算法,一维做两次计算
QImage GaussianBlur::ApplyGaussianBlur(const QImage &source,int radius){
//典型高斯核
//int kernel[5]={1,4,6,4,1};
//计算指定半径上的权重分布
const double sqrt2pi=sqrt(2.0*M_PI);
double sigma=radius/3.0;
double ... | ALGO | 0.99779 | 4.708132 |
1c212b22-2cea-4fa4-8379-014f0d9e4e4e | ISOLDE-Project/riscv-llvm | llvm/tools/llvm-cxxfilt/llvm-cxxfilt.cpp | #include "llvm/ADT/StringExtras.h"
#include "llvm/Demangle/Demangle.h"
#include "llvm/Demangle/StringViewExtras.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
#include "llvm/Option/Option.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/LLVMDriver.h"
#include "llvm/Support/WithColor.h"
... | TOOL | 0.976508 | 7.232246 |
06276ede-ac2e-42a7-8eca-df776414e34a | namhai0510/C-- | C--/hnoi1314v1pt1.cpp | #include <bits/stdc++.h>
using namespace std;
#define nothing ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define endl "\n"
#define ll long long
#define ull unsigned long long
#define fi first
#define se second
#define pb push_back
const ll oo = 1e13;
const ll mod = 1e9 + 7;
const int maxn = 1e6;... | ALGO | 0.999943 | 4.211016 |
e2dba876-346c-484c-90a0-0f73d99e6017 | NikhilCyberk/my_program | DSA_gfg/array_problem/max_1.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n, c_one = 0, m_count = 0;
cin >> n;
while (n > 0)
{
cout << "\n n%2 : " << n % 2;
if (n % 2 == 1)
{
cout << "\n c_one :" << ++c_one;
if (c_one > m_count)
{
m_count... | ALGO | 0.99988 | 4.712344 |
f22f92c4-6e3c-4229-bd1f-ff550171308d | joemou/CCU_Programing | CPE/e564_00540_Team_Queue.cpp | #include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
using namespace std;
int main(){
int n,Case;
while(cin>>n){
queue<int> team[10001], q;
int mates,num;
int id[1000000];
if(n==0)
break;
Case++;
cout << "Scenario #" << Case... | ALGO | 0.99964 | 3.848828 |
5cf24b90-75bc-40f7-9082-bbef83383661 | dianaherrero/Ant-Attack | src/Interaccion.cpp | #include "Interaccion.h"
#include "ETSIDI.h"
void Interaccion::movimiento_hormiga(Tablero &tab, Hormiga &hor) {
Vector d_ant=hor.direccion;
if (!tab.tabla[hor.columna][hor.fila].blanca) {
hor.direccion.x = (-1)*d_ant.y;
hor.direccion.y = d_ant.x;
tab.tabla[hor.columna][hor.fila].blanca = true;
}
else {... | ALGO | 0.92707 | 4.886965 |
8d488670-48ff-43c3-a1bb-5caebc709dcd | iNiKe/boost | libs/numeric/ublas/doc/samples/matrix_binary.cpp | #include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/io.hpp>
int main () {
using namespace boost::numeric::ublas;
matrix<double> m1 (3, 3), m2 (3, 3);
for (unsigned i = 0; i < (std::min) (m1.size1 (), m2.size1 ()); ++ i)
for (unsigned j = 0; j < (std::min) (m1.size2 (), m2.size2 ... | ALGO | 0.995289 | 4.04005 |
362f1775-214a-4eec-95fe-d552e2526998 | mmtzr/Cpp_projects | rpslspok/rock_paper_spock.cpp | #include <iostream>
int choice_str_to_int(std::string choice){
if (choice == "rock"){
return 0;
}
else if (choice == "paper"){
return 1;}
else if (choice == "scissors"){
return 2;}
else if (choice == "lizard"){
return 3;}
else if (choice == "Spock"){
retu... | TOOL | 0.973148 | 5.201211 |
16622a89-6a3e-4baa-92b3-3c7d6c93166f | alamgir65/Daily-Problem-Solving | B_AND_Sorting.cpp | #include<bits/stdc++.h>
#define ll long long
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define cyes cout<<"Yes"<<endl;
#define cno cout<<"No"<<endl;
#define print(flag) (flag)? cout<<"YES\n" : cout<<"NO\n";
#define all(x) x.begin(), x.end()
#define nl cout<<endl;
#define endl '\n'
#define love int mai... | ALGO | 0.999703 | 4.994379 |
72893cb9-6eeb-4aa9-bd43-df786acef1c3 | nikesh33/DSA | Week 17 DP Level 1/Dynamic Programming Class 2/02_coinChange.cpp | #include <iostream>
#include <vector>
using namespace std;
class Solution
{
public:
int solveUsingRecursion(vector<int> &coins, int amount)
{
// Base Case
if (amount == 0)
{
return 0;
}
// Recursive Relation
int mini = INT_MAX;
for (int i = 0... | ALGO | 0.999994 | 6.511167 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.