답안 #1041445

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1041445 2024-08-02T04:03:05 Z vjudge1 Ljetopica (COI19_ljetopica) C++17
0 / 100
1 ms 348 KB
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define pb push_back
#define pf push_front
#define ep emplace_back
#define ef emplace_front
#define len(a) *(&a+1)-a  
#define int long long
#define ld long double
#define mod 1000000007
#define stoi stoll
#define all(ls) ls.begin(),ls.end()
#define allr(ls) ls.rbegin(),ls.rend()
#pragma GCC optimize("Ofast,unroll-loops")
#pragma GCC target("avx,avx2,sse,sse2")
 
using namespace std;

using namespace __gnu_pbds;

template<typename type>using ordered_set=tree<type,null_type,less<type>,rb_tree_tag,tree_order_statistics_node_update>;
template<typename type>using ordered_multiset=tree<type,null_type,less_equal<type>,rb_tree_tag,tree_order_statistics_node_update>;

struct custom_hash{
	static uint64_t splitmix64(uint64_t x){
		x+=0x9e3779b97f4a7c15;
		x=(x^(x>>30))*0xbf58476d1ce4e5b9;
		x=(x^(x>>27))*0x94d049bb133111eb;
		return x^(x>>31);
	}
	size_t operator()(uint64_t x) const{
		static const uint64_t FIXED_RAnDOM=chrono::steady_clock::now().time_since_epoch().count();
		return splitmix64(x+FIXED_RAnDOM);
	}
};

int integer(int n){
	int num=n;
	int dec_value=0;
	int base=1;
	int temp=num;
	while(temp>0){
		int last_digit=temp%10;
		temp/=10;
		dec_value+=last_digit*base;
		base*=2;
	}
	return dec_value;
}

void solve(){
	int n,k;
	cin>>n>>k;
	string s;
	cin>>s;
	int ans=0;
	for(int i=0;i<2;i++){
		int e;
		cin>>e;
		ans+=integer(e);
	}
	cout<<ans<<endl;
}

signed main(){
	ios_base::sync_with_stdio(0);
	cin.tie(nullptr); 
	cout.tie(nullptr);
	// freopen("talent.in","r",stdin);
	// freopen("talent.out","w",stdout);
	int t=1;
	// cin>>t;
	while(t--){
		solve();
	}
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -