Contest Tháng 10 (Nguyên tố)

Các bài

Đề bài Điểm Tỷ lệ AC Thành viên
K nguyên tố 10 7,4% 5
MulDiv 10 29,4% 3
Sắp xếp nguyên tố 10 20,0% 2

Kỳ thi này không tính rating.

  • Kỳ thi này yêu cầu bạn phải đúng hết bộ test của một bài để có điểm.
  • Kỳ thi này không sử dụng pretest.
  • Kỳ thi này không giới hạn số lần nộp bài.

Kỳ thi sử dụng format ICPC.

  • Điểm của bài sẽ là điểm của lần nộp bài có điểm lớn nhất.
  • Các lần nộp bài trước lần nộp bài có điểm lớn nhất sẽ tính penalty 20 phút.
  • Các thí sinh bằng điểm sẽ được phân định bằng tổng thời gian của lần nộp bài cuối cùng làm thay đổi kết quả trong các bài tập có điểm lớn hơn 0 (cộng với penalty). Nếu vẫn bằng nhau, phân định bằng thời gian của lần nộp bài cuối cùng làm thay đổi kết quả.

Bảng điểm được hiển thị trong quá trình diễn ra kỳ thi.


Nhận xét


  • 0
    Nguoingu45  đã bình luận lúc 5 tháng 10 năm 2023, 9:06 p.m.

    / Author: Ngunguoi45/

    pragma GCC optimize("O2")

    include<bits/stdc++.h>

    define maxN INT_MAX

    define minN INT_MIN

    define maxA 1005

    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 per(i,a,b) for(int i = a;i >= b;i--)

    using namespace std; typedef long long ll; typedef double db; typedef vector<int> vi; typedef vector<ll> vll; typedef pair<int,int> pii; typedef pair<ll,ll> pll;

    const ll mod = 998244353;

    ll powmod(ll a, ll b, ll m){ if(b==0) return 1; ll temp = powmod(a,b/2,m)%m; if(!(b&1)) return temptemp%m; return powmod(a,b-1,m)%ma%m; }

    vector<int>primes(1e7+5,0); void seive(){ for(int i = 2;ii<=10000005;i++){ for(int j = ii;j<=10000005;j+=i){ if(primes[i]==0) primes[j] = i; } } for(int i = 2;i<=10000005;i++) if(primes[i]==0) primes[i] = i; }

    int count_us(ll n){ int ans = 1; while(n>1){ int y = primes[n]; int cnt = 1; while(n%y==0){ cnt++; n/=y; } ans*=cnt; } return ans; }

    int main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); seive(); int t; cin >> t; while(t--){ ll n,temp = 2,ans = 1,res = 1; cin >> n; ans = count_us(n); cout << ((ans&1)?powmod(n, ans>>1, mod)*int(sqrt(n))%mod:powmod(n, ans>>1, mod)) << "\n"; } return 0; }

    /* NOTICE!:

    • Read the problem carefully.
    • Constants.
    • Int overflow, array bounds.
    • Special cases (n=1)?
    • WRITE STUFF DOWN. */

  • 0
    Nguoingu45  đã bình luận lúc 5 tháng 10 năm 2023, 9:06 p.m.

    / Author: Ngunguoi45/

    pragma GCC optimize("O2")

    include<bits/stdc++.h>

    define maxN INT_MAX

    define minN INT_MIN

    define maxA 1005

    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 per(i,a,b) for(int i = a;i >= b;i--)

    using namespace std; typedef long long ll; typedef double db; typedef vector<int> vi; typedef vector<ll> vll; typedef pair<int,int> pii; typedef pair<ll,ll> pll;

    int prime(int n){ if(n==2 || n==3) return 1; if(n%2==0 || n%3==0 || n<2) return 0; int k = 1; while(6k-1<=sqrt(n)){ if(n%(6k-1)==0 || n%(6*k+1)==0) return 0; k++; } return 1; }

    int main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int n,ans = 0,temp = 0; cin >> n; int hai = 0, mot = 0; while(n--){ int temp; cin >> temp; if(temp&1) mot++; else hai++; } if(mot==0){ cout << 1; return 0; } temp = 0; if(hai>0){ ans++; temp = 2; hai--; } mot--; ans++; temp++; while(hai--){ temp+=2; ans += prime(temp); } while(mot--){ temp++; ans+=prime(temp); } cout << ans; return 0; }

    /* NOTICE!:

    • Read the problem carefully.
    • Constants.
    • Int overflow, array bounds.
    • Special cases (n=1)?
    • WRITE STUFF DOWN. */

  • 0
    Nguoingu45  đã bình luận lúc 5 tháng 10 năm 2023, 9:06 p.m.

    / Author: Ngunguoi45/

    pragma GCC optimize("Ofast")

    include<bits/stdc++.h>

    define maxN INT_MAX

    define minN INT_MIN

    define maxA 1005

    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 per(i,a,b) for(int i = a;i >= b;i--)

    using namespace std; typedef long long ll; typedef double db; typedef vector<int> vi; typedef vector<ll> vll; typedef pair<int,int> pii; typedef pair<ll,ll> pll;

    ll prime(ll n){ if(n==2 || n==3) return 1; if(n%2==0 || n%3==0 || n<2) return 0; int k = 1; while(6k-1<=sqrt(n)){ if(n%(6k+1)==0 || n%(6*k-1)==0) return 0; k++; } return 1; }

    int main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int n,k; cin >> n >> k; if(n<3 && k>=2) cout << 0; else{ int ans = 0; for(int i = 1;i<=n;i++){ int dem = 0; for(int j = i;j<=n;j++){ dem += prime(j); if(dem>=k) ans++; } } cout << ans << "\n"; } return 0; }

    /* NOTICE!:

    • Read the problem carefully.
    • Constants.
    • Int overflow, array bounds.
    • Special cases (n=1)?
    • WRITE STUFF DOWN. */