uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
0ad36685-37c9-4edf-88d9-2922d0f3317f | jayant729/Arrays | Non- Repeating Elements in an array.cpp | #include<bits/stdc++.h>
using namespace std;
int main()
{
int arr[]={10,30,40,20,10,20,50,10};
int n=sizeof(arr)/sizeof(arr[0]);
unordered_map<int,int> mp;
for(int i=0;i<n;i++){
mp[arr[i]]++;
}
for(const auto &ele:mp){
if(ele.second==1){
cout<<" Non-repeated eleme... | ALGO | 0.998999 | 3.649114 |
459b2b42-6b9c-402b-bb17-065cc5eae1f4 | sourabh1-1/daily_quest | 2490-circular-sentence/2490-circular-sentence.cpp | class Solution {
public:
bool isCircularSentence(string sentence) {
int n = sentence.size();
if(sentence[0] != sentence[n-1])
return false;
for(int i=1; i<n-1; i++){
if(sentence[i] == ' '){
if(sentence[i-1] != sentence[i+1])
retur... | ALGO | 0.999803 | 5.639358 |
95a8f62a-3e2d-4d3d-b869-dbfd99ebf258 | jovinlidan/competitive-programming | CodeForces/GNU C++17/1765N | Number Reduction/183483452.cpp | #include <bits/stdc++.h>
#define ll long long
#define pii pair<ll, ll>
using namespace std;
ll gcd(ll a, ll b)
{
if (b == 0)
return a;
a %= b;
return gcd(b, a);
}
ll lcm(ll a, ll b)
{
return (a * b) / gcd(a, b);
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.... | ALGO | 0.999975 | 4.8264 |
095e4384-d916-4dd1-a890-405fc2bf2a30 | cadets/freebsd | contrib/llvm-project/llvm/lib/CodeGen/MachineRegionInfo.cpp | #include "llvm/CodeGen/MachineRegionInfo.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/RegionInfoImpl.h"
#include "llvm/CodeGen/MachinePostDominators.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/D... | TOOL | 0.894231 | 7.854792 |
3dd1ee4c-a49e-45b7-8508-c0ca788b4812 | gkw0rld/Gkworld-Codes | C++ codes/pattern codes/pattern8.cpp | #include<iostream>
using namespace std;
int main()
{
int n,i=1;
cin>>n;
while (i<=n)
{
int j=1;
while(j<=i)
{
char ch='A'+i-1;
cout<<ch;
j++;
}
i++;
cout<<endl;
}
} | ALGO | 0.999745 | 3.683072 |
58c855fb-a749-4baf-990e-399d93ae793b | pulkitbajpaii/100-cpp-problem | 8primeNoInRange.cpp | #include<iostream>
using namespace std;
bool isPrime(int n){
int count = 0;
if(n<2)
return false;
for(int i=2;i<n/2;i++)
{
if(n%i==0)
return false;
}
return true;
}
int main()
{
int l,h;
cin>>l;
cin>>h;
for(int i=l;i<=h;i++)
if(isPrime(i))
... | ALGO | 0.999807 | 3.57834 |
9dc4d0f5-f002-4e96-81eb-17d16444d6b3 | t100ta-android/frameworks-av | media/libstagefright/codecs/amrwb/src/noise_gen_amrwb.cpp | /*
------------------------------------------------------------------------------
Filename: noise_gen_amrwb.cpp
Date: 05/08/2007
------------------------------------------------------------------------------
REVISION HISTORY
Description:
---------------------------------------------------------------------... | ALGO | 0.991593 | 5.300429 |
118e12aa-5c69-4494-88b2-3d5d6c094ebb | YeahOut/CSE_22 | 자료구조/민정/10951.cpp | // ----------------
// 10951 A + B - 4
//
// minjeong
// ----------------
#include <iostream>
using namespace std;
int main(void) {
int A, B;
while (1) {
cin >> A >> B;
if (cin.eof()) break;
else cout << A + B << endl;
}
} | ALGO | 0.976855 | 4.736444 |
d2fc7d64-a3b3-4e87-a8b7-7edfd9359223 | dhanraju/cpp | trees/bst.cpp | // Binary search tree
#include<iostream>
using namespace std;
struct BstNode {
int data;
BstNode* left;
BstNode* right;
};
BstNode* GetNewNode(int data) {
BstNode* newNode = new BstNode();
newNode->data = data;
newNode->left = newNode->right = NULL;
return newNode;
}
BstNode* Insert(BstNo... | ALGO | 0.999997 | 6.40046 |
0773f8f7-ced7-485c-a612-f897c1162656 | ishandutta2007/codeforces | correlationdecay/normal/768/F.cpp | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <set>
#include <map>
#include <vector>
#include <queue>
#include <string>
#include <iostream>
#define maxn 300009
using namespace std;
const int MOD = 1e9 + 7;
long long fact[maxn],rfact[maxn];
long long mgml(long long a, int b){
long ... | ALGO | 0.999977 | 4.415433 |
18315231-7d80-4147-b882-07339f1e52ab | FranxxOS-kazuwa/bootable_recovery | updater/blockimg.cpp | #include <ctype.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <linux/fs.h>
#include <pthread.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/wait.h>
#include ... | TOOL | 0.891278 | 7.503593 |
b86075d4-160b-412f-a82b-ebd925b4dc60 | Carmen-jx/Leetcode-solutions | Sliding Windos/Max Num of Vowels in a substring of given length/solution.cpp | class Solution {
bool isVowel(char c){
return c == 'a' || c == 'e' ||c == 'i' ||c == 'o' ||c == 'u' ;
}
public:
int maxVowels(string s, int k) {
int output =0;
int maxVowel;
for (int i =0; i< k; i++){
if(isVowel(s[i])){
output ++;
}
... | ALGO | 0.999985 | 6.07374 |
819556be-4472-4766-9978-7e84ed46647d | cj1ne/Algorithm | Algorithm/삼성 기출 문제/3079_입국심사.cpp | #include <iostream>
#include <vector>
#include <climits>
using namespace std;
int n, m;
vector<int> judge;
long long getPeopleCount(long long time) {
long long count = 0;
for (int i = 0; i < n; i++) {
count += (time / judge[i]);
}
return count;
}
long long solution() {
long long max = 0;
for (int i = 0; i... | ALGO | 0.999982 | 4.820865 |
bce88141-f5a4-4b66-9489-f257345db234 | ishandutta2007/codeforces | yashchandnani/normal/1137/B.cpp | #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize ("Ofast")
#pragma GCC target ("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
using namespace std;
#define TRACE
#ifdef TRACE
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const c... | ALGO | 0.999997 | 4.374534 |
4fde342a-6842-4843-b61b-b62904f22360 | Corycle/OI-Codes | Bashu OnlineJudge/5519.cpp | #include<algorithm>
#include<iostream>
#include<iomanip>
#include<cstring>
#include<cstdlib>
#include<complex>
#include<cstdio>
#include<vector>
#include<ctime>
#include<cmath>
#include<stack>
#include<queue>
#include<map>
#define ll long long
using namespace std;
const ll inf=0x3f3f3f3f;
const ll N=100005;
const ll M=... | ALGO | 0.999965 | 3.360474 |
2880bea0-fa0a-4d77-b92f-483dd82b5a8d | LauZyHou/Algorithm-To-Practice | LeetCode/812.cpp | //https://wenda.so.com/q/1461992684722271
class Solution {
public:
double largestTriangleArea(vector<vector<int>>& pnts) {
int ans = 0;//平行四边形面积
int len = pnts.size();
if(len<3)
return ans;
for(int i=0;i<len-2;i++)
for(int j=i+1;j<len-1;j++)
for(int k=j+1;k<len;k++){
int m = pnts[i][0]... | ALGO | 0.999932 | 5.162898 |
f2067e67-9262-4ec0-89ab-65f22ce65efa | revng/ui-qt-creator | src/libs/qmljs/qmljsrewriter.cpp | #include "qmljsrewriter.h"
#include <qmljs/parser/qmljsast_p.h>
#include <qmljs/qmljsutils.h>
// ### FIXME: remove these includes:
#include <QTextBlock>
#include <QTextCursor>
#include <QTextDocument>
using namespace QmlJS;
using namespace QmlJS::AST;
using namespace Utils;
Rewriter::Rewriter(const QString &origina... | TOOL | 0.854862 | 7.05403 |
3f9b19e3-94dc-4d0e-b28a-055bae71a5b6 | ealionel/advent-of-code-2020 | 2/solution.cpp | #include <iostream>
#include <sstream>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
std::vector<std::string> split(const std::string& s, char delimiter) {
std::vector<std::string> tokens;
std::string token;
std::istringstream tokenStream(s);
while (std::getline(tok... | ALGO | 0.999585 | 4.66053 |
40155b43-2126-4fee-9d7f-c8ea5d0243e5 | AdvTrainEvalSrcDomain/adv-train-evaluation-source-code-domain | code-imitator/data/dataset_2017/dataset_2017_8/HTC/3264486_5736519012712448_HTC.cpp | #include<iostream>
#include<cstdio>
using namespace std;
int main (){
freopen("A-small-attempt0.in","r",stdin);
freopen("ASOut.txt","w",stdout);
int T;
cin >> T;
int N,K;
string str;
for(int ca=1;ca<=T;ca++){
cin >> str >> K;
int flag = 1,ans = 0;
for(int i=0;i+K-1<st... | ALGO | 0.999629 | 3.776322 |
a9becaee-4d71-4689-8ece-1f2780dac263 | Sudhanva-Nadiger/DSA | 2428-maximum-sum-of-an-hourglass/2428-maximum-sum-of-an-hourglass.cpp | class Solution {
public:
int f(vector<vector<int>>& grid, int i, int j, int m, int n) {
if(j-1 < 0 or j+1 >= n or i+2 >= m or i+1 >= m) {
return 0;
}
int sum = 0;
// top horozontal
sum += grid[i][j-1] + grid[i][j+1];
// vertical
... | ALGO | 0.999988 | 5.744576 |
7eeac86e-964b-4fe8-9f57-99f74f31d32a | hi2tamzid/Algorithms | C++/Prime Factorization.cpp | #include <iostream>
#include <iomanip>
#include <string>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <math.h>
#include <cctype>
#include <climits>
#include <vector>
#include <map>
#include <queue>
#include <stack>
#include <stdexcept>
#include <exception>
#include <fstream>
#include <algorithm>
#in... | ALGO | 0.999947 | 3.848218 |
9d99f0db-9083-43b6-b56e-094ab96f2991 | md-waliul-hasan/uva | 924.cpp | #include<bits/stdc++.h>
using namespace std;
#define mx 2505
#define tuttut 100000007
typedef long long ll;
vector< ll > g[mx];
vector<string> vt;
ll level[mx];
ll parent[mx];
void bfs( ll src)
{
queue<ll>q;
ll i,visited[mx]={0};
q.push(src);
for(i=0;i<mx;i++)level[i]=tuttut;
visited[src]=1;
le... | ALGO | 0.999898 | 3.782204 |
4875ddda-edb2-4941-8fd8-f819b82f3dd3 | agarwal66/CH_4_DDSA | lec 25/city.cpp | // You are developing software for a car rental agency that manages its vehicle fleet across two locations, City A and City B. Each location's vehicle fleet is represented as a Binary Search Tree (BST) containing unique vehicle IDs.
// Your program needs to determine whether the vehicle fleets in both cities are ident... | ALGO | 0.999873 | 5.744438 |
fd1b43da-7b0e-474d-aab4-7f980c82710a | aiviaghost/Kattis_solutions | Open-Kattis/bond.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<double, double>;
template <typename T> vector<T> make(T init, size_t size) { return vector<T>(size, init); }
template <typename T, typename... Args> auto make(T init, size_t firs... | ALGO | 0.999805 | 4.728579 |
300a18d1-7443-4425-9e3c-1f706d9bc5ce | AndryRafam/Algo-Dojo | FRANCE_IOI/Level3/Bases/exo5.cpp | #include <stdio.h>
#include <vector>
int main() {
int entierAConvertir, baseArrivee;
scanf("%d %d", &entierAConvertir, &baseArrivee);
if (entierAConvertir == 0) {
printf("1\n0\n");
return 0;
}
std::vector<int> chiffres;
while (entierAConvertir > 0) {
chiffres.push_back... | ALGO | 0.999951 | 3.941118 |
c99a6a76-5fd2-4db0-ade2-a9c6ca596f3a | shanPic/CodeOfAcm | 2017训练比赛/9.24南宁网络赛/j-2.cpp | /*
* @FileName: D:\代码与算法\2017训练比赛\9.24南宁网络赛\j-2.cpp
* @Author: Pic
* @Created Time: 2017/9/24 13:30:15
*/
#include <bits/stdc++.h>
using namespace std;
char str1[13],str2[13];
int str[13];
int len;
int main()
{
freopen("data.in","r",stdin);
//freopen("data.out","w",stdout);
scanf("%d",&len);
for(int i=0;i<5;i++){
... | ALGO | 0.999879 | 3.641342 |
9c5b3560-8e0b-4d80-81aa-dbf8ae47e3cb | ganeshalamuru/prg | codeforces/cr994/B_pspspsps.cpp | #include <bits/stdc++.h>
using namespace std;
#define fast ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
typedef long long ll;typedef long double ld;typedef pair<int,int> pii;
#define F first
#define S second
#define PB push_back
#define MP make_pair
const ll mod = 1e9+7, N = 2e6+7, M = 2e6+7, INF = INT_MAX/10;
ll po... | ALGO | 0.999731 | 4.297338 |
71e36641-2754-403a-b8fc-fb7cb2e5c286 | aliara/CamaraInterior | src/CamaraInterior.cpp | #include "constants.h"
#include <iostream>
#include <queue>
#include <stdio.h>
#include <math.h>
using namespace std;
using namespace cv;
int detectFace(Mat);
int main( int argc, const char** argv )
{
string face_window_name = "Realidad";
RNG rng(12345);
Mat debugImage;
Mat skinCrCbHist = cv::Mat::zeros(cv::Size... | ALGO | 0.977923 | 3.067754 |
022ebd92-fc13-4b46-b526-485a0a4e69cc | aospa-whyred/android_hardware_qcom_display | sdm/libs/utils/rect.cpp | #include <math.h>
#include <utils/rect.h>
#include <utils/constants.h>
#include <algorithm>
#define __CLASS__ "RectUtils"
namespace sdm {
bool IsValid(const LayerRect &rect) {
return ((rect.bottom > rect.top) && (rect.right > rect.left));
}
bool IsCongruent(const LayerRect &rect1, const LayerRect &rect2) {
retu... | TOOL | 0.971159 | 7.189513 |
b0f681d6-1475-4795-b1f2-341c666358c7 | nargespoorhatamii/NewRepo5 | determinan.cpp | // determinan.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <string>
int main()
{
int a[3][3];
for (int i = 0; i <= 2; i++)
{
for (int j = 0; j <= 2; j++)
{
std::cin >> a[i][j];
}
}
int det =0;
std::cin >> det;
for (int i = 0; i... | ALGO | 0.999676 | 4.460448 |
b19ec879-e855-474c-96fc-92c36d043cfb | chenyuxiaodhr/SummonerAndGuardian | SAG/cocos2d/cocos/3d/CCAABB.cpp | #include "3d/CCAABB.h"
NS_CC_BEGIN
AABB::AABB()
{
reset();
}
AABB::AABB(const Vec3& min, const Vec3& max)
{
set(min, max);
}
AABB::AABB(const AABB& box)
{
set(box._min,box._max);
}
Vec3 AABB::getCenter()
{
Vec3 center;
center.x = 0.5f*(_min.x+_max.x);
center.y = 0.5f*(_min.y+_max.y);
center.z = 0.5... | TOOL | 0.950865 | 7.53548 |
c7ca8d3d-4435-4c7b-be13-e0f75a34206e | ishandutta2007/codeforces | sert/normal/513/A.cpp | #include <iostream>
#include <cstdio>
#include <cmath>
#include <algorithm>
#include <string>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <cstdlib>
#include <ctime>
#define ff first
#define ss second
using namespace std;
typedef long long ll;
const int N = 1e6 + 7;
l... | ALGO | 0.999906 | 3.588311 |
66a04e7c-b69b-4aa1-8dac-eb4bdc2de502 | Bowie-State-University/CS-Courses | COSC112_CS1/Source Code/Chapter 18 Source Code/Ch18_PostfixExp/PostFix.CPP | //***********************************************************
// Author: D.S. Malik
//
// Program: Postfix Calculator
// This program evaluates postfix expressions.
//***********************************************************
#include <iostream>
#include <iomanip>
#include <fstream>
#include "mystack.h"
using... | ALGO | 0.996784 | 4.234154 |
9a8f1f43-2691-46f5-967d-dd7de0523f66 | jasleenksaini/Medical-Patient-Queue | main.cpp | // Jasleen Kaur Saini
// Homework 1: Priority Queue Project
// Purpose: This program simulates a priority queue for COVID-19 vaccination
// Takes in patient data from file and vaccine number from command line
#include "COVIDPriorityQueue.h"
#include "Patient.h"
#include <fstream>
#include <iostream>
#include <sstre... | ALGO | 0.992772 | 5.038853 |
73cfb6db-1834-488e-9930-33af734ec6c7 | Krish9220/cpp | DSA Question/Binary_search.cpp | /* THAT METHOD IS MORE USEFULL
#include<iostream>
using namespace std;
int binarySearch(int arr[],int size)
{
int low=0;
int up=size-1;
int mid;
int ans=-1;
int find;
cout<<"Which element you want to find in array : ";
cin>>find;
while(low<=up)
{
int mid=(low+up)/2;
if(a... | ALGO | 0.999533 | 4.63451 |
040f6f61-8123-4731-9d14-7af15c1317a9 | Luis-Rdgz/Fundamentos-de-programacion | C++4.0/trabajo en clase 7 (par impar).cpp | #include <iostream>
using namespace std;//Función que verifica si un numero es par o impar
void parImpar(int numero);
int main(){
//lUIS ANGEL RODRIGUEZ
//24041512
int numero;
cout<<"Ingrese un numero: ";
cin>>numero;
parImpar(numero);
//vuelvo a llamar la fn y no hay necesidad de volver a escri... | ALGO | 0.997515 | 3.314456 |
428e4232-43b8-4313-aea6-98f8d63e5dde | lawtonsclass/s24-code-from-class | csci40-in-person/lec12/sum_of_squares/main.cpp | #include <iostream>
#include "sumOfSquares.h"
using namespace std;
int main() {
cout << "Enter n: ";
int n;
cin >> n;
cout << sumSquaresFrom1To(n) << endl;
return 0;
}
| ALGO | 0.994337 | 4.265681 |
52da2071-9f11-4876-9e4d-47ce1789e1cc | Tominano/cpp | 5/obj1.cpp | #include <iostream>
#include <cstdlib>
#include <complex>
using namespace std;
struct Point
{
double x,y;
};
struct Circle
{
private:
Point origo;
double r;
public:
Circle(){//konstruktor
if (r>0)
r = 0;
else r = 1;
origo.x = 0;
origo.y = 0;
}
double area(){
... | TOOL | 0.994845 | 4.430119 |
f9f3c3d9-4c68-4ee8-9f20-92f8a761ed42 | swalluigi/RBT211-Final | RBT FInal/main.cpp | /*
* RBT_Final.c
*
* Created: 4/21/2024 7:11:43 PM
* Author : iansb
*/
#ifndef F_CPU
#define F_CPU 1000000UL
#endif
#include <avr/io.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include <stdio.h>
// int mode = 0;
// //This funtion uses a linear equation to calculate the PWM needed for motor speed bet... | TOOL | 0.9109 | 4.140646 |
07b98a42-4f09-4640-97bd-a52be766bb7e | hojoJeong/Algorithm | 2022/11.07/이아름/배달.cpp | #include <iostream>
#include <vector>
#include <queue>
#include <stack>
using namespace std;
int solution(int N, vector<vector<int>> road, int K) {
int answer = 0;
vector<vector<pair<int, int>>> board(N+1,vector<pair<int,int>>());
for (auto r: road) {
board[r[0]].push_back({ r[1], r[2] });
... | ALGO | 0.999868 | 5.229853 |
85a91bd7-9f30-4c0b-9152-1403099235b9 | SHAIMA-HAQUE/LeetCode-Solve | 581-shortest-unsorted-continuous-subarray/581-shortest-unsorted-continuous-subarray.cpp | class Solution {
public:
int findUnsortedSubarray(vector<int>& nums) {
vector<int> b(nums);
int left = 0, right = nums.size()-1;
int n = nums.size();
sort(nums.begin(), nums.end());
while(left<n && nums[left] == b[left]){
left ++;
}
while(right >= ... | ALGO | 0.999984 | 5.977673 |
6fccfbf2-4524-4174-8d85-88d30873f525 | ilikeavocadoalot/CompetitiveProgramming | Tu hoc/seeyasoon/ROBOT/main.cpp | #include <bits/stdc++.h>
using namespace std;
string l;
char a[100][100];
int v[100][100][4][10];
int n,m,k,dem,tam;
int x[4]={-1,0,1,0};
int y[4]={0,1,0,-1};
bool chacphaidailam (int i, int j)
{
int c=0;
int d=0;
while (true)
{
if (a[i][j]=='E') return (true);
if (v[i][j][c][d]==1) retu... | ALGO | 0.999931 | 4.301172 |
276802fe-85fb-4383-9262-aa98a81b7303 | stablum/computer_vision_pointcloud_merger | normals.cpp | #include "definitions.h"
pcl::PointCloud<pcl::Normal>::Ptr
calculate_normals(pcl::PointCloud<POINT_TYPE>::Ptr cloud)
{
// Create the normal estimation class, and pass the input dataset to it
pcl::NormalEstimation<POINT_TYPE, pcl::Normal> ne;
ne.setInputCloud (cloud);
// Create an empty kdtree representation, and... | ALGO | 0.994384 | 4.565415 |
cf2a638e-558a-4511-be23-a00c0e67308f | Roy-rom/android_system_core | fs_mgr/libsnapshot/snapuserd_server.cpp | #include <arpa/inet.h>
#include <cutils/sockets.h>
#include <errno.h>
#include <netinet/in.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
#include <android-base/logging.h>
#include "snapuserd.h"
#include "snapuserd_server.h"
namespace ... | WEB | 0.883577 | 7.352231 |
1dace894-02ed-4770-9f1a-eadb0137c05d | sku420/PEP_DP | DP_LIS.cpp | #include <bits/stdc++.h>
using namespace std;
void liS(vector<int> &arr,vector<int>&lis,int n)
{
for (int i=1;i<n;i++)
{
for (int j=0;j<i;j++)
if (arr[i]>arr[j] && lis[i]<lis[j]+1)
lis[i]=lis[j]+1;
}
cout<<*max_element(lis.begin(), lis.end());
}
int main(... | ALGO | 0.99991 | 4.348439 |
48ca8c36-3665-4b14-93db-52f3d2222a4a | HikariObfuscatorSuite/Hikari-with-llvm | projects/libcxx/test/std/containers/associative/multiset/equal_range_transparent.pass.cpp | // UNSUPPORTED: c++03, c++11
// <set>
// class multiset
// template<typename K>
// pair<iterator,iterator> equal_range(const K& x); //
// C++14
// template<typename K>
// pair<const_iterator,const_iterator> equal_range(const K& x) const; //
// C++14
#include <cassert>
#include <s... | TEST | 0.944207 | 5.315296 |
3321d5a1-a1b2-4fa5-844a-19c3ef8f81f0 | SwagatG/HackerRank_Solutions | Project Euler/Project Euler [016] - Power Digit Sum.cpp | /*
PROBLEM:
2^9 = 512 and the sum of its digits is 5 + 1 + 2 = 8.
What is the sum of the digits of the number 2^N ?
Input Format
The first line contains an integer T , i.e., number of test cases.
Next T lines will contain an integer N.
Output Format
Print the values corresponding to each test case.
Constraints
... | ALGO | 0.999935 | 5.776161 |
59a35c7a-2770-43aa-bb68-439f5f73848e | TimPin28/STDISCM-PROBLEM-SET-1 | Particle-Simulator/ExternalLibraries/SFML/examples/island/Island.cpp |
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#define STB_PERLIN_IMPLEMENTATION
#include <stb_perlin.h>
#include <SFML/Graphics.hpp>
#include <vector>
#include <deque>
#include <sstream>
#include <algorithm>
#include <cstring>
#incl... | TOOL | 0.889352 | 6.654213 |
7a6e1bbd-0841-495f-a379-bb6c06b6ba55 | VanLam05/CPP-CodePTIT | CPP0425 - SẮP XẾP CHẴN LẺ.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fi first
#define se second
#define vi vector<int>
#define vl vector<ll>
#define pii pair<int, int>
#define vb vector<bool>
#define pib pair<int, bool>
#define mii map<int, int>
#define mil map<int, ll>
#define mli map<ll, int>
#define yes cout <<... | ALGO | 0.999943 | 4.465778 |
ff71e463-74bf-4a69-91a1-70b04e9ceea1 | Valicoin/Valicoin | src/CryptoNoteCore/Miner.cpp | #include "Miner.h"
#include <future>
#include <numeric>
#include <sstream>
#include <thread>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/filesystem.hpp>
#include <boost/limits.hpp>
#include <boost/utility/v... | ALGO | 0.961304 | 6.604893 |
58288ecd-beeb-4c60-ae40-c41ba1a11a71 | 2circumflex/lectopia-source | C/C/Hw/hw31.cpp | /* ¥ : 2012 2 15
ۼ : ̷ο
α : ڰ˻ α */
#include <stdio.h>
#include <string.h>
#pragma warning (disable : 4996)
int str_input(char *, char *);
int strcheck(char *, char, int);
int main()
{
char str[20];
char ch;
int size, r_r, s_r;
size = sizeof(str)/sizeof(str[0]);
while(1)
{
s_r = str_input(str, ... | TOOL | 0.944218 | 3.393337 |
6c6a6f16-372f-462d-b651-fc5f66688ca3 | ragibshahrier/cp | Contests/IndividualPracticeRound5/stess1/brute.cpp | #include<bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using namespace std;
// #define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
// using namespace __gnu_pbds;
typedef long long ll;
#define int long long
#define ... | ALGO | 0.999989 | 3.635785 |
a5655ad8-ee7e-4819-8666-81680a7e21ce | 11223uhh/Stm32_Deploy_AI | Example/opencv/图像腐蚀/实验13 TFT LCD显示实验/opencv/cxcore/src/cxlogic.cpp | /* ////////////////////////////////////////////////////////////////////
//
// CvMat logical operations: &, |, ^ ...
//
// */
#include "_cxcore.h"
/////////////////////////////////////////////////////////////////////////////////////////
// ... | TOOL | 0.961844 | 3.603599 |
f72b1394-d973-4392-bf1a-f47439743456 | Dynesshely/Competition | source/website/ybt.ssoier.cn/2058.cpp | #include <bits/stdc++.h>
using namespace std;
int main(){
double a,b;
char oper;
cin>>a>>b>>oper;
switch(oper){
case '+':
cout<<a+b;
break;
case '-':
cout<<a-b;
break;
case '*':
cout<<a*b;
break;
case '/':
if(b==0){
cout<<"Divided by zero!";
}else{
cout<<a/b;
}
break;
... | ALGO | 0.99673 | 4.087913 |
7cb9ba0e-393a-4ca1-ab41-4485c8bed580 | ishandutta2007/codeforces | danya090699/normal/859/E.cpp | #include <bits/stdc++.h>
using namespace std;
const int sz=2e5+10, mod=1e9+7;
vector <int> sv[sz];
int us[sz];
int dfs(int v)
{
us[v]=-1;
int q=1;
for(int a=0; a<sv[v].size(); a++) q+=dfs(sv[v][a]);
return q;
}
int main()
{
//freopen("input.txt", "r", stdin);
int n, an=1;
cin>>n;
int to[... | ALGO | 0.999758 | 4.185592 |
afc07ddb-b07b-4d70-990e-88e5c20a33d4 | hitesh103/Leetcode | 1619-path-crossing/path-crossing.cpp | class Solution {
public:
bool isPathCrossing(string path) {
map<pair<int, int>, int> visited_points;
int x = 0;
int y = 0;
visited_points[{x, y}] = 1;
for (int i = 0; i < path.length(); i++) {
if (path[i] == 'N') {
y += 1;
} else if (p... | ALGO | 0.999954 | 6.383069 |
08c0ff63-c4d6-4a83-ba6c-ae2d98649750 | Shahraaz/CP_S5 | codeforces/practice/DIV2_594D1.cpp | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ff first
#define ss second
#define int long long
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define vi vector<int>
#define mii map<int, int>
#define pqb priority... | ALGO | 0.999694 | 4.347849 |
a531aff6-535f-4b5c-8226-25e8ade0d176 | parthmshah1302/CompProg | Codeforces/Zeus4/QuestionD.cpp | #include<bits/stdc++.h>
using namespace std;
int main(){
int tfcounter=0;
int ftcounter=0;
long long int nos;
int flag=0;
scanf("%lld",&nos);
for(long long int i=0;i<nos;i++){
int customer;
scanf("%d",&customer);
if(customer==25){
tfcounter++;
}
else if(customer==50){
... | ALGO | 0.998976 | 3.78704 |
c3639f81-6449-4f1f-9b51-8237804ef4d9 | Scrubpai/Competitive-Programming | Codeforces/1436D.cpp | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
#define nl '\n'
#define LL_INF 0x3f3f3f3f3f3f3f3f
#define ms(x, y) memset(x, y, sizeof(x))
const int MM = 2e5 + 5;
ll n, a[MM], leafs[MM], ans; vector<int> adj[MM];
void dfs(int u) {
if (adj[u].empty()) { leafs[u] = 1; ans = max(ans, a[u... | ALGO | 0.99993 | 3.762443 |
f15847e3-7d8e-4a05-af35-54893e893d5e | arpitbuilds/DSA | 2573-remove-nodes-from-linked-list/2573-remove-nodes-from-linked-list.cpp | /**
* Definition for singly-linked list.
* struct ListNode {
* int val;
* ListNode *next;
* ListNode() : val(0), next(nullptr) {}
* ListNode(int x) : val(x), next(nullptr) {}
* ListNode(int x, ListNode *next) : val(x), next(next) {}
* };
*/
class Solution {
public:
ListNode* rev(ListNod... | ALGO | 0.999991 | 5.766728 |
18a325f6-ee08-4549-93ac-43ce1fd0e67c | LHugueniot/MudboxVR | Windows/src/MBVRPicker.cpp | #include "MBVRPicker.h"
namespace mudbox
{
//-------------------------------------------------------------
//-- VRPicker Functions --
//-------------------------------------------------------------
void VRPicker::SetMesh( Mesh *m_pMesh )
{
m_Mesh = m_pMesh;
}
void VRPicker::SetTolerance( float fT... | ALGO | 0.948278 | 5.816675 |
e0e8b6bf-a371-4dff-8ba2-1e1349039d47 | ishandutta2007/codeforces | cuizhuyefei/normal/986/F.cpp | #include<bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define SZ(x) ((int)x.size())
#define L(i,u) for (register int i=head[u]; i; i=nxt[i])
#define rep(i,a,b) for (register int i=(a); i<=(b); i++)
#define per(i,a,b) for (register int i=(a); i>=(b); i--)
using namespace std;
typedef long long ... | ALGO | 0.99952 | 3.91462 |
de029b0d-3455-4635-a343-f54190592c1f | CODERAMARJEET/CDAC | C++ Programming/overloading.cpp | //overloading function for substraction of two objects.
#include<iostream>
using namespace std;
class x
{
int a,b,c;
public:
void get();
void print();
x operator -(x);
};
void x :: get()
{
cout<<"ENter value\n";
cin>>a>>b>>c;
}
void x:: print()
{
cout<<"the result is"<<a<<" "<<b<<" "<<c<<en... | ALGO | 0.998107 | 4.447021 |
81bea0ee-595c-48ff-bb11-9eabaab18dca | hma40/Cpp-Competitive-Programming | Codeforces/2061/F.cpp | #include <bits/stdc++.h>
std::string to_string(__int128_t value) {
if (value == 0) return "0";
std::string result;
bool negative = (value < 0);
if (negative) value = -value;
while (value > 0) {
result += '0' + (value % 10);
value /= 10;
}
if (negative) result +... | ALGO | 0.999929 | 5.092512 |
ddad0e40-3d94-4981-85b3-09c803b98e91 | UV26320/GeeksForGeeks | Minimum Spanning Tree/Minimum Spanning Tree.cpp | #include <bits/stdc++.h>
using namespace std;
bool cmp(vector<int> &a, vector<int> &b)
{
return a[2] < b[2];
}
void makeSet(vector<int> &parent, vector<int> &rank, int n)
{
for (int i = 0; i < n; ++i)
{
parent[i] = i;
rank[i] = 0;
}
}
int findParent(vector<int> &parent, int node)
{
if (parent[node]... | ALGO | 0.999844 | 4.907928 |
5fb7a953-f1f1-443c-8f4a-a5bdd6366aa6 | Srajana20/Leetcode | 0058-length-of-last-word.cpp | // Given a string s consisting of words and spaces, return the length of the last word in the string.
// A word is a maximal
// substring
// consisting of non-space characters only.
// Example 1:
// Input: s = "Hello World"
// Output: 5
// Explanation: The last word is "World" with length 5.
// Example 2:
// Inpu... | ALGO | 0.99949 | 5.398784 |
82af4fbe-b1a9-451d-889b-d29fbe367570 | Pyk017/C | C++/Sorting/Counting_Sort.cpp | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
void counting_sort(vector<int>& ar){
int max = *max_element(ar.begin(), ar.end());
int min = *min_element(ar.begin(), ar.end());
int range = max - min + 1;
vector<int>count(range), output(ar.size());
for(int i=0; i<ar.siz... | ALGO | 0.999983 | 5.387824 |
d1c9ff3f-063e-4b3f-aaa6-7de92435278f | mohitvdx/Programs | codeforces/math/M_Minimum_LCM.cpp | // Mohit Verma "mohitvdx"
// problem:
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int MOD = 1e9 + 7;
const int INF = LLONG_MAX >> 1;
signed main(){
ios::sync_with_stdio(false); cin.tie(NULL); // fast IO
int t;
cin>>t;
while(t--){
int n; cin>>n;
int a=1... | ALGO | 0.999708 | 4.646644 |
3cf0fc65-d024-482e-b36a-f05f3a8fe0e1 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_train_7566_12.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int n;
cin >> n;
string s;
cin >> s;
for (long long int i = 1; i < s.size(); i++) {
if (n % i == 0) {
reverse(s.begin(), s.begin() + i);
}
}
cout << s;
}
| ALGO | 0.999991 | 4.493206 |
cf76620f-9d8f-4774-be98-3e9ac887ffc3 | gzq942560379/BrushProblem | leetcode/dp/最长上升子序列.cpp | //
// Created by guozhuoqiang on 2019-03-23.
//
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
class Solution {
public:
// O(n*log(n))实现
int lengthOfLIS(vector<int> &nums) {
if (nums.empty())
return 0;
int n = nums.size();
vector<int> v;
... | ALGO | 0.999988 | 5.937276 |
e8db651b-c83b-43a5-97bf-b6f4923b0e4a | Sherlock2010/ACM | BFS.cpp | #include<iostream>
#include<list>
using namespace std;
class Graph
{
int V;
list<int> *adj;
public:
Graph(int V);
void addEdge(int v, int w);
void BFS(int s);
};
Graph::Graph(int V)
{
this->V = V;
adj = new list<int>[V];
}
void Graph::addEdge(int v, int w)
{
adj[v].push_back(w);
}
void Graph::BFS(int s)
{
... | ALGO | 0.999804 | 4.431194 |
9591a8f2-737a-47ad-a931-92ac37dcf9fc | shin5774/BaekjoonPractice | 4949.cpp | #include <iostream>
#include <stack>
#include <string>
using namespace std;
string line;
bool check() {
stack<char> st;
int i = 0;
while (line[i] != '.') {
switch (line[i]) {
case '[':
st.push(line[i]);
break;
case ']':
if (st.empty() || st.top(... | ALGO | 0.999461 | 4.130786 |
341e1e69-ecf6-43e0-b70f-484bac0d3c23 | zhangwengame/Lab_All | 23.cpp | #include<stdio.h>
#include<string.h>
int main()
{
int i,ri,repeat,ans;
char *date[]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
char str[80];
scanf("%d",&repeat);
getchar();
for(ri=1;ri<=repeat;ri++){
scanf("%s",str);
ans=-1;
for(i=0;i<=6;i++)
if (strcmp(str,date[i])==0)
... | ALGO | 0.999824 | 3.322725 |
527c076e-b23a-4b03-b6f0-5f62e03cfbb1 | d-charlie-kim/Algorithm_practice | Baekjoon/num_21758.cpp | #include <cstdio>
#include <algorithm>
#include <iostream>
int *array;
unsigned int forward(unsigned int base, int N) {
unsigned int candidate = base;
for (int pivot = 1; pivot < N - 2; pivot++) {
unsigned int temp = base + array[pivot] - array[pivot + 1] - array[pivot + 1];
if (temp > candidate)
candidate ... | ALGO | 0.999969 | 4.012064 |
42e88e77-a41a-4e3e-a1a8-0f2ff76cef36 | KanikPathak/Leetcode-DSA | 0020-valid-parentheses/0020-valid-parentheses.cpp | class Solution {
public:
bool isValid(string s) {
stack<char> st;
if (s.size() <= 1)
return false;
for (int i = 0; i < s.length(); i++) {
if (s[i] == '{' || s[i] == '(' || s[i] == '[')
st.push(s[i]);
else {
if (st.empty())
... | ALGO | 0.998649 | 6.211867 |
a854961d-0fc5-42ac-8979-f2b38b700623 | arpit6/Data-Structures-Algorithms | 07. Queue/03. Circular Queue ADT using Array/Circular Queue ADT (Array).cpp | #include <iostream>
using namespace std;
template <class T>
class Queue
{
private:
int size;
int rear;
int front;
T *Q;
public:
Queue(){size=10; rear=front=0; Q = new T[size];}
Queue(int size){front=rear=0; this->size = size; Q = new T[this->size];}
void Enqueue(T x);
T Dequeue();
... | ALGO | 0.991135 | 3.998487 |
be678705-2e58-4261-9bc9-8ff31bba6208 | AlxndrKlbk/CS-course | C++/dummies/problems/add_two_num_2_list/add_two_num_2_list.cpp | #include <memory>
#include <iostream>
struct ListNode {
int val;
ListNode *next;
ListNode() : val(0), next(nullptr) {}
ListNode(int x) : val(x), next(nullptr) {}
ListNode(int x, ListNode *next) : val(x), next(next) {}
};
class Solution {
public:
ListNode* addTwoNumbers(ListNode* l1, ListNode* ... | ALGO | 0.999738 | 6.116128 |
18da4156-d1b9-42d5-bfd6-0a11f7bf42c5 | srcode03/codingquestions | Outermost Parentheses - GFG/outermost-parentheses.cpp | //{ Driver Code Starts
#include <bits/stdc++.h>
using namespace std;
// } Driver Code Ends
class Solution {
public:
string removeOuter(string& s) {
// code here
stack<char>st;
int i=0;
string ans="";
while(i<s.length())
{
if(st.empty())
{
... | ALGO | 0.999074 | 6.177255 |
b3d0a3b3-c550-42e2-9444-ae92005e0d5b | kaskr/RTMB | RTMB/src/lapack.cpp | //#include <Rcpp.h>
#include "RTMB.h"
#define USE_FC_LEN_T
#include <R.h>
#include <Rversion.h>
#ifndef EIGEN_USE_BLAS
#include <R_ext/BLAS.h>
#include <R_ext/Lapack.h>
#endif
#ifndef FCONE
# define FCONE
#endif
/* sytrisol: Given lower L and lower W, find symmetric S such that
TRIL(S*L)=TRIL(W)
*/
static void syt... | ALGO | 0.99971 | 5.226958 |
210172d8-9418-489a-a581-0f2d062afea7 | michaelbor/k-profiles | 3profileEgo2_sampling.cpp | #include <boost/unordered_set.hpp>
//#include <boost/multiprecision/cpp_int.hpp>
#include <graphlab.hpp>
#include <graphlab/ui/metrics_server.hpp>
#include <graphlab/util/hopscotch_set.hpp>
#include <graphlab/macros_def.hpp>
#include <limits>
//comment the following line if you want to use integer counters
#define DO... | ALGO | 0.999793 | 5.708968 |
b4ac29ac-4e39-4e0a-981e-150b0b3b4029 | Sumith-Hegde/CompetitiveProgramming_and_DSA | CodeForces_CodeChef/equalNotEqual_CF1620A.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
int t=0;
cin>>t;
while(t--)
{
string s="";
cin>>s;
int notEqual=0;
for(auto i:s)
{
if(i=='N')
{
notEqual++;
}
}
if(notEqual==1) cout<<"NO... | ALGO | 0.999845 | 4.577328 |
6a5a664a-deb3-49cb-86eb-199172bc4b03 | luwei0917/GlpG_Nature_Communication | src/neigh_bond.cpp | #include "neighbor.h"
#include "atom.h"
#include "atom_vec.h"
#include "molecule.h"
#include "force.h"
#include "update.h"
#include "domain.h"
#include "output.h"
#include "thermo.h"
#include "memory.h"
#include "error.h"
using namespace LAMMPS_NS;
#define BONDDELTA 10000
enum{IGNORE,WARN,ERROR}; // same a... | ALGO | 0.992879 | 6.798553 |
64e8593d-02ca-4e09-80df-e657ffd0374b | newmind/algorithm | cpp/p10430_mod.cpp | /* (A+B)%C는 (A%C + B%C)%C 와 같을까?
(A×B)%C는 (A%C × B%C)%C 와 같을까?
*/
#include <iostream>
using namespace std;
int main()
{
auto A = 0, B = 0, C = 0;
cin >> A >> B >> C;
// cout << fixed;
// cout.precision(9);
cout << (A + B) % C << endl;
cout << (A % C + B % C) % C << endl;
cout << (A * B) % C << endl;
... | ALGO | 0.99986 | 4.227614 |
40516e0e-aa34-4adf-b037-9fd005332895 | missfall111111/Algo_pra | acwing/671.cpp | #include <endian.h>
#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
switch(n)
{
case 61:cout<<"Brasilia";break;
case 71:cout<<"Salvador";break;
case 11:cout<<"Sao Paulo";break;
case 21:cout<<"Rio de Janeiro";break;
case 32:cout<<"Juiz de Fora";break;
case 19:cout<... | ALGO | 0.998138 | 4.762249 |
8893abcb-793e-4d78-b83a-d2e2770c5340 | TonyLex98/Skly-ChatGPT | json-develop/tests/thirdparty/Fuzzer/FuzzerMerge.cpp | #include "FuzzerInternal.h"
#include "FuzzerIO.h"
#include "FuzzerMerge.h"
#include "FuzzerTracePC.h"
#include "FuzzerUtil.h"
#include <fstream>
#include <iterator>
#include <sstream>
namespace fuzzer {
bool Merger::Parse(const std::string &Str, bool ParseCoverage) {
std::istringstream SS(Str);
return Parse(SS, ... | TOOL | 0.890016 | 5.838995 |
20d47d22-8ff9-48c9-ac0b-39f472a9e3bf | anurag-yadav-7/LeetCode-and-GFG-Questions | 0020-valid-parentheses/0020-valid-parentheses.cpp | class Solution {
public:
bool isValid(string s) {
stack<char> st;
for(int i=0;i<s.length();i++)
{
if(s[i]=='(' || s[i]=='{' || s[i]=='[')
st.push(s[i]);
else if(st.size()>=1 && ((st.top()=='(' && s[i]==')') || (st.top()=='{' && s[i]=='}') || (st.top()=... | ALGO | 0.999155 | 5.960656 |
3dc704c4-87e6-46f3-8f43-963013c6cdbc | sukeshch/LC | 0646-maximum-length-of-pair-chain/0646-maximum-length-of-pair-chain.cpp | class Solution {
public:
vector<int> dp;
int N;
int recurse(vector<vector<int>>& pairs, int cur_index) {
if(cur_index >= N) {
return 0;
}
if(dp[cur_index] != -1) return dp[cur_index];
int nxt_nonoverlap_idx = cur_index+1;
int st = pairs[cur_index]... | ALGO | 0.999948 | 5.573361 |
9e06996a-f0c6-44fc-9a72-2f12bd40d0ed | Soumik-Ghosh-2924/OOP_3rd_Sem_All_Assignment | oop lab assignment 8/Q5.cpp | #include<iostream>
using namespace std;
class Distance
{
public:
int D;
Distance(){}
Distance (int i)
{
D=i;
}
Distance operator +(Distance k)
{
Distance r;
r.D=D+k.D;
return r;
}
Distance operator >(Distance d)
{
if(d.D>D)
{
retur... | ALGO | 0.994781 | 3.325485 |
37dbc5ef-dcfb-4fb1-8147-96cc10e226c6 | Kowshalya-p/DSA-Solutions | recursion/8_invert_tree.cpp | /**
* Definition for a binary tree node.
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode() : val(0), left(nullptr), right(nullptr) {}
* TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
* TreeNode(int x, TreeNode *left, TreeNode *right) : val(x), l... | ALGO | 0.99999 | 6.841142 |
eb1279b5-3a0e-48d5-b2e7-0a08846004bb | kmjp/procon | atcoder/abc001-040/abc019/b.cpp | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<to;x++)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINU... | ALGO | 0.999835 | 3.387708 |
a79aad9a-04ed-4119-9462-b980b355faeb | MusshcaB/lynx_cplus | python_cpp/opencv-4.5.1/opencv-4.5.1/3rdparty/openexr/IlmImf/ImfRational.cpp | //-----------------------------------------------------------------------------
//
// Rational numbers
//
// The double-to-Rational conversion code below
// was contributed to OpenEXR by Greg Ward.
//
//-----------------------------------------------------------------------------
#include <ImfRational.h>
#include <cma... | ALGO | 0.968678 | 5.885553 |
0b1c3c3c-9674-4107-8594-b69972615a33 | ishandutta2007/codeforces | kmjp/normal/1027/D.cpp | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define ALL(a) (a.begin()),(a.end())
#define ZER... | ALGO | 0.999945 | 3.491031 |
48761bdd-18c3-4f2f-b618-1a232218f712 | jeevallucas/Mobile-Programming | progmob2023_flutter/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.998517 | 6.76073 |
4f6bb8c1-3aec-47c5-a597-d55534e68e0b | qmaruf/Topcoder | Cyclemin.cpp | #include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<iostream>
#include<fstream>
#include<string>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<set>
#include<sstream>
#include<stack>
using namespace std;
struct Cyclemin{
string bestmod(string s... | ALGO | 0.999907 | 3.97325 |
765d96aa-fb66-46a9-9970-2c3194a929d8 | chinmoyacharjee/CplusplusCodes | Graph/circle_the_dot_simple.cpp | #include<bits/stdc++.h>
#include<cstdio>
#include<vector>
using namespace std;
#define MAX 100000 //maximum node
int N,E;
void file(bool printInFile){
freopen("input.txt","r",stdin);
if(printInFile)
freopen("output.txt","w",stdout);
}
void bfs(map<string, vector<string> > edges, string source, map<... | ALGO | 0.999967 | 4.137066 |
8ce9e36d-6797-4e39-988a-daa4d1a8c1d5 | vortex3964/sorting_algorythms_in_cpp | merge_sort.cpp | #include <iostream>
#include <chrono>
const int SIZE = 300;
void print_array(int array[],int size);
void merge_sort(int array[], int size);
void merge(int left_arr[], int right_arr[], int left, int right,int array[]);
//merge sort
int main() {
int array[SIZE];
int size = SIZE;
srand(0);
for (int i = 0;... | ALGO | 0.999775 | 5.192225 |
783377e8-69c1-42d0-83b0-4170d2dc202b | twindb/twindb-xtrabackup-80 | boost_1_68_0/libs/geometry/example/c02_custom_box_example.cpp | // Boost.Geometry (aka GGL, Generic Geometry Library)
#include <iostream>
#include <boost/geometry/algorithms/make.hpp>
#include <boost/geometry/algorithms/within.hpp>
#include <boost/geometry/geometries/register/point.hpp>
#include <boost/geometry/geometries/register/box.hpp>
#include <boost/geometry/strategies/stra... | ALGO | 0.994429 | 6.868388 |
e6e90177-cc0d-412a-8176-d2b93b07ad5e | AllenHuangGit/ompl-1.6.0 | src/ompl/base/spaces/src/DubinsStateSpace.cpp | /* Author: Mark Moll */
#include "ompl/base/spaces/DubinsStateSpace.h"
#include "ompl/base/SpaceInformation.h"
#include "ompl/util/Exception.h"
#include <queue>
#include <boost/math/constants/constants.hpp>
using namespace ompl::base;
namespace
{
const double twopi = 2. * boost::math::constants::pi<double>();
... | ALGO | 0.998144 | 7.867403 |
fbce2c36-6f30-4c2b-9157-9d63d88ab2a3 | mikalinin/FPMI_algorithms | 3contest/taskF.cpp | #include <algorithm>
#include <array>
#include <cmath>
#include <iostream>
#include <vector>
class Tree {
std::vector<std::vector<long long>> tree;
int size_;
int Size(int num) {
int count = 0;
while (num > 0) {
++count;
num /= 2;
}
return pow(2, count);
}
public:
Tree(int num) {
... | ALGO | 0.999979 | 5.138934 |
e0fadffd-095c-4ac1-8499-eb56c2d3aaae | LiquidPlayer/LiquidCore | deps/boost_1_66_0/libs/sort/example/randomgen.cpp | // See http://www.boost.org/libs/sort for library home page.
#include <boost/random/mersenne_twister.hpp>
#include <boost/random/uniform_int_distribution.hpp>
#include <stdio.h>
#include "stdlib.h"
#include <fstream>
#include <iostream>
using namespace boost;
int main(int argc, const char ** argv) {
random::mt1993... | TOOL | 0.993298 | 4.155019 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.