• LQDOJ
  • Trang chủ
  • Bài tập
  • Bài nộp
  • Thành viên
  • Kỳ thi
  • Nhóm
  • Giới thiệu
    • Máy chấm
    • Khóa học
    • Đề xuất ý tưởng
    • Proposal Problem
    • Proposal Contest
    • Tools
    • Báo cáo tiêu cực
    • Báo cáo lỗi

Tiếng Việt

Tiếng Việt
English

Đăng nhập

Đăng ký

leevantt1210

  • Giới thiệu
  • Bài tập
  • Bài nộp

Rating
-
Bài tập
1
Điểm
201
Rating #
-
Điểm #
28658

Giới thiệu

include <bits/stdc++.h>

define ll long long

using namespace std;
const int mod = 1e9 + 7;
ll muab(ll a,ll b){
ll res=1;
a%=mod;
while(b>0){
if(b%2==1){res=(resa)%mod;}
a=(a
a)%mod;
b=b/2;
} return res;
}
int main()
{
int m;cin>>m;
unordered_map<int,int>dem;
for(int i=0;i<m;i++){ int p; cin>>p; dem[p]++;
}
ll d=1;
for( auto &[p,cnt]:dem){
d=(d(cnt+1))%((mod-1)2);
}
ll tichmu=1;
for(auto &[p,cnt]:dem){
ll mutungso=(cntd/2)%(mod-1);
tichmu=(tichmu
muab(p,mutungso))%mod;
} cout<<tichmu;
return 0;
}


«    »
Thứ 2
Thứ 3
Thứ 4
Thứ 5
Thứ 6
Thứ 7
CN
Ít
Nhiều

proudly powered by DMOJ| developed by LQDJudge team