uuid string | repo_name string | relative_path string | content string | category string | algo_rel_score float64 | quality_score float64 |
|---|---|---|---|---|---|---|
e520c0d0-61b8-45c1-82b0-65fe0770ddc0 | Yawn-Sean/Daily_CF_Problems | daily_problems/2025/03/0306/personal_submission/cf1340b_lengli.cpp | /*
lengli_QAQ
Hope there are no bugs!!!
*/
#include <bits/stdc++.h>
#define fastio std::ios::sync_with_stdio(0); std::cin.tie(0); std::cout.tie(0)
#define all(x) x.begin(),x.end()
#define pb push_back
#define i64 long long
void solve(){
int n,m;
std::cin>>n>>m;
std::vector<std::string> q={"1110111", "00100... | ALGO | 0.999949 | 4.32703 |
aef4acb7-a380-454f-b095-e219a435d39c | MasterIceZ/IMSO | 17/o59/o59_oct_c2_triangle.cpp | /*
* AUTHOR : Hydrolyzed~
* SCHOOL : RYW
* TASK : Triangle Art
* ALGO : Dynamic Programming
* DATE : 31 Jan 2022
* */
#include<bits/stdc++.h>
using namespace std;
#ifdef _DEBUG
#include "template.hpp"
#else
#define dbg(...) 0
#endif
using ll = long long;
const int MOD = 1e9 + 7;
int dp[111][111];
int n, k;... | ALGO | 0.999892 | 4.672575 |
c7049ad3-dcc9-438d-8b39-bfd2981c65c3 | karankumbhar47/coding | c++/codeChef/incrdec.cpp | #include <bits/stdc++.h>
#include<iostream>
#include<vector>
#include<algorithm>
#define lli long long int
#define ll long long
using namespace std;
int main()
{
lli t;
cin>>t;
while(t--){
lli n;
cin>>n;
lli arr[n];
for (lli i = 0; i < n; i++){
cin>>arr[i];
... | ALGO | 0.999813 | 3.676121 |
82eda20b-36a9-48d3-bb0d-97783131490c | HyunwooParkk/algospot | 최대증가부분수열(알고스팟 예제).cpp | #include<iostream>
#include<vector>
#include <algorithm>
#include <string>
using namespace std;
int cache[100],S[100];
int n;
/*int lis(const vector<int>& A){
if(A.empty())
return 0;
int ret=0;
for(int i=0; i<A.size(); i++)
{
vector<int> B;
for(int j=i+1; j<A.size(); j++)
if(A[i] < A[j])
B.push_back... | ALGO | 0.999948 | 3.895984 |
8b2a38e6-563e-4b26-b788-1165438d07d2 | Rahul-skush/leetcode-solutions | 258-add-digits/258-add-digits.cpp | class Solution {
public:
int addDigits(int num) {
while(num>9)
{
int sum =0;
while(num)
{sum += num%10; num/=10;}
num = sum;
}
return num;
}
}; | ALGO | 0.999865 | 6.267964 |
fd8859d1-2303-4071-ade6-bb73afd6afe9 | ishandutta2007/codeforces | archuser84/normal/484/D.cpp | ///
/// Hashire sori yo
/// Kaze no you ni
/// Tsukimihara wo
/// PADORU PADORU
///
#include <bits/stdc++.h>
#define Loop(x,l,r) for(ll x = ll(l); x < ll(r); ++x)
#define LoopR(x,l,r) for(ll x = ll(r)-1; x >= ll(l); --x)
#define Kill(x) exit((cout << (x) << '\n', 0))
typedef long long ll;
typedef s... | ALGO | 0.999941 | 4.083558 |
adb34e9a-a11d-4200-bfdf-de7fb44736d4 | Giangattt123/DSA_PTIT | C++_DSA_PTIT/DSA01002.cpp | #include<bits/stdc++.h>
using ll = long long;
using namespace std;
const int maxn = 1005;
int n , k , ok;
int a[maxn];
void sinh(){
int i = k;
while(i >= 1 && a[i] == n - k + i) --i;
if(i == 0) ok = 0;
else{
a[i]++;
for(int j = i + 1 ; j <= n ; j++)
a[j] = a[j - 1] + 1;
}
}
int main(){
int t;
cin >> t;
w... | ALGO | 0.99997 | 3.252096 |
d00ef61c-9d9e-4f47-9951-b40996cb1903 | AkshayKohad/Leetcode-Problems | Dynamic Programming/Triangle.cpp | class Solution {
public:
int solve(int i,int j,int &n,vector<vector<int>>&triangle,unordered_map<int,unordered_map<int,int>>&memo)
{
if(i==n)
return 0;
if(memo.find(i)!=memo.end() && memo[i].find(j)!=memo[i].end())
return memo[i][j];
int ans... | ALGO | 0.999994 | 6.308396 |
6a3d4a1d-31e3-4037-a9f6-5e868ae232b4 | SmoothKat/external_skia | src/pathops/SkAddIntersections.cpp | #include "SkAddIntersections.h"
#include "SkPathOpsBounds.h"
#if DEBUG_ADD_INTERSECTING_TS
static void debugShowLineIntersection(int pts, const SkIntersectionHelper& wt,
const SkIntersectionHelper& wn, const SkIntersections& i) {
SkASSERT(i.used() == pts);
if (!pts) {
... | ALGO | 0.990159 | 6.1707 |
49634979-836e-4c9a-9103-d635ba75fec6 | moondemon68/cp | ITEBE/0DIv3/E.cpp | #include <bits/stdc++.h>
using namespace std;
int main () {
int n;
cin >> n;
int a[200005];
for (int i=1;i<=n;i++) cin >> a[i];
a[n+1]=-1;
int ans=0,cnt=0;
for (int i=1;i<=n;i++) {
if (a[i+1]<=a[i]*2&&a[i+1]!=-1) {
cnt++;
continue;
} else {
ans=max(ans,cnt);
cnt=0;
}
}
cout << ans+1 << endl... | ALGO | 0.999953 | 3.84296 |
070efc78-584a-4df8-9ec2-c7808250568a | sa-y-an/leetAction | solutions/problems/permutation_in_string/solution.cpp | class Solution {
public:
bool checkInclusion(string s1, string s2) {
string m1(26,0), m2(26,0);
for( auto ch : s1) m1[ch-'a']++;
for( int r = 0 ; r < s2.size() ; r++){
m2[s2[r]-'a']++;
if( r >= s1.size() ) m2[s2[r-s1.size()] - 'a']--;
... | ALGO | 0.999928 | 6.217819 |
2410349b-64ec-45f9-b07f-041c7fde485c | SC23-apdx298/Mixed-BLAS-Evaluation | dense/magma-2.7.1/magmablas/zherk.cpp | /*
-- MAGMA (version 2.7.1) --
Univ. of Tennessee, Knoxville
Univ. of California, Berkeley
Univ. of Colorado, Denver
@date February 2023
@precisions normal z -> s d c
@author Azzam Haidar
@author Ahmad Abdelfattah
*/
#include "magma_internal.h"
#define PRECISION_z... | ALGO | 0.995089 | 5.961026 |
d136f857-6e55-4631-90f9-2ddd4548d974 | Ayandip244/Leetcode_Daily-Questions | 07.04.2025.cpp | class Solution {
public:
bool canPartition(vector<int>& nums) {
int s = accumulate(nums.begin(), nums.end(), 0);
if (s % 2 == 1) {
return false;
}
int n = nums.size();
int m = s >> 1;
bool f[n + 1][m + 1];
memset(f, false, sizeof(f));
f[0][... | ALGO | 0.999944 | 5.979235 |
b854e5ab-69f3-4034-9a4a-c276e7e624e4 | mmbrites/Think-Like-A-Programmer | Chapter 2/Exercises/2-7.cpp | #include <iostream>
using std::cin;
using std::cout;
#define END_OF_LINE_ASCII_CODE 10 // this 'code' can vary depending on the operating system, '10' works for Fedora Linux
bool isPowerOf2(int x) { return x > 0 && !(x & (x - 1)); }
std::string base10tobase2(std::string numberToConvert, int isPowerOf2) {
int nu... | ALGO | 0.998907 | 5.785324 |
13e4e690-ed78-434b-b5a7-9030b6a6ab2b | adrialva/C-_Projects | multiplicacion.cpp/main.cpp | #include<iostream>
using namespace std;
int main (int argc, char *argv[]) {
int b=1000;
int c=0;
int a=0;
int d=0;
cout <<"Escriba numero que desa multiplicar";
cin >> a;
while (c!=b){
d=a*c;
cout << a"x"c"="d;
c=c+1;
}
if (c==b){
cout <<d;
}
return 0;
}
| ALGO | 0.998157 | 3.098066 |
628a5e0d-823e-44bc-bc3a-5bfd6b27509e | n1ghtk1ng/DSA | Coding Blocks/lpfall 2016/Coding-Problems-master/Coding/Manmohan Gupta/4.3 Fibonacci Series Recursion.cpp | #include<iostream>
using namespace std;
int a[100];
int fib(int);
int main(){
int n;
cout<<"Enter a Number for Fibonacci ";
cin>>n;
fib(n);
a[0]=1;a[1]=1;
for(int i=0;i<n;i++){
cout<<a[i]<<endl;
}
return 0;
}
int fib(int n){
a[0]=1;a[1]=1;
if(n==0||n==1)
return a[1];
a[n]=fib(n-1)+fib(n-2);
return a[n];
... | ALGO | 0.999761 | 3.604177 |
a62865b4-5af1-477d-92c9-508f71deb581 | yanyunfei123/ask_anything | video_chat_text/video_chat_with_ChatGPT/models/grit_src/third_party/CenterNet2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cpu.cpp | namespace detectron2 {
template <typename T>
void box_iou_rotated_cpu_kernel(
const at::Tensor& boxes1,
const at::Tensor& boxes2,
at::Tensor& ious) {
auto num_boxes1 = boxes1.size(0);
auto num_boxes2 = boxes2.size(0);
for (int i = 0; i < num_boxes1; i++) {
for (int j = 0; j < num_boxes2; j++) {
... | ALGO | 0.990931 | 7.186255 |
4c56644f-cc87-495f-be68-367b352aaff2 | bobur554396/PPI2021FALL | w1/1.cpp | #include <iostream>
using namespace std;
// Variables -- box, data holder, stack
// Data types -- int -- integer [1, 2, 4, 5, 100, -10, ....]
// Variable name rules:
/*
1) name can not be started with numbers
2) name can not be only number
3) names can be only in range of [a-zA-Z0-9_]
valid ... | ALGO | 0.86086 | 3.230325 |
fbe60d5c-115a-4cb7-95df-df41457f7d04 | Mayoahamy/TP7 | TP7E2.cpp | #include<iostream>
#include<vector>
using namespace std;
class num{
private:
int n1,n2;
public:
void inicializar();
void mayor();
};
void num::inicializar(){
cout<<"Ingresar un numero entero: ";
cin>>n1;
cout<<"Ingresar otro numero entero: ";
cin>>n2;
}
void num::mayor(){
if(n1>n2){
cout<<n1<<" es el may... | ALGO | 0.960904 | 3.615496 |
19b6d795-6a31-4252-8fb3-88cfa30e7575 | Vladlubeka/Classwork | 12.11.2023.cpp | // ConsoleApplication9.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//
#include <algorithm>
#include <iostream>
#include <cmath>
#include <vector>
#include <Windows.h>
using namespace std;
class Person {
private:
string name;
int age;
public:
Person(stri... | ALGO | 0.999103 | 5.231274 |
38a0ce5b-06bd-4dcd-b247-f80cc0c46cff | octavcosmin/programming-projects | CPP/pbinfo.ro/#247_CifreOrd1/main.cpp | #include <fstream>
using namespace std;
ifstream fin("cifreord1.in");
ofstream fout("cifreord1.out");
int fr[10];
int main() {
char x;
while(fin >> x) {
if(x == ' ') continue;
++fr[x - '0'];
}
int out{0};
for(int c = 9; c >= 0; --c) {
while(fr[c]--) {
if(out %... | ALGO | 0.999173 | 3.503121 |
7a4c191c-5745-4bfe-9731-65cff4edd906 | 113bommy/deepmind_codecontests_refine | cpp_source_filter_file/cpp_test_148_3.cpp | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int w, h, k, j, g, area = 0;
long long int t, i;
cin >> t;
for (i = 1; i <= t; i++) {
long long int max1 = 0, max2 = 0, max3 = 0, max4 = 0, min1 = 10000000,
min2 = 10000000, min3 = 10000000, min4 = 10000000;
area = 0;... | ALGO | 0.998398 | 3.237843 |
c9a1c15d-a9a1-4597-8770-9400cba66603 | Lazynx/ADS-CPP-2024 | lab4/b.cpp | #include <iostream>
#include <unordered_map>
#include <vector>
#include <string>
using namespace std;
struct TreeNode {
int val;
TreeNode* left;
TreeNode* right;
TreeNode(int x) : val(x), left(nullptr), right(nullptr) {}
};
TreeNode* insert(TreeNode* root, int val) {
if (root == nullptr) {
... | ALGO | 0.999922 | 5.986929 |
06a2f042-6672-4635-b634-0935fe71e62b | rameenejaz/cpp-practice | while-loop-1.cpp | #include <iostream>
using namespace std;
int main () {
int number=0;
int sum=0;
int i=0;
cout<<"Enter a positive number: ";
cin>>number;
while (number>=i) {
sum=sum+i;
i++;
}
cout<<"The sum of the numbers is: "<<sum;
} | ALGO | 0.989334 | 3.382357 |
f968f193-daeb-4947-9e9c-1a1e8a707723 | b1urberry/repo759 | HW08/task1.cpp | #include <iostream>
#include <cstdlib>
#include <ctime>
#include <ostream>
#include <random>
#include <chrono>
#include <cmath>
#include <vector>
#include "matmul.h"
// namespace shortcuts
using namespace std;
using std::cout;
using std::endl;
using std::chrono::high_resolution_clock;
using std::chrono::duration;
usi... | ALGO | 0.959153 | 4.994882 |
4fde230a-1eaa-4acc-8629-18acf4c991e6 | nguyenngan0496/UIT_Cpp | Lesson2/BT/BT1.cpp | #include <iostream>
using namespace std;
int main()
{
int a, b, c, d;
cout << "Nhap lan luot a, b, c, d =";
cin >> a >> b >> c >> d;
float tb = (float)(a+b+c+d)/4;
cout << "Trung binh cong a, b, c, d =" << tb << endl;
return 0;
}
| ALGO | 0.98994 | 3.305662 |
27bc325a-a090-4bdc-bfcd-2eff73cdb3ef | kshibata101/programming_contest | ant_book/2_novice/1_search/1_recursive.cpp | #include <iostream>
using namespace std;
int fact(int n) {
if (n == 0) return 1;
return n * fact(n - 1);
}
int fib (int n) {
if (n <= 1) return 1;
return fib(n-1) + fib(n-2);
}
int main() {
int res = fact(5);
cout << "fact 5: " << res << endl;
res = fib(10);
cout << "fib 10: " << res << endl;
ret... | ALGO | 0.997383 | 5.43001 |
f80ba766-0a1d-47b2-8c39-b8ea9d77adf8 | withtahmid/cp | Codeforces/000011Previous/PROBLEMSET/EVEN ODDS.cpp | /**
*
* withtahmid
* Twins
*
* */
#include<bits/stdc++.h>
using namespace std;
#define boostIO ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
#define endl "\n"
#define nl cout<<endl
#define ll long long
#define nn int n; cin>>n
#define lln long long n; cin >> n
#define vi(n) vector<int>v(n)
#d... | ALGO | 0.999759 | 3.244016 |
e2c28581-3567-43ad-9dd1-b6286131ab9e | ngctnnnn/evo_optim_cpp | include/boost/libs/sort/example/charstringsample.cpp | // See http://www.boost.org/libs/sort for library home page.
#include <boost/sort/spreadsort/string_sort.hpp>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include <vector>
#include <iostream>
#include <fstream>
#include <string>
using std::string;
using namespace boost::sort::spreads... | ALGO | 0.998387 | 4.709655 |
40877c26-ece6-4fd0-a308-52b92f6cb48f | ishandutta2007/codeforces | eliden/normal/NA/102.cpp | #include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;++i)
#define debug(x) cerr<<#x<<": "<<x<<endl
#define sz(x) (int)(x).size()
using ll = long long;
using vi = vector<int>;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int MAXA=102;
vi count(MAXA,-1);
int... | ALGO | 0.999999 | 3.549607 |
4db41ede-1893-41ba-b06c-059bc92b74dd | Friox/study-algorithm | boj/9020.cpp | #include <stdio.h>
#include <math.h>
int main() {
const int LIMIT=10001;
int sqrtlimit = (int)sqrt((double)LIMIT);
bool p[LIMIT] = {1,1,0};
for (int i=2; i<=sqrtlimit; i++) {
if (!p[i]) {
for (int j=i*i; j<LIMIT; j+=i) p[j]=1;
}
}
int tc;
scanf("%d", &tc);
while (tc--) {
int n, h;
scanf("%d", &n);
... | ALGO | 0.999798 | 3.552319 |
5a1c39b1-737e-4f0f-9230-d4f922eeba0e | goaladdin/ald | src/ripple/peerfinder/impl/Bootcache.cpp |
#include <ripple/peerfinder/impl/Bootcache.h>
#include <ripple/peerfinder/impl/iosformat.h>
#include <ripple/peerfinder/impl/Tuning.h>
#include <ripple/basics/Log.h>
namespace ripple {
namespace PeerFinder {
Bootcache::Bootcache (
Store& store,
clock_type& clock,
beast::Journal journal)
: m_store (stor... | TOOL | 0.899989 | 7.513467 |
e50d85f6-88e1-4895-9262-57bcdd06b82d | hargun0360/PROBLEM-SOLVING | Practice Problems Codeforce/B_Borze.cpp | #include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main(){
string s; cin>>s;
for(ll i=0;i<s.length();i++){
if(s[i]=='.'){
cout<<0;
}else if(s[i]=='-'){
if(s[i+1]=='-')
cout<<2;
else cout<<1;
i++;
}
}
return 0;
} | ALGO | 0.999824 | 3.391011 |
8a270499-f379-4779-b729-25d46834ef8e | LucasPTL/EAGRO-GESTOR | frontend/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.998396 | 6.76073 |
c5640b79-9cc3-4c53-9b64-b73f11749bd3 | aakash112005/C-DSA | c language/addition of two complex numbers.cpp | #include<stdio.h>
int main()
{
int i;
printf ("ENTER 1 FOR ADDITION \nENTER 2 FOR SUBRACTION\nENTER 3 FOR MULTIPLICATION\nENTER 4 FOR DIVITION \n");
scanf ("%d\n",i);
switch (i)
{
case 1:
{
printf ("FOR ADDITION\n");
float a,b,c,d;
printf ("for first complex number enter the : \nreal part \nimagnery part\n "... | ALGO | 0.938258 | 3.039358 |
6061c68f-bb97-4fb4-9a33-196e5a6441aa | RainbowZerg/X-Ray_Engine_1.5.1.0 | src/utils/xrCompress/xrCompressDifference.cpp | #include "stdafx.h"
#ifndef MOD_COMPRESS
string_path target_folder;
string_path new_folder, old_folder;
struct file_comparer{
enum modes{eDontCheckFileAge=1, eDontCheckCRC=2, eDontCheckBinary=4, eDontCheckFileSize=8};
Flags32 m_flags;
string_path m_short_name;
string_path m_full_name;
CLocatorAPI* m_fs_new;
C... | TOOL | 0.921751 | 3.82378 |
d3a2e69d-c68e-4bb8-b589-59f5d2672ad6 | vgteam/GetBlunted | src/Duplicator.cpp | #include "Duplicator.hpp"
namespace bluntifier{
Duplicator::Duplicator(
const vector <vector <BicliqueEdgeIndex> >& node_to_biclique_edge,
OverlapMap& overlaps,
Bicliques& bicliques,
map <nid_t, set<nid_t> >& parent_to_children,
map <nid_t, pair<nid_t, bool> >& child_to_parent,... | ALGO | 0.976806 | 7.06714 |
b97d8e22-13a2-47b7-a36f-73e6521e1296 | ngocdaitran2003/Ky_thuat_lap_trinh | KTDAYSO001.cpp | #include<iostream>
using namespace std;
bool isArithmeticProgression(long long a[], int n) {
if(n == 2 || n == 1)
{
return true;
}
else
{
int d = a[1] - a[0];
for (int i = 2; i < n; i++) {
if (a[i] - a[i - 1] != d) {
return false;
}
... | ALGO | 0.999643 | 4.240445 |
6f189e49-cd59-4a0c-95ef-805cb90a44a6 | Labonno120/code_part4 | gravity flip.cpp | #include<iostream>
using namespace std;
int main()
{
int array[101];
int i,temp,n,j;
cin>>n;
for(i=0;i<n;i++)
{
cin>>array[i];
}
for(i=0;i<n-1;i++)
{
for(j=0;j<n-i-1;j++)
{
if(array[j]>array[j+1])
{
temp= array[j];
array[j... | ALGO | 0.99998 | 3.806232 |
3c788957-daba-4a7d-ba1e-36086aadadc7 | Mahmoudezzat00/C-plus-plus | Practice/legnagyobbkozososzto/main.cpp | #include <iostream>
using namespace std;
int GreatestComDiv(int First, int Second)
{
int Temp;
while(Second > 0)
{
Temp = Second;
Second = First%Second;
First = Temp;
}
return First;
}
int main()
{
int First;
int Second;
int GCD;
cout << "Enter two Z numbe... | ALGO | 0.999402 | 4.815385 |
238fcb2c-58bf-4dbe-a39f-300fb039ff44 | JoanneHCH/NYU-Tandon-Bridge-HW | ch4648_hw16_q1.cpp | #include <fstream>
#include <iostream>
#include <stack>
#include <string>
using namespace std;
void openInputFile(ifstream& inFile) {
string filename;
cout << "Enter the filename: ";
cin >> filename;
inFile.open(filename);
while(!inFile) {
cout << "FILE FAILED TO OPEN!\n";
cout << ... | ALGO | 0.901342 | 6.033121 |
be509022-bb19-4f1a-9b25-ed5620412599 | happyZYM/OI-source | history_source/ccf 入门篇/U5/5.2.3.cpp | #include<iostream>
using namespace std;
int main()
{
bool p[52];
for(int i=0;i<52;i++) p[i]=1;
for(int i=2;i<=52;i++)
{
for(int a=1;a*i<=52;a++) p[a*i-1]=!p[a*i-1];
}
for(int i=0;i<52;i++) if(p[i]) cout<<i+1<<" ";
while(true);
}
| ALGO | 0.990509 | 3.006744 |
37165b72-a896-4656-93f7-38e5357dd6fe | ahmedfarhat25/Problem-Solving-Training | Phase 2.2/String Problems/Round 102 B - Help Kingdom of Far Far Away 2.cpp | ////\*------------------ #Abu_Farhat -----------------------------------*/
////\*---------------------------------- #فلسطين حرة --------------------*/
///*
// *
// | | ____| __ \| ____| ____| | __ \ /\ | | /\ / ____|__ __|_ _| \ | | ____|
// | |__ | |__) | |__ | |__ | |__) / \ | | ... | ALGO | 0.998366 | 4.012113 |
ab793989-f667-4210-97f2-3939a939529f | NasmeenI/ComOlympic | Camp_2/Exam/64/test3/Stone.cpp | #include <bits/stdc++.h>
#define N 1010
using namespace std;
using pi = pair<int,int>;
using ppi = pair<int,pi>;
int n,m,k,sum;
vector<int> parent(N);
vector<ppi> edges;
int root(int u){
if(parent[u] == u) return u;
return parent[u] = root(parent[u]);
}
int main(){
ios_base::sync_with_stdio(0);
cin.t... | ALGO | 0.999974 | 4.420363 |
58422024-b391-46dc-aeda-03886c509729 | infinitydaemon/OpSec-Kernel | mesa-vulkan/src/intel/compiler/brw_lower_dpas.cpp | #include "brw_shader.h"
#include "brw_builder.h"
static void
f16_using_mac(const brw_builder &bld, brw_inst *inst)
{
/* We only intend to support configurations where the destination and
* accumulator have the same type.
*/
if (!inst->src[0].is_null())
assert(inst->dst.type == inst->src[0].type);
... | ALGO | 0.852946 | 7.095438 |
140370d0-8f34-4c67-82f2-ece095545d7c | GiorCocc/FondProg | Svolte/es1_3.cpp | #include<iostream>
#include<math.h>
const int N = 3;
using namespace std;
int main() {
float x1, x2, soglia;
int n[N] = { 81,9,6 };
soglia = 0.00001;
for (int i = 0; i < N; i++)
{
x2 = 1.0;
do {
x1 = x2;
x2 = 0.5 * (x1 + n[i] / x1);
} while (abs(sqrt(n[i]) - x2) > soglia);
cout << "La radice del nu... | ALGO | 0.999631 | 3.584827 |
dec85599-de49-42b0-b1ec-c6211a25f4e9 | khadija1114/Online-Judge-Solutions | Codeforces/1354C2.cpp | #include<bits/stdc++.h>
#define mp make_pair
#define ff first
#define ss second
#define pb push_back
#define w(x) scanf("%d",&x);while(x--)
#define rep(i,a,b) for(i=a;i<=b;i++)
#define ios ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define pi 2*acos(0.0)
using namespace std;
typedef long long ll;
typedef pair... | ALGO | 0.998641 | 3.626554 |
4849b3c9-5262-41c6-a9dc-9ea757793a3e | MSP07/LeetCode-Solutions-CPLUSPLUS | RemoveDigitFromNumberToMaximise.cpp | //approach
//iterate through array find the digit
//except that add the remaining to ans
//and check whether that val is greater than the prev greater and replace it
//finally return the maxResult
class Solution{
public:
string removeDigit(string number,char digit){
int n = number.size();
string max... | ALGO | 0.999955 | 6.251186 |
890e3a06-03da-403d-84e0-f6bc09d37df9 | miteshkumar77/LC | maximum-number-of-points-with-cost/Runtime Error/7-17-2021, 10:58:56 PM/Solution.cpp | // https://leetcode.com/problems/maximum-number-of-points-with-cost
class Solution {
public:
long long maxPoints(vector<vector<int>>& points) {
int n = points.size(); int m = points[0].size();
vector<vector<int>> dp(n, vector<int>(m, 0));
dp[0] = vector<int>(points[0].begin(), points[0].end... | ALGO | 0.999986 | 5.815611 |
0eb8e6c5-08e7-4959-97a3-d3bc904a3e61 | Ukeme-Edet/CodeForces | 1920b_sg.cpp | #include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
short t;
int n, k, x, sum, i;
cin >> t;
while (t--)
{
cin >> n >> k >> x;
vector<short> a(n);
vector<short> dp(n + 1);
sum = 0;
for (short &i : a)
cin >> i;
sort(a.rbegin(), a.rend());
for (i = 0; ... | ALGO | 0.99961 | 3.505175 |
3b4e6268-a845-47f7-82eb-49bc3687c280 | rapel02/competitive-programming | UVa/11138_2.cpp | #include <stdio.h>
#define MAX_BOLTS 500
#define MAX_NUTS 500
/*~global~copy~of~the~input~data~*/
int nuts,bolts;
int fits[MAX_BOLTS][MAX_NUTS];
void read_input_data(void)
{
int n,b;
scanf("%d%d",&bolts,&nuts);
for(b=0;b<bolts;b++){
for(n=0;n<nuts;n++){
scanf("%d",&fits[b][n]);
}
}
}
/* data used to match n... | ALGO | 0.98668 | 3.929378 |
af537bad-7b2c-4789-acfb-369cb315ce11 | oguzhan18/gokturk_keyboard | 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 |
b2f9e14f-972a-46c5-a216-09f310990da9 | ishandutta2007/codeforces | radal/normal/335/B.cpp | #include <bits/stdc++.h>
#pragma GCC target ("avx,avx2,fma")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#define X first
#define Y second
#define debug(x) cerr << #x << ": " << x << endl;
#define endl '\n'
#define pb push_back
#define mp make_pair
#define rep(i,l,r) for (int i=l; i<r; i++)... | ALGO | 0.999997 | 3.592159 |
b94ce104-1565-4d6f-98e6-337465096064 | longJ91/Algorithm | Baekjoon/삼성SW역량테스트기출문제/시험 감독.cpp | // : https://www.acmicpc.net/problem/13458
// Z SW
// 23 ɸ
#include <iostream>
using namespace std;
unsigned long long result = 0;
int room[1000000];
int main() {
int N;
cin >> N;
for (int i = 0; i < N; i++) cin >> room[i];
int B, C;
cin >> B >> C;
for (int i = 0; i < N; i++) {
room[i] -= B;
result++;
}
f... | ALGO | 0.999915 | 3.622324 |
d9747d96-dd0a-4cd7-bd5f-8c9b258c908d | John-Poulos/Think-Like-a-Programmer | Chapter 2/TLAP Exercise 2-3.cpp | // TLAP Exercise 2-3.cpp : This file contains the 'main' function. Program execution begins and ends there.
//Using only single character output statements that output a hash mark, a space, or an end of line, write a program that produces the following shape:
//# #
// ## ##
// ### ###
// #... | ALGO | 0.997838 | 4.285368 |
22a9c2b7-90f7-41d7-b2fc-3820d4191359 | veeresh-desai/OBJECT-ORIENTED-PROGRAMMING | unit 1-Concepts and Basics of C++ Programming& functions/lecture 8/factorial.cpp | // You are using GCC
#include<iostream>
using namespace std;
int factorial(int n){
if(n==0||n==1){
return n;
}
return n*factorial(n-1);
}
int main(){
int n;
cin>>n;
int result=factorial(n);
cout<<result;
} | ALGO | 0.999992 | 5.672969 |
e88a6bdf-cee7-4fe3-8bfe-6c44f5feeeaf | Shoyeb45/DataStructureAndAlgorithm | LeetCodeQuestions/229-majority-element-ii/majority-element-ii.cpp | class Solution {
public:
vector<int> majorityElement(vector<int>& nums) {
int num1 = 0, num2 = 0, cnt1 = 0, cnt2 = 0;
for (int x : nums) {
if (x == num1) {
cnt1++;
} else if (x == num2) {
cnt2++;
} else if (cnt1 == 0) {
... | ALGO | 0.99998 | 5.762216 |
2f16e373-4b8e-4fe4-bf80-6a8cc9f617e9 | Vishu-hp/FJP-DSA | Level 2/Hashmap/pairsWithEqualSum.cpp | #include <bits/stdc++.h>
using namespace std;
bool solution(vector<int>& arr, int n) {
// write your code here
unordered_set<int>ust;
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
int sum = arr[i]+arr[j];
if(ust.find(sum)==ust.end()){
ust.insert(sum);
}
else{
... | ALGO | 0.999906 | 4.594059 |
51848307-2b37-420e-9ae7-38928b96194f | HaojieZhang6848/yahboomcar_ros2_ws | software/library_ws/src/costmap_converter-ros2/costmap_converter/src/costmap_to_dynamic_obstacles/multitarget_tracker/Ctracker.cpp | #include <costmap_converter/costmap_to_dynamic_obstacles/multitarget_tracker/Ctracker.h>
// ---------------------------------------------------------------------------
// Tracker. Manage tracks. Create, remove, update.
// ---------------------------------------------------------------------------
CTracker::CTracker(co... | ALGO | 0.997126 | 6.132886 |
8ccbe591-4527-4be2-a015-0bae3758d735 | gerardggf/tv | 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.998762 | 6.786404 |
33daf641-62ad-44df-9cc2-9107b2851229 | rushi718/Competitive-Coding | Codeforces/Practice/B_ICPC_Balloons.cpp | #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define fo(i,j,n) for(int i=(j);i<((int)n);++i)
const int mod = 1e9 + 7;
const int N = 1e3 + 5;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
#define maxv(v) *max_element(v.begin(), v.end())
#defin... | ALGO | 0.999962 | 4.217272 |
89db5bf9-6b78-4b5a-831b-4ca46a2a5970 | chaocaonhan/codeCpp | Buoi5/b10.cpp | #include<iostream>
using namespace std;
int giaiThua(int n){
int gt=1;
for(int i=1;i<=n;i++){
gt*=i;
}
return gt;
}
int main(){
int n;
cin>>n;
for(int i=0;i<n;i++){
for(int j=0;j<=i;j++){
int temp=giaiThua(i)/(giaiThua(j)*giaiThua(i-j));
cout<<temp<<... | ALGO | 0.999956 | 3.866286 |
8ef75676-aa99-4026-8989-2ba6f164b5d2 | vucongtuanduong/dsa-codeptit | submit/algo-design/dynamic-programming/dsa05020/dsa05020.cpp | #include <bits/stdc++.h>
using namespace std;
void testCase();
int main() {
// Write your code here
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int t;
cin >> t;
while (t--) {
testCase();
cout << endl;
}
return ... | ALGO | 0.999921 | 4.998035 |
4d2aea3b-55ae-4f58-a6a2-0a0de86040ea | Tencent/WeChat-TFCC | tfcc/core/operations/tfcc_base.cpp | #include "tfcc_base.h"
#include "exceptions/tfcc_invalidargumenterror.h"
#include "framework/tfcc_types.h"
#include "framework/tfcc_view.h"
#include "interfaces/tfcc_basicinterface.h"
#include "interfaces/tfcc_datainterface.h"
#include "operations/tfcc_operation.h"
namespace tfcc {
namespace base {
template <class T... | TOOL | 0.904896 | 7.290553 |
d844ad18-8f4e-44b1-9469-51a62bfeca1a | trungdangtapcode/Competitive-Programming-Notebook | archived/school_laptop_02092023/cses1689.cpp | #include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> ii;
typedef pair<int,ii> iii;
int dx[8] = {2,1,-1,-2,-2,-1,1,2}, dy[8] = {1,2,2,1,-1,-2,-2,-1};
int x, y, board[9][9];
int danhgia(int x, int y){
int res = 0;
for (int i = 0; i < 8; i++){
int xx = x + dx[i], yy = y + dy[i];
if (xx>=1&&xx<=8&&yy>... | ALGO | 0.999772 | 3.902256 |
3687b64b-b158-435c-a633-fa19e1e20ed9 | ameijer/HHVM-tainttrack | hphp/runtime/vm/jit/region-tracelet.cpp | #include "hphp/runtime/vm/jit/region-selection.h"
#include "hphp/runtime/vm/jit/annotation.h"
#include "hphp/runtime/vm/jit/guard-relaxation.h"
#include "hphp/runtime/vm/jit/hhbc-translator.h"
#include "hphp/runtime/vm/jit/inlining-decider.h"
#include "hphp/runtime/vm/jit/ir-translator.h"
#include "hphp/runtime/vm/jit... | ALGO | 0.946552 | 5.408949 |
31a54b2f-9ac4-4cf9-874e-b5b7d411a6b1 | DinhHuyKhanh/Codeforces | 1566B.cpp | #include <bits/stdc++.h>
/**
* @author: huykhanh
* @create:
**/
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define ins(x) insert(x);
#define endl '\n'
#define vi(x) vector<int> x;
#define pi pair<int,int> x
#define tup tuple<int,int,int>
#define pb push_back
#define rsz resize... | ALGO | 0.999962 | 3.929048 |
245d69ff-cde6-4bd7-852f-f53d902cfa99 | YoungJooYoo/For_Coding_Test | LeetCode/384-shuffle-an-array/384-shuffle-an-array.cpp | class Solution {
public:
Solution(vector<int>& nums)
{
original = nums;
array_size = original.size();
}
vector<int> reset()
{
return original;
}
vector<int> shuffle()
{
vector<int> shuffled = original; // make a copy of the original
int leftSize = array_size;
for (int i = array_size - 1; i >... | ALGO | 0.999582 | 6.030797 |
d0e5579e-9b5b-46cb-9c4f-69ad32d5a8b6 | caojohnny/liftoff | liftoff-physics/liftoff-physics/drag.cpp | #include <cmath>
namespace liftoff {
// https://www.grc.nasa.gov/WWW/K-12/airplane/drageq.html
double calc_drag(double cd, double rho, double v, double a) {
return cd * rho * v * v / 2 * a;
}
// https://www.grc.nasa.gov/WWW/K-12/airplane/atmosmet.html#
static double calc_rho_ideal_state(do... | ALGO | 0.995616 | 5.847649 |
2b03b86b-7693-495a-bc13-90dd539836a6 | xujie-nm/Leetcode | 135_Candy.cpp | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
//二重循环TLE
//换成一层循环,使用数组记录信息
int candy(vector<int> &ratings){
if(ratings.size() == 1)
return 1;
vector<int> left(ratings.size(), 1);
vector<int> right(ratings.size(), 1);
for (int i = 1; i < rating... | ALGO | 0.999991 | 5.054951 |
999342ec-2a43-4767-9b00-a884967669b0 | margarethtj/Praktikum-SO | Codingan/UTS/c14220029_no1.cpp | #include <iostream>
using namespace std;
struct Node {
int data;
Node* next;
};
class LinkedList {
private:
Node* head;
public:
LinkedList() {
head = nullptr;
}
Node* getHead()
{
return head;
}
bool isEmpty() {
if (head == nullptr) {
return true... | ALGO | 0.999666 | 4.826846 |
97444072-7c55-4be9-9913-0691798f31e9 | ishandutta2007/codeforces | marckess/normal/1485/E.cpp | #include <bits/stdc++.h>
#define endl '\n'
#define fi first
#define se second
#define MOD(n,k) ( ( ((n) % (k)) + (k) ) % (k))
#define forn(i,n) for (int i = 0; i < int(n); i++)
#define forr(i,a,b) for (int i = a; i <= b; i++)
#define all(v) v.begin(), v.end()
#define pb push_back
using namespace std;
typedef long lo... | ALGO | 0.999917 | 3.916728 |
90fb3a60-3f35-4417-a576-a89f169a5ad8 | jinbooooom/coding-for-algorithms | LeetCode/322-零钱兑换/leetcode322.cpp | class Solution {
public:
int coinChange(vector<int>& coins, int amount) {
if (amount < 0 || coins.empty())
return -1;
vector<int> dp(amount + 1, amount + 1);
dp[0] = 0;
for (int i = 0; i < coins.size(); ++i)
for (int j = coins[i]; j <= amount; ++j)
... | ALGO | 0.999949 | 6.161577 |
999e4b12-ad2e-4906-8deb-15a39ee9c338 | BillySilver/Online-Judge | ZeroJudge/b074. F. 打不倒的樹木人 [DP].cpp | #include <iostream>
using namespace std;
unsigned dp[10001]={1,1}, n;
char s[10001];
int main() {
while (gets(s), s[0]-48) {
for (int i=2; i<strlen(s)+1; i++) {
if (s[i-1]=='0')
dp[i] = dp[i-2];
else if (s[i-2]=='1'|| (s[i-2]=='2'&&s[i-1]<='6'))
dp[i] = dp[i-2] + dp[i-1];
else dp[i] = dp[i-1];
}
... | ALGO | 0.999737 | 3.752091 |
b97a21d5-21c6-4252-8889-cacaa6f20fc6 | kurlepurajesh/cph-leetcode-helper | solution.cpp | #include <bits/stdc++.h>
#include "utilities.h"
#include "user_code.cpp"
using namespace std;
// ANSI escape codes for colored output
#define RESET "\033[0m"
#define GREEN "\033[32m"
#define RED "\033[31m"
#define YELLOW "\033[33m"
// Function to parse the input from the file
vector<string> parse_input(const string& ... | TEST | 0.970057 | 6.71403 |
a1df6b0f-ac30-4790-9471-2f25577424f5 | arnavarora1710/Competitive_Programming | Codeforces/1930C.cpp | // https://codeforces.com/contest/1930/problem/C
#pragma GCC optimize("Ofast")
#pragma GCC optimization("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> pi;
#define f first
#define s second
#define mp make_pair
#define MULTI_TEST (1)
const int maxn = 3e5 + 5, ... | ALGO | 0.999914 | 4.316586 |
035512a1-3891-4c4a-8fc4-654e3cfb3184 | Agam3108/Data_Structures-n-Algorithms | 1876-map-of-highest-peak/1876-map-of-highest-peak.cpp | class Solution {
private:
vector<int> dx = {-1,0,+1,0};
vector<int> dy = {0,+1,0,-1};
public:
bool isValid(int x,int y,vector<vector<int>> & grid){
int n = grid.size();
int m = grid[0].size();
if(x >=0 && x<n && y>=0 && y<m)
return true;
return false;
}
vector<vector<int>> highestPe... | ALGO | 0.999987 | 6.151368 |
798f5732-4cbf-4e8f-b307-618bb487e590 | charliealpha094/Programing---Principles-and-Practices-cpp | chapterFour/exercise_3/main.cpp | // Done by Carlos Amaral (2023/08/31)
#include "std_lib_facilities.h"
/* Read a sequence of double values into a vector. Think of each value as the distance between two cities along a given
route. Compute and print the total distance (the sum of all distances). Find and print the smallest and greatest distance
betwee... | ALGO | 0.989111 | 3.993162 |
74755a8d-0b7e-4c95-afb4-40a6ed72d66f | JulioMelo-Classes/lista-1-Danilo25 | intervalos/src/main.cpp | /*!
* @brief This code implements the Intervalos programming problem
* @author selan
* @data June, 6th 2021
*/
#include <iostream>
using namespace std;
#include <iomanip>
using std::setprecision;
// Se desejar, crie funções aqui, antes do main().
/*ok*/
int main(void)
{
int x=0,
val[6]={0,0,0,0,0,0};
... | ALGO | 0.986273 | 3.964846 |
4de8b3db-7939-45b0-952c-541d8ec0428d | qiaozishun4/CSP2024_BJ | BJ-Senior/answers/BJ-S01231/color/color.cpp | #include <bits/stdc++.h>
using namespace std;
int t;
int n;
int a[1000005];
int co[1000005];
long long cnt(){
int lastred = -1,lastblue = -1;
long long c = 0;
for(int i = 0;i<n;i++){
if(co[i] == 1){
if(lastred == -1){
lastred = i;
continue;
}el... | ALGO | 0.999742 | 4.354145 |
0c388968-0517-44c7-911b-d576b7cf1381 | ishandutta2007/codeforces | pyqe/normal/1422/D.cpp | #include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fr first
#define sc second
long long ln,n,ys,xs,yf,xf,nr[100069],inf=1e18;
pair<long long,long long> a[100069],as[2][100069];
vector<pair<long long,long long>> al[100069];
priority_queue<pair<long long,long long>> pq;
int main()
{
long long... | ALGO | 0.99988 | 3.587306 |
8d5d13ca-cfa2-42a3-abb4-4a149512b522 | Jikky1618/AtCoder | ABC/ABC150-199/ABC157/e-2.cpp | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef LOCAL
#include <debug_print.hpp>
#define debug(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__)
#else
#define debug(...) (static_cast<void>(0))
#endif
template<class Monoid>
struct SegmentTree {
int n;
vector<Monoid> dat;
f... | ALGO | 0.999465 | 5.432532 |
9e6299a6-b6e4-4bd4-9ed5-23a1c2e5b5ae | ratcht/1010z-code | src/subsystems/drivetrain.cpp | #include "subsystems/drivetrain.h"
void SpinDrive(float right, float left) {
//SPIN BASE (Values in RPM)
//Values are not adjusted to motor values
// LeftDrive.spin(forward, left/gearRatio, velocityUnits::rpm);
// LeftTop.spin(forward, left/gearRatio, velocityUnits::rpm);
// RightDrive.spin(forward, right/g... | TOOL | 0.981332 | 4.94663 |
eb3a3756-7add-4619-aafc-fb88fa5fa536 | mzed/RapidLib | dependencies/bayesfilter/src/filter_utilities.cpp | #include "filter_utilities.h"
void filtfilt(vector<double> const& b, vector<double> const& a, vector<double> & x, vector<double> & y, PADTYPE padtype, int padlen)
{
int ntaps = int(max(a.size(), b.size()));
if (padtype == NONE)
padlen=0;
unsigned int edge;
if (padlen < 0)
edge = nt... | ALGO | 0.997679 | 5.497412 |
0415194a-e629-4e45-a065-193640ba7eba | manpreetnub23/cG | polygon.cpp | #include <bits/stdc++.h>
using namespace std;
const int MAX_POINTS = 20;
int x_intersect(int x1,int y1,int x2,int y2,int x3,int y3,int x4,int y4) {
int n = (x1*y2 - y1*x2)*(x3 -x4) - (x1 - x2)*(x3*y4 - y3*x4);
int d = (x1 - x2)*(y3 - y4) - (y1 - y2)*(x3 - x4);
return n/d;
}
int y_intersect(int x1,int y1,int... | ALGO | 0.999884 | 4.276013 |
bf6d676a-3d1d-49cb-a125-d9121520470f | Spirit599/algorithm | leetcode/cpp/324_1.cpp | // 324. 摆动排序 II
// to be improve
class Solution {
public:
void wiggleSort(vector<int>& nums) {
vector<int> arr(nums);
sort(arr.begin(), arr.end());
int n = nums.size();
int cnt = n >> 1;
bool odd = n & 1;
int p1 = cnt - 1;
int p2 = n - 1;
if... | ALGO | 0.999978 | 5.199723 |
bf1b75d6-edbd-414c-9447-359e1a428ee6 | tschakravarty/clichouse-248 | src/Processors/QueryPlan/Optimizations/liftUpFunctions.cpp | #include <Interpreters/ActionsDAG.h>
#include <Processors/QueryPlan/ExpressionStep.h>
#include <Processors/QueryPlan/FillingStep.h>
#include <Processors/QueryPlan/Optimizations/Optimizations.h>
#include <Processors/QueryPlan/SortingStep.h>
#include <Common/Exception.h>
#include <DataTypes/IDataType.h>
namespace DB
{
n... | ALGO | 0.99049 | 7.823464 |
630ee792-78e8-4cdd-9390-e7db1695748f | tw113/datastructures | MAP/map.cpp | #include "map.h"
#include "bst.h"
#include <iostream>
using namespace custom;
template <class K, class V>
map<K, V>::map() {
}
template <class K, class V>
map<K, V>::map(const map <K, V>& map) {
bst = map.bst;
}
template <class K, class V>
map<K, V>::~map() {
}
template <class K, class V>
int map<K, V>::size(... | ALGO | 0.889267 | 4.379605 |
199964fb-a987-4d69-862f-111431c7ff23 | bose045/lammps | KOKKOS/pair_tersoff_zbl_kokkos.cpp | /* ----------------------------------------------------------------------
Contributing author: Ray Shan (SNL)
------------------------------------------------------------------------- */
#include "pair_tersoff_zbl_kokkos.h"
#include <cmath>
#include <cstring>
#include "kokkos.h"
#include "atom_kokkos.h"
#include "c... | ALGO | 0.993062 | 6.962828 |
4331d521-3970-49ae-9ebb-45ae3a7fa995 | RilesMadden/CCSF | C++ 110/week_8/canvas/canvas_post.cpp | // Week 8 Canvas Post
// Write a function to determine if a C-string begins with a specified prefix.
// Riley Madden, 110b
#include <iostream>
#include <cstring>
using namespace std;
bool starts(char *str, char *prefix);
int main() {
char str[] = "airplanes";
char prefix[] = "air";
if (starts(str, pref... | ALGO | 0.955461 | 5.908912 |
c6ffb0a2-9dc2-465b-8b59-bb8a0d5aa10d | ly1996/SimpleAlgorithms | 剑指offer/矩阵中的路径/solution.cpp | class Solution {
public:
bool hasPath(char* matrix, int rows, int cols, char* str)
{
if(matrix == nullptr || rows < 1 || cols < 1 || str == nullptr)
return false;
bool * visited = new bool[rows * cols];
memset(visited,false,rows*cols);
int pathLength... | ALGO | 0.999727 | 5.98463 |
e24fdcd6-e187-4828-905c-137e3e289f6e | ambujtripathi988/Coding | HackerRank_Problem_Solving/Library_Fine.cpp |
// https://www.hackerrank.com/challenges/library-fine/problem?h_r=profile
#include <bits/stdc++.h>
using namespace std;
int main()
{
int d1 , m1 , y1 , d2 , m2 , y2 , fine = 0 ;
cin >> d1 >> m1 >> y1 >> d2 >> m2 >> y2 ;
if (y1 < y2)
{
cout << "0" ;
}
else if (y1 == y2 )
{
... | ALGO | 0.999807 | 4.284838 |
67e2ac26-752b-4e2f-a84a-70c31f49756e | NadavT/shallow_boost | libs/geometry/test/algorithms/distance/distance_se_geo_l_ar.cpp | // Boost.Geometry (aka GGL, Generic Geometry Library)
// Unit Test
#ifdef BOOST_GEOMETRY_TEST_DEBUG
#include <iostream>
#endif
#ifndef BOOST_TEST_MODULE
#define BOOST_TEST_MODULE test_distance_geographic_linear_areal
#endif
#include <boost/test/included/unit_test.hpp>
#include "test_distance_geo_common.hpp"
#includ... | TEST | 0.98008 | 7.777133 |
e727179d-1975-47fd-9679-a812c2a90b29 | ishandutta2007/codeforces | kmjp/normal/1506/A.cpp | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#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 FORR2(x,y,arr) for(auto& [x,y]:arr)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define ... | ALGO | 0.999938 | 3.805644 |
ce040fef-af26-4f7f-b41f-7cc4e28f1d2e | MostafaMohamed2001/C-Data-Structure | .history/hello_20240714060248.cpp | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <math.h>
using namespace std;
int main(){
int arr[5][5];
for (int i = 0; i < 5; ++i){
for (int j = 0; j < 5; ++j){
cin >> arr[i][j];
}
}
for (int j = 0; j < 5; ++j){
for (int i ... | ALGO | 0.999825 | 3.463464 |
1e211d23-1b4e-40c5-9f5d-78a387e648b0 | wyl-lab/raspbian | IntelligenceHomeSys/SecuritySubsystem/SecuritySubsystem/基于OpenCV的人脸识别/opencv-master/modules/imgproc/src/samplers.cpp | #include "precomp.hpp"
namespace cv
{
static const uchar*
adjustRect( const uchar* src, size_t src_step, int pix_size,
Size src_size, Size win_size,
Point ip, Rect* pRect )
{
Rect rect;
if( ip.x >= 0 )
{
src += ip.x*pix_size;
rect.x = 0;
}
else
{
... | ALGO | 0.997739 | 5.681817 |
a58ed900-7820-4dc4-9f9e-8cc46be88fe1 | Dylan13531/CPLUS | C8/firstref802.cpp | /*************************************************************************
> File Name: firstref802.cpp
> Author: DylanYang
> Mail: <EMAIL>
> Created Time: 一 1/20 21:03:57 2020
************************************************************************/
#include <iostream>
int main()
{
using namespac... | TOOL | 0.884773 | 3.238484 |
c2610439-5d67-46ab-aa35-3cc5a540239c | NiccoloRosa/Esercitazione_6_Sorting | Exercise2/main.cpp | //ESERCIZIO 2
#include <cmath> // contiene floor e altre funzioni matematiche
#include <iostream> // libreria per i flussi di input/output
#include <numeric> // contiene iota
#include <iostream>
#include <sstream> // libreria per la conversione di stringhe
#include <chrono> // https://en.cppreference.com/w/cpp/chr... | ALGO | 0.994375 | 4.678905 |
380a0799-d5ec-4bc2-936e-d6adbe288257 | lsuinl/Baekjoon | C++/2075.cpp | #include <iostream>
#include <queue>
#include <algorithm>
using namespace std;
//넘모 멋지다
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
//오름차순
priority_queue<int, vector<int>, greater<int>> q;
int n;
cin>>n;
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
... | ALGO | 0.999889 | 3.578071 |
3beef9f3-dbc7-429b-9646-a69f539842f5 | ammarGamal123/Codeforces-Solutions | CodeForces/GNU C++14/735D | Taxes/208645209.cpp | #include <bits/stdc++.h>
using namespace std;
using int64 = int64_t;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define int long long
#define lll __int128
#define ordered_set tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
#define Ceil(n, m) (((n) / (... | ALGO | 0.999861 | 4.300086 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.